Yesterday I had to give a presentation on the way (or say, my way) to develop a small (so far) web system. It's built on JSP and I'm working on Eclipse (no fancy thing... just yet). So I wanted to go there and show my workflow in terms of branches (plain application, application+design, etc) plus I would have liked to control my home computer remotely (through ssh remotely... if possible).
On top of eclipse (and java), I would have had to use bzr and qbzr... now... I wasn't going to be able to carry a computer with me, so I was going to get a box from the company I was doing the presentation for. Well.... what are my options? Expect to get a Güindous Computer ad start installing things on a computer that's not mine. That didn't sound cool. Another was to get a GNU/Linux box (perhaps) and start installing stuff (not cool either). But how about taking a LiveCD with me and carry along all things I'd need for the presentation (in case there's no internet access)? Let's give it a try.
I use a Kubuntu Intrepid LiveCD (but the procedure will wok like that on any debian-based distro). I have one standalone installer of the JRE from sun and Eclipse in a compressed format, so that side of the story is covered. But then bzr/qbzr? I'd have to get them from packages with apt... but how do I know what packages I will need? Get your notebook.
Start the LiveCD, wait for it to finish starting. Then, add the stable repositories of bzr and qbzr in sources.list (that's because the normal repos of ubuntu intrepid have very dated packages.. at least of qbzr). So far, so good. Now, the normal procedure to install bzr/qbzr:
$ sudo apt-get update
$ sudo apt-get install bzr qbzr
By now, you have both packages installed in your LiveCD session.... but you want to be able to install them later on (like, at the company without an internet connection, right?). So, what can you do? Well.... let me tell you a little secret: If you didn't clean after you installed the packages, you can grab all those beautiful .deb packages (bzr, qbzr and their dependencies) from this location: /var/cache/apt/archives/
So, hook up a pen drive, mount it and copy those .deb packages on it:
cp /var/cache/apt/archives/*.deb /somewhere/
Now head for your presentation.
Company Procedure (or home test.... just in case)
You arrive at the company and are presented with the computer you will give your presentation on. So let's get our hands dirty right away. Start your LiveCD, hook up your pen drive and mount it. Then, install all those .deb packages:
sudo dpkg -i /somewhere/*.deb
And you are done. bzr and qbzr are installed. You had the jre and eclipse files in the pendrive too.. two branches of the project too, so you do the installation procedure and can start my presentation right away. Finish your presentation, turn of the box, give it back.... nothing happened. End of Story.
A little rant.... back in time...
I learned about this trick some time ago. About 3 years ago, I was going to a Cisco Accademy course (CCNA preparation) and I remember that when we reached the DHCP part, our teacher (by the way, and old friend of mine from my going-to-the-youth-orchestra days, Juan Jakymec) told us that one of our fellow students was going to have one of the boxes converted into a Güindous Server so that we could see how it worked. I volunteered to have GNU/Linux used as a DHCP server too.
Comes the day.. the other guy had showed up at the classroom who knows when in order to install Güindous Server on the computer. So, I'm told to go first, I use this trick that I described before to install the DHCP server, try to start it but it fails.... so I dig a little on the logs (or perhaps running it as a normal process to see its output... can't remember). I get the error cause of the IP addresses that the DHCP service is told to provide and the IP address of the network interface. So I change the configuration of dhcpd, start it.... we're ready to go. I even start tcpdump so that we can see what's going on between the server and the clients. All lovely. Less than 10 minutes after I was given the chance to do the show, I'm heading to my chair with a big ear-to-ear smile on my face.
Time for the Güindous Server to show off.... well... let's just say that it wasn't pretty. You know how these things work in güindous when something fails. You get a small window telling you that something failed... no details. So he starts going (guessing, basically) here and there to see what happened... tries and retries.... well... some minutes go by and then he is able to start the service... no tcpdump, though. Bottom line:
Güindous = esoterism, GNU/Linux = determinism.
Come on.... think about it... I was able to do the whole thing in 10 minutes.... I left the computer as it was before I had a finger on it.... the other guy? he had to install a whole operating system beforehand in order to see a dhcp service working. Does it even make sense at all?