Git

20Dec08

One of the changes I’ve made to my development environment over the last few months was a transition from subversion to Git. I’ve been watching the progress of Git for the last 12 months or so, and finally decided it was getting mature enough to move. I’m very glad I did. I much prefer the distributed development model – separating checkin/checkout and publication to others is nice. It’s especially useful to me because I’m often on the road without good access to my LAN, so being able to use source control when you’re offline is nice. Highly recommended change.


It has been so long since I’ve written anything to this blog. I didn’t actually think anyone read it, but then Phil Windley twittered me about using the twitter/SVN commit hook post so I figured it’s showing up somewhere.

The latest change I’ve made to my Ubuntu work is to start using IntelliJ Idea 8 for Java development. I’m running the 30 day evaluation version at the moment, but I’m already hooked. It’s fast and very polished. We’re migrating to it at work, so I’ll be using it for a while, I think.

There have also been some background network related changes that ease the whole workflow considerably. I now have direct SSH access from home into the main Solaris development machine at work, and the pending migration from cvs to git will be the final step toward a seamless work/home development experience. That’s coming up real soon now. It will be good having access to Solaris+git from my personal laptop (which is predictably much nicer than the work issued D820.)

On a side note, I kind of wish you could rename WordPress blogs. I’d like to start using this blog again for more general programming related stuff, but the ‘Ubuntu 9400′ name won’t really fit. I guess that doesn’t matter too much though, given that my personal blog is called ‘Lipstick on a Pig’, and I’ve never posted about lipstick or pigs.


Partly out of curiosity, and partly because I wanted to play with the twitter API, I’ve hacked together a little script to push subversion commit details to twitter. It’s actually so simple it isn’t funny.

You will need:

  1. A twitter account. Username and password. Duh.
  2. A subversion repository. Duh.
  3. The ‘curl’ utility.

I’m running subversion on a Linux machine that faces the ‘net. If you’re running Windows or you’re behind a proxy or whatever YMMV. Anyway. Go into the subversion repository and find the hooks directory.

Next, create a post commit hook script. My repository didn’t have a script, so I copied the template (post-commit.tmpl) and used that. I called it post-commit, and make it executable (chmod 777 post-commit).

I then added the following two lines to the script:

COMMENT=`svnlook log -r${REV} ${REPOS}`
curl –basic –user username:password–data status=”${COMMENT}” \ http://twitter.com/statuses/update.xml

The first line uses the svnlook client to get the log message associated with the revision that was checked into the repository. ${REV} and ${REPOS} are defined for you in the post-commit.tmpl file.

The second line uses curl to post the status update to twitter using a HTTP POST. Put your twitter username and password after the –user switch. Use your username, not your email address.

That’s it. Next time you check code in you’ll publish the comment associated with the commit via your twitter account. Twitter me (http://twitter.com/AndrewLighten) if you need help, but this really is so simple it isn’t funny.


References:


It’s been another few weeks since the last post here, and like before, there’s really nothing to report. Development of my Linux project is slowly chugging along, although it did slow down a fair bit over christmas. I’m primarily running Ubuntu on the Dell D820 that I’ve been issued by my day job employer now, so I should really rename this blog. Ubuntu is still on the 9400, but that pretty much lives at home these days and I carry the D820 around with my super secret Linux partition and my photography tools. Like the 9400, it works like a charm.

On another note, my project at work right now involves crunching some moderately sized datasets (~100MB files) and I’ve ended up zipping some of the files I’m working with and copying them across to the Ubuntu desktop to do the manipulation there, because it is so much faster than under Windows on the D820. The source of these files is SQL Server, so I can’t reboot the D820 and do the work on the local laptop. Still, having a putty session into the Ubuntu desktop works pretty well and I’m getting through what I need to. For some reason ‘vi’ under Ubuntu will happily open a 120MB file in a handful of seconds, but the cygwin ‘vi’ on the laptop takes ~30 seconds and even then it’s really slow to do anything.


It’s been 6 or 7 weeks since I’ve posted anything to this blog. And there’s a reason for that — absolutely nothing has happened that’s caused me to have to change anything about the Ubuntu installation on my laptop. It’s just working perfectly.

So perfectly, actually, that I nabbed 20GB of spare hard disk space on the Dell D820 that work provide me with and installed Ubuntu 7.10 there too. Again, works perfectly. Nothing to see here… move along.

I’ll probably start morphing this blog into more of a ‘what I’m working on’ than an Ubuntu diary because I really have found that everything is just so easy to work with. It isn’t like there’s anything especially complex that I can share with the world. I am really, really impressed with this distro.


I mentioned a day or two back that bitbucket (our Win2K3 server) was about to be turned off after migration of its data and services to our Ubuntu desktop. Well, it’s been done. The LAN has no more Windows machines on it.

Actually, that’s not quite true, because the Inspiron 9400 is setup for WinXP/Ubuntu dual boot. Having said that, when I’m at home I spend far more time in Ubuntu that WinXP. There’s certainly no more permanent Windows machines on the LAN. The only time I really use WinXP is for photography, because I need Lightroom.

I’ve had to do a few things to get this done.

  1. Migrate the subversion repository from the bitbucket to the Ubuntu machine. Easily done. Backup the repository on bitbucket, create a new repository on the Ubuntu machine and load from the backup. Notes here and here.
  2. Copy around 200GB of data from bitbucket to the Ubuntu machine. Here I cheated. I dropped bitbucket and took the hard disks out. I’ve mounted them as NTFS partitions on the Ubuntu machine and I’m copying the data across to other disks. Once I’m done I’ll reuse the bitbucket drives as additional storage on the Ubuntu machine. I’ve got a 160GB disk that will become the /home partition. Should do for now.
  3. Setup the new bug tracking system and import all the data from FogBugz. Easy done.
  4. Setup a wiki and import all the data from the SharePoint server. I haven’t done this yet, but it won’t be too difficult.

Oh, one other bonus thing: I spent so much time using ssh to go back and forth between the i9400 and the Ubuntu machine I looked up automatic ssh login (ie: no password prompt). Details here. Piece of cake.


Changes afoot

11Nov07

I’ve had wonderful success with Ubuntu over the last month. There have been no posts for nearly 3 weeks, because nothing exceptional or worth mentioning has happened. It just works.

Based on this success I’m planning the most drastic change to our local network that I’ve made for quite some time. We’ve essentially got 3 machines here: the Inspiron 9400 I do all my work on, a desktop machine running Ubuntu 7.04 (turned on and off as required) and a Windows Server 2003 machine that runs 24×7 to host a couple of things as well as all our files. It’s called “bitbucket” for a reason.

Anyway, bitbucket is getting turned off. The last Windows machine on the LAN is going. I plan to move all the files from bitbucket to the desktop Linux machine and use a mix of samba and nfs to access them from the 9400 and any other machines that occasionally see action on the LAN. That Linux desktop will then stay on 24×7.

The two services that bitbucket provides are FogBugz and SharePoint. They’re both going too.

FogBugz has been very good to me for a long time, but I’ve become quite frustrated with it over the last 12 months. The user experience definitely took a turn for the worse when version 5 was released with all the AJAX stuff in it. It was not their finest release. Version 6 looks interesting based on all the work that Fog Creek have put into the evidence based scheduling, but I’m so far behind in support it will cost a small fortune to get back up to date. I’m much more inclined to put that money into a JIRA installation. It’s what we use at work, and it’s a far superior product to FogBugz in so many ways. Also, given that evidence based scheduling and Agile are completely different approaches, and that we’re much more aligned with the Agile way of thinking, EBS is of questionable value.

SharePoint has worked reasonably well too, but I’ve never quite liked it. We had a wiki a long time ago for lots of the collaborative work we were doing, and I moved away from that because (a) it was degrading into a big ball of mud, as wiki’s often do, and (b) some of the other collaborators preferred a document sharing model. I found they were often using local MS Word documents to compose things and then pasting the content into the wiki. I suggested SharePoint, we went with that (it was part of the Win2K3 installation anyway) and had some success, but I’ve always preferred the wiki way. I’m likely to push back in that direction again. The only real challenge will be keeping it organised. I have some ideas about how to do that based on what I do with the wiki we run at work: have an administrator create the structure and framework of the pages that you’re working with, and collaborators simply fill in the text. We have a pretty narrow problem domain that we’re tackling in terms of software development, so that won’t be too hard.

The only other thing that bitbucket does is host the subversion repository. Moving that to the Linux desktop should be trivial.

Once this is all done I might even consider running asterisk on the Linux desktop and routing my Engin VOIP connection through it. Maybe. We’ll see.


I’ve found something else that isn’t right about my Ubuntu installation. I can’t do a remote login to the other machine on the LAN.

At the login window on my Inspiron 9400 there’s the little “Options…” button in the bottom left corner. Click that, say that you want to log into a remote machine, and it certainly offers a login to the desktop that’s in the office. When I try that, however, it fails miserably. The X screen disapppears for a few seconds, replaced by a text mode display of services starting/stopping. That in turn disappears only to be replaced by the local login window a few seconds later still. I don’t get a login prompt for the remote machine.

I have to admit that I haven’t even started to look into why this might be. I’ve tried twice and failed twice (with a laptop reboot in between) so it’s quite reproducible. I’ll do some digging and see what I can find.


I ran Eclipse up for the first time in a week or two this morning, and it complained that the editor couldn’t be opened. A class couldn’t be found, apparently. Ok, fine. Close that error window, double-click on a .java file and the editor opens up on that file just fine. Weird.

Perhaps something I’ve done in the 7.10 Ubuntu upgrade has upset Eclipse. I figure I’ll run the software update to see if there’s any bug fixes available, you know — just so I’m sure I’m running the latest code. Except that the software update menu does nothing. Apparently it’s decided that when I use that menu item it’s fine to ignore me.

I give up. I like the idea of a flexible IDE with a wide variety of plugins, but Eclipse just isn’t there yet from what I can see. Others may have great success with it, and that’s great. For me, however, it’s just being totally stupid, and I don’t have time for unreliable tools.


H500 problems

24Oct07

I’ve had one little problem with Ubuntu over the last day or two. I’ve installed twinkle to let me make VOIP calls via my Engin account (works perfectly, btw) but because the Dell 9400 doesn’t have a built-in microphone (what were you thinking, Dell??) I need an external microphone of some sort.

I figured the neatest solution would be to use the Motorola H500 bluetooth headset that came with my SLVR. It doesn’t want to play nicely, however. I know it works with the Dell, because WinXP talks to it just fine. Ubuntu doesn’t want to know about it though.

I spent a good few hours trawling through online bluetooth FAQs and forums and it kind of talks (hcitool scan finds it, for example) but I just can’t get it to pair up nicely to the point where it’s available as an audio device. One problem, I think, is that there’s a lot of confusion out on the tubes about different versions of Ubuntu and what works with each version. I believe that support for bluetooth in 7.10 is a lot better than earlier versions, so now that the upgrade is done I might have more success.