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.

Show HN: Dereliction – leave a web page alone and it falls apart

https://oripekelman.github.io/dereliction/
1•OriPekelman•30s ago•0 comments

The Vanishing Human Presence – By a Midwestern Doctor

https://www.midwesterndoctor.com/p/the-vanishing-human-presence
1•bilsbie•41s ago•0 comments

TVPort

https://github.com/68hctmzzjf-svg/TVPort
1•thehoff•1m ago•0 comments

TVPort – Port switch games to run natively on AppleTV

https://www.reddit.com/r/decomps/comments/1xn3wh1/release_tvport_port_switch_games_to_run_natively/
1•notfried•2m ago•0 comments

God created men; Sam Altman made them equal

https://taylor.town/made-them-equal
1•surprisetalk•2m ago•0 comments

How to Give an Auditor Access to Your Agent Logs Without Handing over the Keys

https://medium.com/@MirArshadTalpur/how-to-give-an-auditor-access-to-your-agent-logs-without-hand...
1•Arshad-Talpur•4m ago•0 comments

Claude.md is full of lint rules in disguise

https://github.com/clirimajeti/codemyrules
1•clirimajeti•4m ago•0 comments

French bank Credit Mutuel Arkea says €100M missing after cyberattack

https://www.reuters.com/legal/government/french-bank-credit-mutuel-arkea-says-100-million-missing...
2•yakkomajuri•5m ago•0 comments

A performance trap: when store forwarding fails

https://lemire.me/blog/2026/11/05/a-performance-trap-when-store-forwarding-fails/
1•smilelamp•7m ago•0 comments

Show HN: Scribbles is a small drawing canvas and a gallery of what visitors send

https://scribbles.gallery/
1•bront•9m ago•0 comments

Code Was Never the Problem

https://www.zagaja.com/2026/10/code-was-never-the-problem/
1•mzagaja•10m ago•0 comments

Midterm Rout for Data Centers: Voters in Nearly 40 Towns Rejected Projects

https://www.motherjones.com/environment/2026/11/midterm-rout-rejected-data-centers-ballot-initiat...
1•cdrnsf•11m ago•0 comments

Discord is ditching Electron and its new app uses less RAM

https://www.theverge.com/news/1027379/discord-ditching-electron-web-app
3•archb•11m ago•0 comments

Turning Stories into Action

https://worldsensorium.com/ellen-windemuth-turning-stories-into-action/
1•dnetesn•11m ago•0 comments

The giant ELT telescope is the heir to the great cathedrals of Europe

https://blue-continuum.com/cathedrals-of-light
1•dnetesn•12m ago•0 comments

The Future is Niri (2025)

https://ersei.net/en/blog/niri
1•theanonymousone•12m ago•0 comments

Motorola's Signature 27 is finally bringing GrapheneOS to non-Pixel phones

https://www.howtogeek.com/motorola-signature-27-graphene-os/
1•teekert•13m ago•0 comments

Welcome to Nginx2shell

https://nginx2shell.com/
1•choult•13m ago•0 comments

The Afterlife of Pi

https://pudding.cool/2026/11/pi/
1•rabbit911•13m ago•0 comments

Show HN: ReadyTab – new-tab workspace with a desktop companion

https://readytab.cloud/
2•yako21000•14m ago•1 comments

Apple fits a LLM on iPhone with surgical efficiency

https://www.youtube.com/watch?v=sb9uPuiyM_8
1•lroe•14m ago•0 comments

Show HN: Lmux – A Lightweight macOS Terminal for Claude Code and Codex

https://github.com/sooftware/lmux
3•sooftware14•15m ago•0 comments

Ten Thousand Years (2014)

https://99percentinvisible.org/episode/ten-thousand-years/
1•zenincognito•15m ago•0 comments

Systemd WatchdogSec: The Kill Switch for Hung AI-Generated Code

https://cheikhhseck.medium.com/systemd-watchdogsec-the-kill-switch-for-hung-ai-generated-code-ce2...
1•cheikhdev•16m ago•0 comments

Download your favourite YouTube videos

https://criminallyvulgar.dev/you-should-absolutely-download-your-favourite-youtube-videos/
1•surprisetalk•16m ago•0 comments

Show HN: Music theory drawn on a real guitar fretboard, one engine per diagram

https://guitartheorystudio.com/app
3•Bradappz•16m ago•0 comments

86open

https://en.wikipedia.org/wiki/Executable_and_Linkable_Format
1•birdculture•17m ago•0 comments

China's 'Sharp Power' Chills Global Free Speech

https://nationalinterest.org/feature/how-china-sharp-power-chills-global-free-speech
1•baud147258•17m ago•0 comments

UK to deploy facial recognition in biggest-ever immigration crackdown

https://www.theguardian.com/technology/2026/nov/04/uk-deploy-facial-recognition-biggest-ever-immi...
1•robtherobber•19m ago•0 comments

Show HN: Change my website if the agents let you

https://actera.dev/playground
1•zomtorg•19m ago•0 comments