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.

SKPDowngrade – open newer SketchUp (.skp) files on Make 2017 and Mac

https://skpdowngrade.com/
1•wangxili199•3m ago•0 comments

Show HN: Maurice – open-source AI assistant that works from your own notes

https://www.chezmaurice.eu/
1•ckemmler•7m ago•0 comments

Are US governments post-quantum yet?

https://pqready.cloud/us-gov/
1•Boxlike3852•8m ago•0 comments

Show HN: I built my wife a way to deploy Claude Code sites her clients can edit

https://heyweb.ai/
1•vanillegipfel•9m ago•0 comments

Show HN: TinyDVD shrinks DVDs by 75% while preserving menus and special features

https://github.com/boutell/tinydvd
1•boutell•9m ago•0 comments

Lpm – run many Claude Code/Codex sessions across local and SSH machines

https://lpm.cx
1•dank0r•11m ago•0 comments

Moon Bounce Elint: The monitoring of Soviet radars by way of the moon [pdf]

https://www.cia.gov/resources/csi/static/Moon-Bounce-Elint.pdf
2•Bluestein•12m ago•0 comments

LLM UI Smells and How to Avoid Them

https://gist.github.com/birep/bb865b2799d3f86d55fde62d7911afbb
2•supermatt•12m ago•0 comments

"What Should I Do?" Guidelines for Responsibly Integrating AI in SWE Engineering

https://arxiv.org/abs/2611.28996
1•imakwana•13m ago•0 comments

Kill Elon's bot BEFORE he kills you

https://findgmanmusk.ovh/
1•boredemployee•15m ago•0 comments

Show HN: Offline Python desktop tools for PII scrubbing and DNS MX

1•kesslerservices•19m ago•0 comments

Show HN: Llmrun – Which LLMs can your hardware run?

https://llmrun.dev
1•alexfank•20m ago•0 comments

Hammerspoon2: macOS Desktop Automation for Programmers

https://github.com/Hammerspoon/Hammerspoon2
1•majjoha•22m ago•0 comments

An open collection of 28000 machine-checked math and CS formalizations in Lean 4

https://github.com/google-deepmind/formal-papers
1•theanonymousone•22m ago•0 comments

Rethinking product identification: a 16-digit alternative to GTIN

https://bittencourt.net/en/rethinking-product-identification/
1•thimabi•23m ago•0 comments

Show HN: Offline Python desktop tools for PII scrubbing and DNS MX

https://github.com/kessler577/offline-pii-dns-desktop-suite
1•kesslerservices•26m ago•0 comments

The AI Initiative for Fundamental Science

https://aifscience.org/
2•artninja1988•26m ago•0 comments

UK business secretary rejects calls for new law to regulate AI

https://www.theguardian.com/technology/2026/dec/06/business-secretary-jonathan-reynolds-rejects-c...
3•chrisjj•29m ago•0 comments

Ask HN: Event Sourcing Product Tips

1•heilstorm•29m ago•0 comments

Pentagon Orders Software Factories Cut Off from Internet

https://unbiasedheadlines.com/article/department-of-war-orders-software-factories-isolated-from-i...
3•willswire•30m ago•0 comments

Omnigent: Combine multiple models, harnesses, and techniques

https://omnigent.ai
1•Bluestein•31m ago•0 comments

Indian divorce ruling raises fears of bigamy prosecutions among diaspora

https://www.theguardian.com/lifeandstyle/2026/dec/06/indian-courts-foreign-divorce-decree-bigamy-...
1•n1b0m•31m ago•0 comments

Exo is an open source runtime for agents

https://github.com/exoharness/exo
1•Bluestein•33m ago•0 comments

Joel Spolsky's Law of Leaky Abstractions, Revisited

https://www.joelonsoftware.com/2002/11/11/the-law-of-leaky-abstractions/
1•t520z520•33m ago•2 comments

Junkyard Jumbotron

https://jyjt.video/
3•solyin•34m ago•1 comments

Show HN: HimitsuShell – Hide shell scripts from kernel monitoring

https://github.com/HimitsuShell/HimitsuShell
1•mushstory•35m ago•0 comments

Researchers try and pin down how fickle AI is with its changing answers

https://www.theregister.com/ai-and-ml/2026/12/04/researchers-try-and-pin-down-exactly-how-fickle-...
1•Bender•36m ago•0 comments

TikTok turns teenage insecurity into an algorithmic rabbit hole

https://www.wired.com/story/researchers-posed-as-insecure-teen-boys-on-tiktok-they-were-flooded-w...
2•PaulHoule•36m ago•0 comments

Microsoft updates Teams with unexpected meeting avoidance feature

https://www.theregister.com/saas/2026/12/04/microsoft-updates-teams-with-unexpected-meeting-avoid...
2•Bender•36m ago•1 comments

Steam's canceled Next Fest leaves indie developers scrambling to survive

https://arstechnica.com/gaming/2026/12/steams-canceled-next-fest-leaves-indie-developers-scrambli...
2•Bender•37m ago•1 comments