June 2006 - Posts
If you are really into the .NET language or any language for that fact you might be interested in trying to attend this event.

Here is a brief overview from the web site: “Lang .NET 2006 Symposium is a forum for discussion on programming languages, managed execution environments, compilers, multi-language libraries, and integrated development environments. This conference provides an excellent opportunity for Programming Language Implementers and Researchers from both industry and academia to meet and share their knowledge, experience, and suggestions for future research and development in the area of programming languages.”
Also check out some of the speakers:
- Anders Helsjberg
- Paul Vick
Despite them initially working, they seem to be causing some kind of problem within Community Server.
I'll see if I can't contact Ken Robertson to help me figure out what's going wrong.
FYI - when I mentioned that I was having problems getting photos from the gallery to show up and posted a link into Ken's post about Lightbox, he replied with this comment:
"Since the module was written by me and isn't directly supported by Telligent, would be easiest to just ask me the question directly. :) Can email me at ken AT qgyen DOT net.
To pull them directly from the gallery, you need to define the CSModule for the gallery mode, and then you use [photo:1234], 1234 being the PostID of the image, which you can get from the URL. IE, if the URL to view the image is http://devcow.com/photos/tech-ed_2006/picture944.aspx, then it would be [photo:944].
One of the other Telligent guys, Jim Martin created a way to add an image from the gallery using lightbox through the CS UI... have to find his module, but he has a little howto here: http://photogblogs.com/blogs/jim_martin/archive/2006/02/01/1484.aspx"
Thanks for getting back to me Ken. I'll send you some e-mail detailing my issues and when I have them all figured out I'll post the write-up here.
Basically - any post with a rel=lightbox tag is requiring a logged in user to view it. Then, once you're logged in, the Community Server engine shows me this error message: "Forum Gallery not found: 5 does not exist." When I posted a second Lightbox post to see if it was just a problem with my first post, the entire blog stopped loading. Stay tuned for more info as I have it.
Microsoft is hosting a Pub Club following the MSDN Event. Attend the event to find the location of the free food!
Register here - http://msevents.microsoft.com/cui/EventDetail.aspx?culture=en-US&EventID=1032293164
Event Overview
Session #1: Make it Simple – Language Enhancements in the .NET Framework 2.0
Simplify your coding and increase your productivity with key language enhancements in C# and Visual Basic. You’ll learn:
• How Generics offer a safer alternative to untyped collections
• Why using partial classes makes it easier to manage source code
• How to harness the benefits of anonymous C# methods and iterators
• New Visual Basic keywords and statements
Session #2: Make it Powerful – Exploring the Enterprise Library for the .NET Framework 2.0
Kick start your next .NET 2.0 project with the free, reusable Application Blocks that come with the Enterprise Library for .NET Framework 2.0. Let these blocks do the heavy lifting for you. We’ll cover:
• How to simplify your coding with Application Blocks
• Why the Application Blocks’ architecture embodies best practices
• How to extend the Application Blocks into new scenarios
Session #3: Make it Personal – Creating Customizable User Interfaces with Web Parts and ASP.NET 2.0
Get ready to add dynamic, modular, customizable portal interfaces to your ASP.NET 2.0 web site with the new Web Parts framework. It’s sophisticated and simple. We’ll explore:
• The Web Parts architecture and controls
• How to persist user customizations such as page layouts
• How to create your own ASP.NET 2.0 Web Part
Man, it was good to be back at a user group. Since I got married on April 30th, this is the first UG meeting I've actually made it to. I missed May due to travel, June only featured 2 so far and both of those I couldn't make... Anyway - it was good to see the familiar faces.
Doug Ware gave the first session. He intended this to be a group debugging effort where the people in the audience could tell him what he'd done wrong in his quick little data-binding application. However, in his attempt to recreate his issue in front of the crowd, he actually solved his own problem. Basically, when you do databinding using a binding source and binding navigator you can run into trouble linking the Save Changes button's behavior up to a row update if you do things in the wrong order. However, if you do things in the order Visual Studio expects (basically drag a database field out to the form and let VS create the binding source and navigator) then you'll be in good shape. Doug's excuse for having problems in such simple drag and drop app design - "I've been doing enterprise work for so long I never even tried this stuff before." His blog has been especially active in recent months, so everyone be sure to leave him some comments about what he should be doing with his spare time.
Shawn Wildermuth gave the second presentation. Shawn's talk was basically a survey of ADO.NET 2.0's evolution of database access functionality and some of the upcoming ADO.NExT features. Shawn will probably have his talk online soon, so I'm not going to go into too many of the specifics. Suffice it to say that Shawn thinks lots of things have been improved but there is still room for more improvement. Also - use typed DataSets and DataTables. Oh, I forgot to mention that Shawn thinks the political fracturing of Microsoft's data teams (the ASP.Net data team, the Visual Studio Data Team, and the guys responsible for the other stuff (Ok, so I forgot who did what - sue me)) is a problem because they don't talk to each other. This has resulted in things like ASP.NET not using the same ADO.NET CommandBuilders that WinForms apps use. Come on - can't we all just get along?
Additional ADO.NET links:
I have no idea why I woke up so early. It might have something to do with the bizarre dream I was having. I intended on writing about it b/c it was so strange, but then I tried to lay in bed and fall asleep again for just long enough to forget most of the details. I do remember one thing - for some reason I was speaking with an Australian accent and I was working for Microsoft in a cube farm. Other than that, I can't remember anymore. All I know is that I basically sat bolt upright at exactly 4:00 AM and thought "That's strange".
Since I couldn't sleep anymore, I wandered downstairs, posted a pair of entries on the blog, and decided to cook some food. At 5 AM I was making ceviche. I used a fillet of tilapia, 3 limes, tomatoes, onion, cilantro, salt and pepper. It looks good but has to marinate for hours. We'll see if it's any good tonight. Then I made a tray full of mini veggie quiches for breakfast. The main reason I decided on this odd combo was that they used some of the same ingredients and gave me something to do with the diced onion and cilantro I had leftover from the ceviche.
So that's how I filled my morning. Then, of course, I went to work. Which is where I am now, while typing this post (and the next one I'm about to type up).
Not normally my domain, but I ran across this super-sweet little javascript addin and couldn't resist linking to it - Lightbox. Go visit them, download the source and start making your sites image friendly.
http://www.huddletogether.com/projects/lightbox2/
This post is actually a bit late in coming - I've been sitting on these for no real reason. The photographer from the wedding has recently given Kim and I a DVD with about 500 or so digital photos. I posted a few of them up here to my personal photo gallery.
I want to thank everyone who helped make the evening as magical as it was. Among my readers that includes Brendon and Heidi, Jill and Tara, Jennifer, my parents, and of course, Kim Ranlett. Thank you!

For those of you interested in seeing more of the photos from the wedding visit our Snapfish.com gallery. Kim loves to use Snapfish because they have great image uploading software and the prints are of good quality and cheap to boot. Please keep in mind that all of these photos are raw images and have not been retouched in any way. We actually do look this good!
I'd not heard of this particular problem before I ran into it so I thought I'd share with the masses. I basically had a SQL query which took longer to run as a stored proc than as the dynamic parameterized SQL that makes up the body of the stored proc. The difference was drastic - 40 seconds for the sproc, 1 second for the dynamic parameterized SQL. As this was identical SQL run through Query Analyzer, the problem was not with the application or indexes.
The roundabout story is that we had someone do something wrong with our warehouse management application which caused our warehouse to report itself as out of storage space (in the digital world). Basically, I had to write a fix which would essentially digitally move products from over here <points left> to over there <points right>. The app screen I wrote up for this task isn't particularly interesting, but here is what it essentially has to do. Given an list of UPCs of indeterminate length, move the UPCs from their currently assigned warehouse bin to an availble bin in specified warehouse rows.
Hit the Move Items button and for each product in the list, you have to find the valid bin on the given aisle then do the transfer. This process was already supported for moving an item to a new bin, but it didn't take the aisle specification. So I added that functionality to the Get_Valid_Bin stored proc. Suddenly I was getting timeouts when I tried to call my procedure. Very strange, I didn't add much in the way of logic. To test, I extracted the contents of the stored proc into a Query Analyzer window and ran them (still parameterized). I was getting my result in 1 second or less. Run the same data through the proc and I was getting my results in 40 seconds every time. WFT!?!
I asked around for help and the first set of advice I got was that I had too many decision points inside of the query (IF tests) and that I should make the query less complex. OK - I took out the part I added and went back to the original query. My new query was GetFirstValidBin and it took the row number as a parameter. This query still contained an IF test (whether or not to search on a specific row) but it now ran in 1 second or less as a stored procedure. Whoopee! HOWEVER - the original stored proc was still running in 40 seconds and several bits of existing functionality depend on this sproc. It was back in it's original state - I'd not touched it. I don't know what happened.
So I asked around again and the next set of advice I got was that I likely had a problem with the cached estimated execution plan. See - when you make a call to a stored proc, it gets compiled by the SQL Server engine and saved for a while in case of future calls. The saved version might have used different parameter values causing the stored proc to have to do major work to get around my IF tests. I wasn't really buying this explaination b/c I was running the same query over and over in Query Analyzer, but it seemed worth a shot. I also was referred to these two SQL Parameter Sniffing forum posts online - Post1 and Post2. Both mention that the way around bad cached estimated execution plans was to remove the execution plan's dependence on the passed-in parameters. This caused me to rewrite my query - assigning passed-in parameters to local variables at the top of the procedure and all the logic below used the local variables.
That did the trick - now I get my results in 3 seconds or less. I have absolutely NO idea why the original proc, which was working fine before I changed it and restored the original version, was suddenly affected. However, this did prove to be a functional solution.
I am posting the final, working query below so that everyone can see that I'm not talking about a lot of complexity.
The other tip I heard about but did not implement was write the proc in such a way that it called sp_recompile every time it was called. This didn't sound good to me (as I've always thought avoiding unnecessary recompiles was a good thing) and I didn't have to bother with it as I got things working.
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[vm_Get_Valid_Bins]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[vm_Get_Valid_Bins]
GO
/*
PURPOSE: This returns a list of valid bins with specified capacity, in the proper dstwhno and configured
to hold the indicated AlphCfg
PARAMETERS: @AlphCfg The cfg of the item that we want
@DstWhNo The warehouse that it should be in
@Capacity How much capacity we need
@AutoAssign Y if we want an autoassign (ie.. single bin only
EXAMPLE:
EXEC vm_Get_Valid_Bins 'CD', 1, 5, 'Y'
CREATION DATE: April 10,2003
LAST MODIFICATION DATE: April 16, 2003
MODIFIFCATIONS: Added the autoassign functionality that returns only a single bin
Also added where this checks TitleCount and MaxQtyTitle as well
LAST MODIFICATION DATE: May 14, 2003
MODIFIFCATIONS: Added capability to handle warehouse in the 700 range
*/
CREATE PROCEDURE [dbo].[vm_Get_Valid_Bins]
@AlphCfg VARCHAR(2) = NULL ,
@DstWhNo INT = NULL ,
@Capacity INT = NULL ,
@AutoAssign VARCHAR(1) = NULL
AS
SET NOCOUNT ON
SET ANSI_WARNINGS OFF
DECLARE @ItemAlphCfg VARCHAR(2)
DECLARE @WarehouseNumber INTEGER
DECLARE @ItemQuantity INTEGER
DECLARE @AutoAssignFlag VARCHAR(1)
SET @ItemAlphCfg = @AlphCfg
SET @WarehouseNumber = @DstWhNo
SET @ItemQuantity = @Capacity
SET @AutoAssignFlag = @AutoAssign
-- if the warehouse is above 700 then subtract 700 to get the real warehouse
IF @WarehouseNumber > 700
SET @WarehouseNumber = @WarehouseNumber - 700
IF @AutoAssignFlag IS NULL
BEGIN
SELECT L.Bin_Num ,
ISNULL(SUM(I2.OnHnd),0) as test,
L.Capacity ,
L.Capacity - IsNull(SUM(I.OnHnd ),0) - ISNULL(SUM(I2.OnHnd), 0) AS QtyAvail,
L.MaxQtyTitle ,
L.MinQtyTitle ,
COUNT(X.UPC) AS NumTitlesInBin ,
L.TitleCount as MaxTitles
FROM BinLocations L with (nolock)
LEFT JOIN Bin_Xref X with (nolock)
ON X.Bin_Num = L.Bin_Num
LEFT JOIN ItmDstWh I with (nolock)
ON I.UPC = X.UPC AND L.DstWhNo = I.DstWhNo
LEFT JOIN ItmDstWh I2 with (nolock)
ON X.UPC = I2.UPC AND I2.DstWhNo = @WarehouseNumber + 700
LEFT JOIN BinCfg C with (nolock)
ON L.CfgType = C.BinCfgType
WHERE L.DstWhNo = @WarehouseNumber
AND CHARINDEX(@ItemAlphCfg,C.AlphaCfgs) <> 0
AND CASE L.MaxQtyTitle
WHEN 0 THEN 1
ELSE L.MaxQtyTitle - @ItemQuantity
END > 0
GROUP BY L.Bin_Num,
L.Capacity ,
L.MaxQtyTitle ,
L.MinQtyTitle ,
L.TitleCount
HAVING L.Capacity - IsNull(SUM(I.OnHnd),0) - IsNull(SUM(I2.OnHnd),0) >= @ItemQuantity
AND CASE L.TitleCount
WHEN 0 THEN 1
ELSE L.TitleCount - COUNT(X.UPC)
END > 0
AND CASE
WHEN L.MinQtyTitle = 0 THEN 1
WHEN L.MinQtyTitle <= @ItemQuantity THEN 1
ELSE 0
END > 0
ORDER BY L.Capacity, QtyAvail DESC, NumTitlesInBin, L.Bin_Num
END
ELSE -- AutoAssignFlag = 'Y' so we need a single bin
BEGIN
SELECT TOP 1 L.Bin_Num
FROM BinLocations L with (nolock)
LEFT JOIN Bin_Xref X with (nolock)
ON X.Bin_Num = L.Bin_Num
LEFT JOIN ItmDstWh I with (nolock)
ON I.UPC = X.UPC AND L.DstWhNo = I.DstWhNo
LEFT JOIN BinCfg C with (nolock)
ON L.CfgType = C.BinCfgType
LEFT JOIN ItmDstWh I2 with (nolock)
ON X.UPC = I2.UPC AND I2.DstWhNo = @WarehouseNumber + 700
WHERE L.AutoAssign <> 0
AND L.DstWhNo =@WarehouseNumber
AND CHARINDEX(@ItemAlphCfg,C.AlphaCfgs) <> 0
AND CASE L.MaxQtyTitle
WHEN 0 THEN 1
ELSE L.MaxQtyTitle - @ItemQuantity
END >0
GROUP BY L.Bin_Num,
L.Capacity ,
L.MaxQtyTitle ,
L.MinQtyTitle ,
L.TitleCount
HAVING L.Capacity - IsNull(SUM(I.OnHnd),0) - ISNULL(SUM(I2.OnHnd),0) >= @ItemQuantity
AND CASE L.TitleCount
WHEN 0 THEN 1
ELSE L.TitleCount - COUNT(X.UPC)
END > 0
AND CASE
WHEN L.MinQtyTitle = 0 THEN 1
WHEN L.MinQtyTitle <= @ItemQuantity THEN 1
ELSE 0
END > 0
ORDER BY L.Capacity, L.Capacity - IsNull(SUM(I.OnHnd), 0) - ISNULL(SUM(I2.OnHnd), 0) DESC, COUNT(X.UPC), L.Bin_Num
END
SET NOCOUNT OFF
SET ANSI_WARNINGS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
Last week I was fortunate enough to go to TechEd and while I was there I was lucky enough to meet someone on the Visual Studio team “Noah Coad”.
If you ever get a chance to meet him he is the most amazing person on a product team that I have met. Well it turns out that he even reads my blog now and he responded with a comment! So now that Noah has blessed my blog, I can leave the building.
Seriously, thanks for all you do for the community Noah and keep up the good work.
Are you serious? I just bought a new dell machine to run some applications from the house and because I don’t have a lot of time, I figure while I am finishing up some other things on my real computer I will install VSTF. I put the DVD into the machine and it starts up with “what would you like to install”. I select “Single Server” because my wife has limited my craziness to like 10K a year on new computers. I am just kidding about that, but no I don’t have a separate App machine and Database machine at the house. Everything is going along great and then BAM!!!!
Required Prerequisites = Microsoft Windows 2003 Server
Are you kidding me! Ok I get that it is a server product, but it is the full version of a product and I understand I left the Windows XP Media Center Edition on the machine, but for Pete’s sake let me install the damn thing on Windows XP if I have the full version. Yeah I get it, there are differences in XP and Server, but now I have to wait to install it until I have redone the operating system and have time to install everything. I really just need to install SBS on this machine because it will be running everything for me anyways. Well I will let you know how the machine turns out.
Contest: How big of a machine would you think I need to run these applications: VSTF, Domain Controller, IIS, Groove Server 2007, SharePoint 2007, and maybe a few more applications. It would be a small load 10 people or less. Give me your guesses and I will let you know what I have to try it on.
I'm apparently installing all the new Vista-ish Microsoft software I can get these days. I've got the new Windows Live Messenger, the new IE7 beta, and the new Windows Media Player 11 beta. I won't bore you with what the new Media Player looks like as there are dozens of reviews and impressions out there on the net. Instead I'll provide the feedback I have about it that I will eventually be sending to the WMP team.
I personally like the new player and the new interface. I've got a fairly large collection of music CDs and I like that the new player focuses more on the album art - that's how I recognize the album when flipping through my collection and it simply makes for a better experience. Want to make it even cooler? Integrate a flipbook UI!
Suggestions for the team:
1) I like the Urge/music store integration on the media guide tab but how's this - when I'm playing an album and I'm looking at Album Art as my visualization (or perhaps a new tab) I'd like to see more information about the album I'm listening to. For example, when I listen to an AudioSlave album, it would be useful to show the kind of information about AudioSlave that can be located on the Ultimate Band List (www.ubl.com). Perhaps take me to the store and show me some Amazon.com-like "you may also like these" suggestions. Isn't this how the long tail of the digital economic world is supposed to work? I pick the popular track from the popular album and my connected tool shows me more from the same artist or what other people with similar tastes to mine like? You CAN get this information from Urge when you click the Buy link next to the album in the upper right corner of the Now Playing screen, but I'd like to see this kind of detail for EVERY albumn, whether I'm interested in buying it or not. The current process is 1) pick an album, 2) go to Now Playing, 3) Click the buy link, and finally 4) resize the two panes on the "Buy Music" page to give more room to the album details on top. That's about 3 steps too many.
2) I personally like to have my music in CD format when transporting it. I'd love to see a buy it option that takes me to a vendor like Amazon who can ship me a real, physical CD.
This is cool - beta 2 of Internet Explorer 7 is so popular that
Yahoo! has already
personalized it.
Starting yesterday the new Windows Live Messenger service was rolled out around the world. Windows Live Messenger, the successor to the MSN Instant Messenger product, marks a huge list of new features and a slightly more polished UI. Go to http://messenger.live.com and grab the latest version which includes Skype-like PC to Phone calling functionality. Super-sweet.
Check out the Messenger team blog to learn more about the new release and the history that got them where they are now at http://messengersays.spaces.msn.com/PersonalSpace.aspx
A major point for the Windows Live Messenger - it is the first of the Microsoft products (ignoring Xbox Live which has been around since 2001) to be released under the now ubiquitous Live trademark. What's that mean to people outside of marketing? I have NO idea. There are so many products tagged Live that I think Live sort of lost its meaning. This reminds me of when every Microsoft product was tagged with the .NET moniker.
I'm back from TechEd 2006. I got home last night at 12:30am and went directly to sleep after I showed Kim the tiny amount of swag I got.
TechEd was great - I saw loads of great sessions that have me really excited about some of the things to come - notably SharePoint 2007, Groove, WPF, and the new BI stack Microsoft is building. I'm not going to go into any detail on what I saw here on the blog - I'd rather turn these into user group presentations that I can deliver in my favorite offline fashion. I will tell you this - SharePoint 2007 is the typical version 3 product from Microsoft - it's finally here as a product people will want to use. It's a fantastic story for users, admins, and developers. Much improved. Groove has me so excited that I'm going to start using it on Monday with Brendon, Keith, and Dan to build the upcoming Free Training 123 series.
I only went to two evening events this year - the Microsoft Influencers party at Ned Devine's (free booze, finger foods, and tons of heavy hitters all around) and the TechEd attendee appreciation party at Fenway Park. I walked around the field on the warmup track and touched the Green Monster! To feed us they had all the pizza and hotdog vendors out working. To entertain us they brought Train in to play a private concert. They really put on a great show and that guy Curtis can really sing.
News announced this week: WinFX is now called .NET 3.0 and Bill Gates will be leaving Microsoft in 2008. Buy Microsoft stock after it takes the inevitable hit - it will climb back up, have no fear.
I didn't get much in the way of swag this year, so there won't be a lot of trinkets handed out at local UG meetings like there was after TechEd 2005. This is partly because I just lacked the will to carry a lot of stuff back home on the plane and partly because every vendor there skimped on swag in order to offer a chance to win an Xbox 360. There must have been 100 Xboxes up for grabs there. I bet the odds of winning were something like 1 in 1,000. Way better odds than the lottery, but then I don't win that either. Oh well. I'll just have to console myself with the one I already own. Which is what I'm off to go do for a bit right now. I've just suffered a week without!
I couldn't resist the title! Sorry Jim!
Jim Wooley is one of three Atlanta Code Camp presenters whose presentations were recorded. Jim gave a great presentation on LINQ and you can now watch the video here. Everyone say "Thanks!" to Jim Minatel from Wrox for hosting the video.
More Posts
Next page »