One year summary and a plan to conquer the JVM internals
There’s a saying in the self-development world, that says – ‘People overestimate what they can achieve in one year. On the other hand, they don’t appreciate what they can do in 5 years.’. To be honest – I think that quote has a lot of merit, although, when it comes to BareMetalDev I find it to be not a perfect fit.
Looking back I’m sure that I’ve achieved a lot already. Learned so much, understood even more. On my never-ending road to mastery, I’ve made some big leaps. Of course, there’s no end to get to, but that is not the key here. Only the road matters, everything else is just a distraction.
The ring has awoken.
Having said that, I have an announcement to make. I’ve started BareMetalDev, as a way to get out of my bubble, which is Java ecosystem. I wanted to experience new areas, where I could feel like an amateur again. For sure, I’ve managed to achieve that. However, along the way I’ve stumbled upon numerous books/podcasts/TEDx meetings, which empowered me to admit, that it wasn’t only the joy of being a newbie again. It was also fear. Yes! Fear. Fear of what – you may ask?
Abraham Maslow, the psychologist, who has strong influence on me, in one of his books described a very important aspect of the human psychology.
“We are generally afraid to become that which we can glimpse in our most perfect moments… We enjoy and even thrill to the godlike possibilities we see in ourselves… And yet we simultaneously shiver with weakness, awe, and fear before these very same possibilities.”
And the other one:
“[When asked literature students, if they plan to write a great novel] Generally, everybody starts giggling, blushing, and squirming until I ask. ‘If not you, then who else?’ Which of course is the truth… If you deliberately plan to be less than you are capable of being, then I warn you that you’ll be deeply unhappy for the rest of your life. You will be evading your own capacities, your own possibilities.”
We may call it the fear of power. A fear of what we can actually become. As I’ve said, it took me a while to admit, that my change towards unknown waters (with low-level concepts of programming) was in some degree (hard to estimate how large, from the perspective of one year), dictated by it. During past three months, I’ve spent one of them, trekking the French Alps. It gave me a time to think and meditate about my values, goals and life mission. The truth is, that as interesting as it gets, low-level is not something that I do every day. What I do every day is Java, and there’s no way to deny that. Is it wise to spend eight hours straight at work, which (as great as it is, honestly!) does not allow you to go along the chosen path to mastery? Is it?
The answer is obvious – it is not. That made me wonder – is it possible to combine these two? Low-level concepts to keep me interested and curious, and Java, about which I have some knowledge already? Again, the answer is obvious, yes, yes it is. Instead of staying within the comfort zone of Java code and making it better (refactoring and software craftsmanship is a huge part of my everyday job), the time has come to dive deeper into the insides of JVM. The truth is, that JVM is an actual application written in both Java and C++. Every application can be looked at, reviewed and debugged. Its inner workings can be decomposed and understood. Right now I have my eyes set on achieving just that.
I’m the servant of the Secret Fire, wielder of the flame of Anor
Before I started, I had some other things to revisit. The most important aspect of that was changing the way I gather, and process knowledge. Reading the book and making notes it fun, although it does not mean, that I’ve actually learned a specific thing. We’ve all been there – studying tirelessly, and not remembering a thing after three days. Of course, gathering knowledge for the sake of the gathering isn’t that wise. However, on the road to mastery, accumulating every piece of information about our chosen field is a must. Although, not just for remembering, but for an actual usage when it’s needed. I knew that I have to improve my way of learning. In order to achieve that, I’ve taken part in the course about effective learning.
The key points I’ve taken with me concerning actual knowledge gain, are two specific concepts – spaced repetition and deliberate practice. I plan to write about them – and books about the topic – more in the future. However, the practical repercussions are, that starting this month I’ve begun to learn, by using ANKI flashcards. That way, spaced repetition became a part of my toolset. What is more, deliberate practice also must become a part of my routine. Just knowing how to do things, does not mean that we’re proficient with actual doing. I’ve done this before with my Advent of Code 2020 project, and I think when itcomes to programming, it’s crucial to do this as much as possible. Practical, hands-on approach to everything you’re learning at the moment. No matter how fancy your notes are, there’s always a practical component in every craft which should be improved too.
Great! So where are we going?
So what’s the plan for mixing Java and BareMetalDev? It’s actually simple – learn enough about C++, C, assembly and theory of garbage collectors, to be able to understand – and maybe even commit – to this part of the JVM. For those, who aren’t familiar with the idea of virtual machines and garbage collection (so I expect everyone outside of Java, C# or Haskell ecosystems) – GC is an automatic memory management system, that takes the burden of memory management from the programmer. The effectiveness of it is crucial when it comes to performance of the runtime. If you think that it sounds serious – you’re absolutely right.
To reach my goal, besides the knowledge and skill in assembly/C/C++ programming, there’s a theory component about GC.It’s a field of knowledge where research goes back ages, and obviously in order to contribute to JVM, I have to know as much as possible about it.
You have my sword. And my bow. And my axe!
To sum everything up – here’s a plan for upcoming months:
- Java guy learning C++ – that’s kind of crucial. In order to avoid pitfalls along the way, I’ve contacted a well-known C++ expert and teacher, to guide me through the process. For the time being I’m starting with introductory book to the language, written by Bjarne Stroustrup himself – “The tour of C++”. After that I will probably revisit writing a roguelike game in pure C++, and next learning resources will follow. Learning programming will be the most important part for a couple of upcoming months.
- Garbage collection theory – I’m gonna start with the classical book about the topic. “Garbage Collection. Algorithms for automatic dynamic memory management” by Richard Jones and Rafael Lins, and a more recent “The Garbage Collection Handbook”. I’ve never read CS books in English – it will be an additional challenge then. Due to that fact, I’m giving myself time, to finish it. It would be great to keep one chapter per month pace, although I don’t know if that will be possible. I want to internalize the knowledge, not just skim over it.
Obviously, every step along the way will be documented. I’ll publish my notes, examples and flashcards in my newly created repo on GitHub, and everything else I could think about on this blog. Just wish me luck.
PS. Subtitles come obviously from “The Lord of the Rings”. Yes, I’m a nerd.