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.

Building small Docker images faster

https://sgt.hootr.club/blog/docker-protips/
1•steinuil•33s ago•0 comments

Show HN: IdeaWell – Project ideas inspired by Hacker News discussions

https://ideawell.fly.dev/
1•Igor_Wiwi•46s ago•0 comments

A Better iPhone Typing Experience (2018)

https://medium.com/porsager/a-better-iphone-typing-experience-77c6da52131
1•walterbell•2m ago•0 comments

How a Tugboat Works – Voith Schneider [video]

https://www.youtube.com/watch?v=iPSTwqUKHvs
1•keepamovin•7m ago•0 comments

Two New React 19 Vulnerabilities

https://vercel.com/kb/bulletin/security-bulletin-cve-2025-55184-and-cve-2025-55183
2•edweis•10m ago•0 comments

K8s-1M: Unintentionally reinventing Google Borg to scale Kubernetes

https://bchess.github.io/k8s-1m/index.html#_meeting_the_qps_needs_for_a_1m_node_cluster
1•matesz•11m ago•0 comments

EU agrees to indefinitely immobilise €210B of Russian assets

https://www.euronews.com/my-europe/2025/12/11/eu-triggers-emergency-clause-to-indefinitely-immobi...
2•saubeidl•13m ago•0 comments

Kent L Beck: You're Ignoring Optionality and Paying for It

https://maintainable.fm/episodes/kent-l-beck-youre-ignoring-optionality-and-paying-for-it
1•thunderbong•14m ago•0 comments

Typeslayer – a TypeScript types performance tool

https://www.youtube.com/watch?v=IP6EZXzXBzY
1•todsacerdoti•21m ago•0 comments

Show HN: A simple web app to memorise Hiragana

https://app.tolearnjapanese.com/
1•bryanhogan•21m ago•0 comments

Overview of the Memory Market in Mid-December 2025

https://hanchouhsu.substack.com/p/overview-of-the-memory-market-in
2•walterbell•23m ago•0 comments

Revolutionizing Lighting: How Smart LEDs Are Transforming Homes and Businesses

2•emmasuntech•24m ago•0 comments

The era of Mobile app automation is here

https://negi-priya1510.medium.com/the-era-of-mobile-ai-agents-is-already-here-5b0a585da642
2•Messyflame•25m ago•0 comments

Suneung: South Korea exam chief quits over 'insane' English test

https://www.bbc.com/news/articles/c3w792x0ggyo
2•ZeljkoS•29m ago•0 comments

Who Wins CS Best Paper Awards?

https://jeffhuang.com/computer-science-open-data/#who-wins-cs-best-paper-awards
1•atomicnature•29m ago•0 comments

Bloody Black Friday for Hardware [video]

https://www.youtube.com/watch?v=V0z9UME9AlE
1•alecco•31m ago•1 comments

Mizu – A lightweight web framework for Go

https://docs.go-mizu.dev/overview/intro
1•tamnd•31m ago•0 comments

You are dating an ecosystem

https://www.razor.blog/2025/12/you-will-never-be-in-two-person.html
1•razor_blog•35m ago•0 comments

Holimization: Why Optimization Is Not Enough

https://www.lokad.com/blog/2025/12/12/holimization-why-optimization-is-not-enough/
1•vermorel•35m ago•0 comments

Microsoft fights $2.8B UK lawsuit over cloud computing licences

https://finance.yahoo.com/news/microsoft-fights-2-8-billion-140519428.html
3•croes•36m ago•0 comments

Cargo Bikes Size Comparator

https://bikes.louiseveillard.com/
2•tarball•37m ago•0 comments

Ancient undersea wall dating to 5,800 BC discovered off French coast

https://phys.org/news/2025-12-ancient-undersea-wall-dating-bc.html
2•daoboy•37m ago•1 comments

Celebrate New Year's with Memorable Train Journeys

https://business-class.us/celebrate-new-years-with-memorable-train-journeys/
1•belatwing•38m ago•1 comments

Rise in violence against women journalists and activists linked to digital abuse

https://apnews.com/article/un-women-report-rise-violence-online-66c38bb80b79d64be18b477f209c2db0
2•binning•41m ago•0 comments

Self Vaping Vape Machines

https://indiantinker.bearblog.dev/adding-more-smoke-to-your-projects/
2•indiantinker•41m ago•0 comments

A Lisp Interpreter Implemented in Conway's Game of Life

https://woodrush.github.io/blog/posts/2022-01-12-lisp-in-life.html
2•fanf2•41m ago•0 comments

Critical design flaw in women's running shoes, scientists warn

https://www.sciencefocus.com/news/critical-problem-womens-running-shoes
1•binning•43m ago•0 comments

Geonimo – AI Geo/SEO Agent

https://www.geonimo.com/
1•guikioky•45m ago•0 comments

Are we stuck with the same Desktop UX forever? [video]

https://www.youtube.com/watch?v=1fZTOjd_bOQ
2•todsacerdoti•47m ago•0 comments

Show HN: Svelte Bash – A lightweight terminal component for Svelte 5

https://github.com/YusufCeng1z/svelte-bash
1•yusufcengiz•48m ago•0 comments