Originally published in April 2017.
In the music industry, we have a saying: RTFS, which stands for “read the f***ing schedule”. It’s mostly used on tour, when you roll down to the hotel breakfast after a late night concert and ask your equally tired colleague, “When does the coach leave?” “RTFS!”
Well, I have a new version for myself in coding: RTFI, or “read the f***ing instructions.”
I spent 90 minutes this morning working on a Code Wars kata. I skimmed the instructions a couple of times, and was pretty confident I knew what I was supposed to do. So I built my own TDD tests, and proceeded along my merry way writing the code.
Before too long, I had passed all my own tests and was satisfied with the code so I ran it through Code Wars. Failed one test, ok, no problem, can fix that. Then I failed another test. Now this particular kata had you build your own tests so I couldn’t tell what argument my code was being passed that caused it to fail in so many different and spectacular ways.
I thoroughly ignored the advice of my cohort pal (sorry, Rob!) who rightly insisted that the order of the elements in the array mattered, because I was convinced I understood the (in my defence, rather poorly written) instructions.
After more tests failed, I went to look at the instructions again and lo and behold, I had been building the wrong thing. Needless to say I was by now too frustrated to get any useful work done so I’m writing this blog post instead as a warning to future Paula:
A random photo of me in a cowboy hat.