The Source for Java Technology Collaboration
User: Password:



Cay Horstmann

Cay Horstmann's Blog

Why Java Developers Should Switch to Linux

Posted by cayhorstmann on June 21, 2006 at 10:43 AM | Comments (33)

It's summer again, people have more time on their hand, and they think about switching operating systems:

I think that's great. A Windows monoculture is not healthy. Judging from my students' crapware-infected laptops, it is actually extremely unhealty.

In the last five years, I regularly used Windows XP, Mac OS X, and Linux (Fedora and Ubuntu). In my experience, Windows XP is just fine when well-tuned, but not easy to keep that way, and totally wretched when it is not. Mac OS X is pretty if you are into blue and brushed metal and the mouse and Java 1.4.2--as you should be if you are a right-thinking citizen. I much prefer Linux, particularly for Java development. I'd like to convince you to switch to Linux as well. My motivation is simple and selfish. If lots of programmers work on Linux, then Java support will for Linux will get even better.

I often hear the argument "I saw the (caution: oxymoron ahead) coolest dudes at a tech conference running Macs, so I should get a Mac too". There are three simple reasons to switch to Linux instead.

  1. Java. In the reality distortion field, "Apple has optimized Java on Mac OS X to look great and perform superbly, making Mac OS X the ultimate platform for developing and deploying cross-platform Java applications." It just ain't so. Sun releases the latest and greatest versions of Java simultaneously on Linux, Solaris, and Windows. The Mac port is done by Apple. After much delay. With interesting bugs. And, if you use Eclipse plugins, you have SWT bugs too.
  2. Keyboard shortcuts. This is what drove me away from the Mac. On Thunderbird, I check my mail with Alt-F W G (File -> neW -> Get all messages). I start a new message with Alt-M N (Message -> New message), save it with Alt-F L (File -> send Later) and send it with Alt-F D (File -> senD unsent). I really hate to do that with the mouse. M o v e t h e m o u s e t o t h e m e n u b a r t h e n l o c a t e a n d c l i c k t h e m e n u t h e n l o c a t e a n d c l i c k t h e s u b m e n u t h e n l o c a t e a n d c l i c k t h e m e n u i t e m. . . I did give the Mac the good try for a month or two, three years ago, and I just couldn't take the constant mousing.
    Now I know what the Mac zealots will say:
    • All programs have keyboard shortcuts. Sure, but look at NetBeans. At most half of the menu options have shortcuts, and most of them are impossible to remember (Ctrl + Shift + F8).
    • You can get a third-party program. Ok, but you'd have to laboriously define hundreds of menu accelerators by hand, separately for each program, and they too would be hard to remember.
    • Research has shown that people delude themselves thinking that the keyboard is faster. Studies, in which people from all walks of life have been asked to solve the same task with the mouse or keyboard have conclusively demonstrated that the mouse is faster, even though power users have the illusion that they save time with keystrokes. Well, a programmer isn't a person from all walks of life. We need both of our hands on the keyboard most of the time.
    • You can turn on accessibility features. This one really galls me. Nowhere is the difference between Apple's blowhard marketing and the reality more apparent. Indeed, you can activate an accessibility key to get into the menu. Once you are in the menu, you have to use the arrow keys. What happens if you hit E? Will it open the Edit menu? No, sir. The all-knowing keepers of wisdom in Cupertino know that this would not be good for you. The key is silently and unobtrusively ignored. "Apple’s commitment to accessibility is evident throughout the Mac OS X operating system which is by design, easy to use, but also includes a wide variety of features and technologies specifically designed to provide accessibility to users with disabilities."
  3. Freedom. I run Mac OS X 10.3 on my aging PowerBook, and I like it just fine. Can I try out Java 5.0? Not without paying for and installing Mac OS 10.4.

Ok, you want good Java support, keyboard shortcuts, and freedom. Who doesn't? But isn't Linux hard to use?

For my needs, Gnome seems on par with the Mac OS X and Windows GUIs. In the bad old days, laptop suspend and USB stick mounting worked poorly, but those issues have been fixed. The remaining difficulties are (1) wireless and (2) external displays. Wireless with an external $20 card works beautifully, but some of the built-in adapters can cause grief. Get a $20 card. External display switching is not as easy as it should be. Practice it at home before you give that presentation.

If you are considering switching, do yourself a favor. Stay on your old platform a little longer and switch to cross-platform applications first. For mail, use Thunderbird, not Outlook or Mail.app. You don't want your mail trapped in some proprietary format. Use OpenOffice for word processing and spreadsheeting. You increase your chances of being able to read your files twenty years from now. Use Eclipse or Netbeans or JEdit or Emacs for your Java programming. On Windows, use the bash shell (Cygwin), not the DOS shell. After you are comfortable with the cross-platform applications and tools, make the switch. It'll be easy. And if you don't like your new OS, you can switch again.

???After you switched to Linux, there is one remaining problem--the coolness factor. Nobody can see that you aren't running Windows. The solution is, of course, a Linux sticker. Pick up a garish one at a trade show, or print one from here, here, or here, and slap it on your laptop.


Bookmark blog post: del.icio.us del.icio.us Digg Digg DZone DZone Furl Furl Reddit Reddit
Comments
Comments are listed in date ascending order (oldest first) | Post Comment

  • I'm not sure that it makes all that much sense to 'switch' to Linux. Why not Solaris/OpenSolaris then? Solaris allows Java developers to have much much more observability into their running Java process (prstat -L to find which threads are misbehaving, pstack on a specific thread, dtrace for everything/anything).


    Also, Apple Mail.app does not store it's data in a proprietary format, it uses mbox.

    -Moazam

    Posted by: moazamraja on June 21, 2006 at 01:38 PM

  • I won't argue with the idea of switching to Linux. I use gentoo...I love it...but, I don't see an argument for a switch here. I see a "if you're going to switch to something, don't make it mac...it's not as cool as you might think" argument.

    Posted by: oopsatwork on June 21, 2006 at 02:08 PM

  • Sigh. I started using a Mac because my wife had one. It took me a while, but I was a switcher. From Linux (Fedora). The Mac gives me 95% of what Linux does, but I don't need to fiddle and diddle with drivers, recompilation of apps, recompilation of the kernel (to react to app requirements), etc... . The Mac ain't perfect. As you mention Apple sometimes ties software to the OS (I'm sure they have reasons - probably QA, but perhaps marketing too). But I'm pretty happy now that I can get Mustang, even for the PowerPC platform. And I use that fiddling time to use the iApps.

    Don't get me wrong, I have a special spot in my heart for Linux. But it's really nice to get all that unix goodness and a system that I don't have to admin in my downtime.

    Posted by: jtr on June 21, 2006 at 05:51 PM

  • What makes me happy with linux, is the no need to antivirus, spyware and other little apps who consumes CPU and memory. At many organizations I did consulting work I see how these antivirus, anti-blah-blah software damage the day-to-day job. And, of course, linux is much more stable on those environments.

    Posted by: claudio on June 21, 2006 at 05:57 PM

  • I use Linux (SuSE, Mandriva and Ubuntu), Mac OSX, Solaris X86 and Windows XP (at work, I have no choice). I like OS X and Linux and dislike XP. Solaris is somewhere in between. When it comes to Multimedia, I have to stick with the Mac. Unfortunately too many things are not available for Linux. For Java development, as far as I am concerned, there is nothing even close to Linux.

    Speaking of weird usability decision, who gave Apple the idea that a window should be resized only from the bottom right corner? I hate having to move windows around and to move the mouse from one corner of the screen to the other in order to resize the window.

    Posted by: 1avi on June 21, 2006 at 06:26 PM

  • I agree with most of what is being said. I have always said Macs cant be the best Java development platform especially since the JDKs take so long to be ported for use on OS X. However, despite running XP regularly, I wholeheartedly agree it is hard work for most people to keep the OS well oiled and tuned. Use of 3rd party software is an absolute must to keep the machine clean. I mainly use NOD32 to keep viruses off and I use CCleaner to get rid of junk. 2 programs aint so bad but I rather wish I never had to use them. That si where Mac and Linux are so lucrative. But....too bad I dont like manually tweaking everything in Linux through command line. I am a visual person and thus I like seeing windows and so on and graphical utilities for everything. And besides when i am not coding or going out I am gaming to get my gaming fix so unfrotunately Windows is the best platform to do everything!

    Posted by: suryad on June 21, 2006 at 10:19 PM

  • I suppose the important thing is moving away from Windows to almost anything else, but unless you only do dev work, Linux is not such a happy place to be, IMO. I use gentoo,suse,fedora, but also solaris x86 10, xp (only at work). My main machine for just doing stuff is a Mac though.
    I don't get your comments on Mac having old versions of Java... OSX has a fairly current beta of Mustang, and its 1.5 is less buggy (for things that matter to me) than Sun's 1.5.0_06. Sure you need to be using OSX 10.4, but then you wouldn't be using RHL 5 would you?
    I do some work with Java/Solaris/dtrace for my work, so it's nice to be able to run all that on the Mac too (and yes, you can do vmware/parallels/etc on linux/windows too).
    The rest of it is a matter of taste. Personally, I dislike popular linux guis (gnome,kde) because it feels like something trying desperately hard to be better than windows 95, not realising that that was 10 years ago.

    Posted by: goron on June 21, 2006 at 10:55 PM

  • Couldn't agree more. Why not Solaris? You have the popular linux desktops on Solaris 10 as well. And the dev tools are unmatched (not arguments on that). If you're a geek who isn't worried about drivers for the latest gizmos/cards, there's no reason you shouldn't be using Solaris instead of linux

    Posted by: bharathch on June 22, 2006 at 01:19 AM

  • I'm surprised noone has mentioned this consideration: arguably the best environment for server-side development is the same operating system as you deploy on. It cuts out a whole class of bugs when you don't have to worry about stuff like file paths and case sensitivity.

    Posted by: skaffman on June 22, 2006 at 01:55 AM

  • How is Ubuntu? I've heard some good things about it...

    Posted by: rogerk on June 22, 2006 at 04:28 AM

  • I have a Mac for my desktop. I got frustrated with developing on it and so I just run all my dev tools on the linux box in the basement via X on the Mac.

    -Fnord

    Posted by: fnordprefect on June 22, 2006 at 05:19 AM


  • I've been switching back and forth between Windows and Linux on my laptop. Right now I'm on Fedora once again because Windows "Genuine Advantage" kept bugging me even though my copy was perfectly legal. On one of my laptops, it prevented me from installing service pack 2 and the machine became unstable and infested with all kinds of malware over time.

    Linux has many convenient features, but I do hate the constant hardware/driver troubles. CPU throttling does not work as well as on Windows. The machine is hotter than when it was running Windows, despite cpufreq. Out of the box CPU throttling didn't work at all. It took days to get it to work, so I'd never recommend Linux to non technical people. Suspend/resume does not work. I tried everything I could find on the net, to no avail. The screen doesn't come back online after resume (everything else does) and I currently don't have the time to investigate this further. The synaptics mouse works, but not if I upgrade to the latest kernel. It's supposed to work, everything is configured correctly, but it doesn't. I'm not a Linux on laptop expert and I don't want to deal with these issues. It bores me to death.

    Gnome, well, it works reasonably well, but there are some ridiculous usability bugs. The file save dialog insists on appearing slightly outside of the screen area. The save button is outside of the view, so I can't be reached with the mouse. The enter key works though, so no big problem. I can't easily put shortcuts where I like them to be. I know this is not a genuine problem. It certainly can be done. I just haven't found the time to find out how. I don't know why I can't just move items around in menus and toolbars. Fonts are very different from one program to another. Emacs has ugly, hard to read fonts when run in its own window as do many other programs.

    My conclusion is that Linux works so so on laptops. I don't like it much though and I wouldn't recommend it to anyone. It's a shame that we have so little choice between operating systems. Maybe I'll try a Mac now that it can dual boot into Windows. But then again the whole culture around the Mac puts me off in a way.

    Posted by: fauigerzigerk on June 22, 2006 at 05:23 AM

  • I find it's best to develop under the OS that is most likely to be used by the majority of customers. Any guess what that might be?

    Posted by: rabbe on June 22, 2006 at 06:18 AM

  • I agree that if there was only one operation system it wouldn't not be healty for inovation. But let just people work with what they like, don't try to force them to use a Linux distro. Hardware (like a 17" widescreen) is still a big problem on Linux.

    @claudio on June 21, 2006 at 05:57 PM

    How old are you 12 or so? Virus writers only write more viruses for Windows because more people use it than something like Linux.

    Posted by: carmello on June 22, 2006 at 06:52 AM

  • Well. this post could have been interesting the last year - looks like the writer is not up do date with recent evolution on Mac OS X. For instance:

    "The Mac port is done by Apple. After much delay. With interesting bugs. And, if you use Eclipse plugins, you have SWT bugs too."

    While I'd like to have a Sun port on Mac OS X, the delay is no more here. We have regularly Mustang (Java 6) pre-releases so I think that we will have the final Java 6 just when it will be delivered to Windows and Linux users.
    Eclipse? I still use Eclipse for a legacy project, and works fine. For all the new stuff I'm using NetBeans, which works even better.

    "[shortcuts] Sure, but look at NetBeans. At most half of the menu options have shortcuts, and most of them are impossible to remember (Ctrl + Shift + F8)."

    Curiously, I think that Mac OS X is so filled with shortcuts that I can't remember all of them. And there's the Automator too, that allows me to do a little tiny things without opening a single application. And for what concerns NetBeans, it's made by Sun, not Apple, eh? :-) In any case, it's fully configurable and adding some shortcuts is a matter of minutes.

    OTOH, I've been playing with Linux for years, trying to get rid of Windows. For a reason or for another, I was never been able to - and I don't want to waste a lot of time in configuring drivers, kernels and the f***ed thing - I'm not so young to play with these things, I just need to be productive. It's thanks to Mac OS X that I could leave Windows. I'm still dealing with Linux for many projects and still have Windows and many distros of Linux in my lab - well, no distro is even close to Mac OS X in terms of productivity.

    Furthermore, with Parallels I can run Windows and Linux inside a virtual box on my Mac Book Pro: so I can make a release with NetBeans on Mac OS X and run automated tests in multiple o.s.es in minutes. With a single laptop. Everywhere I go, Just in 2.5kg + a couple of external drives.

    I can't think of any better developers' platform than a Mac Book Pro. Oh well, yes: maybe next year Mac Book Pros with Intel Core 2 Duo.

    Posted by: fabriziogiudici on June 22, 2006 at 08:11 AM

  • I use Linux because it allows me to do the stuff I want in the way I like it.
    Its Linux support is great, most code is GPL (nobody is able to press money out of me). The only drawback is that the UI feels slower compared to windows.

    Posted by: linuxhippy on June 22, 2006 at 09:29 AM

  • @carmello: This sentence "Virus writers only write more viruses for Windows because more people use it than something like Linux." is being said since 4 years ago, he he he. I never saw any virus or malwares to linux. As you know (I suppose) linux default security system is very hard to break on. As other said here and on other forums, related to the windows umbeatable to games, thats is not a linux issue, but the game industry not developing games for linux.

    Posted by: claudio on June 22, 2006 at 09:40 AM

  • @fabriziogiudici (Among other Mac users)

    This question might be more suitable for a Mac forum but maybe someone here can help. I would like to get a Mac and see what the fuss is all about.

    1. I have looked everywhere but I could not find hard drives for the Mac that are bigger than 100 GB (7200 RPM). I need more than that, especially since I also plan to run XP on it via parallels. Any suggestions?

    2. You said the Core 2 proc MacBook will be out next year. Is there a resource on this. I thought they would be out by about September or something like that.

    Posted by: hchaudh1 on June 22, 2006 at 10:07 AM

  • On the whole, I'm with Cay.

    It comes down to one feature: the ease with which I can enable virtual desktops and slew to any of them with in hundreds of milliseconds. Nothing I've seen compares to FVWM on Linux for changing virtual desktops: move the mouse to the bottom of the screen and you're in the next desktop. FVMW is not beautiful, but it is faithful in its simple configuration and functionality.

    Yes, there are many virtual desktops available, some for the Mac, too. But they're third party add-ons, which is a distraction.

    The Mac and Ubuntu default user interfaces are gorgeous. But the only way I can work is to forego both and do rapid desktop switching in conjunction with Xterms all over the place and NetBeans lurking in the background somewhere.

    In reality, we all have more than one machine on our desktops - one of each major OS. For all Linux's warts, I always come back.

    Posted by: ae6rt on June 22, 2006 at 11:44 AM


  • I switched from Windows XP to Ubuntu over a year ago running on a Dell 17" widescreen with dual screen setup and wireless.


    With 2Gb RAM and a 7200 rpm hard drive, I can compile projects in seconds that take over a minute on lesser windows hardware. The Unix file system and aggressive disk caching is great.


    I use VMware server (which is now free) to run MS SQLServer, which is unfortunately the database of choice at my current location. it works fine. If I could ditch that, I'd be Windows-free.


    I'd recommend Ubuntu to any Java developer.

    Tim

    Posted by: tcrmorrow on June 22, 2006 at 12:38 PM

  • @claudio on June 22, 2006 at 09:40 AM

    Why are there virus scanners for Linux than?
    Or what about the security updates for Linux, you never installed those?
    So may I laugh now? :D

    @linuxhippy on June 22, 2006 at 09:29 AM,
    Software developers also have to pay bills(food, gas, water,house, etc) you know.

    Posted by: carmello on June 22, 2006 at 12:58 PM

  • Back in the day, Apple's support of Java was rather slow and weak. However, they've gotten much better, releasing JDK 1.6b82 41 days after the same build was released for the usual OSs on the Mustang site. Fourty-one days isn't bad; I can certainly live with that.

    I love Linux, but I'm switching to Mac. The main reason is that Macs just work. I can throw on the latest and greatest tools and they just work, no source compliations, no futzing around with dependencies, no trying to find or create a package that my distro's package manager can handle ... it just works.

    Yes, all those problems can be resolved, given enough time and fiddling around. And there was a time when I enjoyed that. These days, I don't have time for that. I can't spend an afternoon installing things; I need to be productive now. Mac gives me that.

    Posted by: javabear on June 22, 2006 at 01:18 PM

  • The virus scanners for Linux exists so you can wipe out viruses saved in your Linux Samba file server by the windows clients. Also so you can check the usb drive or cd-rom some Windows user passed to you before sending the files to another friend who happen to be another unfortunate Windows user. ;-)

    Virus writers target Windows because it's easier to write and propagate the viruses. If you think it's because there are more Windows users, think again. Internet worms target mainly IIS despite the fact Apache is by far the most used web server. Same reason: it's easier to write and propagate an IIS work than an Apache one.

    Developing java apps is much more productive in Linux. All tools are faster, and you have improved reliability, besides some advanced features that are very nice for testing, like opening Xnest windows and have multiple simultaneus logins, each one with its own customized desktop, at the same time.

    Shame that Swing still (I'm talking about JDK 1.5.0_07 and JDK 1.6.0 beta 2) has crappy font rendering, broken native (GTK) theme and won't work correctly with international keyboards. This alone prevents me from using Netbeans for many tasks. SWT apps like Eclipse don't have those problems, that's something Sun should really look at. :-(

    Posted by: flozano on June 22, 2006 at 08:13 PM

  • My post had <bt/> tags but they were wiped out by the blog software. :-(

    Posted by: flozano on June 22, 2006 at 08:14 PM

  • I use computer with win98, XP and Linux (mandriva). So I develop same software for some period on each of them. I use Netbeans, but for changing OS (from win to linux and back), you have to chanege private.properties file on nbproject. After switching from one OS to another, I always discover some bugs (mostly file charcters - beacuse of case sensitivity and slashes, sometimes rendering). So I think, that such approach is very good.

    Gorazd

    P.S. I hope, that someday Apple will sell Mac X for PC computers too.

    Posted by: gorazd_praprotn on June 23, 2006 at 01:06 AM

  • I use computer with win98, XP and Linux (mandriva). So I develop same software for some period on each of them. I use Netbeans, but for changing OS (from win to linux and back), you have to chanege private.properties file on nbproject. After switching from one OS to another, I always discover some bugs (mostly file charcters - beacuse of case sensitivity and slashes, sometimes rendering). So I think, that such approach is the best.
    Gorazd
    P.S. I hope, that someday Apple will sell Mac X for PC computers too.

    Posted by: gorazd_praprotn on June 23, 2006 at 01:08 AM

  • I use computer with win98, XP and Linux (mandriva). So I develop same software for some period on each of them. I use Netbeans, but for changing OS (from win to linux and back), you have to chanege private.properties file on nbproject. After switching from one OS to another, I always discover some bugs (mostly file charcters - beacuse of case sensitivity and slashes, sometimes rendering). So I think, that such approach is the best. Gorazd P.S. I hope, that someday Apple will sell Mac X for PC computers too.

    Posted by: gorazd_praprotn on June 23, 2006 at 01:08 AM

  • There's one big issue with switching to linux....no Quicktime for Java. As poorly supported as Quicktime for Java is, it's far better than any other available media framework for Java. Unfortunatly, it's only available on the Mac and WIndows; it's unlikely to see it supported on Linux in at least the foreseeable future.

    Posted by: bschlining on June 23, 2006 at 08:33 AM

  • After years of windows and linux (fedora core and ubuntu), I bought a macbook pro and I'm must say I'm very happy with MacOS X. IMHO it is superior to the other and really love their java integration. I agree that the shortcut thing is weird for java applications, but everything else is fine. Also javabear is right, the delay for Mustang Betas is really short.

    Posted by: zero on June 23, 2006 at 12:26 PM

  • I must say that Java support on Apple is quite depressing. I bought an iBook just to have a nice "unix"-laptop and instead gut stuck to 1.4.2 with OSX 10.3.9. Of course, one can always pirate OSX 10.4 but then it's like using windows pirated.

    But luckily I got a T60 at work so now I have Ubuntu 6.06. Java 5 feels slower on linux than windows but I feel better using ubuntu.

    Now I keep the iBook for nice stuff like browsing the web, writing posts on java.net and movies.

    All the hard java stuff is moved on ubuntu.

    Posted by: emilian on June 25, 2006 at 12:16 PM

  • I switched from Linux to Windows about 2 years ago.

    Posted by: davelopez on June 26, 2006 at 02:29 PM

  • Linux is fine for geeks who don't mind the limited environment and other issues, including Linux specific Java bugs (!), but will not do for me, I use Windows pretty comprehensively so would miss loads if I moved.

    I already use Firefox, Thunderbird and OpenOffice, but think the suggestion to use Cygwin bash is nuts, it's a horrible environment, which reveals just how stupid the cygwin dll dependancies are and why I dislike *nix e.g. the help is not helpful.

    I don't get serious issues because: I don't run any Microsoft internet applications or Office (the main malware vectors), have a proper software filewall (Agnitum Firewall Pro) and anti-malware software (4 free ones) and have a proper ADSL NAT firewall router to block port attacks.

    Lastly Windows seems to be the best supported platform for Java, I don't see this changing.


    Posted by: infernoz on July 23, 2006 at 05:53 PM

  • Open Jobs for Java Developers in the Dallas area! Please visit our website at www.frontlinesourcegroup.com/openjobs.htm, or send your resume and cover letter in word format to resume.frtline.com.

    Senior Java Developer:
    Our Richardson client is in need of 3 Senior Java Developers. This position is a six month contract assignment that could go longer!

    Required skills:
    STRUTS, JSP, JDBC.
    PL/SQL and EJB skills are a plus!

    The company is preparing to go to BEANS and Business Objects, so experience here would be helpful.

    Job Functions: Designs, modifies, develops, writes and implements software programming applications. Also, coordinates work teams. Provides technical support to project team members. Relies on extensive experience and judgment to plan and accomplish goals. Performs a variety of tasks. May provide consultation on complex projects and is considered to be the top level contributor/specialist. A wide degree of creativity and latitude is expected. May report to an executive or a manager.

    Skills and Experience: Requires a bachelor's degree in area of specialty and at least 5-8 years of experience in the object oriented analysis, design, and implementation of web-based applications. Demonstrates expertise in STRUTS, JSP, Java Servlet.

    This position pays $37-42/hour, DOE.

    Please visit us on the web at http://www.frontlinesourcegroup.com

    Equal Opportunity Employer, M/F/V/D. Candidates must have authorization to work in the U.S. Client will not sponsor visas.

    Frontline Source Group is one of the fastest growing Information Technology, Accounting, Legal, Human Resource and Administrative staffing and permanent placement firms based in Dallas Fort Worth Texas.

    Frontline specializes in matching top talent with companies for permanent, contract and contract-to-hire placements. We work with clients and candidates in all areas of North America.

    Posted by: frtline on August 08, 2006 at 08:38 AM



Only logged in users may post comments. Login Here.


Powered by
Movable Type 3.01D
 Feed java.net RSS Feeds