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.

Show HN: RemoteDevWork a remote dev job search tool

https://remotedevwork.com
1•DylanAutyDev•48s ago•0 comments

Step 5

https://www.stepfun.com/step-5
1•kong75•1m ago•0 comments

The 'quiet quitters' skiving off work – but still getting paid

https://www.theguardian.com/lifeandstyle/2026/nov/29/i-watch-youtube-for-six-hours-then-go-home-t...
1•sandebert•3m ago•0 comments

Los Angeles Mayor Urges Residents to Work Remotely Tuesday

https://lamag.com/weather/mayor-bass-urges-residents-to-work-remotely-tuesday/
1•geox•3m ago•0 comments

The Perl Advent Calendar Season 27

https://perladvent.org/2026/
1•oalders•4m ago•0 comments

Show HN: Bg-be-gone – Cut out people, pets and anime art, all on your own PC

https://github.com/cristeigabriela/bg-be-gone/releases/tag/v1.2.0
1•gabriela_c•5m ago•0 comments

TVP: TV Is Almost All You Need for Speculative Decoding

https://arxiv.org/abs/2611.00588
1•matt_d•7m ago•0 comments

Antigravity updates its Terms of Service

https://twitter.com/_mohansolo/status/2127598572006744189
5•miohtama•12m ago•0 comments

Realtime Co-Drawing with a Plotter

https://github.com/chuanqisun/plotter-alive
2•low_tech_punk•12m ago•0 comments

Questions: Peanut Butter

https://jessimekirk.com/blog/peanut-butter/
1•LifeIsBio•15m ago•0 comments

SIM Racing Game in the Browser

https://librecorsa.org
1•bdelmas•16m ago•0 comments

Bel-0 never sees your prompt. It still knows the answer

https://belfortlabs.com/blog/bel-0
1•doppp•18m ago•0 comments

The Ingenious Cardboard Bed

https://newatlas.com/good-thinking/ingenious-cardboard-bed/
1•busymom0•18m ago•0 comments

Impossible Cloud: S3 access keys temporarily disabled as a security precaution

https://status.impossiblecloud.com/incidents/257746
1•daandewit•27m ago•0 comments

What Anthropic's quantum algorithms mean for lattice-based proof systems, Jolt

https://a16zfrontier.substack.com/p/what-anthropics-quantum-algorithms
2•crescit_eundo•28m ago•0 comments

Mathematician Claims OpenAI Paper Is First Instance of AI Theory-Building

https://twitter.com/jdlichtman/status/2127576567090188736
2•jrflo•30m ago•0 comments

Show HN: Push MFA for SSH and sudo that falls back to offline codes

https://u2secured.com/ssh-two-factor-authentication
2•u2secured_team•31m ago•0 comments

Flipper One to ship with half the advertised RAM

https://www.reddit.com/r/flipperone/comments/1y9i0h1/flipper_one_8gb_shown_everywhere_4gb_deliver...
4•akersten•32m ago•0 comments

Open source firmware for the Zoyi oscilloscope

https://www.eevblog.com/forum/testgear/openosc/
2•qwezxcrty•32m ago•0 comments

Dr. Marko A. Rodriguez Quantum Processes in Graph Computing [video]

https://www.youtube.com/watch?v=qRoAInXxgtc
1•espeed•37m ago•0 comments

Show HN: LocalInbox – an email app for Mac and iPhone with on-device AI

https://localinbox.app
1•manishrana•39m ago•0 comments

Take care redacting WebP images

https://octet-stream.net/b/scb/2026-11-29-take-care-redacting-webp-images.html
1•thombles•40m ago•0 comments

Truss: A programming language designed for agent-written software

https://github.com/finiteloop/truss
1•doppp•40m ago•0 comments

Show HN: Cloider – Pay for Kubernetes workloads, not nodes

https://cloider.com
2•mareimorsy•41m ago•1 comments

Show HN: Elite Memo Pro`

1•deepanjanxyz•41m ago•0 comments

Show HN: Elite Memo Pro`

1•deepanjanxyz•41m ago•0 comments

'You're Not Dying Fast Enough': When Medicare Hospice Caps Cut Off a Patie

https://www.nytimes.com/2026/11/24/business/medicare-hospice-caps-patients-lose-care.html
2•JumpCrisscross•54m ago•0 comments

Reinforcement Learning Can Be Recovered from Its Own Rollouts

https://zanette-labs.github.io/rl-rollouts/
2•matt_d•57m ago•0 comments

US judge balks at lawyer using AI to answer questions in court

https://www.reuters.com/legal/litigation/us-judge-balks-lawyer-using-ai-answer-questions-court-20...
5•droidjj•1h ago•1 comments

Project C2: new AWS technique spots the rare bugs the most advanced models miss

https://www.aboutamazon.com/news/aws/aws-project-c2-finds-bugs-ai-models-miss
3•linksbro•1h ago•0 comments