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

Comments

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

We Plugged ChinaXiv into Paperzilla

https://paperzilla.ai/news/chinaxiv-support
1•pors•1m ago•0 comments

The Era of 'Manual labor billionaires' is coming

https://www.asiae.co.kr/en/article/2025122909585195818
1•cumo•2m ago•0 comments

Built a zombie extraction shooter using Gemini-3-Pro

https://kuakua.app/games/zombie-extraction-squad-survival
1•yu101994•2m ago•0 comments

Ask HN: Has anyone paid for adaptive onboarding vs. traditional B2B funnels?

1•Angelcee•2m ago•0 comments

A Surprising Treatment for Chronic Lower Back Pain: Cannabis

https://www.wsj.com/health/wellness/lower-back-pain-treatment-cannabis-fcf22d0e
1•thelastgallon•3m ago•0 comments

Applying Psychophysics to CSS for UI zooming and scaling of page

https://lalithaar.github.io/Interdisciplinary-Systems-Research-Lab/experiments/Perceptual-Scaling...
1•lalithaar•3m ago•0 comments

Ask HN: Can I report an iMessage bug without an Apple Developer account?

1•nickname-derail•5m ago•0 comments

Automatic syntax error recovery in lrpar

https://tratt.net/laurie/blog/2020/automatic_syntax_error_recovery.html
1•fanf2•5m ago•0 comments

Kaizen: A Factory Story (A Programming Game from Zach Barth)

https://coincidence.games/kaizen/
1•azhenley•6m ago•0 comments

Starlink Direct to Cell

https://starlink.com/business/direct-to-cell
1•tosh•7m ago•0 comments

'Why should we pay these criminals?' the hidden world of ransomware negotiations

https://www.theguardian.com/technology/2025/dec/29/ransomware-negotiations-extortion-cyber-attacks
1•spzb•8m ago•0 comments

After the Big Tech Layoffs

https://www.youtube.com/watch?v=2mA4vZeHp8o
1•lichtenberger•9m ago•0 comments

Chinese Leo Satellite Internet Update: Guowang, Qianfan, and Honghu-3

https://circleid.com/posts/chinese-leo-satellite-internet-update-guowang-qianfan-and-honghu-3
1•tosh•9m ago•0 comments

Show HN: I built LoveMemo to surprise my wife

https://lovememo.app/
1•jxnata•9m ago•0 comments

How to stop Claude Code from littering your codebase with Markdown files

https://solmaz.io/agent-doc-workflow
1•hosolmaz•10m ago•0 comments

We don't know what causes wide spread crime trends

https://crimede-coder.com/blogposts/2026/CrimeTrendsMystery
1•apwheele•10m ago•0 comments

Macromedia Flash, from an Animator's Standpoint

https://medium.com/@nehochupechatat/the-history-of-macromedia-flash-from-an-animators-standpoint-...
2•thisislife2•11m ago•0 comments

Memelang: "Axial grammar" makes ultra token efficient query strings

https://arxiv.org/abs/2512.17967
1•bri-holt•11m ago•0 comments

The costs of corn: should the US change how it grows its dominant crop?

https://www.theguardian.com/environment/2025/dec/03/environment-corn-farming-trump-administration
1•PaulHoule•11m ago•0 comments

Show HN: FeelStr – Stream what you feel instead of browsing genres

https://feelstr.com
1•deepmon•12m ago•0 comments

'This will be a stressful job': Altman offers $555k for most daunting role in AI

https://www.theguardian.com/technology/2025/dec/29/sam-altman-openai-job-search-ai-harms
1•mellosouls•12m ago•0 comments

Show HN: BlueprintMCP for Chrome

https://chromewebstore.google.com/detail/blueprint-mcp-for-chrome/kpfkpbkijebomacngfgljaendniocdfp
1•404softwarelabs•13m ago•0 comments

Starlink satellites: Facts, tracking and impact on astronomy

https://www.space.com/spacex-starlink-satellites.html
1•tosh•13m ago•0 comments

Drinking Bottled Water Daily Ingest 90k More Microplastic Particles Each Year

https://www.wired.com/story/people-who-drink-bottled-water-on-a-daily-basis-ingest-90000-more-mic...
2•Brajeshwar•16m ago•0 comments

IT team camp in the office for days after Y2K bug found in boss's side project

https://www.theregister.com/2025/12/26/on_call/
2•Brajeshwar•16m ago•0 comments

I switched to eSIM in 2025, and I am full of regret

https://arstechnica.com/gadgets/2025/12/i-switched-to-esim-in-2025-and-i-am-full-of-regret/
3•Brajeshwar•17m ago•1 comments

Hemispherical lighting insights from the Call of Duty graphics engineering [pdf]

https://advances.realtimerendering.com/s2024/content/Roughton/SIGGRAPH%20Advances%202024%20-%20He...
1•klaussilveira•18m ago•0 comments

A small experiment in making math click

https://farhadg.com/blog/seeing-math-differently/
1•FarhadG•18m ago•0 comments

A Positive Sign for Flying in the Future

https://fallows.substack.com/p/a-positive-sign-for-flying-in-the
1•andyjohnson0•20m ago•0 comments

Europe's cloud challenge: Building an Airbus for the digital age

https://www.theregister.com/2025/12/29/europes_cloud_challenge_building_an/
1•Bender•20m ago•0 comments