Live data from Hacker News

Ask HN: How to learn proper systems programming?

news.ycombinator.com

81–90 of 97 posts

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

#81
You know, I don’t think there exists a good book on the subject of systems programming in the sense of building robust concurrent software. There is so much information you gain by experience, and it just hasn’t been put together in one place, if written down at all.

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

#82
> Now I wonder how I can get access to this type of information, how to properly learn it?

You've already got half the solution... "Advanced UNIX Programming" was the goto since it was written, and it has a tonne of industry knowledge e.g fork twice and close handles etc.

"The Linux Programming Interface" is kind of that book for the 21st century, and covers pretty much any topic you'll ever encounter on the systems end.

> Half of the stuff they wrote I didn't understand

Sounds like you bought the books but never read them... because it's all in there.

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

#84

Earlier quoted context omitted.

My perspective: Anything that's been done by a lot of people, has been done well-enough by some stupid asshole. I am a stupid asshole. Therefore, I can probably figure out how to do [thing] well-enough, if it's been done by a lot of people. It's worked out OK so far.

I have printed out a foreword of an old calculus book, and taped to my wardrobe door. It's a long-ish rant, but it ends with this: What a fool can do, another can.

    Considering how many fools can calculate, it is surprising that it should be thought either a difficult or a tedious task for any other fool to learn how to master the same tricks.

    Some calculus-tricks are quite easy. Some are enormously difficult. The fools who write the textbooks of advanced mathematics – and they are mostly clever fools – seldom take the trouble to show you how easy the easy calculations are. On the contrary, they seem to desire to impress you with their tremendous cleverness by going about it in the most difficult way.

    Being myself a remarkably stupid fellow, I have had to unteach myself the difficult, and now beg to present to my fellow fools the parts that are not hard. Master these thoroughly, and the rest will follow. What one fool can do, another can.

http://djm.cc/library/Calculus_Made_Easy_Thompson.pdf

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

#85
Make sure your body and mind are calm and alert. Turn off overhead lights at 9pm. Rise at a consistent time in the morning and view the outside world[1]. Eat nutritious food.

Make sure your desk is clean. Get yourself a nice big pad of dotted paper.

[1] https://youtu.be/nm1TxQj9IsQ

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

#88
"Systems Programming" from a Application Developer's pov involves knowledge of;

  * Low-level languages, compiler runtimes, toolchains and libraries.
  * OS system call apis. 
  * Concurrency. 
  * Networking.
You need books/papers which will teach and walk you through sample idioms and applications in the above domains. A prerequisite is fluency in the C language. With that in mind the following are recommended (some are old books which you can buy used and cheap wherever possible);

* Computer Systems: A Programmer's Perspective by Bryant and O'Hallaron.

* The C Companion by Allen Holub. A gem of an oldie.

* ELF: From the Programmer's Perspective; a paper by Hongjiu Lu.

* UNIX Network Programming by Richard Stevens. Initially, get the old 1st edition since it contains TCP/IP, IPC etc. all in one volume.

* Advanced UNIX Programming by Marc Rochkind.

* Advanced programming in the UNIX Environment by Richard Stevens.

* UNIX Systems Programming by Robbins and Robbins.

* Programming for the Real World, POSIX.4 by Bill Gallmeister.

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

#89

> I had a Rust job for around half a year, where people build web servers and came from a C and C++ background I don't think this is system programming rather network programming. You should try embedded or try to write drivers Better yet write a mini OS your own that interface with hardware Edit: Wow, I'm getting down voted. I guess political correctness

in what world could the negative response to your pedantic and gatekeeping comment be considered "political correctness"

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

#90

> I had a Rust job for around half a year, where people build web servers and came from a C and C++ background I don't think this is system programming rather network programming. You should try embedded or try to write drivers Better yet write a mini OS your own that interface with hardware Edit: Wow, I'm getting down voted. I guess political correctness

I think a good approach to learning systems programming would be to find a piece of hardware, read through its datasheet, and attempt to implement its driver. Or program a microcontroller in rust. Or try to get "hello world" to display on a PC operate without an OS.

There are a lot of neat, and not-too-intimidating things that will give you a good appreciation of the techniques used in systems programming you don't see in other areas. Eg reading technical documentation (datasheets, Reference Manuals etc), reading and writing registers, familiarizing yourself with memory layout, and communications protocols. Writing a HAL to see how you can abstract over register writes to make high-level code.

In other words, I agree, and don't think this post's parent was gatekeeping; it's the definition I had assumed as well.

Post reply on HN