Wednesday, 11 August 2010

Choosing Sides

My Macbook Pro is 3.5 years old and still works pretty well, apart from the disk being full, frequently spontaneous wake-ups in my backpack which heat everything up alarmingly, and flaky wireless connection. Plus the turn of Moore's Law means I can now get a quad-core laptop and a lot more RAM and disk. So it's finally time to upgrade. I'm opting for non-Apple hardware; Apple have gone beyond the pale pursuing patent warfare and platform lockdown, and I can no longer live with buying their products. A Lenovo W510 is probably in my future.

Now I'm faced with a somewhat difficult decision: Linux vs Windows. There are good reasons on both sides. The best thing about developing in Windows is that it's good to have developers on the platform that most of our users use. VMWare record and replay is also very attractive. The Mozilla build and tools situation on Windows used to be terrible --- very slow builds, horrible profiling --- but it's gotten a lot better thanks to pymake and xperf. But Microsoft, while not as dangerous as Apple at the moment, still aspires to be, and I won't embrace them gladly.

Linux, of course, has the virtue of freedom, and a chance to regain Miguel's love. On Linux you get valgrind. But not many of our users use Linux, and VMWare's record and replay doesn't really work there. I'd have to use X11, which I loathe with passion.

Tough call. Another thing to consider is that whichever way I go, I'll end up using the other in a VM quite often. Dual-booting is also an option.



31 comments:

  1. Theres nothing wrong with dual booting, I recommend it as the best option. But if you want to run Linux in a VM go with VirtualBox, it has the best Linux guest drivers including 3D acceleration.

    ReplyDelete
  2. Dual boot mate. Just go with whatever you want in the moment. That's what I do.

    ReplyDelete
  3. I thought about moving over to Apple but their behaviour recently has been awful ... in my opinion they are now worse than Microsoft ever were.
    Personally I use a dual boot Win 7 + Linux setup purely because then I am really seeing exactly what users are seeing.

    ReplyDelete
  4. I'm a big fan of virtualization, being able to open the same file in the same app running on 2 different operating systems and compare them side by side on the same system is immensely useful.

    ReplyDelete
  5. Ah yes, keep beating that "Apple is evil" drum while Google helps Verizon torpedo the "public, open and accessible" internet Mozilla allegedly champions.
    Apple pushed hard, and got, a DRM-free world for music, and has helped to push HTML5 to make the internet a better place for everyone.
    You're naive if you think WebM can possibly be patent-free, and Apple is well within their rights to "lock down" their own platform if they choose, as long as they leave their internet platform open – which they have.
    Good luck with your next laptop purchase – looks like you'll need lots of it.

    ReplyDelete
  6. Whatever OS you choose, believe me: dual boot is not an option; this comes from personal experience. When you set up an OS with all your data and account, you won't move from that, nor spend time configuring the other OS with the same data and accounts and other time daily passing data that can't be synced between the two.
    I told myself I could do that, but that wasn't the case. A VM is much better because you run on there only platform-specific apps, while having open your browser, mail, everything on the OS you want.
    I have a dual boot on the laptop I'm writing form, but I use Windows not in VM only to upgrade my mobile phone firmware and something like that, because I don't trust a VM for such a delicate process.
    So: you know your habits and necessities and you'll choose the OS that fits you the best, but don't even think about dual booting.

    ReplyDelete
  7. Well then, if you have the HD room, why not go dual-boot and get the best of both worlds? Then you can still junk one of the halves if there is a reason to do so.
    Another question is desktop vs. laptop. YMMV but I've found desktops to be much more reliable than laptops (disk crashes, transformer breakdowns, …). Of course the flip side of the coin is that you can't take a desktop with you wherever you go and fire it up at MacDonald's or in a train compartment.

    ReplyDelete
  8. You could get an Amiga. ;) I vote that you go with Linux with WINE. It's the best of both worlds.

    ReplyDelete
  9. My vote is for Linux. As a Linux user, I'd love for more developers to be using it as well. Sure most Firefox users are on Windows, but if ALL the developers used Windows for that reason, then the Linux and Mac users would be stuck indeed.
    What is it you don't like about X11? I haven't "fought" with it to make it work like the old days in many years. These days it just works.
    I've also been really happy with how much easier modern distros are to use than OS X. Every time I install something on OS X by downloading it, unpacking the dmg, and dragging it to the magic folder I long for Linux where I click the app name and "install" and it just works.

    ReplyDelete
  10. I don't really see that you have to care about X... I mean GNOME/KDE/XFCE/LXDE/whatever sure if you don't like any of them, but that doesn't really have anything at all to do with X... unless you mean having to look at bits of Mozilla that involve libX11, then yes your loathing is entirely justified... but I really don't see what your issue with X is (when was the last time you tried using X on Linux, if you're worried about xorg.conf... it's pretty much a non-issue if you use open drivers...)

    ReplyDelete
  11. I've a MBP 15" and it is the best laptop I ever had. It is the computer I use at office with an external DELL monitor all my colleagues have Windows machines. At home where I work on my open source projects I use Ubuntu and I use VMWare (the player is sufficient for me) to run Windows side by side. My actual configuration office/home is perfect for me. Dual booting is awful if you need to switch very often believe me. For ethical reasons I would drop Apple but its HW and also SW (OSX mainly) is very good for me, consider I got an Apple keyboard on my PC with Ubuntu, too.
    If you don't need advanced video editing applications and you can live with GIMP linux (any distro) is a dream development environment.
    All my Windows VM images have Cygwin installed, it helps very much "emulating" and Unix env so if you choose a Win OS consider Cygwin as a valid friend

    ReplyDelete
  12. Well, I hope you choose Linux under the theory that the more Firefox devs who are using it, the more likely all of Firefox's problems in comparison to the Windows/Mac ports might get fixed.
    But really, you should just go with whatever you think will make you more productive.

    ReplyDelete
  13. Robert O'Callahan11 August 2010 19:33

    I'm not a huge fan of dual-booting but when you can share files easily it's probably better than using multiple machines. I don't use many applications and a lot of my data is in the cloud (and more could be with Firefox Sync), so it might not be too bad.
    A separate desktop machine is not an option: too hard to share state. I used to do this but having all my data with me all the time is too valuable.
    Sly, Apple is using software patents to shut down competition. They're doing everything we always feared a bad actor might do with software patents. The iPhone is locked down in ways that Microsoft never dared do with Windows. Imagine if Microsoft had simply said "no software that 'duplicates functionality' of our software is allowed", we wouldn't have the Internet (or Apple) as they are today.
    X11 is a terrible design that's awful for app developers. If you want to be fast, you have to avoid touching X as much as possible. Drivers are also a disaster; binary drivers suck but open drivers don't have decent support for 3D acceleration.

    ReplyDelete
  14. Robert O'Callahan11 August 2010 19:37

    Matt, more Mozilla developers use Linux than Windows, for sure. A lot of the problems we have on Linux are because various components of the Linux stack are awful, like X11.

    ReplyDelete
  15. I'm also planning to ditch my Macbook soon.
    Well, perhaps I'll still use Shark occasionally.
    I've never liked OSX and getting back to Linux
    will be great (well, I run linux on desktop). And even Win7 has better UI for my use than OSX. I guess dual boot will be good enough for me.
    Lenovo W510 is pretty expensive. I was hoping to find something cheaper, yet reasonable powerful.
    Perhaps HP Envy.

    ReplyDelete
  16. > The best thing about developing in Windows is that it's good to have developers on the platform that most of our users use.
    That's very true. However, there is also the question of where most of the users are *going* to be. More and more people are browsing the web from mobile phones and tablets, and hopefully a lot of them will be using Fennec. And that will almost certainly be on a Linux-based OS (Android of Meego), not Windows.

    ReplyDelete
  17. Robert O'Callahan11 August 2010 22:11

    azakai, yeah but you won't be able to develop browsers on a phone anytime soon!
    smaug: the W510 is actually about the same price as a dual-core Macbook Pro.

    ReplyDelete
  18. I see your point, it isn't the same as developing on Windows and users using Windows. Still, desktop builds of Fennec on normal Linux distros are a good way to test. (And normal Firefox on Linux is closer to Fennec on devices than Firefox on Windows is.)
    Anyhow, maybe soon we will be able to develop Firefox directly on Android tablets, for users of those same tablets ;)

    ReplyDelete
  19. Robert O'Callahan11 August 2010 22:52

    Good point about mobile builds being closer to Linux than Windows. One might also suggest that Mozilla should give out Fennec-capable smartphones so we can dogfood more :-)

    ReplyDelete
  20. @iacchi , I disagree. I dual-booted Linux and Windows for many months. I used ntfs-3g drivers to mount my Windows partition from Kubuntu so I had access to all my documents and my Mozilla profiles from both environments.
    I accidentally trashed my Windows partition (even in Cygwin, "sda" may not be your SD card but your hard drive, oops!) and haven't run Windows for about a year. Many Windows programs run fine in Wine especially if you set Wine to present itself to them as XP or earlier, and for programs that access USB ports Windows running in VirtualBox works well.
    YMMV

    ReplyDelete
  21. VanillaMozilla12 August 2010 02:11

    Robert, I've got bad news for you. They all suck. Well, I don't have experience with Mac, but I'm sure there's something wrong with it too. Linux and Windows are horrendously overly complicated. That means lots of stuff is never really fully developed or without errors, and documentation is hopeless. If anyone thinks Linux is all roses either, they're using the wrong color glasses.
    I don't get this "X is evil" stuff. You can waste a lot of time fighting evil and not succeeding, or you can spend the time using your computer. Like Mac, for example. Their phones are closed. They're not computers, and they want them to work. If you don't like it, use another phone. But their computers are open to all software.
    Good luck with your choice, but just get what you like. Your choice probably won't save the world--unless you can make Linux file sharing not suck somehow.

    ReplyDelete
  22. Robert O'Callahan12 August 2010 05:13

    I know they all suck. I've used all three major platforms for several years each. The question is which one sucks least for what I need to do.

    ReplyDelete
  23. VanillaMozilla12 August 2010 06:18

    Well, if I were you, I'd go with Apple because you can run all three OS's simultaneously if you want. But I'm not you, so you'll probably do what you want.
    I've been using mostly Linux for a couple of years now, I guess. It works, but with free software on any platform you end up filing quite a few bug reports. You have to be a nut case to do it. There's a lot of software that just flat out doesn't work. Some projects fix bugs instantly, while others ignore major bugs. Then once in a while a big bug gets fixed without any attention from you. I think Windows is more mature, but Linux is getting better. Just take your choice and name your pain.

    ReplyDelete
  24. Hmm, I think VMWare at least used to be able to boot off actual partitions (I haven't tried recently - and my last attempt on a Mac host trying to boot a BootCamped Windows partition failed horribly).
    I wonder what it would be like to have them dual booting, then both also accessible as VMs from the other?
    Alternatively: Windows still builds slower even with pymake, making it the host sort of balances things out. That only averages build time, though, and doesn't actually help if you end up using Linux more, since that means the total time increases...

    ReplyDelete
  25. Robert: one of the core benefits of a win development environment is the debugger from ms, for me its much more finished and productive than the gdb front ends.

    ReplyDelete
  26. I would strongly recommend against dual-booting. The downtime of a reboot is just too much to bear for me. Plus if you have a single hard drive (in all probability, true for laptops) you will need to think about setting up partitions, including a separate FAT32 one to share files across OSes (in my experience NTFS on Linux isn't reliable enough yet). It gets annoying very quickly.
    I would recommend getting a little more RAM -- 6 GB if possible -- and setting up one OS as a VM within the other.

    ReplyDelete
  27. Robert O'Callahan12 August 2010 10:17

    bernd: the MS debugger is nice, but having used both a fair bit, I can live with gdb for normal debugging. Where the MS debugger really wins is when you couple it with VM record and replay. gdb doesn't have that.
    VanillaMozilla: I've been doing the three-platforms thing on my Macbook Pro for a while now. It's helpful sometimes, but I think I'll be just fine with two platforms on the laptop and a Mac laptop lying around for occasional Mac work.
    Siddharth: I'll definitely get 8GB (and probably upgrade to 16GB some time later). I might have to experiment with VMWare's file sharing; in Fusion 2.0, doing a build in a Windows VM with a srcdir which is a shared directory on the host is *incredibly* slow, but doing the same thing in a Linux VM is reasonably fast. Things might be completely different with a newer version of VMWare, or VirtualBox, or using a Windows or Linux host.

    ReplyDelete
  28. I am contemplating getting a Thinkpad W701, the big brother of the W510. The main benefit of Thinkpads in my view is the Trackpoint. In fact, I can't imagine using a touchpad only computer.
    However, as a Linux user I wanted to get me a Thinkpad with no pre-installed OS, or at least only with a small DOS-like dummy OS. That seem to be impossible, though.
    Another caveat is that for a dual boot system you probably want a shared partition, and since Windows only does VFAT and NTFS you must opt for one of those. NTFS in Linux is not an entirely pleasant experience. It works, but every file and directory is 777 and thus colored green when you do an ls.
    You'll probably need dual boot though, since you are working with those performance critical 2D and 3D backend parts of the rendering engine. I would not test them
    BTW, my current machine is a Thinkpad Z61p and unfortunately it does not get WebGL on Linux in Firefox 4. (Neither does Chrome, BTW.)

    ReplyDelete
  29. You seem to have settled on either Windows+Linux VM or Linux+Windows VM. Either way you're paying Microsoft their dues, so if VMWare's record and replay is really a major concern, go for Windows+Linux VM.
    One thing work considering, though, is your future upgrade path. I've found migrating a Linux installation from one machine to another is fairly easy (just cloning the disk usually works), but the same can't be said of Windows due to activation issues when the hardware changes. For that reason alone I use Windows in a VM, so that the "hardware" never changes as I move to newer machines. That way just cloning the drive moves both my Linux system and my Windows VM as one with no activation hassles.

    ReplyDelete
  30. I have nothing but praise for Thinkpads, I use a T400 myself. They are both robust and well supported on Linux.
    I also have a dual-boot between Fedora and Windows Vista but I haven't had to use Windows in months, it's just there for posterity now.

    ReplyDelete
  31. At home I have Windows, at work I have Ubuntu. That seems to be an OK divide, I think Windows 7 suits more the type of things I use my PC at home for, and vice versa.
    Both systems indeed have a virtual machine with the other operating system :). I don’t think dual-booting is nice; when I need the other system I much prefer to be able to switch and copy/paste from the one to the other as I wish. Maybe for performance measurements it isn’t so great, but otherwise very convenient.

    ReplyDelete

Note: only a member of this blog may post a comment.