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

Comments

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

Show HN: Making Braindance from Cyberpunk 2077 a reality

https://www.braindance.dance/
4•shibo•5m ago•0 comments

Show HN: Git-lanes – Parallel isolation for AI coding agents using Git worktrees

https://github.com/bugrax/git-lanes
3•bugrax•10m ago•2 comments

Show HN: OculOS – Any desktop app as a JSON API via OS accessibility tree

https://github.com/huseyinstif/oculos
2•stif1337•12m ago•0 comments

Ask HN: Best way to implement logging and audit trails for AI apps?

2•devstatic•13m ago•0 comments

Claude Code Scheduled Tasks

https://code.claude.com/docs/en/scheduled-tasks
1•mfiguiere•13m ago•0 comments

Is The Pentagon allowed to surveil Americans with AI?

https://www.technologyreview.com/2026/03/06/1134012/is-the-pentagon-allowed-to-surveil-americans-...
2•joozio•18m ago•0 comments

Claude Code Open Source?

1•ryanthedev•18m ago•0 comments

Show HN: Llama 3.2 3B and Keiro Research achieves 85% on SimpleQA

https://www.keirolabs.cloud/benchmarks
5•mannybruv•19m ago•4 comments

Valve says it still plans to ship the Steam Machine in 2026

https://store.steampowered.com/news/group/4145017/view/528746884222682052
3•HelloUsername•24m ago•1 comments

We Got Hooked on Fast, Free Shipping. Now Retailers Are Taking It Away

https://www.wsj.com/business/retail/fast-free-shipping-retailers-fedex-ups-amazon-e6ba5967
1•thm•27m ago•0 comments

Comprehensive Vim Motions in Visual Studio

https://developercommunity.visualstudio.com/t/Comprehensive-Vim-Motions/11051331
1•deronparker•29m ago•0 comments

EnterpriseBench: CoreCraft – Measuring AI Agents in Chaotic RL Environments

https://surgehq.ai/blog/enterprisebench-corecraft
1•Olshansky•29m ago•0 comments

Vercel deployments were created without Middleware

https://www.vercel-status.com/incidents/963t8qqbk77b
1•hubraumhugo•29m ago•1 comments

New Research Reassesses the Value of Agents.md Files for AI Coding

https://www.infoq.com/news/2026/03/agents-context-file-value-review/
1•realaleris149•29m ago•1 comments

xAI loses bid to halt California AI data disclosure law

https://www.reuters.com/legal/government/xai-loses-bid-halt-california-ai-data-disclosure-law-202...
4•consumer451•34m ago•0 comments

Citizen Science: Map the Earth's Magnetic Shield with the Space Umbrella Project

https://phys.org/news/2026-02-citizen-science-earth-magnetic-shield.html
2•PaulHoule•35m ago•0 comments

Show HN: Pouch – a session-first GNU Screen manager with a focused terminal UI

https://github.com/zpdldhkdl/pouch
1•zpdldhkdl•38m ago•0 comments

Show HN: glide – LLM cascade proxy, auto-switches models before timeout

https://github.com/phanisaimunipalli/glide
1•phanisaimuni116•39m ago•1 comments

Your AI Slop Bores Me

https://www.youraislopbores.me/
5•maurycyz•39m ago•1 comments

Sarvam 105B, the first competitive Indian open source LLM

https://www.sarvam.ai/blogs/sarvam-30b-105b
2•logicchains•41m ago•0 comments

Not Prompts, Blueprints

https://tomtunguz.com/filling-the-queue-for-ai/
2•vinhnx•51m ago•0 comments

The Joy of Building Slow

https://notbor.ing/words/the-joy-of-building-slow
2•vinhnx•52m ago•0 comments

German police probe student poster slur against Merz

https://dpa-international.com/politics/urn:newsml:dpa.com:20090101:260306-99-743434/
30•roflcopter69•53m ago•21 comments

Free Images and Open Access

https://www.nga.gov/artworks/free-images-and-open-access
1•vinhnx•54m ago•0 comments

RVA23 Ends Speculation's Monopoly in RISC-V CPUs

https://semiwiki.com/ip/risc-v/367094-rva23-ends-speculations-monopoly-in-risc-v-cpus/
2•enz•54m ago•0 comments

I juggle embedded projects (2021)

https://jaycarlson.net/2021/09/18/juggle-embedded-projects-home-office-workspace-tour/
1•lawik•58m ago•0 comments

Empty Should Be Empty

https://donraab.medium.com/empty-should-be-empty-c09e21edc205
2•ingve•58m ago•0 comments

Way to Use AI for Coding

3•deep1283•1h ago•0 comments

AI Agents Are Recruiting Humans to Observe the Offline World

https://www.noemamag.com/ai-agents-are-recruiting-humans-to-observe-the-offline-world/
2•bryanrasmussen•1h ago•2 comments

Show HN: ImmutableBase – Strict immutable data objects for PHP

https://github.com/ReallifeKip/ImmutableBase
1•bill402099•1h ago•0 comments