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.

A new agent-first git just dropped

https://twitter.com/madster/status/2081818173272207505
1•ripgrim•43s ago•0 comments

Quality in Software

https://rsms.me/etc/handmade-seattle-2021/
1•jonl247•52s ago•0 comments

Generate LoRA adapters from Skill.MDs *MoE-models now too

https://terradev.cloud/tessera
1•Facingsouth•58s ago•0 comments

BuzzFeed, HuffPost and Tasty to Lay Off 180 Staffers

https://www.hollywoodreporter.com/business/business-news/buzzfeed-huffpost-layoffs-1236657384/
1•minimaxir•1m ago•1 comments

US DOT deleting bike lane references

https://www.npr.org/2026/07/23/nx-s1-5900901/bike-lanes-dot-websites
1•aendruk•2m ago•0 comments

Cloudmaxxing sucks Nvidia into dangerous game

https://www.reuters.com/commentary/breakingviews/cloudmaxxing-sucks-nvidia-into-dangerous-game-20...
1•mapping365•2m ago•0 comments

Chat never deletes – video evidence

https://discuss.ai.google.dev/t/the-google-ai-overview-itself-describes-google-ai-studio-s-chat-d...
1•Bitu79•3m ago•0 comments

T-Mobile outage, no updates from the company

https://old.reddit.com/r/tmobile/comments/1v8bw52/t_mobile_outage/
2•darth_avocado•6m ago•0 comments

Using AI with a Critical Eye

https://www.loserbydesign.com/new-page-3
1•yehiaabdelm•7m ago•0 comments

Solving Fermat: Andrew Wiles

https://www.pbs.org/wgbh/nova/proof/wiles.html
1•1970-01-01•10m ago•0 comments

The Myth of the 'Waterfall' SDLC

http://www.bawiki.com/wiki/Waterfall.html
1•fanf2•11m ago•0 comments

Show HN: SilkDrop – MilkDrop port for web with live editor

https://silkdrop.vercel.app/
1•usernameis42•12m ago•0 comments

Experts warn current Starship heat shield tech is a "dead end" for rapid reuse

https://arstechnica.com/space/2026/07/despite-recent-successes-rapid-reuse-of-starship-remains-a-...
1•greedo•13m ago•1 comments

Softmax Approximation for FPGAs Using Taylor Series and Pade Approximants

https://leetarxiv.substack.com/p/approximating-softmax-for-fpgas
1•birdculture•13m ago•0 comments

Pivotick is network graph library to facilitate pivoting

https://pivotick.github.io/Pivotick/
1•adulau•14m ago•0 comments

Show HN: Latest Q2 AI SaaS Trends Report

https://relvehq.com/ai-reports/2026-q2-the-state-of-ai-for-saas-companies-fullview
1•hamza_ali_shah•16m ago•1 comments

README, not

https://blog.yossarian.net/2026/07/16/README-not
4•lr0•17m ago•2 comments

Sam Altman says we are in the singularity: 'This is the moment'

https://www.businessinsider.com/sam-altman-openai-the-singularity-agi-prediction-anthropic-nvidia...
2•doener•18m ago•2 comments

Nvidia in Talks with OpenAI to Guarantee $250B Financing for Data Center

https://www.wsj.com/tech/ai/nvidia-in-talks-with-openai-to-guarantee-250-billion-financing-for-da...
1•u1hcw9nx•18m ago•0 comments

Claude shared chats and Artifacts may have ended up on Google

https://techcrunch.com/2026/07/27/psa-your-claude-shared-chats-and-artifacts-may-have-ended-up-on...
3•speckx•25m ago•0 comments

Waymo crashes 1/3 as much as a human driver, says IIHS – with some caveats

https://electrek.co/2026/07/25/waymo-is-2-3-safer-than-a-human-driver-says-iihs-with-some-caveats/
2•Bender•25m ago•0 comments

Octane – compiled and faster React from creator of Inferno

https://octanejs.dev
1•swe_dima•26m ago•0 comments

E-bike bans in schools highlight the growing debate over freedom vs. safety

https://electrek.co/2026/07/27/e-bike-bans-in-schools-highlight-the-growing-debate-over-freedom-v...
1•Bender•28m ago•0 comments

I mapped how 140 governments legally treat Bitcoin

https://thebitcoinact.xyz/bitcoin-legal-map
1•The_Bitcoin_Act•29m ago•0 comments

Show HN: Nexmy – 100% offline Android finance tracker with local AI

https://nexmy.app/
1•BlackSharkDev•32m ago•0 comments

Show HN: A board game with opponents trained by self-play

https://mighty840.itch.io/samudra-manthan
1•sharang33•33m ago•0 comments

Show HN: Full complex text shaping and rendering on ESP32 with 320KB usable RAM

https://github.com/waruyama/flattype-cyd-demo
2•jansan•35m ago•1 comments

A political compass for AI where anyone can add their stance

https://theaicompass.io/?preview=default
1•uncommoncrawl•35m ago•0 comments

From ADHD chaos to IMPOSSIBLY productive and chill?

https://www.taskloco.com/
1•taskloco_nyc•36m ago•0 comments

RevelRaw – a Mac RAW editor that looks at the photo before suggesting presets

https://revelraw.com/
4•kernel_init•36m ago•0 comments