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.

Change Impact Analyzer – see what your edit breaks (Tree-sitter+LSP)

https://marketplace.visualstudio.com/items?itemName=AniqUsman.change-impact-analyzer
1•thespicyavocado•1m ago•0 comments

A Manager Asked How to Tell His Report to "Get a Life" [video]

https://www.youtube.com/watch?v=JN8CkCGGRzo
1•bigtechtea•1m ago•1 comments

Asahi Linux: Initial USB4/Thunderbolt Support for M1/M2/M3 on LKML

https://social.treehouse.systems/@sven/117186314116319619
1•pizzaiolo•2m ago•0 comments

Reactions To: The Rise and Fall of Agent Civilizations

https://twitter.com/dwarkesh_sp/status/2093833419377815719/quotes
1•rzerowan•2m ago•1 comments

Critical CVE: JFrog Artifactory Authentication Bypass

https://www.cve.org/CVERecord?id=CVE-2026-82329
1•mellosouls•2m ago•0 comments

Eco Ur Fascism [pdf]

https://dn710209.ca.archive.org/0/items/eco_ur-fascism/eco_ur-fascism.pdf
1•oriettaxx•3m ago•0 comments

D1 Migration Guard – zero-dep safety checks before wrangler d1 migrations apply

https://github.com/MattBridges/d1-migration-guard
1•UFSoftware76•4m ago•0 comments

AI and the Death of Expertise: Why Experts Still Matter

https://www.inc.com/louise-allen/ai-and-the-death-of-expertise-why-experts-still-matter/91395208
1•prabal97•4m ago•0 comments

IKEA Hackers

https://ikeahackers.net
1•als0•6m ago•0 comments

Show HN: ShaderToyX

https://github.com/vinay/ShaderToyX
1•vmmenon•15m ago•0 comments

Show HN: Bill fans per post, not per month

https://folloverse.com/
1•wowinter15•15m ago•0 comments

Making the Internet Boring

https://cemrehancavdar.com/2026/08/30/making-the-internet-boring/
1•zdw•19m ago•0 comments

Game of Life Tower

https://notes.jordanscales.com/gol-tower
1•syx•20m ago•0 comments

Ask HN: What do you use to host side projects?

2•ilmak1704•20m ago•1 comments

Upround – paper trade YC startups

https://upround.app/
3•jeremykalfus•21m ago•0 comments

Texas Senate hopeful Talarico teams with Mark Cuban to breakup healthcare

https://www.cnbc.com/2026/08/27/texas-senate-james-talarico-mark-cuban-healthcare.html
3•rawgabbit•22m ago•0 comments

I Use Claude Code on an Unfamiliar Codebase

https://thetechbuffet.substack.com/p/claude-code-on-an-unfamiliar-codebase
1•ahmedbesbes•23m ago•0 comments

Ask HN: Is Paul Graham right that you shouldn't build startups at 17?

1•AmirMakirr•27m ago•2 comments

ATF's Breached System Was Isolated. Its IT Management Workforce Fell 25%

https://www.federalhiringdata.com/articles/atf-major-data-breach-cyber-workforce-2026
1•ycombinatronics•28m ago•0 comments

Chrome Web Store extensions caught stealing crypto, browser data

https://www.bleepingcomputer.com/news/security/chrome-web-store-extensions-caught-stealing-crypto...
2•sbulaev•32m ago•0 comments

No agents after 8 pm

https://sparsethought.com/2026/08/19/no-agents-after-8pm/
2•galsapir•33m ago•0 comments

Photon Frames – The digital photo frame for Synology Photos and Immich

https://photonframes.com/
1•evo_9•34m ago•0 comments

Google Maps Will Show 'Lake America' in US, Not 'Lake Ontario'

https://www.reuters.com/world/us/google-maps-will-show-lake-america-us-not-lake-ontario-2026-08-30/
3•geox•34m ago•1 comments

The XGBoost Vector-Leaf Model

https://xgboost.ai/2026/08/25/introducing-the-xgboost-vector-leaf-model
2•theanonymousone•36m ago•0 comments

Show HN: Automated Sanborn map georeferencing, with a Chicago map viewer

https://autogeoref.com/
1•chicagopluto•37m ago•1 comments

America's next grocery shock is brewing

https://www.axios.com/2026/08/30/grocery-inflation-prices-war-diesel
1•cwwc•38m ago•0 comments

Build a Bigram Model in 10 Minutes

https://www.sithankanna.com/posts/learning-bigram-zero-layers.html
1•hdit•38m ago•0 comments

Cores in space: The core memory module from a 1980 Spacelab computer

https://www.righto.com/2026/08/spacelab-core-memory.html
11•pwg•39m ago•1 comments

Ask HN: Anyone care to answer a small survey about ML?

1•aunekiaru•40m ago•1 comments

Is GitHub Down?

2•worldsavior•46m ago•2 comments