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.

Thoughts and Observations on Apple's First Immersive MLB Broadcast

https://daringfireball.net/2026/08/thoughts_and_observations_apple_immersive_mlb_broadcast
1•MBCook•59s ago•0 comments

Zero-sum thinking will fuel resentment and scarcity

https://www.ft.com/content/492134e9-49eb-4f13-b70a-b2b595ed0e2a
2•bookofjoe•1m ago•0 comments

Breaking persistent undo shows Neovim can't be trusted

https://infosec.exchange/@david_chisnall/117171776562702259
1•hoorible•2m ago•0 comments

An infinite and interactive AI generated live stream of slop

https://skunkworks.levels.io/infinite-slop/
2•smusamashah•9m ago•0 comments

DHS is using obscure law to snoop on journalists, non-profits, unions

https://www.theguardian.com/us-news/2026/aug/29/trump-dhs-1509-summons-records-journalists-nonpro...
10•firefax•11m ago•2 comments

From single call to agents: five new Claude capabilities available in MS Foundry

https://devblogs.microsoft.com/foundry/five-new-claude-capabilities-now-available-in-foundry/
2•ibobev•13m ago•0 comments

Wrapping a callable in a lambda that just calls it with the same parameters

https://devblogs.microsoft.com/oldnewthing/20260819-00/?p=112624
1•ibobev•15m ago•0 comments

The Internet Is Kind of a Predatory Cesspit Now

https://www.stephendiehl.com/posts/internet_predatory_cesspit/
41•ibobev•15m ago•9 comments

Mirror Mirror – mirror your PC screen to your phone over Wi-Fi, no cloud

https://github.com/maco30001/Mirror-Mirror
1•maco30001•16m ago•0 comments

Texas Gov. Greg Abbott says China isn't behind the anti-data-center debate

https://www.businessinsider.com/china-influence-data-center-x-greg-abbott-texas-2026-8
2•newsomix9xl•16m ago•0 comments

LLMs are making me lose my savviness

https://pgaleone.eu/ai/2026/08/29/losing-savviness/
2•me2too•17m ago•1 comments

Show HN: AI Harness that lets a graph of Codex and Claude intercommunicate

https://github.com/rysh-ai/rysh-cli-code
1•halilagin•22m ago•1 comments

Library of Automatic Hyperparameters

https://pypi.org/project/pichak/
1•olespichak•22m ago•0 comments

I wanted to find the slowest fashion imaginable: the woman growing her own dress

https://www.theguardian.com/fashion/2026/aug/29/slow-fashion-why-one-woman-growing-her-own-dress
3•mellosouls•25m ago•0 comments

A history of stealing from employer may no longer prevent being hired by FBI

https://www.cbsnews.com/news/fbi-candidates-prostitutes-theft/
5•hn_acker•25m ago•2 comments

The signal went up. The code got worse

https://github.com/olesxg/flap-findings/blob/master/writing/the-signal-went-up.md
1•olespichak•27m ago•0 comments

Sony Music and Warner Chappell Are Suing Anthropic

https://www.theverge.com/ai-artificial-intelligence/986438/sony-music-warner-chappell-anthropic-l...
5•speckx•28m ago•0 comments

Feel the tokens/s before you buy the GPU

https://llmspeed.dev/
1•albinstman•30m ago•0 comments

Fractal Jittered Voronoi Partitions

https://www.boristhebrave.com/2026/08/29/fractal-jittered-voronoi-partitions/
2•jp3141•31m ago•1 comments

Plato

https://plato.stanford.edu/entries/plato/
2•mellosouls•32m ago•0 comments

Winnow: Timeline on X, minus the bot sludge

https://winnow.sbintekamal06.chatgpt.site
1•SadiquaBinteKam•34m ago•0 comments

vLLM v0.28.0

https://github.com/vllm-project/vllm/releases/tag/v0.28.0
1•mrrrcs•34m ago•0 comments

Ship the Tool, Not the Agent

https://ttvl.co/notes/ship-the-tool-not-the-agent/
1•meetpateltech•35m ago•0 comments

Implicit Outer Joins in Join-to-One: Feature or Flaw?

https://www.salvis.com/blog/2026/08/29/implicit-outer-joins-in-join-to-one-feature-or-flaw/
2•theanonymousone•37m ago•0 comments

Is anyone else's GitHub search broken?

4•NooneAtAll3•38m ago•0 comments

NodeJAX

https://github.com/EelcoHoogendoorn/nodejax
1•sva_•39m ago•0 comments

Show HN: Procedural Droid Sounds for Microduck

https://osolmaz-microquack.static.hf.space/index.html
1•hosolmaz•40m ago•0 comments

reqwest: An easy and powerful Rust HTTP Client

https://github.com/seanmonstar/reqwest
2•tosh•42m ago•0 comments

Show HN: Lumify – sports intelligence API for agents (try without signup)

https://lumify.ai/docs/ai
2•NOpderbeck•43m ago•0 comments

Building a Markov-chain IRC bot with Python and Redis (2012)

https://charlesleifer.com/blog/building-markov-chain-irc-bot-python-and-redis/
1•jaggederest•43m ago•0 comments