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

Comments

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

Cosmic Desktop is a fantastic first draft [video]

https://www.youtube.com/watch?v=ob-Y77kuVwM
1•todsacerdoti•28s ago•0 comments

New in Llama.cpp: Model Management

https://huggingface.co/blog/ggml-org/model-management-in-llamacpp
1•geerlingguy•1m ago•0 comments

Why Your RAG Costs $2,400/Month (and How We Cut It by 73%)

2•helain•3m ago•0 comments

Show HN: I built a WebMIDI sequencer to control my hardware synths

https://www.simplychris.ai/droplets
1•simplychris•3m ago•0 comments

What you should know about constraints in PostgreSQL

https://xata.io/blog/constraints-in-postgres
3•tudorg•4m ago•0 comments

The Agents Shared Cognition Protocol (ASCP)

https://github.com/Reframe-Technologies/ascp-draft-specs
1•talljeff68•4m ago•1 comments

Rivian Autonomy and AI Day

https://stories.rivian.com/rivian-autonomy-ai-day
1•songeater•5m ago•0 comments

DRM-Free Kindle EBooks Will Be Downloadable in ePub and PDF Formats Soon

https://blog.the-ebook-reader.com/2025/12/11/drm-free-kindle-ebooks-will-be-downloadable-in-epub-...
1•CrypticShift•5m ago•0 comments

Show HN: A daily logic puzzle game based on parity constraints

1•greyisodd•6m ago•0 comments

Why Text in Vampire Survivors Used to Look Weird

https://jslegenddev.substack.com/p/vampire-survivors-text-weird
1•JSLegendDev•6m ago•0 comments

Show HN: Remixify – Turn any Spotify playlist into a remix playlist

1•kwakubiney•7m ago•0 comments

Unity vs. Unreal – Which Engine Fits Your Next Game?

https://www.slavnastudio.com/blog/unity-vs-unreal-engine-a-comprehensive-comparison/
2•SofiaK•7m ago•1 comments

Fwknop: Single Packet Authorization > Port Knocking

https://www.cipherdyne.org/fwknop/
1•l2dy•7m ago•0 comments

Backpressure in Streaming Systems

https://risingwave.com/blog/backpressure-in-streaming-systems/
2•AnneWodell•14m ago•0 comments

Show HN: DriftOS – Stop dumping chat history into LLM context windows

https://www.driftos.dev/
2•scott_waddell•14m ago•1 comments

Show HN: Inkling – Local semantic search to make finding your documents easier

https://tkoduru.tech/inkling-app/
1•aerot•17m ago•0 comments

R1: A Foundational Model for Small Molecule Drug Discovery

https://rhizomeresearch.ai/blog/announcing-r1
1•davepeck•17m ago•0 comments

Five Genetic Factors Link Depression, Anxiety, Schizophrenia

https://www.technologynetworks.com/genomics/news/five-genetic-clusters-explain-over-half-of-all-p...
1•gmays•18m ago•0 comments

Node.js: Monday, December 15, 2025 Security Releases

https://nodejs.org/ja/blog/vulnerability/december-2025-security-releases
1•pcaversaccio•19m ago•0 comments

Should your technical team learn communication skills?

https://togetherlondon.com/insights/should-your-tech-team-learn-comms-skills
1•algebracare•20m ago•0 comments

WhatsApp is trying to reinvent voicemailIt's

https://www.theverge.com/news/842485/whatsapp-voice-mail-video-message-call-feature
1•thunderbong•22m ago•0 comments

Writing Good Definitions Comes Down to One Basic Rule (Bertrand Meyer)

https://cacm.acm.org/blogcacm/writing-good-definitions-comes-down-to-one-basic-rule/
1•bikenaga•23m ago•1 comments

Disney accuses Google of 'massive' copyright infringement after deal with OpenAI

https://www.theverge.com/news/842573/disney-google-copyright-infringement-cease-and-desist
4•_djo_•23m ago•1 comments

Videos of sexually suggestive AI-generated children racking up likes

https://www.cnn.com/2025/12/11/tech/tiktok-ai-videos-children-report
1•Bender•24m ago•0 comments

US court orders the release of Abrego Garcia [pdf]

https://storage.courtlistener.com/recap/gov.uscourts.mdd.589189/gov.uscourts.mdd.589189.110.0_2.pdf
1•ChadNauseam•25m ago•2 comments

Build with Gemini Deep Research

https://blog.google/technology/developers/deep-research-agent-gemini-api/
2•meetpateltech•25m ago•0 comments

LastPass hammered with £1.2M fine for 2022 breach fiasco

https://www.theregister.com/2025/12/11/lastpass_ico_fine/
1•Bender•26m ago•0 comments

Microsoft won't fix .NET RCE bug affecting slew of enterprise apps

https://www.theregister.com/2025/12/10/microsoft_wont_fix_net_rce/
2•Bender•26m ago•0 comments

Doing a Number on Falwell: A Computer Hack Ties Up Evangelist's Phones (1986)

https://www.washingtonpost.com/archive/lifestyle/1986/01/05/doing-a-number-on-falwell/17fa554d-9d...
1•wishfish•27m ago•0 comments

My Backyard Office Studio (568 sq/ft Full Tour) [video]

https://www.youtube.com/watch?v=cXDQ33cex-g
1•lordleft•29m ago•0 comments