A boring old C-style language just like millions of developers learned before you, going back to the 1980s and earlier. It’s not flashy, it’s usually not cutting edge, but it is smart. Even if you don’t stick with it, or program in it on a daily basis, having a C-style language in your repertoire is a no-brainer if you want to be taken seriously as a developer.
What is a C-style language?
The answer to that depends on who you ask, because there’s almost nothing developers enjoy more than arguing over the influences and derivation of languages – except maybe arguing over which language is best. Despite all the arguing, there’s pretty solid agreement that C, C++, Java, C#, and Objective-C are all C-style languages.
What you get out of learning a C-style language is the fundamentals of programming that are common to many other languages: variables, values, and types; assignments and expressions; functions, parameters, and return values; control flow and program progression. These are basic concepts that any programmer will be expected to know, and if you learned them in a C-style language, you’ll have the mindset in common with most other developers you meet, and that most employers expect.
Latin isn’t dead; it’s just resting
I’m not advocating that you learn any particular C-style language, just that you learn one of them. Which one is best really depends on your particular job situation. If you’re programming in Microsoft shop, learn C#. If you need to make Android apps, learn Java. If you’re working on embedded systems, or anything close to the hardware, good old C is probably most useful. If you’re working anywhere else, C++ is a good bet.
The magical thing about learning a C-style language is that once you know one of them, the rest are easier to learn. Nobody speaks Latin anymore, but it’s still useful to learn; among other reasons, you get a jump on learning Italian, Spanish, and French for free. Knowing one C-style language doesn’t automatically give you expert-level skills in the others, but it reduces the learning curve quite a bit. It’s a safe bet that if you know C#, you can read Java with little trouble. Learning to write it requires a crash course in syntax, but that takes days, not months. Of course, being truly fluent in a programming language requires time, effort, and practice, but that’s true of any language.
The term “polyglot programmer” gets thrown around a lot as a desirable trait for a developer. While that phrase usually means “I know something other than C-style languages,” having the base of a C-style language is the foundation that you build your polyglot street cred on. The C-style language represents the basic mode that most programmers think in. Once you have that, you can branch out to functional, or other kinds of languages. Switching to another language paradigm means changing the way you think about programming, and that’s often challenging, but that’s a good experience as well. That doesn’t mean that starting with a C-style language is a bad choice; if the first language you learn is functional, you’ll need to change your way of thinking to learn to write imperatively. There’s always a learning curve when you change your fundamental habits, which is why I recommend starting at the most common starting language.
C is your safety net
Everything I’m saying here is based on the pragmatic assumption that you’re learning to program because you want to get a job writing code, and preferably get paid for it. That’s not true for everybody, and if you’re doing this strictly for the fun of writing code, more power to you; choose whatever language you like.
For those of you who are making language choices to help your career, you need to be conversant in the languages where the jobs are. On the TIOBE Index, the top five languages are C-style, and the rest of the top 10 have some level of C influence. If you don’t like TIOBE, the PYPL language popularity index also has five C-style languages in its top ten. You can debate the accuracy of any index you like, but in the aggregate, you get a pretty good indication of what employers are looking for. There are some flexible employers who don’t insist that you know their language of choice when you start, but they will look for candidates with the shortest learning curve, and fluency in a C-style language gives you an advantage there.
Even if you’re further along in your career, knowing a C-style language provide a nice safety net if you have an unexpected job change. You may have spent years programming in Haskell and loving it, but disaster can strike at any time, and if you have a C-style language in your arsenal, you’re better off than a suddenly unemployed programmer who doesn’t. If nothing else, you’ll save a lot of time in interviews explaining why you never learned C++ or Java.
Programming good habits
In the final analysis, your choice of a programming language to learn will almost certainly be based on what problems you need to solve, or what language your employer tells you to use. That decision is going to be based on the current “hotness” as often as any other reason. There’s no denying that it’s cool to be one of the few programming in the new language that everybody’s talking about. If you’re lucky, the language will be a hit, and you’ll be one of the first to be able to claim extensive experience in it when the headhunters come looking.
Having experience in a C-style language is more like brushing your teeth every day. It’s not glamorous, and nobody will give you a reward for doing it, but someday down the road, you may be really happy that you did.
This post is part of our ongoing exploration into what it takes to become a software engineer.
Public domain tool image via Pixabay.