Live data from Hacker News

Ask HN: What should a systems/low-level software engineer know?

news.ycombinator.com

71–80 of 231 posts

Re: Ask HN: What should a systems/low-level software engineer know?

#72
post #39

Earlier quoted context omitted.

A quick word of warning: be sure to treat C and C++ as two completely separate languages that just happen to have similar syntax. Yes, you can use C++ as "C with classes" (I and many others sure have at times), but you're doing yourself a disservice most of the time if you do.

Huh. I always perceived C to be a subset of C++.

C enum values are convertible from int; C++ enum values aren't. This is one of the biggest differences in fairly idiomatic C code and has been the case for a very long time (i.e. not dependent on newer C features not being in C++).

    #include 
    
    typedef enum EFoo {
        FOO_A = 1,
        FOO_B = 2
    } TFoo;
    
    int main()
    {
        TFoo foo = FOO_A | FOO_B;
        printf("foo = %d\n", foo);
    }
This compiles in C but not C++.

Re: Ask HN: What should a systems/low-level software engineer know?

#73

Embedded programing pay sucks compared to the web. I wouldn't do it. Just look at the number of web jobs vs system programmer jobs.

As with all these things, "sucks" is relative, and there are low paying jobs for anywhere in the stack. There's certainly fewer employers that need full time low-level software developers. So perhaps the contract/freelance approach is the way to go. It's certainly possible to achieve ~$1.5k/day consulting rates for low-level software development if you're an expert in a niche.

Re: Ask HN: What should a systems/low-level software engineer know?

#74

From the top of my head, these are some areas I often would like other system programmers to know better: - Understanding how to write purely event-based programs using e.g. epoll since that will avoid lots of complexity and potential problems compared to throwing threads at everything. - Floating point representation and gotchas ("What Every Computer Scientist Should Know About Floating-Point"). - Unit-testing as pa…

I would expand on your last point. Latencies all programmers should know: https://gist.github.com/jboner/2841832

Re: Ask HN: What should a systems/low-level software engineer know?

#75

Earlier quoted context omitted.

FWIW I think he's wrong. Basically, when writing C, you should write code the same as if you'd write it in C++, except that you're using C. Because sometimes that's annoying, things can get less type safe, but in your head, there's a C++ program that you're representing.

Programs written in this mindset might be the number one reason why C has a bad reputation. Of course, if you just emulate what other languages automate for you, you should better write in these languages. But in reality, why C is still the best programming language for large projects (IMO) is exactly that the programmer is allowed to choose a suitable structure, such that the program can fulfill the technical requir…

What.

What good programs are written in C that don't have well-structured memory management the way C++ does it with RAII?

Edit:

"But in reality, why C is still the best programming language for large projects (IMO) is exactly that the programmer is allowed to choose a suitable structure, such that the program can fulfill the technical requirements. Other languages force the project into a structure that somehow never fits after a couple thousand LOC."

Yeah, this doesn't make any sense. The reason is, C++ doesn't impose anything on your program structure that C doesn't, while C, with the limitations it has, imposes a tax on all sorts of ways of structuring your program.

For example, you can't practically write a program using a futures library (such as the Seastar framework) in C. And every program you write in sensibly written C can be translated to C++. The exception might be really really small-scale embedded stuff that doesn't allocate memory.

Re: Ask HN: What should a systems/low-level software engineer know?

#76

From the top of my head, these are some areas I often would like other system programmers to know better: - Understanding how to write purely event-based programs using e.g. epoll since that will avoid lots of complexity and potential problems compared to throwing threads at everything. - Floating point representation and gotchas ("What Every Computer Scientist Should Know About Floating-Point"). - Unit-testing as pa…

The only thing I would add to this list is security. Understanding how low level code can be exploit and how to code defensively to insure you don't cause bad things. Also the basics about cryptography. It isn't enough to just use a library that implements encryption you must know what and why. You be surprise how much software use encryption that is fundamentally broken causing it being useless to even use.

Re: Ask HN: What should a systems/low-level software engineer know?

#77
post #49
post #24

Earlier quoted context omitted.

I don't do embedded systems, but as a self-respecting software engineer, I am intending to develop proficiency in C/C++ over this next year. Does anybody have any recommended books/courses/projects?

Zed Shaw's Learn C the Hard Way.

http://hentenaar.com/dont-learn-c-the-wrong-way

Re: Ask HN: What should a systems/low-level software engineer know?

#78
post #56

From the top of my head, these are some areas I often would like other system programmers to know better: - Understanding how to write purely event-based programs using e.g. epoll since that will avoid lots of complexity and potential problems compared to throwing threads at everything. - Floating point representation and gotchas ("What Every Computer Scientist Should Know About Floating-Point"). - Unit-testing as pa…

Maybe it is just me, but I've seen this issue multiple times where a programmer used a regular expression thinking they were clever, only to have it backfire later when there was some corner case not covered by their regex (which likely would have obviously been caught if they had just taken the time to write out each case as an if statement). You're usually just gaining complexity in exchange for fewer lines of code…

Regardless of implementation (regex vs. conditionals), there should be sufficient unittesting to make sure that all the corner cases are tested. For embedded systems, the complexity tradeoff is relevant though, since a regex library will (probably) take up more code space than some conditionals.

Re: Ask HN: What should a systems/low-level software engineer know?

#80
post #21

Earlier quoted context omitted.

Are the jobs still there or are they disappearing? I am bored of the churn associated with stuff higher up the stack. I would prefer to master a craft rather than chase new fads every few years.

Maybe look into mainframes such as the i series. You won't experience churn there. And there will be an increasing need for younger developers in this area in the near future as many of the current developers will be retiring. Also, you won't be required to work on pet side projects, push them to Github, blog about them and post Show HN comments to build up street cred for future job interviews. But I have no idea ho…

There's still quite a few local govt that I've worked with that still use AS/400s / iSeries type stuff for all financials. One just bought a brand new one a year or so ago because it was cheaper to buy a new one than replace it with any other system.

I learned enough to know when to call IBM for support, but with that experience it wouldn't be too difficult to find another job managing one.

I remember 12+ years ago, my old boss bitching about working on an AS/400, then he'd hire his brother (who worked on them for years) to come out to do very simple stuff for quite a high premium.

I just wish they weren't so proprietary, but at the same time, I am glad they are. It's been a love hate relationship.

Now I work with an AIX system. Unix under the hood, but IBM still has a stranglehold on it. Both tanks though.

Post reply on HN