The Feeling of C


It comes on every computer. It is taught to students in computer science and engineering. It is forgetten today. Perhaps this is on purpose. With many even higher level languages being created since it inception C is a animal that is often cringed at due to its manual memory management. This is often seen as a hinderance. It is more like driving a manual car over an automatic. Some people like precision. Control.

For me it is personal. C++ was my first introduction to programming. I remembered asking my older brother before my first C++ class started, what I should expect upon running the program. He compiled it for me and ran it. It printed "Hello World".

Like many of my peers I have spent my first years after graduating as an Electrical Engineering, as a frontend javascript web developer. ReactJs to be exact. It has its beauty. Its efficent at creating progressive web applications.

Getting started in designing and creating a React application is an experience in modern Javascript tooling. Babel to transpile ES6 into a version browsers can understand, Webpack to bundle various file types, Grunt to minify HTML and CSS, etc. You get the point.

On top of all the setup, web applications also have the included joy of browser exceptions for each independant browser; Chrome, Internet Explorer, Firefox, and Safari being the main four. And these browsers update bringing new features, while deprecating others. It is a fight against time.

Recently to get back to my inital training I purchased "The C Programing Language" by Brian W. Kernighan and Dennis M. Ritchie. This book is regarded by many as being the essential book on C. Granted I learned C++ in school, I thought going all the way to the begining would be a fun experience.

It was more than just that.

It was nostalgic and liberating.

I opened a new file in vim by typing vim hello.c. I didn't need any fancy .vimrc to get going. Default syntax highlighting was already included. Vim and C were meant to be together.

I proceeded to type the first program I ever created, and the first one mentioned in the book.


int main() {
    printf("Hello World\n");

    return 0;

Note the slight modifications from the program specififed in the book. Modern compilers now required the return type to be specified on the main function. I suppose this was not always the case.

cc hello.c compiles this program to a.out, the default name for the executable created. No additional software had to be installed. No build tools. No mess. Simplicity.

./a.out ran the program that produced the output we all know too well.

Hello World

I feel a little more at peace.