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.

Inside the NYT's Hoax Factory

https://twitter.com/davidsacks/status/1995225152674533557
1•nailer•38s ago•0 comments

Privacy first image compressor and converter

https://filelite.app
1•gintokinx•2m ago•0 comments

Michael Burry slams Tesla valuation, warns of 'ridiculous' dilution

https://electrek.co/2025/12/01/the-big-short-michael-burry-slams-tesla-tsla/
2•breve•2m ago•0 comments

2025's 'Advent of Code' event chooses tradition over AI

https://thenewstack.io/2025s-advent-of-code-event-chooses-tradition-over-ai/
1•MilnerRoute•4m ago•0 comments

ULID: Universally Unique Lexicographically Sortable Identifier

https://packagemain.tech/p/ulid-identifier-golang-postgres
1•der_gopher•6m ago•0 comments

Microsoft Releases: No More Dashboards, Just Prompts

https://github.com/microsoft/TaskWeaver
1•bakigul•6m ago•0 comments

Ask HN: Tool Calls vs. Structured Responses

1•asen•9m ago•0 comments

Kit gives the AlphaSmart Neo2 more of a portable typewriter-like design

https://liliputing.com/this-kit-gives-the-alphasmart-neo2-more-of-a-portable-typewriter-like-design/
1•PaulHoule•9m ago•0 comments

"How to Attend Meetings" – Internal Guidelines from the New York Times

https://docs.google.com/presentation/d/1l7s1aAsNPlNhSye8OsMqmH6pMR32OYGGdLT6VKyFaQE/edit#slide=id.p
2•spagoop•10m ago•0 comments

Ceremonial Bugle

https://ceremonialbugle.com/works.htm
1•colinprince•10m ago•0 comments

Why ancient Roman buildings last for millennia [video]

https://www.bbc.com/reel/video/p0mk1gdc/why-ancient-roman-buildings-last-for-millennia
1•lelele•11m ago•1 comments

MCA: Entity Coverage as a Memory Retrieval Gate

https://github.com/vac-architector/VAC-Memory-System/blob/main/MCA.md
1•ViktorKuz•11m ago•0 comments

Everything I know about getting buy-in

https://miedwar.substack.com/p/everything-i-know-about-getting-buy
1•miedwar•11m ago•0 comments

Netflix drops support for casting to most TVs

https://arstechnica.com/gadgets/2025/12/netflix-quietly-drops-support-for-casting-to-most-tvs/
1•pseudolus•12m ago•1 comments

How We Turned Claude into a Beast Machine for Web Scraping

https://scrapegraphai.com/blog/claude-scraping-beast-machine
1•lurens•12m ago•0 comments

Let's put Tailscale on a jailbroken Kindle

https://tailscale.com/blog/tailscale-jailbroken-kindle
2•ingve•14m ago•0 comments

Show HN: Life Simulator – ASCII terminal game I pair-programmed with Opus 4.5

https://github.com/farukalpay/adulting-simulator
2•GeldiBey•14m ago•0 comments

Tesla Model 3/Y with Chinese LG batteries show 'catastrophic' failure rates

https://electrek.co/2025/12/01/tesla-model-3-y-chinese-lg-batteries-showing-catastrophic-failure-...
5•breve•17m ago•0 comments

A new possibility for life: Study suggests ancient skies rained down ingredients

https://www.colorado.edu/today/2025/12/01/new-possibility-life-study-suggests-ancient-skies-raine...
1•geox•18m ago•0 comments

Ask HN: Suggest newsletters similar to coding sloth please?

2•lalithaar•18m ago•0 comments

Show HN: Search Airbnb listings with unique amenities (piano, sauna, etc.)

https://revealbnb.com/
1•hommus•19m ago•0 comments

Search across tabs in Dia with Raycast

https://www.raycast.com/the-browser-company/dia
1•nklswbr•22m ago•0 comments

DeepMind gives up on mechanistic interpretability research

https://www.lesswrong.com/posts/StENzDcD3kpfGJssR/a-pragmatic-vision-for-interpretability
3•cubefox•22m ago•0 comments

AI engineering manifesto (December 2025)

https://github.com/Ge-limin/ai-native-engineering-manifesto
3•suriya-ganesh•23m ago•0 comments

Clarity, Continental Philosophy, and the Cat in the Piano

https://www.lableaks.dev/p/clarity-continental-philosophy-and
2•didgeoridoo•25m ago•0 comments

Show HN: Cm-colors –I got tired of manually fixing wcag contrast,so I made this

https://github.com/comfort-mode-toolkit/cm-colors
4•lalithaar•25m ago•0 comments

NotebookLM vs. Denser AI Chat: Which AI Knowledge Assistant Is Right for You?

https://denser.ai/blog/ai-knowledge-bases-compared-notebooklm-denser/
3•zhiheng_huang•27m ago•1 comments

Seniority and understanding the Web vs. knowing how to use Frameworks

https://helloanselm.com/writings/on-seniority-and-understanding-the-web-vs-knowing-how-to-use-fra...
2•speckx•27m ago•0 comments

Ben Franklin's Newsletter

https://www.joinlsn.com/p/ben-franklins-newsletter
2•wwalker2112•30m ago•0 comments

Sycophancy is the first LLM "dark pattern"

https://www.seangoedecke.com/ai-sycophancy/
10•jxmorris12•31m ago•1 comments