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.

Study to date on school phone bans

https://marginalrevolution.com/marginalrevolution/2026/05/the-best-study-to-date-on-school-phone-...
1•paulpauper•3m ago•0 comments

MCP Steroid – Give AI the whole IDE, not just the files

https://mcp-steroid.jonnyzzz.com/
1•crummy•7m ago•0 comments

The Pope Had to Call Customer Service

https://www.nytimes.com/2026/05/05/us/pope-leo-xiv-bank-customer-service.html
1•osnium123•11m ago•0 comments

Anthropic moral dev said AI overcorrection could address historical injustices

https://www.foxnews.com/politics/anthropics-moral-compass-architect-suggested-ai-overcorrection-c...
1•like_any_other•15m ago•1 comments

Defeating Works by Design's Unpickable Lock [video]

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

ParseFlow – Optimize Files for Context

https://docs.parseflow.tech/
1•bollethegoalie•18m ago•0 comments

The First Modern Car Without Hydraulic Brakes Is Headed to Production

https://www.thedrive.com/news/the-first-modern-car-without-hydraulic-brakes-is-headed-to-production
1•voisin•22m ago•1 comments

Show HN: MCP-identity – Per-request cryptographic attestation for MCP servers

https://github.com/mustafabagdatli-git/mcp-identity
1•mustafabagdatli•25m ago•0 comments

Depression Hates a Moving Target

https://twitter.com/anishmoonka/status/2051517996481364144
1•delichon•28m ago•0 comments

Leadly – AI lead generation for small businesses at $9/month

https://willowy-kulfi-0cbaff.netlify.app
1•Leadly•34m ago•0 comments

Apple to Pay $250M to Settle Class Action over Delayed Siri Features

https://www.macrumors.com/2026/05/05/apple-class-action-siri-lawsuit-settlement/
2•mgh2•34m ago•0 comments

Trustworthy JavaScript for the Open Web

https://hacks.mozilla.org/2026/05/trustworthy-javascript-for-the-open-web/
1•nnx•38m ago•0 comments

Linear's MCP server accepts HTTP:// redirect URIs for confidential OAuth clients

https://github.com/korrel-dev/mcp-audits/tree/main/audits/linear
1•issazangana•41m ago•0 comments

Canadian fiddler sues Google after AI wrongly claimed he was a sex offender

https://www.theguardian.com/music/2026/may/05/canadian-ashley-macisaac-fiddler-musician-singer-so...
1•Teever•41m ago•0 comments

Bevy and egui desktop app in production

https://nominal.io/blog/nominal-connect-shipping-realtime-desktop-software-with-rust-bevy-and-egui
1•phsilva•42m ago•0 comments

Sample App – On-Device AI Assistant for Android

https://github.com/ajay-sainy/GemOfGemma
1•qarue•44m ago•0 comments

Skelm – Build AI agents in TypeScript without losing your mind

https://github.com/scottgl9/skelm
1•scottgl•44m ago•0 comments

Lessons on Building MCP Servers

https://taoofmac.com/space/blog/2026/04/29/2341
1•gmays•45m ago•0 comments

StarFighter 16-Inch

https://us.starlabs.systems/pages/starfighter
22•signa11•45m ago•7 comments

Security Engineering Is a Context Problem

https://aseemshrey.in/blog/security-engineering-is-a-context-problem/
2•LuD1161•47m ago•0 comments

Show HN: Library to make your own Windows program launcher (like dmenu)

https://github.com/cristeigabriela/wintheon
1•gabriela_c•51m ago•0 comments

Google is building an AI agent that could be its answer to OpenClaw

https://www.businessinsider.com/google-ai-agent-openclaw-remy-gemini-assistant-2026-5
2•droidjj•53m ago•0 comments

FFmpeg developer calls out OxideAV for AI license laundering of his code

https://github.com/OxideAV/oxideav-magicyuv/issues/3
3•dmitrygr•58m ago•1 comments

Telus using AI to alter the accents of customer service agents

https://www.theglobeandmail.com/business/article-telus-ai-accents-customer-service-agents/
2•gnabgib•59m ago•0 comments

R2-D2 Monitor – TUI for Windows Administrators

https://github.com/Victxrlarixs/r2d2-monitor
3•unixero•1h ago•0 comments

HN: GapMap – A quantitative index of knowledge gaps between Wikipedias

https://www.gapmap.wiki/
2•mucho_mango•1h ago•0 comments

OpenAI delivers low-latency voice AI at scale

https://www.google.com/
3•midoxbe•1h ago•1 comments

Show HN: How I Separate Signal from Noise in the AI Firehose

https://laxmena.com/how-i-separate-signal-from-noise-in-the-ai-firehose
3•laxmena•1h ago•0 comments

Simpler JVM Project Setup with Mill

https://mill-build.org/blog/17-simpler-jvm-mill-110.html
2•lihaoyi•1h ago•0 comments

Telus Uses AI to Alter Call-Agent Accents

https://letsdatascience.com/news/telus-uses-ai-to-alter-call-agent-accents-a3868f63
15•debo_•1h ago•4 comments