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

Comments

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

LLMs Do Not Grade Essays Like Humans

https://arxiv.org/abs/2603.23714
1•PretzelFisch•59s ago•0 comments

First Western Digital, now Sony: The tech giant suspends SD card sales

https://mashable.com/article/sony-sd-card-sales-suspended-memory-shortage
1•_tk_•3m ago•0 comments

Spot – Git repo code search, replace, diff and merge

https://github.com/gritzko/librdx/tree/master/spot
1•gritzko•3m ago•0 comments

Cursor Pagination out-of-the box for PrimeFaces and JPA

https://docs.flowlogix.com/#section-jpa-lazymodel-cursor-pagination
1•lprimak•6m ago•0 comments

What to Know: Working in China [video]

https://www.youtube.com/watch?v=bz7KuzEPqcs
1•simonpure•7m ago•0 comments

JP Morgan map shows crude oil ticking time bomb hits oil supply in April

https://www.msn.com/en-us/money/markets/this-map-shows-a-crude-ticking-time-bomb-that-hits-much-o...
2•ck2•9m ago•1 comments

CVE-2026-33691: OWASP CRS whitespace padding bypass vulnerability

1•relunsec•9m ago•0 comments

Show HN: /slot-machine development (CC vs. Codex; CE vs. superpowers)

https://github.com/pejmanjohn/slot-machine
1•pejmanjohn•10m ago•0 comments

Pretext: browser independent text layouting engine for the web

https://twitter.com/i/status/2037713766205608234
1•lewisjoe•11m ago•0 comments

Anthropic Donations: Guesses and Uncertainties

https://www.lesswrong.com/posts/NAwqT8wDkLRovcbZ9/anthropic-donations-guesses-and-uncertainties
1•joozio•14m ago•0 comments

Show HN: Create setups, deploy and share them

2•victorzidaroiu•15m ago•0 comments

Folie à Machine: LLMs and Epistemic Capture

https://www.lesswrong.com/posts/2hyGiAnLKEFv3jBHt/folie-a-machine-llms-and-epistemic-capture
1•joozio•15m ago•0 comments

Every Country in Our Supply Chain Has Declared an Emergency

https://energyandresilience.substack.com/p/every-country-in-our-supply-chain
2•measurablefunc•16m ago•0 comments

Pretext

https://chenglou.me/pretext/
2•sysbot•17m ago•0 comments

Quantum frontiers may be closer than they appear

https://blog.google/innovation-and-ai/technology/safety-security/cryptography-migration-timeline/
3•OJFord•18m ago•0 comments

Show HN: Danobang! – Multiplayer CJK (Chinese, Japanese, Korean) Word Game

https://danobang.com
2•maenbalja•19m ago•1 comments

LeaseWitness – Free lease agreement generator (15 types, no sign-up)

1•alexchemours•21m ago•0 comments

Show HN: Baton – A daemon that sends Claude to fix your GitHub issues

https://github.com/mraza007/baton
2•mr_o47•21m ago•0 comments

Eye drops made from pig semen deliver cancer treatment to mice

https://www.nature.com/articles/d41586-026-00982-2
1•gnabgib•23m ago•1 comments

Voice-to-task-agent|Voice commands to operational tasks, in real-time

https://github.com/manishrawal95/voice-to-task-agent
1•manishrawal95•25m ago•0 comments

Three LLM Agents for My Knowledge Garden

https://www.joshbeckman.org/blog/practicing/three-agents-for-a-knowledge-garden
1•bckmn•26m ago•0 comments

SpringHabt

https://apps.apple.com/us/app/springhabt/id6761129733
1•jmfp•26m ago•1 comments

Mirage Reasoning: The Illusion of Visual Understanding

https://arxiv.org/abs/2603.21687
2•MrBuddyCasino•27m ago•1 comments

Found app to run crowd simulation

https://github.com/sayantan94/CrowdSimulator
1•Morningstar317•27m ago•0 comments

"What made Bell Labs so successful?"

https://tech.slashdot.org/story/26/03/29/0249241/what-made-bell-labs-so-successful
2•MilnerRoute•28m ago•0 comments

Iran Is Drafting Law to Introduce Tolls for Hormuz Transit

https://www.supplychainbrain.com/articles/43739-iran-is-drafting-law-to-introduce-tolls-for-hormu...
3•geox•29m ago•0 comments

Trail cursor (smear effect) is coming to Rio terminal

https://twitter.com/raphamorims/status/2038258512782934170
1•darkberry•36m ago•0 comments

A lot of what we called talent was just scarce execution

https://mayankagarwal.com/ai,%20llm,%20future%20of%20work/2026/03/29/a-lot-of-what-we-called-tale...
4•whoelse123•38m ago•0 comments

Researchers uncover 2k-year-old bullet inscribed with ominous message

https://www.gbnews.com/science/archaeology-breakthrough-researchers-uncover-2000-year-old-bullet-...
2•bookofjoe•40m ago•0 comments

Repose: Break reminder for macOS that pauses during meetings

https://github.com/fikrikarim/repose
2•karimf•43m ago•0 comments