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.

Reject Modernity, Return To 80s, Learn C

https://hackaday.com/2026/07/10/reject-modernity-return-to-80s-learn-c/
1•CharlesW•33s ago•0 comments

The Governance of Reasoning: Foundations of Epistemic Engineering

https://zenodo.org/records/21312267
1•javieralbuixech•1m ago•0 comments

Primary Deficits: A Short History

https://fredblog.stlouisfed.org/2026/07/primary-deficits-a-short-history/
1•loughnane•3m ago•0 comments

Monitoring DNS Registry Mutations with an Ensemble Anomaly Detection Framework

https://www.sidnlabs.nl/nieuws-en-blogs/thesis-monitoring-dns-registry-mutations-with-an-ensemble...
1•speckx•5m ago•0 comments

Active Record Migrations

https://guides.rubyonrails.org/active_record_migrations.html
1•tosh•7m ago•0 comments

Germany's richest man takes on Big Tech

https://www.dw.com/en/germanys-richest-man-takes-on-big-tech/a-77893723
3•vrganj•8m ago•0 comments

Engineering Strategy and Vision Series

https://yusufaytas.com/series/engineering-strategy-vision
3•yusufaytas•9m ago•1 comments

Valar Atomic's Ward 250 Becomes 2nd Reactor to Go Critical Under DOE Pilot

https://www.powermag.com/valar-atomics-ward-250-becomes-second-reactor-to-go-critical-under-doe-p...
1•ksec•10m ago•0 comments

Show HN: Darnlink – self-healing Markdown links that survive refactors (by UUID)

https://github.com/txemi/darnlink
1•txemi•10m ago•0 comments

Female US rower completes historic solo journey from California to Hawaii

https://www.theguardian.com/us-news/2026/jul/04/california-hawaii-rowing-solo-journey
11•speckx•13m ago•1 comments

Odyssey: Scalable PostgreSQL Connection Pooler

https://github.com/yandex/odyssey
1•tosh•14m ago•0 comments

AI Found a Root Bug in Linux That Everyone Missed for 15 Years

https://www.wired.com/story/security-news-this-week-ai-found-a-root-bug-in-linux-that-everyone-mi...
1•joozio•16m ago•0 comments

Argument Collapse: LLMs Flatten Long-Form Public Debate

https://arxiv.org/abs/2606.01736
2•mitchbob•17m ago•1 comments

A Jupiter-size planet that escaped its star's death

https://arstechnica.com/science/2026/07/a-jupiter-size-planet-that-escaped-its-stars-death/
1•Brajeshwar•21m ago•0 comments

Terrorist Groups Are Using A.I. To Gain an Edge in Battle

https://www.nytimes.com/2026/07/10/us/politics/ai-terrorism-boko-haram-nigeria.html
1•Anon84•21m ago•0 comments

HackerRank's LLM-Based Hiring Agent

https://blog.grandimam.com/posts/how-hacker-rank-scores-engineers/
1•grandimam•21m ago•0 comments

Open-source, self-hosted SEO dashboard that runs on –$4/mo of API credits

https://github.com/testedmedia/seo-command-center
2•victorsmush•27m ago•0 comments

Show HN: Standalone SearXNG CLI+MCP (no server needed)

https://github.com/nikvdp/searxng-ai-kit
1•nikvdp•27m ago•0 comments

My Experience with Evil Martians

https://old.reddit.com/r/recruitinghell/comments/1utouue/my_experience_with_evil_martians/
1•guseyn•30m ago•0 comments

LisaFPGA: The Apple Lisa computer implemented inside an FPGA

https://github.com/alexthecat123/LisaFPGA
1•birdculture•31m ago•0 comments

Meta's Muse Spark 1.1 Scores 51 on the Artificial Analysis Intelligence Index

https://twitter.com/ArtificialAnlys/status/2075677416295739660
1•bobrenjc93•37m ago•0 comments

Show HN: Orbit – AR satellite tracker, watch 15k+ objects

https://nagylukas.github.io/orbit.html
3•lukas9•38m ago•0 comments

My Hermes Setup and Usecases

https://metedata.substack.com/p/013-my-hermes-and-obsidian-set-up
3•young_mete•38m ago•0 comments

Try Even a Little at Conferences

https://maxwellforbes.com/posts/try-even-a-little-at-conferences/
2•FinnKuhn•39m ago•0 comments

Show HN: Earth Game – An offline CLI for turning life goals into quests

https://github.com/skorotkiewicz/earth-game
2•modinfo•40m ago•0 comments

A narrative account of the development of SNOBOL

https://mads.si.edu/mads/id/NMAH-AC0196_gris720521
1•cwbuilds•41m ago•0 comments

UPI: Anatomy of a Payment Transaction

https://timeseriesofindia.com/economy/reads/upi-architecture/
2•prtk25•43m ago•0 comments

Trump administration rescinds key rule protecting endangered wildlife

https://www.upi.com/Top_News/US/2026/07/10/endangered-wildlife/5421783724407/
6•Bondi_Blue•44m ago•0 comments

Modern Decor May Be Straining People's Brains

https://studyfinds.com/modern-decor-may-be-straining-peoples-brains/
27•downwithdisease•48m ago•12 comments

Chinese courts allow heirs to inherit accounts of deceased gamers

https://www.tomshardware.com/tech-industry/big-tech/chinese-courts-allow-heirs-to-inherent-accoun...
4•thisislife2•48m ago•0 comments