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: A dashboard for tracking usage limits across Claude, Codex, and Cursor

https://www.usagebuddy.com/
1•bhavyshekhaliya•3m ago•0 comments

Walgit: A Git server that is one binary in front of an object store

https://github.com/rgodha24/walgithub
1•handfuloflight•5m ago•0 comments

Show HN: CoordMap – free browser tools for coordinates, elevation, and distance

https://www.coordmap.com/
1•luoluoecho•8m ago•0 comments

Trading a Cloud Identity for Your Own: Workload Attestation on Managed Compute

https://netflixtechblog.com/trading-a-cloud-identity-for-your-own-workload-attestation-on-managed...
1•mfrw•14m ago•0 comments

Were 1970s Korean Orphanages a Great Place to Raise Kids?

https://www.richardhanania.com/p/were-1970s-korean-orphanages-a-great
1•barry-cotter•22m ago•0 comments

A thesis isn't enough for a PhD

https://lemire.me/blog/2026/09/26/a-thesis-isnt-enough-for-a-phd/
2•smilelamp•24m ago•0 comments

Revelations of dozens more platforms hit by OpenAI agents

https://www.abc.net.au/news/2026-09-26/openai-review-rogue-agents-australia-medicare-hack/107199074
2•soundworlds•26m ago•0 comments

The Universe Rendered in ASCII

https://gcdatlas.vercel.app/
1•chaosmachine•27m ago•0 comments

We're gonna need a lot more mathematicians

https://terrytao.wordpress.com/2026/09/24/were-gonna-need-a-lot-more-mathematicians/
1•srcreigh•28m ago•0 comments

Show HN: Safe-fetch – a Python URL fetcher with per-redirect address checks

https://github.com/Rehanfaisal/ssrf-safe-fetch
1•rehandevv•33m ago•0 comments

Eremina Desertorum

https://en.wikipedia.org/wiki/Eremina_desertorum
1•thunderbong•43m ago•0 comments

Lix: Version control system for files and tables

https://lix.dev
2•handfuloflight•47m ago•1 comments

Guitar amp and effects pedal built on the Waveshare ESP32-S3-Touch-AMOLED-2.06

https://github.com/dashersw/coyopedal
1•arbayi•50m ago•0 comments

ShinyHunters Renewed Mass Exploitation Campaign Targeting Oracle PeopleSoft

https://cloud.google.com/blog/topics/threat-intelligence/shinyhunters-renewed-mass-exploitation-c...
2•882542F3884314B•54m ago•0 comments

Faster Transport on Cloud Infra

https://quasiben.github.io/blog/efa-aws/
3•quasiben•54m ago•0 comments

Yamtam.nyc – yet another mass-transit all-in-one map

https://yamtam.nyc
2•tolidano•55m ago•3 comments

Deep Scattering Layer

https://en.wikipedia.org/wiki/Deep_scattering_layer
1•gradus_ad•58m ago•0 comments

Velum: CosyVoice in a Single Binary for Deployment

https://github.com/hardenedlinux/velum
1•nalaginrut•58m ago•0 comments

The Major Social Media Platforms Are All Rejecting Paid Ads for Gibney's 'Musk'

https://www.hollywoodreporter.com/business/digital/elon-musk-documentary-trailer-rejected-tiktok-...
5•lapcat•59m ago•1 comments

NetBSD: Playing with Disklabels

https://movq.de/blog/postings/2026-09-25/0/POSTING-en.html
1•jaypatelani•59m ago•0 comments

WSL as a Blind Spot for Enterprise Endpoint DLP Controls

https://zenodo.org/records/22961986
1•nsainaveen•1h ago•1 comments

Laya, Jev, and the work of keeping answers close to the page

https://openbrowser-landing.pages.dev/context-atlas-blog/
1•billy-enrizky-1•1h ago•0 comments

A security website that is a filesystem

https://l1ackers.com
2•m4y0u•1h ago•2 comments

Hard Stop: Kernel-Level Preemption and Containment for Rogue Agentic Execution

https://arxiv.org/abs/2609.29808
1•sbulaev•1h ago•0 comments

FruitMenu Redux

https://mjtsai.com/blog/2026/09/25/fruitmenu-redux/
1•tbodt•1h ago•0 comments

Show HN: The Human Frequency

https://humans-only.cloudflare-ryan.workers.dev/
1•ryanbuening•1h ago•0 comments

TikTok to pay $100M and limit daily child usage in Alabama settlement

https://www.bbc.com/news/articles/cmgjqq54dlx0o
2•defrost•1h ago•0 comments

HomelabFest will be in St. Louis in September 2027

https://www.homelabfest.org
3•geerlingguy•1h ago•1 comments

Jury finds Facebook liable for deceiving users in Cambridge Analytica case

https://www.cbsnews.com/news/facebook-liable-deceiving-users-cambridge-analytica/
72•pseudolus•1h ago•7 comments

Overview of Manhattan's Infrastructure and Metabolism

https://new-york-urban-metabolism.pages.dev/
2•measurablefunc•1h ago•0 comments