frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

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.

Return on Intelligence, Part 1: Echoes

https://rebecca-powell.com/posts/return-on-intelligence-01-echoes/
1•jerhewet•1m ago•0 comments

Fired Atlassian engineer posts breakdown of every system he built

https://twitter.com/polydao/status/2055197994635424038
1•DeusExMachina•1m ago•0 comments

Package Quarantine and Urgent Release Protocol (Pqurp)

https://github.com/melbahja/draft-pqurp/blob/main/spec.md
1•dev0x0•13m ago•0 comments

Autoregressive next token prediction and KV Cache in transformers

https://medium.com/advanced-deep-learning/autoregressive-next-token-prediction-kv-cache-in-transf...
1•coarchitect•13m ago•0 comments

Don't Outsource the Learning to AI

https://twitter.com/addyosmani/status/2056078124346228860
1•ayoisaiah•16m ago•0 comments

Skilled – a CLI and TUI to inspect skill usage by your coding agents

https://github.com/av/skilled/releases/tag/v0.3.1
1•everlier•22m ago•1 comments

The Four Horsemen of the LLM Apocalypse

https://anarc.at/blog/2026-05-16-four-horsemen/
2•edward•22m ago•0 comments

Quit: A Human-in-the-Loop Platform for AI Research Automation

https://github.com/Mr-XcHan/QUIT
1•isxinchen•26m ago•0 comments

Fwd: [multicians] Peter Neumann has died

https://lwn.net/ml/all/CAEoi9W7rpLzdJzYJ3-F0KVJo-wQXa7UawUYtUoUUYy36m5e_3Q@mail.gmail.com/
5•Tomte•27m ago•0 comments

Kubernetes memory requests don't do what you think (until you enable MemoryQoS)

https://roszigit.com/en/blog/kubernetes-memory-request-limit
2•lkanwoqwp•27m ago•0 comments

Once Upon a Time in (New) Math

https://ssmcis-columbia.github.io/
2•he11ow•29m ago•0 comments

Show HN: A Pure-Python Computer Vision Library That's Fast and Minimal

https://github.com/abhiTronix/vidgear
1•abhiTronix•30m ago•0 comments

Use your Grok subscription in Hermes agent

https://x.ai/news/grok-hermes
2•sheepscreek•30m ago•0 comments

Vladislav Surkov

https://en.wikipedia.org/wiki/Vladislav_Surkov
1•James72689•34m ago•0 comments

Longtime Leading AMD Linux GPU Driver Developer Now Working for Valve

https://www.phoronix.com/news/AMD-Marek-Joins-Valve
3•Bender•36m ago•0 comments

New UFO files offer no answers–but something is happening in the skies

https://www.popsci.com/science/new-ufo-files-offer-no-answers-but-something-is-happening-in-the-s...
2•evo_9•41m ago•1 comments

VoIP Brings Back Old-Fashioned Pay Phones to Rural Vermont

https://spectrum.ieee.org/payphone-voip
3•bookofjoe•41m ago•0 comments

Paul Erdos

https://en.wikipedia.org/wiki/Paul_Erd%C5%91s
3•cemsakarya•42m ago•0 comments

The 27-tonne Giant Dinosaur Discovered in Thailand

https://www.discoverwildlife.com/dinosaurs/nagatitan-chaiyaphumensis-thailand
1•yusufaytas•43m ago•0 comments

WHO warns nicotine pouch brands targeting youth as sales surge

https://www.who.int/news/item/15-05-2026-who-warns-nicotine-pouch-brands-targeting-youth-as-sales...
3•geox•45m ago•0 comments

I, Dota 4 by Blurpi [video]

https://www.youtube.com/watch?v=pnqkN8fOWQk
1•ThoAppelsin•46m ago•0 comments

Mitigating Ongoing Supply Chain Attacks

https://hawksley.dev/blog/supply-chain-attacks/
2•ethanhawksley•49m ago•0 comments

Eric Schmidt booed at University of Arizona after praising AI

https://bsky.app/profile/404media.co/post/3mm2ivguvq22x
18•poisonfountain•50m ago•7 comments

The mistake of conflating intelligence and power

https://www.dwarkesh.com/p/the-mistake-of-conflating-intelligence
1•crescit_eundo•52m ago•1 comments

The Long History of the Figurative 'Literally' (2023)

https://www.mentalfloss.com/language/words/famous-writers-used-literally-figuratively
1•theanonymousone•53m ago•0 comments

Microsoft warns of Exchange zero-day flaw exploited in attacks

https://www.bleepingcomputer.com/news/microsoft/microsoft-warns-of-exchange-zero-day-flaw-exploit...
4•billybuckwheat•53m ago•0 comments

Enabling Resizable Bar on RTX 3080 Vbios via GitHub

https://github.com/danindiana/rtx3080-rebar-vbios/tree/master
1•linux_lorax•54m ago•0 comments

Smartmedia Card Spec Opened, available free (2000)

https://www.edn.com/smartmedia-card-interface-spec-opened-available-for-free/#google_vignette
2•brudgers•58m ago•1 comments

Growing Neural Cellular Automata

https://distill.pub/2020/growing-ca/
4•pulkitsh1234•59m ago•0 comments

Bun Audit: Add UB-exorcism audit workspace and executive guide

https://github.com/oven-sh/bun/pull/30903
1•gmays•1h ago•0 comments