Why you should (and shouldn't) learn C?

C is the dinosaur of programming languages. Yes, it's old, but also it's often the crucial part of every more advanced organism like operating systems, high performance applications and all other fun stuff like graphic card drivers which allows you to render high quality feet pics, or even encryption protecting your memes are at the end of the day most likely written in C.

Okay, but why I think it's great language for beginners? Well, it's relatively simple language. It doesn't come with many abstractions like objects, but in contrast to mainstream languages like python it comes with deeper understanding of how things really work under the hood. Also, due to its age, it was one of the most influential languages, so naturally, it share many similarities with various modern languages, like go, rust or even javascript. It means that sooner or later you would be able to learn syntax faster, understand better some quirks of modern languages and write better performing code by knowing how the data is processed by hardware.

Sounds great, doesn't it?
I think it was enough to catch your attention. If you are still reading, let's get into other side of the coin right now and uncover trickier parts.

Static typing

Static typing is a property of programming language, where all types of data are known at the compile time, making the code more performant and elegant. It might feel weird or even inflexible at first, but you will most likely get used to it. It's some sort of mechanism protecting you from yourself by forcing you to write predictable code.

What does it mean? It's more likely that you will shoot yourself in the foot by missing a semicolon or other useless syntax element, but at the same time it will protect you from writing code that crashes randomly, just because it wanted to. I like to see the static typing as doc martens boots, uncomfortable and hard at first, but it's just question of time to break it and make it your most reliable tool out there. In contrast, dynamic typing (mostly known from python) is like velcro shoes. It's quick and will get you from point A to point B. But the more you use it, the trickier it becomes. At worst, your program might crash because you tried to divide an elephant by 65. Better to avoid such antics and sleep well, right?

Memory. Management.

As you probably know, with great power comes great responsibility, and C is no different here.
Gaining access to every single byte of RAM memory might be liberating, but in clumsy hands it might also become dangerous, leading to countless issues like overflows, trying to operate on things that doesn't really exist and other scary scenarios. In fact, manual memory management if not necessary in a given situation, can only make things more complex and that's why languages like go or java with automated garbage collectors were created.

What now?
Well, this was literally some random introduction to my brand-new series on this blog about C coding. Stay tuned, because I am sure we will get through many sleepless nights, missing semicolons and headaches by cluttered memory, while making some silly projects together along the way. Such a great adventure!

Stay curious. Stay genuine.

Warmly,
Laura