Owner: Bell End URL:http://doogalbellend.blogspot.com Join Date: Sat, 24 Mar 2007 17:04:06 -0500 Rating:0 Site Description: "quite amusing and drastically geeky at the same time" Site statistics:Click here
Swimming to New York 2007-04-11 23:01:00 I'm not the first person to point out the humorous suggestion from Google Maps when you ask for directions from the UK to the US (see step 36), but it got me thinking. One of the shortcomings of Google Maps is that it has no knowledge of anything but driving so it won't advise me to jump on a plane if I want to get to the US. For that matter if I ask it how to get to London Waterloo from my house, it doesn't know anything about trains so again will tell me how to drive there. It doesn't know anything about congestion charging or parking charges either so doesn't realise only the super rich or super stupid would ever consider driving into central London. Transport for London has the opposite problem because it completely ignores the driving option, which in some circumstances might make sense (try taking public transport from SW London to SE London without dying of old age on the way for instance). A while ago I wanted to investigate transport options for getting Read more:Swimming
, New York
Maintainable XSLT 2007-04-10 23:14:00 Doing a search on Google for 'maintainable XSLT' doesn't throw up a great deal but it seems like something that is really needed. There seem to be lots of resources out there telling me how to code in XSLT, but I haven't found any telling me how to do it elegantly or testably (is that even a word?). I've been working on and off on a project that takes an XML file and spits out a HTML representation of it. When I started off I decided to go with XSLT, rather than generating the output in C# using an XmlWriter. I still think that was the right decision. Even though XSLT is pretty verbose, generating HTML any other way isn't too concise or pretty either. It's not a big XSLT file by any means (about 1500 lines), but I'm already finding it hard to manage and the tool support just isn't there. Visual Studio 2005 is a step up from 2003, but there are still plenty of things missing. There doesn't seem to be a way to get an overview of an XSLT file by showing what templates
Skype has reached critical mass 2007-01-23 20:54:00 Looking at my Skype
client running today, I see there are nearly 9 million people logged on as I write this. Some would say that's enough to show Skype has reached critical
mass. But for me the real sign that Skype will soon take over the world is this. My mum uses Skype. I don't mean it's installed on her computer and she ignores it. No, she actually called me up on it the other day. And today she started an instant messaging session with me. So congratulations to Skype for writing a piece of software that is simple enough for a pensioner with techno-fear to use. And congratulations on your impending world domination.
I am a sex god 2006-10-31 20:46:00 I've been getting a lot of emails like this recently Hi,Hope I am not writing to wrong address. I am naice, pretty looaking girl. I am planning on visiting your town this month. Can we meet each other in person? Message me back at qzyv@directmailchat.info Today was different, it came from somebody called Johnathan... Makes you wonder how successful these kind of spams are, with a To: list of several people, a From: address that doesn't match the address they've asked me to reply to, a load of spelling mistakes and apparently coming from a girl with a boy's name.
100th Post 2006-09-04 23:22:00 So somehow I have managed to reach 100 posts on this blog. I was presuming that by the time I reached this point I would be a major web celebrity with millions of readers and I'd be rich beyond my wildest dreams through the adverts on-site. But it hasn't quite panned out that way and I have to say I'm disappointed in you all. Where are you and why are you choosing to read some boring old shite rather than the riveting stuff here? I feel like this kid...
Google Maps and the Random Pub Finder 2006-08-23 23:27:00 OK, I got bored waiting for a response to my queries about ripping off people's code so the Random
Pub Finder
London Map has gone live. Trying not to be too big headed, I think it's superb. None of it would have been possible without phpcoord and overplot. If programming is an art form then the old adage 'good artists borrow, but great artists steal' must be true... Read more:Google
, Google Maps
Solving the Google Maps performance problem 2006-08-23 14:02:00 Google Maps has a nice API to create your own map interfaces on a website. Unfortunately it has some serious performances problems when you add a large number of markers. In my case, I have about 500 markers and both IE and Firefox grind to a halt on my page. I've seen various suggested solutions, the most common being to reduce the number of markers by only showing one marker when there are several clustered together when zoomed out. I'm sure that would work but I wasn't too keen on the idea because it just sounded like too much work. Fortunately somebody has come up with a nice solution that works well for me. thanks to the wonderful open source nature of the web, I can happily rip off his code. Just need to get approval from him before I show off my new page to the world... Read more:Google
, Google Maps
Richmond Park 2006-08-06 15:11:00 Truth be told I don't much like London. When hearing this, people will often trot out the usual Samuel Johnson line, but the fact is Johnson lived in an entirely different London to the one I live in now. But one of the great parts of London has to be Richmond
Park (although some people will claim this isn't really part of London, because it's in zone 5). When cycling around its huge area, I can almost forget that I'm anywhere near the busy, unfriendly city I know.
Use the tool, tool part 8 2006-08-04 00:13:00 OK I lied, the last post wasn't my last post on .NET tools, there's one more.NAnt is a handy tool for automating builds. Although it's possible to drive Visual Studio.NET from the command-line, NAnt does lots of other things, like running your unit tests and zipping up files etc etc via an XML configuration file. I haven't used it a great deal myself, but I will be shortly.
Use the tool, tool part 7 2006-08-04 00:12:00 Right I have one more .NET tool to recommend and then I'm done. And that is FxCop. This will analyse your assemblies and tell you all the problems it finds. And my word, does it find a lot of things. The fact is a lot of the rules are just plain anal, but it still finds stuff that could be a problem. And whats more, you can add your own rules, although I can't say I've ever done this.
Use the tool, tool part 6 2006-08-04 00:12:00 Documentation is a right pain the behind, or at least it used to be. C# simplifies it a great deal by providing in-built support for it. XML tags can be added to your source code as you go along, so that 2 week task at the end of the project can be avoided. So once you've tagged all your code, what next? Download NDoc and you can generate help files just like the ones in Visual Studio. If it hadn't been for this tool, I'd probably never have got round to releasing a little project of my own into the wild.Another useful tool for generating documentation is GhostDoc, which automatically generates a first attempt at the documentation based on parameter names and method names. It doesn't always get it right, but it's often good enough.
Use the tool, tool part 5 2006-08-04 00:10:00 I haven't covered the most useful .NET tool yet, the wonderful Reflector. If you haven't got this yet, download it now.One of the great things about Delphi development was the fact that Borland provides the source to the whole component library, which really helps tracking down weird bugs and work out how their stuff works. Microsoft don't provide the source to the .NET Framework, but with Reflector it doesn't matter. It can reverse-engineer any .NET assembly and you can see how it works. Yes, some class library developers obfuscate their libraries, but Microsoft don't and that's the most important library.Reflector also has several add-ins that do useful things like reverse-engineering a whole assembly which is useful for, er, more nefarious deeds. There are also plug-ins to generate Delphi code and other languages. So, as I said before, if you haven't got it, get it NOW!
Use the tool, tool part 3 2006-08-04 00:09:00 According to 'Working effectively with legacy code', any code without unit tests can be considered legacy code. That means pretty much every piece of software I've ever worked on is legacy code.Before .NET, writing unit tests was hard. In my Delphi days I tried to use DUnit but the language didn't lend itself to writing a tool that was simple to use. In .NET, attributes and reflection make it much easier. So we have NUnit, which has been the tipping point for me writing unit tests.As well as testing functionality, unit testing also helps validate the design of a system. If it's hard to write tests for your classes, chances are the design isn't too great. It suggests too much coupling and cohesion between the classes.Unit tests are always mentioned in the context of agile development, but there is no reason why they can't be used without adopting the whole philosophy. I have my doubts about some of the agile approach but I still believe unit tests are worthwhile. In the short ter
Use the tool, tool part 1 2006-08-04 00:07:00 OK, the title is pinched from an article by Malcolm Groves, but I like it.After a week of having to work on an XLA written in the worst development language of all time, VBA, I suddenly realised the importance of using the right tools. You can be the best programmer in the world, but if you're using crap tools, your solution will still be crap.So here is the first in an occasional series of articles highlighting what I reckon are the best development tools. I spend most of my time doing .NET development, so I'm going to concentrate on that side of things.The first and probably most important tool is your IDE. And the clear choice is VS.NET 2003. OK, it falls over occasionally but I've very rarely lost any work. The choice is also easy just by a process of elimination.VS.NET 2002 was essentially a 1.0 product, so best avoided.VS.NET 2005 is a beta, so best avoided. And is just me, or is it one of the most butt ugly pieces of software ever?Delphi 2005 is, by all accounts, flaky as hel
Windows Live Local vs Google Maps part 2 2006-07-28 10:09:00 So I tried to switch to Live Local
but my first problem with it is a bit of a showstopper. The map doesn't show tube or train stations, so for getting round London it's completely useless. Back to Google
Maps...Windows
Live Local 1 - Google Maps
1 Read more:Windows Live
Windows Live Local vs Google Maps 2006-07-26 20:21:00 It all started with a trip to the wilds of Lincolnshire. We'd been there before but I didn't know the way too well, so thinking Google
has the answer to everything I thought I'd use Google Maps
to give us directions. Turns out the directions it gave us weren't too hot, causing much screaming and shouting between me and my other half who was trying to decipher the instructions. Admittedly where we were didn't help, all the roads and countryside looked the same. In the end we had to call the people we were visiting and ask for their help. Somehow they worked out where we were and guided us in.So for my next little trip I thought I'd give Windows
Live Local
a try. I was dropping my brother off at Heathrow airport so searched for directions for that. It's been a while since I've used the MS mapping stuff and it has certainly improved, in fact I think it may well have moved ahead of Google Maps. Google may have been first with the whole draggable map thing but they don't seem to ha Read more:Windows Live
Skype rocks 2006-06-02 17:24:00 OK, so I'm about 12 months late but I've only just got round to using Skype
on a regular basis and it's great. Most importantly it just works. I've had long conversations with people in the US and Australia and it drops out very rarely. Compared to my experiences with Yahoo Messenger (where conversations tended to consist of 'what was that?', 'you still there?', 'I'll call you again, see if it's any better', 'can you type out whatever you're trying to say', 'I give up, I'll call you on the landline') this is very pleasing.Any negatives? Sending files can sometimes be very slow (but this is still better than MSN which sometimes just refuses to accept files) and I can't seem to find a way to search through past chats.And it's written in Delphi, so perhaps there is life in the old dog yet.
The fear 2006-04-16 00:09:00 When programmers start out they are like small children, they have no awareness of danger. So they just go ahead and hack code, with no thoughts for the consequences. It's only after a few late nights caused by introducing serious bugs due to a one line change for some minor cosmetic problem that programmers develop the fear.The fear is a good thing, it helps us programmers to spot potentially dangerous changes to code and try our best to reduce the risk of breaking things. But there are two main ways that programmers (and managers for that matter) will deal with the fear.The first approach is to try to limit the amount of code change. If they are fixing a bug in an area they are unfamiliar with, they'll try to find the smallest amount of code they can change that fixes the problem, so rather than try to understand what the code is trying to do, they'll just shove in something that fixes the problem for this specific case and move on.This approach has some merits, there is certainly
Beware the ribbon 2006-03-24 23:33:00 Jensen Harris has convinced me that the new Office user interface will be lightyears ahead of the current one. But I'm going to make a prediction. I reckon soon we'll see almost every new Windows application adopting the new ribbon UI. But you need to remember that the ribbon has been created to solve a particular problem that Office suffers from. It has hundreds if not thousands of different commands. The average application doesn't have that many and the traditional menu and toolbar is still sufficient. So please spend your time fixing bugs and adding new features rather than adopting a new UI that you don't need. Read more:Beware
Creating thumbnails in ASP.NET 2006-03-21 12:26:00 .NET makes some things really easy and creating thumbnail images for a website is one of them. Here's the code I'm using on one of my websites. private void CreateThumbnail(string fileName) { string physicalThumbFileName = Path.GetDirectoryName(Page.Request.PhysicalPath) + "\images\" + fileName + "_thumb.jpg"; if (!File.Exists(physicalThumbFileName)) { // create thumbnail using (Bitmap img = new Bitmap(ImageFileName(fileName))) { using (Bitmap smaller = new Bitmap(img, new Size((img.Width*120)/img.Height, 120))) { smaller.Save(physicalThumbFileName, ImageFormat.Jpeg); } } } }The thumbnails are created when the page needs them, thus simplifying the upload process, since there's no need for any manual thumbnail creation. Read more:Creating
Serialization considered harmful 2006-02-27 21:05:00 The ability to serialize an object can be a very useful feature of a language or framework but there is a trap that developers often fall into when they first discover this functionality.Almost every app we ever work on requires some kind of file format to store information about the document the user is working on. So a developer will often think to themselves "This serialization stuff will save me heaps of time. I can serialize my object hierarchy with two lines of code when I need to save the document and deserialize it when I need to load the document". This way madness lies. Once you do this, your file format is completely dependent on the internal class structure. Want to change a property name or type? Bam, your file format is broken. Want to remove a property? Bam, your file format is broken. In fact, in .NET adding a new property will break your file format. Delphi is different in this respect since it will cope with adding new properties, but whether that is a good thing is o Read more:harmful
Have you heard of Windows XP? 2006-02-10 21:17:00 Windows XP came out about five years ago, but looking at some of the software around you'd never have guessed it. Here's a dialog box from IE7, a pretty new application in anyone's book and yet it still has remnants of Windows 2000 even now. I'll let it off since it's still in beta but it's hardly the only example of the retro look.The depressing thing is it is so easy to make sure your application uses the correct XP controls. Just search for 'XP manifest' and all will be revealed. In the simplest implementation, your app doesn't even need to be recompiled and it will take about 5 minutes to get up and running. OK, a bit of testing will be required and those screenshots in the manual might need updating but it isn't a big job. So just do it. Not doing it suggests you haven't got the attention to detail required to write a decent Windows application. Read more:Windows
Not wanting to become a Google blog, but here are ... 2005-12-18 00:20:00 Not wanting
to become a Google
blog, but here are some more random thoughts on Google. How do I get my PageRank up? Probably one of the most asked questions around but there are a few things that confuse me. If it's all based on links to my site, why won't Google actually tell me about all of them? It seems to only tell me about a select few, even though I know there are more around. Why did the Random Pub Finder have a Page Rank of 3 but now it's 1, what did I do wrong? Why do other very similar pages have higher ranks even though they seem to have just as many links to them? Why does Google claim one of these sites has links from health sites when it clearly doesn't??? It's all very weird.Of course, Google Analytics tells me nobody is reading this anyway, other than somebody from the Department for Homeland Security...
No really, total rewrites don't make sense 2007-04-13 22:53:00 I just found this fairly old blog post about rewriting Delphi apps in C# which sits so well with how I think (and puts the point across far more eloquently than I could ever do) that I had to post the link. The bottom line is if you have an old code base to maintain, rewriting it completely may seem like an attractive option, but there are other ways of getting to the same place without throwing away years of investment in that old code base.
Doogal's guide to parenting 2007-04-16 11:29:00 You can read every book by Gina Ford you want but from my vast experience (ahem) there are only two things you need to master when bringing up a child. Bribery and blackmail.
Buy less crap 2007-04-17 22:41:00 The idea touted by Red that somehow we can help charities by buying more stuff is frankly preposterous. The idea put forward by Buy (Less) Crap is to not purchase more consumer tat and donate the money we would have spent to charity instead. Now that seems much more sensible. How many fecking iPods do we need anyway?
How to solve virtually any technical problem 2007-04-21 00:27:00 People ask me technical questions all the time. I have no idea why, I don't know any more than anyone, perhaps the fact I can find the answer to these problems leads people to think I actually know the answer. So I'm going to present to you the two steps to find the solution to almost any technical problem. Google for it - The internet holds the answer to pretty much any question you can ask. The key to finding the answer is to know how to search. This is pretty much trial and error, if one search doesn't bring up the answer, try another phrase until you get something that looks related. If you're getting a specific error message, search for that. Another point to make here is that if you can't find what you're looking for, consider whether what you're trying to do is a good thing to be doing. I remember trying to find information about hosting .NET WinForms controls in Internet Explorer and not having much luck at all. This was a big red warning light
More Vista pain 2007-04-27 12:19:00 I finally cracked. I'd had enough of the complete lack of support from Dell about my lack of sound on Vista
. The guy said he'd get back to me, of course he never did. Emails to Dell got no response. Yeh I could kick off another support call but it would just involve several hours of them uninstalling and installing drivers and failing to get anywhere, which I've been doing pretty well myself for several months. To top it all off, Dell sent me an email asking me to fill in a questionaire about my customer service experience. When I clicked on the link, all I got was a message telling me my access had expired. They even sent me a reminder to fill in the survey a few days later, again access expired. Hey Dell, there may be a reason you're not getting much feedback on your customer service... So I thought, stuff this I'll buy a new soundcard, £20 and all my pain will go away. It all started out really well, Vista recognised it, went away to find the drivers and everything instal
Recruiters - how about reading my CV? 2007-04-24 23:06:00 I'm not looking for a job currently but my CV must be out there somewhere on the internet from the last time I was looking for work. And it's pretty clear quite a few recruiters just do a keyword search and send out emails without actually ever reading my CV. So I've had emails about C++ positions, which I haven't touched for almost 10 years, PHP jobs, which I'm familar with but wouldn't consider a strong point, testing jobs and even jobs in the US. Maybe the 'throw enough shit at the wall and some of it will stick' technique works but I suspect it's not highly effective. I tend to remember the recruiters who actually bother to ring me up and actually listen to what I have to say and if I ever need to contact a recruiter again I'll go to them first, since they appear to care about placing people in the right job. The others are simply helping to confirm the bad reputation that recruiters have.
The ZX Spectrum is 25 years old 2007-04-23 21:13:00 And how old does that make me feel?* Get an emulator and download some great games at World of Spectrum
, read more about the mad genius Clive Sinclair at Wikipedia. * Short answer - very