Monday, July 28, 2008

Foundation of Programming eBook

  I saw this free eBook title on Channel 9 while browsing the Webcasts. It certainly isn't anything ground breaking or  revolutionary, but it is well put together and provides a refresher in a down to earth manner.

Sometimes in this field it's good to step back and look at what's going on from a different perspective. This eBook does exactly that by discussing Domain Driven Development in comparison with the Data Driven Development we've become accustomed to with .Net. The author doesn't dismiss the data driven approach, but in fact shows that in some cases it may be the right choice. At the same time he does a great job introducing Domain Driven Development in  practical way by example. 

Thursday, July 24, 2008

Sometimes it doesn't pay to help

  I recently found out that a former employer is shutting down development operations locally. The developers that worked there are hard working talented and I'd work with any of them or so I though.

My currently employer is looking to fill a couple of positions  so I passed the information on to my former co-workers since I knew they'd be looking for jobs soon. One individual, a younger mid-level programmer requested a job description and salary range which I sent along.

Now to be honest the position requires some legacy application maintenance, to be specific, some classic ASP maintenance as well as .Net development. We are in the process of moving the systems to a new architecture, but reality is we just can't "turn off" the old systems. At any rate I received a very pompous response from this developer as to how it would never work on "legacy" applications and if he didn't get to work on only new stuff we could take a hike, he wasn't interested. Ok fair enough, but for the record almost any position will require some legacy maintenance, that's just the way it is.

The response was something I'd expect from a junior developer, no actually it's a response I wouldn't tolerate from any candidate. So I'm making sure he's removed from the candidate list. It's important, especially when you are building a team, to find team players who are willing to participate in the good and the bad.  This developer is good as young developers go, but no one is worth that.

Next time this situation arises, I'll  spend more time evaluating my choices before making a recommendation.

Sunday, July 20, 2008

Follow up to Web 2.0 Portal book

Admittedly I haven't gotten very far with this title this weekend, but I've made a few observations to share. The book has a corresponding web site, that you can browse to and check out. One of the key areas so far is the "widget" framework. This framework provides the ability to add custom widgets (user controls) to the portal. After perusing the site and checking I see the follow issues.

  • All widgets use the same  header template which includes an edit link. When there is nothing to edit and the link is clicked, in some cases the widget says there's nothing to edit, in others nothing happens. This leads to a very inconsistent user experience.
  • You can drag widgets to different columns. The main area is laid out into three columns for widget display and while you can move them up and down within a container, it doesn't seem you can move them to other columns. The UI cues indicate that you can but nothing seems to happen.

Arguably these are small issues but if you're selling a book and the site is a reference, that site better be correct and provide a good user experience.

As for the book, I've noted a few typo's and some discrepancies between the text and images. This is the first O'Rielly book I've purchased and so far it appears to be the last. When I purchase a professional development book, I expect the quality to be good.

Friday, July 18, 2008

Building a Web 2.0 Portal with ASP.Net 3.5

I've never been a big fan of the O'Reilly series, but I thought this title might be an interesting read. The book takes a look at building portals with a mix of the latest .Net 3.5 offerings including AJAX, Workflow Foundation and LINQ. One thing that seems to missing from the list though is Windows Communication Foundation. The book is fairly light weighing in at around 290 pages including index. By the standards of the other books I've read lately that's pretty light, maybe I can finish it in a couple of days. I'll post additional thoughts once I complete it.

Sunday, July 13, 2008

SQL 2008 in August

Just saw that SQL 2008 will ship in August at the ISV Developer Evangelism Team Blog. That is really good news given the new geo spatial features, no ISS reporting services and all the other new and enhanced features in this release. I would expect then that we may see the final release of  VS2008 SP1 around the same time. I hope that they can iron out the installations issues that have been experienced by many, including myself.

I'm also looking forward to the new WPF controls, specifically the ribbon toolbar and data grid that where supposed to be available shortly after the release of SP1 beta 1, but have yet to materialize.

Saturday, July 12, 2008

Read RSS with LINQ to XML


I'm sure this has been posted somewhere before, but all a quick google turned up was how to read RSS into a data set. So here is a simple way to read RSS using LINQ


First an object to hold the results:


using System;

public class RssItem
public string Title { get; set; }

public string Link { get; set; }

public string Description { get; set; }

This is really just a simple object no smoke and mirrors, probably could be a simple struct as well.
And the code to read the RSS and populate or object

public static List<RssItem> ImportRSS(string source)
XDocument doc = XDocument.Load(source,LoadOptions.None);

return (from i in doc.Descendants("channel").Elements("item")
select new RssItem()
Title = i.Element("title").Value,
Link = i.Element("link").Value,
Description = i.Element("description").Value

This just loads the RSS into an XDocument object and then we query the descendants to find the items. We place those into the RssItem and return them as a list by using the ToList extension.

And there you have it no more data set.

Thursday, July 3, 2008

The eternal debate continues

If you program on the Microsoft stack and unless you live in a cave or just woke from a coma you've surely heard of or even been part of the VB vs C# debate. Visual Studio Magazine has recently rekindled the arguments again. So I thought I'd take a few lines to reiterate my comments to the editor.

I started in development with C++ and MFC which I worked with for a bit over two years, I changed jobs and found myself doing classic asp and VB6. At the time this was pretty much the norm. When .Net was announced I was eager to learn and get onboard with all this new framework had to offer. It looked like things were going to get a lot better for VB in the .Net world and the language would evolve into a first class object oriented language. But even from the earliest days of .Net there was the rumbling of those who didn't want change or evolution. Their mantra was "the same but different". As these things go the squeaky wheel got the grease and VB retained a lot of the baggage it had been carrying around since version 1.

This to me was a sign to look elsewhere in the stack to find the evolution that would make me more productive. The search was to lead me to C#, coming from a, by this time distant C++ background, it was a fairly easy choice. It has been a choice that I have not regretted once. I will no debate the choice of language, because whether it's Java, C++, C# or VB, for many developers it's a near religious choice.

I believe the choice is black and white, evolve or wither, but as long as the "back in version 1" crowd is still making noise, VB will always remain a "could have been" contender.

Wednesday, July 2, 2008

TSQL Debugging in SQL 2008

TSQL Debugging is back in SQL Server 2008, along with intellisense  and code outlining, it's a great productivity enhancement. There at least one major difference between the debugging support in SQL 2000 and SQL 2008 that you should probably be aware of, stored procedure debugging. There is no direct way to step into a stored procedure either from the toolbar or the context menu. Debugging then becomes a two step process for stored procedures

  1. Select the procedure and script as execute
  2. Set a breakpoint on the EXEC statement
  3. Select debug from the menu
  4. When the breakpoint is hit, F11 to step into the stored procedure
  5. You can now step through the TSQL in the stored procedure

This is different then the VS 2008 stored procedure debugging support where you can select step into from the context menu. I would have though they would be pretty close in functionality since it appears that they are using much of the VS debugging functionality in SSIS.

Tuesday, July 1, 2008

SQL 2008 RC0 BIDS fails to install


I ran smack into this when installing RC0 with VS 2008 SP1 (beta). It appears that the SQL installer is looking for a product ID that is changed in SP1. There is a work around on the connect web site  in a nut shell though the solution is

  1. Go to Add/Remove Programs
  2. Select Show updates
  3. Remove VS Shell update KB945140
  4. Install SQL BIDS

The only problem I had with this approach is that the uninstall wants a path to the vs_shell.msi from the service pack install. This is typically under Local Settings\Temp\Microsoft Visual Studio 2008 SP1 (Beta) if you're asked during the uninstall.

The other way around this issue is

  1. Install VS 2008
  2. Install .Net 3.5 SP1 (beta)
  3. Install SQL 2008 RC0
  4. Install VS 2008 SP1 (beta)

This works a lot better than uninstalling the KB after the fact, given how well the uninstall's clean up after themselves. Hopefully this issue appears to be marked as fixed on the connect site and RTM should be soon since Q3 is upon us.