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

Comments

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

Open source could pop the AI bubble – and soon

https://www.ft.com/content/353adf48-a5d6-4ea0-b5d7-9a94b141213a
1•jamesblonde•56s ago•0 comments

Show HN: ZetaCrush: LLM Bitcoin Mining Competition

https://zetacrush.com
1•zetacrushagent•1m ago•0 comments

My new fave thing to go to is algoraves

https://interconnected.org/home/2025/12/11/live
1•CharlesW•3m ago•0 comments

Show HN: B2B air monitors as "Pay What You Want" for a global study:)

1•kaiterraliam•3m ago•1 comments

AI agents are now involved in ~14% of GitHub pull requests

https://pullflow.com/state-of-ai-code-review-2025
1•zak-mandhro•3m ago•1 comments

How Congress Is Wiring Its Data for the AI Era

https://firstbranchforecast.substack.com/p/how-congress-is-wiring-its-data-for
1•toomuchtodo•4m ago•0 comments

Overengineering a Multiplayer Experience Instead of a Slide Deck

https://wlls.dev/blog/snowglobe
1•devalexwells•4m ago•0 comments

Bursting AI bubble may be EU's "secret weapon" in clash with Trump, expert says

https://arstechnica.com/tech-policy/2025/12/us-threatens-crackdown-on-eu-firms-as-clash-over-tech...
1•smurda•4m ago•0 comments

Racter: The Original Artificially Insane AI from 1983

https://parrotbox.ai/racter/
1•homarp•5m ago•1 comments

AI Should Make Work Feel Better – Communications of the ACM

https://cacm.acm.org/blogcacm/ai-should-make-work-feel-better/
1•rbanffy•6m ago•0 comments

OBS Studio Gets a New Renderer

https://obsproject.com/blog/obs-studio-gets-a-new-renderer
2•aizk•6m ago•0 comments

The procedural debt in drafting work instructions that's killing space missions

https://blog.satsearch.co/2025-12-17-spotlight-the-procedural-debt-in-drafting-work-instructions-...
1•kartikkumar•7m ago•0 comments

What I found making a sales automation tool

https://vibelead.tech
1•Schmiedey•7m ago•1 comments

AI Isn't Just Spying on You. It's Tricking You into Spending More

https://newrepublic.com/article/204525/artificial-intelligence-consumers-data-dynamic-pricing
2•c420•8m ago•0 comments

The US govt has revoked the non-immigrant visa of Nobel laureate Wole Soyinka [video]

https://www.youtube.com/watch?v=ple4xophXfM
1•Geekette•8m ago•0 comments

2025 Quantum Open Source Survey Results

https://unitaryfoundation.github.io/survey-2025/
2•cosenal•9m ago•0 comments

Oscars Bolts from ABC to YouTube Starting in 2029

https://www.hollywoodreporter.com/news/general-news/oscars-bolt-from-abc-to-youtube-starting-in-2...
1•bovermyer•9m ago•0 comments

Carnival of Slop [video]

https://www.youtube.com/watch?v=elitIZWKjEg
1•alecco•13m ago•1 comments

Green Sickness, the Disease of Virgins

https://daily.jstor.org/green-sickness-the-disease-of-virgins/
1•onychomys•13m ago•0 comments

Alpha Books

https://dan.bulwinkle.net/blog/alpha-books/
1•pilingual•14m ago•0 comments

Tell HN: No, your Lambda credentials aren't being used outside of AWS

1•scottndecker•15m ago•0 comments

Inside PostHog: SSRF, ClickHouse SQL Escape and Default Postgres Creds to RCE

https://mdisec.com/inside-posthog-how-ssrf-a-clickhouse-sql-escaping-0day-and-default-postgresql-...
2•arwt•16m ago•0 comments

The Qt Task Tree Module, Part of Qt 6.11

https://www.qt.io/blog/qt-task-tree-coming-soon-in-qt-6.11
1•jandeboevrie•16m ago•0 comments

GitHub to postpone the announced billing change for self-hosted GitHub Actions

https://twitter.com/github/status/2001372894882918548
2•gunnarmorling•17m ago•1 comments

The last product to get cancelled

https://www.ablg.io/blog/last-product-to-get-cancelled
1•tonioab•18m ago•1 comments

Visualization of the Gödel Universe (2013)

https://iopscience.iop.org/article/10.1088/1367-2630/15/1/013063
1•gone35•20m ago•0 comments

Inside the Trump Administration's Man-Made Hunger Crisis

https://www.propublica.org/article/kenya-trump-usaid-world-food-program-starvation-children-deaths
7•tastyface•20m ago•0 comments

Grok Voice Agent API: Bringing the Power of Grok Voice to All Developers

https://x.ai/news/grok-voice-agent-api
1•pretext•23m ago•0 comments

China is building the world’s most powerful hydropower system in the Himalayas

https://www.cnn.com/2025/12/17/china/china-largest-hydropower-dam-intl-hnk-dst
3•breve•24m ago•0 comments

GitHub postponing the announced billing change to GitHub Actions

https://github.com/orgs/community/discussions/182186
17•top_sigrid•26m ago•1 comments