Algorithms, algorithms and algorithms
Hey, what’s up, guys?
There is some time since my last article, I will try to write more often. In this time the world has changed because of COVID-19, it is really a harsh time for everyone and I am doing my best staying at home and working in some projects, in the near future they will be available on Projects. I hope you, my readers, were also well and working as hard as possible in this situation.
Today I want to talk about how I study algorithms. First of all, I expect that you already know that I kindle challenge myself how I have explained on the first Article. So, you already know my motivation and my background, now we need to take a look at my references.
At university, I learned a lot about algorithms and data structures, I still use my notes and books from that time. But I also find a lot of awesome content online. In this post, I want to give you some tips about whats I found and how I use them.
My secret to learning anything is time and motivation. We need to keep in our minds that we won’t learn anything really hard overnight ( to study the night before to pass an exam don’t count! hahaha).
We need to stay motivated on a daily basis to work hard and don’t quit. In this sense, I think the best resource is enjoyable and accurate. Unfortunately what is good to me maybe isn’t to you, but you still can try what works for me and perhaps also works for you. You have to find out!
I know that is not the reality for most of the people, especially in Brazil, where to dedicate exclusively to study is a privilege, then if you can do it, please do your best, and if you can’t you still can do your best in the time you have. This is not fair, but unfortunately, this is our reality.
I started studying by this popular Algorithms Specialization. It is such amazing! I love how the professor Tim is clear and objective in his explanations. At the same time, I use Algorithms Design book to go deeper into some problems, for me, it is a great combination, there are a lot of other books and courses and you can try, but these are definitely my favorite ones <3 . Some time ago I saw this video, by CS Dojo, where they give awesome tips about resources, check out!
To get the most out of it, I have a kindle of a study plan, I watched a lecture on some subject, took my notes, studied the section in the book, and implemented it, in JavaScript, the best that I could. I was learning a ton, but I wanted something even more hands-on. For my luck, I found this awesome course, JavaScript Algorithms and Data Structures Masterclass , by Colt Steele, which is much more about coding than theory.
I really like how Colt teaches and this course fitted perfectly in my study routine because it is a Bootcamp and it has brief theory lectures, the main idea is to learning by coding. The only thing I would change in this course is the number of algorithms implemented, it is good enough for an introduction, so I take advantage of all structures we go through and implement all kinds of algorithms much more easily. For example, we implemented a graph structure in this course, but we just implement the core algorithms, like BFS, DFS, and Dijkstra. However, with a graph already done and these three algorithms are not this hard to implement other things.
Check my GitHub repositories for Algorithms Specialization and JavaScript Algorithms and Data Structures Masterclass.
At the same time, I was learning about React and I wanted to implement some algorithms in some kindle of visual way. I was thinking about a classic sorting and/ or pathfinding visualizers and on this same day, I found this video, where Clement talk about some projects he had done, some months later he even make tutorials to his sorting and pathfinding visualizers. It was the final motivation to do my own versions.
My Sorting Visualizer is already done, maybe in the future, I can add some sorting algorithm but, for now, I am satisfied with this version, if you have any suggestion just tell me :) I also start my Pathfind visualize, however, I still not sure how I should handle the weight edges, I want something more user friendly than just set ‘all these edges from this vertex are weighted’, otherwise a weighted vertex is almost the same than a wall vertex. My idea is to allow the user to set the weight of each edge from any vertex, but how to display it in this squared paper? Anyway, I will come up with some ideas soon or later, I hope xp.
[Edit: 15 June] Last week I deployed a ‘final version’ of my Pathfinding Visualizer. I didn’t come up with an excellent idea to allow the user to set the weights of each edge from any vertex, but I think my solution, at least, address the visual problem and the user knows the weight of each edge, I only would like to allow different weights for edges from the same vertex e show to the user in a nice way, and without breaking the grid already used. In the end, I am satisfied with the final result.
Check my repos for Sorting Visualizer and Pathfind Visualizer.
I think this is it, my main tips are:
- Get good resources
- Make a study plan,
- Code the most you can
- Work in projects where you implement algorithms using some nice front-end technology (React, Vue, Angular, …)
And to finish this post with a happy, motivational quote, which is totally true, always remember: “the more you practice the better you get”.
I hope this article could give you some ideas, or at least some motivation, any question or suggestion feel free to contact me.
see ya!