4 ms·
Yep! That's happy path/golden path/line of sight programming, and it's awesome. https://medium.com/@matryer/line-of-sight-in-code-186dd7cdea88#.m3qqyv35i https
by mplewis 10y ago
Yep! That's happy path/golden path/line of sight programming, and it's awesome.
https://medium.com/@matryer/line-of-sight-in-code-186dd7cdea88#.m3qqyv35i https://medium.com/@matryer/line-of-sight-in-code-186dd7cdea...
- moonshinefe 10y agoNice, I didn't know there was actually a name for it. My 15 years of coding experience has just taught me it's the far better way to code. It's one of my peeves to be following code paths and oh look, now we're in a situation where it's if (OK) { if (OK) { if (OK) { if (OK) { ... } } } } and I'm trying to remember what all the conditions were to get here since it's long since scrolled off the page. I always find myself thinking "why, why didn't you just return way up there!?"
- shthed 10y agoother names for it: http://wiki.c2.com/?ArrowAntiPattern http://wiki.c2.com/?ArrowAntiPattern http://thedailywtf.com/articles/Coding-Like-the-Tour-de-France http://thedailywtf.com/articles/Coding-Like-the-Tour-de-Fran...