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

Comments

zoezoezoezoe•10mo 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•10mo 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: YTM Keep-Alive –A lightweight bookmarklet to bypass YouTube music pause

https://github.com/erysngl/ytm-keep-alive
1•erysngl•1m ago•0 comments

Show HN: AI agent framework where dangerous actions are structurally unreachable

https://github.com/hibanaworks/hibana-agent
1•o8vm•1m ago•0 comments

Claude Status Line with Latest News from Hacker News

https://gist.github.com/tejakantamneni/1a92c005f2e1d91f91cb17fe278f1b3b
1•tejakantamnni•4m ago•0 comments

Nvidia is in talks to invest up to $30B in OpenAI

https://www.cnbc.com/2026/02/19/nvidia-is-in-talks-to-invest-up-to-30-billion-in-openai-source-sa...
1•Betelbuddy•4m ago•0 comments

The Lighthouse: How extreme isolation transforms the body and mind

https://www.newscientist.com/article/2231732-the-lighthouse-how-extreme-isolation-transforms-the-...
1•nixass•4m ago•0 comments

I built an SEO API with 100M+ keywords

https://vebapi.com
1•ajithjojo•4m ago•1 comments

Show HN: ChatJimmy Ultra (100k+ tokens/sec)

https://incoherency.co.uk/chatjimmy-ultra/
1•jstanley•5m ago•0 comments

How to get qualiy traffic to my side project?

https://pickedvids.com
1•fredtheman•7m ago•1 comments

Grey's Anatomy star Eric Dane dies at 53 after ALS diagnosis

https://www.bbc.com/news/articles/c78j01n775ko
1•mgh2•8m ago•0 comments

OptimizeQL- open source AI-powered SQL query optimizer

https://github.com/SubhanHakverdiyev/OptimizeQL
3•hura17•10m ago•2 comments

Crypto money laundering balloons to $82B as Chinese-language services dominate

https://www.coindesk.com/policy/2026/01/27/crypto-money-laundering-balloons-to-usd82b-as-chinese-...
1•PaulHoule•13m ago•0 comments

Six months of yak shaving a Zig web back end stack

https://lalinsky.com/2026/02/19/six-months-of-yak-shaving-a-zig-web-backend-stack.html
1•ibobev•13m ago•0 comments

The Car Wash Problem: A variable isolation study on prompt architecture

1•midmost44•13m ago•0 comments

Behaviour Trees versus State Machines

https://queenofsquiggles.github.io/guides/fsm-vs-bt/
1•ibobev•13m ago•0 comments

Show HN: InkSight – An open-source, LLM-powered e-ink display for "slow info"

https://github.com/datascale-ai/inksight
1•xx123122•14m ago•1 comments

Show HN: AccessiGuard – Free WCAG Scanner with CLI and GitHub Action

https://accessiguard.app
1•PrimeStark•14m ago•0 comments

Reaction-Diffusion: Gray-Scott on a 2D Grid

https://www.4rknova.com//blog/2026/02/15/reaction-diffusion
1•ibobev•14m ago•0 comments

Data centers are becoming power plants – this NJ project proves it

https://electrek.co/2026/02/19/data-centers-are-becoming-power-plants-this-nj-project-proves-it/
1•Bender•15m ago•0 comments

PayPal discloses data breach that exposed user info for 6 months

https://www.bleepingcomputer.com/news/security/paypal-discloses-data-breach-exposing-users-person...
2•el_duderino•15m ago•0 comments

Who Writes the Constitution of Machines?

https://11h.dev/en/2026/02/13/who-writes-the-constitution-of-machines/
1•al3xisb•15m ago•0 comments

Show HN: Groundwork – Organizing the AI-Driven "Time Surplus" for Impact

https://www.groundwork.today
3•Dicemanx•15m ago•2 comments

Chinese car brand Nio performs 165,898 battery swaps – IN A SINGLE DAY

https://electrek.co/2026/02/20/chinese-car-brand-nio-performs-165898-battery-swaps-in-a-single-day/
2•Bender•16m ago•0 comments

The largest meteorite on Earth is still where it landed

https://boingboing.net/2026/01/12/the-largest-meteorite-on-earth-is-still-exactly-where-it-landed...
2•surprisetalk•17m ago•0 comments

Can We Understand the Standard Model Using Octonions? [video]

https://www.youtube.com/watch?v=OH9e9C0xvUg
1•surprisetalk•17m ago•0 comments

How to Stop Being Boring

https://www.joanwestenberg.com/how-to-stop-being-boring/
2•surprisetalk•18m ago•0 comments

The System That Punishes Beautiful Design [video]

https://www.youtube.com/watch?v=4haFPDNSuPY
1•surprisetalk•18m ago•0 comments

Show HN: Docdex – A local tool to reduce LLM tokens and make agents smarter

https://github.com/bekirdag/docdex
1•bekirdag•18m ago•0 comments

AI is a winner-takes-all game

https://omattos.com/2026/02/20/ai_is_a_winner_takes_all_game.html
1•londons_explore•18m ago•0 comments

Broodlink – Multi-agent AI orchestration in Rust with knowledge graph memory

https://github.com/nevenkordic/broodlink
1•yotta25•18m ago•1 comments

Test-driven development ideal for AI, says Agile workshop

https://www.theregister.com/2026/02/20/from_agile_to_ai_anniversary/
1•chmaynard•18m ago•0 comments