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

Comments

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

Know where your AI budget is going

https://www.flowstate.inc/
1•ahmadassaf•1m ago•0 comments

OpenChamber – Desktop and web interface for OpenCode AI agent

https://github.com/openchamber/openchamber
1•indigodaddy•1m ago•0 comments

One API for every AI model. Lower costs on autopilot

https://www.deepmyst.com/
1•ahmadassaf•1m ago•0 comments

Show HN: A Postgres Extension to Write PostgreSQL Functions in TypeScript

https://github.com/isaacd9/pg_typescript
1•idd2•2m ago•0 comments

Considering MMAP() verus plain reads for my recent code

https://utcc.utoronto.ca/~cks/space/blog/unix/MmapVsPlainReadThoughts
1•ingve•4m ago•0 comments

MacBook Neo, the Benchmarks

https://birchtree.me/blog/macbook-neo-the-benchmarks/
1•ingve•5m ago•0 comments

What Will It Take to Build the World's Largest Data Center?

https://spectrum.ieee.org/5gw-data-center
1•pseudolus•9m ago•0 comments

Unorthodox Financial Advice

https://liamrosen.com/unorthodox-financial-advice/
1•paulpauper•10m ago•0 comments

ERC-8004 Launch Day was 11 days ago. We shipped a live implementation

https://openpub.ai/blog/erc-8004-launch-day
1•doughardman•11m ago•0 comments

Judge blocks Pentagon effort to 'punish' Anthropic with supply chain risk label

https://www.cnn.com/2026/03/26/business/anthropic-pentagon-injunction-supply-chain-risk
4•prawn•16m ago•0 comments

Trump Says He'll Sign Order to Pay TSA

https://gizmodo.com/trump-says-hell-sign-order-to-pay-tsa-2000738813
1•pseudolus•20m ago•0 comments

The Complete Guide to Deploying Rails 8 with Kamal on Hetzner

https://mooktakim.com/blog/deploying-rails-with-kamal/
1•mooktakim•20m ago•0 comments

I built a tiny CLI that writes my commit messages from Git diff

https://github.com/saccofrancesco/gitsloth
1•s4ccofr4ncesco•22m ago•0 comments

Speaking of Voxtral

https://mistral.ai/news/voxtral-tts
1•claudiug•22m ago•0 comments

Show HN: Drift – Linter for Documentation Rot

https://fiberplane.com/blog/drift-documentation-linter/
1•keturakis•26m ago•0 comments

Every Venue and Every Concert in San Diego 2026

https://www.sdconcerts.app
2•goldkey•27m ago•0 comments

A cross-shell framework for managing aliases, plugins, completions, and themes

https://github.com/g-udi/gaudi-shell
1•ahmadassaf•29m ago•1 comments

Chicago artist creates tourism posters for city's neighborhoods

https://www.chicagotribune.com/2026/03/25/chicago-neighborhood-posters/
4•NaOH•31m ago•1 comments

DataSwift – A client-side toolkit for mock data, JSON parsing, and CSV to SQL

https://data-swift-kappa.vercel.app
1•dearmmv•32m ago•0 comments

AI will test governments on jobs, training, and public trust, Hoover panels warn

https://www.hoover.org/news/ai-will-test-governments-jobs-training-and-public-trust-hoover-panels...
1•hhs•36m ago•0 comments

The Hard Problem of Consciousness: Triveritas and the Third Impossibility

https://zenodo.org/records/18930279
1•amelius•37m ago•0 comments

Apple Discontinues Mac Pro

4•alifeinbinary•38m ago•3 comments

Order Granting Preliminary Injunction – Anthropic vs. U.S. Department of War [pdf]

https://storage.courtlistener.com/recap/gov.uscourts.cand.465515/gov.uscourts.cand.465515.134.0.pdf
14•theindieman•38m ago•2 comments

Drift – a terminal screensaver that activates when you're idle

https://github.com/phlx0/drift
1•phlx0•41m ago•0 comments

A 100% serverless RAG that extracts complex tables better than NotebookLM

1•saurav-dev•41m ago•0 comments

Why a company is investigating rapes at an ICE detention center, not the sheriff

https://apnews.com/article/otay-mesa-immigration-center-rape-investigations-f14e4687075f84ddb52d4...
4•petethomas•42m ago•0 comments

Islamic Astronomy and Copernicus [pdf]

https://www.tuba.gov.tr/files/yayinlar/bilim-ve-dusun/TUBA-978-625-8352-02-3.pdf
1•teleforce•43m ago•0 comments

Uber and Lyft users overpay when they don’t price check: study

https://hub.jhu.edu/2026/01/02/uber-lyft-study-carey-business-school/
1•hhs•45m ago•0 comments

RunKoda – Real-time collaborative IDE where AI agents don't conflict

https://runkoda.com
1•SNAFI•45m ago•0 comments

New York's Cannabis Business

https://www.bbc.com/worklife/article/20260325-is-new-yorks-weed-business-really-flying-high
1•1659447091•46m ago•0 comments