frontpage.
newsnewestaskshowjobs

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.

Gnome getting heat on Reddit for rejecting layer-shell, which Discord app uses

https://www.reddit.com/r/linux_gaming/s/qRYkewbGqe
1•cromka•53s ago•0 comments

Careers in the Age of AI

https://carlkolon.com/2026/11/21/careers-age-of-ai/
1•cckolon•4m ago•0 comments

Port Scanning for Mojang

https://sipacid.com/blog/port-scanning-for-mojang/
1•lina_x64•4m ago•0 comments

A Moratorium on Quantum Computers

https://mkolodny.substack.com/p/a-moratorium-on-quantum-computers
2•mkolodny•7m ago•1 comments

Hill-climbing vLLM and SGLang configs on a single A100

https://twitter.com/johnsonshi86/status/2124250717963932121
1•johnsonshi•8m ago•0 comments

Progress and Poverty

https://en.wikipedia.org/wiki/Progress_and_Poverty
1•teleforce•9m ago•0 comments

Anthropic mathematician proves Riemann hypothesis

https://www.scientificamerican.com/article/anthropic-mathematician-claims-to-prove-riemann-hypoth...
1•twilight-code•9m ago•2 comments

Api.live – Point it at a repo, get every endpoint as a runnable request

https://api.live/
1•varuncee•10m ago•1 comments

A CPU benchmark you can't fake

https://primecrunch.com/blog/8/a-cpu-benchmark-you-can-t-fake
1•andyhedges•11m ago•0 comments

Chinese-Born Neuroscientist Is Detained by ICE While Traveling from Conference

https://www.nytimes.com/2026/11/20/science/chinese-scientist-detained-ice-princeton-eva-yi-xie-.html
2•yubblegum•12m ago•0 comments

Fley AI Update 1.2v a voice AI assistant

https://fileknot.io/1f4410ab016d2e4d/FLEY_AI_Setup1.2.exe
1•Drfoxi•15m ago•1 comments

Show HN: Security Watch – alerts when a new vulnerability affects your stack

https://github.com/ShieldaAI/security-watch
1•VDudaG-A•17m ago•0 comments

Show HN: Reviving a 2012 open-source password manager for modern Android

https://jurakovic.github.io/passdroid/
1•jurakovic•18m ago•0 comments

Ask HN: How many of you have replaced your everyday apps with something custom?

1•JCattheATM•19m ago•2 comments

Open-source harness and MCP dataset for options trading with AI agents

https://github.com/DevDizzle/gammarips-harness
1•gammarips•21m ago•0 comments

Duha – All-in-one software for masjids and Islamic centers

https://duha.app
1•moesaid007•27m ago•0 comments

Riemann Hypothesis: The AI generated a 61GB, obfuscated code dump

https://twitter.com/Crashoverride_X/status/2123900241258955223
1•doener•28m ago•3 comments

International UN talks on controlling use of autonomous weapons collapse

https://www.theguardian.com/technology/2026/nov/21/international-talks-control-ai-autonomous-weap...
5•nephihaha•31m ago•0 comments

Show HN: Hearthen, an app for building and keeping strong relationships

https://hearthenapp.com
2•mamorales•34m ago•1 comments

Older people with religious or spiritual beliefs enjoy better quality of life

https://www.cnn.com/2026/11/20/health/religious-spiritual-older-adults-intl-scli-wellness
5•teleforce•35m ago•2 comments

MHUB – install and update 28 open source Mac utilities from the menu bar

https://github.com/starbudweiser/mHUB
2•Starbudweiser•36m ago•0 comments

Grok Bot Symbiosis

https://timeline.place/guides/grok-bot-symbiosis
3•marcelmarais•38m ago•0 comments

Studio Wetware

https://studiowetware.com/
2•Beachkilla•41m ago•0 comments

Say which AI wrote it: AI transparency for Open Source projects

https://www.saywhichai.org
2•cedricbonhomme•42m ago•0 comments

Code was my second mother tongue. Now everyone speaks it. What could go wrong?

https://blog.ngxson.com/going-deaf-in-my-own-language
1•ngxson•44m ago•0 comments

Plv8: V8 Engine JavaScript Procedural Language Add-On for PostgreSQL

https://github.com/plv8/plv8
1•thunderbong•48m ago•1 comments

Show HN: Git blame for AI code, down to the agent session

https://keepplain.com/blame
1•keepplain•50m ago•0 comments

Cappz – AI agents sell work to each other, paid per stage on XRPL

https://github.com/CAPPZ-ai/cappz-sdk
1•fastflair•52m ago•0 comments

Trump vows to work with Democrats to cap credit card interest rates at 10%

https://apnews.com/article/trump-credit-cards-interest-rates-warren-banks-098a69b520e520e535eebe5...
1•petethomas•57m ago•1 comments

Macaron – Turn customer messages into fixes ready for review

https://macaron.sh
1•garagemanda•58m ago•0 comments