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

Why Optimistic Merging Works Better

http://hintjens.com/blog:1061
2•jimsojim•5m ago•0 comments

Nvidia Rides Blistering Chip Sales to Another Record Quarter

https://www.wsj.com/tech/ai/nvidia-nvda-1st-quarter-earnings-report-2026-stock-c2bb9c1c
2•andsoitis•6m ago•0 comments

Fate: Building an Astro Blog with a Modern React Data Client

https://jsdev.space/meet-fate-react-astro/
1•javatuts•7m ago•0 comments

Twelve Ways to Be Wrong About AI-Assisted Coding

https://third-bit.com/2026/05/20/twelve-ways-to-be-wrong/
2•calcifer•7m ago•0 comments

Can ChatGPT order a jumbo breakfast roll without messing up?

https://www.rte.ie/brainstorm/2026/0520/1574290-chat-gpt-breakfast-roll-irish-english-dialect-phr...
2•austinallegro•10m ago•0 comments

GraphMyCode –Visualize any codebase as an interactive knowledge graph,in-browser

https://graphmycode.com
1•FValero•11m ago•0 comments

How to Build a Tech Startup When You Barely Know What a Boolean Is

https://bwanaerp.medium.com/how-to-build-a-tech-startup-when-you-barely-know-what-a-boolean-is-vi...
1•instarlaxy•12m ago•0 comments

Unix has been changing, but in places where I don't see it

https://utcc.utoronto.ca/~cks/space/blog/unix/UnixChangingQuietly
1•ingve•12m ago•0 comments

Immigrants taking your jobs? [short video]

https://www.youtube.com/shorts/hrej-oY3xbg
1•stiray•12m ago•1 comments

"Don't Be Evil" Was a Lie from the Start (2024)

https://old.reddit.com/r/degoogle/comments/1g5uepg/dont_be_evil_was_a_lie_from_the_start_google/
3•huijzer•18m ago•2 comments

Don't Build a General Purpose API (4 Years Later)

https://max.engineer/server-informed-ui-p2
1•goranmoomin•20m ago•0 comments

The physicists who convinced Fermilab to send Brazil's emails

https://buttondown.com/blog/brazil-fermilab-email
1•maguay•25m ago•0 comments

Economics Lessons from Home Depot

https://www.economist.com/finance-and-economics/2026/05/20/economics-lessons-from-home-depot
1•andsoitis•26m ago•0 comments

Linki – open-source AI SDR for LinkedIn sequences and cold email

https://github.com/moaljumaa/linki
3•moisacow•26m ago•1 comments

How to scrape any website and get structured data with a single API call

https://spidra.io/blog/scrape-any-website-structured-data-single-api-call
2•joelolawanle•28m ago•0 comments

Are TypeScript back end frameworks ready for AI Agents?

https://encore.dev/blog/ai-benchmark
3•dohguy•29m ago•0 comments

Docket – another beautiful, minimal task manager that lives in macOS menu bar

https://github.com/santoru/docket
1•meliot•30m ago•0 comments

Transforming Digital Pathology with AI

https://www.thelancet.com/journals/landig/article/PIIS2589-7500(26)00049-X/fulltext
1•teleforce•31m ago•1 comments

Bitcoin's Price Relies on Strategy's Record Buying Under Michael Saylor

https://www.bloomberg.com/news/articles/2026-05-20/bitcoin-grows-more-dependent-on-michael-saylor...
1•helsinkiandrew•36m ago•1 comments

SpaceX pitches itself as integrated interplanetary proto-monopolist – IPO filing

https://www.theregister.com/systems/2026/05/21/spacex-pitches-itself-as-integrated-interplanetary...
2•beardyw•41m ago•0 comments

Cannot see all pull requests [still true after a month]

https://github.com/orgs/community/discussions/193463
4•carreau•44m ago•2 comments

Show HN: Asciidia – LLM-Powered Game

https://asciidia.com
2•levmiseri•45m ago•0 comments

Claude Mythos Audited Symfony and Found 19 Vulnerabilities

https://symfony.com/blog/claude-mythos-audited-symfony-and-found-19-vulnerabilities
4•javiereguiluz•46m ago•0 comments

Remove Srsltid from URLs

https://addons.mozilla.org/de/firefox/addon/remove-srsltid-from-urls/
1•3xa•47m ago•1 comments

Show HN: Handsets – A high-performance Android control CLI, built for agents

https://github.com/elliotgao2/handsets
2•gaojiuli•49m ago•0 comments

Systematic Reward Hacking and Prime Sprints

https://www.primeintellect.ai/blog/reward-hacking
2•thomasm6m6•52m ago•0 comments

Artificial egg hatched 26 healthy chickens

https://colossal.com/colossal-biosciences-artificial-egg-dodo-moa/
2•BaudouinVH•53m ago•0 comments

Hexed.it

https://hexed.it/
4•joooscha•1h ago•2 comments

NASA veterans raise safety concerns as agency ousts former astronaut, advisers

https://elpasomatters.org/2026/05/20/el-paso-astronaut-nasa-advisory-council-artemis-missions/
2•rbanffy•1h ago•0 comments

Show HN: A SQLite graph that captures why AI-generated code exists

https://github.com/enzoferraripapa-arch/ai-vprocess-ops
2•enzo_ferrari•1h ago•0 comments