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.

If Apple sends you a push notification about a spyware attack, take it seriously

https://techcrunch.com/2026/08/13/if-apple-sends-you-a-push-notification-alerting-you-to-a-spywar...
3•jethronethro•2m ago•0 comments

AI Stock Research Assistant · Streamlit

https://ai-stock-research-kiaan.streamlit.app
1•KiaanKothari•3m ago•0 comments

PK-SIM: tool for whole-body physiologically pharmacokinetic modeling

https://github.com/Open-Systems-Pharmacology/PK-Sim
2•wslh•9m ago•0 comments

Low-regret recommendations for AI policy

https://www.noahpinion.blog/p/23-low-regret-recommendations-for
1•paulpauper•11m ago•0 comments

Models Are Getting Dumber on Purpose

https://w4g1.dev/blog/models-are-getting-dumber-on-purpose
3•hruvhwe•12m ago•0 comments

The Problem with Child-Led Potty Training

https://www.theatlantic.com/family/2026/08/potty-training-delay-problem/688299/
1•paulpauper•12m ago•0 comments

The inconvenient truth about writing code by hand [video]

https://www.youtube.com/watch?v=bzYziksDslU
1•ManuelSuarez•12m ago•0 comments

Ask HN: What LLM subscription/provider to use with pi harness?

1•vira28•12m ago•0 comments

More large employers are turning to ICHRA as group costs climb

https://www.insurancebusinessmag.com/us/news/benefits/more-large-employers-are-turning-to-ichra-a...
1•andy99•13m ago•0 comments

Tlbic v12.0: to prevent suicide – To those contemplating ending life

https://drive.google.com/file/d/15-B6usZzpf0LwXpMXkvywnzV9nN568hK/view?usp=drive_link
1•michikawa59•15m ago•1 comments

You can just choose how many bugs you want now

https://nolanlawson.com/2026/08/16/you-can-just-choose-how-many-bugs-you-want-now/
1•headalgorithm•16m ago•0 comments

Simulating Claude-Style Chinese Risk Control and UX in DeepSeek Harness

https://github.com/eri64/dsh-claude-ux
1•Sha1rholder•17m ago•0 comments

Show HN: I built a free ATS for small hiring teams

https://www.interviewwatch.com/ats/
1•bhuvanbk007•17m ago•0 comments

Show HN: Agent6 – coding agent with jailed commands and editable state machines

https://github.com/agent6-dev/agent6
1•elesiuta•20m ago•0 comments

On-device tennis line calling with two iPhones on tripods [video]

https://www.youtube.com/watch?v=Ea2i5mtKng8
1•Austin_Conlon•21m ago•0 comments

Quick-search: An universal search app for Android

https://github.com/teja2495/quick-search/
1•thunderbong•22m ago•0 comments

U and non-U English examples

https://en.wikipedia.org/wiki/U_and_non-U_English
1•isomorph•22m ago•0 comments

Show HN: Declarative-forms – await an object the way prompt() awaits a string

https://wolfoo2931.github.io/declarative-forms/
1•WolfOliver•23m ago•0 comments

John Carlos Baez: How many Erdős problems will be solved by the end of the year?

https://mathstodon.xyz/@johncarlosbaez/117105042105698101
1•ColinWright•24m ago•0 comments

Volonaut Airbike – Test Riding a Flying Speeder Bike [video]

https://www.youtube.com/watch?v=XZpWTHtwceE
1•throwoutway•27m ago•0 comments

Protobuf has LSP support. You're welcome

https://buf.build/blog/protobuf-lsp
3•theanonymousone•28m ago•0 comments

Show HN: WireDoctor – Spring Boot startup and bean cycle analyzer

https://github.com/ddsha441981/wiredoctor
1•ddsha441981•28m ago•0 comments

The Sweeter Lesson

https://cacm.acm.org/opinion/the-sweeter-lesson/
2•bvsrinivasan•29m ago•0 comments

Ask HN: How do you prove two machines computed the same float32 result?

3•Swapnopam•32m ago•1 comments

Why Pi Is My Goat Agent Harness

https://thinhcorner.com/blog/pi-agent/
1•th1nhng0•33m ago•0 comments

Has somebody found a way to reduce AI idiomatics tics?

1•abeauvois•35m ago•0 comments

Nvidia discloses $21B stake in SpaceX at end of second quarter

https://www.cnbc.com/2026/08/14/nvidia-discloses-21-billion-stake-in-spacex-at-end-of-second-quar...
6•johnbarron•35m ago•1 comments

U.S. to tell partners they must pick sides in AI race with China

https://www.cnbc.com/2026/08/15/us-to-tell-allies-they-must-pick-sides-in-ai-race-with-china-reut...
1•johnbarron•36m ago•1 comments

Gforth – A free, fast, featureful and portable implementation of Forth

https://gforth.org/
2•smartmic•40m ago•0 comments

LibreOffice Conference 2026 Schedule

https://events.documentfoundation.org/libreoffice-conference-2026/schedule/
5•mmarian•43m ago•1 comments