r/shittyprogramming • u/calsosta • Nov 30 '18
Friday Code Confessions
If you have been living with technical debt and want absolution here is your opportunity.
Confess your sins and receive your penance.
155
Upvotes
View all comments
Show parent comment
6
u/mistermashu Nov 30 '18
never knew that was called guards, til. i'm specifically thinking about a character controller class in a game. In the past i've always defaulted to FSM but in my last game it got so fucked that i scrapped it and was much happier. now there is a function with like 8 if statements that are all basically like
and it feels so dirty but honestly it is way easier to work with