Hello Everyone! Today I have a question for you ->
C
I like C. I'd go even as far as saying C is one of the most beautiful languages out there. Yes, you can shoot yourself in the foot easily, and Yes, it is tedious to do complex stuff in it, but those are good reasons why one might not want to use it for stuff, not why you shouldn't want to learn C.
C is one of the minimal languages, with fairly simple syntax, and if there is anything you want to do using a computer, you can do it using C 99.9% of the times1.
No, You should not use C for everything.
I like C. But I will not suggest using it for everything, especially when today there are many languages, each having their own advantages and disadvantages for any particular task :
- Writing a web application? Hard to beat JS or Elm
- Want to check out something quickly, or do data-wrangling? Python might be a good fit
- Want to write a very stable application with helpful compiler and sanity checks? Rust.
- Maths and graphs? R, Matlab, Python+matplotlib - take your pick
- Want to effectively communicate with others without misunderstandings? maybe use ???2
But anyways - I will not suggest using C today for doing everything, especially when there are better alternatives. But again, this is an argument for not using it, not for not learning it.
Then why to learn C
You might be getting a feeling that I like C. It is correct.
With the above examples, why would I suggest learning C anymore? It does not seem to be used that much, it is not that easy to write stuff in, then why?
Well, C is still used a lot, only we don't really get to see a lot of it.
- Most of the Operating systems that are used today - Linux, Microsoft, MacOS, Android; are written mostly in C, with a dash of assembly and hint of other languages. So whatever you are reading/listening this on, you can thank C for making it work
- Embedded systems still hail C. From dials on your devices, smart appliances and whatnot, C still rules the embedded world with the help of assembly. So next time you use your digital dial on something, you can thank C for making it work.
- Almost all of the drivers needed to make hardware work with your machine uses primarily C. There might be other languages thrown in the mix, and there might be some languages trying to take its thrown, but C still stands supreme here. So when you get a new graphics card, or plug-in a mouse and
it-just-works(TM)
, You can thank C3.
But you say you are never going to do that?
Being a person who is interested in Systems and OSs, I like C. And those who are reading and also interested in it might already be interested in C.
But the small number4 of other people who do stuff like web-dev, might never want to deal with it, so why should they bother learning it?
Well, unlike the myth, C might not be the "closest" language to the hardware anymore ; but it still is one of the most down-to-earth5 languages out there. You will still get a lot more understanding of how your computer works, and how the JS interpreter and browser that runs you code and displays your site works under the hood.
It is also a strictly typed language, so you will get a feel of keeping in mind what type your data is when passing around. It can still be useful as a sub-conscious check when using duck-typed languages, to avoid req.redirect is not a function
or myAwesomeVar.myAwesomeProperty is undefined
errors. Don't they just hurt when your code is deployed and crashes, just because that one particular path of execution was missed when you were testing it?
So Should you learn C?
Me, liking C , will say yes. No you should not use Only C and No you should not use C everywhere, but I feel it is worth the effort to learn C and do some small projects in it. It can be a lot of fun and help you understand a lot more about the immensely powerful machines6 that we hold in our hands.
But it might not be easy to do so. Maybe you have tried and stopped, maybe you tried really hard and just couldn't. And I'm interested to know what was it. What is stopping you from learning C.
What stopped me from learning C
Before I started really liking C, there was a time where C felt really confusing, and I also didn't really understand why I should learn C.
For me the reason that was stopping me was the concept of pointers. It took me about three tries with three different approaches to it, before I could finally understand what are pointers and why they are useful.
Funnily enough, the way I finally understood them had hardly anything to do with learning C : I was reading a book on Linux and its features and stuff, and it had a lot of C programs in it as examples of Linux programming. I didn't understand half the things I read about Linux then, but it helped me to get my concept of pointers cleared.
And so now I want to help others as I can. I am thinking of writing a book-as-blog7 in which I intend to start from the very basic concepts, and try to write what I know about C. And for that to be useful, I need to know what do you find difficult when learning about C.
So please help me, and tell me : What is stopping you from learning C? It can be as simple as you never wanted to, or you never really knew why you should, or maybe a concept that you felt was difficult enough to stop learning C. Those who have learnt C and enjoy it, please let me know what resources did you use? Did you find anything particularly good that helped you learn C?
Looking forward to your comments.
Oh, and in case you didn't notice, I really like C.
Thanks for reading!
Cover image credit : By Rezonansowy - This file was derived from: The C Programming Language, First Edition Cover (2).svg, Public Domain, https://commons.wikimedia.org/w/index.php?curid=29423032
-
Rest 0.1% is when you are dealing with hardware at its bare-most level, eg. bootloaders ↩
-
This probably is NP-hard, bordering on unsolvable ↩
-
And the people who do the tedious task of writing and distributing those drivers too. Those also deserve more recognition and love! ↩
-
See proof at https://dev.to/derlin/devto-is-for-webdevs-and-beginners-i-have-data-to-prove-it-54c4 ↩
-
Read down-to-silicon 🥁 ↩
-
Sometimes also referred to as blog-as-book ↩
Top comments (0)