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•7mo ago

Comments

zoezoezoezoe•7mo 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•7mo 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.

Anatomy of a Domain Risk Engine: Regex vs. LLMs

https://www.urlert.com/blog/anatomy-domain-risk-engine-regex-llm
1•tomerhe•1m ago•1 comments

SC sheriff's office quoted me $9k for a simple Flock records request

https://columbiamuckraker.substack.com/p/sc-sheriffs-office-quoted-me-9000
3•sc_muckraker•7m ago•1 comments

Z2 – Lithographically fabricated IC in a garage fab

https://sam.zeloof.xyz/second-ic/
1•embedding-shape•11m ago•0 comments

AstoCAD – Polished, paid "soft-fork" of FreeCAD with upstream contributions

https://www.astocad.com/
1•embedding-shape•23m ago•0 comments

Why Does Have I Been Pwned Contain "Fake" Email Addresses?

https://www.troyhunt.com/why-does-have-i-been-pwned-contain-fake-email-addresses/
2•LorenDB•37m ago•0 comments

The Macuahuitl – The Obsidian Sword of the Aztecs

https://www.youtube.com/watch?v=12GP6ktNIk0
2•bane•41m ago•0 comments

Our Foundation: The 65,000 Restored Sound Archive

https://lockchime.com/ringchime/hub.php
1•gogyjay•47m ago•1 comments

The Complex Story Behind Al-Idrīsī's Iconic World Map

https://sacredfootsteps.com/2022/06/24/the-complex-story-behind-al-idrisis-iconic-world-map/
2•teleforce•58m ago•0 comments

Life as an ICC judge sanctioned by Trump

https://www.middleeasteye.net/news/life-icc-judge-sanctioned-trump-luz-ibanez
7•rendx•1h ago•0 comments

Sloptalgia – AI Reimagines your favorite memories of old video games

https://www.sloptalgia.com/
1•AmbroseBierce•1h ago•0 comments

Who Is ColdFusion? [video]

https://www.youtube.com/watch?v=OaG92TG2skI
1•nomilk•1h ago•0 comments

What I learned building an opinionated and minimal coding agent

https://mariozechner.at/posts/2025-11-30-pi-coding-agent/
1•mjshashank•1h ago•0 comments

Why Software Still Sucks (and Why That's About to Change)

https://medium.com/@bonniebuilds/why-software-still-sucks-and-why-thats-about-to-change-8b57ee295bf9
1•jfaat•1h ago•0 comments

The Dictator's Speech (1940) [video]

https://www.youtube.com/watch?v=k0CzXi9e66M
1•maininformer•1h ago•0 comments

Preliminary Testing with Z-Image Turbo

https://mordenstar.com/other/z-image-turbo/
1•doener•1h ago•0 comments

Oblast: A better Blasto game for the Commodore 64

http://oldvcr.blogspot.com/2025/12/oblast-better-blasto-game-for-commodore.html
4•todsacerdoti•1h ago•0 comments

Eurydice: a Rust to C compiler (yes)

https://jonathan.protzenko.fr/2025/10/28/eurydice.html
7•todsacerdoti•1h ago•0 comments

Ask HN: What is the interesting use case of humanoid robotics?

2•glaksmono•1h ago•4 comments

NAR Says Typical First-Time Homebuyer Age Was 40 This Year–But Is This Accurate?

https://www.aei.org/articles/nar-says-the-typical-first-time-homebuyer-age-was-40-this-year-up-fr...
2•JumpCrisscross•1h ago•1 comments

Who's Funding Sudan Genocide: Ethnic Cleansing and Civil War Explained (2025) [video]

https://www.youtube.com/watch?v=D8BM7fwt-O8
1•stopbulying•1h ago•1 comments

New Theory of the Origins of Life and Other Minor Issues

https://magazine.mindplex.ai/post/new-theory-of-the-origins-of-life-and-other-minor-issues-an-int...
1•MilnerRoute•1h ago•0 comments

Using LLMs at Oxide

https://rfd.shared.oxide.computer/rfd/0576
122•steveklabnik•1h ago•45 comments

Times God Picked a Date

https://www.kcm.org/real-help/faith/learn/10-times-god-picked-date
1•marysminefnuf•1h ago•1 comments

UC Davis scientists created wheat that can partially fertilize itself

https://scitechdaily.com/new-self-fertilizing-wheat-could-transform-farming/
1•methuselah_in•2h ago•0 comments

How UI degrades over time

https://grumpy.website/1723
8•soheilpro•2h ago•1 comments

Puzzling Out the Perytons (2015)

https://www.centauri-dreams.org/2015/04/06/puzzling-out-the-perytons/
1•adagradschool•2h ago•0 comments

Jellyfin does hardware transcoding for free, and Plex wants $250 to match it

https://www.xda-developers.com/jellyfin-hardware-transcoding-free-plex-wants-money/
6•josephcsible•2h ago•1 comments

LokiVector: An Embedded Document Vector DB Crash-Tested Durability

1•rckflr•2h ago•0 comments

Why AI isn't tool calling humans?

https://www.human-tool-call.com/
3•louis030195•2h ago•2 comments

My Next.js server was compromised 24 hours after CVE-2025-55182 disclosure

https://asleepace.com/blog/malware-cve-2025-55182-exploitation-incident-report/
1•asleepace•2h ago•1 comments