Automatically launching Javascript Debugger from code

I’m trying to locate a very odd javascript problem at the moment but not having much luck. However, in my browsings I have found a very useful little line which makes debugging a lot easier. If you enter the line “debugger” in your function then if you have the IE Script Debugger or the Venkman debugger installed then then will fire up when that line is executed and allow you to continue from that point onwards. Effectively you have the ability to set break points in your code, very useful I think you’ll agree.

So your code will look like this…

function foo() {
var bar=””;
debugger; //your script debugger will launch when this line executes
for (var i=0; i //Some code goes here
}
}

Technorati Tags: Show-N-Tell Thursday

MacBook Pro is not a lemon

Over at Gizmodo they have posted an article about David Ciccone who has given up on the MacBook Pro as being a lemon after some pretty awful customer service.

I realise that even here you may get the idea that the MacBook Pro is not a good machine as I have only posted about the issues I’ve had with Boot Camp recently. In reality though, Boot Camp is a beta product and I knew that when I decided to make use of it, the problems are not show stoppers and the community support has been great over at the Apple discussion boards.

Other than these problems my machine is over 3 months old now and I am really pleased with it. In fact over the last few weeks I have been doing some radical consolidation of my machines so that now I only have two (at one point there were 5!). One is the server running this site, the other is my MBP. Because of Boot Camp (even with all of it’s foibles) if I need Windows then I just reboot and the performance is more than enough for even my heavy duty development needs.

The commonly reported problems of the frayed power cords and overheating have not affected me. My old PB got hot when I used it for 8 or 9 hours straight, so does the MBP but it’s not significantly worse. Likewise I’ve not had any of the instances of squealing or moo-ing sounds coming from inside the machine.

Overall I couldn’t be happier with my purchase and I think that given the cost I would be very quick to complain. I pay a premium and therefore expect a premium product which is why David’s experience is so unfortunate. I just want to try and put the other side of the argument which is not quite so interesting but, I would guess is far more common. Happy people don’t generally make a lot of noise after all.

The lesson for the weekend

I’ve been rebuilding my machine over the weekend, the problems I had earlier in the week with the 1.1 beta of Boot Camp were not isolated so I decided to junk the partition and reinstall. I thought I’d also take the opportunity to tidy up my OS X installation as it was running out of space. For my backup procedure on the laptop I had been using the Backup software which comes with my .Mac subscription. May I offer this lesson for you… don’t use the .Mac Backup software if you actually want to be able to restore any of the data.

This is a round up of what I have learned to try and help someone else out…

If you are backing up to an external drive which is formatted using FAT or FAT32 then there is a maximum file size of 4gb so the backup is spanned across n number of files. Unfortunately it seems that if any of the files being backed up are larger than 4gb (like your Parallels installation for instance) or are large files and happen to be backed up at the point where they would be spanned across two of the backup files then the entire backup is corrupted and the Backup software won’t be able to open it up!

All is not lost however, you can open the individual backup files by right clicking on them and choosing “Show Package Contents”, in the folder which opens open Contents, then Contents again. In that folder there will be a file called backup.sparseimage. This is a disk image which, if you are lucky, you’ll be able to open and navigate as normal to look for your files. What you’ll find is that some of the backup files won’t open. As far as I can tell they are not recoverable and all data in them will be lost.

Overall I’m not impressed as I’ve lost a huge amount of data. Luckily I had another backup which I could use instead (the benefits of being anal about these things) but it took a lot longer to get at than I had planned. So all in all the whole machine rebuild took about 12 hours but at least everything is back up and lovely again.

Hopefully this will at least help someone else out there who has similar problems. I do have a call open with Apple support but they are very responsive, if I hear anything back I’ll post it here.

So… the lesson is to always check that you can restore from your backups as well as doing the actual backups!

Thanks to Julian

Continuing this weeks theme of giving credit to people out in the Notes community, I’d just like to point any developers who aren’t already aware towards Julian’s new OpenNTF project, Stubby. Finally we have an easy way of consuming web services from Notes or Domino.

A couple of years ago I went through the pain of trying to consume web services from a java agent, at the time it was pretty much impossible without hand rolling your own code, to the point that I had to write entire SOAP parsing classes myself. Even with the web service design element in ND7 it didn’t get that much easier. It was simpler to write all of the code in Rational Application Developer and then just import it into Notes. But with Stubby the process is now actually easier in Domino than in other IDEs, it must be the first time in a while that a claim like that can be made.

Looking at the source code Julian has obviously put a lot of time into this new project so please make sure you download it.

Boot Camp 1.1 Upgrade Problems

Over the weekend I took the opportunity to upgrade my Boot Camp installation on my MacBook Pro to beta version 1.1. It all seemed to go fine until I got to the office this morning when I discovered that the ethernet port had become disabled but not only in Windows, in OS X as well.

I’m still not an expert in OS X so after a bit of flailing about logged a couple of questions on the Apple Support forums. No luck there, although people are very helpful. So I went into Windows debug mode. The obvious place to start were the new drivers installed as part of the 1.1 upgrade. First of all I uninstalled them all and then disabled every piece of software that I could before reinstalling.

Looking back now I think the root of the problem may well be my firewall (which is ZoneAlarm). Obviously this is running all the time but after disabling it, reinstalling the software and rebooting into OS X everything was back up and working. I remember when I did the initial Boot Camp install that Zone Alarm caused a BSOD in XP. So the moral of the story is that you need to shut down everything, and I mean everything when doing anything with Boot Camp.

Now that it’s all up and running things are much improved with support for the iSight, better key mapping and some power saving (although the battery life is still much better under OS X than Windows). I’d say that they are one more Beta release away from a marketable product.

Update: When I booted up this morning the same problem re-appeared. Yesterday’s solution didn’t work so I got a little more aggressive and completely removed ZoneAlarm and replaced it with Norton Internet Security. This seems to have worked today but if it breaks again I’ll continue updating here.

Downtime apologies

The site crashed at 01:30 this morning and I went to work without checking it was up. A quick scan of the log and it looks like a rogue agent eat up all of my memory, this is what you get for falling asleep while playing around with new code!

It's that time of year

As Ed and Rocky have both posted, Lotusphere registration for January is now open. The early bird price has already been commented on, I think it’s $200 more than last year at $1,695 (may be wrong on that though). But the thing which struck me is that the Swan is already waitlisted. It may be worthwhile getting into the Dolphin or Yacht pretty darn quick if that is really the case.

The effect of a single reference

At lunchtime today my brother sent me an email saying that he’d managed to get a comment including a link to 50WordReview onto one of the BBC news stories about the 100 coolest websites. In fact it’s not even a real link, just the website address has been added as text so anyone reading it would need to copy and paste or manually type the url into their browser. Even so, within two hours of it being posted the traffic to the site has exceeded a normal day by tenfold, I’ve earned around 2 weeks worth of Adsense revenue (not much I can promise you!) and a load of new reviews have been posted.

To say I am stunned is a bit of an understatement, and I definitely understand a little more why the comment spammers (evil bastards though they are) do what they do. Maybe not on the small traffic sites like your average Domino blog but on the larger sites like Ed or Volker I guess the tiny percentage of click through traffic makes all of the effort worthwhile.

Update: OK so by the end of the day yesterday the site traffic was 80 times what would normally be expected, the RSS subcriptions went up by 1000% and we have had 30 new reviews. Absolutely incredible. Just have to hope that all of this stays within my bandwidth limit for the month!

Free Backup to the Internet

Following Bill’s lead I have signed up for an online backup service called Mozy. Basically they offer a free service which allows you to back up 2gb of data (perfect for a reasonably sized photo collection) or you can upgrade to a $5 per month service which gives 30gb of space (enough for my music collection). I’m going to give the free service a go for a while before taking the leap with the paid service for two reasons. I want to make sure that the site is reliable and they also don’t offer a Mac client so I’d have to port all of my music across to a Windows box somewhere.

Assuming it’s all on the level though it seems like a cracking service, well worth a look.