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.

Woodshed: Create, run, rate, and iterate on your Claude Skills

https://tangled.org/danabra.mov/woodshed
1•danabramov•1m ago•1 comments

Compare LLM Responses with OverallGPT

https://overallgpt.com/about
1•walterbell•5m ago•0 comments

The secretive powerbroker with a tight grip on corporate Spain

https://www.ft.com/content/708bbf41-a174-4c04-b96d-c6cfeca2a805
1•petethomas•9m ago•0 comments

Timelang: Natural Language Time Parser

https://timelang.dev/
1•kamranahmedse•12m ago•1 comments

Young Men Are Lost. A New Book Can Guide the Way

https://www.bloomberg.com/news/articles/2026-01-12/day-trader-memoir-generation-desperation-a-fra...
2•petethomas•15m ago•0 comments

Trump Touts New Microsoft Data-Center Pledges After Local Backlash

https://www.wsj.com/livecoverage/stock-market-today-dow-sp-500-nasdaq-01-12-2026/card/trump-touts...
2•nycdatasci•15m ago•0 comments

Show HN: ProofLoop – Autonomous long-running agents with verifiable completion

https://github.com/exiw-ai/proofloop
1•egordev•19m ago•0 comments

Show HN: I made a $25 lifetime Screen Studio alternative

https://debut.sh/
1•ben_hrris•23m ago•0 comments

Are Atomic Operations Better Than a Mutex? It Depends

https://madflojo.dev/posts/are-atomic-operations-faster-than-a-mutex/
2•madflojo•25m ago•0 comments

They Write the Right Stuff

https://www.fastcompany.com/28121/they-write-right-stuff
1•robbs•30m ago•1 comments

A rare interview with the elusive Agatha Christie

https://www.bbc.com/culture/article/20260109-a-rare-interview-with-the-elusive-agatha-christie
1•1659447091•31m ago•0 comments

Be Wary of Digital Deskilling

https://calnewport.com/be-wary-of-digital-deskilling/
2•monobot12•31m ago•0 comments

Show HN: Yoth-yoth – your all-in-one workspace

https://yoth-yoth.com/hello
2•volokh•36m ago•0 comments

Data is not available upon request

https://osf.io/preprints/psyarxiv/jbu9r_v3
2•sien•38m ago•0 comments

I Graduated from Survival Mode

https://www.fieldnotes.nautilus.quest/p/i-graduated-from-survival-mode
1•zeldapoem•39m ago•0 comments

The Pentagon used a secret aircraft painted to look like a civilian plane

https://www.nytimes.com/2026/01/12/us/politics/us-boat-attacks-law.html
2•perihelions•40m ago•2 comments

Verizon to stop automatic unlocking of phones as FCC ends 60-day unlock rule

https://arstechnica.com/tech-policy/2026/01/fcc-lets-verizon-lock-phones-for-longer-making-it-har...
3•DefineOutside•46m ago•0 comments

A 'Holy Grail' Sleep Apnea Pill Could Be on the Market Next Year

https://www.forbes.com/sites/amyfeldman/2026/01/12/a-holy-grail-sleep-apnea-pill-could-be-on-the-...
4•cebert•46m ago•2 comments

Great code doesn't matter if you can't sell it

https://platformtoolsmith.com/blog/senior-engineer-part-3/
2•sharp-dev•46m ago•1 comments

FCC revises Verizon phone unlocking rules after significant fraud issues

https://www.reuters.com/business/media-telecom/fcc-revises-verizon-phone-unlocking-rules-after-si...
2•petethomas•46m ago•0 comments

Canada's Scaling Problem Isn't Compute, It's Coastlines

https://zeitgeistml.substack.com/p/canadas-scaling-problem-isnt-compute
2•sjosh003•47m ago•0 comments

Show HN: Minimal type-safe language for software architecture

https://github.com/tesserato/Tect
2•tesserato•48m ago•0 comments

Bug 55867 – Doesn't know how to tag XI_TRACKBALL

https://bugs.freedesktop.org/show_bug.cgi?__goaway_challenge=meta-refresh&__goaway_id=bdd4239d39d...
1•rballpug•52m ago•3 comments

From Starbase: Pete Hegseth on Defense Innovation Reform [video]

https://www.youtube.com/watch?v=MlRm9tCT0Ug
1•0xWTF•55m ago•1 comments

Meta shakes up its review system with 'stronger rewards for top performers'

https://www.businessinsider.com/meta-performance-review-system-stronger-rewards-top-performers-20...
3•ryandrake•1h ago•0 comments

Paramount Wants Warner to Show Its Work

https://www.bloomberg.com/opinion/newsletters/2026-01-12/paramount-wants-to-warner-to-show-its-work
1•feross•1h ago•0 comments

Turning Agents into Learning Machines

https://twitter.com/ashpreetbedi/status/2010781132418064750
1•bedify•1h ago•0 comments

DJT Says Microsoft to Make Changes to Curb Data Center Power Costs for Americans

https://money.usnews.com/investing/news/articles/2026-01-12/trump-says-microsoft-to-make-changes-...
1•schmuckonwheels•1h ago•1 comments

Living with LLMs Everywhere – How Ambient LLMs Negate Security Policy

1•djwide•1h ago•0 comments

Who Companies Call When They Want to Become a Bank

https://www.bloomberg.com/news/articles/2026-01-12/fintechs-call-klaros-group-when-they-want-bank...
1•petethomas•1h ago•0 comments