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

Comments

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

You can't use vector calculus for color spaces

https://robocall.github.io//colordotproduct
1•randomrainbow•40s ago•0 comments

Court orders Samsung to stop "spying" on Texans through its TVs

https://www.sammobile.com/news/court-orders-samsung-to-stop-spying-on-texans-through-its-tvs/
2•shscs911•1m ago•0 comments

Strengthening supply chain security: Preparing for the next malware campaign

https://github.blog/security/supply-chain-security/strengthening-supply-chain-security-preparing-...
1•OptionOfT•4m ago•0 comments

Reza Pahlavi: Iran is ready for a democratic transition

https://www.washingtonpost.com/opinions/2026/01/06/pahlavi-iran-democracy-transition-planning
1•agnosticmantis•4m ago•1 comments

NoCheat: Students Can't Cheat Anymore

2•Ahm_AK•5m ago•0 comments

Two Dead Economists on AI

https://oswalia.substack.com/p/two-dead-economists-on-ai
1•paulpauper•7m ago•1 comments

Hayek's Rules for AI

https://www.civitasoutlook.com/research/hayeks-rules-for-ai-459b38fc-552a-4f7c-981c-88065f6a151d
1•paulpauper•7m ago•0 comments

Building Startups That Last (2 of 5): The Two Necessary Company Traits to Win

https://www.sachinkamdar.com/building-startups-that-last-part-2-of-5-the-two-necessary-company-tr...
1•sak84•8m ago•1 comments

Codex reads files outside working directory without my permission

https://github.com/openai/codex/issues/5237
1•thomas34298•8m ago•0 comments

Amazon must face price gouging lawsuit, US judge rules

https://www.reuters.com/sustainability/boards-policy-regulation/amazon-must-face-price-gouging-la...
2•1vuio0pswjnm7•12m ago•0 comments

Show HN: Waveform Playlist v5 – Multi-track Web Audio editor (React and Tone.js)

https://naomiaro.github.io/waveform-playlist/
6•st0ryteller•13m ago•1 comments

P15 CoNetworkingSpace Accepts GNU Taler Payments in Swiss Francs

https://www.taler.net/en/news/2025-04.html
1•F3nd0•14m ago•0 comments

Who owns the memory? Who calls free?

https://lukefleed.xyz/posts/who-owns-the-memory-pt2/
1•fanf2•15m ago•0 comments

vpternlog: Signed Saturation

https://wunkolo.github.io/post/2025/12/vpternlog-signed-saturation/
1•jandrewrogers•15m ago•0 comments

Prompt optimization can outperform reinforcement learning on LLMs

https://sderosiaux.substack.com/p/prompt-optimization-can-outperform
1•chtefi•15m ago•0 comments

Show HN: GTKX – React for native GTK4 Linux apps, no Electron

https://eugeniodepalo.github.io/gtkx/
1•perpetuus•16m ago•0 comments

Digital microwaves show an example of good UI doing what you wanted

https://utcc.utoronto.ca/~cks/space/blog/tech/MicrowaveGoodUIBehavior
1•leephillips•17m ago•0 comments

Monitor New NYC Mayor – Monitormamdani.com

https://monitormamdani.com
1•bolcoto•18m ago•0 comments

Trump Moves to Ban Investors from Buying Single-Family Homes

https://www.wsj.com/economy/housing/trump-moves-to-ban-investors-from-buying-single-family-homes-...
6•JumpCrisscross•19m ago•0 comments

Intel's 'Panther Lake' Core Ultra Laptop Chips Are Ready for Prime Time

https://www.pcmag.com/news/intel-panther-lake-core-ultra-laptop-chips-details-ces-2026
1•taubek•19m ago•0 comments

Give it Up, Turn it Loose

https://thinkhuman.com/give-it-up-turn-it-loose/
1•jamesgill•20m ago•0 comments

Triton Extensions: a framework for developing and building compiler extensions

https://github.com/triton-lang/triton-ext
1•matt_d•20m ago•0 comments

Seized by US: why so much interest in a rusty tanker in the Atlantic?

https://www.theguardian.com/world/2026/jan/07/marinera-seized-tanker-atlantic-us-uk-russia
3•n1b0m•21m ago•0 comments

Show HN: I built a tool to stop pretending I understood research papers

https://papersplain.com
1•jjoe•21m ago•0 comments

The Psychology of Stranger Things

https://allaboutpsychology.substack.com/p/the-psychology-of-stranger-things
1•rendx•21m ago•0 comments

Show HN: FightHOAFines – An AI agent that reads bylaws to dispute HOA violations

https://fighthoafines.com/
1•todaycompanies•23m ago•1 comments

The Giant Hoax of Shadow of the Colossus [video]

https://www.youtube.com/watch?v=NvGZLMUx7AM
2•crtasm•25m ago•0 comments

OpenCore Legacy Patcher – Experience macOS just like before

https://github.com/dortania/OpenCore-Legacy-Patcher
1•petethomas•25m ago•0 comments

NPM to implement staged publishing after turbulent shift off classic tokens

https://socket.dev/blog/npm-to-implement-staged-publishing
7•feross•26m ago•0 comments

WikiFlix

https://wikiflix.toolforge.org/#/
1•Tomte•26m ago•0 comments