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.

AI agents are briefly overhyped

https://stevekrouse.com/agent-hype
1•stevekrouse•1m ago•0 comments

To Make Orchestras More Diverse, End Blind Auditions

https://www.nytimes.com/2020/07/16/arts/music/blind-auditions-orchestras-race.html
1•bilsbie•3m ago•0 comments

Meta faces New Mexico trial that could force change to Facebook, other platforms

https://www.reuters.com/legal/government/meta-faces-new-mexico-trial-that-could-force-changes-fac...
3•1659447091•12m ago•0 comments

The Race Is on to Find the Treasure Buried in San Francisco

https://www.nytimes.com/2026/05/02/us/san-francisco-buried-treasure-chest.html
1•mistersquid•15m ago•0 comments

AWS Lightsail's $0.09/GB Bandwidth Overage Is a Trap for Small Projects

https://galaxycloudsolutions.com/blog/aws-lightsail-vs-galaxy-cloud-solutions/
2•rougereaper420•17m ago•0 comments

With $1 Cyberattacks on the Rise, Durable Defenses Pay Off

https://spectrum.ieee.org/ai-cyberattacks-memory-safe-code
1•rbanffy•24m ago•0 comments

Coatue has a plan to buy up land for data centers, possibly for Anthropic

https://techcrunch.com/2026/05/01/coatue-has-a-plan-to-buy-up-land-for-data-centers-possibly-for-...
1•Brajeshwar•24m ago•0 comments

The Computer Programme Episode 1, 1982 [video]

https://archive.org/details/the_computer_programme_ep01
2•petethomas•25m ago•0 comments

Voice-AI-for-Beginners – A curated learning path for developers

https://github.com/mahimairaja/voiceai
2•mahimai•30m ago•0 comments

Restorative Yoga and the Biology of Belonging

https://parrik.com/puzzles/the-partition-problem/
1•parrik•30m ago•0 comments

Facepunch launches s&box, the highly anticipated successor to Garry's Mod

https://www.gamingonlinux.com/2026/04/facepunch-launches-s-box-the-highly-anticipated-successor-t...
4•embedding-shape•32m ago•1 comments

Dynamic Traefik configuration with multiple Docker hosts

https://blog.vasi.li/automating-mantrae-traefik-management-with-mantrae-agent/
2•vsviridov•33m ago•0 comments

Grinta – Local-first coding agent, 7 months solo, open source today

https://github.com/josephsenior/Grinta-Coding-Agent
1•YoussefMejdi•34m ago•1 comments

Trump's border wall expansion just bulldozed an ancient tribal site

https://www.washingtonpost.com/climate-environment/2026/04/30/border-wall-damage-indigenous-arizona/
4•gnabgib•36m ago•0 comments

What Is GStack? Gary Tan's Open-Source Startup Framework for Claude Code

https://www.mindstudio.ai/blog/what-is-gstack-gary-tan-claude-code-framework
2•evo_9•39m ago•0 comments

The physics slop that YouTube wants me to make [video]

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

Built this for my civil engineering firm's static site on Cloudflare Pages

https://github.com/bwengr/knowledge-base-spec
1•bwengr•42m ago•0 comments

How to run a cross-cutting campaign

https://parrik.com/puzzles/the-campaign-cascade/
1•parrik•46m ago•0 comments

NovAST

https://github.com/sharkkyyy10/NovAST
2•sharkkyyy10•53m ago•0 comments

The Apprehension Engine (2022)

https://guitar.com/features/interviews/the-apprehension-engine-most-terrifying-musical-instrument/
1•turtleyacht•54m ago•1 comments

A self was never flat

https://parrik.com/puzzles/know-thyself/
1•parrik•57m ago•0 comments

Martian Glaciers with Drones

https://nautil.us/uncovering-hidden-martian-glaciers-with-drones-1280400
1•Brajeshwar•57m ago•0 comments

talkie-coder: From 1930 to SWE-bench

https://github.com/RicardoDominguez/talkie-coder
1•Philpax•57m ago•0 comments

Clojurists Together – Q2 2026 Open Source Funding Announcement

https://www.clojuriststogether.org/news/q2-2026-funding-announcement/
7•dragandj•59m ago•0 comments

Hostis Humani Generis

https://hostis.black/
2•g4k•1h ago•0 comments

Chinese Government Just Got Largest Digital Rights Conference Canceled

https://www.wired.com/story/the-chinese-government-pressured-zambia-to-cancel-the-worlds-largest-...
1•thesmtsolver2•1h ago•0 comments

Show HN: Headcam - head tracking & streaming app (iOS) [video]

https://www.youtube.com/watch?v=s8khQ_-6aM8
1•itsloopyo•1h ago•0 comments

How the vinyl revival fills the gaps streaming left behind

https://restofworld.org/2026/vinyl-revival-streaming-gaps/
3•billybuckwheat•1h ago•0 comments

Show HN: Plannotator for Codex

https://twitter.com/plannotator/status/2050683552581468172
2•ramoz•1h ago•1 comments

Show HN: State of the Art of Coding Models, According to Hacker News Commenters

https://hnup.date/hn-sota
14•yunusabd•1h ago•6 comments