frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Avoid Continue

https://www.teamten.com/lawrence/programming/avoid-continue.html
2•todsacerdoti•1y ago

Comments

zoezoezoezoe•1y 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•1y 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.

What's Next After RLHF? – Diogo Almeida, TypeSafe AI [video]

https://www.youtube.com/watch?v=cJ0EOzey--o
1•super_linear•1m ago•0 comments

China Adds Currencies to Central Clearing in Yuan's Global Push

https://www.bloomberg.com/news/articles/2026-09-17/china-adds-currencies-to-central-clearing-in-y...
1•toomuchtodo•2m ago•1 comments

Rossino – Pomodoro timer for Mac/iPhone/iPad/Watch, exact-second sync

https://apps.apple.com/us/app/rossino-a-pomodoro-timer/id6797546201
1•bjgreenberg•4m ago•0 comments

ASCII City

https://asciicity.live/
1•anjel•14m ago•0 comments

Washington Won't Be Regulating AI Anytime Soon

https://www.wired.com/story/washington-wont-be-regulating-ai-anytime-soon/
1•thm•14m ago•0 comments

Judge Orders Data Sharing and Other Fixes to Solve Google's Ad Tech Monopoly

https://www.nytimes.com/2026/09/16/technology/google-ad-tech-remedies.html
1•thm•15m ago•0 comments

Lolcow Theory of the Internet

https://etymology.substack.com/p/lolcow-theory-of-the-internet
1•DanielVZ•18m ago•0 comments

Show HN: MealMacroAI – Reverse food portion calculator for meal prep macros

https://www.mealmacroai.com/
1•yudufeifan•21m ago•0 comments

VC-Attention: Faster Low-Bit Attention Without Retraining

https://www.nunchux.ai/blog/attention-is-the-video-bottleneck
3•lmxyy•23m ago•0 comments

Scientists create mice with part-human brains

https://www.theguardian.com/science/2026/sep/16/mice-part-human-brains-research
1•thunderbong•31m ago•0 comments

Jev Ultrafast: A browser agent with a dynamic, indexed action space

https://github.com/browser-use/jev-ultrafast
2•rahimnathwani•31m ago•0 comments

Show HN: Quiet Field – Offline ambient sound mixing for Windows

https://github.com/Gary06868/QuietField
1•LiangyuGong•32m ago•0 comments

Tesla on Autopilot stopped before deadly Mesa crash: Here's what filing says

https://www.azfamily.com/2026/09/15/tesla-autopilot-stopped-before-deadly-mesa-crash-heres-what-f...
5•tortilla•38m ago•0 comments

Keys Not Included: recovering the signing keys for US driver's license barcodes

https://ryan.science/blog/keys-not-included
16•Ryan5453•40m ago•0 comments

Pangram AI Detection API

https://www.pangram.com/solutions/api
1•ijidak•40m ago•0 comments

House advances bill to rein in AI data center utility costs

https://www.cnbc.com/2026/09/15/congress-ai-data-center-utility-costs.html
1•aspenmayer•42m ago•0 comments

Huawei says its new smartphone chip is free of any US-made components

https://www.techradar.com/pro/huawei-says-its-new-smartphone-chip-is-entirely-free-of-any-us-made...
3•yogthos•44m ago•0 comments

DayOne Is Building a Biological Data Centre

https://datacentremagazine.com/news/why-dayone-is-building-a-biological-data-centre-in-singapore
1•gustavus•44m ago•0 comments

How to remotely access Home Assistant

https://docs.dhttp.net/en/docs/demos/smart-home
1•Arya_xiaofan•50m ago•0 comments

1.1.1.1 now supports post-quantum DNSSEC, all 2,420 bytes of it

https://blog.cloudflare.com/post-quantum-dnssec-1111/
2•selenehyun•52m ago•0 comments

Holy Grail of Rocketry

https://www.spacex.com/content/starship/holy-grail-of-rocketry
2•d_silin•53m ago•0 comments

Ḽava AI Bitcoin Talk Article

https://bitcointalk.org/index.php?topic=5594370
1•JahRastafari89•56m ago•0 comments

Ask HN: How many runs before you trust a coding agent's result?

1•Marvin_RunAI•58m ago•1 comments

iCloud+ Now Includes Apple TV and Apple Arcade

https://www.icloud.com/info/icloud-plus-tv-arcade
2•asadm•59m ago•3 comments

Ex-MS engineer reveals the story behind the infamous 'FCKGW' Windows XP key

https://www.pcgamer.com/software/windows/ex-ms-engineer-reveals-the-story-behind-the-infamous-fck...
2•rfarley04•59m ago•1 comments

Distributed System Illustrated

https://www.codedump.info/dist-system-en/
1•xiaohanyu•59m ago•1 comments

Integer Palindromes – 2026 AIME I Problems/Problem 2

https://github.com/norvig/pytudes/blob/main/ipynb/palsum.ipynb
2•vismit2000•1h ago•0 comments

AI models chatting in 'surreal' dialect mixing poetic language and techbrojargon

https://www.theguardian.com/technology/2026/sep/15/syd-barrett-ai-chat-language-poetic-tech-bro-j...
2•fragmede•1h ago•0 comments

The Future of Consumer AI

https://zero2data.substack.com/p/the-future-of-consumer-ai
1•wj•1h ago•0 comments

Interview with Big Data engineer in 2026 [video]

https://www.youtube.com/watch?v=FG8sUgjBGXs
1•vismit2000•1h ago•0 comments