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•10mo ago

Comments

zoezoezoezoe•10mo 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•10mo 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.

Ask HN: What's the best computer science book you've read recently?

1•kothariji•1m ago•0 comments

Show HN: I built SinoName – gen Chinese names with culture meaning, in one day

https://sinoname.geekaa.com
1•quasimo•6m ago•1 comments

Gemma Needs Help

https://www.lesswrong.com/posts/kjnQj6YujgeMN9Erq/gemma-needs-help
2•pr337h4m•15m ago•0 comments

Ask HN: How are people forecasting AI API costs for agent workflows?

2•Barathkanna•24m ago•1 comments

Numerical Integration on HP Calculators

https://axiomelab.gitlab.io/hp-integral/article_hp_en.html
2•Tomte•27m ago•0 comments

For the Love of God, Shut Up About Microtubules

https://mvaleadvocate.substack.com/p/for-the-love-of-god-shut-up-about
2•jrosenblatt•30m ago•0 comments

AI detects case of breast cancer that slipped past doctors

https://www.thetimes.com/uk/healthcare/article/breast-cancer-detection-ai-nhs-zb9qcljr3
1•petethomas•35m ago•0 comments

The Growth Tax in Australia

https://zencapital.substack.com/p/the-growth-tax-payroll-tax-in-australia
1•zenincognito•35m ago•1 comments

Why the US Should Ratify the Congressional Apportionment Amendment

https://www.astralcodexten.com/p/last-rights
2•colonCapitalDee•37m ago•0 comments

Create value for others and don’t worry about the returns

https://geohot.github.io//blog/jekyll/update/2026/03/11/running-69-agents.html
11•ppew•44m ago•0 comments

Cursor Best Practices Skill by Hktitan

https://skills.sh/hktitan/cursor-best-practices/cursor-best-practices
1•HarshitKhemani•47m ago•1 comments

TADA: Fast, Reliable Speech Generation Through Text-Acoustic Synchronization

https://www.hume.ai/blog/opensource-tada
2•smusamashah•47m ago•0 comments

#1 Trending on PeerPush – BasaltSurge

https://peerpush.net/p/basaltsurge
1•mayordelmar•50m ago•0 comments

A writing space that breathes with you

https://vessel.here.now/
1•barnira•52m ago•0 comments

Breaking Down the Jelly Slider

https://blog.swmansion.com/breaking-down-the-jelly-slider-9ab9239f6d80
1•nsainsbury•57m ago•1 comments

I should quit my job and become a goat farmer

https://www.goatops.com/
1•microsoftedging•57m ago•0 comments

Show HN: Self-hosted DCF workspace using Damodaran datasets, LLM narratives

1•softcane•58m ago•0 comments

MacBook Neo Is a 'Shock' to the PC Industry: Asus Co-CEO

https://www.pcmag.com/news/asus-co-ceo-macbook-neo-is-a-shock-to-the-pc-industry
6•jithinraj•59m ago•1 comments

We Build Our Own Decentralized DNS for AnChat – Here's Why

https://twitter.com/DeBrosOfficial/status/2031602104666673389
1•debros•1h ago•0 comments

China's first moon astronauts could land in Rimae Bode

https://www.space.com/astronomy/moon/china-first-astronaut-moon-landing-mission-rimae-bode
3•jithinraj•1h ago•0 comments

How Wikipedia Portrayed Humanity in a Single Photo (2018)

https://www.wired.com/story/how-wikipedia-portrayed-humanity-in-a-single-photo/
2•icwtyjj•1h ago•1 comments

OWASP Top Agents and AI Vulnerabilities

https://blog.alexewerlof.com/p/owasp-top-10-ai-llm-agents
1•weltview•1h ago•0 comments

24-year-old ditched her smartphone and social media known as 'appstinent'

https://www.cnbc.com/2026/03/10/a-24-year-old-who-ditched-her-smartphone-and-social-media-wants-y...
5•1vuio0pswjnm7•1h ago•0 comments

AI Aadhaar OCR API for Fast Aadhaar Data Extraction

1•azapi_ai•1h ago•0 comments

Meta to charge advertisers a fee to offset Europe's digital taxes

https://www.reuters.com/business/media-telecom/meta-charge-advertisers-fee-offset-europes-digital...
2•1vuio0pswjnm7•1h ago•0 comments

We built NPM for agent knowledge – Context Packs on Armalo (update)

https://www.armalo.ai/
1•ArmaloAI•1h ago•1 comments

David Woo: The Market Is Wrong About Iran, Oil and What Comes Next [video]

https://www.youtube.com/watch?v=W2Z6UVv_wl4
1•thomassmith65•1h ago•1 comments

Why Ads in Chatbots May Not Click

https://www.wsj.com/tech/ai/why-ads-in-chatbots-may-not-click-2ca52203
2•1vuio0pswjnm7•1h ago•0 comments

Neuromorphic sphere topology Hebbian learning as a path to grounded intelligence

1•rusanovych•1h ago•0 comments

Intent-Driven Development

https://jason-stillwell.com/blog/2026/03/10/intent-driven-development/
3•dragonfax•1h ago•3 comments