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•10mo ago

Comments

zoezoezoezoe•10mo 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•10mo 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.

Measurement of a lithium plume from the uncontrolled re-entry of a Falcon 9

https://www.nature.com/articles/s43247-025-03154-8
1•morsch•24s ago•0 comments

AI succeeds in diagnosing rare diseases

https://www.nature.com/articles/s41586-025-10097-9
1•XzetaU8•39s ago•0 comments

The Work Behind the Writing: On Writers and Their Day Jobs

https://lithub.com/the-work-behind-the-writing-on-writers-and-their-day-jobs/
1•simplegeek•6m ago•0 comments

Newpress.com is a community driven journalism platform

https://newpress.com
1•nerder92•7m ago•1 comments

Half the AI Agent Market Is One Category. The Rest Is Wide Open

https://garryslist.org/posts/half-the-ai-agent-market-is-one-category-the-rest-is-wide-open
1•mellosouls•7m ago•1 comments

Scheme on Java on Common Lisp

https://github.com/atgreen/cl-kawa
1•varjag•7m ago•0 comments

Online Deception in Social Media (2014)

https://cacm.acm.org/research/online-deception-in-social-media/
1•rramadass•10m ago•1 comments

Porkbun sells out – Starts requiring Age ID despite no legal requirement

https://kb.porkbun.com/article/225-why-porkbun-id-verification
2•evolve2k•12m ago•1 comments

GenLoop–AI that trains generations of humans instead of growing data centers

https://docs.google.com/document/d/17XDU9D7uRS1P7U0VRlI0Yogt3eiDG6QysYc7ROHwJoc/edit?usp=drivesdk
1•LAKSzero-I•16m ago•1 comments

Show HN: Databasus v3.16.0 – new release of self-hosted PostgreSQL backup tool

https://github.com/databasus/databasus
1•rostislav_dugin•17m ago•0 comments

California tried to protect students' data. Tech companies found loopholes

https://themarkup.org/artificial-intelligence/2026/02/21/california-tried-to-protect-students-dat...
1•giuliomagnifico•22m ago•0 comments

Suspect in Tumbler Ridge school shooting described violent scenarios to ChatGPT

https://www.theverge.com/ai-artificial-intelligence/882814/tumbler-ridge-school-shooting-chatgpt
1•saikatsg•22m ago•0 comments

Postgres Is Your Friend. ORM Is Not

https://hypha.pub/postgres-is-your-friend-orm-is-not
2•MYEUHD•23m ago•1 comments

Linux 7.0 Makes Preparations For Rust 1.95

https://www.phoronix.com/news/Linux-7.0-Rust-1.95-Prep
2•tenpa0000•23m ago•0 comments

Xbox chief Phil Spencer is leaving Microsoft

https://www.theverge.com/news/882241/microsoft-phil-spencer-xbox-leaving-retirement
1•saikatsg•23m ago•0 comments

Running RISC-V in a VM to test my snaps

https://blog.popey.com/2026/02/running-risc-v-in-a-vm-to-test-my-snaps/
2•jandeboevrie•25m ago•0 comments

Show HN: TurboStitchGIF GIF decoder that lets you choose: safety or speed

1•DenisDolya•25m ago•0 comments

Show HN: Electron IPC Bridge- Auto-generated type-safety without the boilerplate

https://metacurb.github.io/electron-ipc-bridge/
1•StrangeSound•26m ago•0 comments

How the NYT Made Its Tiny, Animated Olympic Athletes

https://www.nytimes.com/2026/02/20/insider/winter-olympics-little-athletes.html
1•pedrosbmartins•26m ago•0 comments

Psychedelics For Your Software Engineers

https://nearshoreamericas.com/psychedelics-for-your-software-team-leaders-weight-in/
1•sleepycal•27m ago•0 comments

Fedify 2.0.0: Modular architecture, debug dashboard, and relay support

https://github.com/fedify-dev/fedify/discussions/580
3•dahlia•30m ago•0 comments

Amazon's tax bill plunges after GOP tax cuts

https://www.politico.com/news/2026/02/06/amazon-emerges-a-big-winner-from-gop-tax-cuts-00768985
1•ceejayoz•30m ago•0 comments

Show HN: Persona AI – A decision engine that outputs binary verdicts, not chat

https://personai.fun
1•kmish9685•31m ago•0 comments

Show HN: Can you beat an AI at "being human" using one word?

https://turingduel.com/
1•jacob_indie•38m ago•1 comments

ESLint Rules Index

https://eslint-rules-index.vercel.app/
1•EmanueleMinotto•39m ago•0 comments

OpenClaw Partners with VirusTotal for Skill Security

https://openclaw.ai/blog/virustotal-partnership
1•sheikhsakib•43m ago•0 comments

Show HN: Reflekt – free, unbranded in-app surveys for mobile apps

https://www.usereflekt.com
1•noahSchenk_•47m ago•0 comments

Show HN: Landing page for a before/after proof-of-work app; feedback wanted

https://yourbeforeafterwork.netlify.app/
1•sudeshss•47m ago•0 comments

Building personal software is now Practical

https://divanv.com/post/age-of-personal-software/
4•divanvisagie•49m ago•1 comments

Hacking Tauri for Designer

https://yujonglee.com/blog/hacking-tauri-for-designer/
1•yujonglee•52m ago•0 comments