Miscellaneous

Programming for N00bz: C

Note: This article is hosted here for archival purposes only. It does not necessarily represent the values of the Iron Warrior or Waterloo Engineering Society in the present day.

Hello readers! I’m back for the second edition of Programming For N00bz. Before I begin with this week’s topic, I have two minor corrections from the last edition. The first is that you can add Civil, Environmental and Geological Engineers to the list that use MATLAB and the second is that, as a result of that, this week’s column is on C instead of C++.

C is one of the oldest programming languages that is still in use at the University of Waterloo and in industry as it is essential for all computer-related engineering disciplines. The knowledge of C is required for many courses taken by Mechatronics, Computer and Software Engineers. Moreover, outside of engineering, students in computer science and related disciplines use C in many of their courses.

So now the question arises: what is the importance of C? Well, to be brief, C is the backbone of every computing device that anyone has and/or is currently using.

Before going in depth, I need to cover some history first. In 1969, a team of programmers at AT&T Bell Labs created one of the first operating systems UNIX. Denis Ritchie, a member of this team proceeded to develop the C programming language to use with this new operating system. Fast-forwarding in time, UNIX has become the basis of almost every single operating system since its conception. OSX (Mac operating system), iOS, Android, Linux, etc. all involve code bases programmed partially or all in C.

C is unique in many ways because it is still widely used today even though it is almost 40 years old. This is the case because C uses very little memory, has a very efficient operating speed, and is usable on pretty much every single type of computer or mobile device in operation today. C allows the user to have an extremely hands-on and in-depth approach to handling what goes on in a computer while, at the same time, providing the ability to create games and other diverse and cool programs.

Learning C is similar to how linguists and translators learn Latin to better understand the origin and form of other languages based off of it. C syntax (how the language is written) is used as the basis for many modern programming languages that are more widely used by engineers such as C++, MATLAB, C# and Java. This has also allowed these newer programming languages to improve on some of the more obtuse, complicated and obfuscating qualities of the syntax.

For example, C is one of only two programming languages (the other being PERL) that has an annual competition for who can write the most obfuscating, unreadable code to perform a simple task.  For example, one of the winners in 1987 managed to create a program that converted decimal numbers to roman numerals in a frightening block of code.

So to conclude, C is one of the oldest and most important languages in the world of computing today. It is used in almost every computing device that we use in our lives and is the basis for more modern programming languages that build many of our favourite applications. While its use to the non-computer related engineering disciplines may not be as obvious, it is still one of the most important languages to know if you have any interest in programming.

Next week’s column will be on C++, the “next-generation” version of C.

Leave a Reply