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.

Scaling Trusted Access for Cyber with GPT‑5.5 and GPT‑5.5‑Cyber

https://openai.com/index/gpt-5-5-with-trusted-access-for-cyber/
1•allanrbo•2m ago•0 comments

55 Hours of Codex /Goal: What a Port Task Teaches You About Autonomous Loops

https://vexjoy.com/posts/55-hours-of-codex/
1•AndyNemmity•5m ago•0 comments

Discord Automates ScyllaDB Clusters at Scale

https://discord.com/blog/how-discord-automates-scylladb-clusters-at-scale
1•cyndunlop•5m ago•0 comments

Use of the ML-DSA Signature Algorithm in the Cryptographic Message Syntax

https://datatracker.ietf.org/doc/rfc9882/
1•mooreds•6m ago•0 comments

Meta Shuts Down End-to-End Encryption for Instagram Messaging

https://www.pcmag.com/news/meta-shuts-down-end-to-end-encryption-for-instagram-dms-messaging
5•tcp_handshaker•9m ago•0 comments

Pagaya investor seeks refund, claiming AI real estate fund wiped 80% of capital

https://www.calcalistech.com/ctechnews/article/3a0p63mof
3•tcp_handshaker•10m ago•0 comments

ASML to invest $1.5B in Mistral at over $11B valuation

https://www.calcalistech.com/ctechnews/article/bycca4sclg
2•tcp_handshaker•11m ago•0 comments

Try Out AgentBase

https://useagentbase.com/
2•justin22a•12m ago•1 comments

Fixing Markdown Syntax Is a Nightmare

https://mdview.io/s/fixing-markdown-syntax-is-a-nightmare
1•Igor_Wiwi•12m ago•1 comments

Android application to switch display into side-by-side VR mode

https://github.com/dmikushin/android-native-sbs
2•Eridanus2•14m ago•0 comments

Incremental History Searching with .inputrc

https://codeinthehole.com/tips/the-most-important-command-line-tip-incremental-history-searching-...
1•kamaraju•15m ago•0 comments

What's a Lakestream?

https://blog.2minutestreaming.com/
1•sijieg•18m ago•0 comments

My Response to Open Web Censorship Calls-to-Action

https://www.scottrlarson.com/blog/blog-response-open-web-action-calls/
1•trinsic2•18m ago•0 comments

Local Autonomous Security Agent-QWEN2.5-7B+MCP Agent Loop

https://huggingface.co/automajicly
2•automajicly•18m ago•0 comments

AWS data center outage hits trading on Fanduel, Coinbase

https://www.cnbc.com/2026/05/08/aws-outage-data-center-fanduel-coinbase.html
3•bigflern•19m ago•0 comments

Claude Conference 2026 Videos

https://www.youtube.com/playlist?list=PLmWCw1CzcFim2obQ-w3ohbULOfwp5lApR
2•rmason•19m ago•0 comments

Trump Media and Technology Group reports $405.9M net loss, $900k revenue

https://finance.yahoo.com/markets/stocks/articles/trump-media-technology-group-reports-203000071....
5•computerliker•24m ago•0 comments

W Social uncovered: the reality behind the hype

https://blog.elenarossini.com/w-social-uncovered-the-reality-behind-the-hype/
2•cratermoon•24m ago•0 comments

Killswitch: Add per-function short-circuit mitigation primitive

https://lore.kernel.org/all/20260507070547.2268452-1-sashal@kernel.org/
2•speckx•25m ago•0 comments

When life gives you lemons, write better error messages

https://wix-ux.com/when-life-gives-you-lemons-write-better-error-messages-46c5223e1a2f
1•luispa•25m ago•0 comments

Deploying Go with Apache? (Using FastCGI)

https://www.piperswe.me/blog/2023-10-12-deploy-go-with-fastcgi
2•mooreds•27m ago•0 comments

If Anyone Builds It, Everyone Dies

https://ifanyonebuildsit.com/
1•lisper•27m ago•0 comments

Sam Altman of OpenAI responds to murder accusations (2025) [video]

https://www.youtube.com/watch?v=zrgEZ8FeZEc
2•1vuio0pswjnm7•27m ago•1 comments

Show HN: Vibe code your agents without vibe coding your agent

https://deepeval.com/docs/vibe-coding
2•jeffreyip•28m ago•0 comments

Pentagon will 'never again' rely on a single AI provider, official says

https://www.nextgov.com/artificial-intelligence/2026/05/pentagon-will-never-again-rely-single-ai-...
6•billybuckwheat•30m ago•0 comments

The all-new Fitbit Air

https://blog.google/products-and-platforms/devices/fitbit/fitbit-air/
2•tlyleung•30m ago•0 comments

A Message from Hayden Brown, Upwork CEO

https://www.upwork.com/press/releases/upwork-ceo-hayden-brown-shared-the-following-message-with-e...
3•littlexsparkee•30m ago•4 comments

The Iliad as Propaganda Justifying Aristocratic Rule

https://www.richardhanania.com/p/the-iliad-as-propaganda-justifying
3•paulpauper•32m ago•0 comments

Don Quixote was an unexpected hit

https://storica.club/blog/don-quixote-parody/
2•cemsakarya•33m ago•0 comments

Claude Code, Codex and Agentic Coding #8

https://thezvi.substack.com/p/claude-code-codex-and-agentic-coding-f54
3•paulpauper•33m ago•0 comments