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•9mo ago

Comments

zoezoezoezoe•9mo 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•9mo 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.

Trump says he's decertifying Canada-made aircraft and threatens 50% tariffs

https://www.cnn.com/2026/01/29/business/trump-canada-aircraft-tariff
5•throw0101c•4m ago•1 comments

ModRetro Chromatic and Koss Porta Pro Bundle

https://www.andurilgear.com:443/
1•keepamovin•5m ago•0 comments

Memory Shortage Haunts Apple's Blowout iPhone Sales

https://www.wsj.com/tech/memory-shortage-haunts-apples-blowout-iphone-sales-0410e375
1•pretext•11m ago•0 comments

How Businesses Are Manipulating ChatGPT Results

https://www.wsj.com/tech/ai/ai-what-is-geo-aeo-5c452500
2•pretext•12m ago•0 comments

The End of the Model S Is the Start of a New Tesla

https://www.wsj.com/business/autos/the-end-of-the-model-s-is-the-start-of-a-new-tesla-379cb74e
1•pretext•12m ago•0 comments

Show HN: Cycle - Integrated business banking, accounting and payroll

https://joincycle.co
1•aswinmohanme•13m ago•1 comments

Show HN: Cicada – a scripting language that integrates with C

https://github.com/heltilda/cicada
3•briancr•14m ago•0 comments

My Website Was Down for a Week, and I Was the Last to Notice

https://igorstechnoclub.com/my-website-was-down-for-a-week-and-i-was-the-last-to-notice/
2•Igor_Wiwi•16m ago•0 comments

Code is cheap. Show me the talk

https://nadh.in/blog/code-is-cheap/
2•ghostfoxgod•16m ago•0 comments

VulnLLM-R: Specialized Reasoning LLM with Agent Scaffold for Vuln Detection

https://arxiv.org/abs/2512.07533
1•gquere•16m ago•1 comments

Coding Is When We're Least Productive

https://codemanship.wordpress.com/2026/01/30/coding-is-when-were-least-productive/
1•todsacerdoti•17m ago•0 comments

Solar panels on land used for biofuels could power all cars and trucks electric

https://ourworldindata.org/biofuel-land-solar-electric-vehicles
3•alphabetatango•17m ago•0 comments

Show HN: Convert OBJ to STL Free Online Tool (Pngtostl.xyz)

https://pngtostl.xyz/convert/obj-to-stl
1•niliu123•19m ago•0 comments

Email experiments: filtering out external images

https://www.terracrypt.net/posts/email-experiments-image-filtering.html
2•todsacerdoti•20m ago•0 comments

AI Assisted Interviews

https://www.spakhm.com/ai-interviews
1•MrBuddyCasino•21m ago•0 comments

The Birth of a Dialogue: Why I'm Building Tabularis

https://debba92.substack.com/p/the-birth-of-a-dialogue-why-im-building
1•debba•21m ago•0 comments

Show HN: TikTok alternative no login no AI

https://infinijest.com
1•throwawaste•24m ago•0 comments

GregKH Awarded the Prize for Excellence in Open Source 2026

https://daniel.haxx.se/blog/2026/01/30/gregkh-awarded-the-prize-for-excellence-in-open-source-2026/
1•robin_reala•25m ago•0 comments

Building an eBPF Transparent Proxy

https://jnfrati.dev/posts/ebpf-transparent-proxy/
2•jnfrati•26m ago•1 comments

Ask HN: How do you market a side project?

3•ruairidhwm•26m ago•2 comments

Hippo's 'Magic' Sweat Explained

http://news.bbc.co.uk/2/hi/science/nature/3749351.stm
2•thunderbong•27m ago•1 comments

Barring last-minute nuclear deal, US and Russia teeter on brink of new arms race

https://www.reuters.com/business/aerospace-defense/barring-last-minute-nuclear-deal-us-russia-tee...
2•testrun•27m ago•0 comments

Track Your Routine – Open-source app for task management

https://github.com/MSF01/TYR
3•perrii•29m ago•1 comments

How much robotics labs/startups pay to annotate robot training videos?

1•prabhavsanga•29m ago•0 comments

Why this "replace your stack" product will probably fail

1•taylor_jj•33m ago•0 comments

Building Products as a Designer

https://designexplained.substack.com/p/building-products-as-a-designer
1•kaizenb•34m ago•0 comments

Welcome to FOSDEM 2026

https://fosdem.org/2026/
1•weinzierl•34m ago•0 comments

Clay Shirky: Students Are Skipping the Hardest Part of Growing Up

https://www.nytimes.com/2026/01/30/opinion/ai-social-skills-relationships.html
1•mitchbob•36m ago•1 comments

Evaluations in the Real World?

1•stichers•36m ago•0 comments

I Test Drove a Chinese EV. Now I Don't Want to Buy American Cars Anymore

https://www.wsj.com/tech/personal-tech/chinese-ev-test-drive-xiaomi-su7-c3e59282
6•pretext•38m ago•0 comments