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.

V1.21 Update for Gpumkat

1•Okerew•44s ago•0 comments

Valence and HYVE, RT Physics Attention and a "Synthetic Organism"

1•PaperScarecrow•52s ago•0 comments

YouTube Premium's US pricing is going up

https://www.engadget.com/social-media/youtube-premiums-us-pricing-is-going-up-132121683.html
2•bookofjoe•2m ago•0 comments

My Picture of the Present in AI

https://www.greaterwrong.com/posts/WjaGAA4xCAXeFpyWm/my-picture-of-the-present-in-ai
1•gmays•3m ago•0 comments

Ask HN: Its either I or Agent code. Both of us on same codebase is a disaster

1•zane__chen•4m ago•0 comments

Artemis 2 LIVE: NASA's Artemis 2 astronauts prepare for splashdown today

https://www.space.com/news/live/artemis-2-nasa-moon-mission-updates-april-10-2026
2•thinkingemote•5m ago•0 comments

Dad stuck in support nightmare after teen lied about age on Discord

https://arstechnica.com/tech-policy/2026/04/dad-stuck-in-support-nightmare-after-teen-lied-about-...
1•Brajeshwar•6m ago•0 comments

The Key to Stealing Subway Trains: A $10 Skeleton Key

https://www.nytimes.com/2026/04/10/nyregion/nyc-subway-conquesting-joyride.html
1•jbredeche•6m ago•0 comments

The first photograph of a human being (1838)

https://mashable.com/archive/first-photograph-of-a-human
1•downbad_•7m ago•1 comments

Show HN: I got tired, so I built an offline desktop job tracker + resume builder

https://github.com/ruslanora/kin
2•ruslanora•8m ago•0 comments

Neural sequences underlying directed turning in Caenorhabditis elegans

https://www.nature.com/articles/s41593-026-02257-5
1•bookofjoe•10m ago•0 comments

Ask HN: Does Sam Altman know how to code?

2•shchess•10m ago•1 comments

Show HN: Kitted: Local inventory and production management for small businesses

https://kitted.site/
1•ed_•11m ago•0 comments

Show HN: I run AI background removal in the browser–no upload,no server

https://www.allplix.com/en/background-remover
2•shadoxise•12m ago•0 comments

Autonomy Is Real Now

https://steelforfuel.substack.com/p/autonomy-is-real-now
5•simonebrunozzi•14m ago•0 comments

We Developed Zeta2

https://zed.dev/blog/how-we-developed-zeta2
3•ms7892•15m ago•0 comments

Agent to stress-test Wall Street analyst reports: Chipotle (CMG) Example

https://static-www.revelata.com/assets/for-ai-builders/EXAMPLE-CMG_Analysis_Stress_Test.html
2•sjt-at-rev•16m ago•1 comments

The end of the 1B active user ad-supported consumer startup

https://twitter.com/andrewchen/status/1832114119207743984
1•iNeedMoneyFast•18m ago•0 comments

Applications of AI at OpenAI

https://openai.com/academy/applications-of-ai/
1•surprisetalk•18m ago•0 comments

MenuSearch: Search Anywhere in One Click

https://microsoftedge.microsoft.com/addons/detail/menusearch-search-anywhe/deobjdclccahgllgpgdmjk...
1•hassananayi•19m ago•0 comments

"Not Even Government Agencies" - Proton's misleading marketing

https://blog.ppb1701.com/not-even-government-agencies
2•leotravis10•19m ago•0 comments

WAL as a Data Distribution Layer

https://richyen.com/postgres/2026/04/06/wal_archiving.html
1•tanelpoder•19m ago•0 comments

Responsible and Safe Use of AI

https://openai.com/academy/responsible-and-safe-use/
2•surprisetalk•20m ago•0 comments

Malware analysis report: CPU-Z 2.19 supply chain attack

https://gist.github.com/N3mes1s/b5b0b96782b9f832819d2db7c6684f84
1•bundie•21m ago•0 comments

Timothy Ray Brown: the accidental AIDS icon (2015)

https://www.fredhutch.org/en/news/center-news/2015/02/aids-icon-timothy-ray-brown.html
1•Tomte•21m ago•0 comments

Automated Changelog for Open-Source Contributions

https://medium.com/@paragekbote23/from-commits-to-impact-building-an-automated-changelog-for-open...
1•gmays•21m ago•0 comments

Show HN: Direction – a 4-week course for people afraid of shipping AI slop

https://www.givedirection.com/
1•AndrewKemendo•23m ago•0 comments

Adobe Diddles with Your /etc./Hosts File

https://old.reddit.com/r/webdev/comments/1sb6hzk/adobe_wrote_to_my_hosts_file_ive_never_had_an_ap...
5•Brajeshwar•24m ago•1 comments

Closest Thing to Crazy

https://www.atvbt.com/closest-thing-to-crazy/
1•speckx•25m ago•0 comments

Synthetic Sandbox for Training Machine Learning Engineering Agents

https://arxiv.org/abs/2604.04872
2•gmays•25m ago•0 comments