frontpage.
newsnewestaskshowjobs

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.

Supervised Fire-and-Forget in Go

https://rednafi.com/go/supervised-fire-and-forget/
1•olexsmir•56s ago•0 comments

Teachers decry plan for humanoid robot in New York high school

https://www.theguardian.com/us-news/2026/jul/25/new-york-humanoid-robot-teachers-school
1•thomascountz•4m ago•0 comments

Ask HN: Anyone else experiencing insane token usage official Codex app GPT-5.6?

1•throwaway2027•5m ago•0 comments

Let Local LLMs Search the Web Without Burning 100k+ Tokens

https://medium.com/@marcbuilds/tinysearch-let-your-small-local-llm-search-the-web-without-burning...
1•MarcBuilds01•6m ago•0 comments

If another civilisation lived on Earth before us, would we know?

https://www.rnz.co.nz/news/world/801858/if-another-civilisation-lived-on-earth-before-us-would-we...
3•billybuckwheat•12m ago•0 comments

Show HN: OpenSlides – Open-source desktop app for animated code presentations

https://github.com/codewiththiha/OpenSlides
5•codewiththiha•15m ago•0 comments

An agent with write access to my files, and no way to send them anywhere

https://manazir.dev/work/mnzrbrain-secondbrain-part-two
1•mnzrdev•16m ago•0 comments

Tokenflation: When "Hi" triggers 33 tool calls

https://quesma.com/blog/tokenflation-when-hi-triggers-33-tool-calls/
2•jakozaur•22m ago•0 comments

MinHash – How to Find Similarity at Scale

https://spotintelligence.com/2023/01/02/minhash/
1•ankitg12•24m ago•0 comments

Source Code Grep: Use your own grep, but make it source code aware

https://github.com/m-manu/scgrep
1•m-manu•24m ago•1 comments

Show HN: ScreenFocus – keyboard focus follows the pointer across Mac displays

https://github.com/therohitdas/ScreenFocus
1•therohitdas•29m ago•0 comments

Choose Boring Technology

https://boringtechnology.club/
1•ustad•29m ago•0 comments

Show HN: VoiceScroll – a teleprompter that scrolls as you speak

https://www.voice-scroll.com
1•sangkwun•32m ago•0 comments

Best Window Air Conditioners of 2026: Midea, Zafro, GE

https://www.wired.com/gallery/best-window-air-conditioners/
2•joozio•35m ago•0 comments

Connection-Agnostic Presence Tracking for Stateless Distributed Back Ends

1•duckydude20•35m ago•0 comments

Show HN: Inflect TTS v2+ONNX, 9M/4M text-to-speech models running in the browser

https://inflect-tts.geronimo-labs.com
2•g58892881•38m ago•2 comments

Skateboarding Forum on Wood Quality

https://www.slapmagazine.com/index.php?topic=120409.0
2•marysminefnuf•39m ago•0 comments

Ask HN: Is Your Work Relaxing?

1•julienreszka•41m ago•0 comments

Sequentialising Parallel Moves

https://compiler.club/parallel-moves/
1•g0xA52A2A•46m ago•0 comments

Show HN: Mousecrack – Bypass agent mouse detection with deep learning

https://github.com/puffinsoft/mousecrack
2•G3819•50m ago•0 comments

Show HN: Pg_stat_ch, a Postgres extension to export every metric to ClickHouse

https://github.com/ClickHouse/pg_stat_ch
2•saisrirampur•55m ago•0 comments

WezTerm Config Guide

https://gilbertsanchez.com/posts/my-terminal-wezterm/
1•ankitg12•56m ago•0 comments

Stack Overflow for Agents

https://stackoverflow.blog/2026/06/10/announcing-stack-overflow-for-agents/
2•taubek•58m ago•0 comments

Show HN: LaunchRanks – Get actionable SEO steps for growing site authority

https://launchranks.com
1•NataliNy•1h ago•0 comments

Show HN: Record a click-through demo from a Markdown plan into one HTML file

https://github.com/justrinari/handoff
3•justrinari•1h ago•0 comments

Show HN: I built an AI that roasts GitHub profiles

https://gitroast-kappa.vercel.app/
3•hito20•1h ago•1 comments

Vision 50 Years Phone – Keeping old Android phones fast without root

https://github.com/50YearsPhone/vision-50-years-phone
6•mike5gao•1h ago•0 comments

Eve.dev: Next.js for Agents

https://eve.dev/
1•javiercr•1h ago•0 comments

Hans Moravec was right about AI

https://nymag.com/intelligencer/article/hans-moravec-interview.html
2•anath2•1h ago•0 comments

Watching Go's new garbage collector move through the heap

https://theconsensus.dev/p/2026/07/19/observing-gos-garbage-collector-old-and-new.html
2•ksec•1h ago•0 comments