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.

X for You Feed Algorithm (Updated May 15th)

https://github.com/xai-org/x-algorithm/blob/main/README.md
1•M4v3R•31s ago•0 comments

Anyone accepted crypto payments from customers?

1•Davida_Ginter•1m ago•0 comments

The U.S. has 1,200 AI bills and no good test for any of them

https://fortune.com/2026/05/15/ai-policy-patchwork-state-federal-regulation-framework-sonnenfeld-...
2•Brajeshwar•2m ago•0 comments

Code Review Is Not About Catching Bugs

https://www.davidpoll.com/2026/02/code-review-is-not-about-catching-bugs/
1•mooreds•3m ago•0 comments

Lessons Learned Building High-Performance Rust Profiler

https://pawelurbanek.com/rust-performance-profiling
1•vinhnx•4m ago•0 comments

Sorry seems to be the most overused word

https://amyhupe.co.uk/articles/sorry-seems-to-be-the-most-overused-word/
1•mooreds•5m ago•0 comments

Show HN: Vibe Coding a $20k /Year Enterprise Logistics Platform

https://trmnl.com/blog/vibe-coding-shiphero
1•ryanckulp•5m ago•0 comments

Show HN: Late News – stop reading 50 articles to understand one story

https://www.latenews.press
1•dzeycob•6m ago•0 comments

Automating Code Security Reviews

https://cloudberry.engineering/article/automating-code-security-reviews/
1•gbrindisi•7m ago•0 comments

Bug Archeology: Solving a decade-old Swift/C++ mystery with LLMs

https://samkhawase.com/blog/bug-archeology-using-LLM/
9•FlyingSnake•8m ago•0 comments

The Splintered Mind: ChatGPT Is Not Your Friend

http://schwitzsplinters.blogspot.com/2026/05/chatgpt-is-not-your-friend-guest-post.html
1•speckx•9m ago•0 comments

A curated list of Wordle like games mn

https://dlelist.com
1•recursive_toast•10m ago•0 comments

Earthquakes on a Map

https://earthquake.usgs.gov/earthquakes/map/?extent=-82.2617,386.71875&extent=84.9901,856.40625
1•realsharkymark•10m ago•1 comments

Everyone's Getting Fired

https://12gramsofcarbon.com/p/tech-things-everyones-getting-fired
1•theahura•14m ago•1 comments

What we learned using AI agents to refactor a monolith

https://1password.com/blog/what-we-learned-using-ai-agents-to-refactor-a-monolith
1•ludovicianul•16m ago•0 comments

Striking New Views of the First Atomic Bomb Test

https://spectrum.ieee.org/trinity-nuclear-test
1•sohkamyung•16m ago•0 comments

What would make a New Hampshire community resistant to new housing?

https://newhampshirebulletin.com/2026/05/13/what-would-make-a-new-hampshire-community-resistant-t...
1•indigodaddy•16m ago•0 comments

Gnutella2 Network Statistics

http://crawler.doxu.org/
2•rickcarlino•16m ago•0 comments

A 0-click exploit chain for the Pixel 10

https://projectzero.google/2026/05/pixel-10-exploit.html
3•happyhardcore•17m ago•0 comments

Giovanni Sartori – Guidelines for concept analysis [pdf]

https://is.muni.cz/el/fss/podzim2019/POLn4002/um/Sartori_Guidelines_for_Concept_Analysis.pdf
2•__patchbit__•17m ago•0 comments

AI is wiping out entry-level jobs

https://fortune.com/2026/05/15/ai-entry-level-jobs-higher-education-experience-gap/
15•Brajeshwar•18m ago•3 comments

Aether Mind – on-chain neural cognitive engine on a quantum-VQE L1

https://huggingface.co/QuantumAI-Blockchain/QuantumAI-Blockchain
1•BlockArtica•19m ago•0 comments

Pitch deck and slides are they 2 different things?

1•AkumaCheisa•19m ago•0 comments

Qwen-Image-2.0 Technical Report

https://arxiv.org/abs/2605.10730
1•gmays•19m ago•0 comments

Show HN: Ane, a new chord-based terminal code editor with one-shot CLI edits

https://github.com/prettysmartdev/ane
2•cohix•21m ago•0 comments

The Wonders of AI: We Are Retiring Our Bug Bounty Program

https://turso.tech/blog/the-wonders-of-ai
28•tjek•23m ago•4 comments

Neanderthal dentists used stone drills to treat cavities nearly 60k years ago

https://phys.org/news/2026-05-neanderthal-dentists-stone-drills-cavities.html
1•gmays•23m ago•0 comments

Control your Mac with voice and hand gestures

https://tomyang-tz.github.io/Gstrl/
1•motgnay•25m ago•0 comments

8 Years at Atlassian [video]

https://www.youtube.com/watch?v=55pTFVoclvE
1•celadevra_•25m ago•0 comments

Graphing Scientific Calculator Based on the ESP32

https://github.com/El-EnderJ/NeoCalculator
1•uticus•27m ago•0 comments