Coding is just copying?

My old friend, who has only done some compulsory coding as part of a programming course, said not long ago that; “Coding as a work is is easy – You just use Google and copy – paste the code”. I think he was little bit provocative, but I was not keen to take the challenge and prove him wrong. The debate died before it got started. However, he got me thinking about my trade as whole.

Years ago when I started coding, and went into a company to do some coding with PHP and Java, it was pretty straightforward. You had a task, and you coded it until it was done. You might have searched the internet for a solution, or parts of solutions to be combined into your specific solution. Nobody cared how elegant it was, it only had to work. Just as my friend postulated.

Now, years later environments are more complex than before. The are numerous frameworks, databases, languages, version control systems – old and new, to be aware of. Years ago there were only a few. Coders just need to know more about technologies than previously. The possibility to do your work wrong has escallated.

Then there are new methodologies how to do one’s work as a team. Earlier it was just a collaboration between co-workers in a strict waterfall, heavily documented and manager run project. You did, what you were told to do. No excessive hustle with intraoffice personalities and social mingling.

More agile aproaches are now preferred, which actually means empowerment of the coders. They get to decide by themselves how they do their work, what gets to be done, at what order, define when its done, and most importantly how it’s done. Well, the agile manifesto postulates these principles in a manner which opens doors for interpretation and enables discussion.

This agile trend has caused also interesting results. Just to name a few: I have been in a team where two hired coders spent couple of months just talking how we should code and organize ourselves as a team, without actually coding anything. Our productivity has actually suffered, because we have have spent more time planning/discussing/evaluating changes into the legacy system, than just following the directions of the senior developers/architects, who simply knows their system best. Usually one of the coders have been elevated to scrum master position, which in the end means one coder less.

The coders have been given the right to disagree in every part of their job, and to pull this through requires good social skills, which many sadly lack. It does not help that many coders have big egos, and have great expectations of their capabilities and their level of professionalism of their trade. This is also sociological copy-pasting in agile circles of what works and what not.

But copy-paste coding? Yes, it is still there. You see a fragment of a code and you reuse it. Classes, modules and code snippets can be considered libraries to be reused. It does not matter wether it is a block of code, a called method of an object/framework or an injected Class. Your trade turns into an art, when you know how to do it elegantly by refactoring, combining, dissecting, performance improving, coding more tests to cover all possibilities. Loving it, being proud of it, been able to pair-code it with someone. Only after you have embraced this you are no longer a novice.

And still, all of it can be done so horribly wrong, which gets the next coder who touches it, to experience the WTF effect…