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

Comments

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

Privacy by Architecture, Not by Promise

https://death2data.com/
1•deathtodata•30s ago•0 comments

I use Claude Code, Codex and Gemini 3 Pro all together

https://singularitynow.substack.com/p/i-use-claude-code-codex-and-gemini
1•danduma•35s ago•1 comments

Show HN: Watch AI models debate tier rankings in a simulated podcast

https://github.com/kaonashi-tyc/AI-Tier-Ranking-SIM
1•karmasimida•2m ago•0 comments

Africa's installed PV capacity estimated above 63 GW

https://www.pv-magazine.com/2026/01/22/africas-installed-pv-capacity-estimated-above-63-gw/
1•ironyman•2m ago•0 comments

Trump sues JPMorgan for $5B over account closure after Capitol riot

https://www.bbc.com/news/articles/c2e11m2w2meo
1•srameshc•4m ago•0 comments

White House defends sharing AI image showing arrested woman crying

https://www.bbc.co.uk/news/live/ce9yydgmzdvt
3•petepete•4m ago•0 comments

FineTune: Volume for each app, route apps to different outputs, apply EQ [macOS]

https://github.com/ronitsingh10/FineTune
1•petecooper•5m ago•0 comments

Nvidia's IPO on January 22, 1999

https://dfarq.homeip.net/nvidias-ipo-on-january-22-1999/
1•giuliomagnifico•5m ago•0 comments

Can Old Lime Bikes and Hard Disks Counter China's Rare-Earth Chokehold?

https://www.wsj.com/business/can-old-lime-bikes-and-hard-disks-counter-chinas-rare-earth-chokehol...
1•carride•7m ago•1 comments

Expanding access to health care through AI

https://www.gatesnotes.com/expanding-access-to-health-care-through-ai
1•notagoodidea•7m ago•0 comments

Categorical Crossentropy Is a Lie

https://www.pisoni.ai/posts/teacher-free-self-distillation/
1•4rtemi5•11m ago•0 comments

The quest for wide outlines: optimized GPU silhouettes

https://medium.com/@bgolus/the-quest-for-very-wide-outlines-ba82ed442cd9
1•fanf2•12m ago•0 comments

Methamphetamine deaths have risen across every US region

https://medicalxpress.com/news/2026-01-methamphetamine-deaths-risen-region.html
2•PaulHoule•14m ago•1 comments

Firefox and Linux in 2025

https://mastransky.wordpress.com/2026/01/23/firefox-linux-in-2025/
3•TangerineDream•16m ago•0 comments

What Has Docker Become?

https://tuananh.net/2026/01/20/what-has-docker-become/
3•tuananh•18m ago•0 comments

Write the Instruction Manual for Your Body

https://leroy.works/articles/write-the-instruction-manual-for-your-body/
1•leroy-is-here•20m ago•0 comments

The Dream, the Crazy, and the Reality

https://www.kmx.io/blog/dream-crazy-reality
1•thodg•22m ago•0 comments

Chinese AI models are popular. But can they make money?

https://www.economist.com/business/2026/01/22/chinese-ai-models-are-popular-but-can-they-make-money
1•1vuio0pswjnm7•23m ago•1 comments

Show HN: Terminal MCP – Browser MCP for the Terminal

https://github.com/elleryfamilia/terminal-mcp
2•e-clinton•23m ago•1 comments

Microsoft Gave FBI Keys to Unlock Encrypted Data, Exposing Major Privacy Flaw

https://www.forbes.com/sites/thomasbrewster/2026/01/22/microsoft-gave-fbi-keys-to-unlock-bitlocke...
4•_____k•24m ago•0 comments

Runtime consent behavior is often decided before the banner loads

https://www.attributionguard.com/report
1•CrossBurns•24m ago•0 comments

Ask HN: Is Blazor a bad choice in 2026 for a new .NET product UI?

https://alexaka1.dev/blog/blazor-sucks
1•SamLeBarbare•25m ago•1 comments

SHA-256 Self Reference

https://susam.net/0573e7473.html
1•smartera•25m ago•0 comments

Kitty Cards (make your own Apple Wallet cards)

https://xenodium.com/introducing-kitty-cards
2•xenodium•33m ago•0 comments

Show HN: A social network populated only by AI models

https://aifeed.social
2•capela•33m ago•6 comments

Op-ed: They're Coming for Our Data Centers

https://www.wsj.com/opinion/theyre-coming-for-our-data-centers-9692227a
1•1vuio0pswjnm7•34m ago•0 comments

Show HN: Shopify metaobject and metafields duplicator app

https://apps.shopify.com/duplicate-metaobjects
1•viikka•34m ago•0 comments

New code connects microscopic insights to the macroscopic world

https://phys.org/news/2026-01-code-microscopic-insights-macroscopic-world.html
1•rbanffy•37m ago•0 comments

Presence in Death

https://rubinmuseum.org/presence-in-death/
2•tock•37m ago•0 comments

Show HN: Express-like, event-driven minimalist TS framework

https://github.com/ddaras/melony
1•ddaras•38m ago•0 comments