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•1y ago

Comments

zoezoezoezoe•1y 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•1y 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.

Prompt to Chip

https://www.prompttochip.com/
1•jpatel3•30s ago•0 comments

End-to-end encrypted RCS messaging begins rolling out today

https://www.apple.com/newsroom/2026/05/end-to-end-encrypted-rcs-messaging-begins-rolling-out-toda...
1•blintz•33s ago•0 comments

Hackers abuse Google ads, Claude.ai chats to push Mac malware

https://www.bleepingcomputer.com/news/security/hackers-abuse-google-ads-claudeai-chats-to-push-ma...
1•Brajeshwar•33s ago•0 comments

Birth rates keep falling. We need to plan for an older America with fewer kids

https://www.vox.com/health/487637/falling-birth-rates-aging-america-demographic-reality
1•ryan_j_naughton•33s ago•0 comments

Show HN: Mimik – open-source local-first alternative to Scribe and Tango

https://github.com/westpoint-io/mimik
1•max-roma•2m ago•0 comments

Show HN: Inspection Credit – read your inspection, draft the negotiation

https://www.inspectioncredit.com
1•scarsam•2m ago•0 comments

End-to-end encrypted RCS messaging begins rolling out today for Android and iOS

https://blog.google/products-and-platforms/platforms/android/android-ios-end-to-end-encrypted-rcs...
1•xd1936•3m ago•0 comments

Elements of Programming

https://elementsofprogramming.com/
1•tosh•3m ago•0 comments

Dynamic Persistent Tile Scheduling w/ Cluster Launch Control (CLC) on Blackwell

https://research.colfax-intl.com/dynamic-persistent-tile-scheduling-with-cluster-launch-control-c...
1•matt_d•4m ago•0 comments

MartinLoop – budget caps and audit trails for AI coding agents

https://github.com/Keesan12/Martin-Loop
1•martinloop•6m ago•1 comments

Interactive Cellular Automata

https://www.simloops.com/r/cellular
1•nerdlogic•6m ago•0 comments

Officially canceling our Anthropic plan, it's [too expensive]

https://twitter.com/morganlinton/status/2053165575824887938
3•jamesliudotcc•8m ago•0 comments

Interactive Cellular Automata

1•nerdlogic•8m ago•0 comments

Art Bacon: Find the degrees of separation between two artists

https://networks.vaguespac.es/bacon.html?ulan1=500019484&ulan2=500006031
1•thebigship•9m ago•0 comments

Self-hosted Tailscale, Part 2: Ad-blocking DNS

https://blog.fidelramos.net/software/tailscale-2-ad-blocking-dns
1•fidelramos•11m ago•0 comments

Bubble Curtain

https://en.wikipedia.org/wiki/Bubble_curtain
1•simojo•11m ago•0 comments

Show HN: MessyData – turn messy data into clean tables/CSV

https://www.messydata.app
2•innovationlab•13m ago•0 comments

Update hints at four separate Steam Machine models and a reservation system

https://www.pcgamer.com/hardware/gaming-pcs/new-steam-update-hints-at-four-separate-steam-machine...
1•evo_9•13m ago•0 comments

Calculating Curvature

https://www.johndcook.com/blog/2026/05/08/calculating-curvature/
1•ibobev•14m ago•0 comments

Reverse Engineering Mersenne Twister with Linear Algebra

https://www.johndcook.com/blog/2026/05/10/reverse-mersenne-twister/
1•ibobev•15m ago•0 comments

Strategic Planning at the PSF

https://pyfound.blogspot.com/2026/05/strategic-planning-at-psf.html
1•lumpa•15m ago•0 comments

Shrinking the OxCaml JS_of_OCaml bundle: 285 MB to 4 MB

https://kcsrk.info/ocaml/oxcaml/modes/2026/05/10/shrinking-the-oxcaml-bundle/
1•ibobev•15m ago•0 comments

The Anti-Singularity

https://www.lesswrong.com/posts/k3XHZ4DjykLSfsnks/the-anti-singularity
2•gmays•15m ago•0 comments

Consensus on a MOQ Media Layer Player Framework Should Speed Market Adoption

https://www.red5.net/blog/consensus-on-a-moq-media-layer-player-framework/
1•mondainx•16m ago•0 comments

Why Deadlines Explode Stress

https://thegoodbusy.substack.com/p/why-deadlines-explode-stress
1•mooreds•16m ago•0 comments

Chrome's Silent Gemini Nano Download Has a Consent Problem

https://www.kylereddoch.me/blog/chromes-silent-gemini-nano-download-has-a-consent-problem/
2•speckx•17m ago•0 comments

First Impressions: NetBird

https://janlukas.blog/thoughts/2026/05/netbird
1•jlelse•18m ago•0 comments

GhostLock – Lockout Without Encryption

https://ghostlock.io/
1•happyopossum•18m ago•0 comments

The Cost of Overfitting the Harness

https://www.dbreunig.com/2026/05/10/overfitting-the-harness.html
1•Brajeshwar•21m ago•0 comments

Building AI skills like checklists

https://blog.lawrencejones.dev/building-ai-skills-like-checklists/
1•lawrjone•21m ago•0 comments