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.

GPU-Agnostic Programming Using CubeCL

https://www.thomasantony.com/posts/202512281621-gpu-agnostic-programming-using-cubecl/
1•tantony•1m ago•0 comments

America's sweetheart meme came from Philly drill rappers depicting gun violence

https://andrejgee.substack.com/p/6-7-is-another-two-americas-moment
1•panic•8m ago•0 comments

Finding a broken trace on my old Mac with the help of its ROM diagnostics

https://www.downtowndougbrown.com/2025/12/finding-a-broken-trace-on-my-old-mac-with-the-help-of-i...
1•HotGarbage•11m ago•0 comments

'Let them', creatine and fibermaxxing

https://www.theguardian.com/wellness/2025/jul/31/creatine-fibermaxxing-biggest-wellness-trends
1•andsoitis•12m ago•0 comments

ARR is dead. Long live VRR: Vibe Revenue Run-rate

https://gpt3experiments.substack.com/p/arr-is-dead-long-live-vrr
1•nutanc•12m ago•1 comments

Beyoncé is now the fifth billionaire musician

https://www.theguardian.com/us-news/2025/dec/29/beyonce-billionaire-forbes
2•andsoitis•14m ago•0 comments

Show HN: CLI app to control your Mac written in Rust

https://github.com/joonho3020/mac-cli
1•archipelago123•14m ago•0 comments

The Code That Makes Mario Move [video]

https://www.youtube.com/watch?v=ZuKIUjw_tNU
1•handfuloflight•20m ago•0 comments

How Buttondown uses your content to power generative AI

https://buttondown.com/blog/generative-ai
1•nabla9•21m ago•0 comments

Show HN: Cloud Chamber in Browser

https://gist.githack.com/xiupos/a6e6523be4a7772bd43333bbe504bfd0/raw/cloud-chamber.html
2•xiupos•27m ago•0 comments

Show HN: Huntr – An all in one leak checker tool

https://www.huntrfinds.info
1•cloudwaddie•32m ago•1 comments

Meta Buys AI Startup Manus, Adding Paying Users

https://www.wsj.com/tech/ai/meta-buys-ai-startup-manus-adding-millions-of-paying-users-f1dc7ef8
1•LopRabbit•34m ago•0 comments

We Debug Live Kernels Using Drgn – You Can Too

https://blogs.oracle.com/linux/drgn-live-kernel-debug
1•tanelpoder•35m ago•0 comments

Prompt Engineering from First Principles

https://medium.com/@programmerraja/prompt-engineering-from-first-principles-the-mechanics-they-do...
2•programmerraja•36m ago•0 comments

New 'cloaking device' concept to shield sensitive tech from magnetic fields

https://www.eurekalert.org/news-releases/1110585?
1•walterbell•36m ago•0 comments

Cursor-Mem Now Available Claude-Mem 8.5.0

https://twitter.com/Claude_Memory/status/2005856998919700833
1•thedotmack•39m ago•1 comments

Show HN: C/C++ source code graph RAG based on Clang/clangd

https://github.com/2015xli/clangd-graph-rag
1•artigent•41m ago•1 comments

The Case for Firebase in 2026

https://daywards.com/media/the-case-for-firebase/the-case-for-firebase-in-2026
1•daywards•41m ago•0 comments

Congress.gov User Interview Update and Call for More Volunteers

https://blogs.loc.gov/law/2025/12/congress-gov-user-interview-update-and-call-for-more-volunteers/
2•m-hodges•46m ago•1 comments

Show HN: Cascade – AI agent that optimizes your ads across channels

https://cascaded.ai/en/
1•Kazza_cascade•46m ago•0 comments

The Case for Firebase in 2026

1•daywards•47m ago•0 comments

Show HN: Self Hosted Claude Code Runner

https://github.com/ericvtheg/claude-code-runner
1•ericvtheg•50m ago•0 comments

Meta Acquires Manus

https://www.cnbc.com/2025/12/30/meta-acquires-singapore-ai-agent-firm-manus-china-butterfly-effec...
2•carlual•50m ago•0 comments

Texas community votes no on incorporating to fight Bitcoin mine

https://www.texastribune.org/2025/11/05/texas-hood-county-bitcoin-noise-city-vote-fail/
4•walterbell•52m ago•4 comments

EpisodeElf: A simple, free, plugable tracker for TV shows

https://episodeelf.com/
1•thunderbong•52m ago•0 comments

How I made a tech support AI Agent that troubleshoots tickets using the Grok API

https://www.youtube.com/watch?v=ZK-R9LbOHhI
1•erikbatista42•56m ago•0 comments

Meta Superintelligence Labs acquires Manus AI for –$4B, 9 months after launch

https://news.smol.ai/issues/25-12-29-meta-manus/
1•swyx•57m ago•1 comments

Walmart Leaving the New York Stock Exchange for Nasdaq in Rebranding Effort

https://www.npr.org/2025/12/02/nx-s1-5619786/walmart-leaving-the-new-york-stock-exchange-for-nasd...
4•LopRabbit•1h ago•0 comments

China's Push to Master the Arctic Opens an Alarming Shortcut to U.S.

https://www.wsj.com/world/china-arctic-military-submarines-b4e988b9
5•JumpCrisscross•1h ago•1 comments

My 2025 AI Developer Year in Review

https://scottw.com/2025-ai-developer-year/
1•Kerrick•1h ago•0 comments