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.

The Probability Index: Passive exposure to the market portfolio of probabilities

https://predmarketindex.com/
1•JV00•3m ago•0 comments

The Optimal Amount of Slop Is Non-Zero

https://www.slater.dev/2026/06/the-optimal-amount-of-slop-is-non-zero/
2•sltr•3m ago•0 comments

AMD releases FSR 4.1 upscaling for older graphics cards

https://www.theverge.com/news/953664/amd-fsr-4-1-upscaling-rx-7000-series-gpus-rdna-3
1•saghm•4m ago•0 comments

Absolute State of Unreal 2026

https://www.joewintergreen.com/absolute-state-of-unreal-2026/
2•gafferongames•6m ago•0 comments

Show HN: Vivijure – Self-hosted AI film studio on your own GPU (AGPL)

https://github.com/skyphusion-labs/vivijure
1•skyphusion•7m ago•0 comments

Mexico Just Showed Off a New Cheap, Government-Backed EV

https://gizmodo.com/mexico-just-showed-off-a-new-extremely-cheap-government-backed-ev-2000769080
2•speckx•9m ago•0 comments

Stop Slopping Your Skills

https://rahulbaboota.substack.com/p/stop-slopping-your-skills
1•RahulBaboota•9m ago•0 comments

Former hacker saw the light–and now wants to collect all of it

https://arstechnica.com/features/2026/06/this-former-hacker-saw-the-light-and-now-wants-to-collec...
2•Brajeshwar•10m ago•0 comments

Godot confirms it tolerates 'some AI assistance' but rejects 'vibe coded' tag

https://www.gamedeveloper.com/business/godot-confirms-it-tolerates-some-ai-assistance-but-rejects...
2•HelloUsername•12m ago•0 comments

DisplayMate

https://www.displaymate.com/
2•skibz•12m ago•0 comments

Lagom – Just Enough

https://en.wikipedia.org/wiki/Lagom
1•hypertexthero•13m ago•0 comments

Polder model – cooperation despite differences

https://en.wikipedia.org/wiki/Polder_model
1•hypertexthero•14m ago•0 comments

Designing Firefox for the Future

https://blog.mozilla.org/en/firefox/new-firefox-design/
1•akyuu•14m ago•0 comments

Optimizing ClickHouse with Schemas and Codecs

https://clickhouse.com/blog/optimize-clickhouse-codecs-compression-schema
1•tosh•15m ago•0 comments

Show HN: Smolsonic – A Subsonic-compatible music server written in Rust

https://github.com/tsirysndr/smolsonic
2•tsiry•17m ago•0 comments

Show HN: DD Photos App – desktop front end to ddphotos photo album site gen

https://github.com/dougdonohoe/ddphotos-app
1•dougdonohoe•20m ago•2 comments

Cloudflare – Majorly Impacted

https://new.cloudflarestatus.com/incidents/v3yl7jqmqj51
3•rxmux•20m ago•2 comments

Show HN: No-OAuth Stripe Fee Auditor from Balance CSVs

https://feeauditor.com
1•Ksantor•20m ago•0 comments

Tracking one object through hyperspectral video

https://medium.com/@alanscottencinas/i-entered-a-competition-to-track-objects-in-light-you-cant-s...
2•encinas88•21m ago•0 comments

Tech Influence Watch – tracking crypto and AI industry 2026 U.S. election spend

https://influence.citationneeded.news/
2•ChrisArchitect•22m ago•1 comments

Are You Burning Tokens?

https://savetokens.netlify.app/
1•prengaraj•22m ago•0 comments

Constraining U.S. wind and solar deployment could cost an unnecessary $121B

https://pv-magazine-usa.com/2026/06/20/constraining-u-s-wind-and-solar-deployment-could-trigger-1...
3•epistasis•23m ago•0 comments

A public Sentry key is all it takes to hijack Claude Code, Cursor, and Codex

https://thenewstack.io/agentjacking-sentry-mcp-attack/
1•Brajeshwar•23m ago•1 comments

The most trusted code on Earth is being rewritten in Rust [video]

https://www.youtube.com/watch?v=Sntj4HmuykI
1•tcfhgj•24m ago•0 comments

Show HN: S3FileViewer – A lightweight browser interface to preview S3 files

https://github.com/cgopalan/s3fileviewer
1•cgopalan•24m ago•0 comments

Agent minimalism: what shipping OpenClaw in production taught us

https://autoclaw.sh/blog/agent-minimalism/
2•anuveyatsu•24m ago•0 comments

Super AI Agentic Android App (BYOK)

1•Jeff9James•26m ago•0 comments

Show HN: Building an Autonomous Drone with Codex – Hardware Phase

https://jakedecamp.com/engineering/autonomous-drone-phase-3-real-hardware/
1•silksowed•28m ago•0 comments

Xiaomi YU7 GT Completes the First Officially Timed Autonomous Lap at Nürburgring

https://nuerburgring.de/news/10-29-483-der-xiaomi-yu7-gt-absolviert-die-erste-offiziell-gemessene...
2•gainsurier•28m ago•0 comments

A.I. Doomaxxing Is Bad for Our Economy

https://www.nytimes.com/2026/06/22/opinion/ai-doom-jobs-economy.html
2•tysone•28m ago•1 comments