frontpage.
newsnewestaskshowjobs

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.

Orionx Shutdown Raises Fresh Questions on Trust, Custody and Crypto Risk

https://predx-article.fika.bar/orionx-shutdown-raises-fresh-questions-about-trust-custody-01M1ZAE...
1•joeymabia1•1m ago•0 comments

Codex silently begs agents to make arbitrary web requests

https://spader.zone/wtf/
1•dboon•2m ago•0 comments

Cerebras's Laser Focus on Latency and Throughput

https://www.whatrunsai.com/research/cerebras
1•hmichaelson24•3m ago•1 comments

Wrangling blockchain RPC nodes, for dummies: Introducing Lasso

https://lasso.sh/
1•jaxernst•3m ago•1 comments

I Resigned from Anthropic Today

https://xcancel.com/hilbertspaess/status/2097476196791709843#m
2•yurivish•3m ago•0 comments

Source code for small iOS app to show real-time charge rate, thermals, etc.

https://github.com/gregsramblings/ios-charging-monitor
1•gw5815•4m ago•1 comments

Bessent Dares Traders to Bet Against Yen: 'I Am the House Now'

https://www.bloomberg.com/news/articles/2026-09-08/bessent-dares-traders-to-bet-against-yen-i-am-...
1•petethomas•7m ago•0 comments

Ask HN: Would you hire a new engineer, or get 300k worth of tokens for the team?

2•websap•8m ago•0 comments

A Harvard PhD Is Designing Schizophrenia Drugs in His Garage with ChatGPT and A

1•wslh•8m ago•0 comments

Show HN: Browser-based Nginx config generator with live preview

https://tools.techtransit.org/nginx-generator
2•techgpt•21m ago•0 comments

MCP for Official Wildfire Incidents

https://docs.deepfire.co/ai/connect-to-ai
2•louiscb•24m ago•0 comments

The universal language of space is Star Trek? Mais oui

https://arstechnica.com/space/2026/09/astronaut-on-iss-celebrates-60-years-of-star-trek-with-prop...
2•rbanffy•24m ago•0 comments

The Growing Push to Ban Superintelligent AI

https://time.com/article/2026/09/08/ban-superintelligence-ai-uk-us-lawmakers/
3•lf88•25m ago•1 comments

What I learned gathering nootropic ratings

https://web.archive.org/web/20260313002349/https://troof.blog/posts/nootropics/#most-famous-nootr...
1•bilsbie•25m ago•0 comments

Where Understanding Stops Scaling

https://medium.com/@gurvinder372/article-12-where-understanding-stops-scaling-59cf85b17875
1•gps372•29m ago•0 comments

ChatGPT Voice has been brutally nerfed

https://www.reddit.com/r/ChatGPT/s/J2nPKbPeQq
1•wslh•31m ago•0 comments

Bullshit arguments about AI (not) replacing jobs (2023)

https://imadrahmoune.com/bullshit-ai-argument/
2•imadr•33m ago•1 comments

Show HN: VolAnti – Open-source acoustic detector for fibre-optic FPV drones

https://github.com/agamrossen/VolAnti
3•agamrossen•35m ago•0 comments

The paradox at the heart of AI and science [video]

https://www.youtube.com/watch?v=svl_1upFpQo
1•jonbaer•36m ago•0 comments

iTerm2 v3.7.0 new iOS companion app, it2* utilities, Session Status API and more

https://iterm2.com/downloads.html
2•guessmyname•36m ago•0 comments

AI Has Solved One of Math's $1M Millennium Prize Problems

https://www.quantamagazine.org/ai-has-solved-one-of-maths-1-million-millennium-prize-problems-202...
2•sbulaev•37m ago•0 comments

Service Connectivity Issues in Canberra – Cloudflare Status

https://www.cloudflarestatus.com/incidents/htwds1qczkzd
2•kyisaiah47•42m ago•0 comments

Y-Chromosomal Adam

https://en.wikipedia.org/wiki/Y-chromosomal_Adam
1•mtdewcmu•43m ago•0 comments

Sloc Cloc and Code – Did I Just Get Buster Scrugged?

https://boyter.org/posts/did-i-just-get-buster-scrugged/
1•boyter•44m ago•0 comments

Do Durable Market Power Characteristics Predict Future Fundamentals and Returns? [pdf]

https://mplymoat.com/research/durable-market-power-stock-returns/paper.pdf
1•Heshamus•44m ago•0 comments

Chrome 153 ships camera and microphone HTML elements

https://webiterate.dev/capability-elements-camera-126/
2•twapi•48m ago•0 comments

Show HN: AI Stack Selector Tool

https://augmentorlabs.com/manifest
1•rohit0x04•51m ago•0 comments

Gradient.dog

https://gradient.dog
1•jobsstevesux•53m ago•0 comments

Pisa Scores by Country 2026

https://worldpopulationreview.com/country-rankings/pisa-scores-by-country
2•wslh•54m ago•0 comments

Cake Wallet has a wallet-draining bug

https://github.com/cake-tech/cake_wallet/issues/3606
3•lostxmr•57m ago•1 comments