|Programming - A Life Long Challenge|
|Written by Mike James|
|Thursday, 09 March 2017|
What is it that makes programming more than just an occupation? It's that chance it gives you to see things from the inside out. And watching a beginner gives insights into what it is all about.
I have recently had the privilege of helping a beginner learn Python. It is always a privilege because you get to learn so much about programming by observing how they learn. The mistakes that they make are like searchlights illuminating the dark corners of what we do.
Never ever laugh or become dismissive of what you regard as a simple mistake or a misunderstanding because there is always a reason for what is happening and by finding out what the reason is, what the misunderstanding is you can discover something profound about programming, something you have taken for granted that deserves more attention.
But what mind expanding thought impressed itself on me due to the learning process wasn't something specific or about the nuts and bolts of programming but on how far there was still to travel. The beginner, flushed with success started to joke about replacing Google with her own search engine -
"it's easy - just a few lines of code"
I didn't say anything but I thought quite a lot.
So you learn a programming language and take the first step on a road of how many miles?
There is no doubt that learning to program changes the way you think. You move from the typical vague thinking of the non-algorithmic brain to the precision needed to actually put the idea down into executable code. During this process your brain really does change. We hardened programmers tend to forget because we are so used to it. But a brain that doesn't program thinks it a very different way to one that does. A programmer puts together an algorithm to get from state A to state B without really trying. Of course there are bound to be parts of the algorithm that are missing at the first attempt. They are not so much black boxes, more empty boxes, waiting for the programmer to fill in the algorithmic details. This is very different from the way the average non-programmer tackles a task - they "just do it".
To be able to think in this strange new way we have to learn how to put together effective procedures that use conditionals and iteration. We master the art of marshaling actions that make progress from the initial to the final state.
But this is just the start.
There are all those algorithms to learn.
And I'm not talking about just the well known ones with names like quicksort and FFT and fast median and ...
Most of the algorithms we learn are small and we can invent them for ourselves - the sentinel, flags, string manipulation, sparse arrays, lists, stacks and so on... These things are the raw materials that we use to implement our ideas. While you can invent them for yourself as and when they are needed it really helps if you have seen them before. If you have seen them before then you recognize when they should be used. It also enables you to do a good job implementing them for a subsequent time and you might even think up a variation that improves or customizes the algorithm.
However, when it comes to programming algorithms are not the whole story.
There are also the meta skills to take into account.
Meta skill are things like debugging, performance tweaking and methodologies. Debugging is a really interesting one as it can take years to master and experience really counts. A seasoned programmer can guess at the sort of problem that is likely to be at the bottom of strange behaviour without even looking at the code. Methodology sounds like an up market sort of thinking exercise but what it really comes down to is the best way to write a program.
Learning about good code takes time because at first you are struggling just to produce code - any code. Later you can sit back and wonder if a new object would help, or moving a method from one place to another. Of course this all assumes that you have learned about objects or functional programming or whatever approach you think is the ideal one.
At this point you might think that I am missing out on something.
Surely the experienced programmer should master lots of languages?
Yes, learning other languages is more or less unavoidable if you stay in the game for long, but at the moment there are only three types of language.
There are the structured, object-oriented languages like Python, Java and C# that dominate the scene at the moment. These vary a bit in syntax, data typing and other facilities, but they are really just slight variations on a basic theme. It doesn't take long to learn another in the same class.
Then there are the functional languages like F#, Lisp, Clojure and so on. These too vary along a spectrum but once you have seen one functional language you have seen them all.
Finally there are the logic languages such as Prolog, and these are more or less unused today and do require a bit of a change in the way that you think.
Most of the time learning new languages is irritating but trivial.
This is not to say that you shouldn't learn about objects and different ways of working with them. It is almost certain that the way you currently do it is wrong. You should also find out about functional programming and at least know logic programming is about. These are more off shoots of the meta subject area and you should never stop exploring ways of expressing algorithms.
You could continue to throw in topics that you need to know about - parallelism, binary, hardware, assembler, data structures, relational theory and so on ... All good topics and they will all keep you going for years. But there is one last bigger learning task to discuss and it's usually the elephant in the room.
Programmers have to master domain knowledge.
We need to talk about domain knowledge.
For many years my personal joy of programming has been the right it gives me to stick my nose into other people's subjects.
If you are lucky enough to program some computational methods then you need to learn the nature of the computation better than the people who thought it all up. If you implement a business system guess who understands the business process better than the people who own and work for the company.
It doesn't matter what sort of program you design you need to understand the basic workings of what the program is replacing or augmenting. You need to master the other guy's subject. How you view this task is pretty much a measure of the sort of programmer you are. If you really love finding out how systems work at the most fundamental levels - after all it has to be fundamental because you are about to cast it into software that makes it happen - then you are a programmer and not just a coder.
It all takes time so don't be impatient.
When you first learn enough programming to see that you could replace the Google search engine you have indeed achieved a new level of consciousness - it may not be nirvana but it is a big step in the right direction.
From this point you have won the right to play with some great ideas and make them concrete.You cannot anymore pretend you understand and sweep your confusions under the carpet - they will be made plain to you as you attempt to construct the correct algorithm.
Once you have learned to play the instrument the symphony awaits.
or email your comment to: email@example.com
|Last Updated ( Thursday, 09 March 2017 )|