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.

Can AI Effectively Approve Production Infra Changes?

https://newsletter.masterpoint.io/p/can-ai-effectively-approve-production-infra-changes
1•mooreds•22s ago•0 comments

A memory layer of your day (meetings, notes and docs)

https://pitara.ai/login?next=%252F
1•chayanvinayak•34s ago•0 comments

Snyk Finds Prompt Injection in 36% of Payloads in a ToxicSkills Study

https://snyk.io/blog/toxicskills-malicious-ai-agent-skills-clawhub/
1•mooreds•44s ago•0 comments

Outl syncs notes peer-to-peer, end-to-end encrypted, with no server

https://outl.app/blog/private-by-default.html
1•avelino•2m ago•0 comments

Finland's unemployment rate rises to highest level this century

https://yle.fi/a/74-20233070
1•littlexsparkee•3m ago•0 comments

Tracing a silent-corruption bug in differentially private LoRA fine-tuning

https://imranahamed.substack.com/p/the-dp-lora-silent-corruption-how
1•immu4989•4m ago•0 comments

Linux Foundation announces Akrites: coord/remediate/disclose OSS vulnerabilities

https://akrites.org/
1•dwheeler•6m ago•0 comments

Show HN: CodeCritic – Arduino code that compiles and simulates before you build

https://drive.google.com/file/d/1FyT0EQ4WPzOghOOzFeHyfLHUh_uIOg6J/view?usp=sharing
2•Abhro•6m ago•0 comments

The Doorman's Fallacy in Action

https://rozumem.xyz/posts/17
2•rozumem•10m ago•0 comments

Feds deny Polestar authorization to sell cars in US from model year 2027

https://arstechnica.com/cars/2026/06/feds-deny-polestar-authorization-to-sell-cars-in-us-from-mod...
2•Quinner•10m ago•0 comments

Why we're choosing stewardship over an exit – Thoughtbot

https://thoughtbot.com/blog/why-we-re-choosing-stewardship-over-an-exit
1•FrancoisBosun•10m ago•0 comments

"My dad is Li Gang" incident ("我爸是李刚"案)

https://en.wikipedia.org/wiki/Li_Gang_incident
1•firefax•10m ago•0 comments

Show HN: Omnigraph - object-storage native graph engine with git-style workflows

https://github.com/modernrelay/omnigraph
2•ragnor•11m ago•0 comments

Scaling Rails at Aura Frames: Splitting to 8 Primary DBs

https://andyatkinson.com/how-aura-frames-scales-for-peak-load-ruby-on-rails
1•chao-•11m ago•0 comments

Show HN: Polygraph – Let AI agents see cross repo and maintain session memory

https://trypolygraph.com/
4•jeffbcross•11m ago•0 comments

Cornell Recovered $100k in Unidentified Payments with AI

https://innovationhub.ai.cornell.edu/articles/how-cornell-recovered-100000-in-unidentified-paymen...
2•simonpure•12m ago•0 comments

Russia's plan to drill superdeep revives controversial theory of 'endless oil'

https://www.science.org/content/article/russia-s-plan-drill-superdeep-holes-arctic-revives-contro...
3•Kaibeezy•13m ago•0 comments

Show HN: I built an Ad-free Pinterest Alternative with AI content filtering

https://moodloom.xyz
1•akshat368•15m ago•1 comments

Trying to recover from thin content penalty from Google

2•anitroves•16m ago•2 comments

Idler Magazine

https://www.idler.co.uk/
1•tomjakubowski•17m ago•0 comments

AI Surveillance: Age Verification Meets Your Chat Logs

https://techtrenches.dev/p/the-cost-of-reading-everyone-just
2•pavel_lishin•17m ago•0 comments

Staying Awake (2008)

https://harpers.org/archive/2008/02/staying-awake/
1•NaOH•19m ago•0 comments

The easy way to build your own App and SaaS Analytics Dashboard, without SDKs

https://nerdsip.com/blog/how-to-build-your-own-app-analytics
1•wrangeliese•19m ago•0 comments

Indian Political Simulation web based game

https://political-sim-mu.vercel.app
1•Supratik090•19m ago•0 comments

Multi agent systems for complex tasks

https://lexifina.com/blog/multi-agent-systems-for-complex-tasks
1•alansaber•21m ago•0 comments

Structured Primary Keys

https://modern-sql.com/blog/2026-06/structured-primary-keys
1•chmaynard•22m ago•0 comments

Trailing Dots Are the Worst

https://daniel.haxx.se/blog/2026/06/25/trailing-dots-are-the-worst/
3•chmaynard•23m ago•0 comments

Scrutineer: Scanning open source without flooding maintainers

https://nesbitt.io/2026/06/25/scrutineer.html
1•chmaynard•24m ago•0 comments

Inaccurate diagnostic error displayed to all BMW i4 owners

https://www.i4talk.com/threads/replace-battery-error-today-june-24-common-issue.15861/
1•JojoFatsani•24m ago•0 comments

Applied AI Implementation Engineer Freelance

3•awongsem•26m ago•0 comments