Oddbean new post about | logout
 Is anyone on here doing TDD, like... fr? 
 You know, like

red, green, refactor 
 How else do you know you're done? 
 But, do you ever feel stupid writing the code for the first green?   Like, how do you keep from mentally pre-refactoring everything and ending up with bloated code that does more than turn the test green?

I just started doing this, and it's working, but it feels sorta silly. Like... this is actually kinda cool... but, this is it? 🤣  
 I always feel stupid writing code. 
 I need to learn this workflow - non production data analysis doesn't need tests, just plots 🫣😅 
 I've done some SAS, and it's just math->plot.
The test was just feeding it information and looking if the plot was reasonable. 😅 

I've done a lot of DB and test development, so this is a novel "mental frame" for me, programming a client that a human would interact with, directly. Good practice, tho. 
 Ty!