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.

The A.I.s Are Already Out of Control

https://www.nytimes.com/2026/08/18/opinion/ezra-klein-podcast-helen-toner.html
1•jlev1•1m ago•1 comments

Anthropic crossed 40% of ARR from indirect channels

https://twitter.com/SemiAnalysis_/status/2089714350164492652
1•porridgeraisin•2m ago•0 comments

Show HN: Obidos – self-hosted secrets storage and sharing with fine-grained ACLs

https://github.com/spenego/Obidos
1•spenegosoftware•2m ago•0 comments

Remote work benefits are much bigger than a paycheck

https://thehill.com/opinion/technology/6033665-economic-value-personal-time-salary/
3•madihaa•3m ago•0 comments

Interfaces Cheat Sheet

https://interfaces.dev/cheat-sheet
1•thm•3m ago•0 comments

Show HN: Shoehorn – Quantize any model down to run on your machine

https://notactuallytreyanastasio.github.io/shoehorn/
1•rhgraysonii•4m ago•0 comments

How to build Online Stores Effectively in 2026

https://shopi.lk/blog/woocommerce-vs-ai-ecommerce-website-sri-lanka-2026/
1•ruzny-ramzan•5m ago•0 comments

Ask HN: Can I realistically make an app as a junior dev?

1•brooke1•6m ago•1 comments

StockHuntr, chat with SEC filings and get cited answers (free)

https://www.stockhuntr.net
1•KylieM•7m ago•0 comments

Human Agents

https://docs.ojin.ai
1•arbayi•8m ago•0 comments

Supper Cool Doodle Characters

https://github.com/albertobeiz/kindergrimm
1•boveyking•9m ago•0 comments

Muse Glimmer is a memory hierarchy disguised as a 30B Transformer

https://abstractextraordinary.com/blog/how-muse-glimmer-fits-an-agent-on-your-device/
2•stepnivlk•9m ago•0 comments

Firefox and Exa Partnership

https://blog.mozilla.org/en/firefox/firefox-exa-partnership/
2•pentagrama•10m ago•0 comments

Smaller Images for the Web

https://milofultz.com/2026-08-06-smaller-images-for-the-web.html
1•surprisetalk•10m ago•0 comments

Will you be wearing an exoskeleton in ten years?

https://www.nature.com/articles/d41586-026-02527-z
1•sohkamyung•11m ago•0 comments

One Video Per Day – An intentional alternative to infinite feeds

https://www.onevideoperday.com
1•flingflangflode•11m ago•0 comments

Show HN: CSS-in-JS Arena Bamboo, StyleX and Panda on Pixel-Identical Apps

https://github.com/gajus/css-in-js-arena
1•gajus•12m ago•0 comments

Show HN: Spyc – a vi-driven terminal file commander for your coding agents

https://github.com/Tripstack-Corp/spyc
1•agentdrek•12m ago•1 comments

Protein Slop Took over the Supermarket

https://thedailyunemployed.com/articles/how-protein-slop-took-over-the-supermarket
1•mikelgan•12m ago•2 comments

CDC: U.S. kindergarten vaccine exemptions hit record high as coverage falls

https://abc45.com/news/nation-world/cdc-us-kindergarten-vaccine-exemptions-hit-record-high-as-cov...
2•keploy•12m ago•0 comments

These Mammoth Ivory Carvings May Be the "Find of the Year"

https://nautil.us/these-mammoth-ivory-carvings-may-be-the-find-of-the-year-1283903
2•Brajeshwar•12m ago•0 comments

Music Theory for Programmers

https://runjs.app/blog/music-theory-for-programmers
1•lukehaas•13m ago•1 comments

Perplexity's free AI offer left it with millions more users in India

https://techcrunch.com/2026/08/18/perplexitys-free-ai-offer-left-it-with-millions-more-users-in-i...
1•speckx•13m ago•0 comments

She told no one about her agony except ChatGPT. What her death reveals about AI

https://www.npr.org/2026/08/18/nx-s1-5929575/ai-suicide-risks-mental-health
1•mttjj•14m ago•0 comments

ABC Files First Amendment Lawsuit Against FCC

https://variety.com/2026/tv/news/abc-first-amendment-lawsuit-fcc-1236837028/
3•keploy•15m ago•1 comments

Tie Club

https://martin-baker.com/tie-club/
1•neom•16m ago•0 comments

AI Memory for Claude: An Honest 4-Way Comparison

https://labyrinthanalyticsconsulting.com/blog/claude-memory-primitive-vs-loreconvo-vs-claude-mem-...
1•labyrinthAC•16m ago•0 comments

Shield (Font)

https://shieldfont.org/
1•mooreds•17m ago•0 comments

Show HN: Coalent – an LLM answer cache that invalidates when source docs change

https://github.com/Vectorlink-Labs/coalent
1•nisarg-pujara•17m ago•0 comments

David Hayes: Boring Software, Clear Incentives, and Better Checklists [audio]

https://maintainable.fm/episodes/david-hayes-boring-software-clear-incentives-and-better-checklists
1•mooreds•18m ago•0 comments