2014-12-15

Little things I would teach to my younger software engineer self - #7 Coding conventions debates

Looking back at the various stages of my career, I realized I could have learned some basic stuff way earlier than I did.
Even if I missed the original opportunity, all those little skills I acquired late served me tremendously well ever since.




I remember debating for ages about coding conventions: tabs are better than spaces it is obvious ! Align the { with the } so you can spot them !

Then I realized that after going through dozens of them, meh, this is just a matter of getting used to it after all. The real goal is not to piss off people about rigid stuff from a higher power, the real goal is just to be on the same convention. At worse a convention can be sub-optimal for you but look at the greater picture: you are on the same convention !

This simplifies a lot of troubles merging code, reading code, etc. 

A coding convention, whatever it is, is best if it can be autoformatted with a tool and checked before commit. If you have tasted gofmt from golang for example, you really understand why it makes sense to almost make it part of the language.

Any tips you would give to your younger self programmer ? Feel free to comment below !



No comments:

Post a Comment