To Poly-ify Yourself
To Poly-ify Yourself
Join the DZone community and get the full member experience.Join For Free
When I started programming, I primarily wrote code in PHP. It wasn't because I thought PHP was the best thing out there or that it was going to be the magic bullet to solve all of my problems. It was very simply the solution that was closest to me at the time. I had a friend who was playing around with PHP and it kind of made sense to me so I picked up a book on it and started writing code. I am completely self taught so this is how I generally learn new technologies.
From PHP, I moved to a bit of Visual Basic and ended up at C++. I got "discovered" and was moved to the development team where I learned and wrote a lot of code in ColdFusion. I preferred C++ for almost everything except writing web applications where I still used PHP or ColdFusion. (Many people I know believe I am sick for enjoying C++ as much as I do, but it is what it is.) I was working with C++ for a couple of years and had tried my hand a Java a time or too, but still stick with C++.
Then .NET came out.
I really liked C# and Visual Studio and started doing a lot of my development there while still doing some C++. I found out I preferred ASP.NET over both PHP and ColdFusion and since most of my development work at the time was web based, I used ASP.NET and C# for most of it. Since I normally learn languages and technologies by doing (as I believe most programmers do) I picked up Python, Ruby and others along the way. I took a third or fourth look at Java and have doing a bit with Scala and several others. I have enough functional knowledge of most of the technologies I have picked up that I could write an app with any of them if necessary. It doesn't mean I am an expert, but have functional working knowledge and competence.
Early on as a developer I learned that you really do need to use the right tool for the job. I have heard the common reference that a carpenter wouldn't use a screwdriver to hammer a nail, he would use a hammer. The problem we run into with programming isn't that we are deciding whether to use a hammer vs a screwdriver, we are looking at which of the 15 hammer types to use. You can technically use a roofing hammer to put in finishing nails, but it's probably not going to be the best idea.
There are some projects that I do only in Java and some I do only in C# and .NET. A great deal of this is preference, what isn't preference is either due to the availability or knowledge of frameworks and libraries. For example, I love working with Lucene. I know that there is a .NET version, which I have used, but I prefer to use Java and stick with the latest and greatest. I do have several applications that are using the .NET version to offer search capabilities, it all just really depends on what I am doing.
So I said all that to say this: I personally believe that it is important for a developer to have as many tools in their tool belt as possible. Even though a carpenter may never use his roofing hammer, it's still probably a good idea for him to have one. I have heard it said by many people that, as a developer, you really should learn a new programming language each year. At the very least you should be learning something new all the time, even if it takes more than a year.
If you are constantly learning, you will look at things differently. I have heard from others and I agree completely that a solid well rounded developer should know a minimum of three languages: a native language like C or C++, a managed language like C# or Java and a scripting language like Perl or Python. Ok...maybe not Perl, but there are many options you could put in the place of each category.
You should know at least one native language because even though you may not want to do memory management or deal with pointers, it can be very helpful to understand how they work. You also never know when you may be handed some code that you need to decipher. If you've never worked with pointers at all, you may be a bit lost.
Most of the developers I know well, use managed languages like Java or C# for their day-to-day development. There are tons of reason behind this and there are tons of jobs working with those languages and their associated frameworks. While I tend to prefer C++, I do most of my development in C# because of the development speed and productivity gains I get from it.
Scripting languages are in essence awesome and can deliver quick and powerful results. From prototyping to building out full applications, scripting languages allow you to make quick changes and get stuff done quickly. They are generally not as powerful as other languages (although not always the case) and you may not want to use them for full blown production applications.
So the looming question is, does learning at least one of each of the three make you a polyglot programmer? My answer would be probably not that alone, but maybe depending on how your usage of each language is. I have seen a lot of controversy about the term "polyglot programmer" and as such, you may not want to call yourself one anyway, it's up to you.
Now I want to take a minute to clarify something. There are two schools of thought behind the whole "ployglot" concept. One is "polyglot programming" where you would build an application with multiple languages selecting different languages based on their strengths. The other is the "ployglot programmer" who is proficient and routinely works with multiple languages. I'm referring to the later. While I don't necessarily condemn using multiple languages with in one project, you really have to make sure you are making a sound decision doing so. It can make your project more complex and can at times make it less maintainable and possibly create technical debt.
The key I want you to see is the importance of learning and continuing to learn multiple languages and frameworks. If nothing else, a C# programmer learning a bit of C++ will begin to know how good he has it but can maybe pick up some deeper knowledge of computing. Java and C# are similar in a lot of aspects, but at the same time very different. Learning something you don't know can put a new perspective on what you are currently doing, which can make you a much better programmer in the long run.
I'm not saying that you should pick up a new language and necessarily start building a new production application while you are learning. There is certainly something that can be said for using what you know, but I challenge you as a programmer to keep learning. The more you learn the better you will be and the more techniques you will pick up. It can introduce you to whole developer communities you didn't even know existed. Bottom line is if you keep learning, you will grow as a programmer, whether you consider yourself polyglot or not.
Opinions expressed by DZone contributors are their own.