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

Comments

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

AI "swarms" could distort democracy

https://www.mpg.de/26044163/ai-swarms-could-distort-democracy
1•wjSgoWPm5bWAhXB•1m ago•0 comments

SpaceX Said to Consider Merger with Tesla or XAI

https://www.bloomberg.com/news/articles/2026-01-29/elon-musk-s-spacex-is-said-to-consider-merger-...
1•flippyhead•1m ago•0 comments

The Cults of TDD and GenAI

https://drewdevault.com/2026/01/29/2026-01-29-Cult-of-TDD-and-LLMs.html
1•facundo_olano•2m ago•0 comments

List of predictions for autonomous Tesla vehicles by Elon Musk

https://en.wikipedia.org/wiki/List_of_predictions_for_autonomous_Tesla_vehicles_by_Elon_Musk
2•pinkmuffinere•4m ago•0 comments

Microsoft lost $357B in market cap as stock plunged most since 2020

https://www.cnbc.com/2026/01/29/microsoft-market-cap-earnings.html
2•thewebguyd•5m ago•1 comments

Show HN: StrikeRadar – USA Strike on Iran Monitor

https://usstrikeradar.com/
2•ftonobo•9m ago•1 comments

'I wouldn't dare take these': how China supplies untested peptides to the West

https://www.ft.com/content/b15407bd-7b86-45c3-9780-0c92117ccbfb
2•johntfella•9m ago•0 comments

Generating Sounds with AI

https://www.userinterface.wiki/generating-sounds-with-ai
1•SouravInsights•9m ago•0 comments

Ralph Wiggum OODA Loop

https://github.com/jomadu/ralph-wiggum-ooda
1•jomadu•11m ago•1 comments

From the CEO: What's coming to YouTube in 2026

https://blog.youtube/inside-youtube/the-future-of-youtube-2026/
1•ChrisArchitect•13m ago•0 comments

Why France just dumped Teams and Zoom for homegrown videoconferencing

https://www.zdnet.com/article/france-dumps-teams-zoom-homegrown-videoconferencing-eu-digital-sove...
2•CrankyBear•17m ago•1 comments

We Have 'AI' at Home

https://raskie.com/post/we-have-ai-at-home
1•dynamite-ready•17m ago•0 comments

Show HN: Refactoring Skill for Claude

https://github.com/elifiner/refactoring
2•zoozla•17m ago•1 comments

Ask HN: How do solid products get noticed once the launch hype is gone?

2•skicoachapp•20m ago•1 comments

Backseat Software

https://blog.mikeswanson.com/backseat-software/
1•zdw•21m ago•0 comments

I'm getting the HPV vaccine at 24. That's a problem

https://www.statnews.com/2026/01/21/hpv-vaccine-recommendation-age/
3•hn_acker•21m ago•0 comments

AIPRs.lol – Curated AI Pull Request Chaos

https://aiprs.lol/
1•danr4•21m ago•0 comments

Show HN: NipahWatch – A real-time OSINT dashboard running on Cloudflare Workers

https://nipahwatch.com
1•aggeeinn•23m ago•1 comments

US Has Investigated Claims That WhatsApp Chats Aren't Private

https://www.bloomberg.com/news/articles/2026-01-29/us-has-investigated-claims-that-whatsapp-chats...
2•NickC25•23m ago•0 comments

Encrypt It Already

https://www.eff.org/deeplinks/2026/01/introducing-encrypt-it-already
3•ChrisArchitect•23m ago•1 comments

FDA clears first human trial of epigenetic reprogramming therapy

https://longevity.technology/news/fda-clears-first-human-trial-of-epigenetic-reprogramming-therapy/
3•bigwheels•24m ago•0 comments

Letter to Stella, or What Technopaganism Isn't

https://olu.online/letter-to-stella/
1•mooreds•30m ago•0 comments

How scientists are making the power of invisibility a reality

https://www.nationalgeographic.com/science/article/invisibility-science-fiction-reality-technology
2•mooreds•30m ago•0 comments

Explain Plan Visualizer

https://explain.datadoghq.com/
3•aloukissas•30m ago•0 comments

Golden Datasets: The Essential First Step for AI-Powered Apps

https://www.dianapfeil.com/ai/2026/01/20/golden-datasets.html
1•mooreds•31m ago•0 comments

Where AI skills are showing up in job postings

https://jobswithgpt.com/blog/ai_jobs_jan_2026/
1•sp1982•31m ago•1 comments

Good Bye Athena Hello Clawdbot

https://twitter.com/austinbv/status/2016662313135431907
1•austinbv•32m ago•0 comments

Show HN: We review YC applications for free – with feedback from YC founders

https://www.ycroaster.com
2•gjarrosson•33m ago•2 comments

Misskey is free and open-source software for creating social networking services

https://misskey-hub.net/en/
2•doener•33m ago•0 comments

Mastodon: Sharkey is a Misskey fork, following upstream changes when possible

https://joinsharkey.org/
1•doener•34m ago•1 comments