Better at writing (code)  publié le: 2020-10-18

Last year I was engaged to teach Computer Science at CEGEP Lionel Groulx. Part-time job. I got there in order to be better at helping my peers at Code 3. The day of my job interview i was asked to do a french test. The test is composed of two parts. The first is a short text full of errors, where the candidate must find most the them. The second part is a text of about one page and a half where the candidate must do less than a certain number of errors.

I’m pretty bad at writing, I mean, i do a lot of errors naturally. So I ended up failing this test. Lionel Groulx has a hard time finding candidates, at the time of my interview two positions were to be fulfilled and we were only two candidates. The other guy refused the proposed position. So the CEGEP ended up giving me a change and asking me to pass the test again later down the road.

That was last year around November/December. About 8 weeks ago, I was reminded that I have to take this test again. But the GECEP offered me to be helped by a French teacher. I accepted the offer, free help who’s the fool who would refuse it ?

For a couple of weeks I meet with my teach once a week for a couple of hours. Even if I found the subject boring, I was pretty interested to get better at writing. I always feel a little bit of guiltiness writing that bad.

While I was taking that class, and without thinking about it, I ended up caring much more about the way I write code. During the same period I read ~Clean Code~ from Robert Martin and ~Refactoring~ from Martin Fowler.

And the other day, I notice that both activity teach share some common lessons about writing.

While writing prose, you are better writing short sentences, you will make fewer errors. Plus the end result is clearer for the reader. While writing code, you are better writing short function, you will have less bug. Plus the end result is much clearer for the other programmer reading your code.

In my opinion, it’s way easier to get better at writing prose. It’s like writing pseudo code. Nothing needs to compile. No test needs to pass. Still this activity helped me to raise my level of attention. At the moment I see an impact on my coding. I hope this will last.

comments powered byDisqus