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.

ARPA-H launches program for the 46% of U.S. counties don't have a cardiologist

https://www.statnews.com/2026/01/13/arpa-h-advancing-clinical-agentic-ai-use-heart-disease/
2•brandonb•6m ago•0 comments

Ernesto Gurgle Velante

https://www.facebook.com/ernesto.gurgelvalente.3
1•PROPILS•6m ago•0 comments

SydBox – pank rock Rust scalpel alternative to Bubblewrap

https://gitlab.exherbo.org/sydbox/sydbox
2•dlahoda•7m ago•0 comments

GoldenEye (N64) has a fully-functional ZX Spectrum 48x emulator built into it

https://www.therwp.com/forums/showthread.php?t=48139
1•ForHackernews•9m ago•0 comments

How to make spamming us uncomfortable for LinkedIn and friends

1•zx8080•11m ago•0 comments

How Humans Became Microplastic

https://unherd.com/2024/11/how-humans-became-microplastic/
2•voxleone•12m ago•0 comments

Pi-Mono Coding Agent

https://github.com/badlogic/pi-mono
1•tin7in•12m ago•0 comments

Aura Farm Prompt – Free Aura Farm Prompts for ChatGPT, Gemini and AI Art

https://aurafarmprompt.org
1•john_mayor•12m ago•0 comments

Sadiq Khan to urge ministers to act over 'colossal' impact of AI on London jobs

https://www.theguardian.com/politics/2026/jan/15/sadiq-khan-to-urge-ministers-to-act-over-colossa...
2•veltas•19m ago•0 comments

We analyzed 3K K8s clusters: one config line costs millions

https://wozz.io/blog/kubernetes-memory-overprovisioning-study-2026
1•wozzio•20m ago•0 comments

Solving the Electroporation Bottleneck

https://press.asimov.com/articles/electroporation
1•mailyk•20m ago•0 comments

SRT Server Live Streaming Software

https://www.red5.net/srt-streaming/
1•mondainx•25m ago•0 comments

Cardputer uLisp Machine (2024)

http://www.ulisp.com/show?52G4
1•tosh•25m ago•0 comments

People who built Wikipedia, technically (2021)

https://en.wikipedia.org/wiki/Wikipedia:Wikipedia_Signpost/2021-01-31/Technology_report
1•todsacerdoti•28m ago•0 comments

X says Grok now blocks undress photo edits where theyre illegal

https://apnews.com/article/grok-musk-deepfake-nudification-abuse-f0d62ec68576dcfe203cada2424bd107
1•criexe•28m ago•0 comments

Show HN: Setflow – Create harmonically mixed DJ sets from your Rekordbox library

https://www.setflow.app/
1•stuartevansuk•30m ago•0 comments

Banning Things for Other People Is Easy

https://dogdogfish.com/blog/2026/01/14/banning-things-for-other-people/
2•matthewsharpe3•36m ago•0 comments

An Interview with United CEO Scott Kirby About Tech Transformation

https://stratechery.com/2026/an-interview-with-united-ceo-scott-kirby-about-tech-transformation/
1•feross•37m ago•1 comments

Show HN: Leaftide – Garden planner with climate-aware scheduling (Django/Htmx)

https://leaftide.com/
1•JoaoW•37m ago•0 comments

Nearly 5M Accounts Removed Under Australia's New Social Media Ban

https://www.nytimes.com/2026/01/15/world/australia/social-media-ban-australia.html
1•donohoe•39m ago•1 comments

Adding Dependency Injection to PdfDocument in iText

https://kb.itextpdf.com/itext/adding-dependency-injection-to-the-pdfdocument-cla
3•whizzx•39m ago•0 comments

Three from the same family killed in Iran

https://www.iranintl.com/en/202601155532
1•ukblewis•40m ago•0 comments

Chinese Universities Surge in Global Rankings as U.S. Schools Slip

https://www.nytimes.com/2026/01/15/us/harvard-global-ranking-chinese-universities-trump-cuts.html
6•mynti•42m ago•2 comments

Show HN: Merge Excel Files

https://www.mergeexcelfiles.online/
1•foxiren•44m ago•0 comments

I Failed Your Coding Test. I'd Fail It Again

https://medium.com/@danielbentes/i-failed-a-coding-interview-heres-why-i-m-not-going-back-afdc4d9...
2•fornbogi•45m ago•2 comments

Podcast: Chinese EVs are transforming the auto industry

https://podcasts.apple.com/us/podcast/chinas-ev-boom-with-tu-le/id1864408706?i=1000745265483
3•hunglee2•53m ago•1 comments

Steamosaic: Generate a mosaic of your Steam account

https://steamosaic.com/
1•delduca•56m ago•0 comments

LongCat ZigZag Attention

https://www.k-a.in/LoZA.html
2•everlier•56m ago•1 comments

Full AI Music and Video

https://www.youtube.com/watch?v=YxGJLbbWZdc
1•spotlayn•58m ago•0 comments

Notepad.pub

https://notepad.pub
2•jbrooksuk•1h ago•0 comments