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.

AI can write code. But who understands it?

https://medium.com/enrique-dans/ai-can-write-the-code-but-who-understands-it-2e28e3e12f3e
1•ktzar•6m ago•0 comments

Show HN: Chancely – Ace interviews and get hired faster with AI feedback

https://chancely.ai/
1•niliu123•8m ago•0 comments

Growing Up in "404 Not Found" (Part II): The Vanishing Nuclear City

https://vincent404.substack.com/p/growing-up-in-404-not-found-part
2•RMPR•9m ago•0 comments

Shower Thoughts

https://www.patreon.com/posts/shower-thoughts-146872033
1•todsacerdoti•9m ago•0 comments

Generative Refocusing: Flexible Defocus Control from a Single Image

https://generative-refocusing.github.io/
1•trueduke•10m ago•0 comments

Understanding the empirical law of large numbers and the gambler's fallacy

http://science-memo.blogspot.com/2016/08/empirical-law-of-large-numbers-with.html
1•northlondoner•10m ago•0 comments

Kirin 9030 Hints at SMIC's Possible Paths Toward >300 MTr/Mm2 Without EUV

https://chentfred.substack.com/p/kirin-9030-hints-at-smics-possible
1•klelatti•12m ago•0 comments

Growth Marketer

https://secure.jotform.com/253381217909966
1•aisutariVI•19m ago•1 comments

Y Combinator Store

https://ycalumni.store/
1•swatson741•21m ago•0 comments

Alternative Crypto Lending: Personal Experience and Observations

1•Oleksandrslapko•22m ago•0 comments

Building a Reliable Job Scheduler: Leases, Idempotency, and Timezone-Aware Cron

https://github.com/Spooled-Cloud/spooled-backend
1•birdculture•25m ago•0 comments

Boris Cherny (Claude Code Creator) – What Grew His Career and Building Anthropic [video]

https://www.youtube.com/watch?v=AmdLVWMdjOk
1•romenrg•27m ago•0 comments

To sign or not to sign: Practical vulnerabilities in GPG and friends [video]

https://media.ccc.de/v/39c3-to-sign-or-not-to-sign-practical-vulnerabilities-i
1•karel-3d•30m ago•1 comments

Unsatisfying Meetings? Add a Thinking Mode Selector

https://medium.com/analysts-corner/unsatisfying-meetings-add-a-thinking-mode-selector-63d8668b1111
1•royklein•32m ago•0 comments

Show HN: ProfileHunt – Portfolio builder for product managers

https://profilehunt.in/
2•srinivas3651•32m ago•0 comments

The Breath Between Thoughts

https://rodgercuddington.substack.com/p/the-breath-between-thoughts
1•freespirt•35m ago•0 comments

Measuring out-of-sync clocks on the Internet

https://alexsci.com/blog/clock-skew/
1•todsacerdoti•39m ago•0 comments

Ask HN: Could someone kindly spare me an invite to Lobste.rs?

1•debayande•39m ago•1 comments

LSFG-VK: Vulkan layer for frame generation via lossless scaling

https://github.com/PancakeTAS/lsfg-vk
2•sibellavia•46m ago•0 comments

AI Is a Scam, but Don't Let That Spoil Machine Learning

https://gardinerbryant.com/ai-is-a-scam-but-dont-let-that-spoil-machine-learning/
3•chartered_stack•48m ago•1 comments

A tool that reconstructs real UIs from screen recording (not screenshot-to-code)

https://www.replay.build/
2•ma1or•49m ago•1 comments

Beads vs. Agent Hive: Who Stole Who's Take on AI Agent Memory

https://twitter.com/intertwineai/status/2005554519908737117
1•intertwiner•50m ago•0 comments

Show HN: I built an AI-based image-to-Excel tool to avoid re-typing tables

https://jpg2excel.app
1•owoamier•51m ago•0 comments

Uzbekistan's nationwide license plate surveillance system

https://techcrunch.com/2025/12/23/inside-uzbekistans-nationwide-license-plate-surveillance-system/
1•dmitrygr•51m ago•0 comments

Inverting the interface: design, personal agents, and the post-brand world

https://pianabianco.com/inout/inverting-the-interface-design-personal-agents-and-the-post-brand-w...
1•kurren•54m ago•1 comments

Orbital Compute

https://twitter.com/princeofprawns0/status/2005551417403265481
2•printerlover•1h ago•1 comments

Ask HN: How Do I Find an Angel Investor to Support My Startup?

1•Lordarminius•1h ago•0 comments

Show HN: NotebookLM Tools – Chrome ext to manage notebooks, sources, languages

https://chromewebstore.google.com/detail/notebooklm-tools/hiibkpjljigehlnnecbgehkhfibmahjn
1•trungpv1601•1h ago•0 comments

2025: That's a Wrap and Here Are the Stats

https://www.backblaze.com/blog/2025-thats-a-wrap-and-here-are-the-stats/
2•piqufoh•1h ago•0 comments

Payment giants preparing for a world where AI agents book flights, shop for you

https://www.cnbc.com/2025/12/29/ai-agentic-shopping-price-discounts-cheap-sales-commerce-visa-mas...
2•rustoo•1h ago•0 comments