Category Archives: Languages

Use Multiple Languages

Using a language exclusively for all your programming task is not productive. While knowing the all the secrets of one language makes you proficient in that language, writing a 100 line Java class to do something a 15 line Ruby script or 20 line PHP script is a waste of time.

Here is my current language use:

  • Java – Robotics, Vision Processing, Anything Performance Intensive
  • Groovy – Launching anything written in Java, this saves me the time of compiling and writing complex shell scripts to launch the Java program.
  • Ruby – General Automation Scripts or Scripts doing emailing or sending data over the network
  • Batch/Shell – I use these as launchers for backup/tar/gz or running CRON or other scripts on a set schedule.
  • PHP – Everything web, while I could use Rails, for some of this, I’ve not had the need to create a full website using all the ins and outs of this framework. See article on “Don’t Use Frameworks” for justification.
  • C or C++ – I use these for interfacing with device drivers or writing JNI (Java Native Interface) wrappers.
  • C# – I use for writing windows only programs.

A good idea if you only know one or two languages, is to find the right domain for your language. You may never have the need to use more than two, but if you find yourself struggling with something in a language, or are sick of how unproductive you feel, get a book and start experimenting. Look at WikiPedia for a list of comparison of programming languages.

This year I am planning on doing more with with Scala or Clojure.

Use Multiple Editors

Contrary to Dave Thomas’s maxim, pick a text editor and know it well, I think sometimes multiple text editors are more productive than just using one for everything.

Some of the reasons you may need to use different text editors:

  • Different Programming Languages
  • On different systems (remote SSH vs. Local)
  • Multiple Computers (Home, Work/Client Site)
  • Something fast and easy vs. something large and complicated

Personally I use the following editors:

  • Eclipse – PHP, Java, Groovy, Some Ruby
  • Notepad++ – ColdFusion, HTML, CSS, JavaScript, Ruby, C
  • VIM – Bash, on the fly edits for PHP, Java, Groovy, Ruby
  • Visual Studio – C++, C#, VB

Do I know everything about all the editors, no, but for the amount of time I spend in each of these different languages, I know enough about each editor to be the most productive in the time I have.

Whatever combination you pick follow this rule: Pick the editor with the 20% of features that are easiest  to use that allows you to do 80% of your work. Here is a list of text editors in Wikipedia to help you decide.