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

Comments

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

Solving Kelly Ruin via Wasserstein DRO and Convex Optimization

https://github.com/liripey/DRO-Framework-Public
1•liripe•46s ago•0 comments

First PC Emulator Launched for Galaxy XR

https://github.com/SimonJGillespie/AnjinVirtualComputer/releases/tag/1.0
1•simonjgillespie•51s ago•0 comments

Window Maker Live brings 32-bit life to Debian

https://www.theregister.com/2025/12/09/microsoft_windows_maker_live_132/
1•Aldipower•1m ago•0 comments

Show HN: An AI-Powered WordPress Site Plugin Builder

https://steem.dev/?
1•fasthightimess•1m ago•0 comments

How Air Traffic Control Works (1951) [video]

https://www.youtube.com/watch?v=2PsGDT2ZV3E
1•simonjgreen•1m ago•0 comments

Apocolocyntosis

https://en.wikipedia.org/wiki/Apocolocyntosis
1•glth•5m ago•0 comments

My Search for the Kaleidacousticon [pdf]

https://midnightsledding.net/documents/Kaleidacousticon.pdf
1•hlynurd•5m ago•0 comments

Show HN: Zero – Burner Video Links for Online Dating (WebRTC)

https://meet-zero.co
1•arush436•6m ago•0 comments

Show HN: I made a fighting game where Elon and Zuck can settle it

https://www.siliconfighter.com
3•juanfiguera•7m ago•0 comments

40 Year Heist

https://40yearheist.com/
4•bayeslaw•17m ago•0 comments

Strangler Fig Pattern – How to modernize a legacy stack without a full rewrite

https://learn.microsoft.com/en-us/azure/architecture/patterns/strangler-fig
1•thunderbong•18m ago•0 comments

Show HN: Hackerest – Real-time penetration testing, built by security engineers

https://hackerest.com
2•mcisternino•19m ago•0 comments

Show HN: LangGraph profiling – 737x Faster Checkpoints via Rust (PyO3)

https://github.com/neul-labs/fast-langgraph
1•ticktockten•20m ago•0 comments

Let's Decrypt dot org redirects to the NSA

https://letsdecrypt.org
1•martinclayton•21m ago•1 comments

Ask HN: Is a JVM/CDP based browser agent stack fundamentally a bad idea?

1•galaxyeye•23m ago•0 comments

'Factory' in cells found to prevent insulin abnormalities

https://www.japantimes.co.jp/news/2025/11/12/japan/science-health/cell-factory-insulin/
2•PaulHoule•24m ago•0 comments

How to Get Audio Clip from an Audio File in Mac with Quick Time Player [video]

https://www.youtube.com/watch?v=J3dXs0Yb7Yg
1•techwrath11•24m ago•0 comments

How to Copy Paste in Mac from One Folder to Another [video]

https://www.youtube.com/watch?v=34_afpe9PH0
1•techwrath11•25m ago•0 comments

Show HN: SafeShare – Clean up tracking parameters (UTM, fbclid, gclid)

https://j-ai-71.github.io/Supersystem/app.html
1•safeshare•26m ago•0 comments

War Department Unleashes AI on New GenAI.mil Platform

https://www.war.gov/News/Releases/Release/Article/4354916/the-war-department-unleashes-ai-on-new-...
1•michaelsbradley•27m ago•0 comments

Show HN: SolarStorm – Visualising space weather effects on the power grid

https://solarstorm.space/
5•petargyurov•28m ago•0 comments

Show HN: Tracktions – Bringing institutional trading structure to retail traders

https://tracktions.com/
1•Tracktions•28m ago•1 comments

In your first two weeks on a new team

https://natashajaffe.substack.com/p/in-your-first-two-weeks-on-a-new
1•natasha_jaffe•28m ago•1 comments

Factor 0.101 Now Available

https://re.factorcode.org/2025/12/factor-0-101-now-available.html
1•birdculture•29m ago•0 comments

Inside Fire: Poetry for the Intellect [pdf]

https://theboina.org/titles/Inside%20Fire.pdf
1•control-h•30m ago•0 comments

Memory leak regression testing with V8/Node.js

https://joyeecheung.github.io/blog/2024/03/17/memory-leak-testing-v8-node-js-1/
1•todsacerdoti•32m ago•0 comments

Velocipedia

https://www.gianlucagimini.it/portfolio-item/velocipedia/
1•lloeki•35m ago•0 comments

IETF draft and Rust POC: NTP for Bitcoin price (no oracles)

https://github.com/CryptoPriceProtocol/BitCoinPriceProtocol
1•usacoder•37m ago•0 comments

UK Parliament e-petition Debate: Do not introduce Digital ID cards

https://hansard.parliament.uk/Commons/2025-12-08/debates/9E01F17C-557A-4D02-8A93-B573721B8B20/a
2•mapleoin•37m ago•0 comments

Former Mozaic Payments CEO arrested, charged with defrauding PE investor

https://www.reuters.com/legal/government/tech-startup-ceo-defrauded-private-equity-firm-out-20-mi...
1•ilamont•39m ago•0 comments