3 ms·
Clean Code Secrets: Push Ifs Up, Pull Fors Down Like a Pro
- gnabgib 1y agoDoesn't even mention the original article Push Ifs Up and Fors Down from 2023 (662 points, 295 comments) https://news.ycombinator.com/item?id=38282950 https://news.ycombinator.com/item?id=38282950 Or the recent repeat (568 points, 9 days ago, 197 comments) https://news.ycombinator.com/item?id=44013157 https://news.ycombinator.com/item?id=44013157
- Arnt 1y agoThe original original may be Christopher Seiwald's "seven pillars of pretty code", which among other things suggested to do your ifs first and get rid of the rare cases, then handle only the common case with more complicated logic in the bottom part of each function. An excellent article that you have to search for.
- javatuts 1y agoJust because someone published an article on micro-optimization, does that mean we all have to follow it blindly?