Live data from Hacker News

Ask HN: Web Developer looking to move to Systems Programming seeking advice

news.ycombinator.com

11–14 of 14 posts

Re: Ask HN: Web Developer looking to move to Systems Programming seeking advice

#11
post #7

Earlier quoted context omitted.

Yes, I'm aware of what is involved in systems programming and what kind of problems I might end up solving. However my knowledge is mostly theoretical or based on spare time hacking or university classes practice. The point you are raising is valid though. One should be aware where he is going to stick his nose :) Based on your previous post I see that you are an embedded developer. Would you mind to shortly tell how…

How I started: I got hired right out of college (with a math and physics degree, not CS) for an embedded position. From that start, I've been in embedded for almost all of my 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 y…

What would be the situation in which you can't run debugger? Is this when the issue can't be reproduced in dev environment?

Re: Ask HN: Web Developer looking to move to Systems Programming seeking advice

#12

Earlier quoted context omitted.

How I started: I got hired right out of college (with a math and physics degree, not CS) for an embedded position. From that start, I've been in embedded for almost all of my 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 y…

What would be the situation in which you can't run debugger? Is this when the issue can't be reproduced in dev environment?

You can't run a debugger when you don't have room on the embedded device for the debugger. You can't run one if you don't have communication with the device (if you're installing code by physically inserting ROM chips in sockets, and don't have a serial port or ethernet connection to it.

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.

Re: Ask HN: Web Developer looking to move to Systems Programming seeking advice

#13
post #3
post #2

I am not a systems programmer myself, but if you are looking for resources, I can recommend the book "Computer Systems: A Programmer's Perspective". We used this textbook in some systems classes I took in school, and I thought it was pretty helpful and informative.

Thank you. I will definitely have a look at that book. This 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: Princ…

I am familiar with maybe half of the books you mention, and the selection seems quite solid. I would however recommend to spend less time reading and more time hacking. Also, try to approach this as a series of steps, not everything in one go:

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%).

Re: Ask HN: Web Developer looking to move to Systems Programming seeking advice

#14
post #3

Earlier quoted context omitted.

Thank you. I will definitely have a look at that book. This 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: Princ…

I am familiar with maybe half of the books you mention, and the selection seems quite solid. I would however recommend to spend less time reading and more time hacking. Also, try to approach this as a series of steps, not everything in one go: 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 fa…

I was thinking somewhere on the similar lines when deciding how to approach this. I split the process into 3 initial steps as well.

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?

Post reply on HN