Kids and programming

I was watching a TEDxAcademy talk about teaching programming to kids. The speaker (Nikos Michalakis) was talking about a need to teach our kids how to program. He even took the whole concept further by building a couple of “languages” for kids aged 3-12 to learn how to program by giving orders to their parents. Although this concept is nice, is there truly a need for kids to learn how to program?
Over the years, both in university and in various other projects, I’ve witnessed a lot of fails. I have mates that know a lot more than me about C for example. They have written sockets in C so many times that even if you handcuff them and blindfold them, they will probably write a perfectly working socket. Yet, when they went to work on projects, they failed miserably. There is a reason behind this.

Programming languages are tools. Depending on the needs, you choose the tool. But when you go to choose a tool, you already know how to solve a problem. You can write down the solution step by step. You already know how to break a problem down to simpler ones (Divide and Conquer), how to solve them and the rest. This is called Analytical Skill. That skill is crucial if you want above average programmers. We could give them tasks to complete for example. “Find a way to do this”.

Coming up next is software engineering. I don’t consider software engineering some kind of science. I believe it is more like a good practices guide and as such it should be viewed. I have to mention though that a lot of things, for example design patterns are really helpful.

Remember those C guys mentioned above? They’ve written more C code in 4 years than an average programmer in his lifetime. They were forced to develop everything in C. But they were not taught Software Engineering. They could build everything, most of the software though was totally useless. I remember once, I had an assignment with some of them. We had to implement a cryptographic algorithm. The first thing I did was to grab a piece of paper and sketch all the necessary classes. The whole concept was to built structs, functions for those structs and in general keep the code tidy, reusable, simple and avoid common programming pitfalls. Everyone, and I mean everyone did standard programming no-nos because they were not taught software engineering. There are certain things when you build software that are essential, even concepts such as loop unwinding, or DRY, KISS etc.

Last part is computer science. Well, computer science is needed. Ugly but true. You can’t teach someone how to program sockets if he doesn’t know the basics of networks. You can’t teach someone optimization if he doesn’t know about compilers. He won’t understand a lot of concepts. He won’t understand singleton objects nor the possible pitfalls that exist in threads and singletons.

In my opinion, we should create the correct infrastructures for teaching the kids that want to, how to program. That’s it. But what happens if we don’t but we simply teach them to use a set of tools? I’ll answer with a real life example. I was asked to reverse engineer a software (which is top 3 in the world in its category), mostly for security purposes. I did so and I ended up with the source code.
I spent the rest of my time trying to explain the difference between bytecode and machine code. When the guy understood what I was talking about, we went on to the second subject.
He had over 100 Windows Forms (WinForm). Over 100, take a moment and think about it.
I had to explain the concept of interoperability, classes, methods, instances, attributes etc. The problem that rises here is typical, building software is cheap. Maintaining or expanding software comes with a price. The price is huge if you have built software without using any software development process framework. And in most of these cases, the software has to be completely removed and rebuilt again.

And there comes the last problem. Someone who knows to write code won’t stand long in the arena. Someone who knows how to design software though has better chances.

Summing up, there is no need for kids to learn programming. There is a need to build the proper infrastructures for kids that want to learn how to program. For those kids that want to learn, someone should teach them how to design software as well.

Leave a Reply

Your email address will not be published. Required fields are marked *