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: TUI for SVN

https://lazysvn.sawirstudio.com/
1•sawirricardo•3m ago•0 comments

Agentic Risks

https://cloudberry.engineering/article/agentic-risks/
1•gbrindisi•4m ago•0 comments

Ask HN: Why does a black line appear on HN sometimes?

1•bheadmaster•9m ago•0 comments

Ask HN: How do you find joy in a world full of depressing news?

2•Razengan•12m ago•1 comments

Gpsjam GPS/GNSS Interference Map

https://gpsjam.org/
1•jonbaer•16m ago•0 comments

The Quantum Curtain

https://www.defenseone.com/ideas/2026/03/quantum-curtain/411967/
2•jonbaer•19m ago•0 comments

Stacksort

https://gkoberger.github.io/stacksort/
1•mihau•20m ago•0 comments

Mesh – remote mobile forensics and network monitoring

https://github.com/BARGHEST-ngo/MESH
1•0x0v1•20m ago•1 comments

MacBook Neo Review: Better Than You Think

https://www.youtube.com/watch?v=iGeXGdYE7UE
1•keepamovin•20m ago•0 comments

Encode/httpx: Closing off access

https://github.com/encode/httpx/discussions/3784
2•luismedel•21m ago•0 comments

A Kubernetes operator that orchestrates AI coding agents

https://medium.com/@bobbydeveaux/we-built-an-ai-that-plans-codes-reviews-and-ships-and-then-we-us...
2•bobbydeveaux•22m ago•1 comments

AI Agent Hacks McKinsey

https://codewall.ai/blog/how-we-hacked-mckinseys-ai-platform
1•mycroft_4221•23m ago•0 comments

Movies I Highly Recommend

https://github.com/ojhaugen15/12_movies
1•programmexxx•25m ago•0 comments

Richard Feynman's story illustrating the problem of p-hacking

https://twitter.com/SwipeWright/status/2031604331510690112
4•MrBuddyCasino•33m ago•0 comments

Glanceway – Collect RSS and custom plugin data in your macOS menu bar

https://glanceway.app
1•codytseng•34m ago•1 comments

Unbash: Fast 0-deps bash parser written in TypeScript

https://github.com/webpro-nl/unbash
1•mariuz•35m ago•0 comments

Ask HN: Is there a market for a security-audited Claude Code skills newsletter?

1•camicortazar•36m ago•0 comments

The Anthropic Institute

https://www.anthropic.com/news/the-anthropic-institute
4•meetpateltech•36m ago•1 comments

Gemini 2 Is the Top Model for Embeddings

https://agentset.ai/blog/gemini-2-embedding
2•tifa2up•40m ago•0 comments

Tutorials in Optomechanics

https://wp.optics.arizona.edu/optomech/tutorials-in-optomechanics/
1•o4c•42m ago•0 comments

A.I. Incites a New Wave of Grieving Parents Fighting for Online Safety

https://www.nytimes.com/2026/03/10/technology/ai-social-media-child-safety-parents.html
3•1vuio0pswjnm7•46m ago•1 comments

The Ig Nobel Prize Ceremony Is Moving to Europe (After 35 Years in the USA)

https://improbable.com/2026/03/10/the-ig-nobel-prize-ceremony-is-moving-to-europe-after-35-years-...
3•layer8•49m ago•0 comments

Some Arabic Words Transliterated

https://docs.google.com/document/d/1RMxjUr2Rki6TLNTNd00BNtBUwB0DJXiE4Dd_YppUi1I/edit
1•programmexxx•51m ago•0 comments

Google to Provide Pentagon with AI Agents

https://www.bloomberg.com/news/articles/2026-03-10/google-to-provide-pentagon-with-ai-agents-for-...
12•1vuio0pswjnm7•52m ago•3 comments

Europe tops global arms imports, SIPRI reports

https://www.dw.com/en/sipri-europe-arms-imports-global-weapons-trade-defense-spending/a-76261906
1•breve•56m ago•0 comments

AI-powered apps struggle with long-term retention, new report shows

https://techcrunch.com/2026/03/10/ai-powered-apps-struggle-with-long-term-retention-new-report-sh...
2•pseudolus•1h ago•0 comments

My app got 3k users in 48 hours and then monetization almost killed it

https://getcalendarly.com
1•DimKat•1h ago•1 comments

PEP 827 – Type Manipulation

https://peps.python.org/pep-0827/
2•EvgeniyZh•1h ago•0 comments

NASA's Van Allen Probe A to re-enter atmosphere

https://phys.org/news/2026-03-nasa-van-allen-probe-atmosphere.html
7•bookmtn•1h ago•0 comments

How age standardization make health metrics comparable

https://ourworldindata.org/age-standardization
1•sohkamyung•1h ago•0 comments