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

Comments

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

We will all work for AGI

https://indiansinai.com/stories/we-will-work-for-agi
1•ajax33•26s ago•0 comments

Quine Game

https://adam.scherl.is/static/quine-game/
1•snarkconjecture•3m ago•1 comments

Declining Global Security

https://epthinktank.eu/2026/04/02/declining-global-security/
1•jruohonen•3m ago•0 comments

Maybe Trump Should Not Have Given This Speech

https://www.theatlantic.com/ideas/2026/04/trump-iran-war-speech/686663/
2•handfuloflight•4m ago•1 comments

Show HN: Widekey Keyboard for Android, double/long tap for 2nd on dual button

https://github.com/kaie/widekey-keyboard
1•kaiengert•4m ago•0 comments

Nursing Is the Surefire New Path to American Prosperity

https://www.wsj.com/economy/jobs/nursing-jobs-pay-prosperity-b2769391
1•JumpCrisscross•4m ago•0 comments

PS6 Could Ditch Built‑in Disc Drive,Let Players Buy Ext. Unit for Physical Games

https://www.extremetech.com/gaming/ps6-could-ditch-builtin-disc-drive-let-players-buy-external-un...
1•Markoff•6m ago•0 comments

IKEA working on gaming console konsål

https://www.gamereactor.se/rykte-ikea-bygger-svensk-spelkonsol-med-vansinnig-prestanda-ska-lanser...
1•amarant•7m ago•0 comments

Refactoring Is Not Heroism – An Information-Theoretic Proof

https://github.com/HeinrichvH/articles/blob/main/building-with-ai/01-entropy-cycle/01-entropy-cyc...
1•HeinrichAQS•7m ago•0 comments

Where to host leaked Claude Code source?

https://github.com/tornikeo/claude-code/
2•tornikeo•10m ago•1 comments

Automated Pigeon Defense System

https://old.reddit.com/r/SideProject/comments/1s9ywir/automated_pigeon_defense_system/
2•thunderbong•12m ago•0 comments

We automated our business vetting with OpenClaw

https://www.indiehackers.com/post/we-automated-our-business-vetting-with-openclaw-788b285744
1•geojacobm6•19m ago•0 comments

Scaling a Monolith to 1M LOC: 113 Pragmatic Lessons from Tech Lead to CTO

https://www.semicolonandsons.com/articles/scaling-a-monolith-to-1m-loc-113-pragmatic-lessons-from...
1•birdculture•19m ago•0 comments

Claude Code users hitting usage limits 'way faster than expected'

https://www.bbc.com/news/articles/ce8l2q5yq51o
12•steveharing1•19m ago•3 comments

AI Models Lie, Cheat, and Steal to Protect Other Models from Being Deleted

https://www.wired.com/story/ai-models-lie-cheat-steal-protect-other-models-research/
2•joozio•21m ago•0 comments

30-second setup to avoid being hit by supply chain attacks like the axios one

https://old.reddit.com/r/node/comments/1s8r8aj/30second_setup_to_avoid_being_impacted_by_supply/
1•bundie•25m ago•0 comments

Universal diagnostic and monitoring tool for GPUs, TPUs and NPUs

https://zml.ai/posts/zml-smi/
2•steren•26m ago•0 comments

WhatsApp notifies users who installed fake app made by government spyware maker

https://techcrunch.com/2026/04/01/whatsapp-notifies-hundreds-of-users-who-installed-a-fake-app-th...
3•ledoge•28m ago•0 comments

Aftonbladet Is Monetizing Your Privacy

https://www.assured.se/posts/monetizing-privacy
2•JoachimS•32m ago•0 comments

Holo3: Breaking the Computer Use Frontier

https://hcompany.ai/holo3
1•bmichel•32m ago•0 comments

Insights from 24 real subscription/email bombing waves

https://www.xorlab.com/en/blog/from-chaos-to-control-insights-from-24-email-bombing-waves
2•mfi•38m ago•0 comments

Why your agent needs one session, not one per channel – kern

https://kern-ai.com/blog/why-your-agent-needs-one-session
2•obilgic•39m ago•0 comments

RepoFortify – Production readiness scanner for GitHub repos (free, no signup)

https://repofortify.com/
1•braingemai•40m ago•0 comments

Quad9 Enables DNS over HTTP/3 and DNS over QUIC

https://quad9.net/news/blog/quad9-enables-dns-over-http-3-and-dns-over-quic/
3•itchingsphynx•40m ago•1 comments

Pulse Warroom

https://pulsewarroom.com/
1•caidenlk•43m ago•0 comments

Nerd meets crazy nerd in random comment section

https://reverseengineering.stackexchange.com/questions/8549/reverse-engineering-a-proprietary-gpu...
1•isodude•46m ago•1 comments

Evolutionary Computation Bestiary

http://fcampelo.github.io/EC-Bestiary/
2•emil-lp•47m ago•0 comments

Neuledge Context: Local-first documentation for AI agents

https://github.com/neuledge/context
2•lastdong•49m ago•0 comments

A Cost-Benefit Analysis of Using Direct Air Capture to Remove Atmospheric Carbon [pdf]

https://energyanalytics.org/wp-content/uploads/2026/02/Direct-Air-Capture-Report-FINAL.pdf
1•xbmcuser•51m ago•1 comments

Running Out of Disk Space on Launch

https://alt-romes.github.io/posts/2026-04-01-running-out-of-disk-space-on-launch.html
1•romes•58m ago•0 comments