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.

OpenAI and Anthropic models 'went rogue' during UK cybersecurity test

https://www.theguardian.com/technology/2026/aug/05/openai-anthropic-models-went-rogue-cybersecuri...
1•ablation•43s ago•0 comments

AI's Arctic Land Grab

https://www.arctictoday.com/ai-arctic-land-grab/
1•NishanStepak•1m ago•1 comments

Why smarter AI models could drive up compute prices 10x

https://www.dwarkesh.com/p/why-compute-might-get-10x-more-expensive-video
1•mefengl•3m ago•1 comments

Callosium, one shared memory for every AI, in plain Markdown files

https://github.com/callosium/callosium
1•amk96•4m ago•0 comments

Pentect: Let agents use secrets without seeing them

https://pentect.dev/start/what-is-pentect/
1•kozika•5m ago•0 comments

My thoughts on the foreign policy AI evaluation gap

https://www.karlsnotes.com/my-thoughts-on-the-foreign-policy-ai-evaluation-gap/
1•valkrieco•9m ago•0 comments

AI-generated stories rated better quality than human-written ones, study finds

https://www.theguardian.com/technology/2026/aug/05/ai-generated-stories-rated-better-quality-than...
2•amichail•9m ago•0 comments

Offline-First Data Architecture for a National Postal Service

https://necromant2005.github.io/dev/offline-first-data-architecture-for-a-national-postal-service/
1•rmykhajliw•11m ago•0 comments

Technology executives shouldn't give up control

https://kimchi.dev/blog/technology-executives-shouldnt-give-up-control
1•BlackPlot•12m ago•0 comments

Tech giant Palantir accused of 'agressive tax avoidance' at Europe's expense

https://www.ftm.eu/articles/us-tech-giant-palantir-tax-avoidance-europe
2•robtherobber•13m ago•0 comments

Four Days After a Pay Complaint, Cobot Fired Its Only Woman in Sales

https://runtimewire.com/article/exclusive-four-days-after-a-pay-complaint-cobot-fired-its-only-wo...
1•ryanmerket•16m ago•0 comments

An Exegesis of the Visionary Autobiography of a Fourteenth-Century French Monk

https://www.psupress.org/books/titles/978-0-271-06650-9.html?srsltid=AfmBOorGIOS9Y77k3J_CX6UWqfZl...
1•Bluestein•16m ago•0 comments

Out-of-control SpaceX rocket believed to have smashed into the Moon

https://www.independent.co.uk/space/spacex-rocket-moon-crash-falcon-9-b3027645.html
1•emot•18m ago•0 comments

Helsinki Hacker News Meetup

https://calpaterson.com/helsinki-hn.html
3•calpaterson•18m ago•1 comments

Nixpkgs has a due-process problem

https://domenkozar.com/2026/08/04/nixpkgs-has-a-due-process-problem/
1•ai_critic•20m ago•0 comments

Kernel Fusion in Nvidia CUDA: Optimizing Memory Traffic and Launch Overhead

https://developer.nvidia.com/blog/kernel-fusion-in-nvidia-cuda-optimizing-memory-traffic-and-laun...
1•fzimmermann89•20m ago•0 comments

Show HN: Bitbead – Photo to printable bead pattern, in the browser

https://www.bitbead.app/en
1•shouqing_qiao•21m ago•0 comments

Hoodik: A lightweight, self-hosted, end-to-end encrypted cloud storage server

https://github.com/hudikhq/hoodik
3•taubek•23m ago•0 comments

AI artefacts are the new Access databases

https://sjg.io/writing/your-next-access-database-problem-is-an-ai-agent/
1•simonjgreen•27m ago•0 comments

Trump's Push for More A.I. Data Centers Will Mean Major Air Pollution

https://www.nytimes.com/2026/08/05/climate/data-centers-pollution-trump-ai-energy.html
2•quapster•27m ago•0 comments

Under the Hood of Codex Security

https://twitter.com/GustavHartz/status/2084926544800035266
3•GustavHartz•30m ago•1 comments

Building a Rust Inference Engine That Matches Llama.cpp

https://www.fratepietro.com/2026/ferrox-rust-gguf-inference-engine/
2•antonellof•34m ago•0 comments

Remover – AI tool to remove unwanted objects from videos

https://remover.work
1•lisaluan•34m ago•0 comments

GitHub Account Breach Fuels Shai-Hulud NPM Supply Chain Attack

https://www.esecurityplanet.com/threats/github-account-breach-fuels-shai-hulud-npm-supply-chain-a...
2•doodlebugging•38m ago•1 comments

Hackers' AI chat logs reveal evolving tactics

https://www.axios.com/2026/08/04/exclusive-hackers-ai-chat-logs-reveal-evolving-tactics
3•laacz•41m ago•0 comments

Show HN: I created a new Deep Learning Framework

https://picodl.vercel.app
1•alight•41m ago•0 comments

US Military GPS jamming operations cause civilian aircraft crash and wildfires

https://apnews.com/article/new-mexico-plane-crash-medevac-ntsb-gps-d95ba57711f926082d7f11d2c20f0f0d
6•ambigious7777•44m ago•0 comments

The workers caught in the AI transition

https://www.bbc.com/news/articles/cgr7nxve05go
1•geox•44m ago•0 comments

I-have-ADHD – A skill for coding assistant that stops it from burying the answer

https://github.com/ayghri/i-have-adhd
1•vismit2000•44m ago•0 comments

Brk or bust – a Kelly bet simulator

https://jaamesd.github.io/kelly-game/
1•andromeduck•47m ago•0 comments