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.

Which AI model is best for real data analysis?

https://mljar.com/analysis/
1•pplonski86•1m ago•0 comments

Usand: Minimal Unshare(1)-Based Sandbox

https://github.com/richfelker/usand
1•fanf2•1m ago•0 comments

Show HN: SigMap – shrink AI coding context 97% with auto-scaling token budget

https://github.com/manojmallick/sigmap
1•manoj079•2m ago•0 comments

Python Markdown pipeline after the collapse of MkDocs: ProperDocs and Zensical

https://group.miletic.net/en/blog/2026-04-14-the-future-of-mkdocs-properdocs-and-zensical/
1•vedranm•2m ago•0 comments

How to implement cryptographically-secure API keys

https://kerkour.com/api-keys
1•randomint64•2m ago•0 comments

Comment and Control: Prompt Injection in Claude Code, Gemini CLI, and Copilot

https://oddguan.com/blog/comment-and-control-prompt-injection-credential-theft-claude-code-gemini...
1•0dd•2m ago•1 comments

Projected warming will exceed the long-term thermal limits of rice cultivation

https://www.nature.com/articles/s43247-025-03108-0
1•robtherobber•9m ago•0 comments

Rawm Gaming Mouse – Leviathan V4

1•KevinSue•12m ago•0 comments

We Built Hanker in 14 Days with Claude

https://hanker.app/blog/we-built-hanker-in-14-days-with-claude-heres-the-slightly-unhinged-techni...
2•whatsupdog•12m ago•0 comments

GBrain – system to make your AI agent better reflect you

https://github.com/garrytan/gbrain
1•andsoitis•15m ago•0 comments

Razor1911

https://www.pouet.net/prod.php?which=105954
1•reimertz•19m ago•0 comments

You're paying your best engineers $109,000 a year to babysit code

https://blog.codacy.com/youre-paying-your-best-engineers-109000-a-year-to-babysit-code
2•ARayOutOfBounds•19m ago•0 comments

Testing OpenGraph on localhost from the CLI before you go public

https://simonhartcher.com/posts/2026-04-15-testing-opengraph-on-localhost-from-the-cli/
1•deevus•20m ago•0 comments

Rosetta Code – Programming Chrestomathy

https://rosettacode.org/wiki/Rosetta_Code
1•paraschopra•23m ago•0 comments

Gradient Bang: a multiplayer game built with LLMs

https://www.gradient-bang.com/
1•wavelander•23m ago•1 comments

$TSLA is trading at 324x earnings

https://xcancel.com/UnotheInvestor/status/2044141719948865796
2•doener•25m ago•0 comments

I found a way to goof off at work

https://chromewebstore.google.com/detail/openpaws/nbkcemoklobbiamcncmadljpaaoemdkg
1•jimliux•26m ago•0 comments

Nxs-universal-chart – open-source tool to install applications into Kubernetes

https://github.com/nixys
1•nixys_nxs•26m ago•2 comments

Are AI Hallucinations a Freudian Slip?

https://btriani.medium.com/the-talking-cure-and-the-talking-machine-51460b9bdef6
1•btriani•28m ago•0 comments

OpenSSL 4.0 Final Release – Live

https://openssl-library.org/post/2026-04-14-openssl-40-final-release/
1•neustradamus•30m ago•0 comments

Gemma Thinking Like Claude Opus

https://decrypt.co/364344/gemopus-gemma-4-claude-opus-style-local-ai
1•hochmartinez•33m ago•0 comments

Corporations and Climate Change: An Overview

https://wires.onlinelibrary.wiley.com/doi/full/10.1002/wcc.919
2•mariuz•34m ago•0 comments

Show HN: I built a contextual explainer to replace my dictionary extensions

https://chromewebstore.google.com/detail/rhino/dpnjiddopbpgfpmocgjbofikgdoeapab
1•oishika10•34m ago•0 comments

Anna's Archive Loses $322M Spotify Piracy Case Without a Fight

https://torrentfreak.com/annas-archive-loses-322-million-spotify-piracy-case-without-a-fight/
24•askl•38m ago•12 comments

Tips for a Successful Life by Agnes Callard

https://twitter.com/AgnesCallard/status/1503108298349838336
2•jimsojim•41m ago•0 comments

Bernt Børnich: Meet NEO, your robot butler in training [video]

https://www.ted.com/talks/bernt_bornich_meet_neo_your_robot_butler_in_training
2•fagnerbrack•45m ago•0 comments

OpenCognit – Open-source OS for autonomous AI agents

https://github.com/OpenCognit/opencognit
2•otnap•45m ago•0 comments

Show HN: Open Capital – AI-powered investing education

https://open-capital.ai
1•ivinvest284•48m ago•0 comments

Algolia Answers (2020): first implementation of RAG?

https://web.archive.org/web/20201124212210/https://www.algolia.com/doc/guides/algolia-ai/answers/
1•matthieu_bl•48m ago•1 comments

Under the hood of MDN's new front end

https://developer.mozilla.org/en-US/blog/mdn-front-end-deep-dive/
2•rguiscard•52m ago•0 comments