frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Growing up in “404 Not Found”: China's nuclear city in the Gobi Desert

https://substack.com/inbox/post/182743659
504•Vincent_Yan404•12h ago•192 comments

Calendar

https://neatnik.net/calendar/?year=2026
787•twapi•14h ago•101 comments

tc-ematch(8) extended matches for use with "basic", "cgroup" or "flow" filters

https://man7.org/linux/man-pages/man8/tc-ematch.8.html
17•hamonrye•2h ago•0 comments

Building a macOS app to know when my Mac is thermal throttling

https://stanislas.blog/2025/12/macos-thermal-throttling-app/
124•angristan•7h ago•54 comments

Replacing JavaScript with Just HTML

https://www.htmhell.dev/adventcalendar/2025/27/
594•soheilpro•17h ago•221 comments

Designing Predictable LLM-Verifier Systems for Formal Method Guarantee

https://arxiv.org/abs/2512.02080
23•PaulHoule•4h ago•2 comments

Never Use Pixelation to Hide Sensitive Text (2014)

https://dheera.net/posts/20140725-why-you-should-never-use-pixelation/
61•basilikum•1w ago•15 comments

One year of keeping a tada list

https://www.ducktyped.org/p/one-year-of-keeping-a-tada-list
149•egonschiele•6d ago•43 comments

Learn computer graphics from scratch and for free

https://www.scratchapixel.com
49•theusus•7h ago•1 comments

A "Prime" View of HN

https://dosaygo-studio.github.io/prime-news/index.html
27•keepamovin•1h ago•20 comments

We "solved" C10K years ago yet we keep reinventing it (2003)

https://www.kegel.com/c10k.html
58•birdculture•2d ago•27 comments

Floor796

https://floor796.com/
907•krtkush•1d ago•109 comments

Streaming Uploads with LiveView

https://fly.io/phoenix-files/streaming-uploads-with-liveview/
18•m5r•6d ago•2 comments

Rex is a safe kernel extension framework that allows Rust in the place of eBPF

https://github.com/rex-rs/rex
118•zdw•5d ago•56 comments

How we lost communication to entertainment

https://ploum.net/2025-12-15-communication-entertainment.html
606•8organicbits•22h ago•336 comments

Fathers’ choices may be packaged and passed down in sperm RNA

https://www.quantamagazine.org/how-dads-fitness-may-be-packaged-and-passed-down-in-sperm-rna-2025...
263•vismit2000•17h ago•158 comments

Langfuse (YC W23) Is Hiring in Berlin, Germany

https://langfuse.com/careers
1•clemo_ra•7h ago

Hungry Fat Cells Could Someday Starve Cancer

https://www.ucsf.edu/news/2025/01/429411/how-hungry-fat-cells-could-someday-starve-cancer-death
107•mrtnmrtn•8h ago•26 comments

Last Year on My Mac: Look Back in Disbelief

https://eclecticlight.co/2025/12/28/last-year-on-my-mac-look-back-in-disbelief/
266•vitosartori•8h ago•190 comments

Gpg.fail

https://gpg.fail
415•todsacerdoti•1d ago•249 comments

Dialtone – AOL 3.0 Server

https://dialtone.live/
91•rickcarlino•15h ago•45 comments

Rainbow Six Siege hacked as players get billions of credits and random bans

https://www.shanethegamer.com/esports-news/rainbow-six-siege-hacked-global-server-outage/
259•erhuve•23h ago•118 comments

Global Memory Shortage Crisis: Market Analysis

https://www.idc.com/resource-center/blog/global-memory-shortage-crisis-market-analysis-and-the-po...
3•naves•3h ago•0 comments

Functional programming and reliability: ADTs, safety, critical infrastructure

https://blog.rastrian.dev/post/why-reliability-demands-functional-programming-adts-safety-and-cri...
126•rastrian•18h ago•127 comments

The Origins of APL (1974) [video]

https://www.youtube.com/watch?v=8kUQWuK1L4w
51•ofalkaed•6d ago•8 comments

Deathbed Advice/Regret

https://hazn.com/deathbed-regret
15•paulpauper•1h ago•8 comments

Ask HN: Best Podcasts of 2025?

22•adriancooney•4h ago•14 comments

Project Vend: Phase Two

https://www.anthropic.com/research/project-vend-2
173•kubami•6d ago•71 comments

Liberating Bluetooth on the ESP32

https://exquisite.tube/w/mEzF442Q4hUXnhQ8HmfZuq
122•todsacerdoti•20h ago•21 comments

Windows 2 for the Apricot PC/Xi

https://www.ninakalinina.com/notes/win2apri/
154•todsacerdoti•1d ago•37 comments
Open in hackernews

Using tests as a debugging tool for logic errors

https://www.qodo.ai/blog/java-unit-testing-how-to-use-tests-as-a-debugging-tool-for-logic-errors/
38•simplesort•7mo ago

Comments

recroad•7mo ago
This article seems like a very long-winded and complicated way to say that we should write tests. Am I missing something here? Wouldn't most developers write tests when creating algorithms, let alone something relating to finance as tax calculations? Yes, you should reproduce a defect by writing a failing tests first.

Where I hoped/thought this piece would go was to expand on the idea of error-prone[1] and apply it to the runtime.

https://github.com/google/error-prone

simplesort•7mo ago
I thought it was interesting - not revolutionary but updated my thinking a bit.

Writing a failing test that reproduces a bug is something I learned pretty early on.

But I never consciously thought about and approached the test as a way to debug. I thought about it more of a TDD way - first write tests, then go off and debug/code until the test is green. Also practically, let's fill the gap in coverage and make sure this thing never happens again, especially if I had to deal with it on the weekend.

What was interesting to me about this was actively approaching the test as a way of debugging, designing it to give you useful information and using the test in conjunction with debugger

whynotmaybe•7mo ago
I'm happy for you that you learned something and sad for me because you made me feel old and stupid.

I tend to forget that people don't know stuff I learned decades ago and consider them as general knowledge.

Before TDD became what it was, we used to create specific files for specific bug cases, or even get the files from the users themselves.

JadeNB•7mo ago
> I tend to forget that people don't know stuff I learned decades ago and consider them as general knowledge.

While all of us who are lucky to be around long enough meet the problem of general knowledge changing under our feet, it's hard for me to imagine how saying this to someone can be a productive contribution to the conversation. What can it accomplish other than making someone feel worse for not knowing something that you consider general knowledge?

whynotmaybe•7mo ago
I don't think anyone should feel bad for not knowing something.

My "general" knowledge is built on my experience.

The first comment before OP answer's was kinda condescending about the article and I felt the same way when reading it but then op's comment made me realise I was in the wrong because I forgot that my "general" knowledge is not general at all.

OP had to defend why he posted it. I wanted to tell OP that it was a good idea to post it, not for the article content, but for my teaching moment.

Jtsummers•7mo ago
> What was interesting to me about this was actively approaching the test as a way of debugging, designing it to give you useful information and using the test in conjunction with debugger

I'm curious, if you're using TDD weren't you already doing this? A test that doesn't give you useful information is not a useful test.

hyperpape•7mo ago
I think the distinction is that if you write a test that reproduces the bug, that's a binary signal and doesn't by itself tell you anything about why the bug is happening.

In contrast, if you write tests that rule out particular causes of a bug you're incrementally narrowing down the potential causes of the bug. So each test gives you information that helps you solve the bug, without directly stepping through the code.

Unfortunately, I don't think the post is a great primer on the subject.

Jtsummers•7mo ago
> Unfortunately, I don't think the post is a great primer on the subject.

It isn't, nor is it intended to be. It's an advert:

>> While mastering unit tests as debugging tools takes practice, AI-powered solutions like Qodo can significantly accelerate this journey. Qodo’s contextual understanding of your Java codebase helps it automatically generate tests that target potential logic vulnerabilities.

gavmor•7mo ago
> then go off and debug/code until

Yes, this is a missed opportunity! Well said. I try to write tests in place of print statements or debuggers, using assertions like xray glasses. Fun times!

jeremyscanvic•7mo ago
This reminds me of a talk that Leslie Lamport (author of LaTeX & prominent figure in the field of distributed computing) gave recently [1]. I remember him arguing that the difficult part in writing code is not to determine what code to write to compute something, but to determine what this something is in the first place. "Logic errors" are really about valid algorithms that end up computing the wrong thing - they're gonna compile, they're gonna run, but they won't do what you want them to do.

One example he gives is computing the maximum element in a sequence of numbers. This is something trivial to implement but you need to decide what to do with the obvious edge case: empty sequences. One solution is to return some kind of error or exception, but another is to extend what we mean by the largest element in a sequence the way mathematicians typically do. Indeed, the maximum function can be extended for empty sequences by letting max([]) := -infinity, the same way empty sums are often defined as 0, and empty products as 1. The alleged benefit of following the second approach is that it should lead to simpler code/algorithms, but it also requires more upfront thinking.

[1] https://www.youtube.com/watch?v=tsSDvflzJbc

pkoird•7mo ago
Closely related are in-code assertions. I remember when I used to liberally use asserts inside a code (and you could disable them for production) to check pre-conditions, post-conditions, or any invariants. Nowadays, I don't think the pattern is recommended anymore, at least in certain popular languages.
esafak•7mo ago
Fail as early as you can, if you can't recover.
just6979•7mo ago
It's not recommended as much anymore because of unit tests. Instead of peppering the code with asserts, you build tests based on those assertions. You don't have to worry about turning it off in production because the tests are separate, and you also don't have to worry about manually triggering all the various asserts in a dev build, because the test runs are doing that for you even before a build is published.
pfdietz•7mo ago
How do you determine if your tests are good at finding logic errors?

Mutation testing. Introduce artificial logic errors and see if your tests find them.

Disappointed the article didn't go into this. You can even use mutation as part of a test generator, saving the (minimized) first test input that kills a mutant. You still need some way of determining what the right answer was (killing the mutant just involves seeing it does something different from the unmutated program.)

codr7•7mo ago
Something's seriously messed up with the font on that page for me.