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

Comments

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

User Inyerface – A worst-practice UI experiment

https://userinyerface.com/
2•hunvreus•5m ago•0 comments

ChatGPT plan purchasing bug: Free to buy

https://community.openai.com/t/security-report-apple-pay-receipt-validation-does-not-bind-to-purc...
2•pengfeituan•5m ago•0 comments

Cory Doctorow on the High Cost of Living with the Ultra-Rich

https://www.newyorker.com/books/book-currents/cory-doctorow-on-the-high-cost-of-living-with-the-u...
1•mitchbob•7m ago•1 comments

Wawa VFX

https://github.com/wass08/wawa-vfx
1•Lisa0802•14m ago•0 comments

The Match Act Is the Missing Piece in America's AI Export Control Strategy

https://www.thefai.org/posts/the-match-act-is-the-missing-piece-in-america-s-ai-export-control-st...
1•num42•19m ago•0 comments

Bipartisan Bill to Tighten Controls on Sensitive Chipmaking Equipment

https://baumgartner.house.gov/2026/04/02/baumgartner-introduces-bipartisan-bill-to-tighten-contro...
1•num42•20m ago•0 comments

37signals Dev – The ONCE app server

https://dev.37signals.com/once-app-server/
1•doppp•20m ago•0 comments

Show HN: Website that recommends outfit using weather and AI

https://what2wear-two.vercel.app
1•COOLmanYT•21m ago•1 comments

The Season Finale of TBPN

https://www.workingtheorys.com/p/tbpn
1•momentmaker•26m ago•0 comments

Using AI to get better at algorithms

https://medium.com/@andreiboar/algotutor-using-ai-to-actually-get-better-at-algorithms-a2b7b96e054a
2•zuzuleinen•27m ago•0 comments

Three-Monitor Ridge Racer Machine Emulated in MAME

https://hackaday.com/2026/04/18/three-monitor-ridge-racer-machine-emulated-in-mame/
1•pathompong•35m ago•0 comments

10 tips to increase your token consumption

https://twitter.com/vidzert/status/2045698735926038824
1•ruslan5t•38m ago•0 comments

Finland, Tesla, and the Quiet Revolution in How We Touch Electricity

https://tonysalas369.substack.com/p/finland-tesla-and-the-quiet-revolution
1•Eterbios•41m ago•0 comments

Air Canada suspends 6 routes 'no longer economically feasible'

https://www.cbc.ca/news/canada/air-canada-jet-fuel-flights-9.7167904
1•geox•46m ago•0 comments

The Bhagavad Gita: Explained

https://cultchron.substack.com/p/bhagvad-gita-in-a-nutshell
1•intrepidsoldier•47m ago•0 comments

Agents don't sleep, but your infra (and brain) might need to

https://blog.mehdio.com/p/ctrlr-13-agents-dont-sleep-but-your
1•eigenBasis•48m ago•0 comments

The Commodification of Uncertainty

https://www.copingwithfootnotes.com/p/the-commodification-of-uncertainty
1•heywoods•57m ago•0 comments

Show HN: DevToolBox – 88 client-side developer tools, no tracking, 9 languages

https://viadreams.cc/en/
1•arenas2026•58m ago•0 comments

Opsec oopsie: Dutch Navy frigate location outed by mailed Bluetooth tracker

https://www.theregister.com/2026/04/17/dutch_navy_frigate_tracked/
1•gnabgib•59m ago•0 comments

I made an interactive Fast and the Furious timeline/map

https://fatf-timeline.vercel.app/
2•jfigure•59m ago•0 comments

Trust as Constellation

https://signalintent.net/2026/04/18/after-the-chain-trust-as-constellation/
1•tokonomy_dev•1h ago•0 comments

Scientists invent new way to detect skin cancer (2024)

https://www.bbc.com/news/articles/c9wzj1m3g4no
1•teleforce•1h ago•0 comments

The world in which IPv6 was a good design

https://apenwarr.ca/log/20170810
2•signa11•1h ago•0 comments

Self-hosted webmail client for JMAP protocol: Email, calendar, contacts, files

https://github.com/bulwarkmail/webmail
3•DASD•1h ago•2 comments

A PHP Dev Just Solved a 20 Year-Old KDE Plasma Bug

https://itsfoss.com/news/kde-plasma-per-screen-virtual-desktops/
1•alhazrod•1h ago•0 comments

Chained Library

https://en.wikipedia.org/wiki/Chained_library
1•jfil•1h ago•1 comments

Show HN: Multi-agent task management for Claude and Gemini

https://agentrq.com
1•mrtnx•1h ago•0 comments

Enumerations

https://astronomy487.com/all/
1•downboots•1h ago•0 comments

ChatGPT vs. Gemini vs. Claude: The Best LLM Subscription You Should Buy

https://www.artificialintelligencemadesimple.com/p/chatgpt-vs-gemini-vs-claude-the-best
1•imranmk•1h ago•0 comments

I made Claude Code at least 30% more efficient (for me anyway)

https://github.com/noahkirsch/Claude-Code-Glow
1•noahkirsch•1h ago•4 comments