Applications and Utilities

Fibo-what-i?

Just a minor puzzlement today. PC-BSD 7 has been released, and is apparently very good. I might even try it. What's perplexing me is that it's codenamed the "Fibonacci edition". 7 isn't even in the Fibonacci sequence ...

Poor old NeoOffice

Some while ago, I wrote about NeoOffice, an OpenOffice.org port for the Mac. It provided what OpenOffice.org could not - a native interface. OpenOffice.org 2.x still used the X11 interface so integration was clunky at best.

Unfortunately for NeoOffice, that's just about to change. I've been playing with a release candidate of OpenOffice.org 3.0 for the Mac, and it's great. Fully native interface, and everything seems to work. No niggly little keybinding bugs. No scrolling issues. No strangely drawn dialog boxes. It "Just Works".

I'm not really sure where that leaves NeoOffice now, though. While I've appreciated their work, I can't really see any reason to still use it now that the "real" OOo works natively. And seeing as porting OOo 2.x to a native Aqua interface was the prime motivation of NeoOffice, I can't really see what they can bring to the table.

At the moment, the NeoOffice site claims that presentations run faster than OOo 3.0. I'm sure there are other Mac integration efforts they can use to make sure they stay a little way ahead of the OpenOffice.org curve, but for the basic functionality they seem to have been left somewhat high and dry by this latest OOo release.

Time will tell. In the meantime, you have to donate cash to get access to NeoOffice 3, while you can get the OOo release candidate for free. They don't expect to have a free release 'til January 2009. I think I'll just stick with OOo. Sorry, NeoOffice guys.

Mozilla launches Failfox 3

Tuesday 17th June was supposed to be a big day in Firefox history. The long awaited version 3 of the popular browser was to be released to record breaking numbers of downloads. The world would be in awe of the majesty of ... wait, maybe that's going a bit far.

Anyway, Tuesday came and went, and I didn't download it. I tried, but I failed. There were two things that stopped me in the end. First, the stability of the servers. All the various domains returned 'Http/1.1 Service unavailable' errors in the evening when I actually tried to get it. That didn't help.

The main thing that stopped me, though, was that it was released at 10am on the 17th. 10am PDT that is. California time. Those of us with a vague grasp of world geography will know that California is on the trailing edge of the world timezones. Indeed, by the time 10am PDT rolled around, it was already Wednesday the 18th at the international date line. Being sat there looking at the Firefox 2 link on the 17th didn't do wonders for the world at large's perception of the Mozilla organisation's ability to, well, organise.

In my mind, there were two possible things they could have done to make it not suck like it did. Either release it at midnight GMT (or UTC as people now like to refer to it), making sure that the two extreme timezones have at least 12 hours on the 17th where it is available. This would satisfy the world record download attempt's rules of it only being one day. The other way would be to launch at midnight on the 16th on the international date line, meaning it would require 48 hours before the whole world had seen midnight on the 17th.

Either way, the Firefox site gave no indication of intentions, fell over repeatedly and generally left those further east of California wondering what the hell was going on. Remember, Silicon Valley people, that most of the world sees the dawn long before you do. Without giving us more information than "the 17th" we'll all just get bored and wander off to the pub. Which, in fact, I did.

TFS Made To Suck Less!

I suppose I should come clean about something. I recently installed the Team Foundation Server PowerTools and have been using them successfully for a while. They have one or two very handy features that make TFS suck less. Get them direct from the TFS PowerTools page at MSDN.

Online Mode

Using the tfpt.exe command line, the 'online' mode will search your repository for changed files, added files and removed files and check out, add or remove the files as necessary. It also has a simple preview mode. This means that, with only one extra step, you can fix all the missing icons or forgotten checkouts or whatever. It would be nice not to have to do this step at all, but at least it's not entirely manual now.

Annotation

The PowerTools add a new feature to the Source Control Explorer: Annotation! Now you can actually see, line by line, who changed what, why and when. Jolly good.

Recursive Diff

Probably the biggest, most important change is the ability to diff entire directory trees. This will show you a nice window with all the missing files, all the changes, all the things that have not been checked out but should have, and everything else all in one lovely window. This alone is worth installing the PowerTools for.

Unchanged File Undo

A problem that arises from the 'check out required' nature of TFS is that sometimes Visual Studio checks things out automatically that are then never edited. When you check in, the files haven't changed so are not included in the changeset. This means you have a bunch of unchanged files marked as checked out. Very annoying.

Enter the tfpt.exe command line tool, with its 'uu' command. I assume that 'uu' stands for 'undo unchanged' or something. It basically performs an 'undo' on any checked out files that haven't actually changed since being checked out.

News just in: Team Foundation Server sucks. More at 11.

One of the banes of my current working life is the heaping mound of crud known as Team Foundation Server. I know I've ranted about it before, and I'm sure I'll rant again. Such is the heinous evil that is TFS.

This time, I'm going to list 4 things that TFS does (or doesn't) that means it's completely unsuited to modern development practice. I'll be comparing the functionality with that of Subversion, currently a very popular open source VCS that I like a great deal.

So, on with the rant ...

MegaHAL/Irssi - All new version 2.0!

I've just finished rewriting my MegaHAL/Irssi script to be a lot cleaner and a lot easier to configure. You can get it from the MegaHAL/Irssi page.

New features include:

  • Configurable using standard Irssi /set commands instead of hacking the script
  • Supports changing nick without hacking the script
  • Generally requires less hacking of the script ...

So, erm, yes. Enjoy!

VBA Unicode done right, redux

Some time ago I wrote a short article on forcing VBA to use some form of unicode to allow simple insertion of non-latin1 text into VBA modules. It sort of worked, for the most part, kind of. Well, it didn't. The problem is down to the VBA editor being locked to the local encoding of the machine it is running on. You can only type characters from BIG5 in China, Shift-JIS in Japan, and so on. If you have a need to make a VBA module that uses strings suitable for all locales ... you're pretty much stuffed.

Except you're not. If you do it properly, you can have any unicode character displayed in any VBA locale. So how do you do it properly? Well, you're supposed to use ChrW$() to generate unicode characters individually. Yes. Really.

Nokia 800^H^H^H770

Thanks to the sterling efforts of the chaps over at Maemo.org, I know have the ability to run the Nokia 800 OS, known as OS2007, on my Nokia 770. Flashing the new OS onto the machine was simplicity itself, given that a new FIASCO image is available and can be flashed in the usual manner.

So once it's all working, what can you expect? Well, my personal list of favourite new features is as follows:

  • Better look over all, especially the two on-screen keyboards
  • MUCH better Bluetooth support, including OBEX
  • Native support for Bluetooth keyboards and GPS devices
  • Automatic join of trusted networks on power on
  • Later versions of everything available
  • It might just be me, but it seems faster, too

There is rough to go with the smooth, though. One problem I've found is that the kernel included doesn't have smbfs support. If you use something like smbbrowser to connect to Samba shares on your network then you're stuck (at least, I think. I'll check for a solution.) There are also some battery life issues that might need sorting. The most major ones are the media metadata scanner going mad, and the internal alarm manager turning the device on at odd times.

If you notice, either through top or some other means, that metalayer-crawl is using up a lot of CPU time and draining your battery, then you might need to limit its scope somewhat. This is well described in bug 978. Metalayer-crawl is a simple program that indexes the identifying tags on media files stored on the system (e.g. mp3s), but it seems to get somewhat confused by symlinks and can easily end up recursively indexing the entire system forever. The fix for this bug simply causes it to only index files in the user's media directories.

Secondly, there is a strange problem with some devices that a 'hidden' alarm turns the device on at odd times. This simply needs the hidden alarm removing. First, become root, then run:

    $ /mnt/initfs/usr/bin/retutime -A ''

This simply removes all hidden alarm events. You could set custom alarm events with this utility if you wanted. I'll leave that as an exercise for the reader.

A final little tip that I quite like is the ability to use a long press of the power button to put the device into 'soft off' mode. This is basically the same mode as the device enters when the screen cover is put on, but sometimes it's nice to be able to access it without having to put the cover on. This is especially true if you're just temporarily putting it to sleep while you're otherwise engaged, and have power, USB or earphones plugged in.

To enable this feature, become root and edit the file /etc/mce/mce.ini. Find this line:

    PowerKeyLongAction=poweroff

and replace it with:

    PowerKeyLongAction=softpoweroff

Reboot the device and your new soft power off mode will work. Press and hold the power button in the usual way to turn it back on in a jiffy.

VBA Unicode done right

IMPORTANT UPDATE: It seems that this is one of the most popular posts on this site, so VBA's useless unicode support is obviously a big issue. Seeing as it's so commonly searched for, and seeing as many people don't know the first thing about Perl, I've knocked up a small Windows tool that does the job. You can find it at the updated version of this post. Everything below this line is obsolete!


Some time ago I wrote a short article on forcing VBA to use some form of unicode to allow simple insertion of non-latin1 text into VBA modules. It sort of worked, for the most part, kind of. Well, not really.

The problem, you see, is that the VBA editor is extremely stupid so won't display non-latin1 characters unless that's your machine's native codepage. Couple that with the compiler, which is also pretty stupid, that actually breaks encoding rules if you have the audacity to sign your modules with a proper certificate. It basically forces a revert to the native codepage making non-latin1 text look ... well, ridiculous.

Source Control done badly, badly wrong

Some people are lucky enough to work with technology that does its job well. So well that you barely notice it. So well that, if you were asked what the root cause of any problem you've had was, you'd have to say "erm, it was my fault.".

Not so Team Foundation Server. Microsoft's replacement for SourceSafe is possibly the worst version control system ever devised. Not only is it entirely unreliable, not only does it still use paradigms that died with exclusive file locks, but it also loses work.

So I develop a substantial set of changes to a project, across three different sub-projects stored within TFS. I commit. I move on with my life. A couple of weeks later, after several calls to get latest, I discover that my changes have, quite simply, disappeared.

There is no sign of the commit, there is no sign of the new files I added, and every single file I modified is pristine, as if I'd never edited it. This also means that, with the exception of the new files, the copy of my hard drive is essentially gone.

So what went wrong? Well, I know that TFS has a habit of 'forgetting' to tell you when a commit failed. Or telling you, but making the error so innocuous that you'd be forgiven for not even noticing it. It also has a habit of trying to pick the files to commit out of the modified files in your project without your assistance, and getting it very, very wrong.

This all stems from one major oversight right from the start. Although it is like CVS and Subversion in that it can merge two changes into one file, thus allowing concurrent development, it still relies on the user to 'check out' the file. Once the user has 'checked out' the file, it will know to include it in the commit. Unfortunately, this is buggy as hell. The Visual Studio plugin regularly misses edits to files, and if you edit a file outside Visual Studio (surely not!) then it will never be noted as checked out.

In some ways I could admit to it being my fault. I'm expecting it to work in a sensible manner. I'm expecting it to use file modification times or diffs or something to determine if a file has been changed since it was retrieved from the repository. I'm certainly not expecting a system so retarded that it requires the end user to manually tell it that a file is now different.

So there it is, two weeks work all but gone, because of the stinking pile of crap known as Team Foundation Server. If you're using this, install Subversion. You'll thank me, you really will.

Update: One more wonderful little gotcha ... If you have two copies of Visual Studio open and check out a file in one, the other won't notice. That's right, each one holds a cache of what it thinks the situation is and never, ever refreshes it unless you explicitly remember to tell it to at an opportune moment (the first of which is in the commit dialog, I think). So if you do a pile of work in one instance, switch to the other and tie up the other end of your changes, then commit, you'll only get half of it.

Truly it fits the Microsoft way, making the programmer work harder so the software doesn't have to.

Syndicate content