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.

Record 274 climbers summit Everest from Nepalese side in single day

https://www.theguardian.com/world/2026/may/21/record-climbers-summit-everest-from-nepalese-side-i...
1•tosh•51s ago•0 comments

Show HN: Parseflow, how to parse documents when you're broke

https://docs.parseflow.tech/
1•bollethegoalie•2m ago•0 comments

Evolutionary Data Making – How to train embedding models

https://wafer.systems/blog/edm/
1•GRVYDEV•3m ago•0 comments

Segment Tree visualization – build, range query, point update

https://algo-rhythm.dev/en/segment-tree/
1•bytego•5m ago•0 comments

Ask HN: How are you proving your writing is human made?

2•mavilia•5m ago•0 comments

Museum of Pocket Calculating Devices

https://www.calculators.de/
2•ohjeez•8m ago•0 comments

Anthropic/Blackstone enterprise AI venture acquires Fractional AI

https://www.fractional.ai/press-releases/the-ai-native-enterprise-services-firm-announces-acquisi...
1•mkw5053•8m ago•1 comments

Show HN: Modernizing my old PhD work in an evening with little Qwen3.6 MoE

https://github.com/verdverm/pge-jax
1•verdverm•11m ago•0 comments

Kure – Kubernetes pod-failure monitor with LLM-assisted diagnosis

https://nan0c0de.github.io/kure-monitor/getting-started/installation/
1•igor-koricanac•11m ago•0 comments

New project drop, a desktop AI assistant. Check it out

https://github.com/HaraldBregu/friday
1•haraldbregu•12m ago•0 comments

Yearslong fight over users' right to tweak smart TV software heads to trial

https://arstechnica.com/gadgets/2026/05/inside-the-fight-to-force-vizio-to-share-linux-based-sour...
3•cf100clunk•13m ago•0 comments

A Lovable SaaS was leaking its customer list. Here's what to check

https://getvouch.net/
2•sufiyansj•13m ago•0 comments

Township Leader Resigns in Tears over OpenAI Data Center Death Threats

https://www.404media.co/township-leader-resigns-in-tears-over-openai-data-center-death-threats/
2•Brajeshwar•13m ago•0 comments

Ubu Roi

https://en.wikipedia.org/wiki/Ubu_Roi
1•helterskelter•14m ago•0 comments

It's Not Our Fault Your Account Was Hacked

https://twitter.com/dnaccess/status/2056790716605775994
1•bhartzer•15m ago•0 comments

The Measurement of Loudness

https://www.counting-stuff.com/the-measurement-of-loudness/
1•sebg•15m ago•0 comments

Show HN: GitVitae – Free hosted portfolio and resume for anyone

https://git-vitae.github.io/
1•amarbirsingh•16m ago•0 comments

AS202734 hijacked multiple Chinese Carriers on May 16-17

https://lists.nanog.org/archives/list/nanog@lists.nanog.org/message/MI6VWOX7XOCDIS244RLJSMS2ITZWT...
2•speckx•16m ago•0 comments

Reflections on Building Forum Software

https://www.counting-stuff.com/reflections-on-building-forum-software/
2•sebg•17m ago•0 comments

Show HN: Buildby – A CLI to find out what desktop apps are built with

https://github.com/wavever/buildby
1•wavever•17m ago•0 comments

Apple blocked billions in fraudulent transactions

https://www.bleepingcomputer.com/news/apple/apple-blocked-22-billion-in-fraudulent-app-store-tran...
3•theodore-1•17m ago•0 comments

Rethinking integration testing in the age of coding agents

https://thenewstack.io/ci-for-coding-agents/
2•anirudhrx•21m ago•0 comments

Vapi is having a major outage

https://status.vapi.ai/incident/901977
3•TealMyEal•21m ago•0 comments

Automating Osint/Google Dorking for LinkedIn with AI (GhostIn Alternative Tool)

https://www.ghostin.org/
1•MambaXan•21m ago•0 comments

Trump Plans to Sign Executive Order Granting Oversight of A.I. Models

https://www.nytimes.com/2026/05/21/technology/trump-ai-executive-order.html
5•cf100clunk•22m ago•1 comments

Memory Location Matters for Performance

https://pythonspeed.com/articles/performance-memory-locality/
1•tosh•24m ago•0 comments

Libraries Face Hard Choices Amid Constraint

https://www.insidehighered.com/news/faculty/research/2026/05/18/libraries-face-hard-choices-amid-...
1•speckx•25m ago•0 comments

The Metaverse Fever Dream

https://pxlnv.com/blog/metaverse-fever-dream/
1•zhenyi•25m ago•0 comments

Thank HN: You helped make Foqos a success, 100k downloads and 4k+ reviews, 4.9/5

https://github.com/awaseem/foqos
1•awaseem•27m ago•1 comments

Scammers are abusing an internal Microsoft account to send spam links

https://techcrunch.com/2026/05/21/scammers-are-abusing-an-internal-microsoft-account-to-send-spam/
3•Brajeshwar•27m ago•0 comments