Michele Nasti

Thoughts on what I learn

I wish I had a programmers' quarantine

Hello devs, I wrote this article during COVID-19 quarantine, hopefully you'll read this post when it's all over and we'll think of this period as a not-so-painful memory.

Italy was one of the first countries to start a hard quarantine, and expecially in my region we closed restaurants, bar, gyms. Even walking out was problematic. So, in theory, we all had a lot of free time.

Credit for the image: freecodecap.org

In reality, something has changed in my life and it's something you usually don't associate to a programmer: I committed the sin of building a family, with a wife and a daughter👪

So yes, I was itching my hands thinking of all the side projects I could complete, books I could read, online meetups I could organize; in reality, my job already takes 8-9 hours of my day and after that I have to reconnect with the family.

So, time for my personal projects is very limited and I'm trying to use it wisely.

I'm using these days to fill some holes in my preparation, so for example I'm studying C again. At the time I first studied C in university, I did not understand many concepts very well. Now they feel like a natural concept, but back at the time it was the first meeting with a real programming language and it was too much for young Michele.

My plan is to understand the basics of how operating systems are made. I was reading a book about it, when the author started discussing about assembly and C and I felt the urge to get those concepts back in my mind again.

Here are some of the questions I left unanswered:

  • Are C programs always compiled to one big application?
  • If not, How is it possible to compile a file into a library and use the library as an external resource in a C program?
  • How are strings handled?
  • Is everything global, even the functions declared in external files? What are the best practices to avoid name clashes?
  • What's the malloc/calloc/*alloc fuss?

I know what you think, "duuude these are very basic questions" and really they are, but I was in some kind of learn-and-forget state during university and also it was my very first exam, it didn't go well: for example, once the vote was registered, I asked the teacher to redo the exam in order to "upgrade" my vote. He looked at me very calmly and said: "this is not how university works..."

To conclude, if you have answers to the above questions, feel free to answer in the comments. If you're interested in detailed answers, I'll try to write some articles on C on my blog. I'm reading the super-famous K&D book, hopefully I should find all my answers there ;)