|[Home] [Credit Search] [Category Browser] [Staff Roll Call]||The LINUX.COM Article Archive|
|Originally Published: Monday, 26 June 2000||Author: Jobs Staff|
|Published to: interact_articles_jobs_ask_staff/Ask the Jobs Staff||Page: 1/1 - [Std View]|
Ask the Jobs Staff: Which Programming Language is Best?
Dear Jobs Staff: I've heard that code writers are in demand. This also fascinates me. I've learned that C and C++ are good choices. But after that, I get confused about what is the next best choice, such as Perl or Java.
I am retiring soon and would like to work part-time or intermittently to supplement my retirement. It would be tremendously fulfilling to be able do this in a field I find fascinating, such as computer science. I have been slowly learning to install and use Linux in the past year and a half, but I don't feel I could count on my "coming through the side door" to what I perceive as an engineering-related field (for the most part) and expect without that background to be able to set up Linux systems for businesses of various sizes. I've heard that code writers are in demand. This also fascinates me. I've learned that C and C++ are good choices. But after that, I get confused about what is the next best choice, such as Perl or Java. I am wondering how fast I could "get up to speed" in any of these (I'm 58 years old -- young attitude, though) even though I would have more of my time available than when I was working full-time. How fast could I conceivably learn to write code and make money at it in any of the current languages in demand and which would be the better choice, for speed of learning and to do, say, piecemeal work?
Thanks in advance!
You've opened up a question that has been endlessly debated for years. It tends to come down to one thing, however, and that is: it depends quite a bit on you as an individual, and what you can learn the most easily.
First, let's look at C or C++. While these languages can stand you in good stead in many places, they also present problems if you are looking for a quick learning curve that can get you writing "production quality" code quickly. C is very powerful, and allows you to cause serious problems with a system if you aren't careful. Even knowledgeable C programmers sometimes miss an opportunity to prevent a possible buffer overflow, or other such errors which can make a program insecure, even giving an intruder superuser access to the computer it's run on. It's also much more precise, and requires an enormous amount of attention to detail in defining types of data you will use, functions, and so forth.
With that said, however, many people find that the fact that C is very structured and strict makes it easier to write better programs on the whole. It's a very powerful and flexible language, and very much in demand. C++ is not as much in demand as is C, but there is some demand for it as well. Learn C or C++ and learn them well, and you'll be pretty employable.
Java, like C, is a more complex language to learn for some, and an easy language for others. Again, it depends on the individual. Java doesn't tend to be as dangerous as C, insofar as allowing the programmer to completely destroy things with a misplaced write to memory, but it has its own issues. (Disclaimer: No belittlement meant to Java -- it's just that the Jobs Staff have more experience with C, C++, Perl, and PHP.)
One of the big debates is over Perl vs. PHP as far as which one is better and which one would be a better first language. Perl is more widely used for many things (particularly Web-based applications and system administration tasks) but PHP is catching up in certain areas. For employment purposes, it seems that Perl is more in demand than PHP, but this could change. PHP tends to be faster and is equivalent to Perl in terms of the learning curve. Perl, on the other hand, is one of the best languages for processing text due to its powerful regular expression parser.
One thing about Perl that makes it either a good or bad first programming language (depending on how you look at it), is that it is not nearly as strict as, say, C. Perl doesn't necessarily care if data is a number, a string of characters, a single character, or your Mom's name in Chinese. It will happily try to add words together as if they were numbers if you tell it to: you'll just get strange results. The thing about Perl is, you can write programs that do useful things pretty quickly without knowing much at all about good programming or security techniques, or even much about Perl. Once you learn how to take input, read from a file, write to a file, and print "hello, world," you can do quite a bit, particularly in a Web/CGI environment.
This is good for the person writing Perl in the sense that you can "just do stuff," but bad in an overall sense because you can write really bad, insecure, sloppy code that nevertheless seems to work. Because of this, you can acquire bad habits that can take a long time to overcome if you want to program professionally.
So which is best for you in particular? Well, one thing you might want to try to do is get some simple programs in several languages, and look over the code. Try to find small programs that do something useful and that have good comments, or perhaps even search on the web for "C tutorial," "Java tutorial," or "Perl tutorial." See which language makes the most sense to you before buying the entire O'Reilly library on that language. Try them out, just a little, and see if there's one you feel comfortable with more than others. Think of a simple program you'd like to write (say, a simple plus/minus/multiply/divide calculator), and try writing it in a couple of different languages.
In the end, C and Perl positions are probably most common, with Java and C++ coming in a close second. For piecemeal jobs, probably Perl is a good choice, as there is a lot of Web work out there for a Perl programmer. There are also many positions for other languages such as PHP, Python, and others. In the end, the main thing is for you to just get started, and see where it takes you.
The Jobs Staff