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•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.

What A.I. Did to My College Class

https://www.nytimes.com/2026/05/17/opinion/chatgpt-ai-college-school-graduation.html
1•mmooss•44s ago•0 comments

Ben Affleck Banned from Hard Rock Casino When Caught Counting Cards (2014)

https://www.yahoo.com/entertainment/ben-affleck-banned-hard-rock-casino-counting-cards-223154372....
1•thunderbong•6m ago•0 comments

LLM Performance by Programming Language

https://gertlabs.com/blog/llm-performance-by-language
2•gertlabs•8m ago•1 comments

First-Ever Tokenized Space Tourism: AI and Space and Blockchain

https://cccforgc.com/
1•cccxtha•10m ago•0 comments

Archivists Turn to LLMs to Decipher Handwriting at Scale

https://spectrum.ieee.org/ai-handwriting-transcription-transkribus-lecun
1•pseudolus•11m ago•0 comments

Dot-Coms That Deliver (2001)

https://books.google.com/
1•Apocryphon•12m ago•3 comments

The American epoch of oil is collapsing. What comes next could be ugly

https://www.theguardian.com/us-news/ng-interactive/2026/may/17/america-china-energy-oil-renewables
3•nithinj•13m ago•0 comments

AI Leak Watch: 435,608 potential AI API key matches in public GitHub code

https://ai-keys-leaks.begimher.com/
1•dan_l2•14m ago•0 comments

The automation of jobs will never end

https://metastable.org/never-end/
1•pbw•18m ago•0 comments

Why Panama Is the Ideal Destination for Real Estate Investment

https://serviciosdebienesyraices.com/why-panama-is-the-ideal-destination-for-real-estate-investment
1•friwill•23m ago•0 comments

Spirit Airlines Passenger Brings 'Emotional Support' Rotisserie Chicken Thru TSA

https://viewfromthewing.com/spirit-airlines-passenger-brings-emotional-support-rotisserie-chicken...
4•rawgabbit•24m ago•0 comments

Possible atmosphere detected on small trans-Neptunian object

https://www.smithsonianmag.com/smart-news/this-tiny-celestial-body-past-pluto-shouldnt-have-an-at...
3•pavel_lishin•29m ago•0 comments

Slop Bucket Idea – a dataset of AI slop (train AI what not to do)

2•IAmNeo•40m ago•4 comments

Hubris of Timing: Why being right abt the future isnt enough to capitalize on it

https://deciens.com/press-and-insights/epistula-14-the-hubris-of-timing
2•ryan_j_naughton•42m ago•0 comments

How fast is N tokens per second really?

https://mikeveerman.github.io/tokenspeed/
5•hexagr•47m ago•1 comments

Students deserve better than COLLEGE

https://stanforddaily.com/2026/05/14/students-deserve-better-than-college/
2•johntfella•51m ago•1 comments

Show HN: Dashbuster – Replace em dashes on any website

https://chromewebstore.google.com/detail/dashbuster/pnfhimkhinoecknjhlggdbgoajcogfll
1•qainsights•1h ago•0 comments

I went inside OpenAI's secretive San Francisco headquarters

https://www.sfgate.com/tech/article/openai-san-francisco-headquarters-22259754.php
2•bryan0•1h ago•0 comments

Most Americans don't trust AI – or the people in charge of it

https://www.theverge.com/ai-artificial-intelligence/644853/pew-gallup-data-americans-dont-trust-ai
5•cdrnsf•1h ago•0 comments

Apple announced the iPhone 17e with a chip developed in Israel

https://www.jpost.com/consumerism/article-888680
6•banku_brougham•1h ago•5 comments

Show HN: How to Kill the Dead Internet

https://chromewebstore.google.com/detail/d-slop/cnjeckkgbjgfledbphbobjabnfjnheef
4•bigger_fish•1h ago•1 comments

Microsoft will let you remap the Copilot key to restore right ctrl functionality

https://support.microsoft.com/en-us/accessibility/windows/copilot/understand-updates-to-the-copil...
2•razorbeamz•1h ago•0 comments

Tracking Skyscraper-Size Asteroids, Failed Supernovas and Interstellar Visits

https://www.quantamagazine.org/rubin-tracks-skyscraper-size-asteroids-failed-supernovas-and-inter...
2•tzury•1h ago•0 comments

I built a local layer that kills Token Tax–Python lib+Chrome extension+Mac app

https://omna.dev/
1•gauravji•1h ago•0 comments

Terms of (Ab)Use: An Analysis of GenAI Services [pdf]

https://arxiv.org/abs/2603.18964
2•droidjj•1h ago•0 comments

ArXiv will ban authors for a year if they let AI do all the work

https://techcrunch.com/2026/05/16/research-repository-arxiv-will-ban-authors-for-a-year-if-they-l...
2•0in•1h ago•0 comments

Signex: AI-first EDA, KiCad-compatible schematic and PCB editor built in Rust

https://github.com/alplabai/signex
2•Onavo•1h ago•0 comments

Tie Club

https://martin-baker.com/tie-club/
2•prawn•1h ago•0 comments

Yum Brands, Nvidia will deploy new AI at 500 restaurants

https://www.restaurantdive.com/news/yum-brands-nvidia-ai-taco-bell-pizza-hut-kfc-deal/742926/
2•littlexsparkee•1h ago•2 comments

pocket – A dead-simple file clipboard for your terminal

https://github.com/pasc4le-ai-sandbox/pocket
2•pasc4le•2h ago•0 comments