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.

Dave Eggers told OpenAI staff that ChatGPT was 'silencing a generation'

https://www.theverge.com/ai-artificial-intelligence/967630/dave-eggers-openai-chatgpt-silencing-a...
1•littlexsparkee•1m ago•0 comments

Show HN: CodeKitHub – Free browser-based tools, files never leave your device

https://codekithub.com/en/
1•qiaobax•2m ago•0 comments

Facefinder

https://face-finder.org
1•thefirstname322•10m ago•0 comments

Controlling Reasoning Effort in LLMs

https://magazine.sebastianraschka.com/p/controlling-reasoning-effort-in-llms
1•vismit2000•13m ago•0 comments

We are entering the graph engineering phase

https://www.drjoshcsimmons.com/writing/we-are-entering-the-graph-engineering-phase
1•joshcsimmons•18m ago•0 comments

Tooly – Local JSON, YAML, CSV and Regex Tools

https://www.tooly.one/
1•hengery•18m ago•0 comments

Proof of Fermat Last Theorem from Scratch

https://www.youtube.com/watch?v=9f-hGSh8lF0
1•E-Reverance•19m ago•0 comments

India's Skyroot launches Vikram-1 in first private orbital rocket mission

https://www.reuters.com/science/indias-skyroot-launches-vikram-1-first-private-orbital-rocket-mis...
2•SilverElfin•24m ago•0 comments

The cost of the night shift and how to sleep it off

https://www.bbc.co.uk/news/articles/cp9errxl97go
1•mmarian•26m ago•0 comments

The Case for Systems Engineering in the Agentic Era

https://goyalankit.com/blog/the-case-for-systems-engineering-in-the-agentic-era
1•goyalankit•28m ago•0 comments

Fastest Lego Autoclicker (2025) [video]

https://www.youtube.com/watch?v=JmQeSDkcNjc
1•mot2ba•32m ago•0 comments

Show HN: Voice chat in a nostalgic private lobby

https://thepregamelobby.com/
1•gpsmsn•40m ago•0 comments

Resume Variants: Why You Need a Base Resume and Tailored Versions

https://www.roleframe.ai/blog/tailor-resume-to-job-description
1•larbisahli•44m ago•0 comments

Paintable electrodes could power creative and colorful wearable sensors

https://www.psu.edu/news/research/story/paintable-electrodes-could-power-creative-and-colorful-we...
1•geox•48m ago•0 comments

Hubble Detects an Isolated Stellar-Mass Black Hole Wandering the Milky Way

https://science.nasa.gov/missions/hubble/hubble-determines-mass-of-isolated-black-hole-roaming-ou...
1•TomerHaimovich•52m ago•0 comments

Men in Shorts Are Shaking Up Japan's Buttoned-Down Offices

https://www.nytimes.com/2026/07/19/world/asia/japan-cool-biz-tokyo-shorts-heat.html
3•sudo_cowsay•52m ago•0 comments

Study: AI Is Not Displacing Young Job Seekers (In Norway) – Yet

https://norwegianscitechnews.com/2026/07/ai-is-not-displacing-young-job-seekers-yet/
1•giuliomagnifico•53m ago•0 comments

Fayetteville officers fired for misusing license plate system

https://www.washingtonpost.com/business/2025/03/14/programming-jobs-lost-artificial-intelligence/
2•pir8life4me•1h ago•1 comments

Looking for a Fall 2026 / Winter-Spring 2027 Internship

1•cnnadozi•1h ago•0 comments

Could Modern Code Review Have Prevented Wp2shell?

https://www.hacktron.ai/blog/wp2shell
1•zeyu1337•1h ago•0 comments

AI for Systems is "AGI-Complete"

https://dl.acm.org/doi/10.1145/3830422.3830425
2•matt_d•1h ago•0 comments

Security incident disclosure – July 2026

https://huggingface.co/blog/security-incident-july-2026
2•fdb•1h ago•1 comments

A curated list of tools and resources for vibecoders

https://github.com/ai-for-developers/awesome-vibe-coding
2•dariubs•1h ago•0 comments

Show HN: LectureToBook – Turn Videos into a PDF/ePub

https://lecturetobook.com/
1•h02•1h ago•0 comments

The device detecting the deadliest creature

https://www.smh.com.au/national/nsw/the-device-detecting-the-world-s-deadliest-creature-20260715-...
3•femto•1h ago•1 comments

Inside the Secret Math Society Known Simply as Nicolas Bourbaki

https://www.quantamagazine.org/inside-the-secret-math-society-known-as-nicolas-bourbaki-20201109/
3•pykello•1h ago•0 comments

Scrying the AMD GFX1250 LLVM Tea Leaves

https://chipsandcheese.com/p/scrying-the-amd-gfx1250-llvm-tea
5•mfiguiere•1h ago•0 comments

Show HN: Zlvox – 25 Free Developer Tools (AI, JSON, PDF) with Zero Tracking

https://zlvox.com/
3•team_zlvox•1h ago•1 comments

Impro is a handbook for running a cult

https://www.seangoedecke.com/impro/
7•zuzuleinen•1h ago•1 comments

TCG Price and Portfolio Tracker

https://www.collectiblez.app/
1•GogetaUI•1h ago•0 comments