Live data from Hacker News

Ask HN: How to learn proper systems programming?

news.ycombinator.com

41–50 of 97 posts

Re: Ask HN: How to learn proper systems programming?

#41
post #34

Follow-up question: how do I learn systems programming on Windows ? I know it’s pretty easy to just set up a Linux VM or use WSL2, and I’m prepared to do that if I must, but it would be even easier if I could work in the same Windows environment I normally use. However, from what I’ve seen, practically all guides to systems programming seem to start off by assuming you’re using Linux. (And by the way, thanks OP for a…

IMHO getting into the world of malware analysis and reverse engineering could be profitable for both your brain and your pocket. And they force you to go deep from day one.

I do not have the expertise to work on either field but this is something in the plan. The good part is that most malwares are targeting Windows so you get a lot of samples.

Re: Ask HN: How to learn proper systems programming?

#42
Get a job in the field. Some places might be willing to take a chance on you if you are a good generalist engineer.

Also, make the case that many things that you learn while doing frontend programming like asynchronous programming are skills that will port over just fine.

Re: Ask HN: How to learn proper systems programming?

#43
These are some topics you might be interested in:

* C/C++

Learn C and it's standard libs (stdio etc..), if you haven't already. Choose a good book for this because many tutorials etc.. you find online are pretty incomplete. Then read one of your books about UNIX APIs.

Also it's worth learning how to use a C debugger (gdb or visual studio one).

* OS

You can look at linux source code but it would be daunting. I'd suggest starting with a Teaching OS and accompanying book, eg xv6 or minix.

Try doing modifications in it. toy OSes generally come with such exercises.

* Assembly language

Learning C doesn't give a perfect idea how machines work. Learn X86_64 assembly programming. you can inspect what assmebly output your C programs give using godbolt's compiler explorer website. Assembly is little boring so don't try to memorize instructions. The mental model is important thing.

* Basics of algorithms and data structures

Maybe you already know, because you worked in back end. But if you're not familiar with few data structures like hash tables, b trees etc.. it might be worth familiarising yourself.

Some miscellaneous topics you might get interested in: linkers / executable formats, OS level stuff related to computer networks, multi threading, file systems, SIMD / vector instructions in assembly.

As others said, write some code when learning. You don't need to do entire projects yourself, you can also play around with established projects.

Re: Ask HN: How to learn proper systems programming?

#44

These are some topics you might be interested in: * C/C++ Learn C and it's standard libs (stdio etc..), if you haven't already. Choose a good book for this because many tutorials etc.. you find online are pretty incomplete. Then read one of your books about UNIX APIs. Also it's worth learning how to use a C debugger (gdb or visual studio one). * OS You can look at linux source code but it would be daunting. I'd sugge…

>Choose a good book for this because many tutorials etc.. you find online are pretty incomplete.

As an aside, the C Programming Language by Kernighan and Ritchie is still the best C book I can think of.

And Hacker's Delight is always a fun book to play with algorithms.

Re: Ask HN: How to learn proper systems programming?

#45
post #12

There are two books that taught me how systems work. - One system in isolation - Operating Systems: Three Easy Pieces . Covers persistence, virtualisation and concurrency. This book is available for free at https://pages.cs.wisc.edu/~remzi/OSTEP/ - Multiple systems, and how data flows through them - Designing Data Intensive Applications . Covers the low level details of how databases persist data to disk and how mult…

I agree with the Operating Systems Three Easy Pieces textbook. It was used in one of my courses in college and even as a bad dev then, it made me appreciate a lot of things I take for granted, as well as C. Although once I got to the scheduler, mutexes, etc I lost interest haha. But making my oen linked list was a very fun exercise.

Re: Ask HN: How to learn proper systems programming?

#47

Years ago I modified the Postgresql source code (8.xx). It's something I was terrified of doing. But once I got in there and started poking around, I realized it was just ordinary plain-vanilla C code. Not C++. Just C code. With my local copy, I started to hack pg_dump to do something special that we wanted at the time. Even after 30 years of coding, I'm not that especially good of a programmer. But I ended up gettin…

> Those bits are just bits. And it's just code... and most of it was not written by wizards. Just ordinary people like you and me. Don't be afraid man.

Code is easy and doesn't scare me. I'm scared about the platform though: code runs on platforms (POSIX, mostly), which are incredibly dated, ill-designed and full of terrible corner cases[1]. There's so many ways to shoot yourself in the foot I'm afraid to do anything sensitive on my own.

«It is not UNIX’s job to stop you from shooting your foot. If you so choose to do so, then it is UNIX’s job to deliver Mr. Bullet to Mr Foot in the most efficient way it knows.»

[1]: Dan Lu's writing on files are a good illustration of that:

- http://danluu.com/file-consistency/

- https://danluu.com/deconstruct-files/

- https://danluu.com/filesystem-errors/

Re: Ask HN: How to learn proper systems programming?

#48

Years ago I modified the Postgresql source code (8.xx). It's something I was terrified of doing. But once I got in there and started poking around, I realized it was just ordinary plain-vanilla C code. Not C++. Just C code. With my local copy, I started to hack pg_dump to do something special that we wanted at the time. Even after 30 years of coding, I'm not that especially good of a programmer. But I ended up gettin…

My thoughts as well. Send patches in to FLOSS projects.

I sent in a patch to an experienced C programmer a few years ago and in his code review he said about my #ifdef flags - "Typically HAVE_X are about the environment and USE_X are optional features within that environment."

Listening to Linux kernel developers online, they say a lot of people start kernel development with one small patch, or attempting to port some new device or chip to work with Linux. Once their patch gets merged, they sometimes continue to send in patches. The developers say that good contributors tend to not last long as independent contributors, and tend to get pulled into companies who need such programmers.

And there are open jobs for people with such skills ( https://us-redhat.icims.com/jobs/84882/senior-software-engin... )

Re: Ask HN: How to learn proper systems programming?

#49
Join the Handmade Network [0], which is a large online community of low-level programmers.

Later this year we're having our third conference [1], so it could prove useful* to meet up with systems programmers there.

* The usual self-plug warning (I organize these things.)

[0] https://handmade.network

[1] https://www.handmade-seattle.com

Re: Ask HN: How to learn proper systems programming?

#50
All the three books you've listed focus on APIs and code. It's also useful to know what's going on in the machine so that these APIs can be understood more easily.

The "Operating Systems - Three Easy Pieces" is one great book that has already been mentioned. I would also suggest "Computer Systems - A Programmer's Perspective" along the same lines (https://csapp.cs.cmu.edu/).

Computer Networking is another field you're likely to run into. "Computer Networks: A Systems Approach" is a good book (https://book.systemsapproach.org/)

Post reply on HN