chasekaylee

chasekaylee

Do you recommend learning C?

Hi everyone! I have been in the professional industry for ~2 years now coming from a boot camp. I started a base foundation by programming heavily with JavaScript. I have various full stack experiences, and love learning everything related to computers + tech. I have recently been heavily invested in learning all about Linux, cloud development, + Elixir (random side note).

That being said, because of my background, I sometimes feel like I am behind in the core fundamentals in CS. I first started to learn programming and have the most experience with JavaScript, but sometimes I feel like it has not provided me with the solid foundation to become a proficient back end developer. I have been putting a lot of effort on data structures and algorithms (not the best but I really enjoy learning about these) and have been trying to build a solid cs foundation for myself.

Do you guys recommend me learning C to gain a more solid understanding of fundamental computer theories / how computers think? If so, I would really appreciate some of your recommended resources to get started! Thanks again for reading and any advice you have! If you recommend any alternatives I would appreciate that as well!

Most Liked

dimitarvp

dimitarvp

I am not 100% clear on your goals – they are rather vaguely stated. If you want to go the lowest possible level before reaching for assembly and machine code then sure, C can teach you how are things done in x86 / x86_64 land (not very sure it can teach you much about platforms like ARM and MIPS but it probably could). Can be useful if you are very much into programming various IoT devices, car mini-computers and in general devices where even slightly higher-level system languages (D, Rust, Nim, Zig) are a no-go – but mind you, that gap is being eliminated little by little every month.


Now for my opinions.

If you want to go low level I recommend learning C only to an extent and then reach for Zig. It’s an amazing language aimed to directly compete with C and recently its author also added very valuable integration with C compilers. I strongly recommend reading this article, it’s very insightful both for C and Zig compilation!


Kudos for reaching for Elixir. It’s a secret weapon for many (myself included) and is generally underestimated – but it has a runtime (well, Erlang has, but Elixir gets it by the virtue of stepping on Erlang) that all other languages out there can only dream of: transparent green thread multiplexing on all CPU cores/threads, lag-less operation, predictable performance even under heavy load, supervision trees / auto-restarts on minor failures, message passing between actors/processes… These are things that I and many others tried to make in C++, Java, PHP, JS, Ruby, Python and other languages over the courses of our careers – and failed every time, while Erlang has been there all along.


…If you are looking for code much faster than JS, natively compiled, and with strong static typing then definitely go for Rust. As much as I love Elixir and always will, Rust beats it in no small amount of areas: it has an absolutely fantastic community (Elixir as well; it’s one of the best communities I ever participated in!) – very smart and experienced people, amazing documentation (their official online learning book has different styles depending on if you prefer to read more or exercise more), and they are very keenly aware of the shortcomings of the language compared to stuff like C++ and Java and are working day and night to erase the gap. There is a huge amount of libraries, like anything you can think of is 99% likely already there (sadly not the case for Elixir). They are also working on having a runtime like Erlang’s (the BEAM VM) but sadly that seems far away from happening just yet – no wonder, the BEAM is 30 years old. Rust can get compiled on a plethora of platforms as well. Not as wide-reaching as C but it’s pretty close.


Haskell and OCaml are other very strong contenders. But have in mind that, especially with OCaml, you will mostly be learning on your own – there are a ton of resources out there, mind you, but stuff you take for granted (like UTF-8 strings) you have to specifically take care of in those: they have libraries for them but in general you have to be much more explicit in what you want. And those languages’ strong points do require heavy upfront learning investment to become really good at (especially Haskell’s monads).

I sit somewhere a bit higher on the stack; I’d like some things to be baseline and then build on top of that (Elixir and Rust have UTF-8 strings built-in, for example). But, you know, preference.

In case it matters, in the last several years I worked exclusively with Elixir and just recently started a job with Rust. These two languages can cover like 99% of everything I ever needed in my 18.5y of career.


Lastly, to answer the title: I recommend learning C only to an extent. Learn pointer arithmetic, learn basic vtable dispatch (emulating the OOP class/method constructs), learn stack buffers and heap memory semantics. But don’t tarry on C. Just go for other languages – Rust is my top recommendation.

Hope this helps, even if it’s largely a personal take on the topics you raised.

dimitarvp

dimitarvp

I also performed quite fine with imperative languages but… there was always something missing. I was keenly aware that I was riding on the shoulders of giants and had no real idea how stuff below worked (well, I did because I started with Assembly and C about 19y ago but I don’t know how the JS runtime works to this day). I wanted to know how the engine under the hood worked!

So I get the sentiment fully. :slight_smile:

To really bend your brain and learn a bit more about the mathematical side of programming – invest in FP. Doesn’t matter much if it’s Elixir, Erlang, LISP, Haskell, OCaml or what-have-you (although LISP is likely the closest to math and programming at the same time).

I recently bought Hands-On Data Structures and Algorithms with Rust but haven’t read it yet so can’t give you a recommendation for/against it.


The impostor’s syndrome is very real and you should to your best to fight against it. Academic prowess rarely wins the day; it’s the practical people who know technology good enough but are excellent communicators who get the big money in the end.

chasekaylee

chasekaylee

Wow… Thank you for your amazing response. I appreciate it so much. Apologies if my original goal in mind was stated very vague. Since I was originally taught programming in a way to get a job as fast as possible, learning JS, various web frameworks, NodeJS, etc. I feel like I have a gap of knowledge between myself vs “CS majors and MSCS” programmers in terms of my knowledge of theory + “core CS fundamentals” . I’ve been trying to fill that gap recently, by teaching myself various CS fundamentals and was just curious to the best way to approach that. I wanted to note I really enjoy learning and teaching myself these fundamentals in my free time (vs. forcing myself to do this). Also worth noting I have been doing fine at my current job in terms of performance. These are just my own internal thoughts.

My thoughts are still all over the place and I’m rambling, but you definitely helped me with a starting place! I guess Impostor Syndrome still sets in every once in a while :smiley:. I appreciate your help! You are definitely right about the Elixir community though. I have been starting to try and get more actively involved and it has been an amazing experience so far. Thanks again for the thorough insight and sorry again if my thoughts aren’t completely clear.

Where Next?

Popular General Dev topics Top

AstonJ
In your opinion which programming languages are simple to use and easy to get started wither those who don’t have a computer science bac...
New
AstonJ
Want to plug where you work? Here’s your chance! Perhaps you could also mention what kind of stuff you’re working on? :nerd_face:
New
AstonJ
Do the test and post your score :nerd_face: :keyboard: If possible, please add info such as the keyboard you’re using, the layout (Qw...
New
AstonJ
Are you a touch typist? :keyboard: poll If you haven’t checked your typing speed yet, you can do so here here :smiley:
New
AstonJ
The dev world doesn’t sit still, in fact it is probably one of the fastest paced industries around - meaning to stay current we are conti...
New
AstonJ
Continuing the discussion from Thinking about learning Crystal, let’s discuss - I was wondering which languages don’t GC - maybe we can c...
New
dwaynebradley
In their weekly newsletter, Jared Santo from the Changelog shared this blog post by Mark Ericksen over at fly.io: What is really inter...
New
GermaVinsmoke
Do you like to help others on stackoverflow in your free time? And what’s your reputation on Stackoverflow? :smirk::joy::rofl:
New
Exadra37
A modern streaming platform for mission critical workloads Redpanda is a Kafka® compatible event streaming platform. No Zookeeper®, no JV...
New
jaeyson
Hi!, hope everyone’s ok. Sorry if this question is ambiguous (i’ll remove this if i break some rules here). This is more like a self-ques...
New

Other popular topics Top

AstonJ
If it’s a mechanical keyboard, which switches do you have? Would you recommend it? Why? What will your next keyboard be? Pics always w...
New
axelson
I’ve been really enjoying obsidian.md: It is very snappy (even though it is based on Electron). I love that it is all local by defaul...
New
Exadra37
Please tell us what is your preferred monitor setup for programming(not gaming) and why you have chosen it. Does your monitor have eye p...
New
AstonJ
SpaceVim seems to be gaining in features and popularity and I just wondered how it compares with SpaceMacs in 2020 - anyone have any thou...
New
brentjanderson
Bought the Moonlander mechanical keyboard. Cherry Brown MX switches. Arms and wrists have been hurting enough that it’s time I did someth...
New
Rainer
My first contact with Erlang was about 2 years ago when I used RabbitMQ, which is written in Erlang, for my job. This made me curious and...
New
mafinar
Crystal recently reached version 1. I had been following it for awhile but never got to really learn it. Most languages I picked up out o...
New
New
PragmaticBookshelf
Author Spotlight Rebecca Skinner @RebeccaSkinner Welcome to our latest author spotlight, where we sit down with Rebecca Skinner, auth...
New
Fl4m3Ph03n1x
Background Lately I am in a quest to find a good quality TTS ai generation tool to run locally in order to create audio for some videos I...
New