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.

Music has scales / raagas. What about storytelling in movies and prestige shows?

https://arc.quanten.co/archetype
1•phaedrus044•2m ago•1 comments

Trump-style war on windmills spreads across Europe

https://www.politico.eu/article/trump-style-anti-windmill-crusade-surges-in-europe/
1•leonidasrup•6m ago•0 comments

Show HN: Java/Spring Boot Idempotency Library

https://github.com/josipmusa/idempotency4j
1•anaq42•7m ago•0 comments

Mass NPM Supply Chain Attack Hits TanStack, Mistral AI, and 170 Packages

https://safedep.io/mass-npm-supply-chain-attack-tanstack-mistral/
1•birdculture•7m ago•0 comments

Germany's Decline in Data

https://ourdeclineindata.com/
2•mpweiher•12m ago•1 comments

Yet Another Boilerplate

https://www.indiehackers.com/SugarDaddyApp
1•iamkrazy•20m ago•1 comments

People Who Don't Like People Are Making All of Our Decisions

https://www.theatlantic.com/ideas/2026/05/waymo-self-driving-cars/687119/
2•thm•20m ago•0 comments

The Great Reset: Navigating a Turbulent Post-AI World

https://breadcrumb.vc/the-great-reset-navigating-a-turbulent-post-ai-world-4b5b4d434c5b
1•sameer_singh17•24m ago•0 comments

Fried Quotations

https://docs.factorcode.org/content/article-fry.html
1•tosh•25m ago•0 comments

Keeping your GitHub Actions and workflows secure: Preventing pwn requests (2021)

https://securitylab.github.com/resources/github-actions-preventing-pwn-requests/
1•thinkingemote•25m ago•0 comments

Show HN: Aptui-TUI package manager for APT-based Linux distributions

https://github.com/mexirica/aptui
1•mexirica•25m ago•0 comments

Show HN: Alacritree, terminal with built-in worktree management

https://github.com/mathix420/alacritree
3•mathix•28m ago•2 comments

Is the modern premium EDC knife markup justified?

http://Link:paragon-knives.com
1•bgzlsxaz•28m ago•0 comments

Rob Pike: Tech industry losing its soul

https://hachyderm.io/@robpike/116557975987213548
1•anygivnthursday•29m ago•0 comments

Fortress Co-Founder Allegedly Extorted by Sexual Partner

https://www.wsj.com/us-news/law/fortress-co-founder-allegedly-extorted-by-sexual-partner-ee9d6666
2•Michelangelo11•31m ago•0 comments

Arene Base

https://github.com/woven-by-toyota/arene-base
1•intern4tional•31m ago•2 comments

Made a New Side Project - Free to use

https://old.reddit.com/r/sideprojects/comments/1tabelm/finished_making_this_url_shortener_complet...
1•godlymod•33m ago•0 comments

Build, edit, and analyze forms directly in Claude

https://www.jotform.com/claude/
1•aytekin•33m ago•0 comments

Linux bitten by second vulnerability in as many weeks

https://arstechnica.com/security/2026/05/linux-bitten-by-second-severe-vulnerability-in-as-many-w...
3•isaacfrond•35m ago•0 comments

Show HN: An implementation of Common Lisp in development, reached version 1.6

https://savannah.nongnu.org/news/?id=10889
1•andreamonaco•35m ago•0 comments

Relieving power grids: Parked electric cars charge electric ferries

https://www.heise.de/en/news/Relieving-power-grids-Parked-electric-cars-charge-electric-ferries-1...
1•doener•35m ago•0 comments

Improving Technical Documentation with Mermaid Diagrams

https://mdview.io/s/mermaid-diagrams-for-software-developers
2•Igor_Wiwi•40m ago•0 comments

LLM Hallucinations in the Wild

https://arxiv.org/abs/2605.07723
1•anygivnthursday•41m ago•1 comments

Peter Wang: The Life of Py My First 20 Years of Python [video]

https://www.youtube.com/watch?v=dtS0SEdhbbg
1•tosh•42m ago•0 comments

CSS Rhythmic Sizing Module Level 1

https://www.w3.org/TR/css-rhythm-1/
1•gudzpoz•44m ago•0 comments

Strange crystals found inside wreckage from the first nuclear bomb test

https://www.scientificamerican.com/article/strange-crystals-found-inside-wreckage-from-the-first-...
2•beardyw•45m ago•0 comments

Can a Language Model Paint?

https://www.etive-mor.com/blog/can-a-language-model-paint/
3•liamlaverty•46m ago•2 comments

The Scrum decline: It's three years later, and I was right

https://www.leadinginproduct.com/p/scrum-decline
1•benkan•47m ago•1 comments

Anthropic's Mythos was greatest marketing stunt ever, says cURL creator

https://www.theregister.com/security/2026/05/11/anthropics-bug-hunting-mythos-was-greatest-market...
1•isaacfrond•47m ago•0 comments

Microsoft researchers find AI models and agents can't handle long-running tasks

https://www.theregister.com/ai-ml/2026/05/11/microsoft-researchers-find-ai-models-and-agents-cant...
2•beardyw•50m ago•0 comments