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.

Amazon announced it's shuttering Mechanical Turk on Sept. 30

https://www.cnbc.com/2026/08/25/amazon-service-that-jeff-bezos-called-artificial-ai-is-shutting-d...
1•pgrote•1m ago•0 comments

Self-Hosting Email: Achieving Proton's Zero-Access with Stalwart and WKD

https://remoterails.com/stalwart-mail-vs-protonmail-a-technical-deep-dive-into-modern-email-secur...
1•bluequills•5m ago•0 comments

Tom Robbins' Remington SL3 Typewriter from "Still Life with Woodpecker"

https://typecast.munk.org/2015/08/01/tom-robbins-remington-sl3-typewriter-from-still-life-with-wo...
1•pcfwik•6m ago•0 comments

Ask HN: Interesting Tech Adjacent Jobs?

2•njandh•11m ago•0 comments

Europe Built a Single Market–Now It's Packaging It Away

https://fee.org/articles/europe-built-a-single-market-now-its-packaging-it-away/
1•WaitWaitWha•15m ago•0 comments

Native Java with GraalVM and Virtual Threads on Kubernetes

https://piotrminkowski.com/2023/01/04/native-java-with-graalvm-and-virtual-threads-on-kubernetes/
1•ejboy•15m ago•0 comments

US halts all immigrant visa applications amid tightening restrictions

https://www.theguardian.com/us-news/2026/aug/25/us-immigrant-visa-application-trump-crackdwon
3•andsoitis•17m ago•2 comments

Joint Optimization of Tool Creation and Use for Large Language Model Agents

https://tool-use-smith.github.io/
1•blackcat201•22m ago•0 comments

Training LLMs to write tools generalized beyond self use

https://arxiv.org/abs/2608.24571
2•blackcat201•22m ago•0 comments

Free Startup Dataroom Template

https://github.com/emal-avala/data-room
2•emal•22m ago•1 comments

Ora benchmarks every major AI agent on Vercel – Customers

https://vercel.com/customers/how-ora-benchmarks-every-major-ai-agent-on-vercel
1•kyisaiah47•22m ago•0 comments

NoRecognition: Could a pattern on clothing fool Facial Recognition?

https://www.youtube.com/watch?v=WyPmt8CE5L4
1•ipkstef•24m ago•1 comments

SBA proposes rewrite of small business size standards

https://www.washingtontechnology.com/contracts/2026/08/sba-proposes-sweeping-rewrite-small-busine...
1•WaitWaitWha•24m ago•0 comments

No, your car does not drive itself

https://blog.oxplot.com/no-your-car-does-not-drive-itself/
1•oxplot•24m ago•0 comments

Ask HN: What

1•njandh•24m ago•0 comments

KeyKosh (K2): Self-hosted config and secret manager

https://keykosh.com/
1•prasols•25m ago•0 comments

Good if make prior after data instead of before

https://dynomight.net/prior/
1•Curiositry•29m ago•0 comments

Tavern – Web app for tabletop campaigns

https://gettavern.app/
1•jakehandy•30m ago•0 comments

Tooey: Figma for Terminal UI Design

https://tooey.design/
1•handfuloflight•31m ago•0 comments

Engineers laid off at Apple headquarters

https://www.sfgate.com/tech/article/apple-engineers-layoff-22403206.php
4•chanux•32m ago•1 comments

MekaPay – Payment Solution (Contact +254748651734)

https://mekapayglobal.com/
1•paymentsolution•32m ago•0 comments

NeoNexus

https://neonex.live/
1•itzdawheezingno•34m ago•1 comments

Hot Chips 2026: Fujitsu's Monaka CPU

https://chipsandcheese.com/p/hot-chips-2026-fujitsus-monaka-cpu
1•ryandotsmith•34m ago•0 comments

Guillotine found near US Capitol, California man arrested

https://apnews.com/article/guillotine-capitol-police-california-arrest-cf3c9f181382bfc3fb9c5c47f4...
2•CircuitSeuss•41m ago•2 comments

Global snakebite envenoming and mortality are higher than previously reported

https://medicalxpress.com/news/2026-08-global-snakebite-envenoming-mortality-incidence.html
1•croes•42m ago•0 comments

Threejs Browser World of Tanks

https://cot.kevinliu.studio/
2•kl01•44m ago•0 comments

Nintendo fan loses nearly complete NES collection in 'heartbreaking' theft

https://www.polygon.com/nintendo-game-collection-stolen-from-washington-home/
1•croes•47m ago•0 comments

Cookie started its life as a plastic bottle

https://www.acs.org/pressroom/presspacs/2026/august/this-cookie-started-its-life-as-a-plastic-bot...
1•red369•49m ago•0 comments

What the Vancouver Stock Exchange Can Teach Us About Rounding Numbers in VBA

https://nolongerset.com/vse-rounding-in-vba/
1•kristianp•53m ago•0 comments

Latent space exploration and sperm whale language

https://royalsocietypublishing.org/rsos/article/13/8/250829/483032/Approaching-an-unknown-communi...
1•HR01•1h ago•0 comments