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.

Outlit Customer Context Layer

https://docs.outlit.ai
1•handfuloflight•48s ago•0 comments

Lock Scroll with a Vengeance

https://unsung.aresluna.org/lock-scroll-with-a-vengeance/
1•etothet•3m ago•0 comments

Nobody Gets Promoted for Simplicity

https://terriblesoftware.org/2026/03/03/nobody-gets-promoted-for-simplicity/
1•SerCe•5m ago•0 comments

Giving LLMs a personality is just good engineering

https://www.seangoedecke.com/giving-llms-a-personality/
1•dboon•7m ago•0 comments

Israel use iPhone backdoor against Journalists

https://twitter.com/BackupJeffx/status/2028917525170319811
1•smashah•8m ago•0 comments

California's Digital Age Assurance Act, and FOSS

https://runxiyu.org/comp/ab1043/
1•todsacerdoti•9m ago•0 comments

Show HN: Display folder sizes in Win11 Explorer's Size column

https://github.com/sm18lr88/win-folder-size
1•hereme888•9m ago•0 comments

Couldn't find a minimal session indicator for tmux, so I built one

https://github.com/jtmcginty/tmux-session-dots
1•jtmcginty•18m ago•1 comments

AP brass to staff: Resistance to AI is 'futile'

https://www.semafor.com/article/03/03/2026/ap-brass-to-staff-resistance-to-ai-is-futile
3•healsdata•19m ago•0 comments

Speculative Speculative Decoding (SSD)

https://arxiv.org/abs/2603.03251
2•E-Reverance•21m ago•0 comments

Just Send the Prompt

https://justsendtheprompt.com/
29•medalblue•30m ago•18 comments

Show HN: My AI hires humans for physical tasks, calls them biological units

https://crawde.com/hire
2•crawde•32m ago•1 comments

Extending the Demo: Destruction Derby

https://32bits.substack.com/p/extending-the-demo-destruction-derby
1•farmerbb•32m ago•0 comments

News Corp, Meta in AI Content Licensing Deal Worth Up to $50M a Year

https://www.wsj.com/business/media/news-corp-meta-in-ai-content-licensing-deal-worth-up-to-50-mil...
1•bookofjoe•33m ago•2 comments

Show HN: A visual sitemap generator that maps any website's full navigation tree

2•epic_ai•34m ago•1 comments

CIA working to arm Kurdish forces to spark uprising in Iran, sources say

https://www.cnn.com/2026/03/03/politics/cia-arming-kurds-iran
12•vinnyglennon•38m ago•2 comments

MoneyCollect provides warm and human-centered payment protection for merchants

https://www.moneycollect.com/
1•jerryoverwrite•39m ago•0 comments

Current state of OpenClaw and bot protections

https://proxybase.xyz/blog/openclaw-bot-protections
1•m00dy•39m ago•0 comments

LLMs can unmask pseudonymous users at scale with surprising accuracy

https://arstechnica.com/security/2026/03/llms-can-unmask-pseudonymous-users-at-scale-with-surpris...
9•Gagarin1917•45m ago•0 comments

LexisNexis confirms React2Shell powered data breach

https://www.bleepingcomputer.com/news/security/lexisnexis-confirms-data-breach-as-hackers-leak-st...
4•esaym•45m ago•0 comments

New Python library by Guido van Rossum

https://github.com/microsoft/typeagent-py
1•tzury•47m ago•1 comments

YGG, Largest French Torrent Tracker, Hacked

https://yggleak.top/fr/home/ygg-dossier
1•TechSquidTV•47m ago•0 comments

Stop Trying to Hand Trump a Censorship Weapon

https://www.techdirt.com/2026/03/03/ron-wyden-is-begging-his-colleagues-to-stop-trying-to-hand-tr...
5•HotGarbage•47m ago•0 comments

We are now on Substack Give us a follow

https://substack.com/profile/387803331-pcg-inc/note/c-222710211
1•CCK80LLC•1h ago•0 comments

An AI Just Did Everything I Do on a Computer – Written by the AI Itself

https://coasty.ai/
1•PrateekJ17•1h ago•1 comments

Mac external displays for designers and developers, part 2

https://bjango.com/articles/macexternaldisplays2/
14•fragmede•1h ago•5 comments

New Launch Workshops and Masterclasses

https://www.pretium-inc.com/workshops
1•CCK80LLC•1h ago•0 comments

Oscar Six Radar – vulnerability scanner with native A2A (agent-to-agent) support

1•oscarsixsecllc•1h ago•0 comments

Show HN: Lip Flip Before and After – Real Results and AI Preview

https://lipflip.ai/
1•ovelv•1h ago•0 comments

Yes... and...

https://htmx.org/essays/yes-and/
2•rammy1234•1h ago•1 comments