Tullio Facchinetti

Learn enough C to survive

by Tullio Facchinetti

Categories: article lang_en article_en programming C


Forewords and personal considerations

The considerations in his post have been inspired by this one on Code of Honor by Noah. Some text is taken from the original post verbatim.

With respect to the original post, I believe that a proper learning of the C language, backed by the necessary context about underlying concepts related on the functioning of the computer, such as CPU, registers, memory, addressing, etc., makes the C language a formidable tool for a “practical comprehension” of the matter.


Original post and integrations

If you play around with your computer long enough, you will inevitably probably encounter C. Maybe you use dwm and need to write your config file… in C. Or you want to work on an optimized Python module… in C. Or a kernel driver, or Apache, or… well, you get the picture. The picture is even bigger than that, though.

In fact, one of the most notable applications of the C language is in the implementation of the Linux kernel. This example does not come by chance. The consideration about the use of the C language in the kernel is related to the recent introduction of a second language that is officially supported for kernel development: Rust. Rust aims at improving C and C++ under several aspects, most importantly by preventing many common issues in the use of memory and pointers. Although Rust is a better language under this viewpoint, it nevertheless requires an adequate knowledge of the same aspects that make C hard. This means that, whatever the language that one may learn, the underlying concepts behind the functioning of the calculator are always necessary for an adequate comprehension of the various aspects of the programming language. In this scope, C is probably the simplest languages that allow such a comprehension.

Someone learn C as part of a naive, heroic quest to “understand how computers really work”. Which, spoiler alert, is not gonna happen. But still. Learning about pointers and the heap and how data types are just names for adjacent bits in virtual memory and all that stuff - there’s something to it.

As the founder of StackOverflow puts it:

Heck, in 1900, Latin and Greek were required subjects in college, not because they served any purpose, but because they were sort of considered an obvious requirement for educated people. […] Are pointers and recursion the Latin and Greek of Computer Science?

Joel Spolsky, The Perils of JavaSchools

The academic prestige of Latin and Greek underwent a steady, centuries long decline. Where do C and assembly fit on this map? We certainly aren’t in a Medieval University, where these topics were mandatory, but neither are we in a post-modern sociology class, where the classics are not only dead, but whose distant memory haunts our conscience.


Highlights

  • Students and theses
  • Publications
  • Thesis topics
  • Curated awesome list of CLI apps
  • Last updates (English)

  • Students and theses ()
  • Students and theses - English ()
  • Learn enough C to survive ()
  • Workflow for writing theses collaboratively ()
  • Guidelines for theses and presentations ()
  • Projects ()
  • Shortcuts for Bash ()
  • Last updates (Italian)

  • Risultati FdI 21-25 Novembre 2022 ()
  • Studenti e tesi ()
  • Risultati FdI 29 Settembre 2022 ()
  • Risultati FdI 02 Settembre 2022 ()
  • Risultati FdI 28 Luglio 2022 ()
  • Risultati FdI 29 Giugno 2022 ()
  • Interfacciamento client-server con il simulatore di propagazione del calore Energy2D ()
  • List of categories

    article article_en article_it C courses fdi lang_en lang_it latex programming project research results robotics software teaching thesis tips