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.

OpenRaster, format for exchange of layered raster images between image editors

https://www.openraster.org/
1•mimasama•3m ago•0 comments

The rebellion against data centers is growing

https://spectator.com/article/rebellion-against-data-centers-growing/
1•01-_-•3m ago•0 comments

Show HN: Bratify – Live speech into charlie xcx brat

https://baggiest.github.io/bratify/
1•Baggie•4m ago•0 comments

The Three AI Pills

https://thezvi.substack.com/p/the-three-ai-pills
1•talivision•4m ago•0 comments

Binance gave Russia data on IT worker in EU, now jailed over Ukraine donations

https://meduza.io/feature/2026/08/17/kriptobirzha-binance-peredala-rossiyskim-silovikam-dannye-ob...
1•Klaster_1•5m ago•0 comments

The CPU Comeback Is Upon Us

https://spectrum.ieee.org/ai-cpu-comeback
1•50kIters•7m ago•0 comments

Show HN: Verifying that an auto-submitted job application arrived

https://aiapplyd.com/
1•sneefle•11m ago•0 comments

Translating poems on Seoul Metro's platform screen doors

https://www.substack-bahn.net/p/translating-poems-on-seoul-metros
1•decimalenough•11m ago•0 comments

Skyrim with Rust

https://github.com/realfakenerd/OpenSkyrim
2•libertas_quae_s•13m ago•0 comments

Ukraine says it hit Russian rocket centre linked to Starlink-style network

https://www.reuters.com/business/aerospace-defense/ukraine-says-it-hit-russian-rocket-centre-link...
1•vrganj•14m ago•0 comments

Show HN: Desktopcolors.com – A museum for solid background colors of classic OS

https://desktopcolors.com
2•vlowrian•16m ago•0 comments

Expertise Can't Be Automated: Why Resilience Still Needs Humans

https://resilienceinsoftware.org/news/11560646
3•zdkaster•16m ago•0 comments

GPU-Based Device Fingerprinting

https://shaderghost.gg/
1•avastel•18m ago•0 comments

Why books donʼt work (2019)

https://andymatuschak.org/books/
1•groomlake•19m ago•1 comments

Secret Claude tracker shocks users after Anthropic's anti-surveillance stance

https://arstechnica.com/tech-policy/2026/07/anthropic-outed-for-claude-tracker-that-secretly-moni...
2•mgh2•19m ago•0 comments

Every student is cheating with AI

https://ben.page/cheating
1•jer0me•19m ago•0 comments

Orbs and Jellyware [video]

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

Evaluating coding models on 40 real tickets

https://medium.com/@joeymills19/public-coding-benchmarks-dont-match-my-repo-so-i-built-my-own-305...
1•AnneWodell•21m ago•0 comments

Are LLMs good in-context tabular classifiers?

https://juleskreuer.eu/research/tabbench-llm
1•not_a_feature•22m ago•0 comments

Recover the 3D location of every photo, on phones, robots and glasses

https://www.youtube.com/watch?v=zyHMRgyLD5Y
1•nikhilsawlani•23m ago•0 comments

Watermark Scanner – find and decode hidden characters in text and code

https://watermark-scanner.netlify.app/
1•emryyrme•23m ago•0 comments

I Blog

https://simonwillison.net/series/blogging/
1•janandonly•28m ago•0 comments

Pony's Arena Allocator

https://www.ponylang.io/blog/2026/08/ponys-arena-allocator/
2•birdculture•29m ago•0 comments

A retired tire engineer and 48,933 other feeds

https://dev.profullstack.com/~anthony/blog/016-post.html
1•buffer_overlord•30m ago•0 comments

Most productivity apps assume that organization is your bottleneck

https://brainbattler.nattly.uk/
1•Salim_wariz•36m ago•1 comments

500k Applicants, 583 Jobs: The Frantic Scramble for Work in India

https://www.wsj.com/world/india/500-000-applicants-583-jobs-the-frantic-scramble-for-work-in-indi...
3•rustoo•36m ago•0 comments

HackEurope 2026: A short rant on AI and hackathons

https://duti.dev/blog/2026/spr/
3•mindracer•38m ago•0 comments

Judge sets framework for Nine PBS to retrieve archival data

https://current.org/2026/08/judge-sets-framework-for-nine-pbs-to-retrieve-archival-data/
1•croes•39m ago•0 comments

How to Fix Diagonal Speed Bug in Pygame – No AI – Pygame Tutorial for Beginners

https://www.youtube.com/watch?v=lY0GTTg_FsQ
1•shriekdj•40m ago•0 comments

Ask HN: How can I tell articles on HN is AI written or not?

1•BrucecarlL•42m ago•2 comments