Archive for December, 2007

Javascript explosion

December 17, 2007

I was looking at some blog today, having found a link to it on Reddit. The content was looking a bit odd, and, as most people these days don’t seem to test their websites with Javascript turned off these days, I decided to see what NoScript was protecting me from.

Javascript sources

 

LibraryThing.com
Probably some sort of widget “thing” for showing people what books you have/like
Flickr.com
Because serving images with a <img> tag is not good enough anymore
Blogger.com
Presumably he uses this as his blog host
Amazon.co.uk
For affiliate links
Bibulus.org
This was the domain the blog was on
GoogleSyndication.com
Google ads
WebStatus4u.com
As a guess, providing visitor statistics

Javascript from all these places is being pulled in for a fairly simple blog site. WordPress hasn’t quite thrown that much onto my blog here, but there is wordpress.com itself, Google Analytics, and another that seems to rank my traffic compared to other sites.

Kinda reminds of the way that everyone seems to be having a great time introducing dependency hell into all their desktop apps too.

I sometimes wonder about the privacy implications for users if visiting one site requires hits on a dozen other servers. It’s getting a bit crazy.

Advertisements

Beginning WPF

December 16, 2007

I’ve decided to start learning WPF. No real reason, I just felt like switching context for a while. I went out and bought Adam Nathan’s book Windows Presentation Foundation Unleashed, on account of all those nice reviews of it that I’ve been reading. But this isn’t about Nathan’s book – I’ve barely even started on Chapter 3 just yet.

I was going along merrily, writing up some code XAML code from the book and just running it in the browser. The first examples, about creating a button, were working just fine that way. Until I tried a bigger example, creating a simple window:
Example WPF window

When I ran that, it gave me a huge stack trace, a dump, and I’m pretty sure I saw a MD5 hash of Bill Gates’ full name in there somewhere. It’s two A4 pages of SecurityException goodness. Based on some vague memories of the cause last time I had a SecurityException, trying to run .NET code off a network drive, and from what was different in the code this time around, I figured that perhaps you couldn’t have a <Window> in a browser. In that 175-line error message, the closest thing to something useful was this:
at System.Windows.Window..ctor()

And then only because I happen to know that in .NET, a .ctor() is a constructor, so I’m figuring here that there’s an exception in the constructor for a System.Windows.Window. Really. Those other 174 lines might be useful from time to time, but would it really be unthinkable to create something that says, “The current environment lacks permissions to create a System.Windows.Window” up top. Or something like that?’

I wonder if doing it in Visual Studio .NET (2008) gives better results. One would certainly hope so.

On Windows Vista

December 15, 2007

I loved reading Coding Sanity’s review of the experience of upgrading from Windows Vista to XP.
… I notice that the Reliability Report is also gone, again a sore loss, I really enjoyed charting the downward spiral of my Vista reliability, there were those occasional humps that got you all excited, and then the graph would continue its steady sojourn downwards.

Personally, my experience with Vista was basically that something broke every time I used any shutdown option. Restart, and the monitor stopped working. Hibernate, and the thing didn’t wake up again. Log off, and it would freeze. Shut down, and the thing would stop part-way through booting, and the only way to get it working again was to go into safe mode and then restart. That magically fixed it. Eventually, safe mode stopped fixing it and I was forced to upgrade to XP myself. That computer, now back to XP, has been running flawlessly for months since.

Many people are finding things work fine on Vista. Maybe that was my mistake. I should have, I guess, gone out and bought a new computer for it, because that way presumably the OEM would have tested that model and all its drivers on Vista. But, let’s be frank, I’m not feeling any great compulsion to buy a new computer right now. This one works fine – with XP, anyway. Framerate’s just fine for the games I enjoy playing, even though it is true that they aren’t always the newest releases. Well, ok, they’re never the newest releases. I still miss Zone 66, preinstalled by the manufacturer on the old MS-DOS/Windows 3.11 computer.

There are a few things I like about Vista – the enhancements to Explorer, for example, the almost-instant search in the Start menu (Launchy, for example, is “more” instant). And it’s about time that they recognised that the Date/Time control panel is a calendar.

But it’s not enough for a computer that I can’t shutdown without a feeling of gloom and despair in the pit of my stomach. My next desktop computer will probably come with Vista preinstalled, and that will presumably work. And I’ll be happy with it, then.

Any email function is a target

December 8, 2007

I regularly post in the Joel on Software forums. The JoS forums have a very simplistic interface, but they do have allow you to send an email to a poster who has provided their email address.

The thing is, there’s nothing stopping spammers from making use of that. The forum’s presumably-quite-effective Bayesian filters (there is usually very little spam) don’t seem to check emails out, and there’s not even a CAPTCHA.

I received my first spam email through JoS about 2 months ago, but none since. Until this week.

Spam from the Joel on Software forums

I use Gmail for my email, which is usually quite good at picking out spam, but, presumably thanks to the JoS connection, these spam messages are getting through just fine.

If you are offering users an option to send emails to third parties, you should take steps to try and prevent spam. Otherwise, spammers will take advantage of your name, your service, and your bandwidth to send emails – potentially even result in you ending up being blacklisted. And not entirely unfairly.

Webflicker 0.1b2 out!

December 8, 2007

Webflicker 0.1b2 has now been released. It’s not a big upgrade, just some incremental improvements to tie it into the interface a bit better.