Welcome

This is the generic homepage (aka Aggregate Blog) for a Subtext community website. It aggregates posts from every blog installed in this server. To modify this page, edit the default.aspx page in your Subtext installation.

To learn more about the application, check out the Subtext Project Website.

Powered By:

Blog Stats

  • Blogs - 10
  • Posts - 798
  • Articles - 47
  • Comments - 328
  • Trackbacks - 3198

Bloggers (posts, last update)

Latest Posts

A Playlist for 2008

A couple of days late but there were a few CDs in Santa’s sack so here’s my track list of highlights from 2008. Not all from 2008 but I bought them then, so hey.

Guns and Roses - Chinese Democracy
It has to be said that if even one track from the unicorn that was the new GnR album was any good, then Axl Rose was going to exceed expectations. Then lo and behold, two tracks turned out to be OK. Don’t think I’ll be holding my breath for the next album though.

Gutter Twins - Bete Noire
The Gutter Twins’ Saturnalia is probably my album of 2008 - a gleaming, polished piece of melancholia from the lead men of the Afghan Whigs and the Screaming Trees. The arrangements are simple yet heartfelt and their voices aged old from years of abuse. Bete Noire in this case showcases Mark Lanegan’s almost sub bass vocals brilliantly. The link above is to a live performance in Helsinki, but you can find the album track here if you prefer.

Alps - Hallucinations
It would be easy to pull a tracklist just from the output of Type Records 2008 releases but for me, this is the highlight, a seven minute aural spliff. Dry and desert-like, the rolling bass figure is a calm anchor for the shimmering sounds the trio put over the top.

Portishead - Machine Gun
We didn’t wait quite as long for the new Portishead album as we did for “Chinese Democracy”, but the Bristolians delivered a much bigger punch than did those from Los Angeles. Ten years later, Third is a different, angrier beast from Dummy or the eponymous album but the quality control is just as high. The highly sample drum machine and pure John Carpenter breakdown towards the end (80s synth soundtracks ahoy) are a joy.

Ihsahn - Threnody
The second solo album, AngL, from Emperor’s front man was a revelation. While The Awakening was an obvious attempt to move himself away from the black metal sounds of his former band, AngL saw him not afraid to tread wheresoever he broke a path, albeit not mix-and-matching styles within individual tracks as Opeth would. Threnody comes late in the album; a calmer moment amidst a tightly focused storm.

Joe Satriani - Andalusia
I am an unashamed Joe Satriani fan and will probably remain so for a good while to come. Unlike the previous album however, the “Professor Satchafunkilus” album that appeared last year hadn’t the immediate appeal and bright songs of Super Colossal in 2006. This one required more listening to get past the standard issue with his songs that intro, verse and solo often jarred rather than flowing into each other. The final track however doesn’t have that problem. A homage to Spain in his own inimitable style, it begins with flighty flamenco guitars laying down theme and variations until his electric enters with a longform solo and more variations on a par with classics such as ‘Echo’ and ‘Slow Down Blues’.

Vangelis \ Scott Bolton - Launch Approval
Besides Ridley Scott’s Final Cut of the film and various HD box sets to accompany it, the 25th anniversary also saw the release of a 3-disc issue of the Blade Runner soundtrack comprising the original 1994 release, a second disc of more inserts from the film and a final disc comprising original music composed by Vangelis and collaborators taking inspiration from the sounds in recognition of the anniversary. For me, Launch Approval recaptures the spirit of the film the best. You can hear the police cars flying through neon-drenched snow between pillars of flame.

Slipknot - Danger Keep Away
A revelation for me this one. While they had their moments, the first two Slipknot albums were in general a bit Meh! for me and so I ignored them for a few years. Then All Hope Is Gone came out last year and by chance I saw the previous album, ‘The Subliminal Verses’ in a bargain bin and bought it for a laugh. And then got blown away by it. In a reversal of happenstance, there was but one bad track here and 13 solid tunes with the nonet confident enough not to rage through every track. Danger Keep Away closes the album, a brooding warning to be heeded.

Kingdom of Sorrow - Hear This Prayer For Her
Side projects have a tendency to imitate marmite - you either love ’em or you hate ’em. The Kingdom of Sorrow album has been a long time in gestation and while Kirk Windstein (Crowbar, Down) and Jamey Jasta (Hatebreed) have obviously been busy, this debut album is a bit of a one track pony. Listen to it from track 1, Hear This Prayer For Her, and you’re drawn into a rhythm and groove for the rest of the album but join at any other point in time and the hook is lost. Hear The Prayer then - either five or fifty minutes long. Linked is the (better) five.

Joseph Arthur - Morning Cup
By far the best find on the KEXP Song of the Day podcast, Morning Cup is a gentle greeting for a fine, warm spring day. From Arthur’s Could We Survive EP, one of four he released in 2008, for this we can forgive the facial hair borrowed from Liam Gallagher.

Fatboy Slim - Wonderful Night
The man Norm doesn’t often put a foot wrong in the Big Beat department and this three minute wonder from his Greatest Hits album is just one of many I could have chosen. Right Here Right Now is probably the best single dance track in history, but Wonderful Night is pure joy.

Mark Ronson - God Put A Smile Upon Your Face
I’m a bit late to the Mark Ronson party - the smarmy grin on Buzzcocks spoiled him for me and Lily Allen collaborations didn’t help, but I’m happy to admit that cockney girl and one other track aside (Yes, please do “Stop”) it is genuinely good. And this big band cover of Coldplay’s only upbeat tune in three albums is a great way to start the morning.

Meshuggah - Combustion 
Meshuggah have been due a good album for a couple of years and ObZen delivered in spades for the Swedish math-metallers. Harsh angular riffs, uncomfortable time signatures and drill sharp vocals characterize the sound they have delivered over several albums - like Tool but with extra hatred.

Clint Mansell - Together We Will Live Forever
Whether you know it or not, soundtracks are a true treasure trove for great music and Clint Mansell has composed several blinders since Pop Will Eat Itself broke up. This is from The Fountain.

posted @ 1/5/2009 10:16 PM by Dan Maharry

What would you like to see in the next edition of Programming ASP.NET?

With the .NET 3.5 cycle out of the way and ASP.NET 4.0 on the horizon, it's time to try and figure out a way to incorporate the many new features and techniques that have emerged \ been released into the next editions of ASP.NET books.

So then, what would you put in 'Programming ASP.NET 4.0' and what would you NOT put in it? Books are supposed to be for the programming community so here's your chance to have your say.

Feel free to add comments here or in the thread I've started on Stack Overflow about the same topic.

posted @ 12/1/2008 4:05 PM by Dan Maharry

On C#’s Newest Keyword

Finally got to see Anders Hejlsberg reveal the new features in C# 4.0 today. As expected, nothing hugely radical. But the new ‘dynamic’ keyword did inspire one thought that I shared with a couple of guys in the ask-the-experts session and Dave Remy suggested I should blog it, so I shall…

Three years ago as part of the LINQ wave of announcements for C# 3.0, Anders introduced anonymous types and this necessitated the ‘var’ keyword. Now we all know this is just a static inferred type declaration, we’re all cool with it now, but at the time there was a lot of panicking and wailing and misunderstanding about what this new ‘var’ word really meant, much of it around the fear that C# had introduced a variant type. This turned out not to be true, and the panic subsided.

Now, with the new ‘dynamic’ keyword… guess what? C# has variants. And nobody’s noticed, and nobody’s panicking.

Yet…

posted @ 10/30/2008 5:20 AM by James Hart

PDC 2008 thoughts so far

With a combination of jetlag and a persistent cough keeping me from sleeping, it seems like a pretty good moment to jot down some thoughts on the first couple of days of the 2008 Microsoft Professional Developers Conference, “the first PDC in the history of PDCs”, as Don Box said, “where Microsoft has not launched a new data access stack”.

My overall feeling about this PDC is that MS has fluffed the marketing angle really badly. There doesn’t feel like there’s a coherent story behind this PDC launch wave. MS will tell you this is the “Software + Services” PDC, but they’ve failed to convince that that’s a central driving philosophy, rather than a generic term they’ve applied to try to categorise what they’re about.

The pitch of the keynotes has felt slightly wrong, and I think the main reason for that is that so much of what could have been the big splashy announcements to get the crowd on their feet had already been announced prior to PDC. The last month has seen a whole raft of things trickle out of microsoft not with a bang but with a whimper: the Windows 7 name; the fact that MS was launching what Ballmer called an ‘OS for the Cloud’; Silverlight 2.0. Even a couple of developer crowdpleasers, like ASP.NET MVC hitting beta and the deal where MS will start shipping JQuery sneaked out via the blogosphere rather than being saved a couple of weeks for the big event.

When the ‘Azure’ name leaked out (via a Microsoft RSS feed) before the Monday morning keynote, all the wind was taken out of the sails of that keynote. It wasn’t helped by the fact that Ray Ozzie feels too corporate as a presenter to engage a dev crowd. The crux of the Azure announcement really comes down to Microsoft going into web hosting, and while the cloud provisioning model is qualitatively different to your classic rackspace offering, it doesn’t demo any differently. The point of Azure is to make scaling transparent; transparency doesn’t demo well.

And my overall impression of Azure is… well, ‘meh’. Google and Amazon offer cloud hosting platforms; now so does MS. Each has proprietary management APIs, proprietary storage, proprietary hosting APIs. Developing a system for any one of these cloud services locks you in to that vendor’s offering. I’d expected Microsoft to, well, act like Microsoft, and make a platform play. Release Azure as a platform for cloud hosting services, let third party ‘hosting partners’ take up the hosting part of the problem, and change the cloud service hosting market. I could commit to building Windows-Azure-based apps if I knew that I had competition among hosting providers, just as I am happy now to build ASP.NET web apps knowing I can go to a range of hosts to get my app out on the net. With MS as the sole provider, I can’t commit to their platform, when it could turn out to just be another .NET MyServices and disappear quietly into the sunset in 12 months. No game-changer, so… ‘meh’.

Of course, MS wanted to use the day 1 keynote to set the message that will go out in the non-specialist press about their plans; the audience for the cloud announcement was the business world looking at Microsoft’s positioning relative to Google, not the crowd in the hall. But come on, the leak of the name and the foreshadowing done by Ballmer a few weeks back, this barely deserved to be called an announcement.

Meanwhile, while I was stuck in that keynote fighting to get a slice of WiFi bandwidth and failing, out on the net, Microsoft shipped the .NET 4.0 and Visual Studio 2010 CTP, and the Oslo SDK CTP. I didn’t know about this until I got back out of the PDC keynote hall. Frankly, if Microsoft is releasing a new version of Visual Studio but not making a big deal of it in the PDC conference hall, something has gone seriously wrong. It almost feels like there was originally a different plan, but that the Azure keynote took centre stage at the last minute, too late to change the scheduled VS and Oslo releases.

Something has definitely gone wrong with the Oslo launch. Oslo incorporates a new language, new tools, and represents a new development paradigm; it’s exactly the kind of stuff you can hang a PDC on. The Oslo team have come with a ton of marketing collateral, they’ve got branding, they’ve got t-shirts, they’ve got balloons… in the Microsoft pavilion, this is a big coming out party for a big technology, but if you’re looking to learn about what MS is releasing from sitting in the keynote hall, well you wouldn’t even know about it. Even after Don Box and Chris Anderson did their keynote – they slipped in a tiny demo of IntelliPad, an Oslo tool, but it felt almost like guerrilla marketing, not part of the message they were there to sell.

Day two keynote, we got some real meat, and felt like this was more like what we expect from PDC. But still the foreshadowing announcements had stolen half the thunder. YES we got to see the first ever public demo of the Windows 7 desktop (the first EVER DEMO! Steve Jobs would’ve had us eating out of his hands…), but imagine how much bigger that presentation would’ve been if it had also been the first time MS had confirmed that the product name was Windows 7 (or even if they’d chosen a better name).

As it was, the biggest cheers Microsoft squeezed out of the PDC crowd were for demoing Windows 7 multi-monitor remote desktop, and the announcement that VS2010 was being rebuilt in WPF (and would support multiple monitors too… spotting a theme here?) – other than that, polite ripples of applause greeted a few nice features, but there was no ovation. ScottGu’s demo of customising the WPF-based VS editor was incredibly well-received (it’s always great to watch Scott throw out code on a keynote stage), though the momentum was short-lived.

With the right staging, they could have whipped up the crowd with VS2010 multitargeting support; .NET 4.0/2.0 side-by-side in process; foreshadowing Anders’ C# 4.0 announcements… And what was that tantalising ‘SilverLight running outside the browser’ hint? Was that iPlayer app they demoed really SilverLight acting like Adobe Air? did they just forget to announce that one too?

Failing to keep Azure secret enough; failing to announce Oslo; failing to announce .NET 4.0, VS 2010, C# 4.0 (a language Eric Lippert has been carefully describing as ‘a potential hypothetical future language’ for the past three years) and VB10; failing to use this as a platform to properly launch Windows 7; there’s a lot of fail in the PDC marketing machinery.

But away from the keynotes, that marketing failure doesn’t take away from the fact that MS is launching all that technology here. Real stuff is being announced during every session slot, and I’m having to catch up on the news via twitter and the blogs from the sessions I’m not in. In many ways, it feels like I’d be better informed if I wasn’t actually here on site, but that would mean missing out on the chance to meet up and talk to the teams and get some real insight. I had a great catch up with Jeff King, who’s the guy behind the JQuery intellisense file you can now get hold of; he showed me a few cool new capabilities coming up in VS JavaScript intellisense capability. I also had some great opportunities to chat with guys from the Oslo group, to see how their tools fit with my apps. I’m looking forward to more of the same today, especially tonight at the Ask the Experts session. I’ll also be trying to take in the repeat of Anders’ C# 4.0 talk.

So I’m disappointed in Microsoft’s lack of control over the proceedings, its seeming lack of self-awareness and co-ordination. But I’m not disappointed in the tech, the content I’m seeing, or the people I’m meeting. PDC’s still worthwhile in a blog-driven age because of the connections you can make on site, and no leakage of codenames changes that.

posted @ 10/29/2008 1:57 PM by James Hart

Gallio \ MbUnit v3.0.4 Released

Jeff Brown has announced the release of Gallio \ MbUnit v3.0.4.

Today we are releasing v3.0.4 of Gallio and MbUnit.  This release incorporates many new features as well improvements for robustness.

New asserts, assertion diffs, 0rdered tests, Rollback, Repeat, ThreadedRepeat, R# 4.1, VSTS, CSUnit, TeamCity, Gallio.Ambience, clickable report links (IE/Firefox integration), and more...

Try it out!  Please be aware that there are now separate x86 and x64 installers.

Download here: http://www.gallio.org/Downloads.aspx

Documentation here: http://www.gallio.org/Docs.aspx

[...]

The whole alpha / beta thing got too confusing in the end due to scope creep so I dropped it. In any case, this release is pretty much feature-complete.

The full announcement and complete rundown of the new features can be found here on Jeff's blog. Congrats to him, Vadim, Graham and the rest of the team.

posted @ 10/17/2008 1:44 AM by Dan Maharry

MbUnit.Framework v2 Docs October CTP

Well, it's been a while and as Jeff leads Gallio into the autumn sunshine, it's time to push out a little something for those still using MbUnit v2. You may recall, back in August last year, we launched docs.mbunit.com. Regrettably, it's been quite static since then but now the monster is complete there's some progress.

Here then is a first draft of complete documentation for all the assert classes, attributes, helper and exception classes in the MbUnit.Framework namespace only as found in MbUnit v2.4. Call it the October 2008 CTP if you will.

You can download it from here on HMobius until I find somewhere stable to put it. Feel free to let me know what you think of the style, what other MbUnit namespaces you'd like documented in full either here or via the MbUnit-User group.

posted @ 10/13/2008 10:54 PM by Dan Maharry

Upcoming talk on SL and .NET

So I volunteered again for a .NET user group monthly meeting – this time I’m presenting a whole session on getting information into and out of Second Life using .NET on the server-side. If you can make it along on Saturday 27th at 12pm SLT, you may learn something about the following (agenda still to be confirmed!):


It's all about the data - storing data from SL externally, using external data in-world
                What can you store?
                What can you get in-world?
                How can you get data into and out of SL - HTTP, XML RPC.
The basics of HTTP - GET and POST
Making HTTP requests from SL
                Encoding request data correctly
                Handling a response
ASP.NET Pages and Handlers
                How to respond to data coming from SL
Using LSL to work with responses
                A brief overview of LSL lists
                Doing something fun with data
XML RPC - what is it? How can it be used?
                Walkthough of basic XML RPC code on the server
                Sending data in-world to a prim and doing something fun with it
Email – send feedback on a notecard, receive data
Future – LSL HTTP server (designed to replace XML-RPC) - still a work-in-progress
Breakout time!

 

Once I get slides and code demos ready I’ll package it all together for Saturday and make it all available after the event.

posted @ 9/23/2008 9:14 AM by Chris Hart

Expressing the Meme

Chris Hart has tagged me, so here are six random facts about me which are moderately interesting.

  1. I have, at various points, been referred to as 'Bamber', 'The Milky Bar Kid' and 'Beep', mostly in a friendly way. Sometimes not.
  2. The worst holiday I ever had was in Nice (sic). I intend one day to return and prove this was a fluke.
  3. I was, at one point, going to quit tech and become a session guitar player. It's still tempting
  4. For ten years, I helped out at the National Student Drama Festival. I still miss it.
  5. The first girl who ever kissed me was called Ruth. The first girl I wanted to kiss was called Angelique
  6. Of the schools and universities I attended, only one still exists as it was when I was there. And it ain't the university.

And, to perpetuate the meme, I tag Emma Jones, Emma Vieceli, Lou Barr, Ariana Osborne, Julia Gilbert and Vanessa Yaremchuk.

These are the rules. Should you break them, do it in an interesting fashion...

  1. Link to the person who tagged you.
  2. Post the rules on the blog.
  3. Write six random things about yourself.
  4. Tag six people at the end of your post.
  5. Let each person know they have been tagged. 
  6. Let the tagger know when your entry is up.

posted @ 9/6/2008 7:22 PM by Dan Maharry

Blog tagging

So I got blog tagged by Dana Coffey - and what does this mean? Well, I have to let the world know 6 random facts about myself. Here goes!

  1. I'm allergic to milk (diagnosed officially), and I think I'm allergic to almonds, possibly peanuts. Personally, I'd rather not test this out, so I just avoid them.
  2. I grew up with, at one time, 4 cats, a pair of lovebirds, two rabbits, and a tank of tropical fish. The fish died, Romeo killed Juliet, the rabbits tried making bunnies so we had to give one away... the cats lasted years, though.
  3. I once almost joined the RAF to be a pilot, but chickened out. Still would love to learn to get my pilots licence, and to fly a helicopter.
  4. I had ballet, tap dance, and modern stage dance lessons as a kid over around 13 years. During that time, I appeared on stage as a sailor, an icicle, a cat, and in quite a few outfits covered in sequins.
  5. Because of the dance lessons, I had real problems with my ankles as a kid, and once ended up off sport with ankle in plaster for 6 weeks. During all sports lessons, I would play on the BBC micro in the school, tinkering with BASIC programs. This may have had an impact on my chosen career.
  6. I used to go by the alias of Crustacean on several Telnet talker services (primitive chat rooms, for those of you too young to remember them) around the mid 90's, and it's because of those talkers that I ended up meeting my husband.

So, now, aren't you glad you read that? So, here are the rules:

  1. Link to the person who tagged you.
  2. Post the rules on the blog.
  3. Write six random things about yourself.
  4. Tag six people at the end of your post.
  5. Let each person know they have been tagged.
  6. Let the tagger know when your entry is up.

My victims for this are:

James Hart, Dave Sussman, Dan Maharry, Lou Barr, Kyle G, and Zain Naboulsi

posted @ 9/5/2008 1:38 AM by Chris Hart

Programming ASP.NET 3.5 Is Slated For PDC

9780596529567_cat Well, it’s been a while coming but it looks like Programming ASP.NET 3.5 will finally hit the shelves in late October just in time for this year’s PDC. Hurrah! So, to take a leaf out of John Papa’s blog, it’s time to take a few seconds out and thank those who were involved in its creation.

First off, my co-authors Jesse Liberty and Dan Hurwitz for their support and words. And to Lou Franco and Mike Pope as well for their contributions to the book. They were both timely and well received by those of us all worded out.

Second, to the reviewing team for the necessary evil of reminding the authors that their words are not the be all and end all of the subject and should never treat them as such. Especially when trying to incorporate ever-changing technology into a set of static pages. So, to Don Kiely, Eugene Osovetsky, Frank Wang, Scott Isaacs, Christy Henriksson, Kyle Beyer, and Miles Whitener my humble thanks, even if some of your comments made me want to throw the laptop in the bin because I knew you were right and it would mean writing another five or ten pages to cover the point.  Lou Franco and Mike Pope also get a second vote of thanks here because they not only provided really solid comments, they also decided to back their own comments up with words.

Next, thanks to the folks at O'Reilly. Lou Barr initially mentioned me to John Osborn as a potential co-author, so I thank her for the mention and John for getting in touch and then letting me get on with it at a pace I could manage. Brian MacDonald, Audrey Doyle and Rachel Monaghan have also been great as technical, copy and production editors respectively. I hope I'll work with them again (preferable on something smaller).

And finally, thanks to Jane for putting up with about thirteen or so months of the book-writing process.

Programming ASP.NET 3.5 is already up for pre-order on Amazon UK and Amazon US. Why not buy a copy?

posted @ 9/1/2008 10:31 PM by Dan Maharry

Catching up

I've been totally swamped with all sorts of projects recently, including hacking with OpenSim code, building a SharePoint deployment solution, building content for then hosting another fantastic event on Second Life, hosting Code Clinics on Microsoft Island every Wednesday, and watching Bob the Builder (we love BBC iPlayer).

From the recent code clinics I've had requests for some links and follow-up materials, so catching up on the past few weeks here's what I've got (it's not an exhaustive list, sorry, but I'll try to keep more notes following meetings in future!):

Data Access tricks - the Using statement

This one generated a fair bit of feedback from members who'd not discovered this extremely handy tool. With minor tweaks to your code you can ensure that data access code always closes your connections cleanly. For example:

Using conn As New SqlConnection(dsn)
  Using cmd As New SqlCommand("SELECT * FROM Employees", conn)
    conn.Open()
      Using rdr As SqlDataReader = cmd.ExecuteReader()
        While rdr.Read()
          Console.WriteLine(rdr(0))
        End While
      End Using
  End Using
End Using

And here is the C# version:

using (SqlConnection conn = new SqlConnection(dsn))
using (SqlCommand cmd = new SqlCommand("SELECT * FROM Employees", conn))
{
  conn.Open();
  using (SqlDataReader rdr = cmd.ExecuteReader())
  {
    while (rdr.Read())
       Console.WriteLine(rdr[0]);
  }
}

And it can be used for much more than just data access code too. Here's a starting resource for you:  http://msdn.microsoft.com/en-us/library/yh598w02(VS.80).aspx

 

Themes in Visual Studio

Tools - Options, in almost any flavour of Visual Studio. Head into that menu and you can customise your entire environment, showing line numbers, control how your code is formatted, and change your font styles and colours completely. Scott Hanselman's blog post on this has some great links to some dark themes for Visual Studio.

 

VS 2008 & .NET 3.5 SP1

Quite a lot of new features bundled in the latest point release - yes, the numbering system for .NET really is all over the place, since this service pack includes new features, not just bug fixes. But no, it's 3.5 SP1, not 3.6. Numbering aside, for more information, and links to the download, head here.

 

SQL Server 2008

The latest and greatest database from the MS; personally I'm interested in seeing if I can get my OpenSim database down from 1.4Gb to something more realistic with some of the new data compression wizardry! For more about new data types, new features, and the rest, head here.

 

10 Tips to Better Javascript

From the recent discussion on how to improve your JavaScript life came the following:

/* JavaScript 
    - it's not as bad as you think */
/* 10 steps to better JS Code */

var agenda = [
    'Use a proper editor and debugger',
    'Use var obsessively',
    'Understand "falsiness" and "truthiness"',
    'Learn to love object, function and array literals',
    'Grasp the symbol/string dichotomy',
    'Learn to use regexes and JS string functions',
    'Master scope and closures',
    'Don\'t try to build classes like you\'re used to',
    'Grok "this" and functions as values',
    'Use JQuery'
];

 

If you've not yet joined us for a Code Clinic on Microsoft Island, or have never even logged onto Second Life, why not give it a try? It's a great way to meet peers and learn about new and existing technology without having to leave your own home. Drop me a line if you need convincing - chris at codetorque dot com.

posted @ 8/25/2008 6:03 AM by Chris Hart

Red Gate Reflector

Well, it looks like one of the best .NET utilities out there has changed hands. Lutz Roeder, the original creator and developer of Reflector has agreed with Red Gate software (they of SQL Compare and SQL Toolkit fame) to let them continue development of it from now one. An interview with both Lutz and James Shore of Red Gate outlining the deal and what Red Gate hopes to do with Reflector can be found here on simple talk.

Red gate are quite clear that they “will continue to offer the tool for free to the community.” but don’t categorically state that they may not offer a corporate, paid-for version later down the line. As long as there’s a free version I’m not too fussed. Reflector’s new home is http://reflector.red-gate.com/

Technorati Tags: ,

posted @ 8/21/2008 10:20 AM by Dan Maharry

RadioButton Groups, Table Rows And NamingContainers

(In which AJAX-enhanced CheckBoxes become more useful than RadioButtons but inheritance saves the day, and a simple RadioButton-derived control establishes the purpose of a control's naming container)

The RadioButtonList. Very handy for inviting users to select just one item from a list although because of the screen real estate it takes up, used less and less in favour of the DropDownList. In plain HTML, the browser knows to enforce the unique selected value amongst a list of radio buttons because they all have the same value for their name attributes.

<input type="radio" name="RadioButtonList1" value="1" />
   <label for="RadioButtonList1_0">Orlando Gee</label><br />
<input type="radio" name="RadioButtonList1" value="2" />
   <label for="RadioButtonList1_1">Keith Harris</label><br />
<input type="radio" name="RadioButtonList1" value="3" />
   <label for="RadioButtonList1_2">Donna Carreras</label> 

And in ASP.NET, the RadioButtonList control lets you set the name attribute for each radio button in the list using the control's ID property. 

<asp:RadioButtonList ID="RadioButtonList1" runat="server" /> 

Alternately, you can group individual RadioButton controls together using their GroupName property.

<asp:RadioButton runat="server" ID="rbSelectUnique" GroupName="selectList" /> 

And the effect is still the same; each HTML radio button (with the same GroupName) has its name attribute set to the same value.

The Problem

The main problem with RadioButtons though is that by default you cannot span a group of them across table rows. Let's take an example, I have a sortable, pageable GridView of customers which I like, but I want to make sure the user can select only one of those customers as we go down the list. The obvious (in my mind anyway) solution is to add a template field to the GridView containing a RadioButton for each row and make the table generated by a GridView into a big radio button list by setting their GroupName attribute the same.

<asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" DataKeyNames="customerid"
    DataSourceID="SqlDataSource1">
    <Columns>
        <asp:TemplateField>
            <ItemTemplate>
                <asp:RadioButton runat="server" ID="rbSelectUnique" />
            </ItemTemplate>
        </asp:TemplateField>
        <asp:BoundField DataField="name" HeaderText="name" ReadOnly="True" SortExpression="name" />
        <asp:BoundField DataField="customerid" HeaderText="customerid" InsertVisible="False"
            ReadOnly="True" SortExpression="customerid" />
    </Columns>
</asp:GridView> 

Perfectly sensible except that because each RadioButton is dynamically added to a table row by the GridView, ASP.NET generates the name attribute of each radio button by appending the value you give it in GroupName to the internal name it generates for it when rendering the GridView. Hence we get this code for the <asp:GridView> above.

<table cellspacing="0" rules="all" border="1" id="GridView2" style="border-collapse:collapse;">
   <tr>
      <th scope="col">&nbsp;</th><th scope="col">name</th><th scope="col">customerid</th>
   </tr>
   <tr>
      <td>
         <input id="GridView2_ctl02_rbSelectUnique" type="radio" 
            name="GridView2$ctl02$rbSelectUnique" value="rbSelectUnique" />
      </td>
      <td>Orlando Gee</td><td>1</td>
   </tr>
   <tr>
      <td>
         <input id="GridView2_ctl03_rbSelectUnique" type="radio" 
            name="GridView2$ctl03$rbSelectUnique" value="rbSelectUnique" />
      </td><td>Keith Harris</td><td>2</td>
   </tr>
   <tr>
      <td>
         <input id="GridView2_ctl04_rbSelectUnique" type="radio" 
            name="GridView2$ctl04$rbSelectUnique" value="rbSelectUnique" />
      </td><td>Donna Carreras</td><td>3</td>
   </tr>
</table> 

As you can see, the radio button's name value takes the form GridView2$ctlXX$rbSelectUnique, where XX changes for each row and renders the list of the radio buttons useless. You can select them all at the same time if you wish. And it turns out that this issue is by design, according to the bug report on MS Connect.

Each row in a GridView is its own naming container so the controls' names don't collide. However, RadioButtons do not support spanning multiple naming containers and having their groupname attribute still work correctly. We will be looking at solving the RadioButton GroupName/multiple naming container issue in future versions of the product.

Or, in English, asp.net generates a unique NamingContainer for each cell in a table generated by a GridView and then uses that as a basis for all control IDs within the cell. It seems to be the only way to keep track of which events occurred where when the page posts back.  That was written in April 2005 and it hasn't been fixed in VS2008, so it's time to look at workarounds.

The Solution

If you're using AJAX already on the page, or are prepared to use it on the page, one way to get a radio button list of sorts into your GridView is to use checkboxes and a MutuallyExclusiveCheckBoxExtender in each TemplateField.

<ItemTemplate>
    <asp:CheckBox runat="server" ID="chkSelect" />
    <cc1:MutuallyExclusiveCheckBoxExtender ID="mecbe1" runat="server" 
        Key="chkSelectGroup" TargetControlID="chkSelect" />
</ItemTemplate> 

Now this works fine, but if you're trying to keep your pages lean, the additional script for each MECBE added to the page might not be so good. From a UI point of view, you might also object to having checkboxes work like radio buttons and so might your users.

Fortunately, a quick check in Visual Studio’s Object Browser reveals that the RadioButton derives from a CheckBox, so you can easily swap out one for the other. And behold your RadioButtonList is back, spanning table rows.

<ItemTemplate>
    <asp:RadioButton runat="server" ID="rbSelect" />
    <cc1:MutuallyExclusiveCheckBoxExtender ID="mecbe1" runat="server" 
        Key="rbSelectGroup" TargetControlID="rbSelect" />
</ItemTemplate> 

Not The Solution, But Good To Know

If you’re not willing to use AJAX, the issue is always with the naming container clashing with the radio button list’s name property. Perhaps an obvious solution is to use your own RadioButton Control which overrides the name attribute for the button when it is rendered. Something like this.

using System;
using System.ComponentModel;
using System.IO;
using System.Text;
using System.Text.RegularExpressions;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace TryOuts
{
    public class MyRadioButton : RadioButton
    {
        public string GroupName2
        {
            get  {
                String s = (String)ViewState["GroupName2"];
                return ((s == null) ? "" : s); }
            set { ViewState["GroupName2"] = value; }
        }

        public bool Checked
        {
            get { return base.Checked; }
            set { base.Checked = value; }
        }

        protected override void Render(HtmlTextWriter writer)
        {
            StringBuilder sb = new StringBuilder();
            StringWriter sw = new StringWriter(sb);
            HtmlTextWriter hw = new HtmlTextWriter(sw);

            base.Render(hw);

            if (String.IsNullOrEmpty(GroupName2))
            {
                writer.Write(sb.ToString());
            }
            else
            {
                string html = Regex.Replace(
                   sb.ToString(), @"name=""[\w\$]+""", 
                   String.Format("name=\"{0}\"", GroupName2));
                writer.Write(html);
            }
        }
    }
}

Now this approach works to a degree. Replacing a standard RadioButton with this control does indeed override the control’s Name property and the RadioButtons all work within the table as required.

<cc2:MyRadioButton runat="server" ID="mrbTest" GroupName2="test" />

However, do anything simple such as select a row and post back the page (by clicking a button) and you’ll see that you can’t determine which radio button has been clicked.

foreach (GridViewRow row in GridView.Rows)
{
   RadioButton rb = (RadioButton)row.FindControl("mrbTest");
   if (rb.Checked)
   {
      lblSelected.Text = row.Cells[1].Text;
   }
}

And that’s because the NamingContainers for the cells containing the RadioButtons in the table generated in the GridView can no longer identify the RadioButtons in the cells in the table. Because our custom control has overridden the name attribute for each RadioButton to “test”, ASP.NET can’t find any controls called GridView2$ctlXX$mrbTest which is what it expects them to be called and why the naming container exists in the first place. Without the naming container producing these unique names in the way it does, we can’t do useful things like iterate over the rows in a GridView and why AJAX is the way forward when it comes to this particular problem.

Now strictly speaking, it should be possible to write a HttpModule that rewrites a RadioButton’s name attribute as it is sent to the browser so it works as part of a RadioButtonList and then rewrites the name attribute back as the page is posted back so the naming container appears to still be intact. But think about it, that’s a lot of effort for a small thing. Is the AJAX-free convenience worth the hassle?

posted @ 8/14/2008 5:42 PM by Dan Maharry

Three Different Ways To Find The Currently Edited Row In A GridView

The GridView, and indeed all the other templated data bound controls, are lifeblood to an ASP.NET developer when it comes to creating websites. A little DataSource control here, a GridView there and even if it isn't exactly what you want, you've got a prototype page up and running in no time to start the real development with. Today's chores involved tweaking the contents of a GridView's EditItemTemplate so that the contents of one DropDownList (Clients) would change based on the contents of another (Roles) and should the Update button be clicked the values of both DropDownLists saved out to the database.

EditItemTemplate

The roles DropDownList always contained the same items, so it was bound to a DataSource control separate to the GridView itself and then its selected value bound to the current value for the row in the GridView. The RoleId is two-way bound to the SelectedValue of the DropDownList so clicking Update works correctly.

<EditItemTemplate>
   <asp:DropDownList runat="server" ID="ddlRolesForEditUserDialog" AutoPostBack="true"
      DataTextField="Name" DataValueField="RoleId" 
      DataSourceID="RolesDataSource" SelectedValue='<%# Bind("RoleId") %>'
      OnSelectedIndexChanged="ddlRolesForEditUserDialog_SelectedIndexChanged" />
</EditItemTemplate>

The clients DropDownList on the other hand, needed

  1. to be populated dynamically when the the GridView's row was switched to Edit mode
  2. to be populated dynamically when the choice in the roles List changed. 
  3. to be accessed when Update is clicked and the DataSource is making changes to the database.

As it turns out, each occasion used a slightly different way to find the row being edited and through that, using FindControl to access the ClientList.

In case 1, by the time a GridView's OnRowEditing event (raised when 'Edit' is clicked on the GridView) is handled, the EditItemTemplate for the row hasn't become accessible yet, so the client list can't be found. The option instead then is to handle the GridView's OnRowDataBound event at which point the EditItemTemplate has been created and the client list is accessible. The trick is to identify the row being edited is to use its RowState property. Every row on a GridView is rebound when Edit is clicked, so we can use the following.

protected void grdUsers_RowDataBound(object sender, GridViewRowEventArgs e)
{
   if ((e.Row.RowState == DataControlRowState.Edit) || 
       (e.Row.RowState == (DataControlRowState.Edit|DataControlRowState.Alternate)))
   {
      //Get the client dropdownlist
      DropDownList clientList = (DropDownList)e.Row.FindControl("ddlClients");

      //more stuff here
   }
}

In case 2, the EditItemTemplate already exists. Indeed, we're capturing an event on the roles List within a cell in the EditItemTemplate. One option to then find the client List in the cell next to it is to start with the object that raised the event, find the control that contains both it and the client List and then call FindControl.

protected void RulesList_SelectedIndexChanged(object sender, EventArgs e)
{
   //Get the roles dropdownlist
   DropDownList ddlRoles = (DropDownList)sender;

   //Get the client dropdownlist
   DropDownList clientList = 
      (DropDownList)ddlRoles.Parent.Parent.FindControl("ddlClients");

   // more stuff here
}

Or, as in Case 3, because we know the EditItemTemplate is visible, we can locate the row being edited through the GridView's EditIndex template. This returns -1 if no row is being edited or the index of a row in the GridView.

protected void usersDataSource_Updating(object sender, EventArgs e)
{
   GridViewRow row = grdUsers.Rows[grdUsers.EditIndex];
   DropDownList clientList = (DropDownList)row.FindControl("ddlClients");

   // more stuff here

}

Case 3 is the easiest way to find the currently edited row, though the other two are no less valid.

posted @ 8/5/2008 5:06 PM by Dan Maharry

JQuery VS2008 IntelliSense Update

Just a quick post to (belatedly) announce that I've updated the JQuery VS2008 IntelliSense 'Header file' and generator script. The generator supports the 'newer' style documentation XML, produces a better (more compatible) header file, and the version available on the site is now up to date for JQuery 1.2.6. You can use the script to generate headers for older versions yourself - download the zip file and replace the jquery.js and jquery-docs-xml.xml files, and then run the index.htm generator page.

You can read about the purpose and origins of this file on my original blog post.

There's been a lot of buzz since my original posting about the header file.

  • My post was linked from Scott Guthrie's blog
  • Brad Vincent posted his updated version (he tweaks some of the return types for methods that sometimes return jQuery objects to get more intellisense - I'll have to see about making that an option on the generator; at the moment it prioritises being correct, possibly at the expense of being helpful). Brad's post includes a great se tof clear instructions as to how to get up and running with the header file.
  • Brad's file featured in Scott Guthrie's later post about Visual Studio 2008 SP1 features (it was great to see 'jquery.intellisense.js' turn up in a scottgu screen capture - he commented about where he got it here).

The basic adaptations to support the newer XML format were posted on the jQuery forum by Jeffrey Kretz. I've tried to get in touch with Jeffrey about including his adaptations in my download; I've had no response, so I'm hoping that the included credit for his work is acceptable.

If you just want to download the latest JQuery 1.2.6 header file, it's here.

posted @ 8/5/2008 11:10 AM by James Hart

Is this the truth of it?

Achieving perpetual mass for any community only takes place if the underlying purpose of the community is appealing to enough users that they decide to contribute some of their cognitive surplus to its furtherance.

More of that discussion here. Discuss

posted @ 8/4/2008 9:49 PM by Dan Maharry

Enabling SSL Certificates on any Given HTTP Port

Following on from my travails with HttpListeners not working as a non-admin user, it turned out that the Cardspace samples (download them here if you're interested) had one more sticking point up their sleeve before everything worked. The main example demonstrates how a simple Security Token Service is used to verify the managed card a user wants to send to a site. However, the service is accessible only through the HTTPS protocol on port 7001 and Cardspace was unable to access it. A little digging revealed that the setup scripts for the sample tried and failed to build a copy of httpcfg, a utility found on Windows Server 2003. I didn't have the necessary files to build httpcfg successfully, bit it turns out that the netsh utility that comes with Vista and helped me out previously could also help me out here to.

The command required to add the certificate to a port with netsh is

netsh http add sslcert ipport=0.0.0.0:7001 certhash=thumbprint appid=arbitrary_guid

And the corresponding one to remove it is

netsh http delete sslcert ipport=0.0.0.0:7001

The add command needs two pieces of information besides the port number.

  • appid is an arbitrary guid to represent the application accessing the port.
  • certhash requires the certificate's thumbprint to identify it to netsh

If you've never needed to find a certificate's thumbprint before, hit Win+R and run certmgr.msc from the prompt to open the Vista Certificates MMC Viewer. (If the certificate is stored in the Local Machine certificate store rather than your own accounts store, you'll need to run certmgr.msc as an admin). The certificate should be stored in Personal\Certificates. When you find it, double-click it and select the Details tab. If you scroll the view down, you'll see Thumbprint towards the bottom of the dialog.

CertThumbprint

You'll need to copy all 20 pairs of hex digits and remove all the spaces. Given the example above then, you can add the certificate shown to port 7001 using this command.

netsh http add sslcert ipport=0.0.0.0:7001 certhash=d47de657fa4902555902cb7f0edd2ba9b05debb8 appid={C61EC2E2-BC18-4522-903B-F44A56299787}

And then you can check that all's well with this command

netsh http show sslcert

This will show you all the certificates bound to a port on your machine. netsh - the network admin's swiss army knife

posted @ 8/1/2008 11:45 AM by Dan Maharry

Enabling HttpListeners for Non-Admins

I've just started working through the Cardspace samples to learn some more about online identity layers (download them here if you're interested). The first example demonstrates a web service running on http://localhost:4123 requesting a certificate from a client. However, as a non-admin, I get the following error from Visual Studio when running the sample.

AddressAccessDeniedException was unhandled
HTTP could not register URL http://+:4123/HelloService/. Your process does not have access rights to this namespace

Coincidentally, the error is totally analogous to a similar problem I've had while trying out the CR_Documentor plug-in that Travis Illig has created and it's Travis and co that figured out both problems in hindsight. To paraphrase,

By default, only local admins have permission to listen to http prefixes. Other accounts require explicit grant using either httpcfg.exe for WinXp/2003 users or netsh for Vista/2008 users. This isn't a .net permission, it goes right to the windows urlacl level.

Just as this cardspace demo relies on port 4123 being accessible, so too does CR_Documentor rely on port 11235. The full commands to call either can be found here, explaining the various options.

Thus, to solve my cardspace problem, I needed to open a command prompt as an admin and run the following command to match the URL given in the error dialog.

netsh http add urlacl url=http://+:4123/ user=cweb\dan

And hey presto, I can continue debugging my web services as a standard user.

Thanks again to Travis and the CR_Documentor guys for figuring this one out and explaining it here. I'm just passing on the info

posted @ 7/28/2008 1:50 PM by Dan Maharry

Tutorials

Note to self, there are some good tutorials and 101s out there which should help a lot in a few areas. Make time to get through

I'm looking for a good one on Ruby and on Javascript as well. Anyone got anything good? The new Wrox First wiki on Javascript frameworks looks good, but it does cost.

posted @ 7/25/2008 9:17 AM by Dan Maharry

On Titling Programming Books

Jon Skeet (author of the truly excellent C# In Depth - I mean truly excellent, the best book I've read in the .NET sphere, bar none) blogged recently about the mess of version numbers in book titles about current versions of C# and .NET technology. He's right, Microsoft's fast-and-loose interpretation of the major/minor version number convention and its separation of language versioning from framework versioning has made a mess that's especially visible in the pages of Amazon's programming section. But I believe Jon's wrong to complain quite so much about the publishers who've elected to title books with the '2008' moniker; it may not be pedantically correct, but it's a darn sight better than most alternatives. The titling of these books is way more complicated than it looks; there are more subtle dynamics than mere precision at play here.

I've been here before, you see. Back in the days before it became a Wiley imprint, I was a kind of series-commissioning-technical-editor-cum-technical-reviewer-cum-author at Wrox Press, so I've got some experience of titling programming books in the face of pathological version numbering disasters. In particular, I cut my editorial teeth in Java books just as Sun, in their wisdom, decided to call the version of the Java platform that they shipped with version 1.2 of the SDK "Java 2". At that point, it wasn't too bad. We were able to bring out books with Java 2 in the title, and everybody could see that they were about a newer technology than those old books about Java 1.1. So far, so rosy.

Then Sun decided to release a new SDK version, 1.3. Suddenly, not so rosy. We needed to sell books that were:

  1. clearly about a newer technology than older books - the ones with Java 2 in the title - you want a punter in a bookshop with your new book, next to one of your competitor's older books, to pick your new one. "Hmm - Learn Java 2 in 123 microseconds, or Beginning JDK 1.3? I'll take the version 2 book, please!"
  2. clearly about version 1.3 of the SDK - you want punters who know they want a 1.3 book to find your book. It has to come up when they search for... whatever it is they're going to type when they search for it.

In the editorial team, we had to pick titles and convince the sales team that they could convince the book buyers in Amazon and Barnes & Noble and Borders that the title covered a new technology, would appeal to customers, and justified its place on the shelf instead of all those old books (Chainstore book buyers don't like clearing books that have a good sales history off their shelves, even if you tell them that the technology they cover is obsolete. They know that book sells; they don't trust this new book yet.)

The sales channel is a crucial part of the titling dynamic, because even more than the customer they buy based on title alone. And they shelve by title. A badly titled book will end up in the wrong bookcase entirely. A lot of early C# books wound up under 'C++', while general .NET titles ended up under 'networking' because bookstores didn't have a .NET category yet, and it looked like a networky word.

In the case of Java's 1.3 naming crisis, we tried to title books as new 'JDK 1.3 Editions' of existing Java 2 titles, which worked reasonably. The problem didn't get much better when Sun - in its wisdom - decided to title the next release 'Java 2 SDK 1.4'; My name (and part of my face) appears on a couple of differently-titled books that reflect the uncertainty that name switch caused:

Seriously. We called the technology an abbreviation of "Java Java Two Standard Edition One-Point-Four". And I stand by that - it was the right thing to do from a search optimisation and version clarity perspective, even though it was, pedantically, a mess. But it was Sun's mess. Sun's term - J2SDK 1.4 - was never going to fly in a book title for the sales channel. They knew J2SE (because J2EE titles had been such a success), they new Java, they wanted something bigger than 1.3.

Microsoft have put publishers in a similar position with .NET. In fact, they've put publishers in a worse position, by releasing .NET 3.0 with so few actual changes. Publishers updated general C# and VB.NET books to match the version number - and of course, nobody bought them. People bought WCF, WF and WPF books if they had an interest in those fields, I'm sure, but who would buy a .NET 3.0 update of a generic .NET book? Only newcomers picking up a first title, and only because the 3.0 book had obsoleted the old 2.0 one.

Then 3.5 comes along, and there are genuine changes, and for once people do want to buy books on C# and VB.NET again that cover all these new features, and... the book buyers say "A point release? You saw the sales figures for version 3.0, and that was a major update. The .NET book market is dead. You can't seriously expect us to buy new books for a point release."

Or worse, you come to them with a book claiming to be on C# 3. "Three-dot-oh is DEAD, I told you. What are you doing bringing us new books on last year's tech, when we couldn't even sell books on last year's tech last year? Come back when it's four-dot-oh and we'll talk."

Yeah, you try telling the sales guys it's C# 3 not .NET 3.0... see how well that meeting goes.

Bear in mind that these conversations with book buyers are all going on early in the pre-release cycle; books are announced and ordered six months ahead of release. And all the publishers are trying to pick the same naming convention as each other, because it's critical that if you're going to position your book as a competitor for one of the big players' books, you need to pick the same name for the technology. No book buyer will believe your Crazy C# 3 Tricks book competes with the market-leading Dull Business Applications with C# .NET 3.5 - the titles are totally different. And besides, C# 3 - that must be older than this competing .NET 3.5 book, right? Who cares if they got the title technically wrong, and you're right - what matters on the shelf - or in the search results - is that you're the same.

So what do sensible publishers do? They tie the new release books to the new Visual Studio version. Put 2008 on a book and it looks a lot sharper and more interesting to a book buyer than that tired old 2005 edition (albeit with the 'Covers .NET 3.0!' flash on the cover). You can make up for the version number chaos in the subtitle (because even though nobody reads it, it'll help with search results). So you wind up with Serious C# 2008 Edn: .NET 3.5 Development With C# 3.

Now, not all of the publishers have played this game all that well, I'll admit, and I'm far enough out of the publishing loop that I'm sure my intuitions about how the market influenced the book titles in this release cycle is a mile off the mark, but even if I'm wrong about how it works nowadays, I think it's particularly unfair to criticise them for not using C# 3 in the book titles. That was never going to fly after the .NET 3.0 release.

Still, I guess with the way computer book publishing's been going in the years since I left the industry (that's a correlation, not a causation), optimising book titles is probably a case of rearranging the deckchairs on the beachfront at Atlantis, but I just wanted to point out that in the list of people I considered when I was choosing book titles, version number pedants came pretty low down.

Probably just below the ill-informed marketing people who tried to persuade us that using non-trademarked names instead of the Official Name™ when referring to their product was somehow a trademark violation...

posted @ 7/21/2008 11:07 PM by James Hart

Latest Images

From Ebay
From General pictures
From Misc
From Me Photos
From Me Photos
From Friends
From Friends
From Friends
From Friends
From Friends
From Friends
From Friends
From Friends
From Friends
From Friends
From Friends
From Friends
From Friends
From Friends
From Friends