Readit News logoReadit News
moonlessday commented on Ask HN: Good Sites for/with AI Enthusiasts?    · Posted by u/wruza
reinaldnaufal · a year ago
https://gwern.net/#deep-learning

Gwern is the place for me. His deep dive on meta-learning is always interesting.

moonlessday · a year ago
blog design is goat
moonlessday commented on How does it feel to test a compiler?   medium.com/@zakharenko/ho... · Posted by u/thunderbong
stouset · a year ago
Most tests I encounter in the real world are terrible, fundamentally broken, and a waste of build times. I have almost never had a potential bug caught by a test written by others. I have been a software developer for 25 years across multiple languages and ecosystems.

Everyone jumped on the testing bandwagon but writing code that is testable is a learned skill that nobody bothers to learn. Instead we end up with overly-mocked tests that—in practice—test that “the code is written like it currently is” rather than that it actually behaves correctly.

These kinds of tests actually provide negative value. Besides taking up time during every PR and build, they fire off on any attempt to clean up or refactor. Every time you edit the code you have to edit the tests which entirely defeats the point.

The solution ends up being, unsurprisingly, lessons learned from the functional world: don’t access or manipulate external state, operate only on direct inputs and only manipulate your outputs. As a result code ends up being dumb, short, and obvious. But nobody learns to write code this way, so two hundred line spaghetti functions are the norm.

moonlessday · a year ago
what would you recommend to read to be better at writing tests?

u/moonlessday

KarmaCake day4March 12, 2023View Original