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

Comments

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

I hacked ChatGPT and Google's AI – and it only took 20 minutes

https://www.bbc.com/future/article/20260218-i-hacked-chatgpt-and-googles-ai-and-it-only-took-20-m...
1•ranit•1m ago•0 comments

Agent37

https://www.agent37.com
1•bellamoon544•4m ago•1 comments

Ask HN: How do you debug multi-step AI workflows when the output is wrong?

1•terryjiang2020•6m ago•0 comments

Show HN: I created iHateCSV.com for those who hate it when spreadsheets break

https://ihatecsv.com/
1•vinserello•7m ago•0 comments

Cuban-American Voters Who Supported Hardline Immigration Policies

1•poojagill•8m ago•1 comments

Data leak at Abu Dhabi finance summit exposes politicians and business leaders

https://www.ft.com/content/b86cefd5-90e7-410b-bf58-09b9fde307cb
2•JumpCrisscross•9m ago•1 comments

OpenClaw refactored in Go, runs on $10 hardware

https://picoclaw.net/
1•Nazzareno•9m ago•0 comments

Rubio's warm words to Orbán reinforce EU fears that US seeks disunity in Europe

https://www.theguardian.com/us-news/2026/feb/17/marco-rubio-viktor-orban-eu-disunity-analysis
1•robtherobber•11m ago•0 comments

VVTerm – Ghostty-powered SSH client for iOS, iPad, macOS

https://vvterm.com/
1•wiedymi•11m ago•1 comments

Stop prompting. Let the AI interview you to build specs

https://www.ideaforge.chat/
1•enha•11m ago•1 comments

Show HN: Benchmarking Apple Silicon unified mem for GPU-accelerated SQL analysis

https://github.com/sadopc/unified-db-2
1•sadopc•15m ago•1 comments

Proxmox-GitOps: IaC Automation Framework for LXC: Local Development and Staging

1•gitopspm•15m ago•0 comments

Show HN: Shiro.computer static page, Unix/NPM shimmed enough to host Claude Code

https://shiro.computer/about
1•sagebird•16m ago•0 comments

Show HN: Add reverb and bass boost via WebAudio API to Spotify/YouTube

https://v0-screen-capture-audio.vercel.app/
1•jardy•16m ago•1 comments

Why my country's AI scene is built on sand

1•Rioverde•17m ago•2 comments

The resources I'm using to learn Maths, AI and Robotics

https://parsam.io/maths-ai-robotics/
1•pzrsa•18m ago•0 comments

A way to manage your versioning and changelogs with a focus on monorepos

https://github.com/changesets/changesets
1•lwhsiao•18m ago•0 comments

Show HN: How do you prioritize user feedback without going insane?

1•superproton•19m ago•0 comments

US lawyers start privacy class action accusing Lenovo of data transfers to China

https://www.theregister.com/2026/02/17/lenovo_privacy_lawsuit/
1•robtherobber•22m ago•0 comments

Decades in the Machine – Meaning and Purpose in Technology

https://www.classcentral.com/course/youtube-decades-in-the-machine-meaning-and-purpose-in-technol...
1•andsoitis•27m ago•0 comments

His Brownstone Is Worth $5.4M. Why Is His Tax Bill So Low?

https://www.nytimes.com/2024/04/02/nyregion/nyc-property-tax.html
1•JumpCrisscross•27m ago•0 comments

Making Flow – Interview with Director Gints Zilbalodis

https://www.blender.org/user-stories/making-flow-an-interview-with-director-gints-zilbalodis/
1•abdelhousni•28m ago•0 comments

Can we leverage AI/LLMs for self-learning?

https://techne98.com/blog/can-we-use-ai-for-self-learning/
1•fixedprog•28m ago•0 comments

What's cooking on Sourcehut? Q1 2026

https://sourcehut.org/blog/2026-02-18-whats-cooking-q1-2026/
1•todsacerdoti•28m ago•0 comments

Show HN: Jarvish – A New AI Integrated Shell inspired by J.A.R.V.I.S. on marvel

https://github.com/tominaga-h/jarvis-shell
2•tominaga-h•29m ago•0 comments

Why Europe Is Talking About Nukes

https://www.theatlantic.com/national-security/2026/02/europe-nuclear-weapons-sweden-munich/686003/
2•madspindel•30m ago•0 comments

Show HN: Aggregating Hacker News Stories by Topic

https://hacker-backlinks.browserbox.io/
1•keepamovin•32m ago•0 comments

Native FreeBSD Kerberos/LDAP with FreeIPA/IDM

https://vermaden.wordpress.com/2026/02/18/native-freebsd-kerberos-ldap-with-freeipa-idm/
1•vermaden•32m ago•0 comments

A simple dead man's switch in Rust

https://storopoli.com/posts/2024-03-23-dead-man-switch.html
1•kekqqq•32m ago•0 comments

Monkey Patching in VBA

https://ecp-solutions.github.io/ASF/Language%20reference.html
2•n013•33m ago•0 comments