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•8mo ago

Comments

zoezoezoezoe•8mo 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•8mo 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.

EngineAI T800: Humanoid Robot Performs Martial Arts Moves

https://scienceclock.com/engineai-t800-humanoid-robot-martial-arts/
4•notthesay•2m ago•0 comments

If AI Becomes Conscious, We Need to Know

https://www.wsj.com/opinion/if-ai-becomes-conscious-we-need-to-know-83aa61d8
2•kvee•10m ago•0 comments

Gleam: The happy holidays release 2025

https://gleam.run/news/the-happy-holidays-2025-release/
1•nateb2022•13m ago•0 comments

Ask HN: Why Do You Blog?

2•onesandofgrain•19m ago•0 comments

ARK's Aggressive Pivot: Wood Doubles Down on Tesla and Re-Enters Big Tech AI

https://www.13radar.com/guru/catherine-wood
1•EvansWilson•23m ago•1 comments

Moving Images Related to the Apollo Missions, 1967–1969

https://catalog.archives.gov/id/133360601
2•handfuloflight•28m ago•0 comments

TurboDiffusion: 100–200× Acceleration for Video Diffusion Models

https://github.com/thu-ml/TurboDiffusion
1•meander_water•28m ago•0 comments

WiFi DensePose: WiFi-based dense human pose estimation system through walls

https://github.com/ruvnet/wifi-densepose
4•nateb2022•29m ago•0 comments

Show HN: A Claude Code plugin that catch destructive Git and filesystem commands

https://github.com/kenryu42/claude-code-safety-net
1•kenryu•34m ago•0 comments

Show HN: I built a tutor that teaches only by asking questions

https://sovyr-learn.vercel.app/
1•hugholousk•45m ago•0 comments

Show HN: Fun sketch – Bring your sketches to life

https://funsketch.kigun.org/
1•mishu2•48m ago•0 comments

HUML (Human-oriented Markup Language) [video]

https://www.youtube.com/watch?v=4M_tD1N14Ao
1•manlymuppet•49m ago•0 comments

Mathematically extra-complicated Secretest Santa 2025 (suckerpinch/tom7) [video]

https://www.youtube.com/watch?v=4pG8_bWpmaE
1•tambourine_man•50m ago•0 comments

macOS Terminal – still missing the mark Apple

https://garrett.damore.org/2025/12/macos-terminal-still-missing-mark-apple.html
2•zdw•52m ago•0 comments

Make your PR process resilient to AI slop

https://www.pcloadletter.dev/blog/pr-review-ai-slop-resilience/
1•ronbenton•54m ago•0 comments

Instagram CLI – A terminal client to use social media more intentionally

https://github.com/supreme-gg-gg/instagram-cli
3•jetc•55m ago•1 comments

Golden Literal Testing in UTest 0.9.0

https://www.lihaoyi.com/post/GoldenLiteralTestinginuTest090.html
1•lihaoyi•55m ago•0 comments

The Year in Mathematics

https://www.quantamagazine.org/the-year-in-mathematics-20251218/
1•nsoonhui•57m ago•0 comments

In the world of Abundance

https://lazydevcoder.medium.com/in-the-world-of-abundance-e62c1e62f3d3
1•rammy1234•1h ago•0 comments

AiDirs

https://aidirs.best
1•ivanvolt•1h ago•0 comments

Bugs selected on Bt corn have wing shapes better suited to long distance flight

https://academic.oup.com/ee/advance-article/doi/10.1093/ee/nvaf117/8328228?login=false
3•PaulHoule•1h ago•0 comments

The changing drivers of LLM adoption

https://epochai.substack.com/p/the-changing-drivers-of-llm-adoption
1•gmays•1h ago•0 comments

Kuyan – a privacy-focused monthly net worth tracker

https://github.com/dc-shimla/kuyan
2•Sublevel2245•1h ago•1 comments

Ultimate-Linux: Userspace for Linux in Pure JavaScript

https://github.com/popovicu/ultimate-linux
2•radeeyate•1h ago•0 comments

Flying Taxis? China Has Them. and Drone Lunch Deliveries, Too

https://www.nytimes.com/interactive/2025/12/17/climate/china-hefei-clean-energy-drones-evs-robots...
1•impact_sy•1h ago•0 comments

Show HN: Built Natural Language Test Automation Tool – OpenQA

https://github.com/openqa-labs/openqa
1•gurvinderd•1h ago•0 comments

Archlinux.org is down due to DDoS

https://status.archlinux.org/
7•deevus•1h ago•1 comments

Top Data Insights and Gradient Updates of 2025

https://epoch.ai/blog/top-10-data-insights-and-gradient-updates-of-2025
1•redohmy•1h ago•1 comments

The Deep Dark Terroir of the Soul

https://aneeshsathe.com/2025/12/25/the-deep-dark-terroir-of-the-soul/
1•boredgargoyle•1h ago•0 comments

Built a podcast player for all my NotebookLM audio in one place

https://old.reddit.com/r/notebooklm/comments/1pvsuli/built_a_podcast_player_for_all_my_notebooklm/
1•trungpv1601•1h ago•0 comments