A lot of people find mnemonics and acronyms really helpful, and I remember using them in school to remember the order of steps in tasks, or to recall a list.
I have a grand total of two in my regular repertoire. The first helps me remember the order of the planets (Many Very Early Monkeys Just Sat Up Near Pluto)- not super useful in my day-to-day, but it’s helped me out in a pub quiz once or twice! The second, the title acronym of this post : KISS (Keep It Simple, Stupid) and I’ve been thinking about that one a few times over the past couple of days!
I was going for something like this:# # # # # # # # # # # #
I was definitely just making things too complicated. At the peak of my frustration I had two if/else loops nesting inside of a for and a while loop.To say it was getting a bit messy would be an understatement! I kept writing and deleting lines, but just kept making it worse, so in the end I had to look at the solution code. I started by looking at the first two lines of code, and working my way through it from there. It was much cleaner code than what I’d been writing, and adhered to an acronym I’ve been reading a lot about lately : DRY (Don’t Repeat Yourself.) I spent [and sadly, I’m not exaggerating here] hours [plural] working myself up, making my code more and more complicated, when it really shouldn’t have been- I mean, come on, it was the third exercise of the whole course!
I’m working on another set of exercises for the course, and now I’ve got two acronyms in mind while thinking about ways to write the code for these ones : DRY, and KISS.