views:

369

answers:

8

Using the right language for the job is the key - this is the comment I read in SO and I also belive thats the right thing to do. Because of this we ended up using different languages for different parts of the project - like perl, VBA(Excel Macros), C# etc. We have three to four languages currently in use inside the project. Using the right language for the job has made it immensly more easy to do automate a job, but of late people are complaining that any new person who has to take over the project will have to learn so many different languages to get started. Also it is difficult to find such kind of person. Please note that this is a one to two person working on the project maximum at a given point of time. I would like to know if the method we are following is right or should we converge to single language and try to use it across all the job even though another language might be better suited for it. Your experenece related to this would also help.

Languages used and their purpose:

  1. Perl - Processing large text file(log files)
  2. C# with Silverlight for web based reporting.
  3. LabVIEW for automation
  4. Excel macros for processing data in excel sheets, generating graphs and exporting to powerpoint.
+4  A: 

As a Software Engineer it's your job to learn new languages if you need to. I would say you should go with the right tool for the job.

It's like sweeping the floor with an octopus. Yeah, it gets the job done... kind of... but it's probably not the best tool for the job. You're better off using a mop.

Another option is to create positions geared towards working in specific languages. So you can have a C# developer, a Perl developer, and a VBA developer who will only work with that language. It's a bit more overhead, but it is a workable solution.

Vivin Paliath
It's more overhead to have one person per language, but you save on remembering people's names. You can just say "The Perl Guy" and everybody knows who you mean.
Yar
@yar I was thinking in the context of management or HR :). I agree with you otherwise.
Vivin Paliath
It's best if all the developers are at least comfortable in all the languages used in the project. That might be difficult, however, it's not unreasonable for there to be overlap and to be working towards every developer being able to at least understand all the modules.
mpez0
If you're sweeping the ocean floor, an octopus is probably better. Sometimes the octopus is the right tool for the job.
Mark Rushakoff
A: 

My experience using C++ and Lua was that I wrote more glue than actual operational code and for dubious benefit.

DeadMG
+3  A: 

Any modern software project of any scope -- even if it's a one-person job -- requires more than one language. For instance, a web project usually requires Javascript, a backend language, and a DB query language (though any of these might be created by the backend language). That said, there's a threshold that is easily reached, and then it would be very hard to find new developers to take over projects. What's the limit? Three languages? Four? Let's say: five is too many, but one would be too few for any reasonably complex project.

Yar
+1: web dev is often five: html, javascript, server side code, sql and css
ChristopheD
@ChristopheD, I'm not sure that markup languages are programming languages, but they are surely something :)
Yar
@yar: good point ; what I meant to say: web dev often requires you to know 5 different 'languages' (when considering html and css 'languages')
ChristopheD
@ChristopheD: right, "languages." Not to say that CSS and HTML are not filled with just as hard to "master" as dev languages, but they're intellectually 'thin' challenges. Please don't ask me to explain that :)
Yar
+14  A: 

I'd say you are doing it right. Almost all the projects I've ever worked on have used multiple languages, without any problems. I think you may be overestimating the difficulty people have picking up new languages, particularly if they all use the same paradigm. If your project were using Haskell, Smalltalk, C++ and assembler, you might have difficulties, I must admit :-)

anon
+1. Developers shoudn't be afraid of picking up other technologies.
ChristopheD
Would it not be difficult for a single programmer to shift between multiple types of languages say scripting, C# and functional(F#) etc.Any nice way of managing it.
Manoj
Also just wondering, are not programmers suppose to be specialised in a particular Language or technology?
Manoj
@Manoj Yes, that's what I meant by saying you are OK if you stick to the same paradigm. Switching causes problems, for example many C++ programmers are rather poor at writing SQL queries, because the two languages use different paradigms. That doesn't mean you should drop SQL from a C++ project, of course. And I would expect good programmers to know at least a couple of languages very well, and to be able to be productive in say four or five.
anon
@Manoj - When we say some programmer is a specialist in XYZ language or technology, its because of his/her experience in the area. That does not stop him from trying his hand in another language. Plenty of chaps I know work on Mainframes as well as Java.
Srikanth Venugopalan
+1  A: 

I would be of the opinion, that if I a programmer on my team wanted to introduce a second (or third) language into a project, that there better be VERY VERY good reason to do so; as a project manager I would need to be convinced that the cost of doing so, more than offset the problems. And it would take a lot of convincing.

Splitting up project into multiple languages makes it very expensive to hire the right person(s) to take over that project when it needs maintenance. For small and medium shops it could be a huge obstacle.

Edit: I am not talking about using javascript and c# on the same project, I am talking about using C# for most of the code, F# for a few parts and then VB or C++ for others - there would need to be a compelling reason.

KISS: 'Keep it simple stupid' is a good axiom to follow in most cases.

EDIT: I am not completely opposed to adding languages, but the burden of proof is on the person to who wants to do it. KISS (to me) applies to not only getting the project/product done and shipped, but also must take into account the lifetime maint. and support requirements. Lots of languages come and go, and programmers are attracted to new languages like a moth to a light. Most projects I have worked on, I still oversee and/or support 5 or 10 years later - last thing I want to see is some long forgotten and/or orphaned language responsible for some key part of an application I need to support.

EJB
That you bought up F#, it was in the same context I found the comment - Use the right language for the job. Its here : http://stackoverflow.com/questions/928042/how-will-f-sharp-be-used where they suggest the same(comment by Martin Carpenter).
Manoj
Applying KISS, is not using appropriate language for the job simple, rather than trying to bend another language to do the same thing in a more complex way.
Manoj
+12  A: 

Using a variety languages vs maintainability is simply another design decision with cost-vs-benefits trade-offs that, like any design decision, need to considered carefully. While I like using the "absolute best" tool for the task (whatever "absolute best" means), I wouldn't necessarily use it without considering other factors such as:

  • do we have sufficient skill and experience to implement successfully
  • will we be able to find the necessary resources to maintain it
  • do we already use the language/tech in our system
  • does the increase in complexity to the overall system (e.g. integration issues, the impact on build automation) outweigh the benefits of using the "absolute best" language
  • is there another language that we already use and have experience in that is usable in lieu of the "absolute best" language

I worked a system with around a dozen engineers that used C++, Java, SQL, TCL, C, shell scripts, and just a touch of Perl. I was proud that we used the "best language" where they made sense, but, in one case, using the "best language" (TCL) was a mistake - not because it was TCL - but rather because we failed to observe the full costs-vs-benefits of the choice:*

  • we had only 1 engineer deeply familiar with TCL - the original engineer who refused to use anything but TCL for a particular target component - and then that engineer left the project

  • this target component was the only part of the system to use TCL and it was small relative to the other components in the system

  • the component could have been also implemented in another language we already used that we had plenty of experience in (C or C++) with some extra effort

  • the component appeared deceptively simple, but in reality had subtle corner cases that bit us in production (not something we could have known then, but always something to consider as a possibility later)

  • we had to implement special changes to the nightly build because the TCL compiler (yes, we compiled the TCL code into an executable) wouldn't work unless it could first throw its logo up on the screen - a screen which wasn't available during a cron-initiated automated nightly build. (We resorted to using xvfb to satisfy it.)

  • when bugs turned up, we had difficult time finding engineers who wanted to work on it

  • when problems with this component cropped up only after sustained load in the field, we lacked the experience and deep understanding of the TCL execution engine to easily debug it in the field

  • finally, the maintenance and sustainment team, which is a much smaller team with fewer resources than the main development team, had one more language that they needed training and experience in just to support this relatively small component

Although there were a number of things we could have done to head-off some of the issues we hit down the road (e.g. put more emphasis on getting TCL experience earlier, running better tests to detect the issues earlier, etc), my point is that the overall cost-vs-benefit didn't justify using TCL to code that single component. Again, it was not a mistake to use TCL because it was TCL (TCL is a fine language), but rather it was a mistake because we failed to give full consideration to the cost-vs-benefits.

Bert F
I am reminded of a Pokemon episode I watched with my son. Professor Oak was asking Ash (the main character) and Gary what they'd do in different Pokemon situations. Gary had all sorts of strategic answers; Ash's was "Use my Pikachu". Professor Oak said those were both valid strategies.
David Thornley
@David - :-) yeah, one certainly can overthink the problem. Valid also that my life often feels like a cartoon, but its usually Dilbert. And I liked how you slipped "with my son" in there, you closet Pokemon fan. ;-)
Bert F
@Bert F: Children are useful for enjoying things you wouldn't necessarily want to admit to, yes.
David Thornley
I asked a co-worker whether I was biased about the above situation: "I don't know about biased ... I just think it's 20/20 hindsight. [...] given all the criteria you identified, I doubt if anyone would ever risk trying a different/right language for a task." He probably right in that my specific experiences have me overly risk-averse and that sometimes **great software** means taking a risk.
Bert F
A: 

I'd start by saying the issue is whether you are using the right paradigm for the job?

Suppose you know how to do object oriented programming in C#. I don't think the leap to Java is all that great . Although you'd have to familiarize yourself with libraries and syntax, the idea is pretty similar.

If you have procedural parts to your project, such as parsing files and various data transformations, your Perl/Excel Macros seem pretty similar.

But to address your issues, I'd say above all, you'll need clarity in code. Since your staff are using several languages, they won't be familiar with all languages to an equal degree. So make sure of this:

1) Syntactic sugar is explained in comments. Sugars are pretty language specific and may not be obvious to a new reader. For instance, in VBA I seem to remember there are default properties, so that TextBox1 = "Hello" is what you'd write instead of TextBox1.Text = "Hello". This can be confusing. Also, things like LINQ statements can have un-obvious meanings. So make sure people have comments to read.

2) Where two components from different languages have to work together, make excruciatingly specific details about how that happens. For instance, I once had to write a C component to be called from Excel VBA. There's quote a few steps and potential errors in doing this, especially as far as compiler flags. Make sure both sides know how their side of the interaction occurs.

Finally, as far as hiring people goes, I think you have to find people who aren't married to a specific language. To put it vaguely, hire an intelligent person who sees business issues, not code. He'll learn the lingo soon enough.

Carlos
+1  A: 

Using the right language for the right job is definitely appropriate - I am mainly a web programmer, and I need to know server-side programming (Rails, PHP + others), SQL, Javascript, jQuery, HTML & CSS (not programming languages strictly, but complex things I need to know) - it would be impossible for me to do all of that in a single language or technology.

If you have a team of smart developers, picking up new languages will not be a problem for them. In fact they probably will be eager to do so. Just make sure they are given adequate time (and mentoring) to learn the new language.

Sure, there will be a learning curve to implementing production code if there is a new language to learn, but you will have a stronger team member for it.

If you have developers in your teams who strongly resist learning new languages, unless there is a very good reason (e.g they are justifiably adamant that they are being asked to used a different language when it is not appropriate to do so) - then they are not the sort of developers I'd want in my teams.

And don't bother trying to hire people who know all the languages you use. Hire smart programmers (who probably know at least one language you use) - they should pick up the other languages just fine.

DanSingerman