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•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.

HD189733B: A hot Jupiter that rains molten glass

https://en.wikipedia.org/wiki/HD_189733_b
1•us-merul•56s ago•0 comments

Ccstory – CLI tool to track time spent on Claude Code

https://github.com/atomchung/ccstory
1•atomtw•2m ago•0 comments

Containers Are a Security Boundary (some assembly required)

https://ram.tianon.xyz/post/2026/05/20/container-security.html
1•ImJasonH•6m ago•0 comments

TBN Protocol – Runtime governance infrastructure for AI agents

https://tbn.hardinai.co.uk/demo
1•Hardinai•9m ago•0 comments

Show HN: CipherStash Stack – Data Level Access Control in TS/JS

https://cipherstash.com/blog/introducing-cipherstash-stack
2•dandraper•10m ago•0 comments

How to Start a Website with Web Host Pro

https://www.slideshare.net/slideshow/comprehensive-2026-guide-to-starting-a-website-with-web-host...
1•cya11•18m ago•0 comments

The Largest Vocabulary in Hip Hop (2019)

https://pudding.cool/projects/vocabulary/index.html
1•amichae2•19m ago•0 comments

Show HN: E2E Encrypted Terminal Screen Share

https://github.com/jsell-rh/lockwire
1•blinkerfluid•22m ago•0 comments

Decompile binaries to Rust, not C

https://twitter.com/mahal0z/status/2057147401987637300
1•mahaloz•25m ago•0 comments

Researchers in Ireland uncover medieval book in Rome with oldest English poem

https://apnews.com/article/old-english-manuscript-poetry-bede-caedmon-hymn-latin-italy-106769c014...
2•gmays•28m ago•0 comments

Why Multigres has its own connection pooler

https://multigres.com/blog/two-jobs-two-processes
1•gregorvand•28m ago•0 comments

What is Demand Coop and why tech workers should join one

https://cahootzcoops.com/blog/what-is-a-demand-coop
1•DeonRob•32m ago•0 comments

Nx Console VS Code extension was the initial access vector in the GitHub breach

https://twitter.com/jeffbcross/status/2057236396658811020
2•vldszn•33m ago•1 comments

What I'd audit on an AI-built SaaS before its first paying customer

https://knbrlo.com/blog/audit-ai-built-saas/
1•knbrlo•34m ago•1 comments

Show HN: Windows 98½

https://win9-5.com/desktop.html
1•keepamovin•34m ago•0 comments

81yo Grandma Streaming Minecraft to Pay for Grandson's Cancer Swatted

https://www.thegamer.com/grammacrackers-81-year-old-minecraft-youtuber-swatted/
2•kirubakaran•36m ago•1 comments

New dinosaur species Nagatitan chaiyaphumensis

https://www.smithsonianmag.com/smart-news/a-man-spotted-strange-looking-rocks-near-a-pond-in-thai...
1•firasd•37m ago•0 comments

Compromised Nx Console

https://github.com/nrwl/nx-console/security/advisories/GHSA-c9j4-9m59-847w
2•0xedb•38m ago•0 comments

Built for Productivity: What the Data Shows About Kotlin

https://blog.jetbrains.com/kotlin/2026/05/built-for-productivity-what-the-data-shows-about-kotlin/
1•lemonlime227•39m ago•0 comments

Our billing pipeline was suddenly slow

https://blog.cloudflare.com/clickhouse-query-plan-contention/
1•ChicknNuggt•39m ago•0 comments

The AI Client in WordPress 7.0

https://make.wordpress.org/core/2026/03/24/introducing-the-ai-client-in-wordpress-7-0/
1•qainsights•41m ago•1 comments

Show HN: SafeRun – Replay debugging and inline prevention for AI agents 2

3•Tidianez•54m ago•1 comments

Small note on solving x^(n/m) = a

https://12000.org/my_notes/solving_equation/index.htm
1•oliverkwebb•54m ago•0 comments

Stop paying $360/year to access your own email history

https://mailvaulty.com
1•khaledsabae•57m ago•0 comments

Show HN: My custom Statusline for Claude Code (Python wrapper around claudeline)

https://gist.github.com/Reebz/741c5647c860fe0b5214f39d9d887240
1•Reebz•1h ago•0 comments

San José State leaped to No. 2 in national computer science ranking

https://edsource.org/2026/san-jose-state-coding-skills-ranking/758707
2•littlexsparkee•1h ago•0 comments

Ask HN: How to make the best of the Mega IPO/ Index fund debacle?

3•jppope•1h ago•3 comments

Professional Scripted product demos with GSAP with Claude

https://spanthi.com/blog/gsap-choreography/
1•vein05•1h ago•0 comments

Experimenting with graph-based semantic memory for AI agents

https://github.com/AEndrix03/Graft
3•AEndrix03•1h ago•0 comments

Intuit to lay off over 3k employees to refocus on AI

https://techcrunch.com/2026/05/20/intuit-to-lay-off-over-3000-employees-to-refocus-on-ai/
27•wapasta•1h ago•6 comments