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: Argentic – An L402 Lightning toll booth for AI scraping agents

https://Argentic.network
1•Ag0146•22s ago•0 comments

AI CMS with WebMCP tools for agents in admin panel

https://aliothpress.com/cms-for-ai-agents-webmcp-built-in
1•nikariguel•4m ago•0 comments

The /Wayfinder Skill: Navigating the "Fog of War" of Planning

https://www.latent.space/p/wayfinder-skill
1•swyx•5m ago•0 comments

First giant tuna caught off Yorkshire since 1960s

https://www.bbc.com/news/articles/c9w04005veqo
2•teleforce•7m ago•0 comments

Robot Comment Classifier

https://entropicthoughts.com/ai-comment-classifier
2•kqr•7m ago•0 comments

Repository Is Your Swarm

https://nicktrevino.com/your-repository-is-your-swarm.html
1•Hyperlisk•14m ago•0 comments

Open Sourcing the YC Application

https://metorial.com/blog/open-sourcing-the-yc-application
1•LYFMail•16m ago•0 comments

Hilbert Curve

https://en.wikipedia.org/wiki/Hilbert_curve
2•pykello•17m ago•0 comments

Why Do We Feed Wildlife?

https://thetyee.ca/News/2026/08/20/Why-Do-We-Feed-Wildlife/
3•wertyk•20m ago•0 comments

Schooling Has a Meaning Crisis. Paradoxically, AI Can Help

https://blog.comini.in/p/schooling-has-a-meaning-crisis-paradoxically
1•vismit2000•20m ago•0 comments

GitHub Actions vs. GitLab Pipeline

https://medium.com/playground-tech/github-actions-vs-gitlab-pipeline-2368e9a27f68
1•caulagi•27m ago•0 comments

AWS Bedrock AgentCore enforces user context to prevent hijacked AI agents

https://techupdate24.com/aws-bedrock-agentcore-hijacked-ai-security/
2•sysadmin_diarie•28m ago•0 comments

Elven Rope, Ultra-High Molecular Weight Polyethylene, and LLMs (2025)

https://vgel.me/posts/elven-rope-and-llms/
2•networked•28m ago•0 comments

Testing CUDA kernel execution with GPU correctness harness

https://github.com/IshwaryaRavichandran/gpu-correctness-harness
2•laxmena•29m ago•0 comments

Show HN: Open source math games and puzzles

https://theorem.games/
3•Zebfross•33m ago•1 comments

Thousands of years of indoor air pollution

https://www.slowboring.com/p/thousands-of-years-of-indoor-air
4•neehao•33m ago•0 comments

A Man Who Proved the Blue Zones Are Fake – Saul Newman [video]

https://www.youtube.com/watch?v=1ZE5ml7a6rE
2•neehao•34m ago•1 comments

OpenAI Is Backing Away from Reddit as Reddit Tries to Become OpenAI?

https://gizmodo.com/openai-is-backing-away-from-reddit-as-reddit-tries-to-become-openai-2000800060
5•helsinkiandrew•35m ago•1 comments

Pitfalls of Benchmarking on Modern Systems

https://stefan-marr.de/2026/08/pitfalls-of-benchmarking-on-modern-systems/
2•matt_d•35m ago•0 comments

Escaping the Quicksand: A Call to Arms

https://arxiv.org/abs/2608.19674
1•ahsillyme•38m ago•0 comments

The Religious Experience of Philip K. Dick by R. Crumb (1986)

https://philipdick.com/resources/miscellaneous/the-religious-experience-of-philip-k-dick-by-r-cru...
5•wise_blood•44m ago•0 comments

Cognition and consciousness arise from analog computations, says new theory

https://picower.mit.edu/news/cognition-and-consciousness-arise-analog-computations-says-new-theory
5•XzetaU8•46m ago•0 comments

Stop Making TUIs

https://sockpuppet.org/blog/2026/08/20/stop-making-tuis/
3•underdeserver•47m ago•2 comments

The superfast and compatible < 100kb pure HTML/oldJS Jellyfin front-end

https://www.reddit.com/r/jellyfin/comments/1vtcltb/meet_jellydinosaur_the_superfast_very_compatible/
1•wise_blood•52m ago•0 comments

Japan tried to build an operating system for the world, the US intervened

https://www.xda-developers.com/japan-tried-build-operating-system-entire-world-us-government-inte...
21•rdmuser•53m ago•4 comments

Meta's Global Playbook for Fighting Child Safety Laws

https://www.techtransparencyproject.org/articles/inside-metas-global-playbook-for-fighting-child-...
2•femto•53m ago•0 comments

Submit privacy-focused companies and projects on PrivBid.com

https://privbid.com/
1•CR1337•59m ago•0 comments

Code Doesn't Speak – It Compiles: Why Small Models Win

https://www.innerkore.com/blog/code-doesnt-speak-it-compiles-small-models-win/
1•gagan2020•1h ago•0 comments

Seed: Minimal, self-modifying agent harness

https://github.com/vivekhaldar/seed
2•gandalfgeek•1h ago•0 comments

Ask HN: Claude Code in Video Editor

2•eliseinicolae•1h ago•1 comments