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.

Make every row and column a group of three

https://sixfold.pwheslop.com
1•michaelbrooks•58s ago•1 comments

Java was a three-day hotfix away from dying horribly on stage

https://www.theregister.com/devops/2026/07/18/java-was-a-three-day-hotfix-away-from-dying-horribl...
1•beardyw•1m ago•0 comments

Show HN: GeoIcons – Country and region map icons as tree-shakable components

https://geoicons.io
1•takencoder•2m ago•0 comments

Write with Maximum Effort

https://petegleeson.com/blog/write-with-maximum-effort/
1•petegleeson•9m ago•0 comments

GEMM Performance Measurement Methodology Guidelines

https://docs.nvidia.com/cutlass/latest/media/docs/cpp/gemm_performance_measurement_methodology_gu...
1•matt_d•13m ago•0 comments

Faster Algorithms for Structured Matrix Multiplication via Flip Graph Search

https://dl.acm.org/doi/10.1145/3815436.3815455
1•matt_d•14m ago•0 comments

International Math Olympiad 2026 Results

https://www.imo2026.com/Results/Individual_Results.htm
1•pykello•15m ago•0 comments

I'm Done with Mullvad

https://moonwriting.blog/i-m-done-with-mullvad
2•lylo•19m ago•0 comments

Vibecoded Scheme Implementation

https://kaappi-lang.org/
1•baijum•20m ago•0 comments

Nolan's Odyssey – A technical analysis by a nitpicky Classics student

https://earlrambles.pagecord.com/nolans-odyssey-a-very-technical-analysis-by-a-very-nitpicky-clas...
2•lylo•20m ago•0 comments

Show HN: Fluxnation, the Fastest FLUX.1 Execution Kernel

https://github.com/ULT7RA/FLUXNATION
1•KnoxProtocol•22m ago•0 comments

Taking OCaml and Eio for a Spin

https://mattjhall.co.uk/posts/taking-ocaml-eio-for-a-spin.html
1•mattjhall•25m ago•0 comments

The Java Story | Official Documentary

https://www.youtube.com/watch?v=ZqGSg4b_cZA
2•doppp•25m ago•0 comments

Distro Fighter – web browser game

https://distrofighter.com/
1•ashitlerferad•25m ago•0 comments

Swedbank fined $50M by New York authorities over Panama Papers revelations

https://www.icij.org/investigations/panama-papers/swedbank-fined-50-million-by-new-york-authoriti...
1•robtherobber•27m ago•0 comments

Show HN: Tool to help old Java projects not on modern build systems

https://maven-tools.mohants.com/
1•pmg1991•28m ago•0 comments

Show HN: GeoChess – open-source geography strategy game

https://geochess.org
1•spider-hand•29m ago•0 comments

How much of your workweek goes the way you expected? [pdf]

https://www.microsoft.com/en-us/research/wp-content/uploads/2024/11/Time-Warp-Developer-Productiv...
1•akarshhegde18•30m ago•0 comments

The M5Stack Tab5

https://taoofmac.com/space/reviews/2026/07/18/1920
1•rcarmo•35m ago•0 comments

Ask HN: Are there any new competitors to Google search in 2026?

1•roschdal•43m ago•2 comments

EU Exempts Apple Watch and AirPods from Battery Removal Requirements

https://mjtsai.com/blog/2026/07/17/eu-exempts-apple-watch-and-airpods-from-battery-removal-requir...
5•miohtama•47m ago•2 comments

AI Watermark Evidence Fails Forensic Readiness: An Empirical Evaluation

https://arxiv.org/abs/2607.16010
1•sbulaev•50m ago•0 comments

A Lunch Conversation Changed My Website

https://ammar-najjar.com/blog/rebuilding-website-astro/
1•ammarnajjar•51m ago•0 comments

Is there even a ground-truth for LLMs' internal representations?

https://www.lesswrong.com/posts/EetjXEwjR2eun2mAc/is-there-even-a-ground-truth-for-llms-internal
2•joozio•55m ago•0 comments

PixelSat I Software Part 3: Onboard Computer

https://www.projectpixelorbital.com/software-3/
1•aadishv•56m ago•0 comments

I compared 5 AI coding subscriptions by pricing model and usage limits

https://canopywave.com/blog/best-ai-coding-plans-2026-pricing-limits-use-cases
2•Rossmax•58m ago•0 comments

Britain: A Cautionary Tale for America

https://www.noahpinion.blog/p/the-uk-is-a-cautionary-tale-for-the
4•barry-cotter•1h ago•1 comments

Claude Fable 5 on your plan

https://support.claude.com/en/articles/15424964-claude-fable-5-on-your-plan
5•tidbeck•1h ago•1 comments

Notes from Inside China's AI Labs

https://www.interconnects.ai/p/notes-from-inside-chinas-ai-labs
2•hunglee2•1h ago•0 comments

The Jacobian Conjecture Is False per Anthropic

https://old.reddit.com/r/math/comments/1v1aix1/the_jacobian_conjecture_is_false_per_anthropic/
3•georgeven•1h ago•0 comments