You are hereBlogs / Admin's blog / Why learning programming is hard?

Why learning programming is hard?


I'm one of those people who thinks that learning to program is hard. But it is hard not because it is hard to memorize functions or calls, but because the documentation is geek encrypted.

Let's take something simple to use as an example - a need to generate a range of numbers from 0 to 10 in Python (which is often touted as one of the easier scripting languages to learn).

What does the documentation show for function range() ? : range([start], stop[, step])

Ok, easy enough right? Just replace the start word with the value you want to start from, replace stop with value you want to stop at and instead of step put in the increment at which you want the range to be generated - like so: range([0],10[, 1]) . And here you would be wrong as your logic would lead you to a non-working piece of code.

The answer is range(0,10,1)! So it is no wonder that documentation leads to so much confusion and turns something very simple into something that doesn't make sense.

The hard core programmer would point out that there is a reason why documentation uses all of the square brackets and why in one case coma is within brackets and in another it is outside. Even so, showing an example in documentation that leads to non-functioning code is a sign of poor practices within programming community. Unfortunately this is quite wide spread and often creates rather annoying instances of complete puzzlement to those who are trying to learn to program.