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.

Roast any SaaS you want

https://www.roastit.lol/
1•shamil_b•2m ago•1 comments

Rust Atomics and Locks (2023)

https://mara.nl/atomics/
1•nhatcher•3m ago•0 comments

A local dashboard that tells you when your Claude Code session is stuck

https://github.com/MohammedNihal03/AI-observibility
1•mohammednihal39•4m ago•1 comments

Computer Science Achievement and Writing Skills Predict Vibe Coding Proficiency

https://arxiv.org/abs/2603.14133
1•rurban•4m ago•0 comments

Where Edge Cases Reshape the System

https://medium.com/@gurvinder372/article-9-where-edge-cases-reshape-the-system-c5884b3b51b2
1•gps372•6m ago•0 comments

Show HN: Mercur – open-source multi-vendor marketplace platform

https://github.com/mercurjs/mercur
1•GregTomaka•10m ago•0 comments

Inverse Kinematics and Foot Locking

https://theorangeduck.com/page/inverse-kinematics-foot-locking
1•airhangerf15•12m ago•0 comments

What Does a Wikidata-Powered Abstract Wikipedia Article Look Like?

https://jsamwrites.substack.com/p/what-does-a-wikidata-powered-abstract
1•rapnie•13m ago•0 comments

Chess5.ai – Play Chess, Go, Xiangqi, Gomoku, and Othello Against LLMs

https://chess5.ai/en
1•wilsonye•18m ago•1 comments

Show HN: TestLab – open-source UDS testing without ECU hardware

https://github.com/Xaloqi/xaloqi-testlab-core
2•Xaloqi•18m ago•0 comments

Cory Doctorow on the AI lie [video]

https://www.youtube.com/watch?v=nTqCVJFr7XM
2•dgellow•25m ago•0 comments

Moral Competence Before Moral Content: Why LLM Agents Lack the Prerequisites

https://arxiv.org/abs/2609.05036
1•sbulaev•26m ago•0 comments

Show HN: H200 GPUs under $1.99/hour, H100s at $1.19/hour

https://compute.cheap/#new-launch
2•EmiCorleone•27m ago•0 comments

Programming is Art

https://orchidfiles.com/programming-is-art/
2•theorchid•29m ago•0 comments

Zero Is the Worst Return Value

https://www.claudecertifiedarchitects.com/blog/zero-is-the-worst-return-value/
1•jockorules•30m ago•0 comments

H200 GPUs $1.99/hour, H100s at $1.19/hour

https://compute.cheap/#new
2•gpuguy•30m ago•0 comments

The new frontier of Japan's rearmament is cyberspace

https://english.elpais.com/international/2026-08-21/the-new-frontier-of-japans-rearmament-is-cybe...
1•rdmuser•33m ago•0 comments

It's time for Mark Zuckerberg to resign from Meta

https://www.theguardian.com/technology/commentisfree/2026/sep/04/mark-zuckerberg-resign-meta
9•domhudson•34m ago•4 comments

Show HN: Nitter Redirector – Find a Working Instance Automatically

https://xcancel.com/antibot/captcha
2•DavCreator•38m ago•0 comments

I was on Ubuntu's first design team in 2009 London

https://twitter.com/dvdsgl/status/2096775107989672007
4•tosh•38m ago•1 comments

Australians will be able to switch off social media algorithms

https://www.bbc.co.uk/news/articles/cn9wyvxn95vo
2•rwmj•38m ago•0 comments

When 'if' slows you down, avoid it

https://easylang.online/blog/branchless
2•signa11•42m ago•0 comments

Agent memory that forgets and distorts on purpose

https://github.com/jbsalles/Selmem
1•Jibs79•43m ago•0 comments

IKEA Hacks and DIY Ideas – IKEA Hackers

https://ikeahackers.net
1•thunderbong•43m ago•0 comments

Forge: Go Library and CLI for Working with GitHub, GitLab, Forgejo

https://github.com/git-pkgs/forge
1•joooscha•46m ago•0 comments

Understanding Inference and the Economics of Enterprise AI

https://www.vistaequitypartners.com/insights/inference-economics-enterprise-ai/
1•nlpnerd•46m ago•1 comments

Show HN: Crew — Let Claude/Codex/OpenCode agents talk to each other

https://github.com/0xmmo/crew/
2•mmoustafa•49m ago•1 comments

Show HN: Mailward – Open Outlook PST/OST files in the browser, nothing uploaded

https://pst.aivismonitor.com
1•xsxs89757•49m ago•0 comments

A World Away from Family

https://www.ajarn.com/blogs/bangkok-phil/world-away-family
1•rzk•51m ago•0 comments

Should You Buy a ThinkPad?

https://www.rubenerd.au/should-you-buy-a-thinkpad/
5•Tomte•53m ago•3 comments