2021/10/12

6

After some discussions about unit tests at work yesterday, I came across this solid StackExchange post. It turns out my understanding of the ways that a unit test can be brittle were fairly limited, meaning I missed a few of the bad ways to write unit tests. In particular, I previously would add in additional checks that "just made sure" for different values/functionality along the way. Often, these checks were almost completely orthogonal to the target of the unit test. I saw this as more stable (more tests = better) not as more brittle. But, now I understand the perspective that extraneous assertions can lead to tests failing even when their "core" tests pass. A rule of thumb to try going forward: strive to have only 1 assert per unit test. While this is admittedly impractical and not always the best approach, I think it is the kind of correction I need to make in my approach.

On a different note, Ethan Chlebowski's recipe for halal cart style chicken and rice is fantastic. I didn't think it would be so easy to recreate a freshman year favorite of mine at home. If I exercise control by making the salad portion bigger, rice portion smaller, and using a touch less sauce, this is actually a solid healthy meal.

The most important contribution Ethan has made to my cooking is his mayo marinade technique which is applied in the above recipe. Instead of oil, marinate your meat in a seasoned mayo which is oil+egg+vinegar. This results in more tender, juicer meat with the bonus of not having to worry about putting fat in the pan: the meat brings enough fat to cook it from the marinade. The usage of mayo here also provides incredible color to the finished product, which is always great to have.