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•8mo ago

Comments

zoezoezoezoe•8mo 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•8mo 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.

Show HN: BillingEngine, AI Stripe Revenue Leak Diagnostic 5 min, $99 one-time

https://billingengine.tech
1•aks89upt•1m ago•0 comments

Whistleblower drops 'largest ever' ICE leak to unmask agents

https://vechron.com/2026/01/whistleblower-drops-largest-ever-ice-leak-to-unmask-agents/
1•GeorgeWoff25•1m ago•0 comments

Show HN: ChordsCrush, a free musical chord training game

https://chordscrush.com/
1•bbx•2m ago•0 comments

Mailchimp Free Plan Changes

https://softuts.com/mailchimp-free-plan-changes-in-2026-and-best-alternatives/
1•XCSme•4m ago•0 comments

What Founders Need to Know Before Building Their First AI Agent

https://www.stackbuilders.com/insights/what-founders-need-to-know-before-building-their-first-ai-...
1•StackBuilders•4m ago•0 comments

UK police blame Microsoft Copilot for intelligence mistake

https://www.theverge.com/news/861668/uk-police-microsoft-copilot-error-mistake
1•embedding-shape•5m ago•1 comments

If your game is releasing soon and you need creator marketing, I'd like to help

https://www.marketingforgames.com/
1•benithemaker•5m ago•1 comments

Google Pixel development moving out of China

https://9to5google.com/2026/01/13/google-pixel-development-china-report/
1•speckx•6m ago•0 comments

We're all going to die, thanks to AI

http://timleberecht.com/article/were-all-going-to-die-thanks-to-ai/
1•cumo•7m ago•2 comments

Tell HN: When launching products who/where your audience is matters

1•asim•8m ago•0 comments

The PICO-8 fantasy console

https://www.lexaloffle.com/pico-8.php
1•brainlessdev•11m ago•0 comments

. Looking for feedback on an AI interview screening demo

https://www.tella.tv/video/vid_cmkdov34z003204i9h3nugl0e/view
1•mukulmunjal•13m ago•1 comments

Losing American Data

https://flowingdata.com/2026/01/14/losing-american-data/
1•7777777phil•14m ago•0 comments

When Asking Is Easy (and Answering Isn't)

https://michaelheap.com/asymmetric-questions/
2•avivby•17m ago•0 comments

Show HN: Unbubble News – analyze bias and verify facts for any news article

https://www.unbubble.news/
1•alessandrodiano•17m ago•0 comments

The Web Pipe Programming Language

https://github.com/williamcotton/webpipe
2•williamcotton•19m ago•1 comments

Light Lab

http://www.technoblogy.com/show?5DCO
1•chrisjj•19m ago•0 comments

Ask HN: Why are software developers not using Background coding agents?

1•daemon_9009•20m ago•3 comments

Show HN: Commentix – A lightweight, customizable alternative to Disqus

https://www.commentix.com/en/demo/
1•pinus-cembra•20m ago•0 comments

Just the Browser

https://justthebrowser.com/
1•thm•21m ago•0 comments

McKinsey asks graduates to use AI chatbot in recruitment process

https://www.theguardian.com/business/2026/jan/14/mckinsey-graduates-ai-chatbot-recruitment-consul...
1•chrisjj•22m ago•0 comments

Ask HN: Could AI prevent the decline of social media by highlighting usernames?

1•amichail•22m ago•0 comments

Grafana Dashboard on Google Cloud VM for Apache NuttX RTOS

https://lupyuen.org/articles/dashboard
1•lupyuen•23m ago•0 comments

Anthropic Labs

https://www.anthropic.com/news/introducing-anthropic-labs
2•kerim-ca•24m ago•0 comments

The Vampire Paradox

https://worldsensorium.com/the-vampire-paradox/
1•dnetesn•25m ago•0 comments

We're Evolving Beyond This Rock

https://nautil.us/were-evolving-beyond-this-rock-right-now-1261129/
1•dnetesn•26m ago•0 comments

Show HN: My Own AWS

https://blog.sanyamgarg.com/#/posts/private-cloud
2•sammylis•26m ago•0 comments

Show HN: ProtocolSoup – Interactive Sandbox for OAuth, OIDC, SAML, Spiffe, SSF

https://protocolsoup.com/
3•ParleSec•28m ago•0 comments

Grok will be integrated into Pentagon networks, Hegseth says

https://www.theguardian.com/technology/2026/jan/13/elon-musk-grok-hegseth-military-pentagon
4•voxleone•30m ago•1 comments

We let an AI help us decide which startups to invest in for 6 months

https://theventures.substack.com/p/we-let-an-ai-help-us-decide-which
1•jefflee0127•31m ago•0 comments