As a student when confronted with a problem, I would end up coding it and thinking - how do the professionals do this?
For some reason I had the impression that once I entered the industry I would find enlightenment. Discovering the one true way to write high quality, professional code.
It turns out that code in industry is not too far removed from the code I was writing back when I knew very little.
Code in the real world can be:
- messy or clean
- hard or easy to understand
- simple or complex
- easy or hard to change
- or any combination of the above
Very rarely will you be confronted with a problem that is difficult. Most challenges typically are formed around individuals and processes, rather than day to day coding. Years later I finally have the answer. Code in the real world is not that much different to code we were all writing when we first started out.
If I could offer myself some advice back in those early days it would be to follow KISS, YAGNI and DRY religiously. The rest will fall into place naturally. Above all, aim for simplicity.
The best way to summarise my feelings would be this image courtesy of Imgur.