Software Development optimize

Tips on choosing a programming language to learn

If you're interested in learning a new programming language, Justin James suggests asking yourself five questions that will help you pick the one that best suits your needs.

 

I'm often asked: How do you pick which programming language to use in your development work? It's a fair question, particularly for people with little or no experience in the development field. The great temptation is for me to just say, "use XYZ language." Instead, I think it is better to explain how to think about choosing the language with which to work.

When you're thinking about which programming language to learn, you need to ask yourself the following five questions in order to come up with the right decision for your needs.

Why am I learning a programming language?

If your goal is to learn to program, look for languages that teach basic principles such as Lisp (or Scheme) or possibly Ruby or Smalltalk. There are a number of excellent languages that are specifically designed to teach programming at a fundamental language. You'll want to bypass most of the mainstream development languages in favor of one of these educational languages, and look for one with an associated workbook, textbook, or other training materials that will effectively tutor you.

If you're trying to become a better programmer, one of these educational languages will greatly benefit you as well. Alternatively, you can try one of the nonmainstream languages, especially if it uses a different paradigm than what you're using now.

If you're building a career, then you need to base your decision on market forces. Look at job ads that appeal to you (the type of work, the location, the pay, the experience level needed, etc.). Keep track of what languages (and other skills) those ads mention as the primary skill(s) and that is what you need to learn. If you think that you'll be miserable in that language or environment, then you might need to reevaluate your career goals.

If you just want to have fun or build personal apps, then learn whatever you want!

How do I plan to learn the programming language?

Your plan of attack and style of learning will affect your programming language choices. For instance, if you learn best in a face-to-face classroom setting, you need to make sure that classes exist for what you want to learn. For many nonmainstream languages, even the book choices are poor.

No matter what, you'll want to make sure that you feel comfortable in the online communities for that language. Consider these questions: How do they treat newcomers? Do a lot of questions go unanswered? Is there a good mechanism for turning questions into better documentation?

On that note, is the documentation any good? A poorly documented programming language will force you to count on the community, and an unhelpful community can sink you pretty quickly.

What toolset, libraries, and frameworks support the programming language?

Some people really like working in a specialized IDE; others are perfectly happy in a basic text editor. Whatever your style is, make sure that the tools are available to support it. Even if you like a plain text editor, for example, you'll probably want to make sure that it supports formatting and coloring for your language. Along the same lines, you'll want to make sure that the language's libraries and frameworks support your intended applications. As an example, if you plan on working on scientific applications, you'll want to check out the math libraries to ensure that you won't spend a lot of time implementing the basics of your math routines.

What do I plan on building?

If you have a particular kind of application in mind, it will influence what kind of programming language you choose to learn. Some programming languages are better suited for some applications than others. For example, if you're working on a Web application, you'll want to make sure that your language of choice has the capability to be used in those applications and is designed for that scenario. On a server using the CGI model, virtually any language can be used for development, but you'll quickly discover that some languages are better than others.

Part of this comes down to toolsets, frameworks, and libraries (having to handle HTTP connections by hand is a chore regardless of the language you're using), but the programming language plays a large role in things as well; many development languages have succeeded because of one small feature or a few features that made a particular type of development much easier.

Look at applications that are similar to what you're building, and try to find out what language those developers are using and why they chose those languages. This will give you insight into what programming languages you should learn.

Am I willing to take the road less travelled?

There is the possibility of using a less mainstream programming language. For personal development, this is not a problem, but many development environments view nonmainstream languages as a risk; specializing in one of these languages can restrict your job choices, or your boss may not be willing to allow you to work on a project in that language.

All the same, there is a great deal of value in learning programming languages that aren't as popular. For one thing, you may find yourself on the path to becoming a highly paid specialist consultant. In addition, every language you learn will teach you new things about programming, even if you don't use the language in your day-to-day work.

Conclusion

Learning a new programming language can be a very rewarding experience, but it is important to not waste your time, either. Picking the right programming language for your needs is not always easy, and chances are, any language you learn will have some things that you dislike about it. But with these tips, you should make better decisions about which programming language will meet your needs and goals.

What criteria would you give to a new programmer to help them pick out a language?

Additional TechRepublic resources

J.Ja

Disclosure of Justin's industry affiliations: Justin James has a contract with Spiceworks to write product buying guides. He is also under contract to OpenAmplify, which is owned by Hapax, to write a series of blogs, tutorials, and other articles.

---------------------------------------------------------------------------------------

Get weekly development tips in your inbox Keep your developer skills sharp by signing up for TechRepublic's free Web Developer newsletter, delivered each Tuesday. Automatically subscribe today!

About

Justin James is the Lead Architect for Conigent.

37 comments
etkinsd
etkinsd

wonder how good they really are compared to someone who is a "staff" software engineer, maybe some of you who work with "consultants can write a few lines here...

wsargent
wsargent

I think beginners should start with the simplest programming environment in order to focus on the programming, and not on troubleshooting or maintaining the environment. For instance, if you want to learn Java, I would not begin by installing Eclipse (IDE). I think working directly with the interpreter is much more efficient. This probably true for any framework unless you have a resident expert available. For similar reasons, I would probably recommend interpreted (scripting) languages over compiled languages. I think scripts are generally faster and simpler for basic tasks.

Vladas Saulis
Vladas Saulis

I don't actually understand what does it mean "to learn the language". Once you know many of them and you need in some other language, you just take it and go programming. And you learn it on the way.

jefferyp2100
jefferyp2100

Start with a higher-level language such a Java or C# in order to learn programming fundamentals, basic architecture, database access and OOP. Do not start with Visual Basic.

andres.narva
andres.narva

PHP all the way. And PHP5 for OOP once a person gets the fundamentals down.

rwidegren
rwidegren

I?m a developer turned DBA in a small company. The first part of my career was all application development and I wrote in a lot of languages but since I?ve been with my current company (8 years) most of my time has been working as a DBA. The development I have done has been in VB6 mostly because it was something I could write fast. Now I?m about to start a fairly large project (for us anyway) and I?m the only developer here I can do it in any language I want. I?d like to use this project to update my skill set so the big question is which language is most marketable? I?ve been going back and forth between VB.net and C#. Does anyone have any suggestions?

bfpower
bfpower

You (Justin) mentioned this in an article a few years ago, but I'm frustrated with the lack of depth in formal education these days. There's a lot of schools teaching languages but not programming. And I'm pissed over it. I was a late bloomer who had dropped out of college halfway through an education degree in 2002. About 5 years later, I got back into school, but by then I was married with a child (living in a rural area) and couldn't give up work and relocate to a place with a decent CS degree. I'm doing online courses from a school that will remain unnamed, with a degree in IT (focus on software development). I graduate in three months, and I'm teaching myself data structures because it's not even addressed in the courses. I do get to touch several different languages, but there's no formal CS training and almost no math. It's not that I can't handle the academics - I'm a member of MENSA, for crying out loud - but some days I don't even want to list this degree on my resume. I've taught myself some of the basics of CS, but it's easier when you have guidance. Sorry to b*tch about my lack of foresight as a 16-year-old HS grad, but I wish I had gotten my act together and just done a CS degree while I could still afford to quit work and move. To their credit, the school has some decent business courses, and I feel like I will have a significant advantage over most new programmers in my understanding of the bigger picture (not to mention I have worked in corporate IT for some time). But I can't help feeling like the average person graduating from my program will be completely unprepared to work in the programming world - not because they don't know languages, but because they don't know how to think in programming terms. Those of us who are willing and capable have to teach ourselves. But hey, maybe it's not all bad - the jobs will hopefully go to the people who teach themselves.

martin
martin

Most of us do not really have a choice in which language to learn. But I think that some of the old or very old languages (e.g. Pascal, Cobol, Algol, Fortran, etc.) are so much documented, and are so easy to start with, that a lot of programmers will see this as a natural way to educate yourself. If you do have a choice, I fully support your strategy. If you do not have a choice, it's a different ball game. What would interest me is a training as 'add-on', e.g. php for Cobol-programmers, etc. Because knowing one language will mostly lure us (including myself) to just start another language without proper training or documentation. An idea for a new column Justin? Regards, Martin

Justin James
Justin James

How do you approach the idea of picking a language? What things are important to you before you investt your time and energy into this kind of project? J.Ja

SnoopDougEDoug
SnoopDougEDoug

There is an inverse correlation between the competency of the consultant and the relationship to the hiring manager. Good friend == crappy developer. Almost kidding. I've worked with great consultants and crappy staff developers. Checking references is a crapshoot. Would you give a reference to a failed project? So how do you vet a consultant? The same way you would vet a new hire, with the proviso that they are already up to speed. And how do you know that? Grill them on the white board. Be very wary of those who toss in random buzzwords. Then next "process refactoring" gets a smack upside the head. Let the technical folks grill them. Ask them about other consultants. Maybe some cream will rise to the top. Avoid those who bad mouth everyone else. They are used car salesmen.

Justin James
Justin James

Some of those highly paid consultants are pretty bad, and the staff hates them for making five times what they are but being useless. Some of them are real superstars, well worth their bill. I've worked with both. The best way to find out before the hire is to contact their references and really ask pointed questions. J.Ja

Justin James
Justin James

From everything I've ben hearing, reading, etc., VB.NET is not the language where the jobs are at compare to C#. Still lots of VB.NET programmers and shops out there, mind you, but it seems like the worls has made a hard shift to C# when a few years ago it was an even split. J.Ja

SnoopDoug
SnoopDoug

They both use the same framework and Microsoft currently writes all its doc code in C#.

SnoopDoug
SnoopDoug

Learning a programmming language is often the first step to developing anything in that language. Often the most difficult step is learning an associated framework. For example, in java there are a bazillion packages, in .NET, similar. You may know what you want to do, but until you learn the framework lingo and where they put that d*mned encrypt class, you will spend a lot of time thrashing about.

SnoopDoug
SnoopDoug

Did you not understand you were enrolling in a vocational institution? I have a 4-year CS degree, but I'll let you in on a secret. You never write any low-level data structure code once you get out of college. You use built-in classes, methods, etc. from a framework. No one writes a b-tree in .Net or Java. You find a data structure you like, such as ArrayList, and use it. What you do in real life versus the university is work in teams, with ranges from total idiot/worthless worker to brilliant, helpful savant.

Duke E Love
Duke E Love

The courses that they offer in Computer Science offer a very sound base for learning how to program. I highly recommend them to ppl with limited access to formal education in programming theory and methodology. And even those who do have access... These are, of course, courses at Stanford U. They might be a hair better than the local CC. http://see.stanford.edu/see/courses.aspx

dallascaley
dallascaley

First let me say that I am in much the same predicament as you. I stopped going to school years ago and am now trying to build my career as a programmer. (except I wasted more time than you). I have a theory that probably many people share and it is this: Those who can do, those that can't teach. This theory is backed by the obvious evidence. Why teach a subject and make $50k a year when you could program and make $100k. Anyone who would chose to teach is either very altruistic, independently wealthy or lacks a true understanding of what it takes to do the job in a real world environment and i'm guessing its the last option for most teachers. So with this in mind, you get what you'd expect from school, which is a substandard knowledge of programming. Problem #2: Technology advances at a very fast rate. By the time a new programming language comes out and people become experts at it (enough to teach anyway) and books are written etc, its already too late. You are now teaching last years cutting edge technology and by the time anyone actually gets a degree in this technology they will be years behind those who just jumped in head first and joined the job market. This has been my experience at least... better to self teach and get real world experience, fake your way into a job, do whatever it takes. I'll take my 3 years of work experience faking it all the way over a 4 year degree any day.

kristof
kristof

Play with as much languages as you can, but specialize in the one(s) you need for your daily job. I learned to program in C++, this has given me a solid base. Now I'm touching languages as Pyhton, Ruby, Lua, Heko, Objectiv-C ... just to feel how it can be done in another way. Mostly I do the "Hello world" and some small apps, nothing more. But each time I add something new to my skills. For my job I'm keep on learning .Net and if needed also extend my php knowledge .

SObaldrick
SObaldrick

If you have not done any, you will learn a lot about computer hardware and programming best practices (and worst) by programming in assembler. That's how I learnt to program (30 years ago), the hardware has barely changed, and the experience still helps me do my job as a business analyst today. Les.

techrepublic
techrepublic

Now that I am one, I'm sure I do the same to others. 7 years ago I asked the same questions and got no good reply so I wasted 2 years in ASP only to find out .net was going to force my last two years into oblivion. So Flash actionscript seems like a good way to go at least flash will be around and strong for a few years then AS3 and now I have to learn it all over again. Good thing I also learned PHP while I was getting my butt kicked by ever-changing industry standards. So all that said, I have to agree with your article but it would be nice for these noobies to get a little clearer direction like.... Don't think learning programming is like learning anything else, the learn never stops, so get used to it... and also dont expect people to beat down your door and pay you crazy money unless you are amazing, 'there is always room at the top' but no room anywhere for mediocre programmers. billebert . com

SteveCCC
SteveCCC

Almost all modern programming uses OOP or object oriented programming. Once you learn how to use OOP when designing a program the rest is just syntax.

mac
mac

Having programmed in Basic, Cobol, C, VB, VB.Net, Power Basic, VB for Applications, and other High level development systems, I've learned it is important to find a tool that will allow rapid screen and database development and also offer a way to use a low level language to develop objects that will interface to your program. I have written major applications in Microsoft Access but for serious code, it can be a pain to work through Microsoft's pre-programmed events. Right now, I would love to find a good 4GL progrqamming langauge with a relational database that would allow programmer hooks to change the flow of the code. Power Basic (powerbasic.com) which uses the Microsoft API is an excellent and powerful language but you need to be a serious programmer to learn it well. I think the answer to what language to use is dependent on how much time you plan on spending coding. If you want to do it every day, you can be successful with a low level language such as C, C++ variety. If you only want to code part time, I recommend going with a high level language that requires less knowledge and of course less suffisticated results. If you are not locked in to a specific language, Power Basic can do it all.

rwidegren
rwidegren

I appreciate your advice. I realize that I'm in an enviable position to be able to update my skill set to anything I want. And it just makes sense, particularly in this economy, to take marketability into account. Thanks again for everyone's answers.

paul
paul

Totally agree - the logic & construction of most modern programming languages are fairly similar so anyone can write a Hello World type app. It's when you get on to Windows/database apps. Choice of IDE is also important, but in the end the supporting framework and libraries are important. My personal choice is Netbeans and Java

bfpower
bfpower

Yes, I did to a degree. I was a touch naive. Live and learn. As I've developed more in Java, I've realized that, just as you pointed out, some engineer built the framework and we just develop in it. I've tried implementing a good sort on my own in Java, and there's no way I can make a scalable algorithm that comes close to the performance of the classes in the collections framework. I shouldn't complain too much. Really, things are pretty good; just wish I felt like I was more apt to compete with CS people on the math side (my logic background is strong, just not math). I usually try to stress my business and communication skills.

Justin James
Justin James

If I recall, MIT offers their entire cirriculum online as well. J.Ja

boxfiddler
boxfiddler

Ain't you just the bigot? The shallow depth of the US educational system is fully and directly the fault of the US citizenry who chose the convenience of allowing others to make decisions for them in matters of Education. Teachers at colleges and universities throughout the nation have been dealing with shallowly educated minds since at least the Seventies. Witness the birth of the Supplemental Instruction Program at UMKC in that decade; created to enable minds to explore the depths. That old dog don't even freaking fly.

santeewelding
santeewelding

Every time I read what you wrote. "Putrescine" comes to mind: the stench of dead intellect.

Kinetixx
Kinetixx

In addition to knowing the material, teaching takes a tremendous amount of energy and creativity. To succeed as a teacher requires understanding the needs of multiple students - a room full of people who learn at varying rates and with a wide array of learning styles. (It is a lot like communicating with a a large group of customers all of whom have different expectations of a project.) To succeed a teacher also requires a willing and working student. It is a two way street. This does not mean that there aren't teachers who miss the mark. That can certainly happen. However even the best teacher won't know the answer to every question, but at this level students should understand that and be willing to work for a solution with other students and the teacher, as they will someday have to work with colleagues and managers. Once you know your stuff, try tutoring another student or teaching a class. You'll find that helping another person reach their goal is its own reward.

SnoopDoug
SnoopDoug

I've found that people who have never taught are usually more caustic about teachers than those who have taught. There are many ways of learning. Doing it all on your own is certainly one way, and I have been self-taught in a number of languages. I have also taken a number of programming classes from a number of instructors over the years. Many of the local adult education instructors at the University of Washington are professional developers. Most were d*mned effective, some were a nightmare. Sort of how it works in the real world with co-workers, bosses, and customers. Be careful with the anecdotal evidence. The "I did it this way and am successful, therefore that is the best approach" would seem to imply to be extremely successful you should gain entrance to Harvard, start a company with a friend, quit school, and spend every waking moment at work. It worked for BillG, therefore it must be the correct way. I would shelve the chip on you shoulder about not having a degree. And good luck faking your way into a job. There was a recent report about how incompetent people have an exaggerated view of themselves. Most likely those around you see through the facade.

guising
guising

This statement: Those who can do, those that can't teach. This theory is backed by the obvious evidence. Why teach a subject and make $50k a year when you could program and make $100k. Anyone who would chose to teach is either very altruistic, independently wealthy or lacks a true understanding of what it takes to do the job in a real world environment and i'm guessing its the last option for most teachers. ... is hardly worth dignifying, but can not be allowed to stand. I've worked in the industry and I've taught. Teaching is more difficult, takes more personal time, and pays less. Industry was extraordinarily easy by comparison. You would be closer to the mark with your comment about altruism. Believe it or not, everyone does not bow to the power of money and, thankfully, some of us like to help others learn. Certainly there are a few poor teachers, but most are worthy of highest honors. Why don't you sign up to teach a class and show us how it's done right? I think your second point is probably closer to the mark though I think it misses the more general point that what may be missing from current curricula (and I don't know since I haven't been in programming course in a long time) is the conceptual basis for programming, which can be done without ever writing a line of real code.

bfpower
bfpower

Unfortunately, that's what I'm working on avoiding. The problem for me isn't learning the material - it's convincing an employer that I do actually know the material. I'll get it done, though. Oh well, their loss. I don't stop learning or working, and if they won't hire me, they'll have to compete with me.

Justin James
Justin James

The OOP ideas that you see in Smalltalk (and, more recently, Ruby) are dramatically different from those you see in the C++ school of thought. Furthermore, while OOP is an important paradigm in many language, it is certainly not the only thing that makes a language work the way it does. Compare Java (or C#) to C++; while very similar in many regards, the nature of a managed code environment is a huge differentiator in how you write code in those languages. Or JavaScript or Ruby to Java or C#; a dynamic, duck typed language is a radically different from a static, strongly typed language. Heck, LINQ alone makes anything on the .NET platform very different from working on other platforms. Even in .NET, F# is very different from C# and VB.NET, despite the fact that all three are OO languages. So yes, while learning OOP goes a long way in seeing languages as similar, I don't think that is makes a "the rest is just syntax" scenario. J.Ja

rwidegren
rwidegren

I agree, the framework is probably more difficult to learn than the syntax of any language. I should have included that in my original question. But from purely the view of "if I need to find a job tomorrow what would make it easiest", would you suggest .net or java or something else? If you go with .net then would you suggest VB.net or C#.

bfpower
bfpower

I've been working on MIT's intro course, but I've had to put it off temporarily to finish my current courses so I can graduate. It's quite a good course. Easier for me because I've used Python before. Some of the courses only have some of the materials (i.e. they don't all have videos).

Justin James
Justin James

When I went to college, the vast majority of the CS professors were "real world programmers". The university had a partnership with Lucent (which was up the road), to have many of their best developers teach at our college, and Lucent would let them out of work to do it. There were very few "professional teachers" or grad students who happened to be teaching there, at least in the CS department. J.Ja