You may not be using Visual Studio 2008 yet, but it's going to happen eventually, so we all need to start getting our heads around the changes and improvements to this IDE we use every day.
On May 8, Robert Green will be coming to Olympia to present to the South Sound .NET UG on Visual Studio 2008 Data Enhancements. Some of you may have seen him at the Seattle Code Camp this January. For a description of his presentation, see the South Sound .NET homepage.
Robert Green is a Senior Consultant with MCW Technologies. He is a Microsoft MVP for Visual Studio Tools for Office. Along with Ken Getz, Robert has co-authored AppDev’s Visual Studio 2005 and 2008 and Windows Workflow Foundation courseware, and appears in the video training for these courses, as well. Robert is a member of the INETA Speaker Bureau and has been a frequent speaker at technology conferences. Before joining MCW, Robert worked at Microsoft for 8 years, as a Program Manager on the Visual Basic product team and as a Product Manager for Visual Studio, Visual Basic, Visual Studio Tools for Office and Visual FoxPro.
Please join us on the 8th, from 7 - 9 for some VS2008 data goodness.
Ok, I didn't know about DateSerial. I stumbled on it while looking for some code to manipulate dates and get stuff like first day of month and last day of month. I am adding functions to a utility class so that I can send the a date and get the date range for the previous month or previous quarter.
I Googled and found a link in the MS Asp.Net forum, this linked to a 4GuysFromRolla FAQ entry on DateFunctions
A little fiddling and twiddling resulted in this:
Public Shared Function GetPreviousQuarterDateRange(ByVal currDate As DateTime) As DateTime()
Dim dateRange(1) As DateTime
dateRange(0) = CDate(DateSerial(currDate.Year, currDate.Month - 3, 1))
dateRange(1) = CDate(DateSerial(currDate.Year, currDate.Month, 1 - 1))
Return dateRange
End Function
and this:
Public Shared Function GetPreviousMonthDateRange(ByVal currDate As DateTime) As DateTime()
Dim dateRange(1) As DateTime
dateRange(0) = CDate(DateSerial(currDate.Year, currDate.Month - 1, 1))
dateRange(1) = CDate(DateSerial(currDate.Year, currDate.Month, 1 - 1))
Return dateRange
End Function
In that forum, the response from Peter Blum advocated DateTime functions, for example, to get the last day of a month:
new DateTime(currentyear, currentmonth, 1).AddMonth(1).AddDay(-1)
Hmmm... both approaches work... not sure which one is more 'correct'.
Erik Mork will be returning to Olympia in June to present Silverlight 2.0 to the South Sound .NET User Group. Our last visit from Erik was in July 2007, when he told us about Silverlight 1.0 and looked forward to what might be in version 2.0. Now, with Silverlight 2.0 released in Beta, he can come back and give us the next chapter in this ongoing story.
Erik was with Tranxition last year and looking toward self-employment. He's made that leap now, founding Silver Bay Labs. In addition, he and with his wife is producing a Silverlight podcast called Sparkling Client. Recent shows featured interviews with Adam Kinney aka The Silverlight Surfer and Jesse Liberty aka Captain Silverlight.
If you're into Silverlight, definitely check out what the Morks are up to and plan to attend the South Sound .NET meeting on June 12th with Erik and Silverlight 2.0.

The Code Trip made it's next to last stop in Olympia Monday night (4/14). A small but appreciative group was on hand to greet Jason Mauer and Woody Pewitt. Adam Kinney was unable to bring the Silverlight, but Jason and Woody filled up the three hour event nicely. Sadly, the bus didn't make it to Olympia either, it was already parked in Redmond, at Microsoft, for the MVP summit.
Jason started things by giving us a Code Trip overview but initially ran into technical difficulties with the CodeTrip.com site... "This never happens", he said. Yeah, not until the last stop of the trip, eh? Their site at TheCodeTrip.com has a section called Under The Hood, with great information on all the tech used to keep the website going and keep everyone connected and happy on the bus. Much of what was used on the website will eventually be available on CodePlex.
Woody took over and showed us how the BusCams worked. He talked about the difficulty of finding software for processing the pictures taken by the bus cams, 4 in all. Eventually, he used an open source DirectShow API wrapper, called DirectShow.net. The BusCam software will eventually be uploaded to CodePlex.
By the time Woody was done rapping about BusCams, Jason was ready to roll on Loggo, the blogging engine he wrote and which he uses on his site, JasonMauer.com . He told us that he'd compared and contrasted various existing blogging engines over the years before deciding to write his own. He started out in the database, which was an interesting way to introduce blogging software, but Jason explained that a blog can be looked at as a set of relationships. Information on pages, and the relationships between pages, is held in the database, along with other information about users, permissions, etc. From the database, he took us to the code and eventually to the website. Very cool, and available on CodePlexat some point. Most of the guts are in the database, so there isn't much to the code, built on ASP.NET. Loggo emits XHTML and the websites can be viewed with an XML parser.
Jason is very big on location and geo-tagging. Basically, he's a geo-geek All the blog entries on the Code Trip site are geo-tagged with the location the bus was in when the blog entry was posted. His assertion is that blogging has inherent location. And, did you know you could drop an RSS feed URL into Google Maps and see the location .. except I just tried it and it didn't work, so I'll have to work on that. But believe me it was cool, really.
We weren't done with geodata just yet. GPS played a huge role on the website, most noticeably on the Virtual Earth tour map, with up-to-the-moment tour bus location. They used a QSTARZ BT-Q818 GPS unit on the bus. This particular unit comes highly recommended by Jason and Woody as affordable and accurate. The GPS unit hooked into a Winforms application called PositionUpdate, supplying location information to any application needing it via a webservice, running on the tour bus. On the tour map, this location info was used to show where the bus was at any given time. The blog entries got their location information from the webservice as did the display on the masthead of the website.
Next we toured TwitterSync, another project destined to be on CodePlex, which features a Windows Workflow Foundation state machine at its heart. Very cool to see a WF workflow in action (sorry you missed it, Paul).
What I really loved about Jason's CodePlex">Under the Hood presentation was the natural use of Linq, anonymous methods and types and lambda expressions -- all new stuff we've seen in presentations before, but presented in the context of very interesting applications -- not dry demo code. Makes me itch for the time to play with that stuff.
Jason showed us a slide with the 'Levels of Code Quality' on it: Crap --> Hack --> Spaghetti --> Readable --> Elegant. The code for PositionUpdate is between Hack and Spaghetti, TwitterSync is Spaghetti and Loggo is between that and Readable. I'm wondering if Jason is one of those perfectionist types who won't ever consider his code elegant.
Next, Woody led us on a magical mystery tour of Internet Explorer 8.0 Beta 1, with special emphasis on developer tools. He asked for a show of hands, who had already downloaded it? I don't think anyone raised their hand, to which Woody exclaimed,"Man up and download people! Don't be wimps!"
The IE8 team is actively seeking feedback from developers. He cruised over the new security features, and spent more time talking about webslices, activities (like add-ins) and embedded Javascript debugging tools. He emphasized that the look and feel aren't updated yet, so it still looks like IE7. It uses a completely different parsing engine, however, so pages formatted for IE7 won't necessarily render the right way. There's a ton of info on the Internet Explorer Developer Center site if you want to start playing with it now.
In the end, everyone went home with a foam Code Trip Tour Bus replica and some software or a laptop sleeve with the Code Trip logo. Jason promised us that not only would there be another west coast Code Trip in the future, that there would be a central and eastern branch of the Code Trip family. They'll build on the lessons learned during this inaugural voyage and certainly more fun code and technical wizardry will result and eventually make its way to the community.
Come out to the Thurston County Fairgrounds on Monday night and get 3 hours of great information on new and exciting technologies from Microsoft and other sources.
Adam Kinney will present information on Silverlight 2.0. Woody Pewitt will talk about Internet Explorer 8 and the Code Trip Bus Cam. Jason Mauer will take us Under the Hood of the code Trip, explaining the technologies used on the bus and on the website.
Thousands of dollars worth of software will be given away from Infragistics (NetAdvantage for .NET), Telerik (RadControls for ASP.NET AJAX, RadControls for WinForms, Telerik Reporting,Sitefinity CMS), Identity Mine (Blendables Essentials Mix) and copies of CodeRush by Devexpress. Along with all of that goodness, there will be some foam Code Trip Buses and Code Trip Laptop sleeves given away. Free stuff and free high quality presentations -- you don't want to miss this.
To answer a question posed by some of you, sorry, no food this time, but grab something on the way out to the fairgrounds and stuff your face while while Jason, Woody and Adam stuff our brains full of new and shiny information.
Monday, April 14, 2008
6:30 PM to 9:30 PM
Olympia is the last stop for the Code Trip before the end of the line in Seattle. In partnership with the South Sound .NET User Group, they'll be pulling out all the stops and unleashing a technical tour de force at the Thurston County Fairgrounds.
Location
Thurston County Fairgrounds
Expo Hall
3054 Carpenter Rd SE