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•8mo ago

Comments

zoezoezoezoe•8mo 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•8mo 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.

Show HN: GitHub Action for AI/LLM Security Scanning in CI/CD

https://github.com/XSource-Sec/agent-audit-action
1•xsourcesec•6m ago•1 comments

Semantica – Open-source semantic layer and GraphRAG framework

1•kaifahmad1•7m ago•0 comments

The dumbest things that happened in tech this year

https://techcrunch.com/2025/12/31/the-dumbest-things-that-happened-in-tech-this-year/
2•jnord•8m ago•0 comments

RGB Mini-LED will transform the premium TV landscape in 2026

https://www.techradar.com/televisions/how-rgb-mini-led-will-transform-the-premium-tv-landscape-in...
1•ksec•9m ago•0 comments

Show HN: Collect and analyze Postmark Time to Inbox data

https://github.com/jonasmalacofilho/postmark-tti-histogram
1•jonasmalaco•9m ago•0 comments

China accuses Netherlands of making 'mistakes' over chipmaker Nexperia

https://www.cnbc.com/2025/12/31/china-accuses-netherlands-of-making-mistakes-over-chipmaker-nexpe...
1•jnord•10m ago•0 comments

Carnegie Mellon's Camera Lens Breakthrough Eliminates Background Photo Blur

https://hothardware.com/news/carnegie-mellon-lens-breakthrough
1•gslin•13m ago•0 comments

Show HN: Video to JPG – Extract frames in browser with blur detection

https://videotojpg.com
1•charlesding2024•20m ago•1 comments

2026 Predictions Scorecard

https://rodneybrooks.com/predictions-scorecard-2026-january-01/
1•calvinfo•23m ago•0 comments

How does Node.js load its built-in/native modules? (2021)

https://joyeecheung.github.io/blog/2021/07/06/how-does-node-js-load-its-builtins-native-modules/
1•aragonite•24m ago•0 comments

Show HN: A minimalist, ad-free alternative for receiving SMS online

1•mambazz•25m ago•0 comments

Dear Apple, Please Fix iOS Music

https://davids.town/dear-apple-please-fix-ios-music
2•DavidPiper•26m ago•0 comments

Get ready for the $5090 5090: GPU prices expected to soar next year

https://boingboing.net/2025/12/31/get-ready-for-the-5090-5090-gpu-prices-expected-to-soar-next-ye...
1•perihelions•26m ago•0 comments

Show HN: Importguard – Measure and enforce Python import-time behavior in CI

https://github.com/AryanKumar1401/importguard
1•AryanKumar1401•28m ago•0 comments

The Cost of a Closure in C: The Rest

https://thephd.dev/the-cost-of-a-closure-in-c-c2y-followup
2•ingve•29m ago•0 comments

Freestyle Linked Lists Tricks

https://nullprogram.com/blog/2025/12/31/
4•ingve•32m ago•0 comments

Washington Childcare Subsidies Raise Fraud Concerns After Minnesota Probe

https://x.com/i/trending/2005454604394222016
3•silexia•35m ago•1 comments

HTML Scratchpad

https://qeditor.dev/
1•dpweb•38m ago•0 comments

Poor sleep health is associated with older brain age

https://www.thelancet.com/journals/ebiom/article/PIIS2352-3964(25)00385-8/fulltext
2•jnord•44m ago•0 comments

Building a simple tool to help students explore income options

https://www.sidebuz.com/student-income-finder/
1•asphero•52m ago•0 comments

Taxation in a Strong AI World

https://marginalrevolution.com/marginalrevolution/2026/01/taxation-in-a-strong-ai-world.html
1•samuel246•55m ago•0 comments

'College dropout' has become the most coveted startup founder credential

https://techcrunch.com/2025/12/31/college-dropout-has-become-the-most-coveted-startup-founder-cre...
1•0in•55m ago•1 comments

SIGGRAPH2025 Advances in Real-Time Rendering: IdTech8 Global Illumination [video]

https://www.youtube.com/watch?v=VTrdeqMMMK0
1•chii•56m ago•0 comments

UCLA Distinguished Lecturer Series – Alan C. Kay, Apple Computer, April 1993 [video]

https://www.youtube.com/watch?v=P2WnZ7n4-P4
1•gjvc•58m ago•0 comments

When cheating is harder than practicing

https://www.youtube.com/watch?v=JQB8aNKyeao
2•AstroNutt•1h ago•2 comments

Aura – A Ruby-inspired declarative language for AI/ML pipelines and web apps

https://github.com/johnvteixido/aura-lang
1•johnvteixido•1h ago•1 comments

Spherical Snake

https://kevinalbs.com/spherical_snake/
1•subset•1h ago•0 comments

British ethical hacker granted rare visa after finding 'critical vulnerability

https://www.msn.com/en-ie/money/technology/brit-hacker-cracks-australian-government-site-to-prove...
2•asdefghyk•1h ago•1 comments

Real-time liquidity and contagion risk monitoring for 24/7 tokenized markets

https://patternos.com
1•CascadeGuard•1h ago•1 comments

Generating Human Faces with VAEs

https://mayberay.bearblog.dev/generating-human-faces-with-variational-autoencoders/
1•mugamuga•1h ago•0 comments