Tuesday, April 11, 2006

A defense of conformity

I have recently started using Jetbrain's IntelliJ IDEA Java IDE. This is a company standard; the employer pays for all the developer's licenses. Doesn't sound like such a big deal, except that I have been one of the few developers in the company who used Eclipse instead.

Before starting to use Eclipse, I used vim for a long time, since my first job many, many years ago. I continued to use vim even as the early adopters evaluated various IDEs and settled and grew comfortable with IDEA. I still think that IDEs dumb people down, at the very least an IDE user has less knowledge of the libraries he is using, only because he does not look at the Javadocs as often as someone using vim or emacs. However, IDEs are very useful for autogenerating large amounts of boilerplate code that have become part of J2EE programming (both classic and POJO based), and are useful to start writing code quickly using unfamiliar libraries. So after a particularly long and ardous project involving writing large quantities of JDBC code, I decided to give IDEs a try.

Eclipse was my first choice, because I do some open-source Java programming on the side, and I figured that way I could learn one IDE that I could then use both at home and at work without running afoul of any licensing issues. Soon I was using Eclipse quite competently, keyboard shortcuts and all, which made switching to IDEA all that more difficult. The one thing that Eclipse did not shine at was its JSP editor, so I purchased a yearly subscription to MyEclipse and installed the plugins at work and on my laptop. This was definitely a vast improvement, but I still problems with Eclipse crashing when I had to open multiple (large) projects in Eclipse.

Other developers have had a lot of success with IDEA and our large codebase - IDEA is quite adept at sucking in vast quantities of Java and JSP code and managing it all, so in desperation I just closed down Eclipse, and fired up IDEA on the same codebase. The first few sessions were pure hell as IDEA would freeze spastically every once in a while as it garbage collected, and I scurried around mousing through the menus, looking for my favorite Eclipse feature equivalents in IDEA. Giving IDEA the same amount of memory as I had allocated to Eclipse (512MB) alleviated the garbage collection freezes somewhat so they were less noticeable. It also helped that I had grown somewhat accustomed to these freezes. Its better now, I can code at a reasonable speed with IDEA now, using some keyboard shortcuts and some mouse clicks, still not as well as in Eclipse, but I guess that will come with time. It also helped that IDEA is an entrenched company standard, so there are standard configuration files that embody the coding standards, so I did not have to set them up myself. And of course, JSP support is phenomenal.

This got me thinking. My desktop at work and my personal laptop both run Fedora Core 2, where the supported company operating system standard is Windows XP Professional. I consider myself lucky that my employer allowed me to install the OS of my choice on their machine. My initial rationale in wiping out Windows XP and replacing with RedHat 7.3 was that Unix/Linux is a better program development environment. The people running Windows XP on their workstations have Cygwin or Putty installed, and they routinely log onto shared Unix machines over ssh. With a Linux workstation, I can do more work locally rather than on shared machines...or could.

With the growing availability of open source software on both Unix and Windows, that argument is not really very valid anymore. Sure, if I was doing Unix OS level programming (tools or system), then I can see why a Unix workstation would be a more obvious choice. The programming environment that my team uses Java, an open source web server, application server and a database, all of which install and run equally well on both Windows and Linux. I put all my code in my shared home directory, which is cross mounted over NFS on every development Unix machine, Windows users use a SAMBA mount instead. IDEA and Eclipse run well on both platforms. As a web application developer, a significant portion of the stuff I code is written for web browsers, and since Microsoft IE is still the browser of over 90% of internet users, the page must look good on IE, and IE is only available on Windows. Firefox, the other major browser, is available on both Linux and Windows. The two major scripting languages that I use, Perl and Python, run equally well on both environments.

And frankly, I don't have the time to administer TLC to my Linux workstation anymore. There's a reason that its still stuck at Fedora Core 2 while the rest of the world has moved to Fedora Core 5, or at the very least, the stable and mature Fedora Core 4.

I think the most compelling reason for me to run Linux is that I am more comfortable with a Unix-like OS. With a Unix like OS, I can use the command line and script things that happen repeatedly, unlike the point and click interface that Windows offers. I have used Cygwin for the command line interface on Windows in the past, using Perl to automate tasks. Unix also offers a hierarchical directory structure starting from the root, while everything above C:\MyDocuments is pretty much hidden from the Windows user. Of course, it is possible that enough time has passed for me as a Linux user to forget how bad it was using Windows, but I think that the time may be ripe for me to consider switching back to Windows.

Yet another argument in favor of this decision is to tally what I have to give up to continue to use my favorite OS at work. As I have mentioned above, Linux no longer provides me with a compelling advantage over Windows as a development environment. However, the job of a developer is more than just writing programs. It is also communicating over E-mail and IM, scheduling and attending meetings, creating and reading documents using Word Processors and Spreadsheets and creating the occasional presentation or architecture or system diagram.

I use Gnome's Evolution for E-mail and Calendaring and GAIM for Internet messaging with Yahoo's service. Evolution (I use version 1.2, the latest available on FC2) is competent for the most part, but routinely crashes when downloading from POP3 mailboxes. I read somewhere that its because Microsoft does not honor some aspect of the POP3 protocol, but I would think that Evolution would have provided an workaround for that, much like SAMBA did in a similar scenario. It does support Calendaring, but if I have to schedule a meeting, I have to go to my secondary PC with Windows XP installed, open up Outlook and issue the invitation. As for reminders, there have been quite a few occasions when the alert died but Evolution chugged on, which meant that it did not pop up the alert when it was time for me to get to a meeting, causing me to miss or be late. Not too good for the image, I can tell you that. I have had no problems with GAIM, but it does not offer functionality that is significantly greater than Yahoo's YIM program.

For creating documents, I use plain text most of the time, since it can be more effectively tracked on a source code control system. However, when the output needs to be read by business, or when filling out a standard template, I use OpenOffice Writer. Writer can read and write Microsoft Word files, however, there is some formatting information that is lost, especially if the some of the template format involves corporate logos. I use the OpenOffice Calc spreadsheet tool for doing project estimates and tracking times. Calc, like Writer, can read and write Microsoft Excel files. Unfortunately, I haven't figured out how to do graphs, although I confess that I haven't looked hard enough - I usually just switch to my secondary Windows PC and run Excel instead. I have also used OpenOffice Impress to create presentations, and I must say that it is almost as feature rich as Microsoft PowerPoint, at least the features that I use. So while each of these office suites are good in themselves, against an entrenched Microsoft standard, they come up short. It feels a little lame to have to apologize for your tools because the output does not look as good as that produced by an equivalent tool with the same effort.

I have created system diagrams in the past using Microsoft Visio, but I use dia nowadays, and I must say that I am quite happy with it. Of course, there is room for improvement, but its not too bad. I must say that I like it a little better than Visio, but that may be because of all the hassle I got about licensing when I requested that it be installed on my Windows machine in a previous job.

Of course, one advantage of Linux is often cited - it being immune to viruses. That is due in part to the stronger multi-user security model in Unix, but also due to the fact that there are not too many people writing viruses for Linux. And corporate IT support invests in various safeguards that make it quite unlikely that your work PC will be infected by viruses in any case.

So looking back, Linux on my desktop at work doesn't seem to offer many advantages anymore. I can see myself still preferring Linux over Windows if I was running my own company. I would have reduced software licensing costs and it would be easier to use just because I am more familiar with them. In such a case, I would have to pay (or factor in time) for support myself, so not having adequate support would also be a non-issue. I could also generate corporate documents that would go easy on the formatting, so that they would be equally at home in OpenOffice and MS-Office. The principal problem that makes Linux not such a great option at work is that most people do not use it, which means that services and resources are not geared to support this environment, even though in my mind, it may be the better one.

2 comments (moderated to prevent spam):

Anonymous said...

I use NetWeaver Developer Studio, which is basically Eclipse with all the plugins from SAP, to build web applications on NetWeaver Web Application Server. My experience shows 2 GB of RAM really makes life a lot easier.

Sujit Pal said...

Yes, somebody I met at JavaOne last week snickered when I asked about the memory utilization on NetBeans, mentioning that I use 512MB as my -Xmx setting for eclipse. It does look like 2GB+ of RAM is becoming the norm. However, the motherboard on my desktop at work is fairly old (about 3 years) and it can take a max of 1GB, so I am stuck with it, unless the machine itself is upgraded (which would mean that I would have to interrupt real work to install linux on it myself, unless I went with Windows XP). But if I do upgrade the desktop, I will try setting the -Xmx higher like you suggested.