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

Comments

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

The Hottest Toy of the Year Is Made by a Tech Startup You've Never Heard Of

https://www.wsj.com/business/entrepreneurship/nex-playground-toy-game-console-holiday-shopping-af...
1•jerezzprime•1m ago•0 comments

Free AI Dictionary Tools

https://aijet.cc
1•osek•2m ago•0 comments

SQLite for VMs: embeddable AI agent sandboxing

https://github.com/boxlite-labs/boxlite
1•dorianzheng•3m ago•0 comments

And Your Little Dog, Too

https://www.newyorker.com/magazine/2025/12/15/and-your-little-dog-too
1•petethomas•5m ago•0 comments

Enhancing LLMs with LoRA – Standardized Recipes for Capability Enhancement

https://huggingface.co/blog/codelion/ellora-lora-recipes
1•codelion•9m ago•0 comments

A former tech executive killed his mother. Family says ChatGPT made her a target

https://www.washingtonpost.com/technology/2025/12/11/chatgpt-murder-suicide-soelberg-lawsuit/
1•1vuio0pswjnm7•12m ago•0 comments

She blew the whistle at Meta. Then her career fell apart

https://www.washingtonpost.com/technology/2025/12/15/big-tech-whistleblowers-speak-out/
1•1vuio0pswjnm7•15m ago•0 comments

Top AI-Tech Startup Ideas for 2026

1•shilpasanny•18m ago•0 comments

How to Write a 21st Century Proof (2011) [pdf]

https://lamport.azurewebsites.net/pubs/proof.pdf
2•User23•19m ago•0 comments

Neil Postman, Informing Ourselves to Death

https://web.archive.org/web/20031029211844/http://www.frostbytes.com/~jimf/informing.html
1•cal_dent•20m ago•1 comments

Live from re:Invent it's Stack Overflow

https://stackoverflow.blog/2025/12/16/live-from-re-invent-it-s-stack-overflow/
1•quapster•22m ago•0 comments

3D Environments from Single Images

https://www.spaitial.ai/
1•yodon•25m ago•0 comments

Show HN: A Claude Code plugin that auto-export plans for multi-model workflows

https://github.com/kenryu42/claude-code-plan-export
1•kenryu•25m ago•0 comments

AI-Augmented Memory for Groups

1•vishal-ds•29m ago•0 comments

Modalz Modalz Modalz

https://modalzmodalzmodalz.com/
3•iamwil•38m ago•0 comments

Netflix Live Origin

https://netflixtechblog.com/netflix-live-origin-41f1b0ad5371
1•mfrw•40m ago•0 comments

Substack forces users to download app to read content

https://twitter.com/gergelyorosz/status/1999241496005066755
3•lleims•41m ago•0 comments

Show HN: The App SEO Pros Are Quietly Switching To

https://www.gitpage.site
1•ambitiouz•41m ago•0 comments

What is more important than working hard?

https://himanshusinghbisht.substack.com/p/what-is-more-important-than-working
1•gilfoyle_7•41m ago•0 comments

Nvidia aquires SchedMD – developer of Slurm HPC scheduling software

https://www.heise.de/en/news/Nvidia-acquires-open-source-provider-SchedMD-11115881.html
2•samuell•41m ago•0 comments

Chinese Name Generator

https://chinesenamehub.com/
1•zidana•43m ago•0 comments

A Simple Recommendation System

https://angelocortez.com/blog/recsys
2•telecomhacker•47m ago•0 comments

Show HN: Explore your own Spotify history

https://lukasschwab.me/spotify-explore/
1•lukasschwab•48m ago•0 comments

Open Source Security Patch Rewards

https://bughunters.google.com/open-source-security/patch-rewards
1•transpute•48m ago•0 comments

What Are Bent Normals?

https://discourse.threejs.org/t/get-bent-or-what-is-normal-today-anyway/88635
1•iamwil•48m ago•0 comments

Is HTML-like markup a bad idea for programmatic video generation?

https://github.com/xxatsushixx/htmlv
1•tojikomorin•49m ago•1 comments

Writing a blatant Telegram clone using Qt, QML and Rust. And C++

https://kemble.net/blog/provoke/
1•todsacerdoti•53m ago•0 comments

Show HN: A Fizzy to Telegram webhook handler

https://github.com/ronaldlangeveld/telefizz
1•ronaldl93•54m ago•0 comments

Show HN: TextGO – A text selection popup tool (alternative to PopClip/SnipDo)

https://github.com/C5H12O5/TextGO
2•C5H12O5•57m ago•0 comments

Ask HN: Did anyone learn basic arithmetic as "snapshots" instead of procedures?

1•ursAxZA•58m ago•0 comments