views:

1889

answers:

11

At work, the decision is generally driven by what the team knows (which for web projects ends up being PHP/MySQL/JavaScript in my current job) and cost of the tools. But when you are writing all the code yourself, how do you make the decision? When do you pull out the trusted tool (and how do you choose which trusted tool if you have multiple) or when do you decide that a new language or tool is better and start to learn that?

Related: Which language to choose and when?

+1  A: 

You look at all the possible languages you could code the project with, and then look over what each of them offer compared to each other, and choose the one that seems as if it would be better for the project, such as certain features that would make the project better in certain ways.

Rayne
Is there an easy or good way to do this and make sure all the bases are covered? Or it is all project-specific?
Thomas Owens
It's almost always project specific, experienced programmers try to find the best tool for the job.
Rayne
You can made this comparison one or two times but it's illusory to learn for every new project a new programming language. Either you can code in a lot of languages quite good - or you concentrate on one/two languages and master them. Your experience will compensate the drawbacks to other languages.
Anheledir
+6  A: 

Long story short for me its:

  • Java (networking, cryptography, XML, platform independence)
  • C++ (memory access, raw speed, full power generics)
  • C# (Windows GUI's, Web Services)
  • Perl (text processing, regex heavy code)
  • Ruby (for Perl + metaprogramming and closures)
  • XSLT (any kind of XML conversion)
Garth Gilmour
+1  A: 

It's also a question how many time I'm willing to spend to learn new techniques or even languages. I must feel comfortable with the language and their syntax / style of code. Also it's a question how many communities and other ressources you may find about it. Are there free tools to work with the language? What languages are featuring important functions I need and is it possible to add new features on myself or with 3rd party libraries / tools?

There are a lot of good languages around there - and the fact they are all used by a lot of people proofs that they have their right to exist. I'm personally a .NET-Developer with C# but I also worked several years with PHP, Delphi and Turbo Pascal. I will never code in Java or Ruby because I don't like e.g. their syntax but that doesn't make them worse programming-languages and vice versa.

So: Have a look at the style you have to code with different languages and what features they offer, how big and, yes, congenial the language and also the community seems to be. As a plain Mac- or Linux-developer you will choose another language as a mobile- or embedded-device developer and the .NET-Framework isn't the right thing for you when you believe Microsoft is the root of all evil. ;)

Most of your daily work you can handle with all major programming languages.

Anheledir
A: 

You have to consider all the trade-offs involved: Ease of use for programmer vs. user, speed vs. memory usage, etc.

I use:

  • C for scientific computing. Go baby go...
  • Java for quick easy GUIs (cross platform)
  • And Haskell for when I need my mind blown.
directrixx
C isn't really suited for scientific computing. It's a low-level language (we're talking about scientists as users, not chip programmers) that does neither have support for bignums nor a decent tuple abstraction.
skypher
+2  A: 

"how do you make the decision?"

Not sure what you're driving at.

"Is there an easy or good way to do this and make sure all the bases are covered? "

Ahh. Much clearer question. This is much better than the initial question.

You can't hand-wring your way to a good decision. You can't cover all the bases. You can barely cover one or two. So don't try.

When it comes to tools, frameworks, databases, programming languages, you can never make a "perfect" choice that is free from second-guessing. No matter what you choose, someone will say that their tool, framework, database or language is better. Always. For all possible decisions.

"and how do you choose which trusted tool if you have multiple?"

Ummm... if you can't determine which tool you trust, do the following.

  1. Get a coin.

  2. Assign tools to heads and tail.

  3. Flip it.

Do that. Seriously.

If you can't flip a coin, then you have some "feeling" about one being "better" or "more effective" or "easier to type" or something. It doesn't much matter what that specific thing is. Just go with whatever your gut is saying.

People still use COBOL in spite of all that's been learned in the last 30 years.

S.Lott
But if there are more than two options, you can't use a coin so you need to write a program to randomize it... Which means you have to decide what language to use for that... Isn't infinite recursion fun?
Dave Sherohman
Last person I told to flip a coin refused. They made the decision. Then they immediately declared their decision no good. Lesson-Learned: Professional-grade hand-wringers are still able to waffle in the face of stupidity.
S.Lott
A: 

I think the most important factor, esp. in the web programming domain, is what functionality you need, and what libraries and frameworks are available for each language that let you implement this functionality easily.

ykaganovich
+1  A: 
  1. availability of third party libraries. I do not really want to code up encryption functions, HTTP client, mail client, Oracle libraries, PDF file generation, etc... After all you are trying to ship code, not embark on a science project.
  2. availability of tools and IDEs. Emacs wont do. I need a debugger, profiler, syntax higlighting, refactoring would be nice.
  3. size of community (can I google simple to intermediate questions and find an answer, very useful when starting out, since I will probably not read a book).
  4. How simple is it (Simple is good, compare the simplicity if the Internet protocols like HTTP and SMTP to the mind numbing drudgery of WS-* or writing COM controls in C++)
  5. Availability of a variety frameworks if doing web development.Ruby on Rails may be fine for one style of web development, but wholly unsuitable for a Rich Client application, so you need more than one choice (for example, JSF, JSP. GWT for Java)
Tony BenBrahim
A: 

For me, if I need to do HTML and a clean design with not a lot of functionality, I'll use Php.

If I need to do a web application where the design is not really important, I'll use C# + ASP.Net.

If I need to do a desktop application that are based on fonctionality rather that on speed. I'll use C#

Patrick Parent
PHP yields a clean design? Do you mean the graphics?
skypher
A: 

If I need something done quickly and with little effort, I chose Python:

  • Available on all major platforms
  • Easy to learn, remember and use
  • Huge default library ("batteries included")
  • The syntax is better than any of the 30 languages I've used so far

For complex stuff (say > 50'000 LOC), I tend to use Java because the IDE can help my poor brain to get around the code.

Aaron Digulla
A: 

As as solo developer you will develop your own function libraries over time. As work comes in, you don't want to reimplement these in a different language when you could be spending the valuable time on actual functionality, so you will stick with the one that lets you do the work quickly and reuse relevant modules you have done before (user management, cms, payment processing, etc).

When you have downtime, you can assess where you want to be moving, and try porting your modules to another environment as a means to see how it is. It is important to have an awareness of alternative platforms and try them out.

This is harder for full time people to get the time to do sadly, so they will specialise in a particular environment, perhaps to their long term detriment. However a flexible work environment does give some freedom to learn new toolkits within the mandated language(s).

Anyway, I think the advice is similar to specifying a language within a company: One for applications programming, one for quick scripting. You will probably need to know several databases and their quirks, and several toolkits within the available languages.

JeeBee
A: 

Common Lisp with its relentless elimination of boilerplate and its excellent compilers is known to substantially boost the productivity of solo developers and small teams.

skypher