Which Is Better?
I often come across “Which is better?” questions in newsgroups and forums :
- Which is better: C# or Java?
- Which is better: Windows 2003 Server or Linux?
- Which is better: using an interface or an abstract base class?
Now I have a question. Which is better: a bicycle or a car?
Well, that depends. What are you looking for? Are you looking for a vehicle for sports or do you just need to get to work in the morning? If you want the exercise, you should defiantly choose the bicycle. However, even if you only need a vehicle to get you to office on time, you might still consider a bicycle. That depends, of course, on how far is your office from home. If it’s quite a long drive, you will probably use a car. However, if your work is relatively close to your home, and there is a lot of morning traffic, you might consider using a bicycle. But then again, if you don’t have showers at your workplace, you might feel uncomfortable sweating your way to work.
You cannot seriously consider which vehicle is better if you don’t know what you are going to use it for. The issue of choosing a vehicle is context sensitive: any answer you give is either good or bad in a certain context. When the context is changed, the answer might be quite different.
Similarly, the questions above are also extremely context sensitive. Is C# better than Java? Well, that depend on what you need. If you need your application to run on multiple platforms, you should definitely go for Java. If you need it to run only on Windows, and it is a GUI application, using C# is probably a more sensible decision.
Without knowing the forces, constraints, and requirements of your project, you cannot really answer any of these questions. The more information you have about the context, the more accurate your response will be.
Not that I am all for answering a question with a question, but next time you face a “Which is better?” question, just ask back: “For what?”.











