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.

Pipelog – I kept losing track of what Claude Code did, so I built a log for it

https://pipelog.dev/
1•phironaka•1m ago•0 comments

The State of Agentic Memory

https://medium.com/@majid.fekri/the-state-of-agentic-memory-497d687e0488
1•supportm•1m ago•0 comments

Jay Miner on the History of the Amiga [video]

https://www.youtube.com/watch?v=nRHQHZhbocw
1•doener•5m ago•1 comments

Show HN: Self-Hosted Inference for Agents

https://github.com/superlinked/sie
1•rafaepta•6m ago•1 comments

Rogue AI agent hacks gym to get its user a spot in a popular class

https://www.the-independent.com/tech/security/ai-agent-hacks-gym-openclaw-anthropic-b3030267.html
1•mellosouls•6m ago•0 comments

An Approach to Technical AGI Safety and Security, DeepMind (GDM)

https://gdmalignment.substack.com/p/agi-safety-and-alignment-at-google
1•aigalaxiome•7m ago•0 comments

The lattice of sets of natural numbers is rich

https://jdh.hamkins.org/the-lattice-of-sets-of-natural-numbers-is-rich/
1•benmandrew•8m ago•0 comments

HLSmith: An Expert-Guided Agentic Framework for C/C++-to-HLS Translation

https://arxiv.org/abs/2608.06791
1•rbanffy•9m ago•0 comments

Web Design for Terminal Browsers

https://en.andros.dev/blog/70d817e8/web-design-for-terminal-browsers/
1•andros•10m ago•0 comments

XenDroid – Android Xbox 360 Emulator

https://github.com/rfandango/XenDroid
1•Topfi•11m ago•0 comments

AI's profits are 'being funded by investors rather than earned from customers

https://fortune.com/2026/08/10/torsten-slok-ai-profit-margins-capex-oracle/
5•Anon84•12m ago•0 comments

Call Stack Diffs

https://oskrim.github.io/engineering/2026/08/02/call-stack-diffs.html
1•oskrim•13m ago•0 comments

What Is Docker, and What It Silently Replaced

https://fagnerbrack.com/what-is-docker-and-what-it-quietly-replaced-602ceb3c9205
1•fagnerbrack•13m ago•0 comments

How to Use Podman for Home Lab Setup

https://oneuptime.com/blog/post/2026-03-18-use-podman-home-lab-setup/view
2•speckx•14m ago•1 comments

How to Improve Your First Principles Thinking Skills

https://www.philmckinney.com/how-to-improve-your-first-principles-thinking-skills/
1•fagnerbrack•14m ago•0 comments

A Growing Threat: The Anti-Rights Movement in the UK (By Amnesty International)

https://archive.org/details/report-a-growing-threat-the-anti-rights-movement-in-the-uk-july
2•latexr•15m ago•0 comments

How to Overcome Confirmation Bias

https://www.philmckinney.com/how-to-overcome-confirmation-bias/
1•fagnerbrack•15m ago•0 comments

The BS That Is Generated by Wellness Apps

https://theskepticalcardiologist.substack.com/p/on-the-massive-bs-that-is-generated
1•elo2000•16m ago•0 comments

Failing After Success

https://idiallo.com/blog/failing-after-success
1•vcfgdev•16m ago•0 comments

OpenAI / Hugging Face Hack

https://smlx.dev/posts/openai-huggingface/
1•frizlab•19m ago•0 comments

Amazon DynamoDB now supports real-time vector search at any scale

https://aws.amazon.com/blogs/aws/amazon-dynamodb-now-supports-real-time-vector-search-at-any-scale/
1•root-parent•20m ago•0 comments

Using AI to analyze life patterns

https://vkrakovna.wordpress.com/2026/07/30/using-ai-to-analyze-life-patterns/
1•surprisetalk•20m ago•0 comments

China is now the world's greatest oil power

https://www.economist.com/finance-and-economics/2026/08/09/china-is-now-the-worlds-great-oil-power
2•bookofjoe•20m ago•1 comments

Primus AI Researcher – Free

https://lab.cloud/
1•anonymous_llama•21m ago•0 comments

Colombia Hit by Magnitude 7.4 Quake, Widespread Damage Reported

https://www.bloomberg.com/news/articles/2026-08-10/colombia-hit-by-strong-earthquake-that-shakes-...
4•alephnerd•23m ago•0 comments

Foxes, Lions, and LLMs: The Machiavellian Game of Tech Hiring

https://twitter.com/0xb33bs/status/2086809075631763920
2•0xbeebs•23m ago•0 comments

AI Fortunes Are Reviving an Old Debate About Private Power

https://ai-updates.net/ai-fortunes-philanthropy-private-power/
2•ashurandi•24m ago•0 comments

The Final Third Football

https://thefinalthirdfootball.substack.com/
1•Africanway•25m ago•0 comments

Humanising LLM Outputs Is Dumb

https://kuber.studio/blog/Reflections/Humanising-LLM-Outputs-is-Actually-Dumb
2•kuberwastaken•26m ago•0 comments

Archer to Acquire Wisk, Insitu, and SkyGrid from Boeing

https://archer.com/news/archer-to-shape-physical-ai-future-of-aerospace-and-defense-with-acquisition
1•kejaed•27m ago•0 comments