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.

Same Streets, Different Empires: The Hidden Narrative of Map Copyright

https://blogs.loc.gov/maps/2026/11/same-streets-different-empires/
1•pavel_lishin•44s ago•0 comments

Slow Ubuntu security response times

https://openwall.com/lists/oss-security/2026/11/25/9
1•baggy_trough•1m ago•0 comments

Breaking the Square-Root Barrier for the Log-Rank Conjecture [pdf]

https://github.com/google-research/google-research/blob/master/cogentic_research_papers/logrank_c...
1•acossta•2m ago•0 comments

From Portability to Conformance: A New Chapter for Layered Vulkan on Apple

https://www.khronos.org/blog/from-portability-to-conformance-a-new-chapter-for-layered-vulkan-on-...
1•MBCook•3m ago•0 comments

YouTube Signal to Noise Ratio

https://yousnr.com/
1•bobcat77•5m ago•0 comments

Quantum simulator for major chip types, for AI agents, 6x faster

https://github.com/vicena-labs/quantum-circuit-simulator
1•AI4Science•6m ago•1 comments

Show HN: Drop-in replacement for the remove.bg API, which shuts down Dec 1

https://airgallery.com/api
1•willpschulz•7m ago•0 comments

Why is LLM inference challenging?

https://mehrdadmahabadi.com/blog/why-is-llm-inference-hard.html
1•mehrdad3301•7m ago•0 comments

64GB VRAM MTT GPUs Coming?

1•emilss•8m ago•2 comments

CLI for AI agents to access health data natively

1•pidaparti•9m ago•0 comments

Percona Database Service Is Now Open Source

https://www.percona.com/blog/percona-database-service-open-source/
2•andrewstetsenko•10m ago•0 comments

radius-proof: proof that nested rounded rectangles need R = R and d

https://github.com/steveruizok/radius-proof
1•bpierre•10m ago•0 comments

Show HN: HealthBar – Open-source macOS menu bar app that tracks status pages

https://github.com/vladforfutdinov/health-bar
1•vladfrandom•12m ago•0 comments

OpenAI is finally merging ChatGPT's Chat and Work tabs

https://techcrunch.com/2026/11/02/openai-is-finally-merging-chatgpts-chat-and-work-tabs/
2•hn-aarvin•16m ago•0 comments

The FCC has authorized SpaceX to deploy 1M satellites

https://arstechnica.com/space/2026/11/the-fcc-has-authorized-spacex-to-deploy-1-million-satellites/
4•LorenDB•17m ago•1 comments

The Last Boring Slide

https://claude.ai/artifact/Cy2d8Vn63CnzCtonA1LSah#questions-3
2•himata4113•18m ago•0 comments

Deliberately run your time, energy and resources below 80% capacity

https://twitter.com/Voxyz_ai/status/2125591320341229890/photo/1
2•jger15•18m ago•1 comments

The Curse of Impunity

https://backofmind.substack.com/p/the-curse-of-impunity
1•hn-aarvin•19m ago•0 comments

Skala

https://bjango.com/mac/skala/
1•robenkleene•21m ago•0 comments

Diablo 2

https://www.filfre.net/2026/11/diablo-ii/
1•olup•22m ago•0 comments

Against All Odds: The Mathematics of 'Provably Fair' Casino Games

https://philippdubach.com/posts/against-all-odds-the-mathematics-of-provably-fair-casino-games/
2•windsurfer•24m ago•1 comments

Approaching Technology Like the Amish

https://smartpeopleiknow.com/2026/11/25/on-approaching-technology-like-the-amish/
1•speckx•24m ago•1 comments

Diffusion Gemma

https://deepmind.google/models/gemma/diffusiongemma/
4•SweetSoftPillow•26m ago•0 comments

Guitar Hero, but for Hand Bells

https://dingdonghero.com
3•devbytes•26m ago•1 comments

Three Expropriations of Modernity: Land, Attention, Skill

https://medium.com/@smoking2man/three-expropriations-of-modernity-land-attention-skill-20750f9bb410
4•Aldus551•27m ago•0 comments

A Linux environment and Ghostty-based terminal for iOS

https://github.com/swipt-automation/Swipterm
3•polyrand•29m ago•0 comments

Nexus, an open source app for local development replacing paid SaaS like Herd

https://github.com/NexusLocal/nexus
3•tklaversma•30m ago•0 comments

What does a software factory cost?

https://zarar.dev/software-factory/
3•recroad•30m ago•0 comments

Lessons from running DeepSeek's DSec sandbox design on public cloud

https://vibrantlabs.com/research/swarmbox
2•jjmachan•30m ago•0 comments

State Machines > Skills

https://adamgrant.micro.blog/2026/11/25/state-machines-are-better-than.html
3•hidelooktropic•30m ago•0 comments