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

Comments

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

Show HN: Translateapi.ai

https://translateapi.ai/
1•nadermx•3m ago•0 comments

Man Pleads Guilty to Music Streaming Fraud Aided by AI

https://www.justice.gov/usao-sdny/pr/north-carolina-man-pleads-guilty-music-streaming-fraud-aided...
1•nreece•4m ago•0 comments

Musk liable to Twitter shareholders in fraud lawsuit over $44B takeover

https://www.reuters.com/sustainability/boards-policy-regulation/musk-found-liable-twitter-shareho...
1•pseudolus•6m ago•0 comments

Opencli – Make Any Website and Tool Your CLI

https://github.com/jackwener/opencli
1•kehao95•7m ago•0 comments

Encore – personal concert archive app (the Letterboxd for live music)

https://www.encore.you/
1•sanjosanjo•8m ago•1 comments

The Long Farewell to Mark Zuckerberg's Metaverse

https://www.nytimes.com/2026/03/19/technology/mark-zuckerbergs-metaverse-vr-horizon-worlds.html
2•nothrowaways•8m ago•1 comments

Systemd added birthday storage to comply with Brazil, CA Age Verification laws

https://twitter.com/LundukeJournal/status/2034623157768716598
1•josephcsible•9m ago•0 comments

Edinburgh of the Seven Seas

https://en.wikipedia.org/wiki/Edinburgh_of_the_Seven_Seas
1•nomilk•10m ago•0 comments

IEEE and Academia Are Creating Microcredential Programs

https://spectrum.ieee.org/ieee-academia-microcredentials-programs
1•WaitWaitWha•11m ago•0 comments

CanisterWorm: NPM Publisher Compromise Deploys Backdoor Across 29 Packages

https://socket.dev/blog/canisterworm-npm-publisher-compromise-deploys-backdoor-across-29-packages
1•pier25•13m ago•0 comments

Show HN: Reverse-engineer any site's API from inside the browser

https://www.rtrvr.ai/blog/vibe-hacking-rover-gemini-flash-lite
2•arjunchint•14m ago•1 comments

Dilemma. Berkeley EECS vs. Michigan IBE (CS and Ross school of business)

1•royalschiefs•14m ago•0 comments

Site Up. Costs Down: Optimizing OpenClaw's 1M Weekly Active Users

https://stack.convex.dev/optimizing-openclaw
1•handfuloflight•19m ago•0 comments

Cuba rejects U.S. Embassy request to bring in fuel, calls it 'shameless'

https://www.washingtonpost.com/world/2026/03/20/us-embassy-havana-cuba-fuel-blackout/
3•ParentiSoundSys•22m ago•0 comments

9 Ways to Fail at Installing a Browser Extension

https://danbuilds.online/notes/9-ways-to-fail-at-installing-a-browser-extension/
1•fiestaman•24m ago•0 comments

Show HN: Rover – turn any web interface into an AI agent with one script tag

https://github.com/rtrvr-ai/rover
3•quarkcarbon279•25m ago•3 comments

Root from the parking lot: OpenWRT XSS through SSID scanning (CVE-2026-32721)

https://mxsasha.eu/posts/openwrt-ssid-xss-to-root/
1•birdculture•29m ago•0 comments

Traces of Evil

https://www.tracesofevil.com/
1•jacquesm•29m ago•0 comments

Defrag98 – Found on Fubardaily.com

https://defrag98.com/
1•razodactyl•31m ago•0 comments

Separation of Concerns

https://en.wikipedia.org/wiki/Separation_of_concerns
1•downboots•38m ago•0 comments

Ask HN: Back end engineer (distributed systems) seeking early-stage startup

1•Mdehsan873•39m ago•0 comments

ExplodeView – embed interactive exploded-view CAD diagrams in 2 lines of HTML

http://explodeview.com/demo/
1•vvlars•42m ago•0 comments

The Iran War Is Destroying Something More Valuable Than Oil

https://houseofsaud.com/iran-war-refinery-crisis-saudi-aramco/
8•thisislife2•42m ago•1 comments

Ant Chat

https://www.baothiento.com/ant-chat
3•noleary•42m ago•0 comments

Show HN: Pairform Running – Great AI coaching with excellent fitness context

https://www.pairform.io/
1•pairform•47m ago•0 comments

Court Asked for the LLM's Reasoning. The Company Had Nothing. $10M

https://pub.towardsai.net/the-air-gapped-chronicles-the-court-asked-for-the-llms-reasoning-484710...
2•pipineapple•51m ago•0 comments

A Declaration of the Independence of Cyberspace

https://www.eff.org/cyberspace-independence
2•ctoth•51m ago•0 comments

The Last Quiet Thing

https://www.terrygodier.com/the-last-quiet-thing
2•Hbruz0•51m ago•0 comments

Woman in Labor at Florida Hospital Brought in Zoom Court for Refusing C-Section

https://www.propublica.org/article/florida-court-hearing-c-section
8•Jimmc414•52m ago•0 comments

Moflin AI Companion

https://www.casio.com/us/moflin/
1•hmokiguess•54m ago•0 comments