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.

Hiring Breakpoints

https://staysaasy.com/hiring-breakpoints/
1•zdw•28s ago•0 comments

Show HN: Bun-install – Global CLI installer for Bun with local monorepo support

https://github.com/joeycumines/bun-install
1•joeycumines•1m ago•0 comments

What do you want from AI

https://www.anthropic.com/research/your-thoughts-on-ai
1•benwen•3m ago•0 comments

Mass exploitation of Citrix NetScaler: What we currently know

https://www.cybersecuritydive.com/news/exploitation-citrix-netscaler-what-we-know/831780/
1•wicket•5m ago•0 comments

C++ Insights – See your source code with the eyes of a Compiler

https://github.com/andreasfertig/cppinsights
1•rramadass•5m ago•1 comments

Show HN: Grist, open source coding harness

https://grist.lol/
1•pranav6226•21m ago•0 comments

What is zero-knowledge, end-to-end encryption?

https://blog.mega.io/what-is-zero-knowledge-end-to-end-encryption
4•devonnull•25m ago•0 comments

Noodle AI Bots Mac App

https://usenoodle.app/
1•handfuloflight•28m ago•0 comments

A fifth of Swiss Alpine ice has vanished in five years

https://www.swissinfo.ch/eng/glaciers-permafrost/a-fifth-of-swiss-alpine-ice-has-vanished-in-five...
4•Teever•31m ago•0 comments

Show HN: Pyxel – A Python retro game engine with built-in art and sound editors

https://github.com/kitao/pyxel
1•kitao•32m ago•0 comments

The Softmax function and its derivative

https://eli.thegreenplace.net/2016/the-softmax-function-and-its-derivative/
1•costco•34m ago•0 comments

Tiny Brutalism

https://placeholders.itch.io/tiny-brutalism
1•abetusk•35m ago•0 comments

Show HN: Shootsolo – a free camera app for filming yourself without a crew

https://shootsolo.com/
1•KarimMuhtar•36m ago•0 comments

Butterflies use optical illusions to dodge predators

https://www.essex.ac.uk/news/2026/09/30/butterflies-use-optical-illusions-to-dodge-predators
3•gmays•43m ago•0 comments

Personal Computing 2.0: It's time for a personal computing revolution

https://ideas.imbue.com/p/personal-computing-20
5•raybb•44m ago•1 comments

LibDragon (N64): Explicit Anti-AI Contributor Stance (GitHub Issue)

https://github.com/DragonMinded/libdragon/issues/1012
3•some-guy•47m ago•1 comments

Several vulnerabilities have been discovered in the Linux kernel

https://lwn.net/Articles/1097401/
4•luispa•48m ago•1 comments

DoGBench: The first user-facing docs generation benchmark. No model scores >50%

https://dogbench.ai/
3•prithvi2206•48m ago•1 comments

LiveNerf Adopts MIT License

https://github.com/ninjahawk/livenerf/discussions/13
1•ninjahawk1•48m ago•0 comments

Show HN: I built a better way to browse and filter the NYT's 100 Best TV Shows

https://100besttvshows.madebyaqua.com/
1•felixding•49m ago•0 comments

Llmtobinary – a potential way to make LLMs generate machine code

https://llmtobinary.com/
1•thomasfromcdnjs•51m ago•0 comments

California issues investigative subpoena to OpenAI over rogue agents' hacking

https://www.theguardian.com/us-news/2026/oct/01/california-opens-investigation-openai-hack
3•sbulaev•51m ago•0 comments

DockTerm: A notch mascot that tells you when Claude Code needs you

https://github.com/munvard/dockterm
1•moonlabs•52m ago•0 comments

Show HN: Proteus – Can DeepSeek Harness evolve itself to handle audio?

https://proteus-evolve.github.io/dsh-self-improvement.html
1•easonlu1017•53m ago•0 comments

Threadline: Open-Web Community and Identity Infrastructure

https://threadline-api-delta.vercel.app/
2•BillStan•54m ago•0 comments

Show HN: Pair.nvim – Agent assistance while staying in the codebase

https://github.com/sampsn/pair.nvim
1•sampsn•54m ago•0 comments

Show HN: Proteus – A framework for harnesses that evolve their own source

https://github.com/proteus-evolve/Proteus
1•easonlu1017•55m ago•0 comments

EUV Photomasks Are Getting Bigger [video]

https://www.youtube.com/watch?v=B7KcQ2yE6pM
1•mfiguiere•57m ago•0 comments

Apple's smart home camera reportedly won't record video

https://www.theapplepost.com/2026/10/01/72882/apples-smart-home-camera-reportedly-wont-record-video/
7•mikelgan•58m ago•1 comments

Auth factory – identity management running on Cloudflare

https://workos-demo-2en.pages.dev
1•measurablefunc•1h ago•0 comments