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.

Encrypt Your .env in a Meme

https://github.com/thoughtlesslabs/memevault
1•thoughtlesslabs•1m ago•1 comments

Communication as a Product

https://ashgaikwad.substack.com/p/communication-as-a-product
2•ashgkwd•1m ago•0 comments

Key US Power Grid [PJM] Cuts Demand Outlook on Overstated AI Boom

https://www.bloomberg.com/news/articles/2026-01-14/biggest-us-power-grid-cuts-demand-outlook-on-o...
2•toomuchtodo•3m ago•0 comments

Social media time does not increase teenagers' mental health problems – study

https://www.theguardian.com/media/2026/jan/14/social-media-time-does-not-increase-teenagers-menta...
1•sien•6m ago•0 comments

The Inelastic Markets Hypothesis [pdf]

https://r.jordan.im/download/investing/gabaix2020.pdf
1•luu•12m ago•0 comments

The Single-Click Microsoft Copilot Attack That Silently Steals Personal Data

https://www.varonis.com/blog/reprompt
2•extesy•16m ago•0 comments

DeepSeek's technical papers show frontier innovation

https://www.scmp.com/tech/tech-trends/article/3339769/deepseek-stays-mum-next-ai-model-release-te...
2•nsoonhui•21m ago•0 comments

"Don't worry. Boys are hard to find." Trump/Epstein and... Criminal Enterprises

https://lisevoldeng.substack.com/p/dont-worry-boys-are-hard-to-find
3•Tadpole9181•22m ago•0 comments

We built a browser with GPT-5.2 in Cursor

https://xcancel.com/mntruell/status/2011562190286045552?s=20
2•aaraujo002•23m ago•0 comments

Show HN: Commosta – marketplace to share computing resources

https://www.commosta.io/
1•gkm25•23m ago•0 comments

JSON Render

https://json-render.dev/
1•handfuloflight•25m ago•0 comments

Show HN: IMSAI/Altair inspired microcomputer with web emulator

https://gzalo.github.io/microcomputer/
1•gzalo•26m ago•0 comments

Skillshare: Sync skills to all your AI CLI tools with one command

https://github.com/runkids/skillshare
1•handfuloflight•33m ago•0 comments

Show HN: Chklst – A Minimalist Checklist

https://www.chklst.xyz/
2•rgbjoy•35m ago•0 comments

Opinion: Why tech leaders can't regulate AI before releasing them?

1•lauraorchid•36m ago•1 comments

Vibe Coding Paradox

https://blog.kaplich.me/vibe-coding-paradox/
1•skaplich•36m ago•0 comments

Show HN: I built a satellite forensic engine to detect fraud in Carbon Markets

1•kccanarch•36m ago•1 comments

Google is shutting down the Tenor API

https://www.reddit.com/r/webdev/s/ZjlFO8kiW4
1•kull•37m ago•2 comments

Bubblewrap: A nimble way to prevent agents from accessing your .env files

https://patrickmccanna.net/a-better-way-to-limit-claude-code-and-other-coding-agents-access-to-se...
2•0o_MrPatrick_o0•38m ago•0 comments

Is passive investment inflating a stockmarket bubble?

https://www.economist.com/finance-and-economics/2026/01/14/is-passive-investment-inflating-a-stoc...
24•andsoitis•40m ago•27 comments

I beat Factorio on 1k Floppy disks [video]

https://www.youtube.com/watch?v=cTPBGZcTRqo
1•simonpure•40m ago•1 comments

ISS astronauts return to Earth early due to illness of crew member

https://www.cbc.ca/news/science/nasa-crew11-early-return-9.7045315?cmp=rss
2•gnabgib•42m ago•0 comments

2025 Berggruen Prize Essay Competition Winners

https://berggruen.org/eu/news/2025-berggruen-prize-essay-competition-winners
2•i7l•42m ago•0 comments

AgentDiscover Scanner – Multi-layer AI agent detection (code, network, K8s eBPF)

https://github.com/Defend-AI-Tech-Inc/agent-discover-scanner
1•DefendAI•42m ago•0 comments

Skrillex Releases Kora

https://skrlx.com/
3•Lucasoato•49m ago•0 comments

Kutt.ai – Free AI Video Generator, Text and Image to Video

https://kutt.ai/
2•zuoning•49m ago•2 comments

Personal Intelligence: Connecting Gemini to Google Apps

https://blog.google/innovation-and-ai/products/gemini-app/personal-intelligence/
1•simonpure•50m ago•1 comments

Mapping Nostr keys to DNS-based internet identifiers

https://github.com/nostr-protocol/nips/blob/master/05.md
1•gjvc•58m ago•0 comments

WAPlus' Guide to WhatsApp CRM

https://waplus.io/blog/whatsapp-crm
2•bocaiconnie•59m ago•1 comments

Verizon Is Down

https://www.macrumors.com/2026/01/14/verizon-is-down-iphone-sos/
7•vapemaster•1h ago•4 comments