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.

A maintainability ratchet for AI-assisted Python

https://kayhan.dev/posts/014-letting-agents-write-code-without-ratcheting-up-risk/
1•keynha•3m ago•0 comments

Why Your Docker Container Is 1.2GB When It Should Be 80MB

https://sandeepbansod.medium.com/why-your-docker-container-is-1-2gb-when-it-should-be-80mb-7b443a...
1•thunderbong•8m ago•0 comments

Show HN: TapToyPia

https://memalign.github.io/m/taptoypia/index.html
1•memalign•9m ago•0 comments

Why AI Hardware Is a Chip Layer Problem

https://www.easelinktech.com/why-every-electronic-product-may-need-to-be-rebuilt-for-on-device-ai...
1•EnXu•11m ago•0 comments

Hershey is a textual vector font format

https://wiki.xxiivv.com/site/hershey.html
1•birdculture•11m ago•0 comments

All Lean Books and Where to Find Them

https://lakesare.brick.do/all-lean-books-and-where-to-find-them-x2nYwjM3AwBQ
1•atomicnature•13m ago•0 comments

Instantly understand why any stock is moving

https://whystockmove.com
1•crixusbaba•18m ago•0 comments

InboxFlow Agent – Check your email campaigns before sending

https://github.com/selimsevim/QA-testing-agent
1•selimsevim•19m ago•0 comments

Claude hack – Don't waste you token where it's not needed

https://github.com/justinjamesmathew/tokenmax-mcp
1•justin1006•24m ago•0 comments

Ask HN: I mapped 6,494 AI engines into a taxonomy – anyone else tried this?

1•Developer_H•24m ago•0 comments

1,700 new protein found in the "dark proteome" of previously overlooked DNA

https://pubmed.ncbi.nlm.nih.gov/42092140/
2•janandonly•25m ago•0 comments

Coding agents are giving everyone decision fatigue

https://stackoverflow.blog/2026/05/21/coding-agents-are-giving-everyone-decision-fatigue/
2•vinhnx•32m ago•0 comments

It's Time to Walk

https://www.inferterra.com/the-new-workspace-a-first-principles-exploration-of-dictation-agents-a...
1•vinhnx•33m ago•0 comments

Prof or Hobo?

https://www.proforhobo.com/
1•Paracompact•36m ago•0 comments

The Four Motivators (2016)

https://apenwarr.ca/log/20161213
2•downbad_•45m ago•0 comments

Sleep and Mortality: A Population-Based 22-Year Follow-Up Study (2007)

https://fermatslibrary.com/s/sleep-and-mortality-a-population-based-22-year-follow-up-study
2•downbad_•45m ago•1 comments

Local Root Privilege Escalation and Credential Disclosure in the Linux Kernel

https://blog.qualys.com/vulnerabilities-threat-research/2026/05/20/cve-2026-46333-local-root-priv...
1•signa11•47m ago•0 comments

China behind in LLM race but it can still win in AI, ex-Tencent AI lead says

https://www.scmp.com/tech/big-tech/article/3354394/china-losing-llm-race-it-can-still-win-ai-ex-t...
1•01-_-•48m ago•0 comments

Newsom signs order aimed at tackling AI job displacement

https://thehill.com/policy/technology/5889582-california-ai-job-losses/
1•01-_-•50m ago•0 comments

Ruby Arrays on Steroids (2014) [video]

https://www.youtube.com/watch?v=UX7xmhpUoi4
1•tosh•51m ago•0 comments

How AI is redefining Software Engineering

https://adlrocha.substack.com/p/adlrocha-how-ai-is-redefining-software
1•adlrocha•57m ago•0 comments

The Internet is rotting away (German)

https://netzpolitik.org/2026/breakpoint-das-internet-verrottet/
3•doener•57m ago•0 comments

Show HN:An LED display app that lights up concerts, events, and fan moments

https://play.google.com/store/apps/details?id=com.koko.board.glow&hl=en_US
1•k-Whale•1h ago•1 comments

uP

https://www.micropublication.org/
2•jruohonen•1h ago•1 comments

Hiro, AI job matching with real visa sponsorship data (550K jobs)

https://hirocareers.com
1•sharvenrane7•1h ago•0 comments

Wild Linker Update – 0.9.0

https://davidlattimore.github.io/posts/2026/05/24/wild-update-0.9.0.html
3•dabinat•1h ago•0 comments

WarpSpeed Just Beat Cursor

https://www.doubleai.com/research/warpspeed-approaches-speed-of-light-on-blackwell
2•ben_mussay•1h ago•0 comments

For developers without design skills, how do you leverage AI for front end dev?

1•boundless88•1h ago•0 comments

The anatomy of AI power in 2026

https://wayneresearch.com/research/anatomy-of-ai-power/
1•7moritz7•1h ago•0 comments

Solving the Technical Interview

https://functional.computer/blog/solving-the-technical-interview
1•adhi01•1h ago•0 comments