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.

NeverLose – Crash-proof any Python function with one decorator

https://github.com/neverlose-io/neverlose
1•NeverLose_io•2m ago•0 comments

The 2.5-hour AI-generated Odyssey movie is 2.5 hours too long

https://www.theverge.com/entertainment/996499/ai-odyssey-movie-review
1•robenkleene•2m ago•0 comments

RepoGuard – CLI to stop Cursor and Copilot from bypassing architecture

https://github.com/taylormatematica-beep/repoguard
1•taylor_matemati•5m ago•0 comments

Show HN: OpsGraph – evidence-first PostgreSQL investigations

https://opsgraph-site-seven.vercel.app/
2•arittrabag•5m ago•0 comments

Show HN: I built a small tool to turn my essays into visual stories for YouTube [video]

https://www.youtube.com/watch?v=Sv1u6Oeum5k
1•devrob•6m ago•0 comments

Are AIs Still Struggling with CAPTCHAs?

https://www.schneier.com/blog/archives/2026/09/are-ais-still-struggling-with-captchas.html
1•danaris•6m ago•0 comments

Show HN: Qpilot – run your manual test cases without writing test code

https://github.com/broxhq/qpilot
1•broxhq•7m ago•0 comments

Allelify: Run commands in parallel while storing logs in /tmp to limit noise

https://www.npmjs.com/package/allelify
1•vismit2000•8m ago•0 comments

Grandmother falsely accused of bank theft after alleged AI facial recognition

https://abcnews.com/US/grandmother-falsely-accused-bank-theft-after-alleged-ai/story?id=136536444
1•OutOfHere•8m ago•0 comments

Models train, from gradient descent to Adam

https://stochastic.blog/how-models-train-from-gradient-descent-to-adam/
1•Anon84•9m ago•0 comments

I Thought Running to Christ Will Save Me from My Demons

https://etechx.co.ke/i-thought-running-to-christ-will-save-me-from-my-demons
2•ndegekmw•9m ago•0 comments

My Boyfriend's Fiancée Revealed His Hidden Truth

https://etechx.co.ke/my-boyfriends-fiancee-revealed-his-hidden-truth
1•ndegekmw•10m ago•0 comments

Auditing in the age of (good enough) AI

https://blog.trailofbits.com/2026/09/18/auditing-in-the-age-of-good-enough-ai/
1•ingve•11m ago•0 comments

Last 30 days of AI but as an anime scene

https://twitter.com/DavidAmal/status/2100565801392914657
1•amaldavid•12m ago•1 comments

Artificial What Now?

https://riddle.press/artificial-what-now/
1•wilabroard•13m ago•0 comments

Reviving a discontinued MediaTek smart display with a self-built kernel

https://medium.com/@mloukeris/my-mini-kitchen-tv-runs-docker-now-5dffad481fa7
1•milouk•14m ago•0 comments

14 years as an engineer, written for people starting with a gap in their record

https://yogesh.lonkar.org/posts/engineer/
2•yogeshlor•14m ago•1 comments

Exclusive – Anthropic sets up biology lab as it ramps AI drug program

https://www.msn.com/en-us/news/other/exclusive-anthropic-quietly-sets-up-biology-lab-as-it-ramps-...
1•mastry•15m ago•1 comments

New England RetroFest and the Maine Vintage Computer Society

https://www.goto10retro.com/p/new-england-retrofest-and-the-maine
1•rbanffy•17m ago•0 comments

Meet a mouse whose brain cortex is made up of human cells

https://www.technologyreview.com/2026/09/16/1144210/meet-a-mouse-whose-brain-cortex-is-made-up-of...
1•wjSgoWPm5bWAhXB•17m ago•0 comments

Talus: eBPF ransomware detector for Linux (Rust)

https://github.com/BartoszOsiej/talus-process-monitor
1•bartoszosiej123•18m ago•0 comments

Can AI Save Science?

https://www.computer.org/publications/tech-news/community-voices/ai-save-science
1•rbanffy•19m ago•0 comments

I don't like passkeys

https://hawksley.dev/blog/i-dont-like-passkeys
4•ethanhawksley•19m ago•0 comments

Teknium update on dropped an Hermes' architecture

https://twitter.com/Teknium/status/2100645382552428963
1•thunderbong•21m ago•0 comments

Bend 2 and the Vibe-Coding Trap

https://blog.liampwll.com/posts/bend_vibe_coding/
17•LiamPowell•22m ago•4 comments

Is it still worthwhile to teach cursive in school?

https://www.economist.com/culture/2026/09/17/is-it-still-worthwhile-to-teach-cursive-in-school
1•bookofjoe•22m ago•0 comments

Capability Attenuation in Agentic Hierarchies

https://kevinhoffman.blog/posts/capability-attenuation-agent-hierarchies/
1•autodidaddict•23m ago•1 comments

Kranti Cookbook

https://kranticookbook.com/
1•newswasboring•23m ago•0 comments

The exact price of local realism in CHSH experiments

https://arxiv.org/abs/2608.18886
1•AA_ron•24m ago•0 comments

Where Waterfox Stands on AI and LLMs

https://www.waterfox.com/blog/where-waterfox-stands-on-ai-llms/
2•HieronymusBosch•24m ago•0 comments