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.

Side projects: perché falliscono (e come evitarlo davvero)

https://donatodelpeschio.it/blog/side-projects-perche-falliscono-come-evitarlo
1•donnyBlanko•1m ago•0 comments

Cyber 2028

https://www.analogue.computer/blog/cyber-2028
2•zeyu1337•10m ago•0 comments

It Has Always Been About Data, All the Way Down

https://khayyamguliyev.substack.com/p/it-has-always-been-about-data-all
3•khguliye•11m ago•0 comments

The Closing of the Frontier

https://tanyaverma.sh/2026/04/10/closing-of-the-frontier.html
3•FrasiertheLion•15m ago•0 comments

Show HN: 2048 with a Leaderboard

https://www.the2048league.com/
2•khet•17m ago•0 comments

Deep Work on macOS Starts with Context, Not Blockers

https://www.brnsft.com/blog/how-to-set-up-a-deep-work-system-on-mac-from-scratch
3•robertohanas•21m ago•0 comments

How Transistors Work (1995)

http://amasci.com/amateur/transis.html
2•downbad_•24m ago•1 comments

Bringing Rust to the Pixel Baseband

https://security.googleblog.com/2026/04/bringing-rust-to-pixel-baseband.html
2•dochtman•25m ago•0 comments

The Making of Dark Castle

https://www.gamedeveloper.com/business/the-making-of-i-dark-castle-i-an-excerpt-from-the-secret-h...
2•AntiRush•27m ago•0 comments

Strategy Letter V (2002)

https://www.joelonsoftware.com/2002/06/12/strategy-letter-v/
2•crescit_eundo•31m ago•0 comments

A Fake Screen Fixed My macOS Space Switcher

https://jorviksoftware.cc/notes/2026/04/11/when-the-stars-align-redux
2•jonathan_hollin•32m ago•0 comments

The Brutal Reality of Today's Job Market 2026

https://maxjobintel.online/
2•videobroker•33m ago•0 comments

Ukraine and Weapons of Mass Destruction

https://en.wikipedia.org/wiki/Ukraine_and_weapons_of_mass_destruction
5•chistev•36m ago•1 comments

Jet Fuel Crunch Is Getting Severe with No Reprieve in Sight for Airlines

https://www.wsj.com/business/airlines/jet-fuel-crunch-is-getting-severe-with-no-reprieve-in-sight...
4•bookofjoe•37m ago•1 comments

After Me(One encrypted vault. One QR code. Your family gets everything)

https://www.myafterme.co.uk/
2•elufadeju•39m ago•0 comments

I Pick My Stack for Vibe Coding

https://tildehacker.com/how-i-pick-my-stack-for-vibe-coding
2•tildehacker•40m ago•0 comments

Show HN: Git why – log your agent reasoning trace along your code

https://hexapode.github.io/git-why/
4•pierre•45m ago•0 comments

AGI Is the Wrong Word

https://breaking-changes.blog/agi-is-here-part-2/
2•oakhan3•46m ago•1 comments

Democratic AI to serve the public – OneProject.org

https://oneproject.org/how-to-make-ai-serve-the-public/
5•cucumberbund•49m ago•0 comments

NetWatch v0.11.0 – TUI network diagnostics, now with connection filtering

https://github.com/matthart1983/netwatch
2•matthart1983•50m ago•0 comments

I built a free 30-day habit tracker in Google Sheets

1•polaritymaking•52m ago•0 comments

Ask HN: What is the most annoying part of scheduling meetings?

1•preston-kwei•52m ago•3 comments

Chromium Fingerprint Simulation Framework Assessment

https://www.questcontents.com/2026/04/chromium-fingerprint-simulation.html
1•imarand•52m ago•0 comments

Ask HN: Has anyone reconsidered Antivirus software after recent security news?

3•pants2•59m ago•1 comments

PandemicAlarm – Free disease outbreak tracker aggregating WHO, CDC, and ProMED

https://pandemicalarm.com
1•PixelShipper•59m ago•0 comments

I built a free Canadian tax estimator for self-employed people

https://nextindata.substack.com/p/i-built-a-free-canadian-tax-estimator
1•nazanki•1h ago•0 comments

AI Is Tipping the Scales Toward Hackers After Mythos Release

https://www.nbcnews.com/tech/security/anthropic-claude-mythos-ai-hackers-cybersecurity-vulnerabil...
9•thywis•1h ago•5 comments

Transaction-level provenance for AI art certificate/signed/license on every sale

https://arcvelvetos.web.app/verify?id=AwCCW6DLQgA4s5XVZ86X&type=sale
2•PCasinoAVOS•1h ago•0 comments

AI still can't figure out PowerPoint

https://www.perspectives.plus/p/ai-still-cant-figure-out-powerpoint
2•jukkan•1h ago•0 comments

LPM 1.0 – Video-Based Character Performance Model

https://large-performance-model.github.io/
1•LopRabbit•1h ago•0 comments