Wednesday, December 20, 2006

DVD::RIP

My daughters are really bored with their range of DVDs so if ripping DVDs was legal I might sign up to Amazon's DVD rental for a free 2 week trial and copy some Angelina Ballerinas to my hard disk using the wonderful DVD::RIP.
DVD::RIP is a perl/tcl graphical front end to the various command line tools needed to rip, re size and transcode DVDs. It offers a lot of flexibility but is still the easiest to use of any i've tried. I think this is because it's not dumbed down. The defaults are sensible and you can pretty much click and go but the UI is very well laid out so it's easy to find the setting you need to change.
It does require a high level understanding of the process:
  1. Extract the raw MPEG2 from the DVD.
  2. Resize/Crop if desired
  3. Transcode to MPEG4

It would be usable if you didn't understand the process, which is a shame, but once you get past that - it is very straightforward.

Tuesday, December 19, 2006

Missing my Linux Box

I'm sitting at the office, missing my Linux box. How sad am I?!

Had a rough experience over the weekend (I can't find the energy to play during the week). I was very interested in Beryl a 3D accelerated desktop interface (lots of nice eye candy). I didn't think things through properly and headed straight for the Nvidia site to download drivers. Big mistake -> much grief. I got it working but there were too many problems so i decided to revert.

As things went from bad to worse I was expecting to need to reinstall the system to get myself out of the many holes I'd dug but after walking away for a couple of hours I was able to sort it out and get things back to normal (with GLX/Beryl still working). For a large part of the time I had no X and didn't know where to start but after reading through various man files i was able to find enough pointers and with some more pocking around i was able to get the various packages installed to recover X and get back to normal operation.

I'm starting to understand why people get so militant and emotional about their choice of software, there is a big emotional investment in this stuff ... when things go wrong you can't help but wonder whether it's worth the effort and compare it to previous experiences. I guess this is where a bit of blind faith in the cause is needed to pull one along. The prospect of having to start with a clean system was daunting. But i think what kept me going is that it would still be quicker than building my windows box. Even now - the though of having to install windows on this box scares me: 1) will activation work? (will i even find the product key?) 2) There are so many drivers and codecs that need downloading and endless rebooting - what a pain. 3) For a few of the devices i don't even know how i got them working last time - just a lot of clicking around until they worked. 4) Windows is just an OS - it's a few hours more to get VS, Office etc up and running.

In any case, the total time to install a complete, working windows box would be much greater than with the Linux box 2Days/vs 3 hours. And in any case - I was able to recover the system and didn't need to reinstall! i learnt a few tricks about how to get on the web and list and download packages with no X GUI and next time this happens it will be easier.

Linux, doesn't feel quite as zippy as when I first brought it up. I have installed a lot of packages but I suspect the main culprit is Beagle, a desktop search tool. I have set it to index a lot of stuff, especially on my old NTFS partitions - i think it doesn't like NTFS.

Beagle is very similar to the MSN desktop search tool. Running queries is very simple and it is remarkably good at getting the right things in lightening fast speeds.

I'm not sure what to do yet about those NTFS partitions. I think Beagle has a concept of static indexes which would be ideal for those read-only NTFS partitions.

Until now, I haven't felt comfortable locking myself into a Linux partition format for anything important, but i feel ready to do so now and will be moving my main data drive to ext3. fs-driver offers good support for reading ext2/3 partitions in Windows so it's not too risky.

I'm not ready to get rid of Windows dual-boot yet though. The main problem is that I haven't found anything close to a reasonable video calling solution. There are other holes but these at least can be worked around by running windows in a VM.

Another task: I need to get more familiar with what's being run at boot time, it's still pretty fast, and memory usage rarely goes above 350Mb, but there are a lot of processes running immediately after boot which are probably using CPU and IO and it would be nice to know what everything is and get rid of the ones i don't need. There is a services tab in Ubuntu, so i will start there before digging into the RC scripts.

It would be nice to build a custom kernel too, perhaps as a Christmas project, although i don't know if I'm brave enough for that just yet - i suspect much of the apt repositories wouldn't work with a custom kernel so I will need to do a lot of research before going down that route.

Monday, December 11, 2006

Weekend two with Ubuntu

This is such good fun. I was feeling quite jaded and fed up with computers recently but getting to work with Linux as my main home machine has re-sparked my interest and more importantly the joy of it. It's a proper hobbyist thing. Everything is there to tinker with and although there is no need to bother if you just want to get on and do something specific (just bang on windows) the end result feels so much nicer - it's something i crafted myself and know intimately. With windows there is a feeling that things are going on you don't know about. You install a package and it modifies this DLL and that registry entry. You install something and it adds a tray icon you need to figure out how to get rid of that, then it phones home to tell the developer about you. On Linux you can see every module, every library and every process. If you stick to open source packages you can compile them yourself so you know exactly what's there. It's very very liberating. I guess that's the idea.

progress update

Close to 100% of my hardware is now working under Linux. The only thing I haven't got working is the Sony MP3 player but I think that would require modifying the ROM on the player to work around the DRM and I'm not sure i will even look into that at present.

  1. The DigiTV tuner card and MythTV are now working well together. I don't really watch broadcast TV much these days so i haven't tested it thoroughly, but it seems at least as stable as it was under windows (it wasn't very stable under windows).
    I mainly like watching American rubbish and it's easier to get that as torrents.
    Although you can schedule recordings (so you're not bound by the schedule) it's still pretty inconvenient. The main problems with this are:
    1. It's unreliable. Recordings sometimes break up; take up CPU and if you need to reboot during a recording, you can't.
    2. It's a haste to schedule the recordings and handle conflicting air times. Windows Media Center (WMC) is pretty sophisticated in this respect but it's still a lot more haste then firing up a torrent.
    3. Adverts.
    4. The raw MPEG2 files are big (about 2GB per hour). Vs. 600Mb for a DivX
    I spent a lot of time fine tuning MythTV so it's pretty good now and has quite a few features that WMC doesn't have - although i can't say it's as rich in functionality overall as WMC is.

  2. My Sony digital camcorder is working. I was able to get the video off the camera but playback is bad - i think it's something to do with interlacing which is a subject i don't quite understand. The video editing software is really rubbish. I need to look into finding something better. Worst case scenario is that i use Linux to grab the raw video and edit in the windows VmWare box.

  3. I got a good deal further in getting my Quick cam Pro 5000 working. I had to download and compile a kernel module. This module is V4L2 only and doesn't work well at the moment, but hopefully that will change in the near future. Currently there doesn't appear to be any video conferencing package that has a windows equivalent and works with my camera. The most promising one I could find is aMSN which recognised the camera once I built it from the latest source so I'm going to focus on this. I might even have a go at hacking the source. One thing that occurred to me today is to plug the CamCorder into the TV card's composite input. When I select the composite input in aMSN i get an empty blue screen which looks like it's being generated by the device - so that just might work.

I also haven't tried setting up my palm T3 yet. I haven't used the T3 for a while but I think I will see what it's like under Linux. The main problem was the sync which was slow and had to be started manually. I expect the Linux tools will be better and might make it worth bringing it back into service.

Thursday, December 07, 2006

Ubunutu on my home desktop

A couple of weeks ago, when my friend, Pete, told me he was having a go setting up Linux at work, I ridiculed it telling him it wasn't worth the effort based on my past experiences with the OS. My first jobs were in a Unix environment using Apache/Perl on Solaris and (some) Linux. I hated it and it was great when windows application servers became usable. But still, once in a while, I download and evaluate a Linux distro for use as my home computer.

At home I use my PC primarily for entertainment: watching TV/videos, web surfing, photos and music and VOIP. I have a TV tuner, web cam and various other bits and pieces and the TV is used as a second screen for video.

Each time I tried getting this working under Linux it was an immense struggle and in any case the software wasn't very usable. So I gave up after a couple of days. It's been about a year since I last tried, most recently with Ubuntu (circa V.5). Last weekend I installed Ubuntu 6.10. My! things have come a long way. The WiFi card was identified immediately, I was able to get the TV-out, IR Remote, and Canon A710 DigiCam working fairly easily.

I have SMB file sharing working both ways with a windows box, a windows development Virtual Machine hosted under VMWare (at near native speed), all the video and audio codecs work flawlessly, a very nice TV based Media Centre system and pretty much all the software I need for day to day activities. Most of this was achieved in the first 5 hours. The system is stable and rock solid. Windows creeks and crawls from time to time, but Linux just keeps on going.

The bad points
  • I came across several minor bugs in settling up hardware, for example: I had to specify the serial IDs of the DigiCam to get the system to read images off it, and modify a script to enable the Nvidia driver to work. The issues I encountered are known ones and I was able to easily find solutions, however the complexities of the solutions would be beyond the ability of most users. The fact that I stumbled on these leads me to suspect there are many others I didn't come across. To be honest the bugs seem to be related to the "glue" scripts and default configuration files that hold the distribution together - but in a sense this is more worrying than bugs in the core software packages. I had quite a lot of prior Unix experience without which I doubt I would have got very far
  • Configuring the system is hard work: Lots of editing of cryptic text files, calling other scripts to restart deamons, remembering to use sudo, etc - all completely unacceptable to most people. The default installation only comes with the most basic admin and configuration graphical user interfaces.
  • I still haven't got the TV tuner, Sony MP3 players, video camera and web cam working and doubt I will be able to - although my knowledge is growing and I might tackle these again soon.
  • Lots of software doesn't exist on Linux. Notably to me: skype video. I was very pleased to see Picassa for Linux but I actually like Ubuntu's built in image management package. Some of the built in packages such as Azures and the Video editor have died and I can't get them to come up - tasks for another days and not a major problem.
The really good points
  • It's (legally) Free!
  • The Ubuntu shell and default packages are so consistent and well integrated that day-to-day usage for things like web, word processing, email and image manipulation are actually easier on Linux than on windows. The whole thing feel sleek, fast and uncluttered.
  • Security - this is a very serious concern for most non experts. Having to deal with viruses and spy ware is a nightmare. Many of my friends and relatives abandon their computers due to this. With Linux this is so much less likely to be a problem.
  • Good alternative packages for most tasks, at least for the needs of a non professional user. Quite a few commercial ones too.
  • Terrific for web development. Not sure why I haven't looked at the LAMP stack for such a long time - but now it's on my desktop I don't have any more excuses. I'm also exploring ROR which is pretty nice.
  • No more rebooting! The system just keeps going, 99% of updates don't require reboots either. If something goes really pear shaped, I press ctrl+alt+backspace which kills X and it's processes which pops back in n2 seconds, and then, after singing in, restores everything to exactly the way it was. It restores the session after a shut down too! Booting from cold takes about the same as windows but there is no endless crunching after logon.

I think there is no going back to windows for me!

ps: I haven't evaluated vista properly yet ;-)

Wednesday, November 29, 2006

Source code line counting application

There are a zillion source code line counters on the web, but at work downloading binaries is blocked at the firewall level. So when Mike asked for an estimate of the number of lines in the project, I put this simple C# 2.0 application together.

Counting lines in code isn't much fun, nor is it very precise. There are lots of ways to skin this cat including: grouping by either file type, language or module/project, then you need to decide what files to include? Only the hand coded ones, or perhaps machine generated too. It's not always easy to work out which is which. Then it occur to you: what exactly is a line of code? A simple count of carriage-returns? Non empty lines? Do I attempt exclude comments?

For the purpose of this exercise all this project does is count carriage returns and then group the result by file type. Before running it i manually extracted from Sourcesafe a subset of files. To do so requires in depth knowledge or the project files and judgement on whether it should be counted. Because different languages are used in different modules it was easy to summarise the output in a report.

The biggest problem with this approach is that it's unrepeatable. The figure will be different if I were to do this again tomorrow and it would be hard to track progress in terms of lines of code in a month's time.

I think the way forward is to make the tool rule drive. The user should be able to define a profile then run the count directly against Sourcesafe. Look out for version 0.02

Friday, November 17, 2006

Super-Easy Blendy Backgrounds

Usually I dislike links to other peoples work where there is nothing to add...but this is just so marvelous I had to post it.

Thursday, November 09, 2006

Canon A710is

This is to show off my new toy (more here and here. and some video output)

Posted by Picasa

Tuesday, October 24, 2006

Homebrew Build and Unit testing tools

On IFM, alongside the application development, we develop a suite of tools to enable versioning, releasing and unit testing.

IFM is a complete Internet banking front end, implemented using Microsoft's DNA toolset. It consists of several layers of processing, and UI elements. A core project that implemented the majority of functionality is then customised and extended for each client in separate implementation projects.

The development model is loosely based on xProgramming and jUnit. In practice this consists of a modular processing tool to build and unit test the system directly out of source control. The build tool runs several stages of processing to merge customer specific features & design with core functionality, apply UI templates, compile C++ and VB6 code, produce documentation and initial configuration and finally generate a completely automated deployment package.

The next stage of the build tool is unit testing. There are several classes of unit tests: Install routine tests, back end server tests, business logic object tests, database tests and the most recent addition: a programmable http spider to test the system via the web UI.

A dedicated server continuously runs build/test cycles on all projects and reports any regressions (usually caused by development). A developer must then review these and either fix the code or the test.

Key benefits of this approach are:

  • 95% of Regression testing, a repetitive, boring and error prone task is automated and can be repeated often
  • A high level of confidence exists before any manual testing is undertaken; this shortens the number of test/debug cycles.
  • The System wide impact of changes can be seen immediately
  • The exact differences between any two versions can be mapped precisely.

There are of course costs. In addition to the fixed overhead in creating the build tool, there is the cost of maintaining the individual test scripts. This can be as much as 20% of development time. However, the benefits easily outweigh the costs.
In practice very little manual testing is required to maintain high quality of deliverables. Development cycles are shorter and there is no bottleneck for testing. The testing is mostly the developer's responsibility; the people who work most closely with the system. Testing becomes an interesting and challenging job instead of a dull, repetitive one. As a result it is much more likely to be done, and done well.

Monday, October 16, 2006

Trying Again To Make Books Obsolete - New York Times

Trying Again To Make Books Obsolete - New York Times

This is one of the only devices in the last couple of years that I am really aching to have. I've been waiting for the E-Ink display technology for a long time and despite the quirks, $350 seems very reasonable.

The last device to get me this excited was the HP TC 1100. A compact yet fairly powerful tablet PC. Initially it was a lot of fun. But after a while I stopped using it. The software didn't take advantage of the touchscreen, the handwriting recognition wasn't very good and it was never practical in a meeting which is what it was designed for. The device was too clumsy and heavy and got hot so you couldn't hold it for long periods of time and so in the end I decided it didn't offer enough to justify the effort in using it.

As excited as I am about the Sony Reader, I doubt it will replace books any time soon. It seems the traditional medias die very slowly - reading and writing have had a long time to mature and are very entrenched and hard to digitise. In contrast recently created medias, the Audio cassette, VHS Tape and even Cd's and DVDs are dead or dying.

Friday, October 13, 2006

Dyson DC16 Root 6: The First Handheld Vacuum That Does Not Lose Suction » werty dot net 4.0

Dyson DC16 Root 6: The First Handheld Vacuum That Does Not Lose Suction » werty dot net 4.0

It's a really slow day today. So when I saw Werty's post about a Dyson handheld cleaner that costs 5 times more than the competition I perked up. Our Dyson like vacuum cleaner (which was rubbish) died a couple of years ago. So i asked Kate, who used to clean our flat, what kind of Dyson to get. She looked at me with a deep look of pity reserved for the mentally challenged and said she didn't know.
When pressed she suggested I get a Henry. "A what?!" i said. "A Henry" she said "I use it in one of my other jobs and its much better than any Dyson".

I looked into it. It has a smiley face painted on it and comes in especially naff shades of red, green, yellow or blue. These things are the dogs bollocks: small, light, powerful, cheap, reliable, easy to use. They're what professional use. You don't even have to use a filter if you prefer. Just not cool and not marketed very well and they have these silly smiley face painted on them.
It's a vacuum cleaner for Christ sake.

Thursday, October 12, 2006

Could a 30-in. monitor help you do your job faster? - Yahoo! News

Could a 30-in. monitor help you do your job faster? - Yahoo! News

This story is about research commissioned by Apple: They claim you can save up to 50% of the time spent in operations involving dragging content from window to window (a few seconds).

This sort of commissioned research is a great way for companies to get cheap marketing - but in this case the reporter didn't play along. The article goes on to quote several experts disputing the claim, they say the saving are 5% at best. What's more, they recommend a better alternative: two, much smaller screens.

Better luck next time Apple...

Schumacher fastest at Jerez

F1Racing.net - Every day updated Formula One news! (For Formula 1 news, results, photos and more!) I was told no Blog is complete without a reference to red Ferraris. So there!

Wednesday, October 11, 2006

IE7 to debut in October | The Register

IE7 to debut in October | The Register I have had IE7 installed on my desktop at home for the past couple of months. It's a strange world where I am constantly reaching for Firefox to get sites to render properly. IE7 is still very much in beta, it's slow, crashey and just not very nice at all. I can't see how this can possibly be ready yet.

Why i like .Net

Microsoft is deeply disliked by many, especially developers - and for good reason, many of their products are second rate.

One area where Microsoft products shine is in the business they started out in: development tools. There are many options in the marketplace for developers to choose from and while Microsoft leads in some areas such as desktop development it is far behind in things like databases engines and web development and servers.

Microsoft is making a huge effort in these areas. It has looked closely at what people do and the problems it's customers were facing. The offerings are nearly addictive in their productivity and ease of use.
With the most recent round of tools, especially .Net 2.0/VS2005 and SQL 2K5 it is possible to bang out a complex solution with breathtaking ease.
For example: in developing web applications, ASP.Net under VS2005 offers a rich, event driven programming model and broad array of UI controls as well as powerful tools to handle templateing, configuration, user management, navigation and so on. This stuff works beautifully and is intuitive and easy to access and learn as you go along. VS2005 offers a set of wizards designed to ease the task of accessing your data. These allow you to model your database in native objects with varying degrees of control and you can then link these object to controls in practical ways, allowing even fairly complex forms to be created with very little code. The wizards are smart and feel somehow transparent. Having used these features extensively, they feel stable, flexible and are well worth the effort of working within the constraints they enforce.

Microsoft's business practices are obviously harmful to consumers and business. As Microsoft gains control of a market, competitors disappear and progress grinds to a halt. I hope Microsoft's competitors at Sun and in the FOS arena stop sneering and take a close look at these tools and evolve their own offerings to make sure the competition keeps going.

Tuesday, October 10, 2006

Planning software development

Creating software is often said to be an art – this is true to some degree, but at its core, building software is an engineering task. Software is usually made to serve a purpose or solve a problem and as much as possible, functionality, delivery dates and costs should be known in advance and met when the software is delivered. To do this you need to spend time up-front gathering requirements, working out the technical details and breaking the work into manageable tasks; and then costing it. This will help you make promises you know you can keep and may mean the difference between success and failure.

Before you begin

Talk and think about the project. Talk to users and client and gleam as much information as possible. Try to get them to put as much as possible into writing. Clients are usually not software professionals so they will omit things; work with them to get a clear picture of what they really want to do. Don’t worry about the implementation at this stage, just think about the real world implications of what they want.

Requirements

Once you have an initial understanding of the requirement start creating a Requirements Definition (RD). The RD will contain an overview of what the problem is, and the proposed solution. This should be understandable by everyone involved in the project.

Cover all the tangibles: benefits, features, efficiencies, etc. that should be delivered. Then describe the solution. It is often a good idea to scope the development and mention what isn’t covered too. Be as detailed as possible but use judgement - there is no point writing a 20 page requirement document for a 2 days project.

In a big project, it’s often a good idea to break the requirement into several stages that can be built consecutively but are useable on their own. This will allow the client to control her costs and force prioritisation.

It’s important to get the RDF approved. Make sure the person signing-off understands it and make sure it is as close as possible to their initial dream. It is often necessary to revise this a few times and move feature in, out and around.

Technical Design

The audience for this is mainly internal; this is meant as a guide for the development process. Its purpose is to allow you to budget and schedule and may feed back into the requirements documentation. It is then used by the developers implementing the software.

The most important thing to cover here are the processes in the software. The business rules, algorithms, data models, etc that your software will implement. Don’t try to capture every detail of the program, by the time you’ve done that – it’s already written. Only cover things that aren’t obvious. The size of the project is a guide to how detailed this should be.
In addition to a written document you may need to produce some of the following: Use cases, data models, screen designs, class designs and state diagrams.

Work Order

This should be the final output of the design process. The work order is a list of tasks and materials needed to build the software. This can be broken down in various ways. By the headers in the RD, by type of professional or anything else that makes sense.
A separate work order should be created for each phase of the development. Some items to include in addition to project specific ones are: testing, documentation and training.
If there are any third party requirements: hardware, software or otherwise, mention them here.

We have done a considerable amount of work at this stage but still no software has been produced. It’s a good idea to make the client aware of this in advance and try to agree a fee in case they decide not to go ahead with the project.

Finally

In practice it is very hard to think of everything in advance and the price of a project is usually decided by what the customer is willing to pay. Focus on understanding what’s impotent to them and what they want to achieve. Be sure to build enough time into your estimates for anything you’ve missed during the design phase. Allow time for reworking based on customer feedback. Use your gut but don’t rely on it. If the algorithms are complex or if the requirement is to use a piece of third party software: it may be a good idea to spend time proofing the solution first so you are confident that you aren’t getting into something you can’t control.

Talk to your customers and users during the development process, show them youre progress and make fine adjust as you go along. On the other hand – don’t be tempted to rip everything up and start again. Identify problems and address them directly as quickly and painlessly as possibly – using as few resources as possible.

Good Luck!

Friday, January 06, 2006

hello

Live from somewhere in the city this is micky. Look out for more...