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.

Onion Futures Act

https://en.wikipedia.org/wiki/Onion_Futures_Act
1•xvirk•2m ago•0 comments

Ask HN: How do you show your free software projects to the world?

1•MaxwellJensen•5m ago•1 comments

AI for Teams: Team-in-the-Loop

https://jitera.com/blog/team-in-the-loop/
2•jitera•6m ago•0 comments

Training language models to be warm can reduce accuracy and increase sycophancy

https://www.nature.com/articles/s41586-026-10410-0
1•Anon84•9m ago•0 comments

Australian police officers can be tracked via taser and body-cam bluetooth

https://www.abc.net.au/news/2026-05-04/police-location-tracked-bluetooth-flaw-axon-tasers-bodycam...
1•satori99•10m ago•0 comments

How A.I. Is Transforming China's Entertainment Industry

https://www.nytimes.com/2026/05/03/world/asia/china-microdrama-ai-backlash.html
2•Markoff•10m ago•1 comments

Duralang – decorator makes every LangChain LLM/tool/MCP call a Temporal Activity

https://temporal.io/code-exchange/duralang-durable-stochastic-ai-agents-with-one-decorator
2•deepanshsaxena•11m ago•0 comments

Most Companies Aren't Anywhere Near Ready for AI

https://danielmiessler.com/blog/most-companies-arent-ready-for-ai
1•rmason•13m ago•1 comments

WolfCOSE: Zero alloc, PQC, MISRA-C, FIPS 140-3 built with wolfCrypt

https://github.com/aidangarske/wolfCOSE
1•aidangarske•16m ago•0 comments

Performance of a large language model on the reasoning tasks of a physician

https://www.science.org/doi/10.1126/science.adz4433
1•kakoni•20m ago•1 comments

Llama.ttf: a font file which is also a large language model and inference engine

https://fuglede.github.io/llama.ttf/
1•smitec•23m ago•0 comments

Show HN: HypergraphZ – A Hypergraph Implementation in Zig

https://github.com/yamafaktory/hypergraphz
1•yamafaktory•23m ago•0 comments

Erm: A Local CLI That Strips Ums, Uhs, and Erms from Speech

https://doug.sh/posts/erm-a-local-cli-that-strips-ums-uhs-and-erms-from-speech/
1•dougcalobrisi•25m ago•0 comments

Show HN: Interpretable AutoResearch – Legible Agent Workflows

https://github.com/BarishNamazov/interpretable-autoresearch
2•barishnamazov•26m ago•0 comments

Bose SoundTouch Cloud Replacement

https://github.com/gesellix/Bose-SoundTouch
1•gesellix•32m ago•1 comments

My Agent Memory Library Helps Write Indie Articles

https://benemson.com/blog/agents/my-agent-memory-library-helps-write-indie-articles
1•emson•33m ago•2 comments

Skin Trackers – S&P-style indices for the CS2 skin market

https://skintrackers.com/en
1•Jorgin_•34m ago•1 comments

Urban Birds Are Rising Earlier Because of Traffic Noise (2013)

https://www.audubon.org/news/urban-birds-are-rising-earlier-because-traffic-noise
2•thunderbong•39m ago•0 comments

Technical Founders Misread Adoption

https://avelino.run/technical-founders-misread-adoption-rogers-pix/
2•rafaepta•40m ago•0 comments

WolfTPM TPM 2.0 Library Now Supports PQC Mldsa and Mlkem

https://www.wolfssl.com/wolftpm-add-tpm-2-0-v1-85-pqc-post-quantum-support/
1•aidangarske•44m ago•0 comments

Roger Penrose – Why Intelligence Is Not a Computational Process (2025)

https://www.youtube.com/watch?v=iTVN6tFknCg
2•weitzj•47m ago•0 comments

Claude Code Leak: 8100 Takedown Requests and the Birth of Claw-Code

https://www.heise.de/en/news/Claude-Code-Leak-8100-Takedown-Requests-and-the-Birth-of-Claw-Code-1...
2•smartmic•49m ago•0 comments

Professor's bold prediction: AI could help cure all diseases within a decade

https://excitech.media/p/professors-bold-prediction-ai-could
1•sminchev•52m ago•0 comments

One Interface for Everything

https://letsbuildsomething.substack.com/p/one-interface-for-everything
1•iancutzul•52m ago•0 comments

Only Law Can Prevent Extinction

https://www.lesswrong.com/posts/5CfBDiQNg9upfipWk/only-law-can-prevent-extinction
1•lumenwrites•52m ago•0 comments

New portable technology detects GPS spoofing in real time

https://www.ornl.gov/news/ornls-breakthrough-detector-protects-trucking-shipments-gps-deception
1•geox•53m ago•0 comments

My favorite adversarial review prompt

https://blog.fsck.com/2026/05/01/adversarial-review/
2•tie-in•53m ago•0 comments

Steam Controller

https://store.steampowered.com/hardware/steamcontroller
1•cl3misch•56m ago•0 comments

Show HN: Tyche: An experimental distributed trading pipeline in Go Java

https://github.com/ItsArnavSh/Tyche
2•itsarnavsh•58m ago•0 comments

QUIC packet rejection in practice – Iroh

https://www.iroh.computer/blog/quic-packet-rejection-in-practice
1•janandonly•1h ago•1 comments