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.

Show HN: Tokemon – monitor token use with out refreshing 27 browser tabs

https://github.com/rvantonder/tokemon
1•rvttt•2m ago•0 comments

Overcoming Informational Risk

https://bencornia.com/blog/overcoming-informational-risk
1•bencornia•2m ago•0 comments

Best AI coding interview assistant in 2026

https://www.linkjob.ai/interview-questions/ai-coding-interview-assistant/
1•Silviaaa•6m ago•0 comments

Kindle users in uproar re: latest update, old devices now unusable: 'Fuck You '

https://nypost.com/2026/04/09/tech/kindle-to-cease-support-for-old-devices-causing-user-uproar/
1•1vuio0pswjnm7•6m ago•0 comments

Going Beyond World Models and VLAs

https://generalistai.com/blog/apr-07-2026-beyond-world-models
1•NeoInHacker•7m ago•0 comments

Show HN: Chipmunkify – I used ML to solve audio's dumbest problem

https://www.chipmunkify.com/
1•treelover•9m ago•1 comments

Artemis II: Christina Koch's PCD Failure

1•robgibbons•10m ago•1 comments

Show HN: React Modern Audio Player

https://github.com/slash9494/react-modern-audio-player
1•musgravite•19m ago•0 comments

Haunt, the 70s text adventure game, is now playable on a website

https://haunt.madebywindmill.com
7•jscalo•20m ago•0 comments

A Simple Lofi Player

https://github.com/talwat/lowfi
1•lwhsiao•20m ago•0 comments

Why Do Computers Stop and What Can Be Done About It? (1985) [pdf]

https://pages.cs.wisc.edu/~remzi/Classes/739/Fall2018/Papers/gray85-easy.pdf
1•jruohonen•23m ago•0 comments

Tell HN: Claude-code prompt-cache workaround/fix

1•g4cg54g54•24m ago•0 comments

SFPD investigates apparent shooting near OpenAI CEO Sam Altman's home

https://www.sfchronicle.com/bayarea/article/sam-altman-openai-gunfire-22202648.php
2•throwaway2027•29m ago•2 comments

Uses for Nested Promises

https://blog.jcoglan.com/2026/03/23/uses-for-nested-promises/
1•bkudria•33m ago•0 comments

HN: Distill-CBL, a single-file COBOL-to-WASM compiler in Rust

https://github.com/StealthEyeLLC/distill-cbl
1•stealtheyellc•39m ago•0 comments

AI Image Editor

https://jpgtomp4.com
1•yalvhe2009•41m ago•1 comments

BirdNET-Go – 24/7 realtime bird song analysis

https://github.com/tphakala/birdnet-go
1•darknavi•42m ago•1 comments

Show HN: Turn any YouTube video into something you can use

https://www.pandarecord.com/extension
1•misonic•44m ago•0 comments

Drawing Database – Blueprints for 3D modeling

https://drawingdatabase.com/
1•hyperific•46m ago•0 comments

Ecolibrium Directory

https://github.com/simonlpaige/ecolibrium
1•larrytheworm•49m ago•1 comments

PocketLLM – Run local LLMs from a USB stick (https://pocketllm-site.vercel.app/)

https://github.com/vraj00222/pocketllm
1•vrajpatel00•50m ago•0 comments

Apple's accidental moat: How the "AI Loser" may end up winning

https://adlrocha.substack.com/p/adlrocha-how-the-ai-loser-may-end
26•walterbell•58m ago•9 comments

2014: Black Holes and Supercomputing

https://www.goldengooseaward.org/01awardees/black-holes
1•mooreds•1h ago•0 comments

Tell HN: Reddit now demands to know why you won't use their app

8•josephcsible•1h ago•7 comments

The disappearing and unappreciated art of audible alerts [video]

https://www.youtube.com/watch?v=nXdVG45wveo
2•fortran77•1h ago•0 comments

Show HN: A better alternative to CLI and MCP for local tools

https://github.com/stefanwebb/named-pipes
1•stefanwebb•1h ago•0 comments

Molecular adaptations and engineering of extremophiles for synthetic biology

https://www.frontiersin.org/journals/microbiology/articles/10.3389/fmicb.2026.1754802/full
1•PaulHoule•1h ago•0 comments

Ukraine renews attacks on Russian energy sites – what has been hit?

https://www.reuters.com/business/energy/ukraine-renews-attacks-russian-energy-sites-what-has-been...
4•YZF•1h ago•1 comments

Is the Nutrition of an Egg the Same as in the Chick?

https://drjohnson.com/is-the-nutrition-of-an-egg-the-same-as-in-the-chick/
1•debo_•1h ago•0 comments

ReceiptBot – Stop Node.js AI agents from reading .env and burning your budget

https://github.com/redshadow912/ReceiptBot
1•LocalhostLegend•1h ago•1 comments