1748252 Members
3859 Online
108760 Solutions
New Discussion юеВ

Do I need to know C/C++?

 
SOLVED
Go to solution
Kris Spander
Advisor

Do I need to know C/C++?

Hi:

I have an offer to attend a C/C++ training session and my question is, should I? I am pretty good at doing basic shell scripting and awk and a little perl. My C/C++ programming skills are very weak. I am concerned that I might be asked to do more programming if I attend this class. Is C/C++ really necessary in the role of unix administrator?

I look forward to your ideas.

TIA,
Kris


Dilbert is my hero.
10 REPLIES 10
Ivan Ferreira
Honored Contributor

Re: Do I need to know C/C++?

I don't know about C or C++ and I'm doing pretty good. But I think that administrator that knows these lenguages are better administrators and also, can provide a better support to the development area. Also, could diagnose more easily performance problems in applications developed in this language using tracing tools.

But, if you won't use in your day to day operations, you won't be able to consolidate the knowledge and you will end up forgetting everything. I learned C in the school but as I never use it, finally, I consider that today I don't know nothing.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Do I need to know C/C++?

I will answer your question like this: The best sysadmins I know also know C (though maybe not C++). If you don't want to be a C/C++ programmer when you grow up, that's your choice --- and you should tell your boss that if that is your fear.

More than anything else, knowing a little C makes it much easier to read the section 2 and section 3 man pages (the system calls and library functions, respectively) and if you can understand the system calls, you get a really good understanding of UNIX itself. Just as an example, since you mentioned shell scripting, could you describe in detail (meaning no hand-waving allowed) how the "trap" works? To be fair, knowing C will not make you understand directly how trap works either BUT when combined with the related system calls -- which you will now be able to read and understand -- then explaining how a trap works will be straightforward.

Food for thought, Clay


If it ain't broke, I can fix that.
James R. Ferguson
Acclaimed Contributor

Re: Do I need to know C/C++?

Hi Kris:

My personal opinion is that the best programmers are (or have been) operators and administrators. Inversely, good administrators have, at least, basic programming skills.

If you have had experience with shell, awk, and/or particularly Perl, you should find C straightforward.

If your concern is that your role will change from an administrator to a programmer/developer and that's not what you want, then perhaps you should discuss your concern with your management.

Regards!

...JRF...
A. Clay Stephenson
Acclaimed Contributor

Re: Do I need to know C/C++?

... and here's another real life example: When an applications programmer or vendor asks you to increase the stack (maxssiz) to 1GiB (or even 128MiB), will you do it or go looking for a baseball bat? Surprisingly, if you know C in a UNIX environment, you know which one of those choices is almost always correct. If at all possible (and assuming that you want to attend any C class), you should look for a class that teaches C in a UNIX environment --- or that should be a natural follow-on to your introductory class.

More food for thought, Clay
If it ain't broke, I can fix that.
Jonathan Fife
Honored Contributor

Re: Do I need to know C/C++?

Another thing to consider is that an administrator's position often includes compiling new software to install.

It's a rare and happy occasion when something compiles without errors (at least for me), and knowing some C/C++ is a great help for the remainder of those.
Decay is inherent in all compounded things. Strive on with diligence
Dave La Mar
Honored Contributor

Re: Do I need to know C/C++?

Kris -
I don't know your age or time in position, but if the training is free, by all means take it.
There are many SA opportunities to use both C and C++, thus that will only increase your value and understanding in everyday SA duties.
Is it necessary for the position?==>I believe others have answered that.
Is is of value?==>Most definitely.

My 2 cents says "go for it".
If I offered one of my people training in a skill set they didn't currently have, and they refused it... Well that's what we call a CLM (Career Limiting Move).

Best of luck with your decision.

Regards,

-dl
"I'm not dumb. I just have a command of thoroughly useless information."
A. Clay Stephenson
Acclaimed Contributor

Re: Do I need to know C/C++?

Hi Kris, Dave may have the best point. I tend to go straight to the technical aspects but I know if I offered training to an admin, it would be because I thought the company and the employee would benefit. If he/she turned it down without very good reason, then that person would instantly go from 1 to 0.
If it ain't broke, I can fix that.
inventsekar_1
Respected Contributor

Re: Do I need to know C/C++?

i heard that unix os itself written in c.
i think hpux also.

u told that u are good with shell scripting.
and also, if u learnt c, u will tell c is simple than shell scripting.
c is structured. good and basic programming language for all other languages.

i will say even it costs some amount, better learn that. c++ is not that much necessary.

All The Best.
Sekar
Be Tomorrow, Today.
Ralph Grothe
Honored Contributor

Re: Do I need to know C/C++?

Most has already been said by the others.
Being knowledgeable in C is a big asset for a Unix sysadmin, and I would strongly like to encourage you to take the opportunity if they provide you with some training.
However, programming skills aren't acquired in a few days of training, but require an ardent dedication to actually writing lots of programs and looking at well written code.
It often takes several years of constant programming to become really good in a programming language.
Remeber that most of Unix is written in C.
Actually, C was once created for this purpose,
as a systems programming language for Unix.
Even if you are writing C programs for a completely different platform like Windows
you will find that most system calls and concepts are directly taken from Unix.
With your foundation of Unix system administration, shell, awk and perl scripting learning C should really be easy.
As for C++ I am however not so much convinced of its bare necassity for a sysadmin.
C++ is notorious for being quite complicated.
However, it would be helpful to have a basic notion of object oriented (OO) programming.
But for this purpose I think C++ isn't the best candidate because it borrowed too many concepts from C (to make the transition easier for C programmers) that in fact even undermine OO principals.
You can write valid C++ code that isn't OO at all.
Therefore, I would think that a better language for learning OO is eiffel, or java (though even java isn't strict in every OO respect, like basic types that aren't objects).
But (don't laugh) I think even Perl (better yet Python) is good for learning basic OO programming.

Madness, thy name is system administration