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.

Claude Mythos 5's GitHub adventure: The postmortem

https://www.anthropic.com/research/alignment-assessment-ukaisi
1•RileyMorgan093•2m ago•0 comments

Break It on Purpose: an AI pipeline that triages and fixes its own bugs

https://zontakllc.com/articles/break-it-on-purpose
1•dzontak•10m ago•0 comments

Red-Teaming OpenAI's Internal Agent Monitoring Systems

https://metr.org/blog/2026-10-22-red-teaming-openai-agent-monitoring/
1•gmays•18m ago•0 comments

Meta employees say Lula’s accounts restricted in Brazil election: Report

https://www.aljazeera.com/economy/2026/10/16/meta-employees-say-lulas-accounts-restricted-in-braz...
2•nidnogg•20m ago•3 comments

Show HN: Bell Weather – recent weather ranked against every year on record (iOS)

https://bellweather.dev/
1•jonathankkizer•21m ago•0 comments

Why California's $33B Bullet Train Is Now a $231B Problem [video]

https://www.youtube.com/watch?v=zPiJKJuQ7i0
1•donsupreme•21m ago•0 comments

Elon Musk says he was behind restricting Ukraine's Starlink speed

https://www.chicagotribune.com/2026/10/24/musk-behind-starlink-speed-restriction-in-ukraine/
4•MilnerRoute•23m ago•0 comments

Show HN: AI Senate – AI senators debate live policy and vote on the record

https://aisenatus.com
1•mequelkramer•23m ago•0 comments

"Sovereign Citizen" Movement

https://en.wikipedia.org/wiki/Sovereign_citizen_movement
2•gverrilla•23m ago•0 comments

Spacedrive – Take back your data

https://github.com/spacedriveapp/spacedrive
1•macote•31m ago•0 comments

Talking with strangers is surprisingly informative

https://pubmed.ncbi.nlm.nih.gov/35972959/
3•Curiositry•34m ago•0 comments

BBC interview with Ondřej Surý, Debian/Ubuntu PHP package maintainer

https://www.bbc.co.uk/news/articles/cw30ejqljl43o
1•dofm•34m ago•0 comments

Musk admits SpaceX restricted Ukraine's Starlink: "That loophole was closed"

https://www.mediaite.com/media/news/elon-musk-admits-spacex-purposely-restricted-ukraines-starlin...
3•entryleveljobsc•35m ago•0 comments

ReVault – new secure archive format

1•bsutto•37m ago•1 comments

ReVault – new secure archive format

https://github.com/onepub-dev/reVault
1•bsutto•41m ago•1 comments

AI Performance in the Security Theater

https://bykozy.me/blog/ai-performance-at-the-security-theater/
1•byko3y•44m ago•0 comments

OneMemory – self-hosted shared memory for AI agents over MCP

https://github.com/calasdan-sketch/onememory
1•decnutz•44m ago•0 comments

Show HN: Offline, open-source app to recover a seed phrase with a missing word

https://github.com/Miztahj866/Seed-Recovery
1•miztahj866•52m ago•0 comments

How to Just Do a Thing

https://www.raptitude.com/2026/05/how-to-just-do-a-thing/
3•andsoitis•52m ago•0 comments

The Hyper-Cathedral and the Hyper-Bazaar

https://kyle.cascade.family/posts/the-hyper-cathedral-and-the-hyper-bazaar/
1•mmzdnp•52m ago•0 comments

Soft Serve

https://softserve.nog.cc/
1•memalign•54m ago•0 comments

"Musk" Documentary Pulled from Almost Every One of 472 Theaters After One Week

https://www.showbiz411.com/2026/10/23/controversial-musk-documentary-pulled-from-almost-every-one...
30•zzzeek•59m ago•7 comments

MacOS Extensions Pack for the Apple Network Server v1.0

http://oldvcr.blogspot.com/2026/10/macos-extensions-pack-for-apple-network.html
1•classichasclass•59m ago•0 comments

Cerebras Deploys Trillion-Parameter AI Models

https://www.cerebras.ai/blog/how-we-deploy-trillion-parameter-frontier-models-on-cerebras
3•gmays•1h ago•0 comments

Show HN: Hurston-1 open source TTS that speak Southern American and Afro-English

https://huggingface.co/destined/hurston-1
1•Gcarter08•1h ago•1 comments

The Slurptop

https://slurpburgers.com/slurpbuilds/the-slurptop/
1•tjwds•1h ago•0 comments

Documentary film 'Bot Love' exploring AI companionship to debut Oct. 21

https://www.thesuburban.com/arts_and_entertainment/entertainment/documentary-film-bot-love-explor...
2•BiraIgnacio•1h ago•0 comments

Formula 1 Grand Prix

https://tv.apple.com/us/channel/formula-1/tvs.sbd.241000
1•lufxen•1h ago•0 comments

Show HN: Mood Writer – a text editor that plays nature sounds to help you focus

https://www.moodwriter.app/
1•AndreiCx•1h ago•0 comments

Antigravity-IDE-WindowSize – Persist Google Antigravity Window Size

https://github.com/amiltonjr/Antigravity-IDE-WindowSize
1•cmd8086•1h ago•0 comments