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.

Show HN: Llamora, a private journal that remembers with you

https://welcome.llamora.app/
1•anon1253•5m ago•0 comments

Fighting YouTube Addiction

https://buttondown.com/usaa.ma/archive/fighting-youtube-addiction/
1•usamasulaiman•8m ago•0 comments

From APIs to Languages: Generalising Method Names [using regular expressions]

https://blog.acolyer.org/2015/11/09/from-apis-to-languages-generalising-method-names/
1•ogogmad•14m ago•0 comments

How do you run System One decision models locally?

https://stackness.dev/blog/how-do-you-run-system-one-decision-models-locally-ollaya-laya-mlx-and-...
2•gosen•17m ago•0 comments

DeepSeek has 64% market share

https://twitter.com/gherget/status/2104155774910083275
2•gaborme•19m ago•0 comments

Sponsored-logs-rs: Open the Rust book: monetize the tracing exhaust

https://github.com/sponsoredlogs/sponsored-logs-rs
2•thunderbong•19m ago•0 comments

Show HN: Jev-windows-agent – Windows UI Automation back end for CUA agents

https://github.com/VBS2004/jev-windows-agent
2•VBS2004•22m ago•0 comments

Being Mentioned in AI Answers Is Not the Same as Being Recommended

https://cuescout.com/blog/mentioned-is-not-recommended
3•cuescout•23m ago•0 comments

SRE Udemy Course: Software Reliability Map

https://www.udemy.com/course/reliability-map/
2•Brixdes•27m ago•0 comments

Jempo by Thomas Ha

https://www.lightspeedmagazine.com/fiction/jempo/
2•Alien1Being•29m ago•0 comments

"As a Language Model": Chat Template Switches LLM Self-Referential Voice

https://arxiv.org/abs/2609.25021
18•yu3zhou4•32m ago•1 comments

Changes in quality of life: digital exercise therapy for knee/hip osteoarthritis

https://doi.org/10.1186/s12955-026-02634-5
3•chavasorani•32m ago•0 comments

Postgres AT TIME ZONE 'UTC' does NOT do what you think it does

https://bookofrevenue.com/blog/6ab81e9a97a13f0001f7e4e1/postgres-at-time-zone-u-does-not-do-what-...
1•birdculture•39m ago•0 comments

Trying GPT-6 Sol with AI SDK Evaluation API

https://vercel.com/i/using-gpt-6-sol-with-ai-sdk-evaluation
1•flashbrew•44m ago•0 comments

Show HN: TanStack Start and TanStack AI Jev Integration

https://vercel.com/i/using-jev-in-tanstack-start-with-tanstack-ai
1•flashbrew•45m ago•0 comments

Another week, another data breach for Revolut customers

https://www.theregister.com/cyber-crime/2026/09/25/another-week-another-data-breach-for-revolut-c...
4•imalerba•46m ago•0 comments

Ask HN: What does your AI workflow look like?

1•tadziokas•47m ago•2 comments

The Importance of Human Knowledge in the AI Era

https://jonbehnken.substack.com/p/the-case-for-learning
1•greedywhale•50m ago•0 comments

Claude Isn't Allowed to Write Me Prose

https://blog.kvit.app/posts/agent-not-allowed-to-write-prose/
2•skolos•52m ago•0 comments

YouTube stores three auto-extracted frames for every video, and nobody uses them

https://github.com/InfinityLoop1308/PipePipeClient/pull/98
2•jrejaud•54m ago•0 comments

How AI Is Accelerating PCB Design and Prototyping

https://www.eetimes.com/how-ai-is-accelerating-pcb-design-and-prototyping/
1•giuliomagnifico•57m ago•0 comments

Poisoning a Go Cache

https://lukasschwab.me/blog/gen/poisoning-go-cache.html
2•ingve•1h ago•1 comments

Genius AI APı Anahtarı

1•Ayazefe•1h ago•0 comments

Makeraoke: Share your side project in a video between three and nine minutes

https://www.reddit.com/r/Makeraoke/
1•cs1996•1h ago•0 comments

Musk – Official Trailer (2026)

https://www.youtube.com/watch?v=-52sVAzXwLM
3•Betelbuddy•1h ago•0 comments

Sandbox-first AI coding harness

https://chock.ws/
1•rosscomputerguy•1h ago•0 comments

Show HN: Peekaboolean – image and jev-like typed questions in typed anwers out

https://github.com/bykof/peekaboolean
2•bykof•1h ago•0 comments

I Posed as a Problem Gambler. DraftKings Made Me a VIP

https://www.propublica.org/article/draftkings-sports-gambling-problem-vip-fanduel
8•theblazehen•1h ago•1 comments

Show HN: Afterlife Vault – a virtual dead man's switch

https://afterlife-vault.com
2•wmeter•1h ago•1 comments

Using Claude Code: Spending your effort

https://claude.dev/blog/spending-your-effort/
3•e12e•1h ago•0 comments