Vista Audio on Virtual PC 2007

If you are setting a Vista Virtual PC image up in Virtual PC 2007 you’ll soon realise that the audio doesn’t work. You’ll do a bit of Googling and find that Virtual PC 2007 has a ‘special’ audio set up just for Vista but good luck to you finding information about how you actually get it running. I eventually stumbled on the answers.

It turns out that when you install the Virtual Machine Additions, the sound drivers are copied to “C:\Program Files\Virtual Machine Additions”. They aren’t actually installed, just stuck in there. So, go to Device Manager and ‘update’ the driver, tell it you have the disk and point it to the path above.

Job done…

Litmus – Web Page and Email Testing Platform

Today I heard about the impending launch of the new incarnation of the SiteVista web page and email testing tool ‘Litmus‘. A quick email later and I got myself a shiny beta invite and took it for a spin (thanks Paul).

There are some screen shots up on the SiteVista blog which give a fair impression of the kind of thing we are talking about here. Some of the features that might not be so obvious from the screen shots are such things as test versioning, public access/collaboration control, the ability to save browser combinations, multi-user collaboration, test histories and I’m sure a whole load of other stuff that I am yet to discover in my limited noodling…

Having tried a couple of the other tools of this ilk (Browsercam, Browsershots, Browsrcamp) I would say that Litmus will definitely ‘raise the bar’ in terms of features, UI and performance.

So… keep your eye on the SiteVista blog and expect some action any day now…

Disclosure: I have worked with the gentlemen of Salted but I am a man of morals and wouldn’t post something here that I didn’t mean.

E-TextEditor V1.0 Released

E-TextEditor, the Windows text-editor inspired by and based upon the bundles for TextMate has come out of beta.

If you haven’t tried it you should give it a whirl. It is definitely the closest us, aesthetically challenged, yesterday’s news Windows users are going to get to the lofty heights of TextMate.

UPDATE: I notice the Powershell tag is pulling a fair few people into this post from Technorati but only a small proportion of visitors are actually clicking through and checking ‘E’ out. If you are searching for a Powershell editor dear reader give it a look. I think this could be the Powershell editor that people have been waiting for. Whilst there isn’t, to my knowledge at least, a Powershell bundle, there will certainly be a demand for one as this editor takes off. As the bundles are coming currently from the Mac world there obviously has been nobody interested in writing Powershell stuff on the Mac. With ‘E’ this will change and the ‘bundle’ set up is very extensible/flexible. Give it a whirl…

Beware of GMail not enforcing an SSL connection…

I’ve just been reading this: TG Daily – Point and click Gmail hacking at Black Hat (thanks for passing that on Al)

Basically, if you aren’t logging into GMail using SSL then someone can grab your cookie and replay it. Well, that is pretty obvious if you are familiar with how all that kind of thing works and of course, I only log into GMail using SSL in fact, Google enforces this. Oh… actually, now I look it doesn’t enforce it at all…

If you enter the url mail.google.com it automatically redirects you to https://mail.google.com and all is well. But if you log in and then close your browser, re-open it and enter it again it takes you straight to http://mail.google.com presumably passing the unencrypted cookie along the way.

Opening up your e-mail is not good, especially when you consider the alarming wealth of sites that still send password reminders as plain text which are all sitting in your mail archive along with those that send your full credit card number when you get an order confirmation.

GMail works perfectly well if you add the all important little ‘s’ into any of its URLs so why don’t they just enforce it and save us the bother?

Fix Jerky Scriptaculous (Script.aculo.us) Animation Effects

I was adding some BlindDown, BlindUp animation effects to something I was working on today with Scriptaculous and had a bit of an issue with jerky animation. I’ve had this before and ended up ditching them but never really investigated why sometimes they are smooth as nobody’s business and others not.

As it happened, today, I had it working nicely, made a change, and the issue arose, thus leading me to the cause.

It turns out that if you add a BlindDown or BlindUp animation to a div that has padding or a margin set in its CSS as the effect begins to execute the div jumps to the padding/margin size and then the BlindUp/BlindDown (or probably others but I haven’t investigated) works on the remaining ‘area’ of the element.

So this is jerky:

<script language="javascript" type="text/javascript">
    Effect.BlindDown("divJerky");
</script>
<div style="height:50px; padding:10px; display:none" id="divJerky">
    
</div>

The solution is this:

<script language="javascript" type="text/javascript">
    Effect.BlindDown("divJerky");
</script>
<div style="display:none" id="divJerky">
    <div style="height:50px; padding:10px">
    </div>
</div>

If you add the padding to an ‘inner’ div all is well in the world again and everything works smoothly…

I know this isn’t exactly astrophysics but it is Friday afternoon and I’ve only just realised what the issue was so I thought I’d share…

Have a good weekend 🙂

Clicking more than once may charge your credit card multiple times…

I bought some tickets from the Royal Liverpool Philharmonic Hall (that sounds like I’m all very cultured but, sorry to disappoint, they were for a pirate fancy dress party). At the checkout I was confronted with this:

buy_click_once

Jeysus… Come on. It’s the 21st century for heaven’s sake. Surely this problem has been dealt with before?

Well, yes it has. The common solution is to disable the ‘Buy’ button using JavaScript in its “onclick” handler (or change its text or some such thing). This is probably what I would have done but it has the problem that it falls over if JavaScript isn’t enabled and will incur the wrath of Uncle Dave… You could argue that those without JavaScript enabled probably number less than 10% and then only a tiny fraction of those are going to be trigger happy so it solves the problem more or less. To complement that you could provide a big red warning as above and hide it with JavaScript as the page loads. This would mean it is displayed to those without JavaScript and would be hidden from those with it. This probably fits in with the Unobtrusive JavaScript mantra.

A more meaty non JavaScript solution is to put some sort of form id into a hidden field in the form on the server side when it is first rendered and then store it when the order is first received. Then only process orders that have not already been received. This works but the problem that arises is that after the second, erroneous, click you have to deal with where the user is redirected to so you need to be able to retrieve the order using the hidden value to allow the next page, confirmation or whatever, to be properly served (I can’t use served in this context anymore without thinking of South Park). This requires a bit of thought as the order may not have been processed when the second click is ‘received’ so you may not yet have an order to work against.

So, has anyone else got any bright ideas or should those with an itchy trigger finger be left to suffer the duplicate order fate of their own making?

Classic ASP on Vista/IIS 7.0

I have a couple of classic ASP ‘applications’ that, through the ministrations of some malevolent spirit, keep landing on my desk(top) needing some new feature or other. I didn’t write them and they should have been binned long ago but, despite my protestations, they keep coming back. My work on them can only be described as ‘Turd Polishing’ which is what I would have called this post had I not been keeping an eye on relevant search engine referrals…

So today I found myself having to get classic ASP going on Vista with IIS 7.0 which, it turns out, is an art unto itself. It isn’t even installed for a kick-off, the remedy for which is to go to Control Panel/Programs and Features and then somewhere in there under the ‘Turn Windows features on or off” you’ll find…

IIS_ASP

Emboldened by success having installed the blighter I then spent far too long with everything I tried to do resulting in this…

IIS_ASP_2

…the shoddiness of which led me up the garden path thinking that the moron that had originally written the aforementioned ‘Turd’ had actually included some, albeit ropey, error handling. Don’t be fooled, turns out this is actually the new default IIS error message for script errors. Having worked that out I tracked the error down to this line:

Server.MapPath(“../db/site.mdb”)

(Yes, it uses Access too… I told you – ‘Turd’)

IIS 7.0 doesn’t allow you to use parent paths and so “..” is unacceptable.

For those of you that still have to do the occasional bit of polishing or those others of you that have a treasured bit of beautifully architected ASP 3.0 that you still care for or, heaven forfend, those who are still developing new stuff with it there is a good post on Bill Staples’s blog that will show you how to sort all of that out and get good old ASP 3.0 running on IIS 7.0 on your Vista machine.

The Intuitive Naming Awards…

I found myself needing to subtract a number of days from a date today in SQL Server. I couldn’t think what the function name was that would do this for me so I speculatively typed in DATESUBTRACT, which obviously didn’t work as there is no such function.

So, I had a shufty around the good ol’ Internet and what did I find?

The function I needed to use to subtract from a date was… yes, you guessed it…

DATEADD

I believe the American phrase ‘go figure’ would be appropriate in this instance…

Deploying Web Apps with Powershell

During my recent forays into the world of Rails I have discovered, as do most people working with Rails, the deployment tool Capistrano. For those of you unfamiliar with it, in a nutshell you end up with a simple command that deploys your application either afresh or as an update including all the database stuff etc. Very nifty (or at least it looks like it is as, being a bit of a newcomer to the leafy green world of Linux, I had a few issues but that was me not Capistrano).

In use, you check your source into Subversion and then Capistrano instructs your server to check it out onto the server and organise it all. So the code only gets onto the server when the server ASKS for it rather than when someone puts it there. This is good… Capistrano communicates via SSH and so this is all the server has to listen for. All is well…

Of course, deploying an ASP.NET app is different in that it isn’t necessarily the source that you want to deploy but the binaries. What I hadn’t considered before is to put the builds into source control as well as the source. This then allows you a central repository for the latest build that your servers can draw down from giving you the Capistrano like experience (to a point). What is missing is the SSH-esque bit.

Enter Windows PowerShell. I won’t go on as you can get a good idea of the possibilities by watching Scott Hanselman discuss Corillian’s deployment set up which is extremely impressive I might add.

While I’m about it Scott mentioned that he was after a good PowerShell editor and we had discussed the possibility of a bundle for e-texteditor although I think maybe this fell out of favour a bit as e-texteditor was quite flakey at the time. It is still in beta but much more stable now so that might be something for a budding PowerShell programmer to look into. Also, I just noticed that the new beta of PrimalScript has PowerShell support although I haven’t tried it.

‘Be’ Internet – Very Nice Indeed

I have been on the case of changing my ISP for a little while now. I have had a Pipex Business package for a few years, latterly at 2mb and haven’t had any problems to speak of. My only issue is that 2mb is the fastest service they provide to business customers and I’m seeing at least 8mb all over for the same price or less that I have been paying (£26).

So, I had a look around and spotted ‘Be’ which offers downloads of up to 24mb and uploads of 1.5mb (you can get up to 3mb up I think but I didn’t go for that)… I asked around and found that David Smalley had taken the plunge and he seemed happy enough. I signed up…

Well, today it finally arrived. All went smoothly and I only lost my connection for a couple of hours.

Be download speed

Nuff said…


RSS My Last.Fm

  • An error has occurred; the feed is probably down. Try again later.