I have been self studying algorithms and data structures for some time now and currently enjoying it. Whenever I understand an algorithm, I usually try to code them from scratch for fun and I always will discover some logic I've never thought of before. I'm not so sure, but I always think that when I code algorithms, I am maybe practicing my skills in programming. Is this true? I know they are important, but will my programming skills really improve by coding them?
1 Answer
In theory and academics, it is often most wise to truly understand the details. This is why in university studying computer science, you can get by without having to write much language-specific code. You learn the fundamentals, not, say syntax of C#. With that fundamental information, it should be easy to learn a specific programming language or other tool for that matter.
Understanding the details of different algorithms and data structures is good because they all exist to solve different problems--they don't all exist just because people like inventing them for fun. With this knowledge, as well as practice and experimenting with them, you become more effective in designing solutions in code.
It is rarely necessary or even a good idea to re-implement some standard algorithm or data structure if one already exists. Well designed software is all about reuse. If you are working for a company, they often don't care about your academic or personal benefit, they care about being cost-effective, reusing solutions, etc.
In some cases it may be appropriate to re-implement these things, depending on performance, security, stability requirements and constraints of the system. For example real-time operating systems, hardware drivers, health care, military, traffic hardware or software.
-
I don't understand what exact point you are arguing here, nor exactly how it answers the question instead of vaguely waffling around the topic. Should people try to implement algorithms (or not) for the purpose of improving their skills? May 4, 2014 at 10:24
-
@Donal Jordan's answer is fine because my question before I edited it is also too broad and too vague and I just realised it's too similar with the other question though I would like mine to be focused more on ganing programming skill through algorithms. I have edited my question to be clear and not to be a duplecate to other questions. May 4, 2014 at 16:32