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.

Understanding and Building an AI Agent

https://vinithavn.substack.com/p/understanding-and-building-an-ai
1•vinithavn_01•40s ago•0 comments

I'm building Omnitwine, I want to get some feedback let me know what you think?

https://omnitwine.com/
1•omnitwine•2m ago•1 comments

Show HN: TradeGate – Deterministic pre-trade firewall for AI trading agents

https://github.com/hkedia08/tradegate
1•hkedia08•4m ago•0 comments

The agent tax has arrived: Google Workspace's MCP pricing

https://martinalderson.com/posts/the-agent-tax-has-arrived/
1•martinald•4m ago•0 comments

Prism CSS – Client-side inspector for clean Tailwind, design tokens and AI specs

https://prism-css.drops.sh
1•krolbuilds•4m ago•0 comments

ETH robot hiked 10 km down from the Matterhorn alone

https://roboticsweekly.news/stories/eth-anymal-matterhorn-autonomous-hike-vlm-risk-map
1•geox•6m ago•0 comments

A Complete Guide to the Global Crackdown on Meta Smart Glasses

https://www.wired.com/story/a-complete-guide-to-the-global-crackdown-on-meta-smart-glasses/
1•Brajeshwar•7m ago•0 comments

Show HN: X12sdk – read, check and generate HIPAA X12 claim files in Python

https://github.com/owgreen-dev/x12sdk
1•oggreen•21m ago•0 comments

Netflix viewers to pay BBC license fee even if they don't watch BBC

https://www.theguardian.com/politics/live/2026/nov/29/labour-bbc-iplayer-licence-fee-netflix-disn...
4•avancemos•22m ago•2 comments

Jailbroken Hermes Agent Using DeepSeek Model Enables European Data-Theft Spree

https://epyhia.com/jailbroken-hermes-agent-using-deepseek-model-enables-nine-day-european
3•arbuge•23m ago•0 comments

Businesses race to counter machine-driven cyber threats

https://www.colt.net/resources/insights/businesses-race-to-counter-machine-driven-cyber-threats-a...
1•mooreds•23m ago•0 comments

The Exponential Rise of Agent Instruction Files

https://homes.cs.washington.edu/~reshabh/posts/exponential-rise-of-agent-instruction-files.html
2•reshabh•26m ago•0 comments

Show HN: Holix, a local-first context-folding MCP server in Rust and Lean 4

https://github.com/steveSujo/holix
2•someProgramer•27m ago•0 comments

Anthropic's Watermarks on Text

https://medium.com/@gen.tang86/anthropic-is-adding-watermarks-to-text-part-2-from-biased-kgw-to-u...
3•tgbaggio•28m ago•0 comments

WibWob-DOS – A Turbo Vision TUI desktop on Linux, running in a browser tab

https://wwdos.vercel.app/
1•3stripe•28m ago•0 comments

Google Antigravity and Gemini Neon: What Gets Accounts Banned

https://flaviocopes.com/google-ai-account-bans/
3•taubek•29m ago•1 comments

Show HN: A free online PDF editor that runs in the browser

https://pdfbop.com/
1•ulicaki8991•30m ago•0 comments

Show HN: Zapier/Make vs. self-hosted n8n cost calculator

https://migrate.rztech.web.id
1•samdhitosaja•33m ago•1 comments

Show HN: vibe-a-palooza: An Aggregator for Apps

https://looz.togoder.click/
2•tanevanwifferen•33m ago•0 comments

Show HN: Break the 8 Mirror Maze – trick a guarded AI agent (no sign-up)

https://arachnode-gateway.onrender.com/challenge
1•quantagenic•33m ago•0 comments

NASA's Voyager 1 Makes History Reaching One Light-Day from Earth

https://www.nasa.gov/news-release/nasas-voyager-1-makes-history-reaching-one-light-day-from-earth/
2•torutofu•34m ago•0 comments

Google account banned due to Gemini usage

https://twitter.com/complex_maths/status/2126864616538165581
73•tarr11•36m ago•36 comments

A free clone of the Vast.ai front end/back end system

https://github.com/0xSufi/vastre
1•binyu•36m ago•0 comments

Heavy-lift drones deliver 55 tonnes of solar panels to live site

https://www.constructionenquirer.com/2026/11/23/heavy-lift-drones-deliver-55-tonnes-of-solar-pane...
2•edent•39m ago•0 comments

Limen, a Capabilities Language

https://limen-lang.org/
2•0x23alfonso•41m ago•0 comments

Türkiye nabs 4 suspected of hijacking X accounts of US officials

https://www.turkiyetoday.com/nation/turkiye-nabs-4-suspected-of-hijacking-x-accounts-of-us-offici...
1•aa_is_op•42m ago•0 comments

The Software-Defined Mirage and the Alien Worlds of Socket Cores and OS Kernels

https://www.nextplatform.com/control/2026/11/27/the-software-defined-mirage-and-the-alien-worlds-...
1•cristianvasile•43m ago•0 comments

The Tao of Coding with Agent Harnesses

https://www.vivekchopra.com/posts/tao-of-coding-with-agent-harnesses
1•vivekchopra•43m ago•0 comments

Pinecone Vector Search in Postgres

https://www.pinecone.io/blog/introducing-pg-pinecone/
1•arunmu•46m ago•0 comments

Ask HN: Do Japanese entrepreneurs have a chance to succeed in US market?

2•yusukez•47m ago•0 comments