My Entire Week So Far
So far, I’ve spent the week programming in the C language as part of CS50s intro to computer science course.
I’ve built 4 console programs in the language. The first was to build a program that would print “hello world!”, the second was to calculate how long it would take a population to grow to a given size, the third was to build a program that would print a pyramid to the screen using a given number and the last was to implement Luhn’s algorithm.
The last one took the longest and was the one that taught me a lot about the C programming language.
What’s so special about C
C is a procedural programming language that is over 50 years old as it was released around 1972.
C is also a Mid-Level Language. Mid-level languages are the middle ground between low-level languages like Assembly and high-Level languages like Python or JavaScript. This means C is easier to understand but also isn’t packed with features like OOP (object oriented programming), run time checking, namespaces or garbage collection.
This keeps it simple but does mean that the programmer will have to write the code that does what modern high level languages do automatically. Programming in C helps the programmer to understand some fundamentals of computer science like dealing with pointers and memory management.
In modern high level languages, the machine level details are hidden from the user, so in order to work with CPU cache, memory, network adapters, learning C programming is a must.
What I’ve Learned
Although I’m currently working in the industry, I’ve still been learning a lot from CS50s intro to computer science course and I’m glad I’m doing it as I don’t think I would have had any reason to pick up C.
Programming in C, I’ve realized that a lot of the stuff developers take for granted in modern languages such as Python like retrieving an arrays length, passing arrays into functions, string interpolation/formatting or splitting a value into an array, isn’t so easy to do.
This just makes you appreciate these modern languages even more.