Richard Bucker

Side Effects

Posted at — Aug 21, 2020

I was watching one crazy video from uncle bob. He’s a dynamic speaker and he knows how to connect with the audience. But then after a while things started to break down.

In the first or maybe the second less he talked about comments. And he was spot on. Commenting can be a pain in the ass. What he did not elaborate on was that syncing comments and code…. they can go in different directions. But he really cauth my imagination and then lost me.

And don’t get me started on returning errors vs exceptions. All of those reasons are broken in golang. I truly get that some programmers need to test everything. Or at least all the results of this and all the results of that. However, and it may be difficult to understand, [a] if you followed that rule and the code in question was not at the edge then every function would be about 4 lines. [1] get the param [2] test the param [3] execute some function [4] test the result. And most of the code is the bloat of the validation… One other stupid side effect of this is what happens in the CPU with how the CPU predicts the path of the code and what happens when you reach a conditional.

Just about everything uncle bob professes also hinders performance. And the most important things is knowing when to do what.