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

Comments

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

Reika: An opinionated dependency manager and build initiator tool

https://fossil.cyberia9.org/reika/index
1•todsacerdoti•2m ago•0 comments

Atmospheric Computing

https://www.pfrazee.com/blog/atmospheric-computing
1•cyndunlop•3m ago•0 comments

SQLite3 ported to use LMDB instead of its original Btree code

https://github.com/LMDB/sqlightning
1•koakuma-chan•4m ago•0 comments

Abandoned IBM Complex Left Untouched Since Covid Lockdown [video]

https://www.youtube.com/watch?v=DjQ2PAgUcM8
1•DamnInteresting•7m ago•0 comments

Show HN: I built a portable Yahtzee device with custom PCB and WASM simulator

https://friggeri.net/projects/yahtzee/
3•friggeri•7m ago•0 comments

Assignments for CS146S: The Modern Software Dev (Stanford Fall 2025)

https://github.com/mihail911/modern-software-dev-assignments
1•simonpure•7m ago•0 comments

Happy New Year 2026

1•martynvandijke•8m ago•0 comments

Akmatori: Open-Source AI Agents for Incident Management

https://github.com/akmatori/akmatori
1•geri4•8m ago•0 comments

Seeing Like a State: How Certain Schemes to Improve the Human Condition Failed [pdf]

https://monoskop.org/images/9/9b/Scott_James_C_Seeing_Like_a_State_How_Certain_Schemes_to_Improve...
1•foster_nyman•11m ago•0 comments

5 Years of UnifiedPush

https://s1m.fr/unifiedpush-5-years/
3•achyudh•14m ago•0 comments

AI showing signs of self-preservation and humans should be ready to pull plug

https://www.theguardian.com/technology/2025/dec/30/ai-pull-plug-pioneer-technology-rights
1•hackernj•15m ago•0 comments

AI-generated content in Wikipedia – a tale of caution [video]

https://www.youtube.com/watch?v=fKU0V9hQMnY
1•todsacerdoti•16m ago•0 comments

SaaS – Cost Accounting

1•johannkrugell•21m ago•0 comments

Thieves Make Off with Millions in German Bank Heist

https://www.nytimes.com/2025/12/31/world/europe/germany-heist-bank-robbery.html
2•vinni2•21m ago•1 comments

Roadmap to React

https://nemorize.com/roadmaps/react
1•reverseblade2•23m ago•0 comments

Show HN: Karpathy's Nanogpt but for Audio

https://github.com/deepanwadhwa/nanogpt-Audio
1•dwa3592•27m ago•0 comments

An abandoned ship full of EVs is burning in the Pacific

https://www.popsci.com/technology/an-abandoned-ship-full-of-evs-is-burning-in-the-pacific/
1•wjb3•29m ago•3 comments

Resistance training load does not determine hypertrophy

https://physoc.onlinelibrary.wiley.com/doi/10.1113/JP289684
2•Luc•29m ago•0 comments

Show HN: Career Pivot Tool – Find new career paths based on your skills

https://www.mirora.ai/tools/career/analysis/
1•mwieher•30m ago•0 comments

Tech Startups Are Handing Out Free Nicotine Pouches to Boost Productivity

https://www.wsj.com/tech/tech-startups-are-handing-out-free-nicotine-pouches-to-boost-productivit...
3•iancmceachern•34m ago•0 comments

Man Viewed as a Machine (1955)

https://annas-archive.org/scidb/10.1038/scientificamerican0455-58/?viewer=1
1•dvrp•37m ago•0 comments

How to Use LLM as a Judge (Without Getting Burned)

https://twitter.com/manthanguptaa/status/2006222014265393316
1•jxmorris12•39m ago•0 comments

Show HN: An .icc Profile That Combines P3 and Adobe RGB into a Single Gamut

2•Nrbelex•42m ago•0 comments

Scientists unlock brain's natural clean-up system for new treatments for stroke

https://www.monash.edu/pharm/about/news/news-listing/latest/scientists-unlock-brains-natural-clea...
2•PaulHoule•44m ago•0 comments

Most Americans didn't read many books in 2025

https://yougovamerica.substack.com/p/most-americans-didnt-read-many-books
2•bobbiechen•45m ago•0 comments

The Golden Networking Hour

https://olshansky.info/posts/2025-12-31-the-golden-networking-hour
2•Olshansky•49m ago•1 comments

Vibe coding isn't for the vibe coders

https://fenomener.no/post/78ba027e-0855-43b3-afbd-8fbb9943ae99
2•0dKD•49m ago•3 comments

The Sounds of Long Distance pgm 13: DDD Demo Recordings 1971-1975 [video]

https://www.youtube.com/watch?v=QSsd8kreDOU
1•fortran77•52m ago•1 comments

Working with custom GUCs in Postgres extension

https://clickhouse.com/blog/taming-postgres-guc-extra-data
1•saisrirampur•53m ago•0 comments

A Survey of Dynamic Array Structures

https://azmr.uk/dyn/
3•ingve•53m ago•0 comments