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.

Comparing performance of different offline first solutions

https://github.com/bkniffler/offline-sync-bench
1•quambo•1m ago•0 comments

AI Doomlord Jacob Coxon's Media Tour Has Begun

https://gizmodo.com/ai-doomlord-jacob-coxons-media-tour-has-begun-2000809720
1•jjj123•2m ago•0 comments

Transcompilation Express

https://blog.gingerbeardman.com/2026/08/31/transcompilation-express/
1•surprisetalk•4m ago•0 comments

1.1.1.1 now supports post-quantum DNSSEC, all 2,420 bytes of it

https://blog.cloudflare.com/post-quantum-dnssec-1111/
3•HieronymusBosch•4m ago•0 comments

Guiding AI writing to make technical text easier to review

https://a11.to/blog/claudisms
1•helenapankov•6m ago•0 comments

US Army places $11M bet on Austin-based GPS alternative Tern

https://techcrunch.com/2026/09/10/us-army-places-11m-bet-on-austin-based-gps-alternative-tern/
1•gemanor•6m ago•0 comments

What is the correct way to become a DevOps eng?

1•edviik•7m ago•0 comments

Show HN: AI Brand Visibility for Free Forever

https://app.geosurge.ai/login
2•jonsmostovojs•7m ago•1 comments

Janet 1.42.0

https://github.com/janet-lang/janet/releases/tag/v1.42.0
1•birdculture•8m ago•0 comments

Brax 2026 Roadmap: secure mobile phone, smart wall display, pocket AI phone

https://www.youtube.com/watch?v=jXzpwdtwVyk
1•cromka•9m ago•0 comments

Sheriff's investigator charged with misusing Flock camera data

https://www.timesunion.com/news/article/sheriff-albany-county-investigator-charged-22424123.php
2•throw7•9m ago•0 comments

Show HN: MorphMove – a game inspired by fast chess and NYT Games

https://morphmove.com
1•eropatori•9m ago•0 comments

Google's revived nuclear power plant gets $1.9B loan from US Government

https://techcrunch.com/2026/09/08/googles-revived-nuclear-power-plant-gets-1-9b-loan-from-us-gove...
2•pseudolus•11m ago•0 comments

UnifoLM-WLA-1.0

https://unigen-x.github.io/unifolm-wla.github.io/
1•ilreb•11m ago•0 comments

Never let your agent choose its own tool

https://www.promptone.ai/blog/agent-should-never-choose-its-own-tools/
2•chris_marino•11m ago•1 comments

Ask HN: Claude or ChatGPT? Which is better for me as a Tech guy?

1•skwasimin•13m ago•1 comments

The oldest known Snakes and Ladders board is probably a forgery

https://en.quantumgame.love/guide/how-old-is-snakes-and-ladders.html
1•AlexLeela•14m ago•0 comments

Another researcher says OpenAI trained on conversations, then claimed breakthrou

https://bsky.app/profile/did:plc:ckaz32jwl6t2cno6fmuw2nhn/post/3mv4mt4ikss2d
28•ColinWright•17m ago•4 comments

Readonly database access for your agent

https://gayanhewa.github.io/dbq/
1•filepod•19m ago•1 comments

Data Science Weekly – Issue 668

https://datascienceweekly.substack.com/p/data-science-weekly-issue-668
1•sebg•19m ago•0 comments

Biot Number

https://en.wikipedia.org/wiki/Biot_number
1•mooreds•20m ago•0 comments

The Feminist Was a Spy

https://uscpublicdiplomacy.org/blog/feminist-was-spy
8•mooreds•20m ago•1 comments

Agents Build Chess Engines from Scratch in Rust, C++, Rocq, LaTeX, Brainfuck

https://blog.mathieuacher.com/FromScratchChessEnginesPolyglot/
1•brohee•21m ago•1 comments

Show HN: Vantage, a No-Frills Golf GPS App

https://apps.apple.com/us/app/vantage-golf-gps/id6801582385
3•StormHatley•21m ago•0 comments

Will open source AI keep up for long?

https://voxdev.org/topic/technology-innovation/will-open-source-ai-keep-long
1•econlmics•21m ago•0 comments

Bad Code Is Kudzu

https://vickiboykis.com/2026/09/01/bad-code-is-kudzu/
1•surprisetalk•21m ago•0 comments

Palantir Online Shop

https://store.palantir.com/password
1•Bluestein•21m ago•1 comments

iOS 27 RC Adds Long-Rumored Camera App Controls Customization

https://www.macrumors.com/2026/09/10/ios-27-rc-camera-app-customization/
1•tosh•22m ago•0 comments

Show HN: Nightshift – Rust CLI to Orchestrate GitHub Issue Resolution with Dags

https://github.com/Shaurya-Sethi/nightshift
2•shaurya-sethi•22m ago•1 comments

Mesa on Android: How We Brought Turnip, SkiaVK, and Cuttlefish to CI

https://www.collabora.com/news-and-blog/news-and-events/mesa-on-android-how-we-brought-turnip,-sk...
2•losgehts•23m ago•0 comments