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.

Show HN: Harness for building/cloning SaaS using open-weight models

https://neander.ai/
1•kushjoy•2m ago•0 comments

We don't need no education platform evolution

https://www.theregister.com/columnists/2026/11/16/we-dont-need-no-education-platform-evolution-he...
1•zombot•4m ago•0 comments

Pi-memory: persistent memory extension for pi

https://github.com/jayzeng/pi-memory
1•_kb•7m ago•0 comments

Adopting AI inside an organization that has to pass a compliance audit

https://zimmergren.net/ai-and-compliance/
2•zimmergren•11m ago•0 comments

AI Slop Spiral

https://nolanfrausto.com/posts/ai-slop-spiral/
2•frausto•11m ago•0 comments

Android Fast Switch looks like Google's answer to iPhone Handoff

https://www.androidauthority.com/android-fast-switch-handoff-3735737/
2•thunderbong•17m ago•0 comments

40-domain study: 80% of Shopify stores expose /API/ucp/MCP, 0% /agents.md

https://verisource.dev/benchmarks/ai-search-readiness-2026
1•kulinichnick•20m ago•0 comments

I built GURU. The open source ultimate hacker tool ANYBODY can use

https://github.com/GuruProduction/GURUbyUnusLumen
3•introducingGURU•20m ago•0 comments

Anyone Uses Perplexity? and for What?

2•aashu_bel•22m ago•0 comments

What Is the Internet?

https://www.tinylogger.com/max/f6DDYMm6gJRDDgXl
1•kurinikku•24m ago•0 comments

Maxwell V1 Flash

https://huggingface.co/maxwell-model/Maxwell-V1-Flash
1•ByteAtATime•25m ago•0 comments

Clarification Statement on Wall Street Journal's Article

https://www.mha.gov.sg/media-room/newsroom/clarification-statement-on-wall-street-journals-article/
1•aurareturn•26m ago•0 comments

15M emails and documents reveal the dark secrets of Deutsche Bank

https://www.spiegel.de/wirtschaft/unternehmen/deutsche-bank-datenleak-inside-deutsche-bank-enthue...
2•doener•27m ago•0 comments

Rex Demo: Remote Copy/Paste, Drag/Drop, and Port Forwarding [video]

https://www.youtube.com/watch?v=pkH_WJApzH0
1•nikolay•27m ago•0 comments

The Productivity Trap

https://lindbakk.com/blog/the-productivity-trap
1•atomfinger•28m ago•0 comments

Claude Code Course: Credits Included

1•feynmansletters•29m ago•0 comments

Mizan bias benchmark: testing AI models

https://mizan.techforpalestine.org/hostage-or-detainee/
1•k1m•30m ago•0 comments

TokenEconomizer: Learning from Experience to Make AI Coding Agents Efficient

https://www.microsoft.com/en-us/research/blog/tokeneconomizer-learning-from-experience-to-make-ai...
1•matt_d•31m ago•0 comments

OVH releases first model with EU public funding and supercomputer access

https://twitter.com/olesovhcom/status/2122573582911869173
4•noplay•34m ago•0 comments

Show HN: Groovyfmt, a fast formatter for Groovy, Gradle and Jenkinsfiles

https://github.com/costajohnt/groovyfmt
1•costajohnt•34m ago•0 comments

Trump's stake in Nvidia grew to as much as $62M before scandal broke out

https://www.washingtonpost.com/business/2026/11/16/trumps-stake-nvidia-grew-much-62-million-befor...
1•doener•36m ago•0 comments

Sacha Baron Cohen Emails Sheryl Sandberg

https://twitter.com/TechEmails/status/2121994481797136583
2•theanonymousone•36m ago•0 comments

OpenScientist: An Open AI System That Automates Biomedical Research

https://www.nature.com/articles/s41591-026-04808-6
1•tibastral2•37m ago•0 comments

Building a Rust-Native, Cross-Language Foundation for Agentic ML Compilers

https://tvm.apache.org/2026/11/16/rust-native-cross-language-ml-compiler-foundation
1•matt_d•38m ago•0 comments

Collatz Conjecture (2022)

https://zerolimits.dev/blog/collatz-conjecture
1•sammatilda•41m ago•0 comments

California sues ChatGPT maker OpenAI over rogue hacking incidents

https://www.nbcnews.com/tech/tech-news/california-sues-chatgpt-maker-openai-rogue-hacking-inciden...
1•slu•42m ago•0 comments

Beyond Score Centering: What Else Can We Optimize in Async RL?

https://sky-posttrain.github.io/score-centering-async-rl/
1•matt_d•42m ago•0 comments

Show HN: Backplane – An AI Development Environment for Hardware

https://backplaneworks.com/
2•i2cjak•43m ago•1 comments

Releasing Personal Agent Protocol 1.0

https://sierra.ai/blog/releasing-poppy
1•gmays•54m ago•0 comments

Building Always-On Agents

https://claude.com/resources/articles/building-always-on-agents
2•gmays•54m ago•0 comments