Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Linux developers knowing C++? [closed]

Tags:

c++

c

linux

I got into a discussion a while back. The company I work at develop under Linux and does so in ANSI C. A lot of benefits could come from moving to C++ as far as design goes I think. Our existing code would just have to get rid of all implicit type casts since C++ is a bit stricter about that and it would compile and run as usual. But I was told that we would never start using C++. The reason was that "Linux developers know C", but it would be very hard to find Linux developers who know C++. Personally I find this kinda strange since I started out by learning C++ on Linux. But it made me curious and I wonder if there are any statistics anywhere or if you could help me get a general feel for the validity in this statement. Would be good for future reference since I have always thought that Linux developers with knowledge in C++ wouldn't be that hard to find, but I could be totally wrong.

like image 664
inquam Avatar asked Jul 09 '10 07:07

inquam


2 Answers

A lot of benefits could come from moving to C++ as far as design goes I think.

Probably (depends on who would decide on the design in C++).

Our existing code would just have to get rid of all implicit type casts since C++ is a bit stricter about that and it would compile and run as usual.

It's not that simple. If you changed compiler options (or file extensions) to switch to C++ your code will not compile just like that (you will need to go over it and make changes).

Furthermore, your existing C codebase will make for a poorly-written C++ codebase.

It may also introduce all kinds of subtle bugs that to a seasoned C-thinking developer will be almost impossible to find (sizeof operator behaves differently for arrays in C and C++ for example but a seasoned C/beginner C++ developer would not even consider that the familiar sizeof in his code does something unexpected).

The reason was that "Linux developers know C", but it would be very hard to find Linux developers who know C++.

That's not a valid reason (if you make a job-posting online with "looking for C++ Linux developers you should get some good CVs - depending on your offer).

It may be the belief of whoever can make that decision in your company or it may be just an excuse they gave to get rid of you :-\

Here are some of the reasons (against switching) that may actually apply in your case - and that your manager probably considered:

  • the people who wrote your codebase may be good C developers but not know C++ - or be beginner C++ developers and/or poor C++ developers.

Good C developers often make poor C++ developers (best practices in C++ are completely different and many times opposed to best practices in C. This is a problem because the C++ code looks familiar enough to a C developer that he will think his experience applies to it (and good design decisions in C often make for poor design decisions in C++).

They may even be good C++ developers, but if that is the case, that should be unknown to your manager (if they were hired as C developers, their C++ skills probably never came up in the job interview).

  • your senior team members may have a good understanding of your application logic. If your application switches to C++ they may have to go (and be replaced by C++ developers). Such a change would lose you team members who are very familiar with your problem domain. Depending on your specific problem domain such a loss could be enormous.

Depending on the size and structure of your codebase, moving to C++ may be a very good decision. You don't give enough detail for us to know if that is the case.

For example, I've seen a large C codebase that over the years ended up reinventing C++ poorly (pseudo-classes supporting virtual function tables and inheritance - with a structure holding a void* to a base structure, or a base structure having void* to specialized data created dynamically - and other monsters).

Would be good for future reference since I have always thought that Linux developers with knowledge in C++ wouldn't be that hard to find, but I could be totally wrong.

They shouldn't be hard to find, but that's only a valid point if you're at the beginning of your project. No good manager will consider lightly changing seasoned developers who know the problem domain with new hires just for a few design decisions.

If you can provide better reasons for switching they may consider it. Good reasons for switching (for a manager) involve lower maintenance costs, lower development costs, lower risks, less effort, better progress reporting and so on.

If you want to keep pushing for this change, you will have to find some good arguments in those areas on top of some good counter-arguments to his "Linux developers know C".

Your arguments should be good enough that they overcome the arguments I've given above.

like image 102
utnapistim Avatar answered Sep 24 '22 02:09

utnapistim


Developing Linux precludes knowing C++? Weird. One of the most common UI's for Linux is KDE, and that uses C++ extensively.

In my company, I think we easily have a hundred developers that know C++ and Linux. While it was hard to find them, it wasn't particularly hard. Good engineers are hard to find independent of the precise skills you're looking for.

We don't seem to be the only who came up with that idea. Look at Mozilla; FireFox is a big C++ project. Same goes for WebKit, C++ too.

like image 38
MSalters Avatar answered Sep 24 '22 02:09

MSalters