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.

Fitting the real Earth into Minecraft at 1:1: cubic chunks, open DEMs [video]

https://www.youtube.com/watch?v=NQNGaTGcdZQ
1•Pirut•20s ago•0 comments

Open Source Claude Dashboards

https://opendashboards.com
1•zahlekhan•49s ago•0 comments

Zoox robotaxi is now driving in Atlanta

https://zoox.com/journal/atlanta-expansion-robotaxi
1•sshah03•59s ago•0 comments

California Flood Risk Map

https://floodmap.robennals.org/
1•robotelvis•1m ago•1 comments

Feed HTML – an HTML subset for RSS readers

https://twowavesandadot.blog/feed-html-an-html-subset-for-rss-readers.html
1•speckx•1m ago•0 comments

Agent Anomaly Detection scores on benchmarks we didn't write

https://developers.googleblog.com/how-agent-anomaly-detection-scores-on-benchmarks-we-didnt-write/
1•goatley•3m ago•0 comments

NASA veteran's propellantless drive claim awaits independent verification

https://www.popularmechanics.com/science/a74399234/nasa-veteran-says-drive-needs-no-propellant-su...
2•dustfinger•3m ago•0 comments

Rattlesnakes have personalities too, to venomous effect

https://www.nature.com/articles/d41586-026-03536-8
1•titusblair•3m ago•0 comments

CRISPR therapy poised for first FDA approval to edit genes inside the body

https://www.nature.com/articles/d41586-026-03705-9
1•titusblair•4m ago•0 comments

Eliminating Nondeterminism in LLM Inference with Integer-Only Arithmetic

https://nathan.rs/posts/detllm/
2•shortlived•4m ago•0 comments

'Evanescent interactions': the surprising power of connecting with strangers

https://news.uga.edu/evanescent-interactions/
1•giuliomagnifico•5m ago•0 comments

Frankensplat – Fast browser-based 3D Gaussian Splat training

https://offlinetools.io/frankensplat/
2•rsp1984•5m ago•1 comments

Jensen Huang Resigns After Having Another Affair in Addition to the Chinese Spy

https://thezvi.substack.com/p/jensen-huang-resigns-after-having
1•paulpauper•7m ago•0 comments

Proactive Measures Against Password Breaches and Cookie Hijacking

https://slack.engineering/proactive-measures-against-password-breaches-and-cookie-hijacking/
1•birdculture•8m ago•0 comments

Professors teaching 50 courses a semester

https://calmatters.org/education/2026/11/community-college-professors-pay/
1•HR01•8m ago•0 comments

Show HN: Scenedraw – Create multiple excalidraw scenes, backed up on GDrive

https://scenedraw.app
2•indiepop12•8m ago•0 comments

Zero Data Retention Was in the Contract. Why Did Notion AI Chats Remain Stored?

https://inclinq.medium.com/zero-data-retention-was-in-the-contract-why-did-notion-ai-chats-remain...
1•inclinq•10m ago•0 comments

Microsoft Workers Call for Accountable AI

https://dash.palform.app/fill/org_0R2JXZPZ7PFWX/form_0R8K0PRYXGM71?f=fat_0R9JYW9RTDRDS&ref=vertic...
3•YeGoblynQueenne•10m ago•1 comments

Time Solved Space

https://adjacentpossible.substack.com/p/how-time-solved-space
1•rafaelc•11m ago•0 comments

At last – Cloudflare Hard billing limit feature [video]

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

Find AWS waste without giving anyone access to your account

https://github.com/auditaz/auditaz-cli
1•auditaz•12m ago•0 comments

Show HN: Desky – Auto Safari desktop mode for iPhone Duo when unfolded

https://apps.apple.com/sg/app/desky-desktop-mode-switching/id6833103142
2•vincentneo•12m ago•0 comments

Do not build your own CRM

https://www.lipeles.com/p/do-not-build-your-own-crm-system
1•alipeles1•12m ago•0 comments

AI Slop makes the World stop

https://luemmelsec.github.io/AI-Slop-Makes-The-World-Stop/
2•speckx•13m ago•0 comments

My Barcelona Talk on AI

https://marginalrevolution.com/marginalrevolution/2026/11/my-barcelona-talk-on-ai.html
1•paulpauper•13m ago•0 comments

The Everywhere Rent Seekers

https://marginalrevolution.com/marginalrevolution/2026/11/the-everywhere-rent-seekers.html
2•paulpauper•13m ago•0 comments

We review 4x more AI code without reading every line

https://thenewstack.io/scale-ai-code-reviews/
2•tonkkatonka•16m ago•0 comments

Transcript Testing: Helping Humans Verify AI Code

https://andrew.nerdnetworks.org/blog/2026/11/13/transcript-testing/
1•qianli_cs•16m ago•0 comments

New Units of Knowledge

https://kk.org/thetechnium/new-units-of-knowledge/
1•rafaelc•18m ago•0 comments

Porting Elite to the Commodore PET the very very long way [video]

https://www.youtube.com/watch?v=6D0yT1bgH0s
3•ggaughan•19m ago•0 comments