frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

Avoid Continue

https://www.teamten.com/lawrence/programming/avoid-continue.html
2•todsacerdoti•2mo ago

Comments

zoezoezoezoe•2mo 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•2mo 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.

ECC SystemVerilog Generator

https://github.com/siliscale/ECC-SV_Generator
1•marcux95•31s ago•0 comments

Migrating the Jira Database Platform to AWS Aurora

https://www.atlassian.com/blog/atlassian-engineering/migrating-jira-database-platform-to-aws-aurora
1•defrost•7m ago•0 comments

She Wanted to Save the World from A.I. Then the Killings Started

https://www.nytimes.com/2025/07/06/business/ziz-lasota-zizians-rationalists.html
2•davidklemke•10m ago•1 comments

New Intel E610 NICs Shown for Low Power 10Gbase-T and 2.5GbE

https://www.servethehome.com/new-intel-e610-nics-shown-for-low-power-10gbase-t-and-2-5gbe/
1•ksec•15m ago•1 comments

Apple Lisa conversion to Macintosh XL Do-it-Yourself Guide (1990) [pdf]

https://mirrors.apple2.org.za/ftp.apple.asimov.net/documentation/applelisa/Lisa_Do-It-Yourself_Guide.pdf
2•gscott•21m ago•1 comments

OpenBSD on the 2020 M1 MacBook Air (2022)

http://kernelpanic.life/hardware/openbsd-m1-macbook-air.html
3•bradley_taunt•23m ago•0 comments

The Human Use of Human Beings

https://en.wikipedia.org/wiki/The_Human_Use_of_Human_Beings
2•downboots•28m ago•0 comments

Waterbot – a discord bot that controls pins on a raspberry with natural language

https://github.com/fclaude/waterbot
2•fclaude•28m ago•0 comments

Anthropic wins key US ruling on AI training in authors' copyright lawsuit

https://www.reuters.com/legal/litigation/anthropic-wins-key-ruling-ai-authors-copyright-lawsuit-2025-06-24/
5•pyman•37m ago•2 comments

Free AI Hiring Demo – Paraform

https://paraform-genie-magic.lovable.app/
2•lkhoshnevis•40m ago•1 comments

One Year with a Framework Laptop 16 and Fedora KDE Plasma Desktop

https://linhpham.org/blog/2025/one-year-with-framework-laptop-16-fedora-kde-desktop/
2•nmstoker•43m ago•0 comments

Plasma 6.4 Wayland vs. X11, processor and power benchmarks

https://www.dedoimedo.com/computers/plasma-6-4-performance-wayland-x11-power-cpu-kernel.html
3•airhangerf15•43m ago•0 comments

The Dangers of AI Personalization

https://time.com/7296719/ai-personalization-harm-essay/
2•malshe•44m ago•0 comments

The Mental Model of Server Components

https://saewitz.com/the-mental-model-of-server-components
2•PaulHoule•48m ago•0 comments

Show HN: A pure photo collage tool

https://imagesplitter.org/merge-images
2•panyanyany•49m ago•0 comments

Attabotics CEO on devastating week that brought bankruptcy

https://retailtechinnovationhub.com/home/2025/7/6/attabotics-ceo-scott-gravelle-opens-up-about-devastating-week-that-saw-bankruptcy-and-tesco-deal
9•bcantrill•53m ago•3 comments

Show HN: A Language Server Implementation for SystemD Unit Files

https://github.com/JFryy/systemd-lsp
2•arandomhuman•58m ago•0 comments

Self-Cleaning Ants

https://gbragafibra.github.io/2025/07/06/collatz_ant6.html
3•Fibra•1h ago•0 comments

Show HN: WhatsApp Contact Exporter

https://chromewebstore.google.com/detail/whatsapp-contact-exporter/dlplljmhphnabhmlhjplfgpakefmfhho
2•qwikhost•1h ago•0 comments

Weedkiller ingredient widely used in US can damage organs and gut bacteria

https://www.theguardian.com/environment/2025/jul/06/weedkiller-diquat-organ-damage-study
4•vinni2•1h ago•0 comments

I built a free website for remote workers to find laptop friendly coffee shops

https://studynearme.com/
2•kicksent•1h ago•1 comments

I spent $80 and 14 hours to build this, welcome to my new website!

https://chiraga.io/blog/welcome/
2•chiragagrawal93•1h ago•0 comments

Are Language Models strategic or parrots?

https://www.kennethpayne.uk/p/are-language-models-strategic-or
2•car•1h ago•0 comments

Ask HN: Has AWS ever surprised you with a bill?

3•noway_bro•1h ago•0 comments

U.S. Insurers Are Refusing to Cover Climate Change Risk Zones

https://oilprice.com/Energy/Energy-General/US-Insurers-Are-Refusing-to-Cover-Climate-Change-Risk-Zones.html
7•toomuchtodo•1h ago•3 comments

Pangu's Sorrow: The Sorrow and Darkness of Huawei's Noah Pangu LLM R&D Process

https://github.com/moonlightelite/True-Story-of-Pangu/blob/main/README.md
3•guardiangod•1h ago•0 comments

Sandboxes? In my process? It's more likely than you think

https://dadrian.io/blog/posts/memory-safety-and-sandboxes/
2•dadrian•1h ago•0 comments

Ask HN: How is the tech scene in LA?

4•asdev•1h ago•0 comments

Wutopia Lab designs bookshop in China to resemble inside of teapot

https://www.dezeen.com/2025/03/01/wutopia-lab-ceramic-pages-bookshop/
2•neom•1h ago•1 comments

CalyxOS Community update – our progress after the release of Android 16

https://calyxos.org/news/2025/06/26/community-update-android-16/
2•pabs3•1h ago•0 comments