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.

Modern LLMs have tiny GPTs hidden inside them

https://invertedpassion.substack.com/p/modern-llms-have-tiny-gpts-hidden
1•gmays•5m ago•0 comments

My parents chose to die together and I was left to grieve alone

https://www.bbc.com/news/articles/c81dwllzv113o
1•onemoresoop•6m ago•0 comments

Here Be Monsters

https://www.nybooks.com/online/2026/10/30/here-be-monsters/
1•petethomas•6m ago•0 comments

VindexLLM – Windows Vulkan GPU GGUF LLM inference engine written in Delphi 12

https://github.com/tinyBigGAMES/VindexLLM
1•peter_d_sherman•6m ago•0 comments

PullDash – Review pull requests in a high-performance UI, driven by keybinds

https://pulldash.com/
1•anewhnaccount2•6m ago•0 comments

Self-promotion and the Altmetric score (2021)

https://yoursay.plos.org/2021/09/self-promotion-and-the-altmetric-score/
1•enjoyyourlife•7m ago•1 comments

What It Costs to Run 4 Apps on My Own Servers

https://akashrajpurohit.com/blog/what-it-costs-to-run-4-apps-on-my-own-servers/
1•ghostfoxgod•11m ago•0 comments

Pinot Noir: inside the criminal gangs making fake wine

https://www.economist.com/interactive/2026/11/06/pinot-noir-inside-the-criminal-gangs-making-fake...
1•axiomdata316•18m ago•0 comments

How do photonic logic gates work?

https://www.youtube.com/watch?v=ln0zZcQXv38
1•slowcooked12_•22m ago•0 comments

The internet has a human slop problem, and AI is exposing it

https://www.businessinsider.com/ai-human-slop-software-security-vulnerabilities-internet-2026-10
1•ghernando•22m ago•0 comments

Indirect Change

https://herbertlui.net/indirect-change/
2•herbertl•33m ago•0 comments

Sequoia shutting down its Scouts program marks the end of an era

https://techcrunch.com/2026/11/06/sequoia-shutting-down-its-scouts-program-marks-the-end-of-an-era/
2•nlpnerd•35m ago•0 comments

Next bcachefs release will be 100% Rust

https://github.com/lxc/incus/issues/213#issuecomment-6716682748
1•rsyring•43m ago•0 comments

My Two Front Teeth

https://theamericanscholar.org/my-two-front-teeth/
1•gmays•46m ago•0 comments

Show HN: We Build Shareable Context Layer for Agent Teams

https://github.com/volcengine/OpenViking
1•zaynjarvis•47m ago•1 comments

PolyNotes App

1•PolySync•48m ago•0 comments

The Loss of Positive Friction

https://cutlefish.substack.com/p/tbm-450-the-loss-of-positive-friction
2•swolpers•52m ago•0 comments

Show HN: Gimbap – A themeable replacement for the macOS Dock

https://minho42.github.io/gimbap/
1•minho42•53m ago•0 comments

Show HN: Reges Code – a free AI code editor that runs on local models

https://regescode.com/
1•nonerthy•59m ago•0 comments

The SideWinder Game Pad, Microsoft's first game controller

https://www.rockpapershotgun.com/can-the-sidewinder-game-pad-microsofts-first-game-controller-wor...
2•Tomte•59m ago•0 comments

Sony World Photography Awards Honors James Barnor, Ghana's First Photojournalist

https://petapixel.com/2026/11/05/sony-world-photography-awards-honors-james-barnor-ghanas-first-p...
1•Tomte•1h ago•0 comments

Are Passkeys a Trap?

https://jimthefrog.substack.com/p/are-passkeys-a-trap
1•nonfunctional•1h ago•0 comments

Our software engineering interviews are changing (a little)

https://blog.janestreet.com/software-engineering-interviews-are-changing-a-little/
1•hubraumhugo•1h ago•0 comments

Is "GPU-hour per user" a sane way to price LLM inference?

https://www.mirastacklabs.ai/
1•mirastacklabs•1h ago•0 comments

Kirlian Photography: Building Your Own Equipment

https://imagesco.com/articles/kirlian/kirlian-photography.html
6•joebig•1h ago•0 comments

New type of architecture for agentic memory

https://zenodo.org/records/23971266
1•shoman3003•1h ago•0 comments

Bringing Your Muse to Life

https://research.meta.ai/blog/bringing-your-muse-to-life
3•gmays•1h ago•0 comments

Gossip penalty hits men harder than woman at work

https://tippie.uiowa.edu/news/2026/10/gossip-penalty-hits-men-harder-woman-work
2•rohanm93•1h ago•0 comments

JobRequester: I built this free Chrome extension that tracks job applications

https://jobrequester.com/
1•mejesseolsen•1h ago•0 comments

Simon Winchester, Author of 'The Professor and the Madman,' Has Died

https://www.nytimes.com/2026/11/04/obituaries/simon-winchester-dead.html
4•benbreen•1h ago•2 comments