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

Comments

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

Show HN: Making video games every day with Claude (Day 5: Minefield)

https://gamevibe.us/5-minefield
1•pzxc•19s ago•0 comments

Software Engineering Practices (Are Also) Useful for Token Reduction

https://robotpaper.ai/software-engineering-practices-are-also-useful-for-token-reduction/
1•speckx•44s ago•0 comments

Hustlers are cashing in on China's OpenClaw AI craze

https://www.technologyreview.com/2026/03/11/1134179/china-openclaw-gold-rush/
1•omer_k•1m ago•0 comments

Release of Writing App: Alistair v1.0

https://alistaircrowe.com/
1•RyanProietto•2m ago•0 comments

Meta's Smart Glasses Dominate Wearables Market in 2026

https://www.techbuzz.ai/articles/meta-s-smart-glasses-dominate-wearables-market-in-2026
1•Vaslo•3m ago•0 comments

Not Your Father's Internet

https://systemsapproach.org/2026/04/20/not-your-fathers-internet/
1•zdw•3m ago•0 comments

Online response to the attack on Sam Altman's house shows a generational divide

https://fortune.com/2026/04/14/ai-backlash-revolutionary-sam-altman-molotov-cocktails-data-centers/
1•measurablefunc•4m ago•0 comments

Postmortem-Driven Development

https://infisical.com/blog/postmortem-driven-development
3•vmatsiiako•4m ago•0 comments

Why every developer needs their own agent-skills (and how I code in 04/2026)

https://olshansky.substack.com/p/why-every-developer-needs-their-own
1•Olshansky•4m ago•0 comments

Our AI Onboards New Hires Better Than We Do

https://frankc.net/ai-onboarding
1•speckx•5m ago•0 comments

Palantir Wants to Reinstate the Draft

https://reason.com/2026/04/20/this-big-tech-firm-wants-to-reinstate-the-draft/
3•tcp_handshaker•6m ago•0 comments

I built a native iOS app with Rails and one YAML file

https://newsletter.masilotti.com/p/how-i-built-a-native-ios-app-with
1•joemasilotti•6m ago•0 comments

Show HN: Open security key on nrf52480 with NFC

https://github.com/solokeys/solo2/pull/196
3•ecesena•8m ago•0 comments

I built an open-source AI agent OS

https://github.com/OpenCognit/Opencognit
2•otnap•8m ago•0 comments

Show HN: My First iOS App

https://apps.apple.com/us/app/memovee/id6759630955
1•zacksiri•9m ago•0 comments

Project Shadows: agents that filter context before acting

https://omarmegawer.substack.com/p/part-3-project-shadows
2•megawer•11m ago•0 comments

Show HN: My Invention Engine – GDL is more powerful

https://groundeddiscoverylabs.com
1•Whyachi•12m ago•0 comments

Ask HN: Is GitHub's #1 repo fake? build-your-own-x 491K stars

1•throwawaysoso•12m ago•0 comments

First per-image PCA decomposition of Kodak suite reveals deliberate curation

https://github.com/PearsonZero/kodak-pcd0992-statistical-characterization
1•PearsonZero•12m ago•0 comments

Agent is probably using Git worktrees

https://yasint.dev/agents-and-git-worktrees/
1•speckx•13m ago•0 comments

Pelican 4.12 Released

https://getpelican.com/blog/pelican-4.12-released/
2•pauloxnet•16m ago•0 comments

Did a Metallurgical Failure Cause a Night to Remember?

https://www.tms.org/pubs/journals/JOM/9801/Felkins-9801.html
2•dmbche•19m ago•0 comments

Pgrust: Rebuilding Postgres in Rust with AI

https://malisper.me/pgrust-rebuilding-postgres-in-rust-with-ai/
1•luu•21m ago•0 comments

Your Company Is a Skill Now

https://arlo.substack.com/p/your-company-is-a-skill-now
3•bizgrayson•21m ago•0 comments

CountMediQ – Count Pills from a Photo on iOS

https://apps.apple.com/us/app/countmediq-pill-counting-app/id6463065655
1•sam_son•21m ago•0 comments

Show HN: Einlang, a math-intuitive language with lots of good stuff

https://github.com/einlang/einlang
1•amazing42•21m ago•0 comments

Anthropic's Mythos AI model sparks fears of turbocharged hacking

https://arstechnica.com/ai/2026/04/anthropics-mythos-ai-model-sparks-fears-of-turbocharged-hacking/
2•tartoran•22m ago•0 comments

Peter Thiel Is Building a Parallel Justice System – Powered by AI

https://www.codastory.com/polarization/can-we-trust-an-ai-jury-to-judge-journalism/
7•cdrnsf•23m ago•2 comments

PyTexas 2026 Recap

https://bernat.tech/posts/pytexas-2026-recap/
1•gaborbernat•23m ago•1 comments

Borumi – Create videos, without the hassle

https://borumi.com/
1•mvdwoord•24m ago•1 comments