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.

Show HN: Convert Docs to Meaningful Visuals

https://www.doc2q.com
1•rokontech•3m ago•0 comments

Ask HN: Dunkelflaute' turns off my monitor

1•bertili•7m ago•0 comments

Airbus issues major A320 recall after mid-air incident grounds planes

https://www.theguardian.com/business/2025/nov/28/airbus-issues-major-a320-recall-after-recent-mid...
1•tosh•8m ago•0 comments

Everyone Should Learn C

https://computergoblin.com/blog/everyone-should-learn-c-pt-1/
1•0x54MUR41•8m ago•0 comments

How fast can browsers process base64 data?

https://lemire.me/blog/2025/11/29/how-fast-can-browsers-process-base64-data/
2•mfiguiere•14m ago•0 comments

Self-hosting my photos with Immich

https://michael.stapelberg.ch/posts/2025-11-29-self-hosting-photos-with-immich/
1•secure•19m ago•0 comments

Acmeleaf: Simple DNS-01 ACME client

https://codeberg.org/lindenii/acmeleaf
1•todsacerdoti•21m ago•0 comments

MP resigns over allegations she duped South Africans to fight for Russia

https://www.bbc.com/news/articles/cx2dndy228xo
3•breve•25m ago•0 comments

The Slow Grind That Sets You Free

https://medium.com/@naveensky/the-slow-grind-that-sets-you-free-97abd8b9bf2c
1•naveensky•26m ago•0 comments

Show HN: Structural Genesis – structure emerging from nothing (Ø₀)

https://github.com/jengbeng/structural-genesis
1•jengbeng•30m ago•0 comments

Ask HN: How are you preparing for the impending Android sideloading changes?

2•BrenBarn•34m ago•0 comments

Show HN: VidBee – A cross-platform video downloader with RSS auto-download

https://vidbee.org
1•nexmoe•37m ago•0 comments

Extreme Go Horse Process

https://gist.githubusercontent.com/banaslee/4147370/raw/fde1036073a94af5b0ee1f3c38d96bcef63e24d7/...
1•ArcHound•39m ago•0 comments

ChatGPT prompt consumes equivalent to 10s of Netflix

https://simonwillison.net/2025/Nov/29/chatgpt-netflix/
6•makeavish•49m ago•2 comments

LLM Agents Demystified

https://github.com/Dobiasd/articles/blob/master/llm_agents_demystified.md
2•Dobiasd•50m ago•0 comments

Show HN: Created free tool for Roblox Videos

https://www.inreels.ai/tools/text-to-brainrot
1•Onekiran•54m ago•0 comments

Stanford CS230 – Autumn 2025 – Lecture 7: Agents, Prompts, and RAG [video]

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

KDE going all-in on a Wayland future

https://blogs.kde.org/2025/11/26/going-all-in-on-a-wayland-future/
3•dualogy•1h ago•0 comments

Corecore

https://en.wikipedia.org/wiki/Corecore
2•pizza•1h ago•0 comments

Garfield's Proof of the Pythagorean Theorem

https://en.wikipedia.org/wiki/Garfield%27s_proof_of_the_Pythagorean_theorem
3•benbreen•1h ago•1 comments

Pat Gelsinger: 'I've been called here for a purpose'– Lunch With the FT

https://on.ft.com/3LZnfeq
2•microsoftedging•1h ago•0 comments

UAPs as Coherent Field Entities

https://abacusnoir.com/2025/11/29/field-entities-not-craft/
1•agambrahma•1h ago•1 comments

Planes grounded after Airbus discovers solar radiation could impact systems

https://www.bbc.com/news/articles/c8e9d13x2z7o
3•djtango•1h ago•1 comments

Engineering.fyi

https://www.engineering.fyi/
2•Kinrany•1h ago•0 comments

Cutting C++ Exception Time by +90%? – Khalil Estell – CppCon 2025 [video]

https://www.youtube.com/watch?v=wNPfs8aQ4oo
2•aw1621107•1h ago•0 comments

Plastic can be programmed to have a lifespan of days, months or years

https://www.newscientist.com/article/2506104-plastic-can-be-programmed-to-have-a-lifespan-of-days...
8•thunderbong•2h ago•1 comments

Shopify pulls off real time 8K browser rendering on the Exosphere

https://twitter.com/pushmatrix/status/1994445450527519085
5•dsr12•2h ago•1 comments

The 'S&P 493' reveals a different U.S. economy

https://www.msn.com/en-us/money/markets/the-s-p-493-reveals-a-very-different-us-economy/ar-AA1R1VUJ
37•MilnerRoute•2h ago•6 comments

It's time for our own Space Age

https://www.thomasmoes.com/52obsessions/its-time-for-our-own-space-age
1•freediver•2h ago•0 comments

Show HN: ChikkaDB – A Translation Layer to Use SQLite as a JSON Database

https://github.com/athkishore/chikkadb-ts
4•athkishore•2h ago•0 comments