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

Comments

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

Our Overfitted Century

https://www.theintrinsicperspective.com/p/our-overfitted-century
1•paulpauper•3m ago•0 comments

The AI bust scenario that no one is talking about

https://www.noahpinion.blog/p/the-ai-bust-scenario-that-no-one
1•paulpauper•4m ago•0 comments

Selling H200s to China Is Unwise and Unpopular

https://thezvi.substack.com/p/selling-h200s-to-china-is-unwise
2•paulpauper•4m ago•0 comments

OpenEvolve: Teaching LLMs to Discover Algorithms Through Evolution

https://algorithmicsuperintelligence.ai/blog/openevolve-overview/index.html
2•codelion•7m ago•0 comments

Show HN: I Simulated an Inline Internal Combustion Engine in C

https://github.com/glouw/ensim4
1•glouwbug•7m ago•0 comments

Business cycle and herding behavior in stock returns: theory and evidence

https://link.springer.com/article/10.1186/s40854-023-00540-z
1•tesserato•11m ago•0 comments

Ask HN: Better places to work for burntout SWE?

4•conqrr•11m ago•2 comments

What I Learned Using Neon Postgres for a Week of Live Traffic

https://ishan.page/blog/dbms-neon/
1•ishandotpage•12m ago•0 comments

LabGuy's World: – 5FPn CRT Testing

https://labguysworld.com/5FPn_CRT_Tester.htm
1•WorldPeas•13m ago•0 comments

Tono, actually

https://olympiatime.com/2025/12/06/tono-actually/
1•Lammy•14m ago•0 comments

Linux CVEs, more than you ever wanted to know

http://www.kroah.com/log/blog/2025/12/08/linux-cves-more-than-you-ever-wanted-to-know/
3•voxadam•14m ago•0 comments

Pigeons rival humans ability to spot cancer (2015)

https://www.sfgate.com/news/article/Pigeons-rival-humans-in-ability-to-spot-cancer-6643929.php
2•hyperific•14m ago•1 comments

How well do you know C++ auto type deduction?

https://www.volatileint.dev/posts/auto-type-deduction-gauntlet/
1•volatileint•17m ago•0 comments

Event Sensors Bring Just the Right Data to Device Makers

https://spectrum.ieee.org/event-sensors-to-the-edge
1•sohkamyung•18m ago•0 comments

Show HN: An Incident Intelligence Layer that learns from real oncall work

1•mpingu•19m ago•0 comments

Show HN: Parent-child activity to help kids spot clickbaits and doom-content

https://submerge.rs/vesti/?lang=en
1•petarsubotic•20m ago•0 comments

Ask HN: How can someone handle inbound emails with threading in simple way?

2•hamzaawan•20m ago•0 comments

Send a Free Santa Video

https://www.synthesia.io/santa
1•selimonder•22m ago•0 comments

Coding Agents Are Outliers

https://vivekhaldar.com/articles/coding-agents-are-outliers/
1•gandalfgeek•25m ago•0 comments

McDonald's Pulls Down AI-Generated Holiday Ad After Deluge of Mockery

https://futurism.com/artificial-intelligence/mcdonalds-ai-generated-commercial
1•kevin061•25m ago•0 comments

I Don't Want to Be a Ping-Pong Ball Anymore

https://www.tristanisham.com/blog/i-dont-want-to-be-a-ping-pong-ball-anymore/
2•Atalocke•26m ago•0 comments

InovaTrust – Help a Brother Out

https://www.inovatrust.net/i/2cb3njjta6mdc1zizu8jq
1•investmentpro•26m ago•0 comments

We Built FridayAI: Founders Need Their Time Back

https://www.forcivate.com/blog/why-we-built-fridayai
1•nairabatoyan•27m ago•1 comments

Show HN: My small tool blew up unexpectedly

https://kaicbento.substack.com/p/what-happens-when-your-open-source
1•kaicbento•27m ago•0 comments

Tremulous an open source quake3 based RTS/FPS game ported to the web

https://www.tremulous.online
1•justinl1996•27m ago•0 comments

How to Guess a Gradient

https://arxiv.org/abs/2312.04709
1•tbruckner•30m ago•0 comments

Built a LangChain App for a Startup, Here's What Mattered

https://old.reddit.com/r/LangChain/comments/1pgyc1t/built_a_langchain_app_for_a_startup_heres_what/
1•ethanpil•31m ago•0 comments

Show HN: Monetizing an API using private keys

https://img.arible.co
1•sim04ful•33m ago•0 comments

A welcome pit stop: the US college using parking lots to help unhoused students

https://www.theguardian.com/education/2025/dec/09/us-university-student-homelessness-solutions
4•mitchbob•38m ago•1 comments

Show HN: DocNode, A TypeScript OT library for local-first apps

https://github.com/docnode/docnode
2•GermanJablo•38m ago•0 comments