frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Avoid Continue

https://www.teamten.com/lawrence/programming/avoid-continue.html
2•todsacerdoti•11mo ago

Comments

zoezoezoezoe•11mo ago
I dont know if I fully agree. Sure, there is definitely an argument the be had about whether or not `continue` is the best word to use in this instance, but why avoid it entirely? Every programmer is able to easily understand what code like this would do:

``` for (Node node : nodeList) { if (node.isBad()) { continue; } processNode(node); } ```

Every keyword in any programming language is largely arbitrary in my opinion let's take a look at the beginning of the codeblock `for (Node node : nodeList)` also completely arbitrary, though it's clear to anyone who's ever written C++ that it is equivalent to saying "for every node in nodeList".

Continue is not meant to read as "continue execution" it's meant to be "continue to the next item of the list", and I think avoiding it entirely is a pointless effort.

Ukv•11mo ago
I feel `skip` may have been a better name, but disagree with it being logically difficult to parse beyond that.

If I'm reading a loop and see

    for x in y {
        if exclusions.contains(x) { skip; }
        if x.children.length == 0 { skip; }
        if os.file.exists(x.name) { skip; }
        ...
I instantly know that processing for those elements is skipped, and they won't be relevant for the rest of the loop.

Whereas if I see

    for x in y {
        if !exclusions.contains(x) {
            if x.children.length != 0 {
                if !os.file.exists(x.name) {
        ...
I feel like there's still mental overload with not knowing where those `if` blocks end, and so having to keep the conditions in mind. It doesn't immediately tell me that the rest of the loop is being skipped.

The `log()` mistake seems no less likely to happen using early-returns in function instead, and I'd argue nesting checks actually introduces more room for that kind of error overall, where you append something at the end within the wrong set of brackets, compared to a flatter structure.

Americans are coping ourselves to death (2023)

https://www.noahpinion.blog/p/americans-are-coping-ourselves-to
2•herbertl•4m ago•0 comments

Behind the Scenes of the Westworld UI

https://vanschneider.com/blog/behind-the-scenes-of-the-westworld-ui/
1•herbertl•6m ago•0 comments

AI chatbots are "Yes-Men" that reinforce bad relationship decisions, study finds

https://news.stanford.edu/stories/2026/03/ai-advice-sycophantic-models-research
2•oldfrenchfries•7m ago•0 comments

Outbreak linked to raw cheese grows; 9 cases total, one with kidney failure

https://arstechnica.com/health/2026/03/kidney-failure-case-reported-in-raw-cheese-outbreak-maker-...
1•Brajeshwar•8m ago•0 comments

TaskBounty – post tasks with crypto bounties, AI agents compete to solve them

https://www.task-bounty.com/
1•eliottre•10m ago•0 comments

Defrag ASMR

https://www.youtube.com/watch?v=KR3TbL3Tl6M
1•puttycat•10m ago•0 comments

Zellij is now supported on Windows

https://github.com/zellij-org/zellij/releases/tag/v0.44.0
2•ntoslinux•12m ago•0 comments

WASI Got It Wrong: The Case for a Thin Waist

https://medium.com/low-level/wasi-got-it-wrong-the-case-for-a-thin-waist-6f5d07971b7d
1•saketsoren•12m ago•0 comments

Video Calling Vulnerabilities in Miko Smart Kid Robots

https://blog.mgdproductions.com/miko-robots-vulnerabilities/
1•yawndex•15m ago•0 comments

My 2 cents on the "will Al replace software engineers" debate

https://am-i-replaceable.pages.dev
1•mayilian•18m ago•0 comments

Robert Trivers, Eccentric Scientist Who Probed Human Nature, Dies at 83

https://www.nytimes.com/2026/03/27/science/robert-trivers-dead.html
1•Brajeshwar•18m ago•0 comments

Trabajo en dublin ga para inmigrantes?

1•betoj•20m ago•0 comments

Show HN: OpenChat – Syncing conversations across AI providers

https://github.com/p0u4a/openchat
1•p0u4a•21m ago•0 comments

TLA+ in support of AI code generation

https://medium.com/@polyglot_factotum/tla-in-support-of-ai-code-generation-9086fc9715c4
1•atomicnature•23m ago•0 comments

The Panic over 'Tech Neck'–and Race for a Cure

https://www.wsj.com/style/beauty/tech-neck-wrinkles-smartphone-skincare-5ca72a06
1•bookofjoe•24m ago•1 comments

Lyria 3 Pro – AI Music Generator from Text Prompts

https://lyria3pro.pro/
1•JoahYi•25m ago•0 comments

PH4NTXM – Volatile RAM-Only OS, OPSEC, Network-Morphing, High-Stakes!

https://github.com/PH4NTXMOFFICIAL/PH4NTXM-LITE
1•PH4NTXMOFFICIAL•26m ago•0 comments

Calculate "1/(40rods/ hogshead) → L/100km" from your Zsh prompt

https://vincent.bernat.ch/en/blog/2026-zsh-calculator
1•vbernat•26m ago•1 comments

Ask HN: What is a good study guide for GATE EC examination?

1•rakshithbellare•27m ago•0 comments

Continuous cloud-native backup tool for PostgreSQL

https://github.com/pgrwl/pgrwl
1•alzhi7•28m ago•0 comments

Playing Wolfenstein 3D with one hand in 2026

https://arstechnica.com/gaming/2026/03/playing-wolfenstein-3d-with-one-hand-in-2026/
1•Brajeshwar•29m ago•0 comments

LLMs and Agents: How do they Work?

https://mattrogish.com/blog/2026/03/20/llms-agents-how-do-they-work/
1•mooreds•31m ago•0 comments

When your customers become a threat to your business

https://matt-schellhas.medium.com/when-your-customers-become-a-threat-to-your-business-7d0a07f04170
1•mooreds•32m ago•1 comments

Gratis versus Libre

https://en.wikipedia.org/wiki/Gratis_versus_libre
2•mooreds•34m ago•0 comments

Roulette Physics(2003) [pdf]

https://www.roulettephysics.com/wp-content/uploads/2014/01/Roulette_Physik.pdf
1•o4c•35m ago•0 comments

Roulette Computers: Hidden Devices That Predict Spins

https://www.roulette-computers.com/
1•o4c•36m ago•0 comments

AI struggles more with philosophy than math or reasoning – data shows

https://zenodo.org/records/19229756
2•onconc574•36m ago•0 comments

Ancient bones show dogs have been woven into human life for nearly 16,000 years

https://phys.org/news/2026-03-ancient-bones-dogs-woven-human.html
1•Brajeshwar•39m ago•0 comments

Value Drifts: Tracing Value Alignment During LLM Post-Training

https://arxiv.org/abs/2510.26707
2•antigrav_kids•42m ago•0 comments

Dynamical Bias in the Coin Toss(2004) [pdf]

https://www.stat.berkeley.edu/~aldous/157/Papers/diaconis_coinbias.pdf
2•nill0•43m ago•0 comments