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.

Bose buys audio rival Skullcandy

https://www.engadget.com/2293698/bose-buys-audio-rival-skullcandy/
1•Markoff•1m ago•0 comments

Google's repository has crossed 1B CLs

1•oqsbo•2m ago•0 comments

CVE Record: CVE-2026-91403

https://www.cve.org/CVERecord?id=CVE-2026-91403
1•Daviey•7m ago•0 comments

Node.js: 5 vulnerabilities found, update now

https://nodejs.org/en/blog/vulnerability/october-2026-security-releases
3•danfritz•8m ago•0 comments

A million orthopteran singers from a year of continuous field recorders

https://www.biorxiv.org/content/10.64898/2026.10.18.759993v1
1•ersinesen•8m ago•0 comments

"Good" AI

https://thoughts.wyounas.com/p/what-does-good-ai-mean
1•simplegeek•10m ago•0 comments

Nonfiction Is Struggling. Publishers Are Making It Worse

https://thewalrus.ca/nonfiction-is-struggling-publishers-are-making-it-worse/
3•simplegeek•11m ago•0 comments

A Lost Schrödinger Manuscript Reveals a Surprising Twist in Quantum Physics

https://www.sciencealert.com/a-lost-schrdinger-manuscript-reveals-a-surprising-twist-in-quantum-p...
2•ibobev•11m ago•0 comments

Cable theft causes Openreach broadband outage for thousands in Thurnscoe, UK

https://www.datacenterdynamics.com/en/news/cable-theft-causes-openreach-broadband-outage-for-thou...
1•GloVin•15m ago•0 comments

Compare grid features, side by side

https://comparegrids.com/features
1•davidvela•17m ago•0 comments

A framework for evaluating agentic AI systems

https://deepsense.ai/blog/your-agent-passed-the-eval-should-you-ship-it/
1•nvmdbljstm•20m ago•0 comments

Patch the Planet – The Trail of Bits Blog

https://blog.trailofbits.com/2026/06/22/introducing-patch-the-planet/
2•janandonly•23m ago•0 comments

Terminal Setup for macOS: ZSH and Oh My Zsh

https://solomk.in/posts/terminal-configuration
1•ankitg12•23m ago•0 comments

Compaction Laundering:Provenance Destruction in Context-Compacting Coding Agents

https://arxiv.org/abs/2610.29869
1•ersinesen•25m ago•0 comments

ChatGPT Ads as over 100k advertisers have used the platform

https://openai.com/index/chatgpt-ads-expands-26-new-countries/
2•haebom•27m ago•0 comments

Show HN: A stateless MCP server over our docs – search, list_topics, get_article

https://chinaready.co/docs/api/
2•martinliucn•29m ago•0 comments

ZK-irp-firewall: Zero-knowledge invariant enforcement for AI agents

https://github.com/trenttrinder1111-byte/zk-irp-firewall
3•trenttrinder111•30m ago•0 comments

A Markdown File Should Just Open

https://joshuamorris.info/notes/2026/10/13/a-markdown-file-should-just-open/
5•TheWoollyBully•31m ago•1 comments

Halloween Gothic Reading Pathway

https://www.betterreads.dev/blog/halloween-gothic-pathway
2•zlu•35m ago•0 comments

AI Agent Observability with OpenTelemetry

https://signoz.io/blog/opentelemetry-ai-agent-observability/
8•dhruv_ahuja•36m ago•0 comments

They Want Your Blood

https://www.theverge.com/column/1015563/blood-death-clock-longevity-apps-health-tech
3•saikatsg•38m ago•0 comments

Show HN: no-fi – a linter for the ASCII wireframes agents draw

https://github.com/p-a-u-l-i-e/no-fi
1•PaulVanOijen•41m ago•0 comments

Turning IPv6 tunnels into programmable delay lines for pulsing DoS

https://blog.apnic.net/2026/10/22/turning-ipv6-tunnels-into-programmable-delay-lines-for-pulsing-...
1•frostbyte7•43m ago•0 comments

Show HN: Aw-1 – Deterministic AST circuit breaker and kernel jail for AI agents

https://github.com/MvikManners/aw1-circuit-breaker
1•MvikVela•43m ago•0 comments

Digital Hygiene (2025)

https://karpathy.bearblog.dev/digital-hygiene/
2•vinhnx•45m ago•1 comments

Claude Code install script is down

https://downloads.claude.ai/claude-code-releases/bootstrap.sh
5•sspross•47m ago•0 comments

Chasing a Flake into OpenSSL's GCM Kloak Path

https://getkloak.io/blog/the-h-that-wasnt-there/
1•neo2006•50m ago•0 comments

Enterprises keep buying software upgrades that IT thinks will make things worse

https://arstechnica.com/information-technology/2026/10/survey-enterprises-waste-28-percent-of-sof...
2•joozio•50m ago•0 comments

"Ignore the Slop"

https://daniel.haxx.se/blog/2026/10/22/ignore-the-slop/
10•asimovDev•53m ago•0 comments

Accrescent: A novel Android app store focused on security, privacy and usability

https://accrescent.app/
1•teekert•56m ago•0 comments