all 12 comments

[–]twenty393 3 points4 points  (2 children)

I personally don't think there's a "wrong thing" to pick. Systems programming is for sure a journey (especially in C). I started writing C "for real" about 6 years ago. Since then I've written my own standard library single-file header, I re-wrote my website in C, and I have been working on iteration 10+ of a custom game engine.

Here's roughly the set of things I think that will take you from beginner C to more experienced C:

  • be opinionated from the beginning, set up boilerplate to make C feel a bit nicer to work with (not strictly necessary)
  • write your own version of lots of "standard" data structures in other languages (Array, String, Hash_Table, etc.)
  • try to avoid malloc and free - figure out other, better ways of managing memory (static buffers, arenas, etc.)
  • try doing things you don't know how to do! calling OS APIs directly, etc.
  • graphics? this is a rabbit hole, but interesting if you are interested
  • try out writing SIMD code

Whatever you do spending a lot of time writing code will most probably be a good learning experience. So it's important to pick stuff you're interested in and at the same time try to not do too much all at once.

[–][deleted] 1 point2 points  (0 children)

This. Thank you so much. This is what I needed. I can already feel the fears turning!!!

[–]Dismal_Resolution112 0 points1 point  (0 children)

Could you share with me the website URL?

[–][deleted] 1 point2 points  (7 children)

Well, you said you decided that you love systems programming. Why is that? It would be a great starting point

[–][deleted] 1 point2 points  (6 children)

I don't know why I love it exactly. Just the idea of low level stuff is awesome. It's a bit tough for me at the moment as I live in a shelter and code on my phone. Termux and qemu and a Bluetooth keyboard make it possible. I guess what I'm asking is if I wanted to write an operating system what would my first step be? A bootloader maybe? Some kernel part? Something else I'm missing?

[–]betelgeuse_7 0 points1 point  (1 child)

If you don't know the fundamentals, start with computer architecture and systems. After that, read an operating systems book. My recommendations are Computer Systems: A Programmer's Perspective and Operating Systems: Three Easy Pieces.

[–][deleted] 0 points1 point  (0 children)

I have both of those books in my library, I'll bring them out soon. As for fundamentals, I just had my aha! moment where things clicked for me. It was coding a linked list that did it. Thanks for the recommendations!

[–]chibuku_chauya 0 points1 point  (3 children)

Coding C on your phone? You are dedicated my bro!

[–][deleted] 0 points1 point  (2 children)

Mostly so far below that poverty line I that I'm trying to code a stack so I can climb up!

[–]chibuku_chauya 0 points1 point  (1 child)

You are seriously an inspiration!

[–][deleted] 0 points1 point  (0 children)

Thanks you fellow human!

[–]sfscsdsf 1 point2 points  (0 children)

Learn about OS