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.

Microsoft Bing AI Search Choice

https://chromewebstore.google.com/detail/microsoft-bing-ai-search/mcaabonmnmphidjfohjkdobemneigopa
1•tech234a•6s ago•0 comments

Did Gary Huber and I invent screen-space reflections on the Amiga in 1995?

https://alphapixeldev.com/screen-space-reflections-1995-world-construction-set/
2•XenonofArcticus•5m ago•1 comments

Understanding Linear Algebra [pdf]

https://scholarworks.gvsu.edu/cgi/viewcontent.cgi?article=1026&context=books
1•ibobev•5m ago•0 comments

Software gardening: can enterprise development look like industrial agriculture?

https://blog.chaoticgood.computer/content/notes/software-gardening
1•spelkington•7m ago•0 comments

Krea 3 Technical Report

https://www.krea.ai/blog/krea-3-technical-report
5•mattnewton•7m ago•1 comments

Ten cars that will last forever [video]

https://www.youtube.com/watch?v=qIz-5gO01OI
1•teleforce•8m ago•0 comments

Show HN: MyVideoStation, a morden recreation of Synology's VideoStation

1•liyu1981au•9m ago•0 comments

Terminal-Mac: A separate macOS desktop for computer-use agents in your terminal

https://github.com/govijr/terminal-mac
1•handfuloflight•10m ago•0 comments

Machinists > Tailors

https://pauldambra.dev/2026/10/machinists-not-tailors.html
2•rbaudibert•11m ago•0 comments

Show HN: A browsable gallery of Nvidia's 2,677 free SimReady 3D assets

https://simready.geronimo-labs.com/
1•g58892881•13m ago•0 comments

748 Open-source crypto trading strategies with per-stage validation report cards

https://github.com/CacheCarti/Crypto-Strategies
1•Cachecartii•16m ago•0 comments

Show HN: Business days calculator that shows which days it skipped

https://instantfreetools.com/business-days-calculator/
1•raxsoft•18m ago•0 comments

Ask HN: What is Google Flights' business model and has it changed recently?

2•lastofthemojito•19m ago•0 comments

Ask HN: How is Google's Gemini chat search so inexcusably bad?

1•gradus_ad•23m ago•1 comments

Learn Real-World Penetration Testing: Hands-On Ethical Hacking Crash Course

https://www.freecodecamp.org/news/learn-real-world-penetration-testing-hands-on-ethical-hacking-c...
1•ibobev•23m ago•0 comments

I Reverse Engineered TikTok

https://twitter.com/ayoships/status/2117650684774580249
1•redbell•24m ago•0 comments

Elastic spheres can walk on water (2016)

https://pmc.ncbi.nlm.nih.gov/articles/PMC4743002/
1•laybak•24m ago•0 comments

Show HN: Xecrets Ez – open-source mobile file encryption

https://github.com/xecrets/xecrets-mobile
1•svantex•25m ago•0 comments

TCP vs. UDP Download Speed?

https://tcp-vs-udp.com/
3•ytaudiobar•25m ago•0 comments

The Jet Programming Language

https://github.com/JetJet13/Jet/tree/main
1•jgeorgesYC•26m ago•1 comments

Show HN: Shot-butcher: iOS, ipados, macOS apps screenshot maker skill

https://graphicmeat.com/shot-butcher
1•spacecash21•26m ago•0 comments

Using Fable to one-shot weights outperforms training (97.8% vs. 94.6%)

https://twitter.com/jacsebl/status/2117606206764175543
1•nthypes•26m ago•1 comments

Superhuman Hardware Design Is the Easy Part

https://a16z.com/superhuman-hardware-design-is-the-easy-part/
1•gmays•27m ago•0 comments

Flarum 2.0 is released. Go upgrade your forum

https://discuss.flarum.org/d/40026-flarum-20-is-released-go-upgrade-your-forum
1•DASD•31m ago•1 comments

High-Speed Decision Pipelines: Jev and Prefill-Only Inference from Scratch

https://www.freecodecamp.org/news/high-speed-decision-pipelines-jev-and-prefill-only-inference-fr...
1•ibobev•31m ago•0 comments

Anthropic's annualized revenue run rate peaked back in July 2026

https://twitter.com/FinanceLancelot/status/2109024272572182722
1•g42gregory•31m ago•0 comments

Google reCAPTCHA on archive.is asking to scan a QR with a mobile device

3•linuxhdr•32m ago•0 comments

Technological Threat (1988) [video]

https://www.youtube.com/watch?v=t-IbidkpD74
1•Gravityloss•32m ago•0 comments

iPhone 18 rumors suggest a bigger battery, higher price next year

https://www.theverge.com/tech/1025748/apple-iphone-18-rumors-price-hike-battery
4•dadadavid•35m ago•0 comments

The Internals of PostgreSQL

https://www.interdb.jp/pg/index.html
9•ibobev•35m ago•0 comments