Category: Uncategorized

  • Moving!

    I haven’t filed this one under “The Weekend” because it was a very unusual weekend! On Friday night, we dropped a few things off at the new house – mainly the expensive stuff (computer, hi-fi, decks, TV etc). Afterwards we went back home and did some more packing (fun fun fun! — I never want to see another box again).

    Then on Saturday morning we got up early to finish off a few bits and pieces that still needed to be done (e.g., dismantling our bed – which wasn’t as bad as it sounds). The removal men arrived promptly at 9:00, and we were able to start moving. To cut a long story short, despite them having to go and get another van to fit all our stuff in, we managed to move OK and only broke one thing!

    Both our respective sets of parents came up to help us, which was great – we were pretty much unpacked by the end of the day!

    In summary, there are plenty of things left to do on the house – but we’re basically unpacked and getting gradually more organised!

    So that was Saturday. As for Sunday, in the morning we went to church, and then in the afternoon we went to a company social / BBQ put on by the company I work for. It was a good afternoon, I’ve only been here for two and a half months so it was good to get to know people a bit more. In the evening, we went out to Sloppy Joe’s with a few other people to celebrate Alex’s birthday. All in all, it was a rather good day!

    Right, I think that’s just about it for the time being… as far as I know we still don’t have the internet at home, but hopefully that won’t be long in coming! If you want to get in touch with me, for the time being it’s probably best to do it via phone or text, during the evenings at least. I will update when the internet is back again!

  • Moving tomorrow

    Just a quick update to say that we are moving house tomorrow. This, amongst other things, means that we will probably be without the internet for a few days, so I may not get the chance to update here much.

    This also means that we will have a new phone number as well, once we get the internet back I will send round an email with the details!

    Cheers

    Phill

  • Doh!

    As some of you may know, unless you have iTunes installed you can’t use an iPod whilst it’s plugged in to a computer. As it charges through the USB connection, effectively this means you can’t listen to an iPod while it’s charging up. This is annoying!

    I did think about installing iTunes, but to be honest I’m not really a fan of it: it seems like quite a bloated piece of software, to be honest! If I was on Linux [this is my work laptop – Windows, unfortunately], I’d have a few options available to me, but unfortunately most of them do not have a Windows version. Anyway, I finally decided to install WinAmp, which (back in the days when I used Windows) wsa my absolute favourite media player — I used it for years! (I’m still annoyed they don’t have a version out for Linux — XMMS, which I use, is a clone of classic Winamp but they don’t seem to have a version of the new one out. Ah well).

    After using it briefly, I then decided to replace WinAmp’s standard iPod support with ml_ipod because it’s open source, and seems to have more features

    Aaaanyway. It works pretty well, I can listen to tunes while my iPod is plugged in etc etc. The problem is… it has an option to synchronise the iPod with your local media library. Which is great… I tried it. Unfortunately, I didn’t realise the synchronisation took place FROM my local media library TO my iPod. In other words: When I hit sync, it had managed to delete about 300 songs before I realised and hit Abort!

    So what’s the moral of this long, rambling, and rather boring story? Don’t hit ‘Sync’ on WinAmp if you haven’t imported the iPod’s library into your local Media Library!

    Note: This was entirely my own fault, it threw up a confirmation box which I didn’t read properly… doh!

  • Weekend Update

    Apologies for being rather lax this week and not posting up my regular “The Weekend” post until now! I’ve been rather busy … on Friday, we completed on our house purchase! For those of you unfamiliar with the house buying process, “exchanging contracts” means when you have committed to buying the house – “completing” means when the sellers have moved out and you have got the key. So, on Friday evening we went to have a look round our new house! And also to take one box of stuff round there (it’s a symbolic thing, just to have some of our stuff in the new house!). Apart from one or two minor things – mainly the cooker door being a bit broken – everything seems to be in order. We’re both really pleased!

    On Saturday, we did quite a lot of packing – it’s a lot harder than it looks! Especially when you have lots of breakable stuff that needs moving.

    On Sunday, we went to church in the morning, and then afterwards a couple of Phil’s friends from home (Julie and Dave) came round for lunch. It was really nice to see them, and also they were able to take my old speakers and amp back with them (they know a couple of people who are mobile DJs and will find them useful). We also managed to take them round to see our new house, so that was good as well 🙂

    In the evening we did a bit more packing, and then had a well-earned break!

    Yesterday we were doing some packing as well, and so on ad infinitum… (well, until Saturday anyway, when we’re moving!).

  • Why I like Linux…

    There are many reasons why I like Linux. I came up with a brilliant example of how it is the best today, though: the past few weeks, I’ve been uploading some sermons onto the Fordham Website. What I had been doing was ripping the CDs to hard disk [sermons are recorded directly at the church onto CD] using a graphical tool called Grip, converting them to one file using Sound eXchange (a command-line tool), then converting them to MP3 using Audacity, and then uploading them using a graphical FTP Client. As you can see, that’s quite a number of steps – it took ten to fifteen minutes of my time!

    What I wanted to do was streamline the process — I didn’t want to have to jump through all those hoops! In addition, I wanted to have some basic formatting applied to the audio before being uploaded (i.e., normalised, converted to mono and to a low bitrate). I also wanted ID3 tag information (as this is how the website picks up what file you are looking at). Oh, and I wanted, if possible, to have the file uploaded to the website once the processing was complete. “Not much to ask!”, I hear you say.

    Well, I accomplished it — using a shell script! Here’s what happens:

    • I put the CD into the drive
    • I start up my shell script
    • It asks me the title of the sermon (for example, “Andy Saville – Daniel 6”) and the name of the file (for example, “20070708-as” — the .mp3 will get added by the script)
    • It then rips the CD to hard disk using CD Paranoia. At this point CD tracks are stored separately as .wav files
    • Then, Sound eXchange comes along and combines all the .wav files into one, and at the same time I normalise the volume (well, technically this takes two passes, but who’s being picky?)
    • Afterwards, the script calls Lame which encodes the MP3 and converts it to mono, as well as applying the ID3 Tag
    • Finally, the file is uploaded to the website using the command-line FTP client [Admittedly, this step is a bit hacky — but it works, so I’m not complaining!]

    If anyone is curious, I will upload the script 🙂 I will be the first to admit that I am not an expert in shell scripts, but it just goes to show how powerful they are if someone like me (a relative beginner) can manage to save themselves 10-15 minutes of work without too much effort (well, a couple of hours).

    (Side note: I would have used Python rather than a shell script, but at the moment I’m still more used to shell scripting – especially for things which involve starting up lots of other processes.)

  • Big Train

    Last week, Anne-Marie showed us a video on YouTube from a TV show called “Big Train”, with Simon Pegg and Mark Heap (amongst others). It’s absolute classic:

    The Tom Henderson sketch (WARNING: contains some profanity)

    There’s plenty more Big Train stuff there if you search for “Big Train”… I’ve ordered the DVD, I will report back to let you know if it’s any good 🙂

  • Packing

    Sorry about the slow updates recently… we’ve been busy packing! It’s quite a slow task, especially when you have to wrap fragile items up with bubblewrap, but we’re getting there. I’m quite glad we left ourselves a couple of weeks though – when you only have evenings, a couple of weeks isn’t really very long!

    We complete the purchase today, which means we should have the key by this afternoon! We’re going to take round a box tonight (some books or something) just as a symbolic gesture, but everything else will be going a week on Saturday (14th). We’re having the washing machine delivered on Friday 13th — probably a good thing I’m not superstitious!

    Aaaaanyway. That’s all for now. Just wanted to let you know why things were a bit slow here!

  • New Blog

    I’ve decided to start up a new blog. Well, technically it’s an old blog, but it’s not really been used much up until now: Phill’s J2EE Blog. Because I do J2EE for a living, and I do occasionally want to make posts about it, I thought it would be a good idea to start up a new blog about it rather than posting the stuff here.

    So, if you’re interested in any of that, head on over there and have a look. Otherwise, don’t… it’s not my lookout!

  • Weekendy type things

    So… it’s time for another “The Weekend” post. On Friday evening, we … didn’t do very much really!

    On Saturday, we went into town in the morning to do a bit of shopping, and then in the afternoon we headed out to Currys to buy a washing machine! The sellers of the house we’re buying are leaving most things in the kitchen, but they’ve sold their washing machine. This meant that getting a washing machine was quite a priority for us! So we bought a new one, which is going to be delivered next week. It was a rather scary experience because it was a first for both of us (never having owned a home before, all the washing machines we’ve had have been provided by the landlords…) and there was an awful lot of choice! But we picked one out in the end, a Bosch, which looked pretty good.

    In the evening we went round to Karen & Steve’s (and Alex’s, at the moment) to watch Doctor Who. Matthew and Anne-Marie came long as well. It was actually quite a fun evening – we all enjoyed the show, and had a good discussion about it afterwards. I wasn’t sure about the “big red reset button” (the paradox machine), and the “Return of the Jedi” rip-off at the end wasn’t great, but I think it was still fun to watch.

    On Sunday we picked up Alex and went to church in the morning. In the evening, Alex came round and we made a curry (which was very delicious, even if I do say so myself. Which I do.) Then we rented out a DVD, “The Pursuit of Happyness”, which turned out to be a very good film! I can recommend it…

    Right, I think that’s just about everything for now…

  • Guice: A few thoughts

    I’ve just had a quick look at Google Guice (Guice is pronounced like ‘Juice’). It’s a dependency-injection framework, similar to the Spring Framework[1]. However, it does have some differences. My initial thoughts on this I’ve tried to vaguely collate below. I apologise if I’m not making much sense, it might be better if you have a read through the Guice User’s Guide first!

    Pros:

    • Guice uses annotations and code rather than an XML file to manage dependencies. So, for example, I can write a method like with the signature: setDependencies(SomeClass dependency1, SomeClass2 dependency2) and just add the @Inject annotation to it. Guice will automatically detect populate the dependencies.
    • Guice is apparently a lot faster than the Spring Framework at initialisation. Because Spring has to parse in an XML configuration file, I can well believe this: parsing XML takes a lot more processing power.
    • Guice doesn’t index beans by name, it indexes them by class. So, to use an example, in Spring I might use the following code to get a bean:

      DataSource dataSource = (DataSource) applicationContext.getBean("DataSource");

      Whereas in Guice I would use something like the following:

      DataSource dataSource = injector.getInstance(DataSource.class)

      The Guice version is a lot cleaner (it avoids the cast) and less error-prone (using Strings is always liable to mis-spellings and typos)

    Cons:

    • Guice, at the moment, doesn’t contain a lot of the helper classes. Spring is much more comprehensive – there is absolutely no comparison at the moment. Of course, I don’t think Google want to compete on that level with Spring, and it’s probably not fair to draw that comparison, but I think it’s worth making the point at least. If you go with Guice you may have to use Spring anyway (for e.g. JDBC access, which you can do: Spring is quite modular).
    • I think the main reason for me preferring Spring at the moment is that in Guice, the dependency information is mainly stored in application code: you have to implement the ‘Module’ interface, which then loads up the classes and performs all the mapping required etc. The main difference between the two methods is that in Spring, this metadata (telling it which classes need which methods injected) is held in an XML file.

      If I want to configure a DataSource (for example), in Spring it’s fairly easy: you define the DataSource bean and have it load its properties from a properties file (or just specify them in the XML). In Guice, you would have to specify those properties either in application code or write a Provider which loaded up properties. Either way is not ideal.

      I think storing metadata outside of application code is the best way to go for Flexibility – if you want to change the dependencies in a Guice application, you would have to recompile it. This is really not desirable.

      This is why I will be sticking with Spring for the time being!

    There probably are a fair few things I haven’t mentioned, but I’ve only looked at Guice for an hour or two – not really in any great depth (as you can tell!). I will definitely be keeping an eye on Guice because I think it’s got a lot of potential – but for now, I think Spring is the framework for me!

    [1] If you have absolutely no idea what I’m talking about, this is all related to Java development… you might want to skip this post now!