I never took a Computer Science course in university since my major was Philosophy and my goal was to be a lawyer. I dropped out after two years. Phew, glad I dodged that bullet!
During my travails as a self-taught programmer I have sometimes felt unprepared to solve certain problems such as implementing a DB or in whiteboard interviews. Lately, my curiosity is captivated by distributed systems which frequently use algorithms and data structures foreign to me.
I set out to fill the void in my education as a professional programmer because I love learning, my desire to tackle harder systems problems, and, let's be honest: miserably failing whiteboard interviews sucks.
I created this repository to implement common algorithms/data structures with the following goals:
-
Have fun.
-
Learn. The code in this repository is solely for learning and self-practice only; it is not intended for production.
-
Read as much as I can stomach0 using varied & multiple resources so that I may fully understand the material by learning from myriad teachers. This can be used successfully as distributed practice, a highly effective learning technique.
0 Some books are to be tasted, others to be swallowed, and some few to be chewed and digested: that is, some books are to be read only in parts, others to be read, but not curiously, and some few to be read wholly, and with diligence and attention.
-- Francis Bacon
-
Implement common/interesting/fundamental algorithms/data structures. This, of course, is practice testing, another highly effective learning technique when the stakes are low.
-
= 90% test coverage.
-
Provide abundant documentation, links, and resources so others can learn from this work.
- Why Go?
- Data Structures: ❄️ = immutable, 🔒 = thread-safe
- Algorithms: 💾 = in-place, 🔃 = iterative, ♻️ = recursive
- Resources
- Thank you
I chose Go for reasons which FP advocates may disagree; however, what's most important is what I learn and having fun.
In some cases I eschew polymorphism by using primitive built-in types
because there's often no advantage to using interface{}
for these
implementations. My reasoning: none of the code is meant for production and using int
or string
makes testing easy and concise.
Data dominates. If you've chosen the right data structures and organized things well, the algorithms will almost always be self-evident. Data structures, not algorithms, are central to programming.
-- Rob Pike