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.

I missed Network integrated tools on Windows so I built a Linux equivalent

https://github.com/thongor77/nmlinux
1•magetriste•2m ago•1 comments

Toranj: Our Adventure Left Mid-Way inside a loud and grieving Iran

https://medium.com/@alirezamd/toranj-an-adventure-left-mid-way-2da199493720
1•alir8zana•4m ago•0 comments

Beginner's Guide to Python

https://wiki.python.org/moin/BeginnersGuide
1•ankitg12•4m ago•0 comments

Show HN: Ping Pals – Simple social tracker iOS app without coding

https://apps.apple.com/tr/app/ping-pals/id6770330997
1•seugur•4m ago•0 comments

A Trademark Dispute over MeshCore

https://lwn.net/SubscriberLink/1070218/e95f4f2e2c9fe208/
1•6581•5m ago•0 comments

Leaked Files from Putin's Troll Factory: How Russia Manipulated EU Elections

https://vsquare.org/leaked-files-putin-troll-factory-russia-european-elections-factory-of-fakes/
2•alephnerd•6m ago•0 comments

Teardown of Jio Set Top Box Remote

https://pallavaggarwal.in/2026/02/07/teardown-jio-set-top-box-remote-india/
1•ankitg12•7m ago•0 comments

Show HN: MigraDiff v1.3.0 – PostgreSQL schema diff with AI migration explanation

https://github.com/migradiff/migra/releases/tag/v1.3.0
1•lateos-ai•8m ago•0 comments

Show HN: HumanForScale – See how big things are

https://www.humanforscale.app/
1•anandbaburajan•10m ago•0 comments

Losing My Religion [Libertarianism]

https://worksinprogress.co/issue/losing-my-religion/
1•maxall4•11m ago•0 comments

Hacking my way around a fake STM32

https://hrideshmg.com/p/stm32-hack/
1•hrideshmg•11m ago•1 comments

Downdetector and Speedtest sold to Accenture for $1.2B

https://www.theverge.com/tech/889234/downdetector-ookla-speedtest-sold-accenture
2•Garbage•13m ago•0 comments

I Want to Use AI

https://blog.senko.net/how-i-want-to-use-ai
2•taubek•15m ago•0 comments

Terminal Features: How Escape Sequences Work

https://terminfo.dev/features
2•ankitg12•21m ago•1 comments

SIMDe

https://github.com/simd-everywhere/simde
1•tosh•21m ago•0 comments

Linux/Mac68k

http://www.mac.linux-m68k.org/
2•doener•23m ago•0 comments

Show HN: DropLock – E2EE secret sharing web app with no backend

https://droplock.apitman.com/
1•apitman•24m ago•0 comments

Lazydiff – Semantic PR review TUI with language aware analysis faster than lsp

https://github.com/Ataraxy-Labs/lazydiff
2•rohanucla•25m ago•0 comments

Company Blew $500M on Claude AI in One Month

https://www.gadgetreview.com/company-blew-500m-on-claude-ai-in-one-month
5•jonathanlydall•25m ago•2 comments

David Suzuki Calls Artimis II a Stunt for SpaceX IPO [video]

https://www.cbc.ca/player/play/video/9.7210795
1•laurex•26m ago•0 comments

I got arrested because of legos [video]

https://www.youtube.com/watch?v=cxZPfj8AlmY
4•Jn2G3Np8•28m ago•0 comments

NBER: Data Centers and Local Economies in the Age of AI

https://www.nber.org/papers/w35194
1•m-hodges•29m ago•0 comments

Werner Herzog in conversation with Paul Cronin (2014)

https://fsgworkinprogress.com/2014/09/26/insignificant-bullets-evil-poachers-and-l-a-culture/
2•Michelangelo11•29m ago•0 comments

Polymer-coated nanowire electrocatalytic system for removal of micropollutants

https://www.nature.com/articles/s41467-026-73425-1
3•bookofjoe•30m ago•0 comments

Grokimage.ai

https://grokimage.ai/
1•RustyArmor•31m ago•0 comments

Rivet: Node.js HTTP Server Framework

https://www.npmjs.com/package/@igosprojects/rivet
1•eyedev•32m ago•0 comments

Vectorscan

https://github.com/Vectorcamp/vectorscan
1•tosh•34m ago•0 comments

FBI says Google engineer used internal search data to win $1.2M on Polymarket

https://arstechnica.com/tech-policy/2026/05/fbi-says-google-engineer-used-internal-search-data-to...
1•frigidwalnut•34m ago•0 comments

Why does tsgo use so much memory?

https://zackoverflow.dev/writing/why-does-tsgo-use-so-much-memory/
2•zeldapoem•35m ago•0 comments

6 Months of "Agentic" Coding

https://ashutoshbsathe.github.io/blog/agentic-coding/
2•ashutoshbsathe•36m ago•0 comments