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

Comments

zoezoezoezoe•9mo 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•9mo 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: BuryIt – Bury your failures, regrets and secrets anonymously

https://www.buryit.space/
1•noanoanoa•4m ago•0 comments

1944 informational poster of the electromagnetic spectrum

https://en.wikipedia.org/wiki/Electromagnetic_spectrum
1•winemath•9m ago•0 comments

The lies I used to tell myself

https://usefulfictions.substack.com/p/the-lies-i-used-to-tell-myself
1•jger15•10m ago•0 comments

Kolab Now: Secure and private email, calendars and more

https://kolabnow.com/
1•doener•14m ago•0 comments

Playwright CLI

https://github.com/microsoft/playwright-mcp/releases/tag/v0.0.57
1•aragonite•15m ago•0 comments

Soverin: Your Mailbox is your Digital Castle

https://soverin.com/
1•doener•16m ago•0 comments

C++ has scope_exit for running code at scope exit

https://devblogs.microsoft.com/oldnewthing/20260123-00/?p=112008
1•firesteelrain•17m ago•0 comments

Grok Is Temporarily Unavailable

https://status.x.ai/grok-com
2•pmcjones•17m ago•0 comments

Laracasts: I'm Done [video]

https://www.youtube.com/watch?v=g_Bvo0tsD9s
1•samsolomon•18m ago•0 comments

I was wrong about AI agent sandboxing

https://tuananh.net/2026/01/22/i-was-wrong-about-ai-agent-sandboxing/
1•tuananh•19m ago•0 comments

Ageing promotes microglial accumulation of slow-degrading synaptic proteins

https://www.nature.com/articles/s41586-025-09987-9
1•bookofjoe•22m ago•0 comments

A Problem in Gas Town Society

https://xcancel.com/voooooogel/status/2014189072647078053
1•themaxdavitt•22m ago•0 comments

Open-source self-driving for 325 car models from 27 brands

https://comma.ai
2•JumpCrisscross•24m ago•0 comments

All you need is an Acre

https://twitter.com/theOpusLABS/status/2014756424836866425
1•opuslabs•28m ago•0 comments

Docs.surf

https://docs.surf/
1•danabramov•35m ago•0 comments

Korea Issues Strict New AI Rules, Outpacing the West

https://www.wsj.com/tech/ai/south-korea-issues-strict-new-ai-rules-outpacing-the-west-2af7d7eb
1•JumpCrisscross•37m ago•0 comments

Anti-vax sentiment pushes Moderna away from new late-stage infectious diseases

https://www.fiercebiotech.com/biotech/anti-vaccine-sentiment-pushes-moderna-away-new-late-stage-i...
4•dcgudeman•38m ago•0 comments

Use of PQC in SMTP STARTTLS

https://www.netmeister.org/blog/smtp-pqc.html
2•8organicbits•38m ago•0 comments

Face to Face with History's Most Dangerous Painter

https://www.nytimes.com/interactive/2026/01/22/arts/jacques-louis-david-painter-french-revolution...
1•DiscourseFan•38m ago•0 comments

Study shows how earthquake monitors can track space junk through sonic booms

https://apnews.com/article/space-junk-seismic-booms-dadb5f9499fa9b52200baada0fdf1f15
1•JumpCrisscross•42m ago•0 comments

Hollywood Try to Take Pirate Sites Down Globally Through Indian Court

https://torrentfreak.com/disney-netflix-crunchyroll-try-to-take-pirate-sites-down-globally-throug...
1•thisislife2•52m ago•0 comments

Open-source ad infra for LLMs (reverse-engineered from ChatGPT)

https://github.com/system32miro/ai-ads-engine
1•system32miro•55m ago•0 comments

Kauldron: Modular, scalable library to train ML models

https://github.com/google-research/kauldron
1•lairv•55m ago•0 comments

Show HN: AdaL Web, a local “Claude co-work” [video]

https://www.youtube.com/watch?v=smfVGCI08Yk
4•meame2010•57m ago•8 comments

Show HN: Agentic browser testing videos in GitHub PRs

https://twitter.com/morphllm/status/2014454667007426752
1•bhaktatejas922•59m ago•0 comments

Five Ways People Are Using Claude Code

https://www.nytimes.com/2026/01/23/technology/claude-code.html
2•hecanjog•1h ago•0 comments

A UX Case Study: How Notion's Billing Flaw Creates Epistemic Injustice

https://twitter.com/JacobRoss117/status/2014852639151079704
2•DocSeraphMercer•1h ago•1 comments

Brex CFO Erica Dorfman's Take on the Capital One Deal

https://www.cfo.com/news/brex-cfo-erica-dorfman-capital-one-deal-acquisition/810415/
2•brandonb•1h ago•0 comments

Scientists solve 66M-year-old mystery of how Earth's greenhouse age ended

https://phys.org/news/2026-01-scientists-million-year-mystery-earth.html
1•bikenaga•1h ago•1 comments

CertiK eyes IPO at $2B valuation

https://www.theblock.co/post/386882/certik-ipo-2-billion-valuation-first-public-web3-cybersecurit...
1•SaaSasaurus•1h ago•0 comments