Tuesday 27 November 2007

for when you network shares are slow... lmhosts

LMHosts has existed in Windows for ever. Well I know it has since Windows ME anyhow. It's a file thats actually very rarely used by Windows. Infact most people don't even have one. So why am I talking about a mythical file that no one uses... Well that's because sometimes it is needed and useful. Here at home I have a nice Linksys NSLU-2 or SLUG as its known. This is running the very nice UnSlung firmware and as well as providing Samba shares it has an FTP server, twonkymedia and some other bits and pieces on it. Overall it's very good and keeps me very happy. However one thing really frustrates me about it. Accessing the Samba file shares are really slow in XP and Vista. Especially slow in XP. I thought that my poor slug may have been being over worked and even that the HDD attached to it could be experiencing some issues. Luckily I decided to do some research before doing anything drastic and I stumbled on a really interesting find. I cant find the forum thread I was reading, it was on the Linksys ones, but a user had suggested that Window Networking can struggle with the device and a way to speed it up is to create / append to the lmhosts file an entry for your device. This means that your box needs to be on a static IP address, but let's be honest this isn't a bad thing. So I went to C:\WINDOWS\system32\drivers\etc and created myself a new lmhosts file. Then by consulting our good friend wikipedia added the following line...

192.168.2.3    mjjamesSlug           #PRE             #SLUG
So i have my ip adress for my slug, the network alias, #pre so it caches it as i use this drive alot and then a nice comment at the end saying what this is for. I wasnt sure if I expected this to improve the speed of my shares but it did amazingly. Straight away everything loaded faster, explorer wouldnt have a good long think everytime i changed folders, my slug was usable again. So now I am going to add this change to all the comps on our home network and reap the benefits. Now the question is will normal windows file shares behave better if each comp has an entry in each other comps lmhosts file, I'm unsure of this but I may give it a go, it wont be that hard to set up 3 comps on static ip's .... Anyhow if you are experiencing slow network shares, especially on a nas or similar device then why not try lmhosts. You may even love it ;)

Monday 19 November 2007

@Media Ajax London

So Today kicked off @Media's first Ajax conference here in London. I came down yesterday with a few guys from New Mind Derek and I took the train from Liverpool and after a speedy 5.5 hr journey we got into London Euston around 9pm. Today kicked off with Dion and Ben giving us an overview on the "state of ajax". This for me at least really covered the current state of play with Ajax, touched on all the main JS libraries and gave us an insight on what is around the corner. Before lunch Derek Featherstone gave us a great session on "Real World Accessibility for Ajax-enhanced Web Apps". I must say I really enjoyed this session and found Derek to be very witty. Its also good to hear that your not the only one who thinks in terms of semantic HTML. After lunch I also thought that Christian Heilmann's "Planning JavaScript and Ajax for larger teams". This for me opened my eyes to alot of things that at present we don't do in my place of work. I'm not commenting on whether or not this is a bad thing but I am hoping that some of the things Christian highlighted is at least given a go in our work place. In particular I like the idea of having Code Reviews where your code is moderated. This isn't to keep tabs but to help you as a developer to improve your coding ability but also to ensure that good parts of your code are shared and that knowledge shared! I also took note of the YUI team's Build Process, this process consists of validating code, minifying, consolidating and then tagging as Live. If we can streamline our build process code that is put into production should be cleaner and in theory more reliable. I also personally took to heart Christian's comments on our "inner hacker". I know that I often have a habbit of letting my "inner hacker" take over during certain projects and can let this happen during development time. What Christian suggesed is to contain this for more appropiate times. I.e coding in my own time and when I have some downtime in work, which may be rare ;) By doing this I will be able to deliver projects in theory within time better but also have better code. This did strike me hard and I know it's because truth hurts, hopefully I can devote more of my inner hacker to my main site and various side projects, who knows i may even get to blog about them :D That's it for tonight, just to say after Day 1 we all ended up for a few drinks on @Media at the abbey which was cool and after that Derek, Sunny and I headed over to the Hard Rock Cafe London. Well busy but well worth the trek :D --- I will be posting all my pictures from today on my Flickr

Wednesday 31 October 2007

Whose Problem is it anyway?

As a developer I on a daily basis make assumptions. These assumptions often vary from whether some sort of functionality is required or if SQL is the best database for the job, or if IE supports a JavaScript event or CSS selector. Now the problem with this is that sometimes our assumptions are wrong. For Me this has happened Multiple times in the last few days, in one case I had assumed that IE understood the 'onChange' event and the ‘target’ DOM attribute. Sadly this was not the case and as a result a JavaScript script I had made only worked in FireFox. This then lead to me wasting another hour rewriting the code so it worked in IE. The issue for me was that IE treated ‘on Change’ events on input fields as ‘on blur’ which lead to the event listener never firing the attached code. Also IE has the ‘original target’ attribute and not ‘target’, most annoying.

Who's to blame?

So whose problem is this? Me as the developer? lE for not supporting all DOM events and properties ? FireFox for supporting the W3C spec? Or even the end user for using a browser as buggy as IE? Of course the problem really lies with the developers. In this day and age it's our job to be aware and able to cater for browser inconsistencies. It's part of being a good developer, and it’s what we’re paid for. We should not rely or make assumptions on how something should work, we should spend a little extra time to ensure our code is consistent and cross browser compatible.

What can we do

In my opinion, check for browser inconstancies should be part of our development cycle. We should try to foresee these issues and ensure appropriate action and code is written to handle unforeseen circumstances. Even if we just catch the error and report in a friendly way that this functionality won’t work. The same principle should be applied to data, all too often we assume data will be neatly given to us in a clean format and that foreign keys are nice int key values so we can perform simple look ups or key bag techniques. This isn't always the case, especially when working with older systems or other developer’s / companies that have a different coding standard than your own. The key to working with data is to know your data, I have touched on this before when I was writing about my Google Data code, unless you know what data you are going to receive and use within your application and how you can use it, your application will never stand the test of time. So what this really comes down to is that as developer's we must stop assuming and check web browsers behaves as we think it should or does. We must check that any data we use will always be in the format we expect, and we must ensure we document our code. If we don’t document our code other developers that may have to / want to use our code won't have to mane assumptions about how our code works and will be able to concentrate on things that really matter, coding, not bug fixing!

Sunday 28 October 2007

Del.icio.us Links For 28/10/2007

Web Site Optimization: 13 Simple Steps [Apache & IIS Configuration] - 26 October, 2007

a good article on site optimization
Link: http://www.sitepoint.com/article/web-site-optimization-steps

Songbirdnest.com | Songbird Media Player - 26 October, 2007

Could this be the future of media players, browser based, XUL goodness? Watch this space!
Link: http://www.songbirdnest.com/

JavaScript tutorial - DOM events - 25 October, 2007

A great article on DOM events, take note of how lousy IE is and workarounds :(
Link: http://www.howtocreate.co.uk/tutorials/javascript/domevents

Videora Xbox360 Converter - Xbox360 Video Converter - 24 October, 2007

For when you want to watch those videos on your nice television through your 360
Link: http://www.videora.com/en-us/Converter/Xbox360/index.html

What are the main differences between Access and SQL Server? - 22 October, 2007

For when you have to turn that old Access DB into a nice SQL baby
Link: http://sqlserver2000.databases.aspfaq.com/what-are-the-main-differences-between-access-and-sql-server.html

Ajaxload - Ajax loading gif generator - 9 October, 2007

For when you need that loading gif...
Link: http://www.ajaxload.info/

Ctrl+Alt+Del - 8 October, 2007

Everyone needs a good online comic to read
Link: http://www.ctrlaltdel-online.com/

Windows XP IIS Manager v1.7 - The Code Project - Windows 2000 / XP - 5 October, 2007

Need to manage multiple sites on iis why not try this out. Its easy to use and allows host names
Link: http://www.codeproject.com/w2k/EasyIIS.asp

IIS Informant: Passwords for IUSR and IWAM - 2 October, 2007

for When you overwrite the IUSR password....
Link: http://www.windowsitpro.com/Articles/ArticleID/21222/21222.html?Ad=1

Monday 22 October 2007

The problem with the XBox 360

Why is it when you have a great product, say an Xbox 360 , which is great by the way, the games, XBox live arcade, need i go on... Theres always a drawback / something which makes you feel robbed... That's right the Media settings, why is it that you can either use the Windows Media Extender functionality or pair it to a Windows PC with the Media Sharing setup. This in my opinion sucks. So ok the Media Center extender functionality is tied to Media Center / Vista, that's bearable but why make it so that a remote device has to be a windows pc! Some of us in the world have Network attached storage, some of us even manage to get their NAS device, which in my case is a nice Linksys NLU2, which ill post about another time, to run an iTunes Media server... Sweet but oh no the XBox 360 does not count this as a device. Which means I'm still unable to play my beloved music collection downstairs with out my laptop. It's even worse when you think I have purchased a fiar few albums and tracks on iTunes, including the The The Hoosier's The Trick To Life and New Young Pony Club's Fantastic Playroom albums recently as part of a birthday gift. and I can't play them anywhere I need to :(

So whats the solution?

Well for one Microsoft will allow the XBox to connect to a normal network share, its not even a complicated Apple or Linux only share, its SAMBA! This will at least allow me to play my MP3s and CD's I have ripped into my computer. The next stage would be for the XBox to connect to a iTunes music share. Now I know Apple are keeping their DRM tech under wraps but for the good of the consumer media devices, which the 360 definitely is, must be able to talk to others and not be tied in to specific brands and technologies. I think we as consumers put up with far too much of this "tied in" attitude. I'm not going to go into the whole DRM debate as this will turn into an essay and not a blog post, but things need to be better supported, cross-platform.

Ideas

One Idea I have had is to write an add on to Media Center, which you can do in Vista although I'm not sure if this then shows up on the XBox? Any know for sure? Which accesses your iTunes and allows you to change its tracks / see whats on, you could then in theory stream your directx output from iTunes to your XBox. This as a concept sucks as your then tying up your PC but it may be a temp solution. Of course getting your XBox to talk to a network share or even an iTunes server would be truly amazing but we will wait and see on that one.

Doing that mobile thing..... revisited

A few months ago I wrote a post about how I was finding the "mobile Internet". At the time I found it to be very good and was very happy with it. On the bus today I had a chance to chance to ponder over my usage since then and if any thing had changed. Now I must say that I use my mobile Internet daily, sometimes I'm on it more than I am on my Internet at home. It really is great on the whole, Opera Mini web browser allows you to view practically any site, MSN means I'm always in touch with people and again the Google Apps, GMail and Maps are always useful when on the move however I have found one gripe. My gripe is how intermittent mobile Internet is on the move. For example when on the bus your be lucky to be able to run msn let alone browse the web. The fact is when your on the move, for 3 anyway, the 3G signal just fades out and your Internet ability suffers. This is vastly magnified when your trying to read your blog feed on Google Reader as every time you loose Internet connectivity your session resets and you have to relogin !?! This annoyed the hell out of me. I'm now thinking when will someone or even Google release an offline rss reader for Google Reader for the mobile device. Now Google already have an offline mode for Google Reader in the form of Gears so I beg the question wheres the mobile edition? I suppose this will come in the form of some Java app which I don't mind about, i just hope you can use the app online, and then download you top 100 or even 50 unread. This would then allow many mobile commuters to catch up with their blog feeds whilst on the move. Here's hoping this happends sooner rather than later.....

Friday 28 September 2007

Del.icio.us Links For 28/09/2007

CSSVista is a free Windows application for web developers which lets you edit your CSS code live in both Internet Explorer and Firefox simultaneously. - 15 September, 2007

CSSVista is a free Windows application for web developers which lets you edit your CSS code live in both Internet Explorer and Firefox simultaneously.
Link: http://litmusapp.com/cssvista

Creating Drop Caps Using CSS - 7 September, 2007

An interesting article on how you should spend more time than simply looking at the first letter when doing Drop Caps
Link: http://www.safalra.com/hypertext/html/web-typography/css-drop-caps/

Tuesday 28 August 2007

Del.icio.us Links For 28/08/2007

A page showing how good mash ups can be - 25 August, 2007

Hi there, so what is this about? Well, Bill Snitzer a BitGravity Techie is driving to LA form San Francisco. He's got a web cam streaming to the site and a GPS device updating the Google Map, crazy but cool
Link: http://bill.bitgravity.com/live/

Estimate Goat - 23 August, 2007

Been asked for another Estimate without much information?
Link: http://www.estimategoat.com/

Again with the Module Pattern - reveal something to the world - Wait till I come! - 22 August, 2007

Another way to do object oriented programming in Javascript
Link: http://www.wait-till-i.com/index.php?p=476

Last.fm Normaliser - 22 August, 2007

An awesome tool that ranks your favourite artists and albums by an estimation of how long you have spent listening to them. Well worth a go
Link: http://www.associativetrails.com/stuff/normalisefm/

Free SEO Marketing Tools - 21 August, 2007

Some good SEO marketting tools for help in making your site more SEO!
Link: http://www.mikes-marketing-tools.com/free-marketing-tools.html

ripper.rhetoric: activateActiveX - 2 August, 2007

a great way to fix the IE click to activate "feature".....
Link: http://therippa.blogspot.com/2006/03/activateactivex.html

Monday 6 August 2007

For When Youve Had Enough of Vista Backup

Windows Vista came with a brand new backup tool to help save millions of people from loosing all there beloved data. But what happens when the user doesnt want ever file known to man backed up or the categorisation version misses out too much information? Well when it comes to the Vista backup tool your stuffed. Thats all it does, All, or next to nothing. Gutted I decided to bin off Vista Backup tool and find a worthy replacement, amazingly it didnt take too long. Presenting Microsoft Sync Toy v1.4 ;) Amazingly SyncToy does exactly what I want to. I used to use it many moons ago for syncing my uni files on my Laptop with my Desktop PC, but since I left uni and Hayley "inherited" , stole, my laptop I havnt used it. Until tonight that was, I decided to start it up again, create all my folder shares, development, databases, documents, music and photos and then schedule it to run every week. Now on a weekly basis all my files are backed up to a spare internal HDD and an external HDD. When it comes to sync options, SyncToy has every mode under the sun, I decided to set all mine to contribute, so new files, updates and names changes are copied to my backup, however deletions arent, in case I get all shift + del happy ;) And thats it, just simple backed up goodness. Now if you are a fan of having all your information in a backup format MS can see when your reinstalling from a backup etc, why not use SyncToy to get all the data you do want onto a HDD in a suitable format and then get Vista Backup to make its own backup image of that drive, that way all the files you want, none of the ones you dont and no hassle. If only other people thought like me....

More ASP.Net Antics - using the Site Navigation with SQL - An Update

Well it's been a while since I've had something decent to blog about, however I warn you what I'm about to blog about isn't really decent, its more of a side comment / observation. A while a go I posted about using ASP.NET 2's site navigation control with SQL, I have been playing with my modified of this for a while, and all seemed to be working fine in demo's and general development. However last week an interesting bug appeared. When the site's application is restarted, i.e cache cleared and the site navigation is rebuilt, the site would crash out the first two times the navigation tries to rebuild. The third time however results in the site loading perfectly fine. I have to say this behaviour baffled me. The first thing I did was to download the site's live database and run against a more debug friendly version of the site's code. Now the error message being thrown up was that the current node / page had an invalid parent. So of course I then checked the database only to find it did have a valid parent and all was ship shape data wise. I decided to deactive this page only to find another page casued the error, so I disabled the next suspect along with 2 others. Now this all seemed very odd, why would some pages error and others not? I couldn't figure it out, however I did realise one situation where this bug appeared for a genuine reason. I decided to add an "active" field next to each page so you could turn off pages until they were ready to go live. Now you can do this for a parent page, however all the child pages are left active. This would then oviously cause the script to chuck out errors as our SQL that returns all the pages for the navigation doesn't check to see if a pages parent is active. So how do you cater for this situation? Well I thought of a couple of ways, you could make your SQL, be it a stored procedure or plain T-SQL statement, join the parent Id's using an Inner Join and ensure the parents are active, this way any inactive parents are left off. However if you have a lot of pages in your database and the site has a steady flow of traffic, you could end up with a potential bottleneck. You could ensure that when a page is deactivated that all it's child pages and then their child pages are deactivaed, again this would be crazy as if you have lots of child pages which than have further child pages you would end up with unrelistic amount of update statements to perform. So what is the answer? Well i decided to do the required work at the business logic layer of my system. We have our SQLSiteMapProvider and it checks to see that the Parent ID of a node is valid. At present this churns out a nice provider exception error message so I decided to update this to handle things differently. I decided to go down the root of instead of causing a provider error if the parent id is invalid then simply return null instead of a sitemap node for the current page. Then where we call the check if parent is valid function, check if null is returned. If it isn't add the node to our sitemap, if not then don't worry carry on. This way any orphaned children are just ignored and the end user knows no difference. Now before anyone else comments, I know this isn't a grand solution and I'm sure that there will be pros and con's for a SQL solution and this solution or maybe even a better way, please comment if you have a better way, however for the hour I had to look at this I felt this was the best solution. It even masked the random page error that was occuring at the start, hopefully when I get chance to rebuild my main site using this code I will be able to take some time to relook at this provider and come up with a better solution. Until then if you want a copy of the SQLSiteMapProvider I am using then grab this zip file.

Saturday 28 July 2007

Del.icio.us Links For 28/07/2007

Emulating the XO - OLPCWiki - 23 July, 2007

Information on setting up a emulated OLPC (One Laptop Per Child) environment, I should really look into developing something for this and actually make a difference!
Link: http://wiki.laptop.org/go/Emulation

Disguise Your Browser as a Google Bot and Get Free Access to Pay Sites - 13 July, 2007

A way to get access to those must register forums when all you really want is the solution!
Link: http://uneasysilence.com/archive/2007/07/11394

Faceball: your face, our balls - 12 July, 2007

A funky video highlighting faceball, very funny
Link: http://faceball.org/

IIS Compression in IIS6.0 - 5 July, 2007

A good guide on how to set up IIS Compression on IIS6
Link: http://www.wwwcoder.com/main/parentid/170/site/3669/68/default.aspx

System.Net.Mail - 3 July, 2007

A great reference on every thing to do with the .Net 2 Mail Object
Link: http://www.systemnetmail.com/default.aspx

Alibris UK: Second-hand Books, New & Used Books, Rare & Out-of-Print Books - 3 July, 2007

Books Books and more cheap Books
Link: http://www.alibris.co.uk/

Sunday 22 July 2007

Going all Ubuntu

Well since HackDay I've been feeling all fuzzy over the sheer number of Ubuntu users and feeling I needed to use it again. I have used it before however since installing Vista I couldn't be assed to dual boot etc again. Tonight I decided to VM the latest Ubuntu release, I VM XP with IE6 and Windows Server any way for testing purposes, why not Linux. As to date I have only been using MS software as VM's i have been using Microsoft Virtual PC 2007, so i thought tonight we could add a bit of non M$ goodness. So i created my new machine, set up the RAM and HDD mounted my ISO, booted up, and chose the run / install option. This is where thigns got flaky. Once the VM had loaded from the "live" Cd the screen turned to gibberish, utter jibberish. I thought initially it was something had went astray during the boot so I rebooted the VM. Alas the error still appeared. So here I was with either Gibberish or a black screen, and both options quite hapily ate 50% of my CPU usage. After traulling the net it appears there are quite a few issues with Ubuntu on Virtual PC. the root of all this seems to be because the S3 video adapter that is emulated by MS is only 16Bit. Most Linux Distro's expect and use 24bit, hence the errors. I tried to use lots of alt methods by using lower bit rates etc but it still crashed for me, at which point i decided to give up and try VM instead. So here I am, happily installing VMServer and getting some Ubuntu loving. It's a sad state when Virtual Machines don't run properly due to poor emulation. Hopefully at some point ill get Ubuntu back on Virtual PC as it makes my life easier having them all in one place!

Saturday 21 July 2007

It's Been a While...

Well sadly of late I havn't got around to finish any blog posts, I've started a few, goingMobile, gettingBulletproof and a few others but yes yours truley has been to lazy to finish them and to sort out the styling on blog and finish his new .Net site. Why is the big question, Hayley says it just cause im a lazy quilt, but in truth I have been swamped of late by work, overtime and church stuff, sad eh ;) Any how the point of this post was not to get sympathy for my all too busy life style but to say that I joined the dark side.... I have a FaceBook account, so if your reading this why not pop over and say hi, i could do with the friends :p To find me search for Michael James, I'll be in the Manchester group, even though I'm in Liverpool..... stupid FaceBook Catch you later!

Saturday 30 June 2007

Geekup Liverpool

Well i thought it be about time that I gave a quick write up on my first GeekUp Liverpool. This is a long overdue post, I should add I started it Friday morning, but then had to go to two weddings this weekend and now here I am! Any how back to the post. Now Geekup has interested me for a while but I have never justified going to Manchester for one, but now they have appeared in Liverpool. Unfortunately I missed the first few due to other social commitments but this time I had it marked in my diary well in advance. As I work local I decided to stay at work until 6 and then head over. As well as myself Chris Alcock also attended from our office and before heading over we decided to have a quick game of FaceBall with Derek. Sadly Derek whoopped both our asses :( We got to Parr Street just after 6 but found out that the room hadn't been booked and we couldn't get in until 8.30, This however wasn't such a bad thing, it allowed for a good hour or two of socialising with fellow geeks and getting to know each other. This for me was the best part. Thom Shannon was there and Chris, Thom and I got chatting to John McKerrell, he works for Multi Map and seems to play a big part in the OpenStreetMap project. We talked about OpenStreetMap as well as other things and Im know seriously considering get a GPS device so i can get involved, North Liverpool especially needs mapping. It was at GeekUp that I finally decided to start using Twitter, John showed us how he was twittering using his phone and get results back from multi map using it. All very cool. After a free half glass of Bulmers and a few beers later we finally got into our room and Dave Verwer gave a brief talk on Unobtrusive Javascript. I have been using Javascript and in particular YUI alot in the last few months and I did go into the session expecting to know most of what was being said. Dave went for an example driven talk and it was quite good, covered the basics well and there was good participation by all 10 people who turned up. Sadly after the session I had to dash as I Hayley was picking me up and we had to go home and organise what we were wearing for the wedding we were attending the next day. I had hoped to get to know some of the other guys more but such is life, there's always next time. So GeekUp was very good and I will definitely attend again, I managed to take a few pictures these can be found on flickr - http://flickr.com/photos/mjjames/sets/72157600540738499/

Friday 22 June 2007

Wednesday 20 June 2007

Del.icio.us Links For 20/06/2007

Yahoo UI Library : Begin with Aptana - 20 June, 2007

A quick tutorial on integrating the latest YUI library with Aptana
Link: http://www.hedgerwow.com/360/doc/aptana-how-to/demo.html

Aptana: The Web IDE - 20 June, 2007

A Great App for writing AJAX sites, YUI Integration is awesome
Link: http://www.aptana.com/

Saturday 16 June 2007

Welcome to Hack Day

The Train Journey

Well today started at the unearthly hour of 4am :( Once I was packed Hayley picked up Chris and myself and dropped us off at Lime Street. Here we met up with Derek, Kath and Thom with Sunny going to meet us in London. The train journey was abit of a failure, we had the grand idea of paying a little extra on our tickets and going first class for the nicer seats, free food and drink and an overall better experience. This however wasn't the case, they were short on staff so we ended up having to go to the Shop in coach C and get a free tea or coffee, a bottle of water and a biscuit :( While on our journey we tried getting internet access through my mobile on 3 as I have the X-Series package. We failed misserably, even though we got Chris' laptop hooked up via bluetooth, we couldn't for the life of us share this across our adhoc network with his Windows Vista. Thom then got us into playing the original Grand Theft Auto across the network, which he owned us at but hey :D We then arrived in London, found Sunny and then got a taxi to "Ali Pali"

Beginnings

As we arrived at 10:04 we were in the tail end of registration, this was a very smooth and quick process and i must say Hats Off to the organisers. I got a wrist band, 2 beer vouchers, a t-shirt and a "goodie" bag. The goodie bag had the usual leaflets and pens but there was also a very geeky but very cool keyring. A wifi finder :D I have actually wanted these for months and now I have one. It's only basic however it tells you is there a network available and how strong, but it's free ;) The T-Shirt is cool, my one is Navy and no doubt there will be some images taken and chucked onto Flickr later. We have now got straight into sessions. So far the ones I have atended are, bbAuth, Yahoo! Mail, Yahoo! Maps and now Yahoo! Answers. For me these sessions have mainly only given me a few ideas, most of the stuff I have seen before but it's cool to put faces to names. We have also been dogged by Wifi issues :( Hopefully this will settle down soon. Gotta love BT :D Right off to grab a coffee and attend another Session, catch you later.

Thursday 14 June 2007

Tuesday 12 June 2007

Del.icio.us Links For 12/06/2007

Optimize Guides and Diagnostic Software - 12 June, 2007

A good site that lists lots of tweaks and diagnostic softwares for windows
Link: http://mywebpages.comcast.net/supportcd/

Monday 11 June 2007

Del.icio.us Links For 11/06/2007

Apple - Safari 3 Public Beta - Download - 11 June, 2007

Safari but for Mac OR Windows :D We can finaly check for Safari compatability in Windows, thank goodness!
Link: http://www.apple.com/safari/download/

Going on a Safari

So earlier today Safari 3 Beta 3 was released to the online community. Not only will Safari 3 be a long overdue update for the Mac but it will also be the first version of Apple's gem on Microsoft Windows, Vista and XP. For me as a web developer, and I'm sure other web developers will agree, this is a good thing. No longer will developers that use MS Windows as their primary OS have to borrow a mate's Mac or use an online screen grabber just to see if their site works ok in Safari. This is great news especially if you are developing a lot of AJAX and YUI based interface's which can be time consuming to debug on two different machines. So being an excited geek that I am I decided to download this beta on to the laptop I am currently using. Needless to say the installation was smooth, although having to choose if I wanted quicktime, is this really necessary???, and if i wanted to use Bonjour! was a minor niggle to me. After a quick install I fired up Safari and I must say it loaded very quickly, and I was presented with a very familiar Safari interface that trys to make your machine look more like a Mac than a PC. What struck me most was the anti-aliasing all over the GUI. I knew this is how Mac's worked but I never figured it would port to XP that well. Vista I expected would work but not XP. I can happily say it works amazingly well. In fact I'm writing this post in it, input fields look round and sexy, none of my text looks jagged its all smooth and yummy! Any how I decided to check a few of my favourite site's to see if I could spot any issues, especially JavaScript ones, but so far I haven't spotted any. Although I must admit I have only visited big mainstream sites that you would expect to work anyway. So far every site I have loaded has done so in a very quick manner and can i just say it again, anti-aliasing. Obviously a quick half an hour play doesn't really constitute a full tech grilling, and as it's only beta 3 I wouldn't recommend putting it on a machine which you wouldn't want harmed, but so far so good. A few month's ago Thom Shannon blogged about having to get a Mac or use screen grabbers to test site's, it now looks that this isn't the case. Just goto http://apple.com ;) I look forward to playing with this beta over the next few weeks and you never know, maybe Safari could still my heart and become my general web browser when I'm not developing. You never know ;)

Friday 8 June 2007

Del.icio.us Links For 08/06/2007

ubroadcast̢㢠- 8 June, 2007

An interesting internet radio startup. Could be cool, a g33ky radio station anyone?
Link: http://www.ubroadcast.com/

Lightmapper - The Code Project - JavaScript - 8 June, 2007

An interesting way to use HTML's map element and make it useful
Link: http://www.codeproject.com/jscript/Lightmapper.asp

Thursday 7 June 2007

Del.icio.us Links For 07/06/2007

Hackday London Back Network - 7 June, 2007

Hack Day me silly :p
Link: http://hackdaylondon07.backnetwork.com/

Hackday Excitement

Well this evening has been exciting. Tonight Chris Alcock, Derek Fowler , Sunny Lum and myself got together for a pre Hack Day meeting. The purpose of which was to thrash out some idea's and possible hacks.

hack day ideas

After a good hearty takeaway and a few brew's we came up with a list of 4 possible ideas. Not a great list but some thing to start with. Now I won't go into our ideas for now however I can say it's alot harder to come up with ideas than it looks. What I think we struggled with was that as programmers, we automatically homed into the API's available, instead of looking at problems and then looking how we could use various API's to create this solution. We did make some headway though so that was good.

hackday backnetwork

Also tonight the hackday backnetwork was opened up and we got our profiles up. For now I have just put basic information up and my general avatar. All looks good so far with a basic chat facility and the seminar session list. This is where my current dilema resides, so far I know I'm going to the following sessions:
  • Yahoo! APIs: BBAuth and Yahoo! Mail
  • Yahoo! APIs: Maps, Local & Answers
  • Using the YUI Library
however i'm not sure what to do for the 13:00 - 14:00 slot, Flickr API or Pipes :S so if you have any ideas let me know! I suppose it all depends on which hack idea we go for and what will be of most use to us. At least i have a little over a week to decide ;)

Wednesday 6 June 2007

Doing the Monster Mash....

Last Friday I came across the Google Mashup Editor, after glancing at the tour I decided to request an invite hoping to be lucky enough to try it out early on in the game. I was pleased to find this morning in my mail box an acceptance onto the beta. So today i decided to have a quick play and get to grips with it. I have to say after logging in I was quite impressed. Your presented with the all too familiar "Google blue" styling as I have named it and a nice ajax'd interface which is clear and easy to use.

Initial Meanderings

The first thing i decided to was to open one of the sample projects, this gave me the chance to see how google's tags worked and how it all fits together. The editor itself is a nice online editor, line numbers, basic highlighting, save etc. My only bad comment so far is that some times when editing the editor just pauses and then catches up. I'm hoping this is just a beta issue and gets ironed out, nothing worse than typing away and then noticing you have lost a couple of lines/ Any how, after playing with the various sample projects I decided to start tinking, as I was in a rush earlier I decided to only attempt to alter the Task List project to something more suitable for my needs. My aim was to play with some rendering, remove some fields and add another so that I could organise my tasks for the day and have a task list for each project I'm working on. Needless to say this simple task was very easy, and within 20 mins I had sussed out how it all worked and how i could import style sheets, JS etc. I should mention at this point that when you test your mashup project, the editor compiles your code to check for glaringly obvious mistakes and then gives you a nice preview. Thia quick and simple step is nice and compiling doesn't seem to take any more time than saving, not in my simple testing anyway. I did spot another annoyance while testing and compiling however. I assumed, which i think is a natural assumption, that when you compile and test that your project is saved. Much like Visual Studio. However sadly this is not the case :( Guess who tested his changes and quit the app by mistake only to find they weren't saved. :( :( I also had a quick gander at the very nice taglist feature. This list all of the tags and how they can be used. It's good to see Google haven't let us down with documentation, especially when you look at the entire help section.

Putting my MashUp Out There

My next step invloved publishing my simple mashup to the world. This was exceptionally easy -> Publish. You even get to choose a name for the url. .googlemashups.com Very nice. And that really was it, once you ok the domain the mashup publishes and you can go tell all your mates about how awesome your mashup is. Whats also good is how simple it is to republish your project or if you find you have published a project with a glaringly obvious error in it you can "unplubilsh it". Sweet.

Rounding it all up

Overall so far my experience with Google Mashup Editor, all though very much early days, has been good. Apart from the two niggles I noticed earlier I haven't found any major issues and I'm looking forward to playing with it more and using multiple feeds with it. In my eyes I see Google Mashup Editor as a more programmatic version of Yahoo! Pipes. Pipes for me so far has been a bit of a let down as I havn't really been able to do alot with it, I'm hoping that ill find Google Mashup Editor more useful, and you never know I may even write myself a widget for my Google Sidebar ;) If you really feel the need to look at my basic mashup then take a trip to the New Mind Project Task Manager

Saturday 26 May 2007

Doing that mobile thing

For the last two months I have been using 3's unlimited X-Series Silver Internet package. This has allowed me to use multiple mobile applications and services. However until the last week I haven't had to solely rely on it for my daily dose of Internet goodness. Last week I was away at Cefn Lea, which is near Newtown in Mid Wales. Sadly I had no broadband Internet access so in order to pick up mail and keep up to date with all my blog's. Now I was expecting that doing this on my tiny Sony Ericsson K800i would be a bit of a drag. However I was pleasantly surprised, using the gMail Java application and Google Maps was great. These applications if you haven't tried them are very easy to use and really do add to the mobile Internet experience, using your keypad for quick access to your inbox and to compose well saves Lot's of time and emails render amazingly well on such a small screen and you still get to see Google convert and render basic attachments for your mobile pleasure. Google haven't let us mobile users down with Google Calendar mobile edition and Google Reader mobile edition either. These online applications really do work. In my opinion Google Calendar mobile is still a touch in its infant stage as when you try to add an event its always entered as the current hour's event, which doesn't help, but it does have great potential. Sadly though, even Google can not save the entire day for mobile users. Google tries to convert as many sites as possible for mobile viewing if you use their search engine, but sometimes this still doesn't work. Some sites just aren't mobile friendly, sadly i must admit that trying to use Yahoo mail was one of these, it just wasn't happy and had some odd rendering. Flickr, CricInfo, BBC just to name a few however are awesome and work really well. Flickr Mobile even allows you to upload images directly from your mobile phone, tag them and do all types of awesome things. So after a week of mobile Internet instead of broadband I have to say it's getting there. Being able to access email and basic websites on the move is now becoming far more than a fad or just for "business" people. Especially with the introduction of monthly flat rate mobile access pricing. I would expect with the introduction of flat rate access that mobile web usage should go up. This should also mean mobile web applications which are accessible should become the norm. However for this to happen developers need to ensure they either make mobile editions of there sites which will encure more development or test their sites in a mobile environment. Now I'm not sure how wide spread this will become, but I would hope at least that as the Internet becomes more accessible on a mobile device that more effort will be put into the mobile development area. If Google have a say in it, I'm sure it won't be long before most of their applications will be found as mobile apps. Here's hoping for Google Doc's on your mobile ;)

Thursday 24 May 2007

Del.icio.us Links For 24/05/2007

Tip/Trick: Using IIS7 on Vista with VS 2005 - ScottGu's Blog - 24 May, 2007

Great Post on getting VS2005 to work with IIS7
Link: http://weblogs.asp.net/scottgu/archive/2006/09/19/Tip_2F00_Trick_3A00_-Using-IIS7-on-Vista-with-VS-2005.aspx

YUI Theatre, Tech Talks and stuff - 24 May, 2007

Used for a while just never bookmarked, its all good
Link: http://developer.yahoo.com/yui/theater/

More Vista Tips - IIS 7 and Visual Studio 2005

IIS 7 Woes

Tonight I decided to carry on with Old Roan's site, I havn't touched it since I reinstalled Vista on the weekend. Everything is running pretty sweet now, even got my "New Day" office 2007 installed. All was grand. Until I resetup the old roan site in IIS7. When I tried to view the site: oldroan.mjjamesdev.mj for example I got a nice: HTTP Error 500.19 - Internal Server Error Yummy, after about 10 mins of faffing I realised that the security permissions on the folder were set to, Administrators, Creator Owner and my user only. When copying the data back to my main drive off my backup the Users group got lost. So a quick add user group with read and execute permission solved everything.

Visual Web Developer Express 2005 Woes

By default, the VS 2005 range including the express editions don't like IIS7. When you try to open a site that you have running in IIS7 its says the product is not compatable. I was gutted to hear this but for the past month I have been using Vista I never really thought much about it as I know 'Orcas ' is only around the corner. However stumbled upon Scott Gu's Blog article detailing how to get it all working. Needless to say this is great and really does help :D

Tuesday 22 May 2007

Del.icio.us Links For 22/05/2007

ThickBox 3 - 22 May, 2007

ThickBox is a webpage UI dialog widget written in JavaScript on top of the jQuery library. Its function is to show a single image, multiple images, inline content, iframed content, or content served through AJAX in a hybrid modal.
Link: http://jquery.com/demo/thickbox/

Switching Domains

Just a quick post to say that this blog is moving from mjjames.blogspot.com to blog.mjjames.co.uk. Hopefully you should find this a smooth transition and probably not even notice :D

Sunday 20 May 2007

More ASP.Net Antics - using the Site Navigation with SQL

Now recently I have been building a website for a mate's mum's church. Mainly just in my spare time and have used it to learn .Net. Initially I was going to knock something together using an old PHP 5 CMS I knocked together at uni. But me being me wanted to learn .Net as it was about time I stated. Anyway I have been working on it for many a week now and it's coming along nicely, the point of this post is to discuss and share a development I made.

.Net 2's Site Map Provider

As standard ASP.Net 2's site navigation controls all use XML as there base. Now my basic CMS I have developed obviously stored everything in SQL. Which obviously isn't a simple XML file. My problem then was how do I use the navigation controls. My intital development, which left me learning a valued lesson I might add, lead me to start writing some that generated a new XML file for the site navigation as soon as the admin tool added / removed a page. As great as this was and it allowed me to learn to use XMLWriter it was a bit rubbish. Fancy having to write an XML file to the server all the time. Not an ideal solution. However shortly after this I was on the MSDN Magazines site and I found the following article this was a far better way. So I used it as it said to and low and behold the site navigation tool worked. Breadcrumbs, Nav all good. That was until I started looking at the code. Tables, no provision for selecting which pages would show up for nav customisation, no access keys for accessibility and must I say it again TABLES. So time for a MJJames customisation. The navigation control was easiest to solve as it involved making a custom control that used the SQLSiteMap datasource and then repeaters to render the navigation. My code for this will be available shortly here.

Modifying the SQLSiteMap code

The next step then adapting the SQLSiteMap datasource code. These changes involved 1) altering the SQL Stored Procedure so that instead of the SiteMap table the stored procedure used my page table and also returned the access key stored in the DB. This SP will also be found here in the code file. With the SP returning the right information it was time to customize the SQLSiteMap code to allow access key's to be inserted into the SiteMap XML being returned for use in the SiteNavigation Control. The first change was made to the initialization method. Within here I needed to add code to pull out which filter the navigation should, if any, use. The simplest way to store these would be in the web.config as this is customisable on a site per site basis. So:

sqlFilter = "";

    if (config["filter"] != null)
    {
        sqlFilter = config["filter"];
        config.Remove("filter");
    }

allows us so first set the sqlFilter to an empty string, so we don't get any nasty errors. We then query the config for the filter property. If the property isn't null then lets use it and then remove it from our config object so that we know it's used and it's not an unrecognised attribute and therefore can't break anything. With this done i decided to update
 public override SiteMapNode BuildSiteMap() 
within here the various indexes are set up for the siteMap, as I needed to another attribute another index needed to be added. So I added
                 _indexAccessKey = reader.GetOrdinal("AccessKey"); 
This then gets our AccessKey out of our recordset and were hunky dorey. Now we have the AccessKey in our index we need to use it. The method used to render / build our sitemap
    private SiteMapNode CreateSiteMapNodeFromDataReader (DbDataReader reader) 
To understand what we need to achieve in this method its worth getting to grip with what the method does. The method basically uses the indexes that were set in the BuildSiteMap method sees if there is any data in the datareader contained at he index location. If there is then we use it, if not we don't. Within here we need to pull out the data contained within the datareader that relates to our access key and then store it some how in the xml sitemap node. So the code for this little section takes on the form
 string accesskey = reader.IsDBNull(_indexAccessKey) ? null : reader.GetString(_indexAccessKey).Trim(); 
The next issue, as I hinted upon, was how do we get this data into our sitemap node. When I looked at the schema for the sitemap navigation, Web.sitemap XML schema, Microsoft talk about being able to store custom attributes as Named Value Pairs. This is exactly what I needed to do for accesskey's so i then created a namedvaluecolelction and added the accesskey to it.
        NameValueCollection attributes = new NameValueCollection();
    attributes.Add("AccessKey", accesskey); 
It's worth noting here that you could potentially add any other name value attributes here, so if you need to include any extra information into your navigation simply add it to this attributes collection using
 attributes.add()
The final step I took was to then update the insert sitemap node command to include the attributes collection, thus giving:
 SiteMapNode node = new SiteMapNode(this, id.ToString(), url, title, description, rolelist, attributes, null, null); 
. And that was it, the SQLSiteMapProvider now included accesskeys. And this process can be used to add any amount of attributes as you need. Just remember to work your way through the code and take time to understand what is being done, and why. My modified SQLSiteMapProvider, stored procedure and my simple navigation control using repeaters is all bundled together here, it's released here and this work is licensed under a Creative Commons Attribution-Share Alike 3.0 License.

How many plugs does one study need...

This morning I was sat in my study and I noticed how many plugs I was actually using. By my estimates my study which is used by Hayley and myself has the following electrical appliances: 1 Tower PC, 2 LCD monitors, 1 Laptop, 3 Printers, 1 Surround set, 1 Modem, 1 Router, 1 Cordless Phone + Charging Station, 1 External HDD, 1 PDA Charger, 1 Mobile Phone Charger and 1 Free Standing Lamp. Now each of these have a plug so that means in one small study I need 15 plugs just to use everything, is it me or is that insane! Now when Hayley and I moved into our house we chose the study room as the study compared to the slightly larger spare room as it has 2 double sockets compared to just the one in the spare room. But even so it's still 1 four-way per socket. Luckily most of the appliances are low amp low drain devices otherwise this one room could end up costing me a fortune. Is it me or in this digital age shouldn't we be able to cut down on the amount of plugs needed? Surely there's a better way? For instance, a DVD Player, XBox, TV Set Top Box etc all need to plug into a TV, be this LCD, Plasma, CRT, you get the gist. Why not build into our TV's a modular power supply so that these devices along with the required audio/video connectors a simple power connector could be included. Not only would this save on all those untidy cables being everwhere but also save on the amount of plugs and unsafe multi-ways which are always overloaded. This idea could be developed for PC's, we have modular power supplys for the internal components but why not the external? LCD's use alot less power than CRT's, Printers are relatively low drain why not as well as our trusted USB connection have another power connection that can be plugged into our power supply but on the exposed side. Again less cabling, better use of cables etc. It's not like these devices would exceed the 3.2Kw of a plug socket anyway, as multi-ways cant! Anyway its an interesting idea, I wonder if we will ever see something like this. I hope so.

Friday 18 May 2007

Hack Day Baby

Just to announce its official, I'm coming to Hack Day so see you there ;)

Wednesday 16 May 2007

Tuesday 15 May 2007

When .Net and IIS Have a Lovers Tiff....

Now as I'm sure as many of you know .Net and IIS seem unseperatable nowadays, .Net powered sites are the norm, and why not its great. However there are times, like this evening, when something goes horribly wrong. IIS and .Net stop talking, and decide to be uncoropative. Why this happens, be it a software install / update, an IIS restore still manages to get past many people. Usually I find that doing a cmd prompt script fixes it and then they get back together as if nothing has happened. aspnet_regiis -i is usually enough. But tonight my virtual server wasn't having it. However after 10 mins of scratching ones head i realised the problem was that although registered .Net was not enabled, so simply run aspnet_regiis -i -enable and voila IIS and .Net are off into another honeymoon period

Monday 14 May 2007

Del.icio.us Links For 14/05/2007

d.construct 2007 conference - 14 May, 2007

information on d.construct 2007 - usability conference
Link: http://2007.dconstruct.org/

Tuesday 8 May 2007

Monday 7 May 2007

Del.icio.us Links For 07/05/2007

MSDN Article on there SqlSiteMapProvider - 7 May, 2007

MSDN's SqlSiteMapProvider and how to use it and configure caching depending on your db
Link: http://msdn.microsoft.com/msdnmag/issues/06/02/wickedcode/default.aspx

Tweaking My Del.icio.us Script

Well after running my del.icio.us script for a few months now I decided to tidy it up a touch, mainly in the form that as Blogger uses the email's title as the blog post's title there was no need to include a title in the emails body. This has been updated so now my daily del.icio.us post's wont have those horrible duplicate titles. If you want to run the script yourself then feel free to download your copy and host / run it yourself. All I ask is that you leave my comment header in the top. At some point I will tidy the code up a bit more and look into Google bookmarks.

Thursday 3 May 2007

Del.icio.us Links For 03/05/2007

Curvy Corners - 3 May, 2007

Another way to do curvy corners on your sites but you don't have access to your markup Link: http://www.curvycorners.net/usage.php

Saturday 28 April 2007

Del.icio.us Links For 28/04/2007

.Net Starter Web Site Tutorials - 28 April, 2007

Various .NEt started Site tutorials, cover a broad range of applications Link: http://asp.net/downloads/starterkits/

The Importance of Knowing Your Data

I have been developing a custom Google Calendar plugin for a site I am developing and for use in Dot Net Nuke. However for a few hours I have had myself perplexed by the fact that when I was trying to ouput and render the events title, start / end date and location all that was rendered was the title. Initially I though my code was wrong, so I compared it to Thom Shannons PocketGCalSync code, and found that I was doing it right, if only a bit different, I was choosing to loop through the times and locations collections instead of specifying to use just the root. So I was stumped. In work yesterday Chris mentioned if I was sure the data structure was correct. Now at the time I said it was. According to the gData API :

<entry>
 <id>http://www.google.com/calendar/feeds/jo@gmail.com/private-magicCookie/full/entryID</id> 
<published>2006-03-30T22:00:00.000Z</published> 
<updated>2006-03-28T05:47:31.000Z</updated> 
<category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/g/2005#event'></category> 
<title type='text'>Lunch with Darcy</title> 
<content type='text'>Lunch to discuss future plans.</content> 
<link rel='alternate' type='text/html' href='http://www.google.com/calendar/event?eid=aTJxcnNqbW9tcTJnaTE5cnMybmEwaW04bXMgbWFyY2guam9AZ21haWwuY29t' title='alternate'></link>
 <link rel='self' type='application/atom+xml' href='http://www.google.com/calendar/feeds/jo@gmail.com/private-magicCookie/full/entryID'></link> 
<author 
<name>Jo March</name>
 <email>jo@gmail.com</email> 
</author> 
<gd:transparency value='http://schemas.google.com/g/2005#event.opaque'></gd:transparency>
 <gd:eventStatus value='http://schemas.google.com/g/2005#event.confirmed'></gd:eventStatus> 
<gd:comments>
 <gd:feedLink href='http://www.google.com/calendar/feeds/jo@gmail.com/private-magicCookie/full/entryID/comments/'></gd:feedLink> 
</gd:comments> 
<gd:when startTime='2006-03-30T22:00:00.000Z' endTime='2006-03-30T23:00:00.000Z'></gd:when>
 <gd:where></gd:where> 
</entry>
So I was assuming that the nodes gd:when and gd:where existed in my stream. However this is where I was wrong, what I had failed to spot whas that in the GData API its uses examples showing the basic and full versions of the feed. So i was using my basic feed url not the full one.
Using "basic" returns a basic Atom feed without any extension elements. Using "full" returns a feed that includes all event properties
Stupid I know but now i know, and so do you. So here's to wasting time for not checking the data feed your application is actually using ;) Now this is solved I may be closer to publishing my little addon and see if i can use in in DotNetNuke

Tuesday 24 April 2007

Monday 23 April 2007

Must be the night for Blogging - iTunes & Vista

Well part three of my early encounters with Vista has lead me to quickly post about using iTunes with it. I have been using Vista for three days now and on neither day have I been able to connect to the iTunes music store and auth my music. I kept getting: "Connection attempt to Apple web site was successful. Connection attempt to iTunes Store was successful. Secure connection attempt to iTunes Store was unsuccessful. An unknown error occurred (-9808)." However tonight I decided to try and fix it, first I disabled my firewall just to check that wasn't blocking it, even though iTunes is an exception and it still err'd. I then decided to reactivate it and restart the service. Lo and behold it worked and now all my lovely iTunes purchases are back ;) So if you get this problem try restarting the Vista Firewall.

Code Snippet - Extracting Meta Descriptions

On Saturday I spent some time working on my new website, which will one day be finished, and decided that it needed to extract a Meta Description from the Database for each page, to help provide search engines with suitable descriptions. Now the easiest way is to just have a field in your database and admin / cms system for this, however when you don't want a specific description from the database it would be useful for the page to instead pull 20 words from the body text. So i decided to write myself a small function that would strip out any HTML and return a specified number of words from a string input. I have included it below with a possible use, in this case Meta Description.


   public string extractWords(string input, int wordNum)
   {
       string output = "";
       int i;
       int maxi;
       input = Regex.Replace(input, @"<[^>]*>", string.Empty);
       Array words = input.Split(new char[] {' '});
       if (words.Length < maxi =" words.Length;" maxi =" wordNum;" i =" 0;" output="" return="">
Example
       if (pageContent[0]["metadescription"].ToString() != ""){
           stringDescription = pageContent[0]["metadescription"].ToString();
       }
       else{
           stringDescription = extractWords(pageContent[0]["body"].ToString(), 20);
       }

Notice of Attendance

Just a quick post to say that tonight I discussed attending Hack Day ,17th - 18th June London, with my wife and she is fine for me to attend, so I'm all signed up and quite looking forward to attending. If you are attending drop me a comment and I'll try to say Hi.

Sunday 22 April 2007

Frolicking with Vista - 2 - How Not To Do It

So yesterday was a long day, Im way behind in doing me mates church a website and was meant to be working on that al day. However I decided to try out the new Orcas CTP. Mistake, started installing it and the .Net Framework 3.5 install failed. Not only did it fail but it corrupt my entire ASP.Net. DOH. So I could no longer code. So I tried to do repair installs on all my frameworks, but nahdah. So, I decided to get my spare HDD installed into my machine, and configured it to be my main hdd and successfully installed Vista as I thought this would be quicker than trying to fix my XP's. Now I tried to do a clean install of Vista by doing a bodge However when i tried to activate with my official key it failed and told me i had to do an upgrade from XP :( So I was gutted, I then tried to reboot into my old XP's using the bootcfg app I posted on del.icio.us the other day but they fail to load. So Im currently royally screwed. Cant get to old boots and new vista although working fine won't activate, looks like I'm going to have to format all 3 OS drives, then install XP on 2 of them and then upgrade one of those for Vista, oh the joy. At least Ill get another storage drive out of it ....

Friday 20 April 2007

Frolicking with Vista - 1

Well after waiting roughly 9-10 weeks for my Vista "free" upgrade, which actually cost me £12 handling and shipping :S It finally arrived. A nice new shinny Vista Home Premium - OEM. Now as expected this was an upgrade edition, so as with all older Windows OS' i was expecting to do a clean install and simply provide my XP media to prove i qualified for the upgrade. So after slapping another HDD in so i could triple boot, Dev1, Games and now the new Dev2 which will eventually lead to Dev1 being formatted, I started up the install process, slapped in me key and then was very nicely told that i couldn't clean install a Vista Upgrade it could only be done in an existing OS. Slap in the face number 1. So I then and rather rashly might I add, decide to get rid of me third HDD for now, as it was running off the slave IDE on the Secondary controller anyway and was installed under the cdrom, which took some fiddling. I decided to upgrade Dev1 as it was only reinstalled no more than 2 weeks ago following some tedious AMD X2 upgrade. I started this process fine, loads up, copies files in windows, all looked very pretty. Scheduled reboot so it can uncompress the Vista image and take over your old OS and guess what happens when the OS Setup kicks in. STOP: 0x0000007B Yes thats right a dreaded BSOD. Bugger was the first thing i said, and felt like cussing our mate Bill again. Slap in the face number 2. So here I am pondering what my next move is. Reboot and try it again. Reboots BSOD again. So here's to me hoping i can get the Old OS back as really its not changed anything, so i reboot and choose load previous version of windows. Luckily this then presented me with the usual choose your XP boot and I was happy again. However when ever I reboot now it trys to start installing vista again and if i forget to cancel it I get my loving BSOD. So after waiting for an age my Vista experience has been a bit crap so far. And last night I had another friendly encounter with it. I helped a guy from church setup his new laptop, printer and wireless Internet. Wireless took no more than 15mins. To then find that his brand new printer didn't come with Vista drivers was shocking. HP should be ashamed! So we then spent about 20mins downloading 180Mb Vista drivers off of the HP site. So it all worked fine once we had the drivers but it not shipping with them is, in my opinion, shocking. Any how hopefully tomorrow I will grace these bloglines with more joyful tales of my Vista experience

Wednesday 18 April 2007

Del.icio.us Links For 18/04/2007

Del.icio.us Links For 18/04/2007

VistaBootPRO - Go PRO with Windows Vista and VistaBootPRO - 18 April, 2007

Multi OS booting for Vista - the easy way
Link: http://www.vistabootpro.org/

Tuesday 17 April 2007

Del.icio.us Links For 17/04/2007

Del.icio.us Links For 17/04/2007

YUI Theater â€" John Resig, “Advancing JavaScript with Libraries” » Yahoo! User Interface Blog - 17 April, 2007

Another presentation on using Javascript and how Javascript Libraries will enhance our development lives.
Link: http://yuiblog.com/blog/2007/04/16/video-resig/

Thursday 12 April 2007

Del.icio.us Links For 12/04/2007

Del.icio.us Links For 12/04/2007

SlideShare - A Place to share & discover presentations and slideshows - 12 April, 2007

Looks like a great little site for sharing and finding powerpoints for tutorials / general information. Lots on Web Technologies
Link: http://www.slideshare.net/

HOW-TO: Debug JavaScript in Internet Explorer - 12 April, 2007

Javascript Debugging in IE - Blog Article on this to follow
Link: http://www.jonathanboutelle.com/mt/archives/2006/01/howto_debug_jav.html

Yahoo! UI Library: Graded Browser Support - 12 April, 2007

When explaining what browsers our code will work in use this document as a standard / guideline
Link: http://developer.yahoo.com/yui/articles/gbs/

Tuesday 10 April 2007

Del.icio.us Links For 10/04/2007

Del.icio.us Links For 10/04/2007

Geek to Live: Top Firefox 2 config tweaks - Lifehacker - 10 April, 2007

Just a short article with some invaluable Firefox tweaks, most are well known but it never harms to have them stored somewhere for future reference
Link: http://lifehacker.com/software/firefox-2/geek-to-live-top-firefox-2-config-tweaks-209941.php

Sunday 8 April 2007

Does anyone have a web developer to manager dictionary?

This evening I read Chris Heilmann's blog article The business case for web standards - call for wiki participation And I realised how true this is in my work place. now I haven't given any presentations in my work place on web standards, but I have had many discussions with various people about web standards and other practices. In particular I remember trying to explain a certain problem to our managing director and failed to do so in a meaningful way. In trying to portray the problem in a non developer way I ended up confusing him and made myself look a little foolish. I also do this with my wife on a regular basis and yesterday tried to explain what classes and members to her using fruit as an analogy. I failed miserably. Now why is it that us web developers and developers in general fail to convey what we mean to non developers? Especially when it means essential processes and standards are jeopardized, just because people don't understand what it's meant to mean or what it does. This leads me to think about clients and users and how we fail them by not being able to explain why our applications and their websites must conform to certain standards and behave in a certain way. As a community we need to improve our explanations of technology and standards so other people understand the need and importance of such things and why it makes our web experience better. I hope the wiki on the business case for web standards http://icant.co.uk/webstandardsforbusiness/ is the start of trying to find a better way of explaining and discussing web standards with our managers and clients.

Monday 2 April 2007

Del.icio.us Links For 02/04/2007

Del.icio.us Links For 02/04/2007

A List of common BSOD error codes and explanations - 2 April, 2007

A good list that shows common error codes for that nasty blue screen of death, also gives hints on fixing
Link: http://northtechs.com/blscreen.htm

Thursday 22 March 2007

Monday 19 March 2007

Orcas

This is the first of a couple posts I'm hoping to get finished tonight, the other two are in progress but I don't want to post them until I finish some other bits and pieces. Back to this post though. Saturday I was finally able to get all the Visual Studio Orcas downloads, and I got myself Virtual PC 2007, uncompressed the base and orcas files to give it a whirl. Now i know its CTF so you have to be patient however what I experienced yesterday was far from good :( Upon creating my new virtual machine as per the site's instructions I was presented with an error. Instead of being able to update and choose the location of my base image for the orcas machine i get the browse file window, find my file, and then click open . . . . and that's it nothign happens, you can click open as much as you want but nothing happens :( Bit of a major error as Orcas won't work without it. I then tried to load the base image. This loads up fine but could I login with the login details provided by Microsoft, hell I couldn't :( After a few searches on le Google I found that the password is actuall P@ssw0rd, not P2ssw0rd. Error 2 for Microsoft. (Error 1 was my image not wanting to update) So of course I'm now confident I can load up my virtual image just to play with Windows Server 2003 at least. Well not quite, P@ssw0rd wouldn't work either. By this point I'm pondering if I continue this venture or just give up. However not being a quitter, well often, I decided to Google my new problem. Low and behold the answer came quite quickly. Basically the Base PC image its expecting by default a US keyboard, so to get an @ you do shift + 2, I had naturally assumed that Virtual PC made this conversion for you, as that's the logical thing to do. Keyboard Mappign can't be that hard, especially as it was a Microsoft OS I was virtualizing, now armed with the solution I tried logging in again P"ssw0rd. As you can imagine I was quite happy when it logged in, however I was surprised by the fact you have to activate your windows :( very odd in my books, especially as I had disabled the network card emulation as I didn't really want Server 2003 on my network. Any how after activating the network and rebooting Windows booted fine and activated. However I still can't run orcas as the stupid orcas image wouldn't update. When I find out why I will post my solution here so other people can not be bogged down by these issues. I'm hoping to see how good orcas is one day. Probably not today though :(

Friday 16 March 2007

del.icio.us links

del.icio.us links

Links for 2007-03-15 [del.icio.us]

Posted: 16 Mar 2007 12:00 AM CDT

Thursday 15 March 2007

It's all about the del in del.icio.us

In my opinion what makes del.icio.us great is the ability to view or allow other people to view your bookmarks where ever you are. If you then put this into the blogging context then having the ability to show your bookmarks on your blog is an awesome way of publicising what you look at. Now if we take this a step further then having a daily update of links of articles, pages and tutorials that we found useful that day is mind bogglingly awesome.


Del.icio.us also thinks this is the way forward and offers (if a some what crude and unfriendly) interface for linking you del.icio.us links with your blog. However all is not strawberries and cream if you are a user of Blogger. The Blogger API doesn't seem to use the same XML-RPC interface. Meaning that del.icio.us won't talk to you blog and getting a daily blog of your links will be a pain.


I decided to come up with a way to overcome this. Bring in some PHP, Cron Job's and a hole lot of XML goodness, a touch of html email and just a hint of blogger configuration and you get the MJJames Del.icio.us blog poster :D


An Overview

Currently in alpha my PHP script takes a del.icio.us RSS feed, an email address and an optional range field and produces an email that gets sent to the specified email address.

As such it can be used for email daily, monthly or even yearly link lists to either a blog or to individuals or mailing lists.


The script works by taking the provided RSS feed and opening it as a PHP XML Source, the optional range field is then used to determine the date range of del.icio.us links to return. Currently the options are daily (default), month or year.


The date range returned is then used to loop through the del.icio.us RSS feed and pulls out any nodes that match the date criteria. These nodes are then used to generate the contents of the email. The beta version uses title, date, short description and link.


The entire email is then sent to the provided email address. Now the way this email appears on a blog is by letting your blog accept post's via email and setting up a unique email address for blog posts.


Of course with the script and blogger configured the next step is to schedule this script to run daily.


With most PHP installations running on UNIX the main way to schedule this script is to use Cron Jobs, this way we can specify to run this script daily, weekly, monthly or even yearly depending on your needs.


Now this is where I must say that I have ran into some problems. I got my Cron Job to execute my script by using /usr/bin/php -q /home/el/public_html/development/delicious/index.php


However, this doesn't allow me to specify any options for the script, so I have had to fall back to hard coded values for my feed and email. This is far from ideal and in effect renders alot of the script useless, now I was sure you could give Cron a URL with querystring parameters but it has alluded me thus far :(


Current Issues

  • The code used DOM and loops through the RSS feed using PHP to perform some logic checks, this is untidy and far from optimised code. My next version will use XPath to query the RSS feed and return the matching nodes which PHP can then render into an email
  • It doesn't do weeks. Currently you can schedule it to daily updates, monthly and yearly reminders / reading lists but there is no provision for weeks. This is mainly because at the time I couldn't be bothered to find the week's start and end date based on the day its ran. This is easily doable, I just need to get off of playing with .Net and back on to PHP for a night.
  • My issues with CRON and url's needs resolving so this script can be configured for multiple users
  • It assumes the url feed doesn't include http:// and adds this on, this should be looked for before adding
  • Currently it only handles del.icio.us feeds, the next step is to looking at how it would handle Google Bookmarks and making it work seamlessly with that.
  • It needs to be completely turned into object orientated PHP 5 code, not some functions and main code - Currently lazy code

Code

/* ====================================== MJJames - Blog Poster Alpha v 0.6 email: blogposter (at) michaeljames.me.uk ====================================== */ function loadXMLStream($input){ $xml = new DOMDocument; // We need to validate our document before refering to the id $xml->validateOnParse = true; $success = false; if ($xml->load($input)){ $success = true; } if ($success==true){ return $xml; } else{ echo "ERROR: Source Not Found"; //cronJob will email us any output - normally we don't want this but as the feed wasnt found we need an error message return "XML Source Not Found } } function makeDate($daterange){ switch (strtolower($daterange)){ //our date range field will stipulate if we return a day, week or month's worth of nodes case "day": $date = date("Y-m-d", time()); break; case "week": // needs to be added break; case "month": $date = date("Y-m", time()); break; case "year": $date = date("Y", time()); break; } return $date; } $url = "http://".$_GET["url"]; $xml = loadXMLStream($url); $range= strtolower($_GET["range"]); if ($range==""){ $range = "day"; } $date = makeDate($range); foreach ($xml->documentElement->childNodes as $links) { //if node is an element (nodeType == 1) and the name is "item" loop further if ($links->nodeType == 1 && $links->nodeName == "item") { foreach ($links->childNodes as $item) { //if node is an element and the name is "title" "link" or "description" then add to temp variables for the email if ($item->nodeName == "title" ) { $title = $item->nodeValue; } if ($item->nodeName =="link"){ $link = $item->nodeValue; } if ($item->nodeName == "description"){ $description = $item->nodeValue; } if ($item->nodeType == 1 &&amp;amp;amp;amp;amp; $item->nodeName == "dc:date" && stristr($item->nodeValue, $date)){ //if its a date node check to see if our date is in it $dates = $item->nodeValue; $output = true; //if we're here then its our date and we need to add it to our email } } } if ($output){ $email.= "

$title - ".date("j F, Y",strtotime($dates))."

$description

Link: $link

";
} $output = false; } $sendto = "".$_GET["email"]; if ($sendto == ""){ echo "email failed - no email address"; //cronJob will email us any output - normally we don't want this but as the email failed to send we should know this } else{ if ($email != ""){ //if we have content and an email address $email = "

Del.icio.us Links For ".date("d/m/Y", time())."

".$email;
$headers = 'From: blogposter@michaeljames.me.uk' . "\r\n" . 'Reply-To: blogposter@michaeljames.me.uk' . "\r\n" . 'X-Mailer: PHP/' . phpversion(). "\r\n" . 'MIME-Version: 1.0' . "\r\n" . 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; if (mail($sendto, "Del.icio.us Links For ".date("d/m/Y", time()), $email, $headers)){ } else{ echo "email failed"; //cronJob will email us any output - normally we don't want this but as the email failed to send we should know this } } } ?>