Archive for August, 2006

At last, a tip

Since finally switching to Firefox a couple of months back I have been generally pleased. Currently, I am working on a video displaying, Flash based thing and wanted to see if the .flv files were being cached as I was hoping. Into Documents and Settings/<me>/Application Data/Mozilla etc etc I went only to find that Firefox seems to do a similar thing to Opera and caches stuff in its own format.

Quick search revealed:

Typing about:cache into the address bar displays the current memory and disk cache contents.

Thanks to TwisterMc for this little nugget.

Whilst I am on the Firefox thing, the following extensions turn Firefox into a mean WebUI development machine:

  • IE Tab This allows you to host the IE rendering engine in a Firefox tab
  • Developer Toolbar This contains goodies too numerous to mention
  • FireBug I am new to this one but so far it looks the business. It does all sorts of debugger, dom inspector, CSS shananigans
  • Total Validator This validates your mark up
Advertisements

Unit Testing isn’t necessary once you get a bit of experience down you…

What a crock. Following hot on the heels of Phil’s ‘Old developers get on my nerves and smell of soap’ post (not altogether accurate quote, more paraphrasing) I stumbled, via hanselminutes across this load of old tosh…

It appears that once you have 21 years of development experience under your belt you can divine whether your code works correctly using the force.

I have not really got into ‘Test Driven Development’ myself, now that isn’t to say it hasn’t got its merits, but my brain doesn’t work that way at the moment. I at least get a class defined with some method stubs in before I think about unit tests. I very often fill the methods out and I am sure there will be XP purists that balk at that.

I have in the last year written an application that because of time pressure I decided to do away with writing the unit tests. I think this is a reasonable decision to take if there just isn’t room to fit them in. I wish I had though as six months later the client was back for some new features that involved a bit of a reworking of some of the old stuff and it was a nightmare without the unit tests available.

You see, I am of the opinion that to consider unit tests as purely a time consuming mechanism for finding bugs is to undersell them. Bugs will out eventually, unit tests or not but the big thing for me, and the thing that gives the payback for writing them in the first place is when you come to do some refactoring or other. Particularly when things have got a bit out of hand. To be able to instantly see what has broken as a result of your changes is where it is at for me with unit testing. You also can’t argue that if you are able to automatically run a defined, possibly 100%, amount of your public APIs with every build then you are going to have a more robust application at the end of it than if you arbitrarily give it a manual runout.

The ‘time consuming’ argument is not really holding water these days either. I mean, you still have to write some stuff but there are plenty of tools that can lend a hand. Just out of the ones I have had a play with you have CodeRush that has some templates, Visual Studio will generate tests for you that need a bit (or a lot at times) of editing and there is nothing stopping you generating them with CodeSmith or any of the other miriad of code gen tools.

Judging from the comments Wil Shipley isn’t alone. I don’t mind people like that though…

…because they are wrong.

Read this you bastards…

Ok, so I have been blogging now for 3 weeks. I have dutifully written 10 posts and here are the results.

I have maxed out at 38 views and have 2, yes, 2 feed subscribers (hello both of you). I am averaging about 2-6 readers a post. I have no friends, I feel lonely, violated and down right miserable…

Joking aside, I think I am probably experiencing a common phenomenon. For most of us, blogging is a lonely sport in the beginning. Inevitably, your first few posts, or 10 in my case, go largely unread. So what can be done?

Well, I am obviously the wrong person to ask for the answers at this stage but I will not be deterred and will soldier on and try everything I can think of to build up my traffic. What have I tried so far? Well…

  • First of all, I only told 3 people directly that I had started blogging. I intended to tell noone but I couldn’t help myself. My idea was that I wanted to see how my readership would grow purely through the medium itself…
  • Next I lightheartedly outed someone with a bit of clout in my industry. I’m not sure how he found out but I guess it was through a mutual friend who was one of the people I told. This gave me an early peak in my traffic of 6… Not bad for a first post I thought.
  • I wandered a bit after that until I decided that I would try a trackback to Robert Scoble. I hit my peak there and thought I had stumbled upon a traffic goldmine. Turned out to be a bit of a fluke though as I have tried it since with more or less no effect. I think the title of my post actually naming Scoble had quite an influence on the success of this first attempt.
  • I tried the trackback route to a couple of other blogs without much effect. I reckon the trick with that is to get your comment in near the top of the comments on a popular post but I am yet to manage that so I can’t say for certain at this stage.

Stuff I haven’t tried yet:

  • Promising some kind of porn in the title and hoping to draw some traffic in from the recent posts section on WordPress. I suspect any success that this generates will be fleeting and I don’t anticipate a great deal of subscriptions being generated when the unsuspecting visitor finds out I am a speccy nerd.
  • Being abusive about another high profile blogger in a comment title. I am not generally an abusive person but I think this might work if carefully done. I would have to choose the victim carefully as most people would probably just delete the comment but if I chose someone who is a freedom of speech buff and did it semi-subtly then it just might work (captain).
  • Sprinkling some links in amongst the forums that I use. This is one of my more pleasant and positive ideas that I should probably have a crack at.
  • Telling more people about my blog. This would go against my initial experiment in flirting with the medium but I might have to give it a shot. I’ve been getting a bit more ‘community’ involved of late so perhaps I should make hay.
  • Exploring the aggregation, blog search, general bloggy stuff that is available on the web. Being a new blogger, I am only just starting to find out about all this stuff and there is probably something out there, who, if I could find them, maybe I could hire, the A Team…
  • Writing some interesting content that people would actually want to read. Now there is a thought…

What a TODO

One of my most used features in Visual Studio over the last couple of versions has been the //TODO comment (apart from things like the code editor, the debugger etc before some smart arse points that out). Due to my over-enthusiastic social life as a youth I am not blessed with a great deal of memory, I mean in my brain as opposed to my computers where I have plenty. Consequently I find it difficult to keep track of everything I plan to do while I am writing code. I suppose, amnesiac or not, we all do when the classes start mounting up and the solutions swell.

So, for me the //TODO comment is a life saver, at least, it could be a life saver if the darned thing worked properly. I am sure it works as intended but I fail to see why the TODO Team or whoever was responsible for it limited the task list to only show TODO comments from currently open files. Not to say that this isn’t useful but, as the files are open, I could probably find those myself in a couple more seconds than it takes me to look at the task list. Valuable workflow time I agree but not as valuable as the time I lose on all of the TODOs that lurk unnoticed in all the unopen files.

Being a bit of a Flash and more recently Flex noodler I was pleased to find the TODO plug-in for FlexBuilder/Eclipse. Downloaded… Installed… works like a treat. As you add a TODO it turns up in your task list and there it stays until the TODO is TODONE. Why can’t we have this in Visual Studio?

To that end I rustled up a quick console app that you stick in the root folder of your project/solution and run. Tell it whether you are looking for .as (I did this before I started with Flex and its plug-in) or .cs files and it recurses through your folders and files and gives you a list of all your TODOs and where they are. It also counts the lines of code, excluding comments and lines that only have a curly brace on while it is at it. Am I particularly proud of myself? Well no, it is a stupid application with about ten lines of code in it but I was desperate to actually have something codesque on my blog and it was the only thing I could think of. It has also been really handy for keeping track of my TODOs so perhaps I’m being a bit harsh on myself there. I haven’t posted the source because there isn’t anything exciting in it, apart from a keylogger and a couple of trojans, but if any of my regular readers, sorry, if either of my regular readers would like it then let me know…

On that note, how the hell do you attract traffic to your blog? I have tried a couple of things with varying degress of success but am yet to pass 40 readers… Maybe that is another post.

I am wrong…

It doesn’t happen very often but I am obviously wrong on this one. I just can’t see that there is that much of a need for all the ‘Web Office’ hysteria going on.

I am wrong because Google obviously think there is a need as they are investing a fortune developing that side of their business and according to Om Malik discussing an article on the Red Herring there are 17 high(ish) profile efforts currently going at the Web Office thing and no doubt a few more lesser efforts. I am assuming that the people who are throwing their money at this know better than I do as to the potential of the market/idea and thus I must be wrong.

Now don’t get me wrong, I fully understand the usefulness and potential of web based collaboration but do I need to do my word processing, spreadsheet err… ing and whatever else they concoct in my browser? Well, no I don’t. What is wrong with storing your stuff on the web and editing, creating etc in your desktop office suite of choice. Nothing…

Nothing, except that, use of OpenOffice aside, you have to buy your office suite wheras your Web Office is generally free. So for home users perhaps that will be the attraction.

Perhaps this is where the battle will be fought for business too. I didn’t think that there would be many businesses willing to turn over their private data to the Google machine. There is even a school of thought that says that Google houses its servers in the mines of Mordor and that there is a privacy time bomb just waiting to go off. (I’ve paraphrased a bit there…) It surprised me to hear that Scoble’s new company are ‘actually using most of the “Google Office Suite.”’ A start-up with more than a couple of bob of VC loot behind it has chosen to go the web office route despite Robert Scoble probably having a couple of copies of Exchange/Office lying around.

So there you go, for what it is worth, I’ll be sticking with my trusty Office 2003 until 2007 comes out…

Six degrees my arse…

So it turns out that I am only two degrees of separation from Scott Guthrie since he commented on Phil’s blog. I don’t want to get too overwhelmed with nerd awe but this throws up some interesting possibilities for the other four degrees.

Via Scott Guthrie I suppose I can claim Bill Gates on the third degree. That hooks me up with Bono… I can head in a couple of directions here. We could go Nelson Mandela, The Dalai Lama or The Pope then I suppose God if you are buying into all that malarkey. I could probably have skipped this degree and jumped straight to God from Bill Gates but I was trying to avoid any controversy.

We could also take the celeb route via Bono so I am guessing I could get to Jimi Hendrix, Jeff Buckley and all of Radiohead within a couple of degrees of Bono…

Come to think of it Scott Guthrie once replied to a forum post that I did so I could do away with Phil Winstanley and get an extra degree…

Flex on Rails

Having endured the various failings of the Flash development experience for the last three or four versions, all the while hoping that the next version would bring such luxuries as a debugger that works or intellisense that works, I have been pleasantly suprised by Flex.

Now if you are wanting to recreate Star Wars or the Zidane headbutt incident then Flex isn’t for you as Flex is a kind of ‘Form’ based Flash rather than a timeline/movieclip job. If, however, you are after a rich UI for your application and you want it to run cross-platform in the browser then Flex is your man.

I’m sure I will write more about it in the future when I have more than the two weeks experience that I have currently but on the whole it is definitely worth a look.

Whilst looking around for resources on the web I stumbled upon a few tutorials about using Flex with Rails. Is there no escape…

(here is another one Flexstore on Rails)