I think that I’ve realised why I feel so uncomfortable using MacOS X and Windows for “Real Work”. They’re fine for playing MP3s or browsing the web, but when it comes to developing software I get scared.
For me, developing my own software usually involves installing other software and upgrading existing software on my computer and when you don’t have a package manager that’s really hard to do reliably and reproducably. I’ve tried doing this by hand, keeping track of what versions of what I installed where with what build flags, trying to write scripts that can reproduce my build environment and trying to keep track of which dependencies are build-time and which are run-time. I’m bad at that, but that’s the kind of thing that computers are really good at.
Now, I know that Cygwin and MacPorts each have their own pseudo-package system, but that only covers the UNIX libraries and utilities that are ported, not native tools, and they don’t integrate with the tools you use when producing packages to ship. When you’re developing a Mac or Windows application how do you keep track of which libraries need to be included in your installer or disk image? There must be a trick, but I’ve never come across a tool for the job. The Debian packaging tools do an amazing job of analyzing the dependencies in software that has been built and mapping them to package dependencies. There are even tools for creating VMs that you can use to test that the autodetected dependencies are correct. All automatic, reproducable, testable.
So today, out of the blue, I found a metaphor that I’m satisfied with to explain to my Windows and Mac developer friends the way I feel about developing on their platforms. It’s like programming without source control. Developing on Linux and with source control I feel safe – if anything I do has unintended (or worse, unnoticed) side-effects I know that I can get things back to where they were before, or at least work out what happened. On Mac and Windows I’m back to when I was writing Pascal programs in DOS where I’d type a few lines, save and never be able to make my program work again.
Aside 1: At least with Windows I can do everything in VMWare which gives me snapshots and roll-back, Apple’s DRM prevents me doing the same for MacOS. Fail.
Aside 2: I feel almost the same about Ruby gems. It’s a package system but a terrible one. It’s like being forced to use RCS when I’ve got git sitting right here. I do understand why Mac Ruby developers seem to think it’s the best thing since sliced bread – I remember in 1995 when I was first introduced to RCS.
Hey Ian,
Does Time Machine give you the ability to roll back to a previous state of the entire disk? It doesn’t give you a package management system, but at least it gets you out of a borked system.
Also, AppZapper help a lot on the MacOS side too…
@Will, I don’t think Time Machine lets you roll back software updates and things like that. I don’t really know though. I haven’t bought into it yet. I’m forever putting together my backup server that will solve all my backup problems. Right?
I haven’t heard about AppZapper. I just have to reinstall my Mac every 6 months or so, just like Windows used to need.
Time Machines does actually let you roll back system updates – you just need to make sure it’s covering your entire boot hard drive. You also have to remember to hit the “back up now” selection in the menu bar.
If you do need to roll back – you need to boot from the DVD and then select restore from a given point. Not quite as easy as a true package management system, but it does work…
also, check out: http://www.appzapper.com/
For MacOS X isn’t this what -isysroot is meant to solve?
I’ve never built against / for release, I’ve always built against /Developer/SDKs/MacOSX10.[234]*.sdk (OK, so I haven’t built any OS X apps on Leopard, but I assume it’s also the same).
Any libraries not in the SDKs I include in my build process (to build a copy for each OS X release). Having a library locally installed is useful during development, but if it’s not in the SDK, you’ll find out about it when you try and build against the SDK and that will remind you to add it to your build.
(Or, if you want the end user to install it as a prereq, add it as a specified prereq and then make a copy of the SDKs with it installed.)
you’re a noob. it’s so easy to develop on windows. there are so many tools to create installs. stuff simply installs on windows unlike linux which has to have all that complicated library dependencies. you’re right, no comparison. it’s too complicated on linux.
there has been shadow copy since Windows XP which is basically OSX’s time machine without the stupid star trek cheese 3d UI. noob linux users always think they can do more in linux, NOT. get a real OS
Thanks, @mike. Welcome to the conversation.
Aye. Hacking on MacOS X is a bit like walking around the city without your underwear, isn’t it? MacPorts is by far the worst package management system I’ve ever come across (and I use FreeBSD). It’s almost more work than configure; make; make install.
Still, I have a decent Linux box at home and I work almost exclusively on my Macbook. But then, I’m not wearing any underwear, either. You?
@ryan,
As far as I can tell the only thing that MacPorts gives you is dependency resolution. One pattern I follow both on my Mac and on my Linux machines is:
./configure –prefix=$HOME && make install
to install software not-as-root. It’s pretty easy to clean up and it less scary than running someone’s “make install” as root.
MacPorts gives you dependency resolution on a good day maybe. Both the core system and the packages are broken as often as not. Did I mention it’s written in TCL?
But yea, the –prefix thing is great with stuff that supports it.
> … less scary than running someone’s “make install” as root.
And what about running someone’s post install scripts as root? I know yum always had to run as root (Seth hated that) and I believe apt-get does as well. There’s sh in there, you know. I suppose if you’re using only signed packages from the major repos you’re okay but wasn’t there just an issue around this last week that caused Fedora to shut upgrades off or something?
@Ryan
I haven’t used MacPorts enough to notice dependency resolution fail. I’d believe that it’s written in TCL. It’s got a real pre-linux kind of vibe to it.
As for installing packages as root – I don’t mind that as much because there’s been some level of QA in packages that make it into a Debian or Ubuntu release vs whatever I download from an ftp site. If it’s going to screw up someone’s system by the time I install it thousands of other people have already tried it.