Developer Avatar

Learning Zig. Do I have skill issues, or am I just bad?

Seeing as we are getting to the end of the year, I have taken the time to think about what I want to do in the coming year to learn something new and improve at being a programmer. So, I though to myself "in what way can I deliver the most amount of pain to myself?". I thought about learning Rust to a better degree but decided against that. Thought about something else, like maybe I want to look at something "older" like C++ or C. But ultimately, decided "No, C++ has syntax I just dont like (what is this << >> shit man come on) and C is for the truly gifted not the grugs like me". But then, on the horizon I saw something of beauty... Zig.

So, I heard of Zig before and I was looking at it a few times this year. I installed it, went through the whole "Hello, World!" process. Tried to figure out how to do some basic stuff like assignments, control flow etc. But ultimately packed it in when I saw "Oh I have to do memory allocation? Oh well, maybe another day.". I'm no stranger to memory allocation, I started in C++ when I was but a wee lad, so I had some ideas on it. In school and college I did learn some stuff too on it, but nothing of real substance. Java and C# being the "main learning languages" for schooling is a terrible thing, and I hope that changes.

But last week, around Christmas time, I had this itch again to "learn". I picked myself up and said "I will learn Zig, in 2025.". Then I left it at that. Then, maybe 2 days later I was (once again) reinstalling my Linux machine after 'accidentally' breaking half of my depenencies for Steam and other tooling by casually removing all .fish files from the system indiscriminately. Apparently, I really needed those...
Anyhow, once reinstalled, I needed to get my whole system setup again. While installing the billion GPU driver packages, radeon-profile-daemon and many other fun packages that I have since automated, I decided that I also needed to install Zig. So, I did. I then picked up some stuff, I already had very (I mean, VERY) barebones limited knowledge of the syntax so I wasnt starting from 0. And I decided, the best "first project" to build is a tool that can interface with my usb devices to give me the charge left on my headset and mouse. Needless to say, I'll need to revisit this idea some other time. But I had a blast not knowing what to do, and I still don't.

But Mikku, what are these skill issues you mention? Ah yes, fair point. Well, first off memory management is still "hard" for me. I did refresh my knowledge on Stack vs Heap etc. But I am still far off from giving any lectures on "Memory in CS 101". However the main skill issue, isn't necessarily knowing (or not knowing) something but it's that I don't know where to begin. I did find this amazing (albeit slightly outdated, but still does drive the point across VERY well) book written by Pedro Duarte Faria called Introduction to Zig. I wish there were more resources like this, but I'm still looking around and will update my list of resources.
This book now has given me the basic idea of creating some basic stuff. Like in my repo I use to write and document these excercises from the book, I have also added my own stuff and I am now working on a cool (unnecessary though) implementation of creating my own take on the Array data structure, but "inspired" by the javascript way. I am having a total blast, even though this code will NEVER see the light of day, especially in a real world application.
My skill issues though more importantly are the things that now will also drive me forward let me improve at being a programmer. I am very much interested in learning Zig more and more, with every passing minute spent in neovim writing Zig or in repos reading Zig, or on their community discord reading about it as well. I think I may have found my new favourite language (and I'm terrible at it)!


std.debug.print("{s}\n", .{"skill_issue"});