frontpage.
newsnewestaskshowjobs

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.

Anthropic creates AI powered wetlab

https://www.reuters.com/world/anthropic-quietly-sets-up-biology-lab-it-ramps-ai-drug-program-2026...
1•theahura•3m ago•0 comments

Yahoo Finance and Polymarket End Prediction Market Partnership

https://finance.yahoo.com/media-advertising/articles/yahoo-finance-polymarket-end-prediction-1423...
1•thm•3m ago•0 comments

Infillion acquires location data company Foursquare

https://www.axios.com/2026/09/18/infillion-acquires-foursquare-location-data
2•thm•4m ago•0 comments

The quest for open PDKs (silicon foundry Process Development Kits) [video]

https://www.youtube.com/watch?v=-7indiyU9nU
2•sxzygz•5m ago•0 comments

PyTorch Implementation of MobileNet V4

https://github.com/d-li14/mobilenetv4.pytorch
2•teleforce•5m ago•0 comments

It took China 4 years to build a new canal [video]

https://www.youtube.com/watch?v=ydaxEAPrQ28
3•keytalker•9m ago•0 comments

BYD Slashes Price of Electric Car and Becomes Cheapest in Australia [video]

https://www.youtube.com/watch?v=IQrnGK5FZXI
2•thelastgallon•14m ago•0 comments

Testing 8 VLMs on a single 3090 GPU

https://www.reddit.com/r/LocalLLaMA/s/uSxsTw5Wno
3•thinkevolve•15m ago•0 comments

Google AI Studio fakes data deletion. VRP auto-banned me in 60s for reporting it

https://medium.com/@istokovicsgyorgy79/google-ai-studio-fakes-data-deletion-vrp-auto-banned-me-in...
3•Bitu79•22m ago•0 comments

Polymarket's Rush to Grow Left a Door Wide Open for Fraudsters

https://www.wsj.com/business/polymarkets-fraud-regulators-coplan-5f418ab0
6•fortran77•23m ago•1 comments

Step 5 Preview: Advancing the Pareto Frontier

https://www.stepfun.com/step-5-preview
3•nateb2022•25m ago•0 comments

Quantum Color Conjecture

https://www.avahbanerjee.com/blog/planar-quantum-coloring
3•banerjeeav•25m ago•0 comments

What are you building with jev?

2•arpanghoshal•33m ago•1 comments

Egocentric training's gig workers are helping robots learn how to do your dishes

https://www.abc.net.au/news/2026-09-20/egocentric-training-gig-workers-helping-robots-learn-tasks...
3•ahonhn•34m ago•0 comments

JEV: Ranking 6K+ peer-company candidates in ~40 seconds

https://twitter.com/Alex_aic5/status/2101523309158343137
2•aic5•42m ago•0 comments

Random Reality (2000)

https://sprott.physics.wisc.edu/pickover/pc/random_reality.html
2•rramadass•43m ago•1 comments

Adapting Fossil-scm as a platform for AI agentic workflow

https://github.com/BenSiv/fossil-scm
2•thunderbong•43m ago•0 comments

Show HN: Architectural Guardrails for AI native development

https://github.com/cxgrd/cli
2•geekgod382•43m ago•0 comments

PanoDrop: Save and rediscover immersive 360° views of anywhere in the world

https://www.panodrop.app/
2•dueffects•43m ago•0 comments

Protocol-Aware Deterministic Simulation Testing

https://tigerbeetle.com/blog/2026-08-20-protocol-aware-dst/
2•pykello•51m ago•0 comments

Integrating Volt Active Data with AI Agents and Chatbots

https://docs.voltdb.com/UsingVoltDB/ChapAI.php
2•Bluestein•53m ago•0 comments

Inference-Engine Fingerprinting Attacks Are Practical

https://arxiv.org/abs/2609.20614
5•sbulaev•54m ago•0 comments

OpenAI researcher on AI communicating across air-gaps via thermal side-channels [video]

https://www.youtube.com/watch?v=6AgOfiZOWiY
5•nujan_dev•55m ago•1 comments

Show HN: The Smallest LLM

https://gist.github.com/skorotkiewicz/dedc3b5a857be7d0f2b378334721713c
3•modinfo•56m ago•1 comments

Myth of Brand Power

https://hoskingpartners.com/perspectives/death-of-the-brand-or-dearth-of-thought/
2•rahuldracula•1h ago•0 comments

Turning 15-hour layovers into 5-day stopovers, usually for less mone

https://uwillfly.net/pl
4•privacyzvarych•1h ago•0 comments

Another terminal/shell AI assistant (shell native)

https://github.com/TheR1D/aty
2•ther2d•1h ago•1 comments

Show HN: All-in-one open-source Tab organizer

https://github.com/ringlochid/leotabs
2•ringlochid•1h ago•0 comments

The senior engineer death spiral

https://sunilpai.dev/posts/the-senior-engineer-death-spiral/
3•hisamafahri•1h ago•0 comments

Grit your teeth and ship it

https://www.seangoedecke.com/grit-your-teeth-and-ship-it/
3•calvinfo•1h ago•0 comments