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

Comments

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

I wrote a scientific fairy tale to explain molecules without formulas

https://www.amazon.it/Molecole-Gentili-scientifica-emozione-invisibile-ebook/dp/B0GTWPFNXF
1•molecolegentili•25s ago•0 comments

Compiler as a Service: C++ Goes Live – Interactive C++, interop, and beyond [video]

https://www.youtube.com/watch?v=jMO5Usa26cg
1•matt_d•1m ago•0 comments

From Oil to All-Electric: My 1950 Cape Cod Journey

https://tools.schleidtworks.com/honeyhilllane/story.html
1•mrburns85•4m ago•0 comments

Zig Tooling Pain Points?

1•lindir•6m ago•0 comments

I hacked a $100 eCalendar into family hub signage

https://absolutelyright.blog/blog/hacking-a-100-ecalendar-into-a-family-dashboard/
1•maderalabs•7m ago•0 comments

The Odd–and Oddly Human–Work of Teaching AI to Talk

https://www.bloomberg.com/news/articles/2026-03-30/inside-the-odd-and-oddly-human-work-of-teachin...
1•aanet•7m ago•1 comments

WeWork ISO 27001 Certificate Expired

https://www.iafcertsearch.org/certification/t5opTcPyXkg8yNxOVHdPWe3y
2•Yoms•7m ago•1 comments

Can seaweed solve our plastic problem?

https://www.cnn.com/2026/03/30/business/video/plantsea-seaweed-biodegradable-spc-digivid
1•simonebrunozzi•8m ago•0 comments

See How Hollywood's Job Market Is Collapsing

https://www.wsj.com/business/media/see-how-hollywoods-job-market-is-collapsing-230be437
2•thm•9m ago•0 comments

The Longest Line of Sight

https://tombh.co.uk/longest-line-of-sight
2•ohjeez•10m ago•0 comments

I made an NJTransit tracker with track prediction and express train detection

https://nj-train-tracker.vercel.app
1•ibrahimmudassar•11m ago•0 comments

Mansplain – Generate mdoc(7) man pages from –help output using LLMs

https://github.com/mwunsch/mansplain
1•mwunsch•13m ago•2 comments

'True Color' Review: Not-So-Black-and-White

https://www.wsj.com/arts-culture/books/true-color-review-not-so-black-and-white-12ed9615
1•prismatic•14m ago•0 comments

Blocking Traffic to Docker Containers

https://blog.feld.me/posts/2026/03/blocking-traffic-docker/
1•speckx•14m ago•0 comments

I Made a 100 Year Old Camera Digital for $40

https://www.youtube.com/watch?v=yyBk5ETo168
1•fallinditch•15m ago•0 comments

FCC imposes ban on foreign-made routers, affecting all new models

https://arstechnica.com/tech-policy/2026/03/trump-fcc-prohibits-import-and-sale-of-new-wi-fi-rout...
2•teleforce•16m ago•0 comments

How to Make AI Serve the Public

https://oneproject.org/how-to-make-ai-serve-the-public/
1•monknomo•16m ago•0 comments

What Notion, Figma and Pokemon got right about multi-player

https://medium.com/@yamatokaneko/what-notion-figma-and-pok%C3%A9mon-got-right-about-multi-player-...
1•e2e4•18m ago•0 comments

Show HN: Stm32-MCP – let AI build, flash, & communicate with hardware

https://github.com/shieldyguy/stm32-mcp
1•mcdowell_atx•18m ago•0 comments

Show HN: Trama – Agents don't need frameworks. They need a runtime

https://github.com/NaNhkNaN/trama
1•NaNhkNaN•18m ago•1 comments

Show HN: Modalyze – Modal Manager for React

https://github.com/kaundur/modalyze
2•kaundur•27m ago•0 comments

Show HN: Appsec.fi – Interactive AppSec training matched to your stack

https://appsec.fi/en
2•selteo•27m ago•0 comments

TurboQuant: Building a Sub-Byte KV Cache Quantizer from Paper to Production

https://demo.aitherium.com/blog/turboquant-sub-byte-kv-cache-from-paper-to-production
2•wizzense•28m ago•0 comments

Show HN: I made my fitness dashboard public and Apple Health needs an API

https://aka.me/blog/personal-software-to-stay-healthy/
3•pbarondadditude•32m ago•1 comments

I built my first app, here's what I learned / struggled with

https://apps.apple.com/us/app/invested-iq/id6760033371
3•LebDevJB•35m ago•0 comments

ADK for Java 1.0.0: Building the Future of AI Agents in Java

https://developers.googleblog.com/announcing-adk-for-java-100-building-the-future-of-ai-agents-in...
3•mfiguiere•38m ago•1 comments

The Webs Digital Locks Have Never Had a Stronger Opponent

https://blog.pixelmelt.dev/the-webs-digital-locks/
6•pixelmelt•39m ago•0 comments

Show HN: An extremly fast AI-native file manager written in Rust for macOS

https://github.com/vdavid/cmdr
3•orbanlevi•40m ago•0 comments

'Fortnite' developer Epic Games cuts 1k employees in mass layoffs

https://mashable.com/article/fortnite-epic-games-layoffs-job-cuts
4•Bender•40m ago•1 comments

Algorithms as a Tool of Thought (2021) [video]

https://www.youtube.com/watch?v=GZuZgCDql6g&list=PLVFrD1dmDdvdwBa7nPNCjA00m31MkNIlb&index=14
2•tosh•41m ago•0 comments