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.

VerusCite's false positive rate is under 1%

https://veruscite.com/blog/veruscite-false-positive-rate
1•apwheele•32s ago•0 comments

JetBrains Thinkrail

https://github.com/JetBrains/thinkrail
1•hmokiguess•1m ago•0 comments

Systemd merges support for programs written in Rust

https://github.com/systemd/systemd/pull/44324
1•acossta•1m ago•0 comments

Dreamhost: Investigating an incident affecting File Manager and Webmail

https://www.dreamhoststatus.com/pages/incident/575f0f606826303142000510/6adbcf944b61a805acedb4cd
1•8ig8•2m ago•0 comments

End of an era? How the Hermes Birkin bag is losing its scarcity appeal

https://www.reuters.com/business/retail-consumer/end-an-era-how-hermes-birkin-bag-is-losing-its-s...
1•cwwc•2m ago•0 comments

Scam Alert: Fake Captcha Prompts Users to Run Commands

https://www.umass.edu/it/news/scam-alert-fake-captcha-prompts-users-run-commands
1•thunderbong•2m ago•0 comments

Is Anybody Out There? Art in the Post-AI Era

https://programmingattack.com/articles/is-anybody-out-there-art-in-the-post-ai-era/
1•caranea•3m ago•0 comments

How I Work with Agents

https://twitter.com/thorstenball/status/2114386050638336082
1•tosh•3m ago•0 comments

Ford Patents Idea That Lets Parked Cars Autonomously Flee Danger

https://www.caranddriver.com/news/a74232385/ford-autonomous-anti-theft-patent-application/
1•RickJWagner•4m ago•0 comments

Everything you should know about certificates and PKI but are too afraid to ask

https://smallstep.com/blog/everything-pki/
1•rramadass•5m ago•0 comments

Bentley's Kyiv deadlership among the strongest, despite the war

https://www.autonext.co/news/bentley-kyiv-among-the-world-s-best-dealerships-despite-the-war
2•nephihaha•5m ago•0 comments

Low Birthrates in England Could Lead to 'Closure of 800 Primary Schools by 2029'

https://www.theguardian.com/education/2025/sep/25/low-birthrates-in-england-could-lead-to-closure...
1•karakoram•6m ago•0 comments

Anthropic Sued for Stealing Elvis Presley Music to Train AI

https://www.billboard.com/pro/elvis-presley-estate-sues-suno-anthropic/
1•01-_-•6m ago•0 comments

Bbtree: Fastest Concurrent Ordered Map

https://github.com/XiangpengHao/bbtree
1•vpj•8m ago•0 comments

Far, Far Away – Making a home on the most remote inhabited island

https://www.nytimes.com/2026/10/25/world/africa/tristan-da-cunha-island.html
2•anyonecancode•8m ago•1 comments

Product Backlog Refinement Agent – Useful or Risk?

https://age-of-product.com/product-backlog-refinement-agent/
1•swolpers•10m ago•0 comments

Vibe Coding for Free: What $0 Gets You in 2026

https://codingplans.dev/briefs/vibe-coding-for-free/
1•nedsma•12m ago•0 comments

Neuron Explorer for Qwen 4B

https://github.com/lyramakesmusic/neuron-explorer
1•vpj•15m ago•0 comments

What the Specification Did Not Say: Gaps in Test-Graded Coding-Agent Benchmarks

https://arxiv.org/abs/2610.30635
1•mehdizare•18m ago•0 comments

Show HN: QualityLayer, put the engineer back in the loop of your coding agent

https://qualitylayer.dev/
1•rittermax•19m ago•0 comments

A hacky f*d up way to portably access errno from outside of C

https://sebsite.pw/w/20260925-errno.html
1•dverlaeckt80•20m ago•0 comments

Multiplayer System in C Supports 50k Players at 60Hz on a Single Server

https://www.youtube.com/watch?v=imG2Tt_KOj4
1•birdculture•20m ago•0 comments

US Households Pay 62% More for Water Than They Did a Decade Ago, Study Finds

https://www.theguardian.com/us-news/2026/oct/06/households-drinking-water-cost-study
2•karakoram•20m ago•0 comments

Show HN: I replaced tmux with sway workspaces

https://github.com/artemave/hop
1•artemave•21m ago•1 comments

The Hibernate Origin Story (Outsider Edition)

https://fishbowl.pastiche.org/2026/10/23/hibernate-origin-story
1•dverlaeckt80•21m ago•0 comments

Rewriting Excel, PowerPoint, and Word for Agents

https://getcompound.ai/blog/rewriting-excel-powerpoint-and-word-for-agents
2•peterjliu•22m ago•0 comments

The 'else' keyword is probably a literal translation from German (2020)

https://github.com/e-n-f/if-then-else/blob/master/if-then-else.md
1•theanonymousone•22m ago•0 comments

Show HN: Music as a TypeScript program

https://twitter.com/dotproductX/status/2114386390595068154
1•mxudev•23m ago•0 comments

Flock Fever: A Review of Government Surveillance by Benn Jordan [video]

https://www.youtube.com/watch?v=OP5GDiLZ1Nw
1•input_sh•25m ago•0 comments

Generating balanced cubes for Magic: The Gathering

https://nishtahir.com/generating-balanced-cubes-for-magic-the-gathering/
1•CarefreeCrayon•27m ago•0 comments