Ask HN: Web Developer looking to move to Systems Programming seeking advice
At this point I feel that to continue working as a programmer I need to change my field. Programming can be very interesting and rewarding experience to both programmer and surrounding community, but it can also turn the other way around if you lose your motivation.
My real passion lies in systems programming I believe as I was always interested in operating systems, programming languages, algorithms and related stuff.
I would be very interested to hear if anyone did a similar transition to systems programming and how did it go. How long did it take for you to learn everything? Did you take a more general approach or did you target a very specific area? How long did it take to get your first job as a systems programmer and what it was?
Any kind of related experiences would be very helpful to me when making this decision. Thank you.
13 comments
[ 4.5 ms ] story [ 44.2 ms ] threadThis is what I have on my list so far:
The C Programming Language
C Interfaces and Implementations: Techniques for Creating Reusable Software
Expert C Programming
Algorithms in C, Parts 1-5 (Bundle): Fundamentals, Data Structures, Sorting, Searching, and Graph Algorithms
Structure and Interpretation of Computer Programs
Introduction to Algorithms
Compilers: Principles, Techniques, and Tools
Hacker's Delight
Cracking the Coding Interview: 150 Programming Questions and Solutions
Advanced Programming in the UNIX Environment
1. Learn C, the Language: You should already know the basic components of structured programming (functions, loops, conditionals, etc). As PHP user you probably are somewhat familiar with C standard library (with PHP just puts a thin layer on top of), but you are a false beginner here because you need to learn to be much more careful with manual memory management, compiler erros vs warnings. Just pick some project whose specification is dead simple (a little console based game like sudoku might do) and build it from the bottom up.
2. Learn C, the Runtime: Get deeper into standard library functions. Pick something more sophisticated in terms of I/O. Learn the difference between static vs dynamic linking, and try to work around it just for the sake of it (make your own malloc is a classic).
3. Learn C, the Unix's companion. Figure out what a system call is and how it is unlike a regular function call. Learn Linux (I know you mentionen MINIX elsewhere, and it would be valuable in a 4th or 5th step, but for the sake of employability it is better to be a power user of a mainstream system than an expert in an academic one). Figure out stuff like virtual memory, how it works and how to affect it at the C level (which should be transparent, and mostly is but not 100%).
1. Learn the C language. Read K&R book, then get my hands dirty with some relatively simple problems. Here I'm actually deciding between practicing with algorithmic problems and doing a simple project or I can probably do both. Anyway I'm leaning towards algorithms because they normally are short enough to be possible to work on with the minimal amount of knowledge on the standard library and are complicated enough to be a good practice, particularly when it comes to performance and memory usage. This approach would also make me learn how different data structures are handled in C and how to deal with memory management.
2. Learn systems programming. At this step after some initial reading I would like to join a relatively small open source project and try to fix some bugs or contribute some small changes to it. I didn't decide yet what particular project it could be so any suggestions are welcome :) At this step I should become comfortable with writing C and gain some basic knowledge on systems programming.
3. Get deeper into systems programming. This is were I'm deciding between taking on Linux/BSD or MINIX. I suppose MINIX should work very well as a learning tool for OS design and implementation. So it could make transition to Linux/BSD easier. At this stage I could probably join some open source OS project.
What comes after that I'm not quite sure. There may be more steps involved or I may be ready to look for a job at this point.
I may also need to decide what exactly I want to work on which leads me to the difficult question I raised to myself when thinking about this. Should I specialize from the very beginning or can I be a generalist with a strong general systems programming knowledge and then get to the details when the need arises based on particular job?
Based on your previous post I see that you are an embedded developer. Would you mind to shortly tell how you started and what you found most difficult or most important in the beginning or even later in your career?
What I've found to be important/different: Debugging can be really hard. You can't always run a debugger; you can't always print something out. Sometimes bugs can come from interaction between different threads, which is something that you don't run into in many kinds of programming. You have to watch for multiple threads accessing the same data, and you have to figure out what you need to do if it happens. You need to remember that any thread can stop running between any two assembly instructions - a C statement is not atomic.
I've never done system programming, but in ignorance I think it's harder than what I do. It's got all of my problems, plus a bunch more...
And you can only run a debugger with great difficulty if your system is handling real time events, and if the debugger hits a breakpoint, you mess up the timing so that the behavior from that point on is completely changed. You might be able to get the information that the breakpoint triggered, and what the variables are at that point in time, but you can't continue from there and see how execution proceeds.
What do you think about MINIX as a learning tool? It seems to look as a good place to start but I don't know much details about it's internal design except that it's using a microkernel which is different from most operating systems in use today. So I'm not sure about the practicality of spending time on MINIX. My other open source project choices would probably be Linux or one of the BSDs.