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.

Clickup mocks employees over AI 8 days before layoff

https://twitter.com/RhysSullivan/status/2057731867361902967
1•tnolet•1m ago•0 comments

Unplug technofascism – Belgian activists are planning to occupy a datacenter

https://code-rouge.be/en/about-us/cr4-narrative/
1•pietervdvn•3m ago•1 comments

New York State passes bill requiring disclosure of food additives

https://foodpackagingforum.org/news/new-york-state-passes-bill-requiring-disclosure-of-food-addit...
1•geox•3m ago•0 comments

Free MongoDB GUI Tool to Browse Data, Run Queries, and Create Indexes

https://visualeaf.com/blog/free-mongodb-gui-tool/
1•roxana_haidiner•3m ago•0 comments

The case against boolean logic

https://abuseofnotation.github.io/boolean-thinking/
2•boris_m•4m ago•0 comments

Nyx Wave: an AI agent that extracted expert knowledge via email

https://splabs.io/nyx-wave-knowledge-extraction
1•k-thimmaraju•6m ago•0 comments

Most EVM monitoring breaks after the first swap

https://blog.bridgexapi.io/most-evm-monitoring-breaks-after-the-first-swap
1•Bridgexapi•7m ago•0 comments

Ban for Authors Submitting AI Content 'Welcome but Unenforceable'

https://www.insidehighered.com/news/faculty/books-publishing/2026/05/22/ban-authors-who-submit-ai...
1•50kIters•7m ago•0 comments

A Comma and a Question Mark

https://www.thetypicalset.com/blog/a-comma-and-a-question-mark
1•eigenBasis•10m ago•0 comments

Antigravity 2.0 Tops the OpenSCAD Architectural 3D LLM Benchmark

https://modelrift.com/blog/openscad-llm-benchmark/
1•jetter•11m ago•0 comments

Thermo-Nuclear Code Quality Review (Cursor Team Kit skill)

https://github.com/cursor/plugins/blob/3347cbab5b54136f6fba0994c3a01a56f7fb7fca/cursor-team-kit/s...
1•pramodbiligiri•13m ago•0 comments

What Google, Yahoo, Microsoft, and Apple are doing to your email

https://www.jacquescorbytuech.com/writing/what-google-yahoo-microsoft-and-apple-are-doing-your-email
2•iamacyborg•14m ago•0 comments

Camp: Static Site Generation for Racket

https://joeldueck.com/what-about/camp/
2•amai•18m ago•0 comments

Free Proxy List 2026

https://momoproxy.com/free-proxy-list
1•xbjamilnz•19m ago•0 comments

Show HN: I made an open-source memory layer for agents

https://agentrecall.cloud
2•MarsB•19m ago•0 comments

Megalodon: Mass GitHub Repo Backdooring via CI Workflows

https://safedep.io/megalodon-mass-github-repo-backdooring-ci-workflows/
2•LaSombra•21m ago•0 comments

Custom Domains for Your SaaS with Caddy On-Demand TLS and Asp.net Core

https://dotnethow.net/articles/custom-domains-with-caddy-on-demand-tls/
1•ervistrupja•21m ago•0 comments

Show HN: HR – a 30-line script that prints a colored bar across your terminal

https://github.com/ankurokok/hr
1•discordance•22m ago•0 comments

Hollywood in the 60s and the Good AI Future

https://opcraft.co/writing/2026/04/getting-the-good-ai-future/
1•amai•22m ago•0 comments

Centralisation, Reversibility, and Restarting

https://mpadge.eu/blog/centralisation-reversibility.html
1•mpadge•24m ago•0 comments

Linkano – Link objects on your Mac

https://www.mjanssen.nl/linkano/index.html
1•marc0janssen•24m ago•0 comments

Proton Pass for AI Agents

https://proton.me/blog/pass-access-tokens
1•h4kunamata•29m ago•1 comments

Live 204-node MoE visualization reveals emergent cognitive stratification

https://github.com/eriirfos-eng/ternary-intelligence-stack
1•rfi-irfos•29m ago•0 comments

Storing sunlight in DNA-inspired molecules, released later as heat

https://www.science.org/doi/10.1126/science.aec6413
2•sailingcode•30m ago•2 comments

Webmcp

https://webmcp.dev/
1•saikatsg•33m ago•0 comments

I put Claude Code in a browser terminal I built in Go

https://anupshinde.medium.com/i-put-claude-code-in-a-browser-terminal-i-built-in-go-a95206681085
1•anupshinde•34m ago•0 comments

Baby Magic – AI baby images, videos, and family memories

https://www.babymagic.app
1•Follow_Cloud•35m ago•0 comments

Cruise ships are sailing to a phantom destination that doesn't appear on any map

https://www.cnn.com/travel/visiting-null-island-cruises
1•cpeterso•35m ago•0 comments

How security teams can report cyber risk to boards

https://www.databricks.com/blog/how-security-teams-can-report-cyber-risk-boards
1•mc-serious•36m ago•0 comments

English Heritage unveils recreation of 4,500-year-old Neolithic hall

https://www.theguardian.com/uk-news/2026/may/22/english-heritage-neolithic-kusuma-hall-stonehenge
2•ljf•38m ago•1 comments