frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

The struggle of resizing windows on macOS Tahoe

https://noheger.at/blog/2026/01/11/the-struggle-of-resizing-windows-on-macos-tahoe/
1694•happosai•13h ago•691 comments

CLI agents make self-hosting on a home server easier and fun

https://fulghum.io/self-hosting
528•websku•12h ago•349 comments

JRR Tolkien reads from The Hobbit for 30 Minutes (1952)

https://www.openculture.com/2026/01/j-r-r-tolkien-reads-from-the-hobbit-for-30-minutes-1952.html
81•bookofjoe•4d ago•14 comments

39c3: In-house electronics manufacturing from scratch: How hard can it be? [video]

https://media.ccc.de/v/39c3-in-house-electronics-manufacturing-from-scratch-how-hard-can-it-be
93•fried-gluttony•2d ago•25 comments

This game is a single 13 KiB file that runs on Windows, Linux and in the Browser

https://iczelia.net/posts/snake-polyglot/
195•snoofydude•11h ago•54 comments

Himalayas bare and rocky after reduced winter snowfall, scientists warn

https://www.bbc.com/news/articles/clyndv7zd20o
110•koolhead17•6h ago•65 comments

iCloud Photos Downloader

https://github.com/icloud-photos-downloader/icloud_photos_downloader
436•reconnecting•14h ago•189 comments

Conbini Wars – map of Japanese convenience store ratios

https://conbini.kikkia.dev/
34•zdw•5d ago•9 comments

I'm making a game engine based on dynamic signed distance fields (SDFs) [video]

https://www.youtube.com/watch?v=il-TXbn5iMA
310•imagiro•3d ago•40 comments

The next two years of software engineering

https://addyosmani.com/blog/next-two-years/
137•napolux•11h ago•83 comments

Sampling at negative temperature

https://cavendishlabs.org/blog/negative-temperature/
169•ag8•13h ago•50 comments

Uncrossy

https://uncrossy.com/
66•dgacmu•8h ago•21 comments

FUSE is All You Need – Giving agents access to anything via filesystems

https://jakobemmerling.de/posts/fuse-is-all-you-need/
132•jakobem•12h ago•51 comments

Perfectly Replicating Coca Cola [video]

https://www.youtube.com/watch?v=TDkH3EbWTYc
212•HansVanEijsden•3d ago•142 comments

Insights into Claude Opus 4.5 from Pokémon

https://www.lesswrong.com/posts/u6Lacc7wx4yYkBQ3r/insights-into-claude-opus-4-5-from-pokemon
80•surprisetalk•5d ago•14 comments

Gadget Exposed a Spy Camera [video]

https://www.youtube.com/watch?v=1reman2waLs
50•rib3ye•9h ago•24 comments

Garbage collection is contrarian

https://trynova.dev/blog/garbage-collection-is-contrarian
45•aapoalas•2d ago•2 comments

Ask HN: What are you working on? (January 2026)

191•david927•17h ago•606 comments

Elo – A data expression language which compiles to JavaScript, Ruby, and SQL

https://elo-lang.org/
82•ravenical•4d ago•21 comments

Xfce is great

https://rubenerd.com/xfce-is-great/
190•mikece•5h ago•132 comments

Don't fall into the anti-AI hype

https://antirez.com/news/158
1005•todsacerdoti•23h ago•1168 comments

Show HN: Shellock, a real-time CLI flag explainer for fish shell

https://github.com/ibehnam/shellock
8•behnamoh•5d ago•1 comments

Show HN: An LLM-optimized programming language

https://github.com/ImJasonH/ImJasonH/blob/main/articles/llm-programming-language.md
34•ImJasonH•6h ago•19 comments

Erich von Däniken has died

https://daniken.com/en/startseite-english/
84•Kaibeezy•14h ago•133 comments

A set of Idiomatic prod-grade katas for experienced devs transitioning to Go

https://github.com/MedUnes/go-kata
128•medunes•4d ago•21 comments

Poison Fountain

https://rnsaffn.com/poison3/
198•atomic128•16h ago•119 comments

Show HN: Engineering Schizophrenia: Trusting yourself through Byzantine faults

78•rescrv•12h ago•10 comments

Moving Scratch generation to Python on browser

https://kushaldas.in/posts/introducing-ektupy.html
39•kushaldas•3d ago•12 comments

Code and Let Live

https://fly.io/blog/code-and-let-live/
458•usrme•2d ago•173 comments

Quake 1 Single-Player Map Design Theories (2001)

https://www.quaddicted.com/webarchive//teamshambler.planetquake.gamespy.com/theories1.html
64•Lammy•1d ago•12 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•8mo ago

Comments

recroad•8mo 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•8mo 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•8mo 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•8mo 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•8mo 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•8mo 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•8mo 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•8mo 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•8mo 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•8mo 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•8mo 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•8mo ago
Fail as early as you can, if you can't recover.
just6979•8mo 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•8mo 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•8mo ago
Something's seriously messed up with the font on that page for me.