3 ms·
There's a common belief that you can learn everything you need to program through practice. And that is true in the sense that you can eventually learn how to w
by cyphar 8y ago
There's a common belief that you can learn everything you need to program through practice. And that is true in the sense that you can eventually learn how to write working programs. But understanding the theory behind programming and algorithm design is a very different thing.
As a concrete example, while in high school I participated in programming competitions. One of the questions required writing a parser for a context-free grammar. Being completely unaware of recursive descent parsers I managed to fudge together an awful program with probably disgusting algorithmic complexity. After taking an "intro to CS" course (as an extra curricular activity), I immediately knew how to write basic parsers for CFGs correctly. It's not that I was suddenly much better at programming, it's that I now had learnt some theory that helped me know how to approach a problem.
You can't really "pick up" algorithms. You have to learn it through some kind of study (self-study is also acceptable). There are thousands of man-years that have been spent on algorithms. It's probably not a good idea to start out from scratch. In this respect, I would argue that programming is far closer to mathematics than engineering.