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•1y ago

Comments

zoezoezoezoe•1y 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•1y 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.

Rippling exposed your SSN/banking to anyone who sent you an offer letter

https://infosec.exchange/@SecureOwl/116415101610028363
1•noiobeforebed•38s ago•0 comments

Useknockout – open-source background removal API, 40× cheaper than remove.bg

https://github.com/useknockout/api
1•tlorents•53s ago•0 comments

SF Giants sell piece of team to venture capital firm run by Joshua Kushner

https://www.sfgate.com/giants/article/sf-giants-joshua-kushner-22224927.php
1•iancmceachern•7m ago•0 comments

DevResolve – AI chat widget that answers technical questions from your docs

https://devresolve.ai
1•EthanWayne•8m ago•0 comments

Open source memory layer so any AI agent can do what Claude.ai and ChatGPT do

https://alash3al.github.io/stash?_v01
1•alash3al•10m ago•1 comments

Asking Qwen3.5-9B, running on 16GB VRAM, to exploit old Windows machines

https://thepatrickfisher.com/blog/computers/series-vibe-coding-sec-scan/00-vibe-coding-security-p...
1•sqeak•11m ago•1 comments

Llama 4: A Deep Dive into Liquid Transformers 2.0 and Sovereign AI

https://en.landingfymax.com.br/artificial-intelligence/llama-4-meta-open-source-sovereignty-2026
1•EvCarvalho•14m ago•0 comments

Show HN: Building a local FIX protocol triage agent on an RTX 3070

https://domgalati.substack.com/p/the-fix-triage-agent-building-a-local
1•dgalati•18m ago•0 comments

(Blender) Cosmology with Geometry Nodes

https://www.blender.org/user-stories/cosmology-with-geometry-nodes/
3•shankysingh•26m ago•0 comments

BMW is one step closer to selling you a color-changing car

https://www.theverge.com/tech/918216/bmw-ix3-flow-edition-concept-car-2026-beijing-auto-show-e-in...
2•dmitrygr•31m ago•0 comments

"Plain text has been around for decades and it's here to stay." – Unsung

https://unsung.aresluna.org/plain-text-has-been-around-for-decades-and-its-here-to-stay/
2•rbanffy•31m ago•0 comments

[Show HN] Free Baccarat

https://baccarat.free/
1•cbxyp•34m ago•1 comments

Apple IIc: A smaller, sleeker Apple II from 1984

https://dfarq.homeip.net/apple-iic/
2•rbanffy•35m ago•1 comments

Mypaintr: Plot R graphics like a human

https://hughjonesd.github.io/mypaintr/index.html
1•dash2•35m ago•0 comments

Replace IBM Quantum back end with /dev/urandom

https://github.com/yuvadm/quantumslop/blob/25ad2e76ae58baa96f6219742459407db9dd17f5/URANDOM_DEMO.md
1•pigeons•36m ago•1 comments

Avnac: Open-source local-first Canva alternative

https://avnac.design/
2•bundie•38m ago•0 comments

White House Memo on Adversarial Distillation of American AI Models [pdf]

https://whitehouse.gov/wp-content/uploads/2026/04/NSTM-4.pdf
1•lebovic•41m ago•1 comments

Fast-AI-detector: a fast local CLI for detecting AI-generated text

https://github.com/Ejhfast/fast-ai-detector
1•unignorant•44m ago•0 comments

Google Cloud CEO: Anthropic, TPUs, Mythos, Nvidia and More [video]

https://www.youtube.com/watch?v=bNdiBwXbLNw
2•rdudekul•46m ago•0 comments

Cactus, a work-stealing parallel recursion runtime for C

https://github.com/xtellect/cactus
1•enduku•47m ago•0 comments

These Volcanoes Are Undead

https://nautil.us/when-extinct-volcanoes-reawaken-1280213
1•kristenfrench•53m ago•1 comments

Sam Altman Wants to Know Whether You're Human

https://www.theatlantic.com/newsletters/2026/04/sam-altman-bots-world-id/686950/
1•JumpCrisscross•53m ago•0 comments

Honda CEO says 'we have no chance' against Chinese automakers

https://finance.yahoo.com/sectors/energy/articles/honda-ceo-says-no-chance-020000235.html
2•thelastgallon•53m ago•0 comments

Why Congress may spend $1B on Great Salt Lake

https://www.npr.org/2026/04/24/nx-s1-5746844/why-trump-wants-to-spend-1-billion-on-great-salt-lake
1•kianN•54m ago•0 comments

Is Italy the new tax haven for the global rich?

https://www.bbc.com/worklife/article/20260421-is-italy-the-new-tax-haven-for-the-global-rich
2•andsoitis•1h ago•0 comments

Jeff Bezos is raising his game in space

https://www.economist.com/business/2026/04/23/jeff-bezos-is-raising-his-game-in-space
1•andsoitis•1h ago•0 comments

Bdelloid Rotifer

https://en.wikipedia.org/wiki/Bdelloidea
2•embedding-shape•1h ago•0 comments

Tim Cook wrote a winning recipe for Apple

https://www.economist.com/leaders/2026/04/23/tim-cook-wrote-a-winning-recipe-for-apple
1•andsoitis•1h ago•0 comments

Peter Sarnak – The Riemann Hypothesis [video]

https://www.youtube.com/watch?v=DtaFyE9BcXw
1•delhanty•1h ago•1 comments

Google is building a Claude Code challenger, Sergey Brin is involved

https://www.indiatoday.in/technology/news/story/google-is-secretly-building-a-claude-code-challen...
4•nsoonhui•1h ago•1 comments