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.

The Invitation-Only Stock Market for the Wealthy

https://www.wsj.com/finance/investing/private-stock-market-growth-bb71bde1
1•mudil•51s ago•0 comments

Free software grows as a function of social utility (2022)

https://ariadne.space/2022/08/05/free-software-grows-as-a.html
1•ghssds•3m ago•0 comments

Configure automatic detection of work location in Microsoft Teams

https://learn.microsoft.com/en-us/microsoft-365/places/configure-auto-detect-work-location
1•TheDataMaverick•26m ago•0 comments

The Coupang data breach that hit two-thirds of South Korea

https://www.ft.com/content/df4042fa-3e56-410f-b905-4aed8fd434ac
1•zdw•31m ago•0 comments

Poor Johnny still won't encrypt

https://bfswa.substack.com/p/poor-johnny-still-wont-encrypt
4•zdw•32m ago•0 comments

Show HN: Flowctl – Self-service workflows with approvals and SSO. Single Binary

https://github.com/cvhariharan/flowctl
3•cv_h•36m ago•0 comments

New Google web ecosystem tools and partnerships

https://blog.google/products/search/tools-partnerships-web-ecosystem/
1•gmays•36m ago•0 comments

Show HN: OAuth-style authorization for AI agents

https://www.npmjs.com/package/@variant96/pia-sdk
2•Pukuta•39m ago•0 comments

Show HN: Ten Principles of Good Design

https://tonygaeta.com/labs/ten-principles-of-good-design
2•LightMorpheus•40m ago•0 comments

Coding Agents and Complexity Budgets

https://leerob.com/agents
1•tortilla•45m ago•0 comments

Physicians AI Report

https://2025-physicians-ai-report.offcall.com/
1•samuel246•47m ago•0 comments

Model Context Protocol (MCP) Support for Google Services

https://cloud.google.com/blog/products/ai-machine-learning/announcing-official-mcp-support-for-go...
1•manveerc•53m ago•0 comments

Show HN: Tandem – Real-time collaborative editor with AI attribution tracking

https://github.com/lmanchu/tandem/tree/v3
2•Lmanchu•54m ago•1 comments

UK developing urgent plan for conflict, minister says

https://ukdefencejournal.org.uk/uk-developing-urgent-plan-for-conflict-minister-says/
2•Bender•55m ago•0 comments

Show HN: Claude Code Recipes for Knowledge Workers (Open Source)

https://github.com/sgharlow/claude-code-recipes
7•sgharlow•56m ago•0 comments

Switzerland's Security Policy Strategy

https://www.news.admin.ch/en/newnsb/BLkWfUbUsXtBFoSj-krgU
3•samuel246•57m ago•0 comments

BoxLite Love AI agent – SQLite for VMs: embeddable AI agent sandboxing

https://github.com/boxlite-labs/boxlite
1•dorianzheng•1h ago•1 comments

Don't Build Agents, Build Skills Instead – Barry and Mahesh, Anthropic [video]

https://www.youtube.com/watch?v=CEvIs9y1uog
1•kerim-ca•1h ago•0 comments

Color Spaces, Gamuts, and Transformations

https://ari-atori.dev/articles/color-spaces-gamuts-and-transformations.html
1•todsacerdoti•1h ago•0 comments

Michael Jordan was a basketball legend. Now, he's one in NASCAR too

https://www.nytimes.com/athletic/6882918/2025/12/11/michael-jordan-nascar-settlement-trial-legend/
1•divbzero•1h ago•1 comments

Deno 2.6 and Socket: Supply Chain Defense in Your CLI

https://socket.dev/blog/deno-2-6-socket-supply-chain-defense-in-your-cli
2•feross•1h ago•0 comments

Battery storage hits $65/MWh, a tipping point for solar

https://electrek.co/2025/12/12/battery-storage-hits-65-mwh-tipping-point-solar/
7•toomuchtodo•1h ago•3 comments

EV sticker shock: Solo drivers using California carpool lanes face hefty fines

https://www.latimes.com/california/story/2025-12-01/ev-sticker-shock-solo-drivers-using-californi...
1•PaulHoule•1h ago•1 comments

Show HN: I made a grid that sizes your subscriptions by what they cost

https://visualize.nguyenvu.dev/
1•hoangvu12•1h ago•1 comments

UK Lords propose ban on VPNs for children

https://www.techradar.com/vpn/vpn-privacy-security/uk-lords-propose-ban-on-vpns-for-children
9•josephcsible•1h ago•0 comments

Google Removes Sci-Hub Domains from U.S. Search Results Due to Dated Court Order

https://torrentfreak.com/google-removes-sci-hub-domains-from-u-s-search-results-due-to-dated-cour...
30•t-3•1h ago•13 comments

Processing 630M More Pwned Passwords, Courtesy of the FBI

https://www.troyhunt.com/processing-630-million-more-pwned-passwords-courtesy-of-the-fbi/
1•LorenDB•1h ago•0 comments

Waymo: "Not yet a legal path to operating in New York"; NYC demo video

https://twitter.com/Waymo/status/1999620430970167481
4•tech234a•1h ago•1 comments

Cycle-accurate YM2149 PSG emulator

https://github.com/slippyex/ym2149-rs
1•todsacerdoti•1h ago•0 comments

The Coming Need for Formal Specification

https://benjamincongdon.me/blog/2025/12/12/The-Coming-Need-for-Formal-Specification/
5•todsacerdoti•1h ago•1 comments