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.

AI Agent Governance Toolkit

https://github.com/microsoft/agent-governance-toolkit
1•gfortaine•1m ago•0 comments

CodeGuard – defence-in-depth SSH security in one Python file

https://github.com/GeorgeBigh/CodeGuard
1•georgebigh•4m ago•0 comments

Harnesses and post-training close the open-weight bug-finding gap

https://vincenzoiozzo.com/blog/oss-models-vuln-research
1•snagg•5m ago•0 comments

The $500 Delivery Robot Is Coming – and It Will Reshape the Industry

https://www.roboticstomorrow.com/article/2026/04/the-500-delivery-robot-is-coming-%E2%80%94-and-i...
1•manvel_hn•5m ago•0 comments

MetaLens: AI agents that audit your Metabase instance and find what's broken

https://metalens.it
1•valiottidata•6m ago•0 comments

Life in My Twenties

https://fjlin.me/life-in-my-twenties
1•unitcircle69•6m ago•0 comments

Show HN: Vendorlobby – AI intake for cold emails, calls, and LinkedIn pitches

https://vendorlobby.com
1•ignsl•7m ago•0 comments

Show HN: A curated directory of AI affiliate programs, updated monthly

https://aiafflist.com/
1•Odeh13•7m ago•0 comments

Show HN: JobZap – Chrome extension for filtering LinkedIn job search

https://github.com/its-monotype/jobzap
1•monotype•9m ago•0 comments

Show HN: RemotePilot: Track Remote Opportunities

https://remotepilot.dev/
1•introvertmac•10m ago•0 comments

Infographics for Caching

https://bytebytego.com/guides/caching-performance/
1•anandvashishtha•14m ago•0 comments

The Three Virtues of a Great Programmer

https://thethreevirtues.com/
2•rbanffy•17m ago•0 comments

Amdahl's Law for LLM generated code

1•akiarie•17m ago•1 comments

US Law Enforcement Warns of 'Anti-Tech Extremism'

https://www.wired.com/story/us-law-enforcement-warns-of-anti-tech-extremism/
3•hansmayer•19m ago•0 comments

Show HN: Agent Launch – One CLI for Codex, Claude Code, Cursor, Gemini, OpenCode

1•dhruv_anand•20m ago•0 comments

Show HN: Marketing Manager Job Board

https://marketingmanagerjobs.com/
1•35mm•21m ago•0 comments

GitHub just suspended GitHub-actions[bot]

5•jaakkonen•21m ago•0 comments

Sam Altman: I was wrong, AI unlikely to lead to jobs apocalypse

https://www.reuters.com/world/asia-pacific/openais-altman-says-ai-unlikely-lead-jobs-apocalypse-2...
2•dryadin•21m ago•1 comments

I spent 2 months building a business problem roulette

https://www.gotaprob.com/discover/spin
2•syel•24m ago•1 comments

Blip Voice: solve a painful bug in WhatsApp

https://github.com/mohamadd-khalill/blip-voice
1•mohamaddkhalill•26m ago•1 comments

Incident with Actions and Pages

https://www.githubstatus.com/incidents/gnftqj9htp0g
11•hakube•28m ago•5 comments

Apple has an innovation gap. Will its new CEO fill it?

https://www.ft.com/content/d16f3ae6-8e27-4293-8bef-6bda7a9706d2
2•giuliomagnifico•30m ago•1 comments

CodeMySpec – Lovable for engineers who care about the code

https://codemyspec.com/products/code-my-spec
3•matthewsinclair•32m ago•0 comments

A reality check on the AI jobs hysteria

https://www.technologyreview.com/2026/05/26/1137855/a-reality-check-on-the-ai-jobs-hysteria/
2•joozio•34m ago•0 comments

Imec presents quantum dot qubit device using High NA EUV lithography

https://www.imec-int.com/en/press/world-first-imec-presents-quantum-dot-qubit-device-using-high-n...
1•u1hcw9nx•34m ago•1 comments

Show HN: The Structural Operating System for the AI Era

https://typerion.io
1•Techman92•35m ago•0 comments

FinOps for AI: Track What Your Code Costs per Commit

https://mooracle.io/blog/finops-ai-planning-poker/
1•theanonymousone•36m ago•0 comments

Egypt's Great Pyramid is also a great earthquake dampener

https://www.science.org/content/article/egypt-s-great-pyramid-also-great-earthquake-dampener
1•tzury•36m ago•0 comments

Harness, Scaffold, and the AI Agent Terms Worth Getting Right

https://huggingface.co/blog/agent-glossary
1•sergiopaniego•36m ago•0 comments

Collapse of Personal Computing – Investigation into the Destruction of Ownership [video]

https://www.youtube.com/watch?v=zyQwAhppWj8
1•alecco•38m ago•0 comments