19 May 2005

It's renewal time for my RadioUserland account, and while it's been a lot of fun, and a great place to host a blog, I've decided to move all my blogging now over to my blogspot account. peterwright.blogspot.com.


See you there.

RadioUserland - so long, and thanks for all the fish.


11:54:03 AM    

  03 May 2005

Scott Mitchell has written up a great article at 4GuysFromRolla.com covering Visual Web Developer Express. The article talks about not only what the product is, but also why it is, and what it does. Most importantly of all, it also talks about why you should care.

As always with Scott's articles, this is well worth a read.


11:46:08 AM    

  02 May 2005

For those with an interest, I just updated the blogroll to reflect some of the other blogs that I read on a regular basis. There's still work to do though - my RSS Bandit subscription list is pretty huge right now.


10:35:06 AM    

I've decided to split my blog. In the past this blog has contained everything from personal opinion to technical stuff about .NET, and a whole host of other stuff besides. In addition, there's stuff that I want to talk about but this blog just doesn't seem the right place to do it. So, I've formed a new one over at peterwight.blogspot.com. This blog will keep running, but I'll only post stuff here about .NET, Microsoft and general architecture and development topics. The juicy stuff you'll find over at my blogspot blog.
10:05:34 AM    

  20 April 2005

I get really picky about my editing environments - REALLY picky. It actually made my day today when I found this link to download the Monaco font as a truetype font for Windows. I love that font. It's a really clear, plain, and smooth mono-spaced font perfect for code editing. So, now with that installed, my VS.NET editor looks like this

Ah, the soothing pastels, and the gorgeous font. I'm a happy hacker (oops, sorry, Enterprise Architect) today.


2:05:30 PM    

  19 April 2005

On a much lighter note, Google Maps is now available for the UK (but without the satellite coolness).

Get it here.

9:00:51 PM    

Let me pre-empt this with a disclaimer - "I'm not a religious person in the traditional sense. I consider myself a spiritual person, but that's between me and my inner me".

So, today white smoke rose from the Sistine Chapel to declare to the world that the Conclave had elected a new pope. Cardinal Joseph Ratzinger, who has chosen to take the name Benedict. For those that don't know where the names come from, I'll touch on that (with my limited knowledge) in a second. First up though, I have some concerns.

Ratzinger was drafted into the German army in World War II to join a "Flak", an anti aircraft unit guarding a BMW factory. So, as part of his service he took pot shots at, and no doubt downed allied aircraft. Now, fair enough, war is war, and he was drafted. BUT, I have a bit of an issue with this. Ratzinger was studying theology before the draft and then accepted the draft, presumably for fear that if he didn't he'd be punished. I don't recall any stories of Jews suddenly becoming Nazis when the SS knocked on their doors. Why on earth would a man of god then accept the call to kill other human beings. Surely someone who would later become the most holy of holy would say that he answers to a higher power, and that his God would protect him from persecution and thus no, he wouldn't engage in acts of violence against his fellow man? Just my point of view anyway.

So, moving right up to today, where did the "Benedict" bit come from? Well, our man Ratzinger is an orthodox Catholic, a traditionalist who as Cardinal speaking about violence against the gay community once said "The Church nor society at large should not be surprised when other distorted notions and practices gain ground and irrational and violent reactions increase". In short, "Yeah we know Gays etc are getting beaten up, but hey its not really a surprise - ho hum". Anyways, being an Orthodox Catholic and a staunch traditionalist (which quite a few people agree means the Catholic church is about to step back a few decades), he believes in St. Malachy's Prophecy of the Popes. 

The prophecy says that the 266th Pope (that would be the late Pope John Paul II) would be "De labore solis", or "of the solar eclipse". John Paul II was indeed born during a solar eclipse , and comes from the East, where the sun rises. Handy huh.

So, the successor to the 266th Pope must be "Gloria Olivia" - kinda translated as the Pope of peace (olive branch - noah, peace - get it). Traditional Catholics believe this Pope would be a Benedictine, hence the new name.

So, what does this all mean. Well, according to the prophecy, he is the penultimate Pope. Following Benedict XVI's successor comes this

 In persecutione extrema S.R.E. sedebit Petrus Romanus, qui pascet oves in multis tribulationibus: quibus transactis civitas septicollis diruetur, & Judex tremêdus judicabit populum suum. Finis.

Translated this is  In extreme persecution, the seat of the Holy Roman Church will be occupied by Peter the Roman, who will feed the sheep through many tribulations, at the term of which the city of seven hills will be destroyed, and the formidable Judge will judge his people. The End. So, after the next pope comes Judgement day and the second coming of Christ.

Like I said at the start, I'm not religious, so read into this what you will.

8:36:10 PM    

This is what's been on my screen for the last 3 hours (I've put it in the background so I can get on with stuff and not live up to Microsoft's slogan of "Where *DID* you want to go today?".


Apparently it's a known issue when installing, and you're supposed to give it ten minutes to finish. Well 180 minutes later I'm wondering if this is the usual Microsoft space time distortion field ("Windows XP installation will be complete in 3 minutes" --- yeah right), or whether I should just give up . I  installed C# already, but SQL Server Express screwed up because I'd missed uninstalling some component. So, I removed everything and started again hoping to get a nice proper working install. Turns out as far as my machine is concerned I can either have a failed install with bits that work, or I can have the perpetual installing dialog form a part of my windows desktop for the rest of the eternity.

Sometimes, beta software sucks. In fact, sometimes production grade software sucks too. I ran the "Ink Desktop" tool earlier from the Tablet Experience pack. It ran first time. The second time it crashed. The third time it crashed by painted my screen orange (you can see bits of it in the screen snip above), and everything I touch the orange I get a new crash dialog. Thing is, I can't find the damn process in task manager to put a virtual bullet in it's head and end my misery.

3:41:45 PM    

I just took a look at C# Express beta 2 just to make sure it didn't change massively and screw up the book I'm working on. Guess what - it did! Not a problem, you kind of expect this sort of thing when you write according to beta software, but one massive shock I got was the removal of refactorings. All you can do refactoring wise in C# Express now is "Extract Method" and rename stuff. Why why why why why why WHY?

The answer is undoubtedly a marketing thing; as you move from the express tools into the standard edition of VS 2005, then more and more towards the full enterprise architect with team system you get more and more features, but I personally feel that refactoring is as fundamental to a development environment these days as a code editor. That's an awful thing to remove. I hope Microsoft put it back before release.


12:00:41 PM    

  18 April 2005

I have a colleague here who insists on wandering over to my notebook while I'm not at my desk and typing things like "Tosser", and "You Smell" and other such assorted niceties in notepad. It's very childish. How do you cope with such childish debased pranks and slurs on your personality in the workplace?

With Shock and Awe tactics of course! Introducing the InsultMonger. Run up this little baby in Internet Explorer and you can cut and paste insults right back at the muppet all day long. Done right it soon becomes the libellous version of Carpet Bombing - I love it!


4:35:36 PM    

Here's a weird one that's been driving us nuts in the office. Microsoft don't even know an answer and prefer the "it's a bug in .NET" explanation. Well, that's not quite true - they did send through a fix, but it  didn't work - go figure!

We have an application that needs to do a Post over HTTPS to a remote server. Because it's all secure we have client side certificates in place, and the server (which isn't ours by the way) has a copy of this to verify we are who we say we are. The problem is as soon as the request stream is closed or flushed, .NET throws a fit with "Cannot access a disposed object named 'System.Net.TlsStream'". Absolutely no idea here how to get around this - any of you seen this before?



3:22:34 PM    

Far more interesting than the availability of VS2005 Beta 2 is the fact that Microsoft have now also made Beta 2 of the Express tools available here. This of course includes Visual Web Developer Express, Visual Basic Express, Visual C# Express, Visual C++ Express, Visual J# Express and SQL Server 2005 Express. You don't need an MSDN membership to download them either.



12:34:48 PM    

...compared to Blue Gene/L, anyway. There's a great story up at the BBC today on Blue Gene/L, the current computing speed record holder. The machine uses a stunning 130,000 processors running in parallel, producing 135 terraflops of raw power and a theoretical limit of 360 terraflops. Fantastic to see someone at last come out with a machine capable of running EverQuest II.


10:57:24 AM    

Michael Hyatt, a pretty vocal Tablet PC advocate and blogger, has just posted up a blog entry on why he has ditched Tablet PC and switched to the Mac. He had a number of gripes but by far the biggest was the OS - he just felt that Windows was a pain in the rear and a struggle to work with, and the Mac is better.

Interestingly this comes a few months after renowned author, and former fellow Wrox-er, Richard Grimes also publicly announced that he's had enough of Microsoft, and in particular .NET, and is dropping it for good. Even more interestingly, I had a cool chat with an MVP friend (name withheld) about the Macintosh last week. Seem's he's curious to know more about the development environment on the Mac and just what the machine is like to live with from a techie point of view. He asked me since I've recently bought another Mac (I foolishly sold all my Macs ready for the move to the States - doh), and I've been developing like crazy on it.

Do we see a trend yet? Do high profile community figures represent the crest of a significant wave for Microsoft?


Update: Rob Bushway also made a post about just how much he loves his Mac.

9:46:48 AM    

If you are one of the people lucky enough to have spent a 4 figure sum on MSDN universal, you can download Beta 2 of Visual Studio 2005 today. (Incidentally, how come the same level of developer support from Apple only costs 500 bucks and pretty much delivers the same level of content?)


9:40:41 AM    

Just read over on Rob Bushway's blog that Acer have discontinued their little C110 line of tablets.  That's pretty sad - no idea why they have done it, but I can only assume that it is in response to declining sales. The C110/111 was a neat machine. Small, light, easy to lug around, great in tablet mode. I was very fond of mine, but hearing this news today I'm glad I offloaded it on Ebay a couple of months back before the inevitable used-market price crash that's bound to happen now.


9:39:18 AM    

  14 April 2005

Nothing like a nice contentious blog headline to grab some readers is there! But seriously, it is wrong. Fundamentally wrong, and I've only just spotted it. Recently I've been doing some work of my own on the Macintosh with Objective-C and the Mac's Cocoa frameworks. I'm not going to evangelise all things Macintosh here (yet), but comparing how one framework does things with another (.NET) made me realize a fundamental flaw in the way .NET does things, particularly with Rich Windows Applications.

Martin Fowler's book "Refactoring: Improving the design of existing code" explains what refactoring is, and perhaps more importantly where to do it. Chapter 3, an essay co-written by Kent Beck, identifies code-smells, source code based symptoms of a larger problem which should ultimately lead to refactoring. If memory serves me rightly one of those "smells" talks about a case where a class is more interested in other objects than it is in itself.

Take a look at the Windows Forms Designer in .NET (which of course inherits the way it works from Visual Basic, the grandaddy of rapid user interface design tools). To build the UI of a Windows application you add a form to your object. You don't actually add a form of course; what happens is that you add a new class to the project which subclasses the .NET Form object. So far so good. Next, you drag and drop controls from the toolbox onto the form to build up the user interface. This results in instance variables getting added to the subclassed form, and code being generated to instantiate those controls at runtime and set up whatever properties you set with the property explorer. The final stage of course is to code up the events, a process which results in more code being added to the form.

Conceptually what you end up with is a subclasssed form that contains other objects, responds to messages from those objects and invariably fires messages down to yet more objects, or back to the original controls. This is a clear case when you think about it of a class not pulling it's weight and being more interested in manipulating other objects than it is in dealing with itself. If you following the refactoring book to the letter the correct way to have implemented this would be to have a mechanism where an event on a control fires a message to a controller containing all pertinent data to update a data model (the classic model view controller pattern). The form should only ever contain code that deals with the form itself, and thus is a cohesive class.

There's another problem as well. Imagine a classic form to represent a detailed view of a businesses' customer. You'd have a slew of labels on the form, as well as controls the user interacts with. The Visual Studio forms designer creates instance variables for each and every control on the form, which of course means at runtime that, other when the form initializes, you have a bunch of instance variables that are never ever used. Again, this is a classic code smell and an ideal candidate for refactoring.

So, Visual Studio is wrong yes? Well, it depends on your point of view; one mans manure is another's fertilizer and all that. Looking at in the light I did yesterday, yes it's fundamentally wrong, and to be quite frank the only Microsoft development tool that approached getting it right was Visual C++ (pre .NET). There you have an external resource file containing the forms definition with events triggering code on a separate controller. Unless you need to add specific functionality to a window to make the window behave differently to a standard one (and few people ever really need to do that), there is no need to go and create a weak object in memory populated with a stack of other relatively unused objects.

This in turn begs a question. Microsoft, over the years, have made a ton of money at simplifying development, but now there is a growing movement obsessed with code elegance, architecture and design principles. Will we ever see a day where Microsoft focussses on a tool that drives developers to implement applications using best practices? A clear model view controller implementation driven by a UI generator based on binary resource files that are "interpreted" instead of "instantiated" at runtime would appear to be the best and most elegant route to take, but that's Visual C++ which is effectively legacy, isnt it?



11:22:07 AM