September 2006 Entries
I've been trying my hand at extending Community Server. The SDK and Dave Stokes' SDK installation guide are invaluable but I came upon an awkward glitch when trying to debug my first extension. Having attached the VS debugger to the web server process, and done anything in Community Server I'd get
An exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dll but was not handled in user code
Additional information: EXECUTE permission denied on object 'sp_sdidebug', database 'master', owner 'dbo'.
A quick bit of googling reveals that this isn't a uncommon but it's related to SQL debugging and I wasn't attempting to do that....
I note with some lust \ annoyance the new lab tests for Business Ultraportable laptops elsewhere on ITPro. It seems to be common knowledge that there are laptops for home users, office users, business users, silver surfers, the weak, the gamer and the third world. So why does the developer never get a laptop or indeed a desktop machine aimed specifically at them? We're the people that write the software all these other users use. So play fair. Here are my specs. Where's my cake to eat?
2GB+ for running multiple virtual PCs
...
Blogging
Syntax Highlighting with a (WLW) plugin [Patrick Steele] Not the only plugin that does this but possibly the best thus far
Building a "successful" blog… [Chris Pietschmann]
DasBlog 1.9 Released [Scott Hanselman] - finally...
A study on RSS - Part 2: The RSS format [Rafael Dohms]
The .NET Show: Windows Server "Longhorn" [Windows Server Team Blog]
Del.icio.us reports 1 million users [Techcrunch]
Book Review
Review: ASP.NET 2.0 MVP Hacks and Tips [Kevyan Nayyeri]
CodePlex
New Project:...
I've finally started trying to contribute to an open source project. In my own way. Having submitted my first changes to MbUnit's documentation wiki and with several more to make, if anyone reading this uses this doc and has suggestions or changes that need making, please log them here.
If you're less of a writer and more a code, Andrew Stopford wrote his own post last night - MbUnit and places we can improve - on areas of MbUnit that need contribution. Please help and get involved.
You gotta love Jeremy Paxman. Having given the classic weather forecast, "Sun, rain, thunder, hail, snow, cold, wind. Not worth going to work really." live on Newsnight, he's had his first go at introducing the recently introduced weekly Newsnight video podcast (which incidentally is well worth the bandwidth along with the daily audio NewsPod).
"Hello. This week scientists thrilled at the discovery of the fossilized remains of a human-like child more than three million years old unearthed in Ethiopia. It's just begun work on the Newsnight production desk. Welcome to the Newsnight video podcast, the equivalent of one of those...
You get nice surprises at the Farmer's Market every now and again. Today's was a visit from the local owl sanctuary. It's not often you get to handle a Bengal Eagle Owl called Ben. The lad in the picture is being introduced to a five month owl Tawny Owl called Zak. Lots more photos online at Flickr.
I’ve had a little time recently to look through the new features in C# 3.0 and while all new features while have their uses immeidately, its got to be extension methods that strike the first chord in the refactoring crazy world. The premise is simple. Rather than calling a static helper class on a variable, an extension method extends the base class of your variable making things that much nicer and, when VS has been updated properly, the extension method will be available in Intellisense too.
Lets take an example. Phil Haack blogged about IsNullOrEmpty() a little while ago - a simple...
Blogging
Devlicio.us lanuched [Brendan Tompkins]
Amazon and Delicious Plugins for Windows Live Writer [Scott Watermasysk]
Coding
Use StringWriter and XmlTextWriter to Generate XML Documents on Fly [Keyvan Nayyeri]
Exception Handling [Mike Diehl]
ADO.NET vNext Future Directions 1 [Paul Gielens]
ADO.NET vNext Future Directions 2 [Paul Gielens]
ADO.NET vNext Future Directions 3 [Paul Gielens]
ADO.NET vNext Future Directions 4 [Paul Gielens]
ADO.NET vNext Future Directions 5 [Paul Gielens]
Using IIS7 on...
Mike Hall has an interesting post on MSDN about the codenames for Windows CE and how they came about. Here's the key info...
at Windows CE 4.0 the o/s team and tools teams merged together to form a new, combined team - the codenames for the operating system and tools also changed at this time from trees/tools to <drumroll>Whiskeys</drumroll>
But the codename for CE 6.0 is Yamazaki! You've got 200 proper Scottish whiskies to choose from and you go Japanese. Why not Lagavulin or Caol Ila. You heathen. :)
In a blow for the art of cocking about in cars, this from the BBC
Top Gear presenter Richard Hammond remains seriously ill in hospital after a crash in a jet-powered car while filming for the BBC programme.
A hospital spokesman said: "He has seen some improvement overnight, but remains in a serious but stable condition."
Mr Hammond had been in a dragster-style car capable of reaching speeds of about 300mph at Elvington airfield near York.
The article sounds as though he'll pull through, but the problem that the BBC are now to investigate the safety of the stunt could put...
Kudos to MS UK to get Ricky Gervais and Stephen Merchant in to a couple of faux training videos for them. Find them online at
http://video.google.com/videoplay?docid=9076288729387457440
http://video.google.com/videoplay?docid=959125392868390030
It's my first day back at work after a week off house-hunting. This particular update from one of our support engineers made me smile.
"we continue to have the network from hell. I have had conversations with our customer service rep as well as calls off some of their top support people. They are talking about swapping us to a new network but whatever they do it will not be straightforward. It is currently with 5th line support which pretty much must be the level of some kind of omnipresent superhuman, either that or he has the biggest beard. I...
Scott Guthrie: Using Server Side Comments with ASP.NET 2.0
Bertrand LeRoy: Using the XmlDataSource Data property for easy samples
Scott Guthrie : Custom formatting HTML in Visual Web Developer and Visual Studio 2005
Lifehacker : Master Google Desktop Search
Jeff Prosise : 10 Common ASP.NET Pitfalls
Yasser Shohoud : Indigo speaks ATOM and RSS
The terrible hotel that inspired Fawlty Towers, the funniest TV show ever made about bad hotels, has been remade as a four-star boutique hotel.
YouTube vid showing what would happen if a big enough meteorite really did hit us
The world's biggest pinhole camera
Indian man imitates Dilbert's dad
A huge underwater volcano "as big as Rome" is discovered 40km off the southern coast of Sicily. The obvious question - how on earth did they miss it before?
...
George Carlin defines the modern man. Do you fit?
With the TDD series in full swing - any feedback out there? anyone? - some interesting TDD and coding links have been coming up recently
I have seen the light and it is called MbUnit [James Avery] : That RowTest looks very nice for valid data and database tests
Pondering TDD in Microsoft .NET, Second Edition [James Newkirk] : I wish I could say I liked James' book as much as I do NUnit or the Pragmatic Programmer one, but maybe edition two will readdress that imbalance.
The Art of Agile...
Download all the test and program code generated by the end of this article here.
This is part of a series of posts. The Preface, Part 1 and Part 2 help make sense of this post.
With a selection of schemas tested and a set of CodeDom tests established for the checks we're most likely to need in part 2, let's turn our attention to the tweaks we want to make to the generated CodeNamespace members. Here's my initial list - we could well add to it later on providing more tests are written to cover the additional code.
Change the...
It seems that Orlando Bloom, he of the / tolkien / thing and Calcium Kid fame, went to school round the corner from me and was likely in the class below. I wonder if I ever played him at football or rugby? According to imdb, he didn't start his stage fighting career until he was 16, so I might even have knocked him to the floor. Score one for me. Maybe.
Download code covering all the tests and code so far from this series here.
In the last episode, we started building our alternate to xsd.exe and wrote a set of five tests that made sure the converter worked against the smallest possible schema. We also learnt about building basic schemas programmatically. Next up, we'll look at some more basic pieces of a schema and start working in the CodeNamespace area.
Let's start with that. Xsd.exe (that comes with .NET v2.0) generates many more attributes for each class \ enum etc than did the version in .NET 1.x. Indeed, we now get
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.42")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
[System.Xml.Serialization.XmlRootAttribute(Namespace="",...
Well it's taken a while but it looks like WinFX \ .NET 3.0 is on course to make the Vista package deadline as Microsoft said it would with its first release candidate being made available to download over the weekend. Sam Gentile has more on its development and release.
Just to remind you, .NET 3.0 is actually a collection of add-on libraries for .NET 2.0 dealign with UI, comms, business workflow and a few other things beside. The .NET 3.0 home page hasn't been updated yet but the site does give a good overview of what there is to play with...
So let's lay out what we want our application to do.
Convert any number of given, connected schema files to a set of C# classes
Allow us to tweak aspects of the generated classes to suit our needs elsewhere - for example, change field, property and classnames to our own naming conventions or the way something is serialized.
Save the generated classes into a given file.
Present some sort of UI that allows us to specify what tweaks should be made.
Save...
Quite a few people have been writing about their exploits with Test-Driven Development over the past few weeks and months. Oren Ellenbogen has been writing several articles on the basics of TDD, Ron Jeffries has been TDD'ing a sudoku solver, and Scott Hanselman, Phil Haack and Roy Osherove continue to add more thoughts of their own to the subject. Roy has even started a blog on writing a book about test-driven development.
Given my attention deficient aptitude for getting distracted by something else before getting started on a project, Oren's description of TDD as 'Code little, think, code little' seems good for...