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•8mo ago

Comments

zoezoezoezoe•8mo 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•8mo 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.

Google's Boomerang Year: 20% of 2025 AI Engineers Were Former Employees

https://www.cnbc.com/2025/12/19/google-boomerang-year-20percent-ai-software-devs-hired-2025-ex-em...
1•birdculture•2m ago•0 comments

A Plug and Play all Purpose Robotic OS

https://axiomrobotics.netlify.app/
1•Akshaiy•2m ago•1 comments

A Tool Born from Prompt Frustration

https://chromewebstore.google.com/detail/best-nano-banana-prompt/phmmhcemapcpjjcggghiobjmncdipmdp
1•AI_kid1412•3m ago•0 comments

Show HN: Shittp – Volatile Dotfiles over SSH

https://github.com/FOBshippingpoint/shittp
1•sdovan1•5m ago•1 comments

Ask HN: How to handle this prompt allowing AI to self reflect on human risks

1•liefde•8m ago•0 comments

I Wouldn't Want John Solomon's New CMO Job at Mozilla

https://fossforce.com/2025/12/why-i-wouldnt-want-john-solomons-new-cmo-job-at-mozilla/
1•speckx•9m ago•0 comments

14 years ago: the day Teller gave me the secret to my career in magic. (2009)

http://shwood.squarespace.com/news/2009/9/21/14-years-ago-the-day-teller-gave-me-the-secret-to-my...
1•Tomte•9m ago•0 comments

Things Software Developers Should Learn about Learning (2024)

https://cacm.acm.org/research/10-things-software-developers-should-learn-about-learning/
1•Tomte•10m ago•0 comments

Show HN: Zero Trust API – Image CDR in Rust/WASM (Rebuild Images from Pixels)

https://zero-trust-web.vercel.app/
1•Raviteja_•14m ago•0 comments

Affordability, Part IV

https://paulkrugman.substack.com/p/affordability-part-iv
1•rbanffy•14m ago•0 comments

Efficacy and safety of transcranial AC stimulation in adults with ADHD [pdf]

https://www.nature.com/articles/s41380-025-03407-0
1•thunderbong•14m ago•0 comments

Show HN: Modern Trello Website

https://tasklanes.app
1•fcuk112•17m ago•0 comments

iPhone/iPad/Android Notifications for ClaudeCode

https://github.com/teito-dev/claudecode-pushover-integration
1•teitoklien•19m ago•1 comments

Elon Musk becomes first person worth $700B following pay package ruling

https://www.reuters.com/business/autos-transportation/elon-musk-becomes-first-person-worth-700-bi...
1•ksec•21m ago•0 comments

Show HN: The Official National Train Map Sucked, So I Made My Own

https://www.bdzmap.com/
3•Pavlinbg•22m ago•1 comments

Concurrent JavaScript: It can work

https://webkit.org/blog/7846/concurrent-javascript-it-can-work/
2•samwillis•24m ago•0 comments

Show HN: A practical database of AI SEO strategies for founders and marketers

https://www.aiseodatabase.com/
1•mohitvaswani•24m ago•0 comments

Show HN: Free tool to blur images instantly without signup or watermarks

https://www.blurimageonline.com/
2•teroquyiqwu•26m ago•0 comments

Against Likes and Subscribers

https://metanomad.blog/against-likes-and-subscribers/
2•speckx•28m ago•0 comments

Inception X TicTacToe: a fractal game

https://tic-tac-toe-inception-49280791970.us-west1.run.app/
1•apitaru•30m ago•1 comments

An 11-qubit atom processor in silicon with all fidelities from 99.10% to 99.99%

https://www.nature.com/articles/s41586-025-09827-w
1•giuliomagnifico•30m ago•1 comments

Eye Sentry: 5-Day Built macOS Eye Care Tool

https://eye-sentry.vercel.app
1•lispking•32m ago•1 comments

Language Switcher Guide: Java, JavaScript, Python, Go Comparison for B

https://blog.blockingqueue.com/language-switcher-cheatsheet-java-javascript-python-go
1•liviu31•32m ago•0 comments

Research Reveals the Optimal Way to Optimize

https://www.wired.com/story/researchers-discover-the-optimal-way-to-optimize/
2•quapster•33m ago•0 comments

NY Gov. vetoes bill to mandate 2-person subway train crews

https://gothamist.com/news/ny-gov-hochul-vetoes-bill-to-mandate-2-person-subway-train-crews
1•geox•34m ago•0 comments

A Homebuilt CO2 Meter as a Virus Risk Proxy (Shallow Thoughts)

https://shallowsky.com/blog/hardware/co2-meter.html
1•speckx•40m ago•0 comments

Stop Saying "Agent" – Name the Work, Own the Output

https://btriani.medium.com/stop-saying-agent-name-the-work-own-the-output-a9a2902a5314
1•btriani•40m ago•1 comments

Mnemonics for Hidden Controls in Win32

https://www.abareplace.com/blog/hidden_mnemonics/
2•todsacerdoti•44m ago•0 comments

Loud Rabbit (Music Video / Lyrics)

https://www.tolmix.com/loud-rabbit
1•n-fuselius•44m ago•1 comments

Show HN: Lockify – developer-friendly CLI for managing encrypted env variables

https://github.com/ahmed-abdelgawad92/lockify
2•ahmedabdelgawad•45m ago•0 comments