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.

Anyone else get a vague GitHub shakedown notice?

https://lists.osgeo.org/pipermail/qgis-developer/2026-July/068430.html
1•jjgreen•1m ago•0 comments

Why don't schools teach debugging? (2014)

http://danluu.com/teach-debugging/
1•bmacho•1m ago•0 comments

Why It's So Hard to Break John Deere's Control over Farming

https://www.thebignewsletter.com/p/youll-own-nothing-and-be-happy-why
1•toomuchtodo•4m ago•1 comments

I spent a week using the Trump phone – it sucks

https://www.theverge.com/tech/963382/trump-mobile-t1-phone-review
1•sphars•6m ago•0 comments

"You and Your Research" (1986)

https://www.cs.virginia.edu/~robins/YouAndYourResearch.html
2•chistev•7m ago•0 comments

Eight facts about air conditioning amid an overheated global debate

https://www.carbonbrief.org/eight-facts-about-air-conditioning-amid-an-overheated-global-debate/
2•DamonHD•8m ago•1 comments

SpawnWP – self-hosted, disposable WordPress dev environments

https://spawnwp.com/
1•Samurainovizio•8m ago•0 comments

The tech of 'Terminator 2' – an oral history (2017)

https://vfxblog.com/2017/08/23/the-tech-of-terminator-2-an-oral-history/
1•markus_zhang•10m ago•0 comments

An unusual way for your DHCP server to run out of dynamic IPs

https://utcc.utoronto.ca/~cks/space/blog/sysadmin/DHCPServerAndScreamingHost
2•speckx•11m ago•0 comments

OS Is Life

https://blog.ptidej.net/os-is-life/
1•viniciusmioto•12m ago•0 comments

Trump blitzed by Wall Street Journal for 'destroying US jobs and raising prices'

https://www.msn.com/en-us/news/politics/trump-blitzed-by-wall-street-journal-for-destroying-us-jo...
4•petethomas•13m ago•0 comments

Unturned's Source Code Released

https://blog.smartlydressedgames.com/posts/2026-07-07-unturned-source-code-released/
2•skibz•17m ago•0 comments

Dataportability.org – Share and remix data using open standards (2008-)

https://web.archive.org/web/20090723171111/http://www.dataportability.org/
1•mxmilkiib•17m ago•0 comments

OpenAI CEO of Applications Fidji Simo steps down due to chronic illness

https://twitter.com/fidjissimo/status/2075353170927304861
1•HedonicEscal8r•18m ago•1 comments

Memory is needed for more than just weights

https://www.lttlabs.com/articles/2026/07/10/llm-quantization-part-2-youre-gonna-need-a-bigger-vram
1•LabsLucas•19m ago•0 comments

Snails' Teeth Beats Spider Silk as Nature's Strongest Material

https://www.smithsonianmag.com/smart-news/spider-silk-loses-top-spot-natures-strongest-material-s...
12•simonebrunozzi•20m ago•5 comments

Building Kafka-Less Data Integration Pipelines with Debezium

https://debezium.io/blog/2026/07/06/kafka-less-migration/
1•eigenBasis•20m ago•0 comments

Where Is Karpathy?

2•rstagi•21m ago•0 comments

Parsing DASH/HLS segments as one stream: useful hints

https://media-analyzer.pro/blog/posts/2026-07-08-analyzing-dash-hls-segments
1•ksh2u•21m ago•0 comments

Vibe coded AI Neovim is useful

https://github.com/s2xon/aeovim
1•s2xon•22m ago•0 comments

Into big air: paragliding's extreme frontier

https://www.msn.com/en-us/travel/news/into-big-air-paraglidings-extreme-frontier/ar-AA27DmVS
1•Stratoscope•23m ago•0 comments

Apple Payout Schedule 2026–2028

https://lastapp.ai/content/apple-payout-schedule
1•kumarm•24m ago•0 comments

3D Printed Scooter Fits in Your Luggage

https://hackaday.com/2026/07/10/3d-printed-scooter-fits-in-your-luggage-some-assembly-required/
2•kristianpaul•25m ago•0 comments

'Are Most People Liars and Fakes?'

https://www.ask-polly.com/p/are-most-people-liars-and-fakes
1•casca•25m ago•1 comments

Iac – local message board for agent fleets; blocking recv is the wakeup

https://github.com/Anode1/iac
1•siberean•27m ago•0 comments

An Engineer's Guide to USB Typе-С

https://www.ti.com/lit/eb/slyy228/slyy228.pdf?ts=1759892558029
1•gregsadetsky•27m ago•0 comments

LineageOS now has a web installer

https://manualdousuario.net/en/lineageos-web-installer/
2•speckx•29m ago•1 comments

SpaceX – AI Satellite

https://www.spacex.com/spacexai/starmind
1•johntb86•29m ago•2 comments

FreedomLang – native x86-64 HTTP with no libc / no CRT

https://github.com/DO-SAY-GO/freelang/blob/main/examples/HTTPD.md
1•keepamovin•32m ago•0 comments

Repeated Azure VM deployments split into operational lineages

https://webbynode.com/articles/repeated-azure-deployments-split-into-operational-lineages
1•gsgreen•33m ago•0 comments