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.

Jason Schreier of Bloomberg: "Gears of War: E-Day cost $500M to Xbox" [video]

https://www.youtube.com/watch?v=Dx0b2Xbnnrc
1•TMWNN•1m ago•0 comments

The biggest feud in artificial intelligence

https://www.afr.com/technology/inside-the-biggest-feud-in-artificial-intelligence-20261026-p618lx
1•jacquesm•1m ago•0 comments

Show HN: Fail2Ban Notifier

https://github.com/eyeskiller/fail2ban-notifier
1•eyeskiller•2m ago•0 comments

New book makes fiery claims about Jared Kushner's finances in Trump's first term

https://www.theguardian.com/us-news/2026/oct/28/jared-kushner-book-claims
3•ersinesen•4m ago•1 comments

I built a honeypot for LLMs, will a agent take the bait?

https://victorribeiro.com/bots/
1•atum47•5m ago•0 comments

GEMM Tutorial and UlmBLAS

1•michael-lehn•6m ago•0 comments

FAT32 File-System Seeing as Much as 265x Improvement with Linux 7.4

https://www.phoronix.com/news/Linux-7.4-Faster-FAT32
2•taubek•6m ago•0 comments

Linode Security Incident

https://status.linode.com/incidents/nt58zhx3pmgm
1•lacoolj•6m ago•0 comments

I created a 3D model viewer that runs in the terminal

https://github.com/Murat65536/dcat
1•bob65536•7m ago•1 comments

Show HN: I'm killing AI slop spam with a simple Google script

1•apparent•10m ago•0 comments

Ask HN: Are You a Forward Deployed Engineer?

2•tkdb•11m ago•2 comments

Colossus gives moguls the coverage they crave

https://sfstandard.com/2026/10/30/colossus-glossy-quarterly-silicon-valley/
2•ohjeez•13m ago•0 comments

Chainalysis Security Incident Information

https://www.chainalysis.com/blog/security-incident-october-30/
1•tumetab1•13m ago•1 comments

Ggwave – Data-over-Sound Library

https://github.com/ggerganov/ggwave
1•esher•15m ago•0 comments

We checked the 150 most popular Chrome extensions

https://app.extensionguardian.workers.dev/report/popular-chrome-extensions-2026
1•laboski•15m ago•0 comments

Ask HN: Will future archeologist know about us, with everything encrypted?

2•kbrannigan•15m ago•1 comments

First thing to ask when joining a team

https://weblogger.codeberg.page/posts/first-thing-to-ask-when-joining-a-team/
1•frevib•16m ago•0 comments

Why my AI agents keep lie-ing? How do we trust?

https://dotpals.vercel.app/
1•Rikin_shah•16m ago•2 comments

Wolfenstein 3D on the Atari 2600

https://forums.atariage.com/topic/394015-wolfenstein-3d-atari-2600-port-for-pluscartunocart/
2•RyuFromTheStree•16m ago•0 comments

Total Salary = Base Pay and Hazard Pay(Pt2): Career Optimization via Game Theory

https://medium.com/@saitoken330/total-salary-base-pay-hazard-pay-part-2-why-non-frontline-prefect...
1•7kago_yomi•16m ago•0 comments

How much of an environmental menace is AI?

https://www.cnn.com/2026/10/16/climate/ai-environmental-impact-energy-water-noise-explainer
1•conferza•19m ago•0 comments

AiDocEngine – MS Word, Excel, PDF Ingestion and Semantic Chunking for RAG

https://aidocengine.com
1•qaultradev•19m ago•0 comments

The Most Significant Moment in Math History Just Happened [video]

https://www.youtube.com/watch?v=3yXtXTwz4J4
1•pretext•20m ago•0 comments

Laws You Can Feel – Laws and heuristics deciding how an interface feels to use

https://lawsyoucanfeel.com/
1•nikolay•20m ago•0 comments

AI Capital Spending Is Booming. But What About Shareholder Returns?

https://michaelhillaert1.substack.com/p/valuation-dislocation-october-2026
2•michaelhillaert•22m ago•0 comments

Eulogy for the Software Engineer [video]

https://www.youtube.com/watch?v=uuKOXGVIP8I
1•linsomniac•28m ago•0 comments

Show HN: I turned mrdoob's Slop New York into a 3D billboard bidding game

https://makeitanywhere.xyz/
1•ymattia•28m ago•0 comments

Contract Watch – emails when a smart contract's code, owner or signers change

https://smartcontractauditor.ai/contract-watch
2•ninjafromqueens•31m ago•0 comments

Wall Street closes sharply lower as AI cash burn fears spark tech selloff

https://www.reuters.com/business/nasdaq-futures-tumble-amazon-intel-results-deepen-ai-spending-wo...
6•geox•31m ago•0 comments

Sanstun: A sans-IO, parallel-friendly WireGuard implementation in Rust

https://www.firezone.dev/blog/introducing-sanstun
3•wh33zle•34m ago•0 comments