frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

Avoid Continue

https://www.teamten.com/lawrence/programming/avoid-continue.html
2•todsacerdoti•2mo ago

Comments

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

Show HN: Remote MCP server testing tool

https://check-mcp.mocha.app/
1•bluesnowmonkey•1m ago•0 comments

Cascading retrieval with multi-vector representations

https://www.pinecone.io/blog/cascading-retrieval-with-multi-vector-representations/
1•gk1•5m ago•0 comments

Earn $200 by referring only. FREE

https://waitlister.me/p/trading-platform-of-the-future
1•DavidvsGoliath•6m ago•0 comments

What a bumble bee chooses to eat may not match its ideal diet

https://phys.org/news/2025-07-bumble-bee-ideal-diet.html
1•PaulHoule•6m ago•0 comments

Shutting Down Clear Linux OS

https://community.clearlinux.org/t/all-good-things-come-to-an-end-shutting-down-clear-linux-os/10716
5•todsacerdoti•8m ago•1 comments

Nuxt Joins Vercel

https://vercel.com/blog/nuxtlabs-joins-vercel
1•rattray•13m ago•1 comments

The Kap Programming Language

https://kapdemo.dhsdevelopments.com/examples.html
2•thunderbong•19m ago•0 comments

A Software for One

https://www.jasonthorsness.com/30
2•jasonthorsness•19m ago•0 comments

Women Are Falling Behind in America's Return to the Office

https://www.wsj.com/lifestyle/careers/return-to-office-gender-gap-236392aa
4•bdev12345•20m ago•0 comments

Astronomer launches internal investigation after viral Coldplay video

https://www.cnn.com/2025/07/18/entertainment/coldplay-concert-kiss-cam-astronomer-investigation
2•bb88•20m ago•0 comments

Build your CV on Subreply as a LinkedIn alternative

https://subreply.com/lm
4•lcnmrn•24m ago•0 comments

Curse Not the King

https://daringfireball.net/2025/07/curse_not_the_king_cbs_colbert_trump
2•Bogdanp•25m ago•0 comments

The Physics of Dissonance (MinutePhysics) [video]

https://www.youtube.com/watch?v=tCsl6ZcY9ag
1•jerf•29m ago•0 comments

Billionaire Gabe Newell: pitching VCs makes no business sense

https://www.pcgamer.com/gaming-industry/multi-billionaire-gabe-newell-says-the-whole-startup-culture-of-pitching-vcs-for-capital-makes-no-business-sense-a-great-way-of-destroying-money-and-wasting-peoples-time/
6•e2e4•30m ago•0 comments

Ccusage: A CLI tool for analyzing Claude Code usage from local JSONL files

https://github.com/ryoppippi/ccusage
12•kristianp•31m ago•2 comments

Fuzzing macOS Userland (For Fun and Pain)

https://marqcodes.com/fuzzyingforfun.html
1•N3Xxus_6•32m ago•0 comments

Free Online Minesweeper

https://www.freeonlineminesweeper.com
1•avonmach•32m ago•0 comments

DHH – I Hate TypeScript (3 min video)

https://www.youtube.com/watch?v=tyjUH5TLSTM
3•rmason•38m ago•0 comments

Show HN: Interactive Bash tutorial that runs in the browser

https://sandbox.bio/tutorials/bash-script
2•raboukhalil•41m ago•0 comments

Show HN: Castream – Native iOS/Android IRL multistreaming app

1•acabralto•41m ago•0 comments

There Is No Antimemetics Division – A Novel (2025)

https://www.penguinrandomhouse.com/books/783041/there-is-no-antimemetics-division-by-qntm/
2•Duanemclemore•45m ago•1 comments

First earthquake, then fire: UC San Diego researchers test steel building

https://www.kpbs.org/news/science-technology/2025/07/17/first-earthquake-then-fire-uc-san-diego-researchers-test-steel-building
2•littlexsparkee•47m ago•1 comments

Ask HN: What are your favorite open source AI agent implementations?

2•kanodiaashu•47m ago•0 comments

Node.js 18 is being deprecated

https://vercel.com/changelog/node-js-18-is-being-deprecated
1•ananddtyagi•52m ago•0 comments

EPA says it will eliminate its scientific reseach arm

https://www.nytimes.com/2025/07/18/climate/epa-firings-scientific-research.html
42•anigbrowl•53m ago•7 comments

Vibe coding? AI assisted coding? I prefer being an AI micromanager [video]

https://www.youtube.com/watch?v=3gnfOnhC1EA
5•godot•58m ago•0 comments

"Pitch in " Anti-Litter PSA (1973) [video]

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

Agents Built from Alloys

https://xbow.com/blog/alloy-agents/
2•azhenley•1h ago•0 comments

US EPA cutting workforce by 23%, closing research division

https://www.reuters.com/legal/government/us-epa-cutting-workforce-by-23-closing-research-division-2025-07-18/
15•pseudolus•1h ago•2 comments

I'm Rebelling Against the Algorithm

https://varunraghu.com/im-rebelling-against-the-algorithm/
3•Varun08•1h ago•0 comments