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.

When Steve Jobs Grew Up

https://www.thefp.com/p/steve-jobs-leadership-transformation
1•Michelangelo11•32s ago•0 comments

NegPy – Open-source (GPL-3) film negative converter

https://github.com/marcinz606/NegPy
1•marcinz606•2m ago•0 comments

Read-only developer endpoint scanner for on-disk package, extension

https://github.com/perplexityai/bumblebee
1•taubek•5m ago•0 comments

Scotland Yard can keep using live facial recognition on people in London- judges

https://www.theregister.com/security/2026/04/22/high-court-approves-met-polices-facial-recog-afte...
1•gnabgib•6m ago•0 comments

AI Translate All Formats

1•cadic2603•8m ago•0 comments

Cisco Foundry Security Spec: Open specification for agentic security evaluation

https://github.com/CiscoDevNet/foundry-security-spec
2•cpard•9m ago•0 comments

Why Japan has abandoned houses

https://thehustle.co/newsletters/13-05-2026
1•stephsmithio•11m ago•1 comments

Google vs. Perplexity Chrome Extension

https://github.com/sarons/dual-ai-chat
1•cybermango•12m ago•1 comments

Quantum Dynamics Breakthrough Overturns Claim of 'Quantum Supremacy'

https://www.simonsfoundation.org/2026/05/21/quantum-dynamics-breakthrough-overturns-claim-of-quan...
4•SiempreViernes•19m ago•0 comments

Free admission and discounted overnight stays with Parks Canada

https://parks.canada.ca/voyage-travel/conseils-tips/choisis-canada-choose/admission-camping
2•bookofjoe•21m ago•0 comments

Marimo: A Reactive Python Notebook

https://marimo.io
1•pmaddams•22m ago•0 comments

Why Most Senior Devs Plateau, and What to Do

https://stackandscale.substack.com/p/why-most-senior-developers-plateau
3•lucyb0207•25m ago•0 comments

Onfim

https://en.wikipedia.org/wiki/Onfim
3•Michelangelo11•27m ago•0 comments

You will not be a member of the permanent underclass

https://thingofthings.substack.com/p/you-will-not-be-a-member-of-the-permanent
1•paulpauper•31m ago•1 comments

Why reviewing AI-generated code is devilishly hard

https://www.spinellis.gr/blog/20260523/
2•DSpinellis•36m ago•0 comments

The Forgotten Art of the LAN Party (2023)

https://www.superjumpmagazine.com/the-forgotten-art-of-the-lan-party/
1•susam•38m ago•0 comments

Italian authorities shut down major streaming piracy network

https://www.engadget.com/2180075/italian-authorities-shut-down-major-streaming-piracy-network-cin...
3•01-_-•42m ago•0 comments

ANCI: The Agent Infrastructure for Scheduling

https://meetanci.com
2•rajl•43m ago•0 comments

What's in a Codebase?

https://www.moderndescartes.com/essays/codebase_spec/
2•brilee•43m ago•0 comments

Elon, stop trying to make Grok happen

https://www.theverge.com/ai-artificial-intelligence/936219/elon-stop-trying-to-make-grok-happen
4•01-_-•44m ago•2 comments

Verytis – shared error memory for AI coding agents (MCP)

https://www.verytis.com
1•TychiqueY•44m ago•0 comments

Show HN: A satirical idle game about running an AI startup

https://game.trae.academy/
4•haebom•44m ago•0 comments

Show HN: Running BitNet b1.58 inside DRAM by breaking DDR4 timing rules

1•pcdeni•45m ago•0 comments

A Mysterious Children's Search Engine Is Misleading Kids

https://www.city-journal.org/article/kiddle-search-engine-kids
3•bushwart•46m ago•0 comments

NeuralNote

https://github.com/DamRsn/NeuralNote
1•hyperific•48m ago•0 comments

Kanban board web app powered by the Redmine API

https://ricardoborges.github.io/RedKanban/
1•r2ob•48m ago•0 comments

Diátaxis: A systematic approach to technical documentation authoring

https://diataxis.fr/
2•ZeroCool2u•50m ago•0 comments

The Banal Horror of Jimmy Fallon

https://www.currentaffairs.org/news/the-banal-horror-of-jimmy-fallon
3•ZeroCool2u•52m ago•2 comments

User Story

https://beyondloom.com/blog/userstory.html
1•tosh•52m ago•0 comments

It's time to talk about my writerdeck

https://veronicaexplains.net/my-first-writerdeck/
28•hggh•54m ago•12 comments