frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Avoid Continue

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

Comments

zoezoezoezoe•1y 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•1y 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.

The Cheap Model Fallacy

https://twitter.com/deepwhitman/status/2067282002307612888
1•bilater•4m ago•0 comments

Unable to process: source material unavailable

https://fivetakes.news/global-minerals-supply-and-ai-infrastructure-eu-brazil-strategic-partnership
1•mmeirovich•7m ago•0 comments

Show HN: WSL Dashboard – an open-source,low-memory, high-performance GUI manager

https://github.com/owu/wsl-dashboard
2•GuardCalf•15m ago•0 comments

TIRx: An Open Compiler Stack for Evolving Frontier ML Kernels

https://tvm.apache.org/2026/06/22/tirx
1•matt_d•16m ago•0 comments

Prototyping data tools with AI, a case study: Solar and Battery Atlas

https://ember-energy.org/latest-updates/prototyping-data-tools-with-ai-a-case-study-solar-battery...
2•toomuchtodo•16m ago•1 comments

Stripe pre-launch security checklist for indie SaaS

https://github.com/galakurpi/stripe-prelaunch-security-checklist
1•jongalarraga•16m ago•0 comments

Show HN: A private pager for your AI agent loops

https://ask-a-human.ai
3•alexandroskyr•18m ago•1 comments

SeeDance 2.5 Is Stunning

https://twitter.com/Long4AI/status/2069262125776920582
3•vantareed•21m ago•0 comments

AI Wrote the Code. Nobody Knows Why It Made Those Decisions

https://brunelly.com/
2•rihabzt•25m ago•0 comments

Latexdiff online – diff two LaTeX files in the browser

https://thelatexlab.com/latexdiff-online/
1•sahiltll•25m ago•0 comments

Matrix and Quaternion FAQ

https://j3d.org/matrix_faq/matrfaq_latest.html
1•signa11•27m ago•0 comments

Who Does What? Team Topologies for the Agentic Platform

https://blog.owulveryck.info/2026/06/22/who-does-what-team-topologies-for-the-agentic-platform.html
1•owulveryck•28m ago•0 comments

Thousand-year-old ancient oak tree linked to 'Robin Hood' legend has died

https://abc7.com/story/thousand-year-old-ancient-oak-tree-tied-robin-hood-legend-has-died-wildlif...
1•ValentineC•30m ago•1 comments

Ask HN: Product idea validation made simple and streamlined

https://pmfboard.com/
1•connollystr•31m ago•1 comments

Mental Illness Does Not Cause Homelessness

https://truths-and-loves.ghost.io/mental-illness-does-not-cause-homelessness/
1•deterministic•35m ago•0 comments

The Lure of "Magic Bullets" in Reforming Schools

https://larrycuban.wordpress.com/2026/06/22/the-lure-of-magic-bullets-in-reforming-schools/
1•Tomte•36m ago•0 comments

Egypt denied flight to Seattle ahead of final World Cup group match

https://www.aljazeera.com/sports/2026/6/22/egypt-denied-flight-to-seattle-ahead-of-final-world-cu...
1•sbmthakur•36m ago•0 comments

Show HN: Cited – a searchable index of what experts recommend on podcasts

https://cited.co/
1•knothacker•37m ago•1 comments

In memory of the man who put red and green squiggles under words

https://devblogs.microsoft.com/oldnewthing/20260622-00/?p=112451
1•signa11•38m ago•0 comments

Show HN: A pure ARM64 Assembly web server, now on Linux with CGI for no reason

https://github.com/imtomt/ymawky/tree/linux
1•imtomt•40m ago•0 comments

73+ IoCs for the Impacket Hacking Library

https://github.com/ThatTotallyRealMyth/Impacket-IoCs
1•MeowMeowBinks•41m ago•1 comments

Show HN: Nobody at poker night wanted to be the dealer, so I built one

https://smartdealer.poker/
1•phillippcorreia•41m ago•1 comments

Show HN: Magpie-Search

https://github.com/xfloukiex-lab/magpie-search
1•Floukie•43m ago•0 comments

Intel's bLLC: An architectural response to AMD's 3D V-Cache

https://nasengetu.com/article/bllc-intel-answer-to-amd-3dvcache
1•StizzurpXDD•51m ago•0 comments

Will It Mythos?

https://swelljoe.com/post/will-it-mythos/
38•mindingnever•53m ago•12 comments

Kunal Shah to head WhatsApp; Meta invests nearly $1B in Cred

https://www.moneycontrol.com/europe/?url=https://www.moneycontrol.com/news/business/startup/kunal...
1•satyanash•55m ago•0 comments

Reddit now blocks all free API access besides RedReader

https://old.reddit.com/r/continuumreddit/comments/1u2monb/comment/oqyqn99/
5•Markoff•57m ago•2 comments

Valve engineers talk Steam Machine pricing and heatsinks

https://www.tomshardware.com/video-games/console-gaming/valve-engineers-talk-steam-machine-pricin...
3•Timofeibu•59m ago•0 comments

Valve describes just how brutal RAM negotiations are in 2026

https://www.theverge.com/games/953945/valve-steam-machine-memory-component-crisis
2•Timofeibu•1h ago•0 comments

GitHub Family

https://github.com/JohnsonArnek/Github-Family
1•progrr_vibe_art•1h ago•1 comments