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

Comments

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

What Makes a Strategy Great

https://longform.asmartbear.com/great-strategy/
1•gmays•1m ago•0 comments

The Economics of Bicycles for the Mind

https://www.nber.org/papers/w34034
1•Rexxar•2m ago•0 comments

Show HN: Waycore – an open-source, offline-first modular field computer

1•DGrechko•5m ago•0 comments

MakerLinks – A free link-in-bio page for indie hackers and builders

https://www.makerlinks.page/
1•amamuwala•6m ago•2 comments

We Lost the Thread on the Data Lake

https://blog.matterbeam.com/we-lost-the-thread-on-the-data-lake/
1•mikepk•7m ago•1 comments

The Park Ranger Scenario (2025 manifesto)

https://legacybranch.substack.com/p/eat-drink-and-be-merry-for-tomorrow
2•legacybranch•9m ago•0 comments

Weight-loss jab prescriptions double as Scottish doctors tackle obesity

https://www.thetimes.com/uk/scotland/article/weight-loss-jab-prescriptions-double-as-doctors-tack...
1•bookofjoe•12m ago•1 comments

Collective Action Problem

https://en.wikipedia.org/wiki/Collective_action_problem
1•danielschreber•14m ago•0 comments

Turning images into structured signals for modern search

https://visualquerypro.com
1•kalirobot•17m ago•1 comments

Show HN: I "crashed" Gemini 3.0 Pro

1•_rtld_global_ro•20m ago•0 comments

RotMG Map Seeds

https://www.redblobgames.com/blog/2025-11-07-rotmg-seeds/
1•guiambros•22m ago•0 comments

Ask HN: How to go back to listening to MP3s?

1•muratsu•24m ago•1 comments

Race Toolkit

https://github.com/auracast-research/race-toolkit
2•sva_•24m ago•0 comments

Show HN: UpDown, Simple Website Uptime Checker

https://updown.fly.dev/
1•ejncman•24m ago•2 comments

Show HN: I Made a Tiny Stranger Things Game While Waiting for the Finale

https://www.strangerclicks.com
1•jeanmayer•25m ago•2 comments

Show HN: Turn Your Git Commits into Tweets

https://landkit.pro/git-to-tweet
1•nikhonit•26m ago•0 comments

Release age v1.3.0: post-quantum (and more)

https://github.com/FiloSottile/age/releases/tag/v1.3.0
2•todsacerdoti•28m ago•0 comments

7- and 14-segment fonts "DSEG"

https://www.keshikan.net/fonts.html
2•anigbrowl•32m ago•0 comments

Going back to go forwards and instruction design

https://lukes-blog.vercel.app/posts/011-reversion&instruction
1•octopls•41m ago•2 comments

The Dangers of SSL Certificates

https://surfingcomplexity.blog/2025/12/27/the-dangers-of-ssl-certificates/
2•azhenley•41m ago•1 comments

Floppy disk pre-paid cash card launched in Taiwan

https://www.tomshardware.com/pc-components/storage/floppy-disk-pre-paid-cash-card-launched-in-tai...
1•naves•42m ago•0 comments

Dinosaur Food: 100M year old foods we still eat today

https://borischerny.com/food/2022/01/17/Dinosaur-food.html
2•jxmorris12•43m ago•0 comments

Liberating Bluetooth on the ESP32

https://exquisite.tube/w/mEzF442Q4hUXnhQ8HmfZuq
1•todsacerdoti•44m ago•0 comments

Show HN: Namebump is a registrationless, KVS. Unused names are bumped overtime

https://github.com/robertsdotpm/namebump
1•Uptrenda•44m ago•0 comments

W6LG – Silent Key

https://www.youtube.com/watch?v=uIvZd71xOQM
1•jayknight•48m ago•1 comments

macOS Tahoe Bug Causes Studio Display Flickering Issues

https://www.macrumors.com/2025/12/18/macos-tahoe-studio-display-flickering/
1•tosh•48m ago•0 comments

Show HN: Twine – A tool to dynamically trace calls in production Elixir systems

https://github.com/ollien/twine
1•birdculture•49m ago•1 comments

44% of Gnome Core Apps Are Written in C, 13% in JavaScript and 10% in Rust

https://www.phoronix.com/news/GNOME-2025-Code-Stats
1•mikece•49m ago•0 comments

I'm bored, what should I build?

1•SpyCoder77•50m ago•4 comments

39C3: To sign or not to sign: Practical vulnerabilities in GPG and friends [video]

https://media.ccc.de/v/39c3-to-sign-or-not-to-sign-practical-vulnerabilities-i
1•todsacerdoti•52m ago•0 comments