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•1y ago

Comments

zoezoezoezoe•1y 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•1y 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: Duckflix, an open-source self-hosted media streaming platform

https://github.com/duckflixapp/duckflix
1•patakxd•38s ago•0 comments

The Soul in the Machine

https://netwars.pelicancrossing.net/2026/05/08/the-soul-in-the-machine/
1•ColinWright•50s ago•0 comments

Waiting for Joe

http://essaysnthings.blogspot.com/2008/05/waiting-for-joe.html
1•JumpCrisscross•1m ago•0 comments

Show HN: Cross-runtime AI agent conversations and a CI gate for agent quality

https://github.com/WillNigri/Agentic-Tool-Optimization
1•WillNigri•1m ago•0 comments

Anthropic says newest lawyer tools are 'like giving an engineer a legal degree'

https://www.businessinsider.com/anthropic-expands-legal-ai-tools-claude-cowork-2026-5
1•cebert•3m ago•0 comments

Kagi Snaps

https://daringfireball.net/linked/2026/05/12/kagi-snaps
1•frizlab•3m ago•0 comments

XCA: Breaking Confidential Computing via the Interconnect

https://xca-attacks.github.io/overview/
1•pipogipo•3m ago•0 comments

State of Code Developer Survey report [pdf]

https://www.sonarsource.com/state-of-code-developer-survey-report.pdf
1•b-man•5m ago•0 comments

Curating cross-medium galleries (books, films, music, art, photos, fashion)

https://tryfractart.com/
1•helenxyz•10m ago•0 comments

Do teachers need advanced degrees?

https://www.cremieux.xyz/p/do-teachers-need-advanced-degrees
2•renameme•11m ago•3 comments

Show HN: GIF Pile. a site to make piles of GIFs

https://gifpile.com/
1•FatCat1979•12m ago•0 comments

I've been running an AI editorial pipeline on the Iran-US war for 75 days

https://worldwarwatcher.com
1•tamarru•12m ago•0 comments

Golden Speakers: Building a native-like accent in your 2nd/3rd/4th+ language

https://loxai.tech
1•audreyfei•14m ago•1 comments

Supermicro and the ghost of Chinagate: The evolution of a multinational scam

https://thehill.com/opinion/international/5859528-supermicro-ai-servers-china-smuggling/
1•tart-lemonade•14m ago•0 comments

What Satellite Images Reveal About Iran's Attacks on U.S. Bases [video]

https://www.youtube.com/watch?v=JRnoi3repjo
2•Teever•18m ago•0 comments

Russian ship that sank may have been carrying nuclear reactors to North Korea

https://www.theguardian.com/world/2026/may/12/russian-ship-ursa-major-sank-spain-nuclear-reactors...
1•athousandsteps•19m ago•0 comments

Open Vibe – an interactive web dev course in Claude Code

https://openvibe.sh/
1•matijash•19m ago•1 comments

AI Strategy Has a Blind Spot: The Network

https://www.kentik.com/blog/your-ai-strategy-has-a-blind-spot-the-network/
1•oavioklein•19m ago•0 comments

Shame them, shun them, ban them, beat them

https://www.experimental-history.com/p/shame-them-shun-them-ban-them-beat
1•pavel_lishin•20m ago•0 comments

Check Startup Names for Availability

https://nameclaim.xyz
1•chaghighat•21m ago•0 comments

Seriously, Give Kagi a Try

https://daringfireball.net/linked/2026/05/12/seriously-give-kagi-a-try
2•frizlab•22m ago•3 comments

Intercom Becomes Fin

https://www.intercom.com/blog/today-intercom-becomes-fin/
2•tjwds•23m ago•0 comments

Meta employees protest against mouse tracking tech at US offices

https://www.reuters.com/sustainability/society-equity/meta-us-employees-organize-protest-against-...
8•delichon•26m ago•1 comments

How a 150-year-old Japanese workshop survived the age of slop and distraction

https://bigthinkmedia.substack.com/p/how-a-small-shop-in-kyoto-connects
1•Duanemclemore•26m ago•0 comments

Snitches Get 202'd

https://github.com/agudulin/simple-proxy
1•sagod•26m ago•0 comments

CS Trivia: computer science crosswords

https://cstrivia.com/
1•bluejulius•27m ago•0 comments

Show HN: Fast, reliable MCP for LinkedIn, Uber, Venmo (r/w)

https://candle.fi
1•liambl•28m ago•0 comments

Android Intrusion Logging for consensual forensic analysis

https://securitylab.amnesty.org/latest/2026/05/android-intrusion-logging-as-a-new-source-of-data-...
1•ledoge•30m ago•0 comments

Show HN: GitGlimpse – CLI for understanding AI-generated Git diffs

https://gitglimpse.com
1•dinoze•30m ago•0 comments

Swatch Internet Time

https://en.wikipedia.org/wiki/Swatch_Internet_Time
2•florianmari•30m ago•0 comments