frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Avoid Continue

https://www.teamten.com/lawrence/programming/avoid-continue.html
2•todsacerdoti•1y ago

Comments

zoezoezoezoe•1y 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•1y 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.

OpenLTM – Local, self-decaying memory for AI coding agents

https://github.com/RohiRIK/OpenLtm
1•RohiRik•6m ago•0 comments

What Apple Knows About AI That Silicon Valley Won't Admit

https://www.thealgorithmicbridge.com/p/what-apple-knows-about-ai-that-silicon
3•CharlesW•6m ago•0 comments

Kalshi and Polymarket crack down on paid influencers claiming election fraud

https://text.npr.org/nx-s1-5846806
1•1659447091•12m ago•0 comments

Designing an AI-Native Technical Screen

https://i0exception.substack.com/p/designing-an-ai-native-technical
1•i0exception•17m ago•0 comments

They Have yet to Sign a Lease. But They're Furious over $3,100 Rents

https://www.nytimes.com/2026/06/07/nyregion/housing-costs-young-people-nyc.html
1•littlexsparkee•19m ago•0 comments

AI Coding Agent Platform

https://app.nz/
1•jacobianhessian•20m ago•0 comments

Show HN: Built an open-source local firewall for AI coding agents

1•ashishp15•25m ago•0 comments

NPM-Scan v1.4.1: Detecting IronWorm, Miasma Escalated, and Dependency Confusion

https://www.npmjs.com/package/@lateos/npm-scan
1•lateos-ai•30m ago•0 comments

Queues Don't Fix Overload (2014)

https://ferd.ca/queues-don-t-fix-overload.html
1•locknitpicker•33m ago•0 comments

Universal XSS in Firefox Focus for iOS

https://github.com/v12-security/pocs/tree/main/firefox
3•ledoge•35m ago•0 comments

Organizations Drift into Politics: A Follow-up to Game Theory Patterns at Work

https://daeus.blog/2026/06/08/how-organizations-drift-into-politics/
3•kurinikku•37m ago•0 comments

Gordon S. Wood dies at 92 after being hit by a car

https://www.nytimes.com/2026/06/08/books/gordon-s-wood-dead.html
5•2510c39011c5•37m ago•1 comments

Porting the ThinkPad X61 to Coreboot

https://blog.aheymans.xyz/post/thinkpad_x61/
3•walterbell•37m ago•0 comments

I built a projection mapping of the planes flying over my house

https://old.reddit.com/r/ClaudeCode/comments/1tva44g/i_live_by_sfo_and_built_a_projection_mapping...
2•stefap2•38m ago•0 comments

Apple Announces macOS 27 'Golden Gate', Drops Support for Intel Macs

https://appleinsider.com/articles/26/06/08/macos-27-golden-gate-delivers-more-liquid-glass-and-up...
4•m463•44m ago•0 comments

USS Liberty III

https://grokipedia.com/page/uss_liberty_iii
3•__patchbit__•47m ago•0 comments

SpaceX Technical Update Discussion

https://twitter.com/SpaceX/status/2064099405758906727
2•__patchbit__•49m ago•0 comments

World Cup 2026 predictor with FIFA's full Annex C bracket logic

https://mundialist.com
3•rmtzp•51m ago•0 comments

Software Is Eating the World (But This Time)

https://twitter.com/siddharthvader_/status/2049161016156762441
2•SiqingYu•51m ago•0 comments

Hello muy name Is art

https://blog.cloudflare.com/es-es/welcome-to-connectivity-cloud/
2•the-art•1h ago•1 comments

OOBdump: Relocation Oriented Programming: Arbitrary code execution in objdump -g

https://blog.calif.io/p/oobdump-relocation-oriented-programming
3•matt_d•1h ago•0 comments

Flat Datacenter Networks at Scale

https://perspectives.mvdirona.com/2026/06/flat-datacenter-networks-at-scale/
6•tanelpoder•1h ago•0 comments

Show HN: Ollama Dash – autoupdating dashboard for Ollama Models

https://ollamadash.up.railway.app/
2•rcanand2025•1h ago•0 comments

Show HN: fontliberator: Automatic font clean-room reimplementor

https://github.com/robinpie/fontliberator/
3•robinpie•1h ago•0 comments

Show HN: CodexL – All-in-one launcher for Codex

https://github.com/musistudio/CodexL
2•musistudio•1h ago•0 comments

Job: Head of Stonehenge

https://www.english-heritage.org.uk/about/our-people/careers-with-us/job-search/default-job-page/...
79•mooreds•1h ago•33 comments

The hottest job this summer is European ambassador for ranch dressing

https://www.msn.com/en-us/money/companies/the-hottest-job-this-summer-is-european-ambassador-for-...
2•mooreds•1h ago•0 comments

Insider-signal – open-source CLI STOCKS,Congress

https://github.com/karanhumber007-ctrl/insider-signal
2•karansidhu007•1h ago•0 comments

How Costco sells such cheap gas

https://www.cnn.com/2026/05/31/business/costco-cheap-gas
4•mooreds•1h ago•1 comments

An industry is being propped up by math that is insane

https://garymarcus.substack.com/p/an-entire-industry-is-being-propped
7•swolpers•1h ago•1 comments