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

Comments

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

Draining wetlands produces substantial emissions in the Canadian Prairies

https://theconversation.com/draining-wetlands-produces-substantial-emissions-in-the-canadian-prai...
1•PaulHoule•3m ago•0 comments

Feather – Draw in 3D

https://www.feather.art/
1•eustoria•3m ago•0 comments

Show HN: Turning 2D floor plans into 3D-ready JSON with Detectron2

https://www.loom.com/share/b741bc127c814db395832b01bd086e96
1•acaciabengo•4m ago•0 comments

Explain to Issue Reporter

https://github.com/fsprojects/fantomas/issues/1704
1•debugnik•4m ago•0 comments

Brave Search API now features Place Search, a new endpoint for map applications

https://brave.com/blog/place-search-api/
4•w0ts0n•5m ago•0 comments

Launch HN: Cardboard (YC W26) – Agentic video editor

https://www.usecardboard.com/
1•sxmawl•5m ago•0 comments

We Built a Video Rendering Engine by Lying to the Browser About What Time It Is

https://blog.replit.com/browsers-dont-want-to-be-cameras
1•cbrewster•6m ago•0 comments

OsmAnd's Faster Offline Navigation

https://osmand.net/blog/fast-routing/
2•todsacerdoti•6m ago•1 comments

AirSnitch: Demystifying and Breaking Client Isolation in Wi-Fi Networks

https://www.ndss-symposium.org/ndss-paper/airsnitch-demystifying-and-breaking-client-isolation-in...
1•todsacerdoti•6m ago•0 comments

People Leaving US

https://trendslates.substack.com/p/teen-ai-usage-amazon-alleged-price
1•faderisimo•8m ago•0 comments

My accepted research work on 'Failure-Aware Security Framework'

https://papers.ssrn.com/sol3/papers.cfm?abstract_id=6122687
1•sandhyavinjam•9m ago•0 comments

Bring Your Own Agent (BYOA)

https://blog.val.town/byoa
1•stevekrouse•10m ago•0 comments

Attacking Russia's Center of Gravity: A Clausewitzian Answer

https://www.militarystrategymagazine.com/article/attacking-russias-center-of-gravity-a-clausewitz...
1•bryanrasmussen•11m ago•0 comments

Human Made: The Pledge

https://lee-phillips.org/humanmade/
1•leephillips•13m ago•0 comments

GitHub Actions is left vulnerable to supply chain attacks: Datadog Report

https://www.datadoghq.com/state-of-devsecops/
2•varunsharma07•13m ago•0 comments

How Google Killed the Rent-a-Domain Era

https://growtika.com/blog/publisher-affiliate-collapse
1•Growtika•13m ago•0 comments

Show HN: Karta – Google Search, for discovering talent

https://www.karta.works
1•kidustiliksew•14m ago•0 comments

Smallest transformer that can add two 10-digit numbers

https://github.com/anadim/AdderBoard
1•ks2048•14m ago•0 comments

A Visual Guide to DNA Sequencing

https://www.asimov.press/p/dna-sequencing
1•mailyk•14m ago•0 comments

He saw an abandoned trailer. Then, uncovered a surveillance network

https://calmatters.org/justice/2026/02/alpr-border-patrol-caltrans/
10•Element_•17m ago•2 comments

Show HN: I built a local AI-powered Ouija board with a fine-tuned 3B model

https://github.com/SurceBeats/Planchette
3•SurceBeats•17m ago•2 comments

Using AI without losing skills

https://manafov.co/posts/using-ai-without-losing-skills
2•airbridgeflyer•19m ago•0 comments

Hyper: a reactive server side rendered web framework for Clojure

https://github.com/dynamic-alpha/hyper
2•rschmukler•19m ago•1 comments

Trump, seeking executive power over elections, is urged to declare emergency

https://www.washingtonpost.com/politics/2026/02/26/trump-elections-executive-order-activists/
3•martialg•20m ago•0 comments

TikTok, X link organiser for iOS and Android

https://saveforlater.pro
2•aria-sfl•22m ago•0 comments

Towards a Sovereign Mobile Stack

https://modal.cx/blog/sovereign-mobile-stack/
3•tomwas54•22m ago•0 comments

Show HN: Protection Against Zero-Day Cyber Attacks

2•gaurav1086•23m ago•0 comments

Anthropic is giving Claude Opus 3 its own Substack

https://substack.com/home/post/p-189177740
3•luispa•23m ago•1 comments

4Chan knew about Jeffrey Epstein's death 38 minutes before the rest of the world

https://www.businessinsider.com/epstein-files-show-fbi-probed-4chan-posts-prison-death-2026-2
7•cwwc•23m ago•0 comments

Ask HN: How are you handling EU AI Act compliance as a developer?

1•gibs-dev•24m ago•0 comments