Let me first start off being a little facetious with a little tongue in cheek…I’m an American. I have no need to speak another language because well, I speak English. 99% of the civilized world speaks English so WTF should I ever learn another language? Case in point, I minored in German in college. For two semesters I went over to Munich and worked at Deutsche Aerospace so that I could learn German better. The thing is, besides the fact that my coworkers spoke damn good English to begin with, all the documentation they put out was in English, the units used were feet, pounds, miles. When the French came over to work with us, we also spoke English. So what is the freakin point of learning German? I was pretty damn disappointed that I wasted all this time in college learning German when in reality it was just a freakin useless exercise…
Which brings me to the point of this blog. Polyglotism in software has to be the worst idea I ever heard. The idea of it is that you use the language that is best fits the job. Some say this is a huge boon for the developer as they will become more productive. In practice though, I think this is just a big excuse so the developer can learn and play with a new language, or for a language zealot/missionary to figure out a way to weasel in his pet language into a company. Plus, you’d probably end up being average or good at many languages but a master of none….But lets pretend that it is a benefit to the developer. Developers need to realize that there are implications to being polyglot.
Maintenance Nightmare
So, you’ve added a Ruby module to that big flagship Java application or product your company is so proud of. You did it fast. It works. And management loves you for it. They love you so much for it, they’ve promoted you to software lead and now you are running a brand new project. Now that you’ve left your polyglot project, somebody needs to take over your work. Unfortunately, your group is a bunch of Java developers. For any bug that needs to be fixed, these developers need to be retrained in Ruby, a new Ruby developer needs to be hired, and/or a Ruby consultant/contractor needs to be brought it. Multiply this by each language you’ve introduced to your project.
Refactoring Nightmare
The JVM is pretty cool now. We can run Ruby on it, Python on it, and even PHP on it. Your JRuby apps can work with Java APIs. Same with Jython and JPHP. Great. So now your developers can use any one of these language to build out extensions to your Java app. But what happens when you want to refactor one of your re-used Java libraries? OOPS!!!
Installation Nightmare
Ah, so you’ve weathered through the maintenance and refactoring nightmares and you’ve finally shipped your product. Hmm, but you’ve just added the complexity of installing multiple runtimes on your user base. Its not hugely bad if you’ve used the JVM as your base virtual machine. But you still need to package and install all the appropriate Java libraries, Ruby gems, and Python libraries on the appropriate places of your user’s machine. You also need to hope that all the desparate environments don’t conflict with anything the user has already installed on his machine. And that’s just with languages running in the JVM. Imagine if you used vanilla Ruby, Python and Java all as separate silos!
Support Nightmare
A support call comes in for your product or application. Its obviously a bug, but where is the problem? Is it your application code? Your JVM? Your Ruby VM? Your Java library? Your Ruby gem?
All and all, let me put it this way. We all work in multi-national environments. What if each developer documented their projects in their own native language, because lets face it, they are most productive in that language. Where would we be? Doing what’s best for oneself isn’t always best for the big picture.
Jul 20, 2009 @ 15:18:55
Humm… you’re a lot ethnocentric. Look the origin of some english words, they aren’t all “pure-english”. The world needs, and will always need, more languages. It might sound scary to you, but there are others cultures besides American.
In software you need to choose which languages your project can use. If you think that one language is all you need be happy with it. You point one problem of polyglotism which is true, but not enough to not use it.
Jul 20, 2009 @ 15:19:44
This is why I think there will be at most three JVM langs going forward. Reason #1 is that programming in Java for a lot of things is painful, so there will be some polyglotism. Reason #2 it has still got to be easy for existing Java devs to transition, so there will not be a wonderful polyglot world.
Given those two points, I think there will be Java going forward (the flagship lang), something like Scala on the strongly typed side and then something like Groovy on the dynamic side. Why? All those languages are native on the JVM and with the Java platform libraries. Those languages (Groovy in particular) feel more natural to an existing Java developer syntax wise and they leverage Java.
I think the example to take from the real world is imagine yourself a Spaniard that could leverage his familiarity with Spanish to learn Italian, be functional in French and even manage to communicate in English. He could do that, but trying out Chinese is not going to really happen. Or if that example doesn’t do it for you, imagine British English versus North American English versus Australian English. There are significant differences, but they are all built on the “English” platform if you will and if you need to do business in Australia, North America, or the British Isles, it would behoove you to learn that kind of English. The nice thing is that you will have a much easier time of it than the Spaniard I mentioned earlier.
Jul 20, 2009 @ 15:38:55
Wow. You’ve taken the ugly American attitude and applied it to software. Well done. By which I mean: this is one of the most breathtaking displays of both technical and cultural ignorance that I have ever seen. If you feel like learning another language in college was a waste of your time, I think you completely missed the point.
As for programming languages, it’s not at all difficult to be proficient in multiple languages. Many Java/PHP developers are also well versed in JavaScript (and if you have scorn for JavaScript at this point, you only reinforce my claim of ignorance). Knowing multiple languages demonstrates mental flexibility and teaches a developer to think about problems in different ways. I would never hire a programmer that was only proficient in a single language.
These new languages are used to reduce maintenance by dramatically reducing the size of the code base, and simplifying application setup and ramp up times. Groovy and Scala are conspicuously absent from your list. Could that be because they both compile to bytecode, and can therefor be used by any JVM language? It’s only a matter of time before the other languages catch up.
As for support: what an absurd statement. Where is the bug? I don’t know, how do you normally find the bug in a “pure” application? Lets see, the date is parsed incorrectly and we’re using some Ruby code to parse dates… Where could the bug be? Is it in the PHP templates? Of course not you idiot. You might as well complain about MVC. 3 layers? How will I know where the bug is?
Your last point about documentation doesn’t even make sense. The compiler/interpreter is the intended audience. You write Ruby code for the Ruby interpreter, Java for the Java compiler, etc.
You might as well say that SQL is a waste of time. The L stands for Language, by the way. The simple fact is that modern programmers use multiple languages in the same project with regularity, and the only ones who have trouble are the poorly trained and ignorant (who can hardly be called master of even the single language they know), and the old fogies like yourself who consider learning something new a waste of time.
Jul 20, 2009 @ 16:32:51
Hi!
I read your post because it is interesting when it comes to learning another languages. And I think that every person should learn foreign languages. I myself know people who can speak even 10 languages. Learning a language can be really easy and enjoying. The point is to learn languages with natural methods.
Jul 20, 2009 @ 16:50:03
Is this a Troll ?
Polyglotism is not about productivity. It’s about discovery, creativity and innovation.
Do you believe “software engineering” is the only thing out there ?
Jul 20, 2009 @ 18:02:52
@Felipe, Noah, and Greg:
I guess you missed the first sentence of the blog? “Let me first start off with some tongue in cheek”
@Stephane:
You wrote: “Polyglotism is not about productivity”. If so, then polyglotists shouldn’t be pushing this POV for real project/development. I don’t want my developers introducing another language just so that they can feel creative. THey can do it on their own time.
Jul 20, 2009 @ 19:01:53
@Billburke, you manage your teams your own way and we all respect that.
Yet my experience is that a responsible, committed and creative team of developers can do miracles on a project.
90% of the project we do are “real projects” (not sure what you call “real” BTW) yet “software engineering” is a myth, it’s very hard to limit the job to working on an assembly line with a predefined and limited set of tools (languages, methods, etc…).
Polyglotism is not a bad idea. It’s just a tool some are afraid to handle and some use without even knowing it.
Once again, language come with much more than syntactic sugars. They bring concepts, ways to communicate, think and solve problems. Without Polyglotism life would probably look like a big Tetris game where all the issues are like falling blocks. Our brain is made for much more than simply rotating blocks all day long.
Jul 20, 2009 @ 19:13:26
@Stephane
I agree that responsible, committed, and creative team of developers can do miracles on a project. The problem is, what happens when this creative team moves onto another project? This is generally the case. You’re not going to be able to keep a creative team of developers working on the same thing for long. Either they’ll move to another exciting area, or leave your company entirely.
Again, there’s much more at stake here than allowing the developer to be more creative or productive. Which was the whole point of this blog post.
Jul 20, 2009 @ 18:20:17
Sorry, I miss the “tongue in cheek”. But it felt like you really mean that…
Polyglotism is about use the right to tool to solve a specific problem. Take a look in this slides State: You’re Doing It Wrong – Alternative Concurrency Paradigms For The JVM about how to solve concurrency problems in the JVM. Do you really think that java language is the best option to solve those problems?
Jul 20, 2009 @ 21:52:24
Bill has jumped the shark!!
Jul 20, 2009 @ 21:53:40
Hey, why did you even learn American if the only stuff you need daily is such language:
for (int i = 0; i < n; i++) {
//
}
Completely pathetic…
Jul 21, 2009 @ 05:52:13
Wow – quite a lot of misunderstandings here.
Polyglot == person. I don’t know what you call a confused project that want’s to switch languages all the time (which obviously is not a good thing) – but its certainly not a polyglot (I guess you could claim that is what “polyglotism” is?).
Is it not a good thing the JVM can host other languages?
In most cases it is simple a jar to add to the class path (eg jruby) – in scala’s case, it aspires to replace javac with something better (yes, it is better) – so its not as bad as you make out.
But I am sure you can think of worse ideas then this 😉 be honest …
Jul 21, 2009 @ 05:57:55
Adding lead to gas? CFC’s as a propellant? Both those are probably worse ideas you probably have heard of (co-incidentally from the same guy !).
Jul 21, 2009 @ 22:23:10
I don’t see how refactoring a 3rd party library reused in other languages is any different from refactoring it in java – your library ‘clients’ aren’t going to get automatically refactored either..
Jul 23, 2009 @ 14:16:04
I was talking about refactoring your own project that is written in 3 different languages that are cross-pollinated.
Jul 24, 2009 @ 05:28:09
But that’s only applicable to dynamic languages. Static languages like Scala have no problem in participating in refactoring, if the plugin supports it.
And even with dynamic languages, there’s nothing to stop a plugin doing it’s best to suggest renames when refactoring as well (although it would be far from perfect).
Jul 27, 2009 @ 05:26:35
Looks like the folks commenting on this post haven’t grasped the importance of context. This isn’t an attack on the cultures of the world, it’s a lesson in reducing overhead.
Truth is, when you write software in a distributed environment you impose upon other developers the task of maintenance. Choosing more than one implementation language increases that burden, so we should be judicious in our sprinkling of the script du jour.
A couple years back I asked a coworker to write some simple utility to help with our testing framework. To my horror he broke the Java trend in our shop and did it in Ruby, explaining that it took “less lines of code”. After a month he was gone, and no one knew how to fix the stupid thing without research, trial/error, and time.
But I won’t take a hard line here. If you’ve got a task that simply performs better and with less risk in a particular language, then weigh the pros and cons of a multilingual approach to estimate which direction the scale tips. Skipping the high-wire act of manual concurrent programming by using Erlang springs to mind.
S,
ALR
Jul 27, 2009 @ 15:57:12
I know people have missed the point of this blog entry. This is why I commented on this earlier. In the end, there will NOT be many JVM languages, but really more like 3 or 4 and they will have to play nice with not only the JVM but other Java developers trying to use them. That is why Scala and Groovy have a leg up on the competition, they are native Java languages with syntax that is not too unfamiliar to Java devs.
Jul 27, 2009 @ 19:08:11
I’m always amazed when people don’t get tongue-in-cheek or sarcasm…Guess its a language barrier? Hopefully you eventually got it that I don’t think its bad to learn a new language, computer or human (since I’ve done both). Just bad to mix them together.
Jul 27, 2009 @ 19:15:41
I didn’t know this expression tongue-in-cheek. I need to study more english 😀
I agree with James. And compile to byte code isn’t the same as java compatible, from twitter some days ago:
“lucastex RT @mittie: “XXLang integrates with Java since it compiles to bytecode” is as silly as “integrates with C since it compiles to machine code”
Are polyglot systems a good idea? @ Peter Ledbrook
Aug 04, 2009 @ 15:05:56
Aug 09, 2009 @ 23:30:43
You have a deep serious problem. I’m sorry for you.
BTW: Would be ironic if “americans” are forced to learn Chinese some day? 😀
Aug 10, 2009 @ 12:05:30
@Gorlok
I find it amazing how people take the written word so literally sometimes. Obviously if I minored in German in college and worked in Germany for 6 months to learn the language better, I value learning a foreign language…GEEZ I suggest you learn a bit more of the english language and look up what “tongue in cheek” means.
Delivering Business Value Through Ployglot Systems (part 1) | Object Partners Inc
Aug 10, 2009 @ 14:45:36
Aug 13, 2009 @ 20:40:43
Bill,
your “tong-in-cheek” expression will not excuse what you said next. You are an american, and what you said did not sound ironic at all. Foreigners in general know how this kind of vision is really strong in the US. For real, no irony.
It was a bad introduction.
Regards
Aug 13, 2009 @ 20:48:23
I think you’d be a bit happier if you stopped taking things so seriously. I’m always amazed at how some people are so sensitive. Get over yourself…I have.
Aug 17, 2009 @ 16:34:04
The story would have the exact same lesson if everyone were speaking Swahili. The point is that in order to be as productive as possible, these real professionals settled on a focused language set.
Also, this post is tagged as flamebait. Why so serious?
Delivering Business Value Through Polyglot Systems (part 2) | Object Partners Inc
Aug 20, 2009 @ 14:38:04
Aug 24, 2009 @ 21:14:21
I minored in German too. I spent junior year abroad with Vanderbilt in Germany. I worked in Germany for 3 yrs and German speaking Switzerland for 4. I was also disappointed that German isn’t very useful because they all speak english anyway, but it was enriching personally and I still enjoy speaking/reading german.
Delivering Business Value Through Polyglot Systems (part 3) | Object Partners Inc
Aug 26, 2009 @ 14:38:22
Sep 09, 2009 @ 05:41:51
But what if I write my test scripts in JRuby because I’m too lazy to type all that
try {
Locator loc = LocatorFactory.createLocator(“locationOfXMLFileFromHellOrSomeClassloaderThing”);
Factory f = loc.locate(“factoryName”);
Locator factoryLocator = f.createLocator(Constants.NEEDLESS_CONSTANT);
Factory f = (Factory) factoryLocator.locate(ServiceLocator.createInstance());
MyObjectFinally mof = f.createObject();
} catch (StupidGratuitousCheckedException e) {
throw new RuntimeException(“checked Exceptions Are Stupid and Microsoft was right to remove them from C#”,e);
} catch (SemiRedundantOneOffTypedStupidGratuitousCheckedException e2) {
throw new RuntimeException(“checked Exceptions Are Stupid and Microsoft was right to remove them from C#”,e2);
} catch (FactoryNotLocatedException e3) {
throw new RuntimeException(“checked Exceptions Are Stupid and Microsoft was right to remove them from C#”,e3);
} catch (LocatorNotAbleToBeInstantiatedException e4) {
throw new RuntimeException(“checked Exceptions Are Stupid and Microsoft was right to remove them from C#”,e4);
} catch (XMLException e5) {
throw new RuntimeException(“checked Exceptions Are Stupid and Microsoft was right to remove them from C#”,e5);
} catch (RandomParserMadnessException e6) {
throw new RuntimeException(“checked Exceptions Are Stupid and Microsoft was right to remove them from C#”,e6);
}
But if Java wasn’t horrible like that then how would we fill the JCP committees 🙂
I think Polyglotism is fine so long as it is strictly for the noble cause of laziness. I go to great amounts of effort to be lazy!
-Andy
Sep 09, 2009 @ 13:40:21
Yes Andy, that does look like code you would write.
Sep 09, 2009 @ 14:11:16
What? I copied that from your EJB3 AOP crap! Does your REST stuff have classloader leaks too? 😀
Sep 09, 2009 @ 15:36:07
Hi Bill. Having read your comment to Scott Hickey’s blog, I’m glad to see where you’re coming from with your argument. And it seems you are in favour of Groovy as a language which quote ‘you see as a superset of Java’. But the Groovy language itself grew out of the polyglot mindset itself (Perl, Smalltalk etc), cherry-picking other languages best features. Have a read of ‘Your way to Groovy’, chapter 1 of Groovy in Action. It continues to this day in the Groovy community with the works of the likes of Vaclav Pech adding GParallelizer to Groovy, bringing Actors from Scala into Groovy. This is why I love Groovy so much. It’s a vibrant community full of innovators. I share your opinions on the potential maintenance headaches though. I’m not sure if Grails is going overboard with Scala and Clojure plug-ins. I’d rather have a rich core language that evolves and absorbs the best features of other languages than have the complexities of say Java, Groovy, Scala and Clojure all in a Grails project. I think if I was going with Scala, I’d be looking at Lift. Ditto Compojure if I went Clojure for a web framework.
Sep 17, 2009 @ 00:44:14
Yeah, whose stupid idea was it to have web applications that are written in a language like Java, Ruby, Python or C# then go and download Javascript to the client. Why would people be so dumb as to mix languages like that.
Sep 17, 2009 @ 00:50:18
GWT FTW.
Delivering Business Value Through Polyglot Systems (part 4 / conclusion) | Object Partners Inc
Sep 21, 2009 @ 14:36:45
Apr 20, 2010 @ 19:59:18
Bill … you rock! 😉
Jun 09, 2010 @ 17:02:37
Here is a replication (with modifications) of a post I posted somewhere else:
I agree with you post. Here are three issues I have with Software Engineers that are okay with many languages but have not mastered one:
1. The learn-a-new-langauges-annually thing is so 1980’s. You could pick up a book like one by Peter Norton and know everything you need to know about computers then. Now, it takes years to get proficient (not good or great) at ASP.NET and C# (with its huge API). Plus, you got WPF, WF, EF 4 and many others. This is only in the .NET space. Now you have Ruby on Rail, Clojure etc- Rocky Lhotka full-time job is to keep current with just .NET and he cannot. Technology moves too fast and is too large to try everything and expect to know the quirks, bells and whistles to be competent.
2. C# has features from functional languages, dynamic languages OOP languages and more. This reduces the need to try to get a functional language feel from a pure functional language.
3. It takes dedication to become great at a tool/API, especially those with high learning curves (e.g. WPF.) Distracting yourself by trying to learn everything else can reduce you powess and mastery in a tool. If you are afraid of getting stuff knowing one thing that may be gone tommorrow, there will be tutorials. For example, Microsoft guided Software Engineers that moved from VB6 to VB.NET. You just will not be dead in the water.
Now, languages designers may need to learn a new language annually. Plus, it does not hurt if you learn a new languages annually just because you like programming. However, nowadays I do not feel that it is that urgent as it was in previous decades. Plus, polyglot-languages like C# lets you dive into non-OOP features. It is better to solve a programming the long way and quickly with a tool you are great at and can easily support THEN to build it with a more suitable tool you do not know well, may take longer to build since you are learning along the way and will forces others to learn things way outside their knowledge-area to support.
Jun 09, 2010 @ 17:06:48
It is great to be passionate about programming. However, Software Engineers are not paid to program; no they are paid to solve problems. Programming is just a tool to this end. This ia akin to a carpenter not being paid to hit nails but to make a chair to solve seating problems (with hitting nails just being a tool to this end but not the actual end). Not mastering a tool but spreading yourself too thin can (although not neccessarily) reduce your abilty to quickly solve problems with what you know. It is ok to hire consultant or expand the team rather than pull your too thin.