Does Company-Wide Language "Standardization" Work?
RMX asks: "In our company, we're currently going through the debate of standardizing on a computer language for our next set of products. The pro-standardization guys say that a single language (like Java) will save everyone time. The anti-standardization guys are advocating a mixed environment (of languages like Python, Ruby, and C#), and argue that the whole discussion is as silly as a manufacturing firm standardizing on screwdrivers for all their screw/nail/glue fastening needs. Have any of your companies standardized on a language? How well did it go?"
It can depends on the size of your company. I worked for a fairly small shop that specialized in Java and SQL work, because of that we became known for it in a positive way. It also was very useful because we all had a decent grounding in Java and our constant work in it had all of us improving our own skill sets quite rapidly.
... small shop. In other situations I can see why multiple languages would be more useful than a standardized company one.
But the firm had only 9 geeks, so as I said
but then we weren't allowed to use SQL or XML anymore!!
A single language makes each developer easily replacable. You quit, they just hire another Java programmer. If the collection of software you develop with is sufficiently unique (XSLT with extention functions written in both Groovy and Jython on IKVM running under .Net) you can create a position that would be nearly impossible to fill.
On the other hand, having each developer work on projects with their own collection of technologies tends cause the maintainance tasks of those projects go back to the original developer. This is generally a bad thing. Having a developer know that no one will ever see their code gives a temptation to take shortcuts that they wouldn't take others. Even more than code reviews, splitting maintanance across developers encourages quality code. You don't want a co-worker cursing your name as they try to add one minor feature to something you've done. ("F'n Andrew! Why'd he do that!").
Different languages and other technologies have their strengths and weaknesses. If they are chosen based on their strengths and not just their familiarity (let alone out and out prejudice) then their should be productivity gains achived from the choices. Of course, that means that this would increase the ramp up time a new developer needs to be very productive.
So if you have high turnover, you want to get new developers productively quickly (which would imply standardizing on as few languages and technologies as possible) and you want to get projects seen by as many developers as possible before the original developer leaves. (If Andrew is long gone, then "F'n Andrew!" can be an excuse given by the maintainance programmer, even if it is groundless.) If you have a lower turnover, then developers start getting a better feel over which technology choices fit in which business scenarios.
If this standardization is being driven by upper management, they are hoping to turn the developer positions into a cookie cutter role.
http://panela.blog-city.com/python_at_google_greg_ stein__sdforum.htm discusses the fact that Google has three official languages: c++, Java, and Python. It then goes into some detail about the use of Python at Google. It is a worthwhile read.
Lasers Controlled Games!
I think the parent is exactly right. All the people talking about "use the best tool for the job" have probably not worked very long in the industry. Being able to build on each other's successes, re-use code across projects that gets more vetted with each project, and build expertise with all the "gotchas" in your language of choice will make your company's product better and the company more profitable. These days, you can do almost anything with any of the popular languages, so there's no point in using more than one or two of them.
I'd say, standardize on Java, C#, or C++ (depending on your needs) as your primary language, add your scripting language of choice, then fire anyone who can't handle that. You'll be better off five years down the road than if you'd all built your fiefdoms around the tower of babel and every project becomes a throwaway codebase as the next "best tool" comes along 4 months later.
Any company that can't standardize on a language doesn't really have a coherent vision anyway, and probably is either a bunch of folks pretending to be a consulting firm or will disappear before too long.
(I'm sure I'm going to lose mod points for this reply, seeing what other people have written, but I don't see how any other approach is practical in the long term.)
E pluribus unum
"Save everybody time" is the best the pro-standardization folks could come up with? How about: (1) save training and support expenses for multiple sets of tools & languages; (2) specialists in the language & its quirks can benefit the entire enterprose not just the single group; (3) integration between different pieces of software is significantly easier if they're all in the same language; (4) easier to reuse code; and (5) easier to adjust when developers leave.
It's impossible to know whether it's a good idea in your case without knowing a lot more about what your company does, but in general a bad technical decision made for a good business reason is better than a bad business decision made for a good technical reason. The first one will cause you headaches down the road, but the second will make sure there's no road to go down. The key is deciding which decisions are good and which only appear to be good.
Also, what makes Lisp high-level over, say, Ruby? And Haskell is a very different thing from Lisp, you know, probably deserving a category of its own (together with Scheme and OCaml).
Then... WTF? Python and Ruby are closely related to Java?!! And Lua, too? Gosh... Lua isn't even object-oriented, for one! Ruby is essentially a bastard child of Smalltalk semantically, highly dynamic, closure-centric - nothing even remotely close to what Java is. Python - it has multiple inheritance and multimethods, again, something Java avoids on purpose. So... er... looks like you don't know what you're talking about, really...
at the pharma company I work at. We were all java, C++, LISP, Smalltalkers before. It's been four years now, and it was a wise decision. It's a very adept glue language that has been easy to integrate with other systems, both at the source code and network level. YMMV, and I think perl or ruby both fill this niche well too. We just wanted to have a standard platform for new development, and have been pleasantly surprised that python has been a productive choice for legacy integration and utility tasks as well. We had a requirement recently to integrate with a Java system. I used jython and it took three days, with no curly braces to be seen. We get a lot done every day now, and it's quite motivating.
And then someone might be tempted to work hard at trying to make your standard fix it and work. They might spend hours re-inventing the wheel. And what will that get them?
Why, the ability to say, "Yep, and we did it all with one language."
At the other extreme you've got people writing in whatever they want whenever they come across a problem and end up re-inventing the wheel because either "I don't like Perl!" or "Numbnuts wrote this code in Object Intercal 95, which doesn't have a compiler/interpreter on the platform I need."
And what does that get you?
Why, the ability to say, "Nope, we don't confine our employee's choice of languages." Well that and a morass of code based as much on individual whim as any logical need.
As always, there is a middle ground - having a standard (or standards) with an allowance for justified exceptions.
There are two issues here: using a single or mixed language approach for a particular application, and using a single languange (or not) across an entire organization for all projects.
I worked for a long time at a big national lab that was mostly a FORTRAN shop. They wanted to use FORTRAN for everything, and it was technically a bad choice for everything, but culturally it was the only solution that would fit without causing a jihad among the old timers. I much prefer C++ for these sorts of things (big complex simulations that must run fast), but had little success in converting the masses, even though it was always faster, more portable, much easier to maintain and handle complexity, and also you can actually hire good C++ programmers.
We were able to do some mixed language solutions (C++, FORTRAN, C, perl, etc.) and they were a nightmare to maintain. in hindsight, I think it would be better to keep the apps all in one language rather than mixing. The biggest problem here is portability. These applications have incredibly long lifecycles, and the platforms change severals times underneath you, which seems to affect the inter-language interfaces the most.
Anyway, it depends a lot on the type of application, lifecycle, target platform(s), etc. but I think in general it is best to pick a single language if at all possible for a particular application that is the best single tool for the job. But, if a different application would be better suited for a different language, go with the different language. Mandating a single language policy across an organization for all projects is counterproductive: use the right tool for the job.
Pick Two
One from - Java, C#
One from - Ruby, Python, Perl
It makes perfect sense to standardize on both. Scripting languages will always be more appropriate for text processing and other tasks like validation and system administration.
But, from what I've seen, it is important to standardize an organization on one of each. Letting people go off and just write System X in new technology Y might be enjoyable, but it does end up in a great deal of duplication and expense. For example, one environment I've seen has a great deal of Actionscript, a great deal or Ruby, more Perl than I'd ever want to see, and some J2EE applications. This usually occurs when an organization lacks a sufficient level of oversight over architectural decisions.
Just pray that neither side wins. Writing only Java is as silly as writing in a different language every single day.
------ Tim O'Brien
I have to say that I agree with both your and the parent's point of view, but I think that you're taking what the parent is saying a bit too far.
The parent is speaking of company-wide decisions. It makes a lot more sense to write a video game in C than in PHP, in the general case. It makes a lot more sense to write a web site in PHP, than in C, in the general case. You don't want to force your developers into an awkward scenario by having a company standard tool.
You, surely, can picture the conversation where the writer of the interpreter from your game is told that he cannot use LEX/YACC, because his company standardized on C++. You can't? I was once told this at a meeting.
On your point, however, I can also agree. Needlessly writing code in other languages makes debugging a pain, and reduces your ability to share code inside the project, a place where I imagine that the most reuse is likely to take place.
Still. I can't really see the need for a company-wide decision to standardize on a single language for all of their development.
We need a new moderation option: (Score:5, Pwned)
Just to be contrarian... it can work the opposite way as well. Many of my co-workers are scared of C++, but when I added a Python interpreter to the codebase and started implementating some of the program's functionality in Python, they felt comfortable creating and editing Python code.
I don't care if it's 90,000 hectares. That lake was not my doing.
Is the binary Big Indian or Little Indian?
What needs to be standardized, then, is not the language per-se, but the rules by which a language is selected. The IF statements. If you read through the standards documents on the IETF's website, you are not looking at a single, all-encompassing rule. You are looking at possibly a few thousand rules, with enough logic behind them to determine which rule applies.
In the case of a company picking a programming language, you probably don't need a few thousand rules. A single side of paper should be more than sufficient to cover all the meaningful languages and the cases they apply in.
Rule 1 might be: "If a more precise rule is not defined, programs should be written to the ANSI dialect of C, revision C-99 with all threading assuming the POSIX threading model and other parallelisms within a single computer assuming OpenMP extensions. Where a more precise rule exists, that rule takes precedence over this default action."
For embedded code in web pages, the rule might be: "Except where a specific project requirement dictates otherwise, embedded code within web pages should be written in PHP, revision PHP-5.1"
For transportable bytecode, you might say: "Web-enabled applications, applications needing to run on clients without installation and applications needing to run on otherwise unsupported platforms should be written in Java and compiled to bytecode using a standard Java SDK version 1.5"
For configuration code, you might say: "Automatic configuration files should be written to the standards specified by Gnu Autoconf and Gnu Automake, using the applicable Gnu M4 macros" (Hey, M4 is a language too!)
You'd then have a few more cases for specific types of work the company does a lot of. This may include additional rules requiring C, but that's fine. You want the specifics in there, so that if you want/need to change the default action, it doesn't screw everything up.
If you're defining standards for languages, I'd also define in the same document some standard coding practices (eg: keep namespaces distinct, if you're using javadoc or something similar then comments should follow javadoc's rules, if you're using a code validator that uses comments to embed commands then state what commands should be used and when, if you're using a SCM - a very good idea - then comments to embed details like revision notes, date, etc, should be included in a standard location, etc.)
The upshot is that there's a lot of different things to consider, nobody can just pick one language for all occasions. Well, they can, but the only language that will ALWAYS work for ALL cases is assembly, and I don't think many people really want to write entire applications in assembler any more.
It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
or "gosh, I really want to play with this" on any level ( in language or out ) should, generally, be disallowed.
Except that "Gosh, I really want to play with this" is, especially among hacker types, probably the single most powerful motivator there is. Disallow that, and not only do you lose out on the drive that hackers have to play with something cool, but they get annoyed and disgusted, and probably wind up working less hard on the things that they are told to work on.
SIGSEGV caught, terminating
wait... not that kind of sig.
I would hazard a guess that most people want to get a problem solved in the most painless manner possible when programming.
Surely the best way to achive this is by avoiding the reinvention of the wheel.
In some manner I tend to view languages now as nothing more than the glue that binds library calls together!
My approach is:
For example, there is a wealth of scientific code out there in F77. Just because F77 is old doesn't mean that the libraries are now wrong. They still do what they did back then. They are still useful. People have spent a great deal of time working out the error propagation in these codes, the efficiency and their validity. Do you really think you will save yourself time and do a better job by rewriting it in Java? No! So. Use them.
Then there are (great) libraries such as ATLAS or FFTW [*] written in C. Why assume you can do better? You can't, use that too.
In the rare case where you need to have something written from scratch, write it in whatever you are comfortable with. In my case C++/Boost (yes another library).
Finally you need to tie all this together, and hack around with it, and analyse the results so what's wrong with a bit of Python and MATLAB?
Perhaps this is an extreme example, and doesn't fall into the buisiness relm but the point is "the path of least resistance". Sometimes that path is dictated by existing code.
Do you really expect someone to rewrite from scratch an XML parser in "DoomJuice", or whatever is fashionable in house, just to please the people that want to standerdise on "DoomJuice"? No, use an existing library!
Ok, I've made my point. I will stop now.
[*] Yes I know FFTW technically uses Objective CAML to generate C code, but that's really only a distinction that a nerd would make.
Be nice to people on the way up. You will meet them again on your way down!
You learn all of these things. Then you look at Visual Basic code, and realise that a lot of other people didn't.
I am TheRaven on Soylent News