Magda

23.

Normally, a typical blogger would start off by going on a ramble about how they got interested in a thing and how “fascinated” they were before jumping straight to the point. In this case, however, I will spare readers the pain of unnecessarily long introductions and let out my personal frustrations with teaching myself how to learn my first programming language.

To quickly summarize: My approach focuses on getting as close to the core of computing as possible, meaning that I did not opt for an “easy” language like Python but went with C, which, as far as I can tell, has received a rather bad reputation among the most-vocal developers, largely – I would almost say entirely – for the very wrong reasons. “Wrong reasons” because some issues commonly addressed are not an inherent flaw of C but of programming itself and the vast amount of programmers developing an ego of the size of the Mount Everest. Keeping that in mind, this mind-vomit of mine will be separated into the trouble I have experienced with learning C in particular and my personal issues with developer communities, which will encompass the community surrounding Linux and, more broadly, FOSS.

C

Being the naive idiot, I assumed that nothing would be easier than learning a language as crucial as C due to its versatile nature and a decent compromise between high and low-level languages. Nevertheless, the problems already began when searching for the most up-to-date manuals and guides I could use. Perhaps the biggest disappointment turned out to be The C Programming Language authored by Brian W. Kernighan and Dennis M. Ritchie, the developer of C. This book, often used to introduce students to C, has not been revised since the publishing of its second edition in 1988. As the language itself has undergone three major changes of its standard and likely will see a fourth one in the next few years, it could not be the worst introduction, as the syntax saw significant changes throughout the years.

K&R, as the book is sometimes referred to, provides an introduction to the first ANSI C standard implemented in 1989.

/* Hello World example using the C89 standard */
#include<stdio.h>
main()
{
    printf("Hello world\n");
}

The current standard is informally referred to as C17 or C18, meaning that C's latest standard was implemented in 2018.

/* Hello World example using the C17/C18 standard */
#include<stdio.h>
int main(void)
{
    printf("Hello World\n");
    return 0;
}

Of course, it was not the only piece of documentation I would rely on and checked the seven-year-old notes of a now-former student from India who learned C in an academic environment. He also was taught the C89 standard, though at least included a brief introduction to algorithms. Another book, Practical C Programming by Steve Oualline, provides guidance for the C95 standard, also making it rather outdated. C Programming FAQs by Steve Summit and C in a Nutshell by Peter Prinz and Tony Crawford also have not been revised since they got published in 1995 and 2005, respectively.

Still, I personally expected the most-valuable source would be provided by the creator himself, so when first browsing through the book and noticing the outdated syntax, it was quite disappointing. While it still is a decent resource for theoretical and historical matters, which won't do much harm when also wanting to learn other languages, it also provides too many examples for poor coding practices like a strong focus on char, which might have been more beneficial when computers were not nearly as powerful as they are today. While efficiency still matters, the focus has shifted towards maintainability and readability, which, unfortunately, is not being reflected accurately in widely-recommended documentation.

The Community

When browsing forums and commentary sections of popular news sites dedicated to FOSS, you will come across two types of people: Those unironically calling The C Programming Language “the bible” and those calling C a bad language, the latter being the most common type to encounter. The most common criticism the latter group voices is the supposed “lack of security” C provides, as many programs written in this “mid-level language” often are vulnerable to buffer overflows. This, however, is not a design flaw of C but poor coding practice. While Rust is designed to prevent developers from making buffer overflows as easy to inject as in C, this does not mean that over programming languages do not come with their own disadvantages, such as Python being at noticeably slower than C, long times needed to compile a program written in Rust, and Java being Java.

So, when searching for sources for studying purposes, coming across this petty drama is not just annoying but explains the great division between programmers and consumers, who sometimes, as I learned during a chat with a clerk from my health insurance, can not even comprehend the concept of software versions. Some software developers – and I am only basing this on the vocal minority online – usually are so out of touch with the rest of the world that one might think it has to be satire. Especially the Linux community did not gain a bad reputation for no reason, in fact the stereotype about Linux users being intolerant towards criticism and doing nothing but blindly bashing Microsoft and Apple is something that can be witnessed in the forum of the German magazine heise online every time an article about vulnerabilities or scandals affecting either Windows or macOS is published. This mentality is not exclusive to Linux users: Some developers pride themselves with preferring one language over another and insulting everyone not agreeing with them. Of course, I did not expect any tech community to be all sunshine and rainbows, yet this level of sheer pettiness and whining is something usually attributed to those engaging in political discussions on Twitter.

Solution

As I teach myself, I am not tied to any curricular, company or group telling me what and how to do things, which grants me enough time to work on my own documentation. While this would not make me a programmer per se, I would learn technical writing alongside C. It might make learning things slower, yet provide me a deeper understanding of programming, which is seldom taught in educational institutions, as I would notice when programming a simple knock-off of Crazy Chicken in Delphi/Object Pascal back in year 8.