Geeks With Blogs
A Technical Debtor Toward continuous improvement VB
Creating and Calling Extensions Methods
One of the challenges in introducing new language features into our code base is that they're not always well understood. As a result, some interesting discussions come up. Today's subject is extension methods -- what are they, how to write them and how to use them. Let's start by examining a piece of code I wrote while doing some dynamic SQL parsing. There was a lot of code to remove the trailing " AND " from my criteria strings that looked like: s = s.Substring(0, s.Length - 5) I got tired of having ......

Posted On Thursday, September 18, 2008 4:01 PM

Azure WCF Service Errors
WCF services under Azure have a nasty habit of not really telling you what you need to know. Having fought through this – and having been challenged to find exactly what I needed in a Google search, I thought I’d add some more specific info here. Before I do, let me say thanks to Steve Marx, whose blog posts and forum answers pointed me in the right direction. Here are the exceptions that surfaced: ConfigurationErrorsException: Could not create Microsoft.WindowsAzure.Diag... ......

Posted On Sunday, March 27, 2011 4:20 PM

Rocky Mountain Tech Trifecta v3.0
The Rocky Mountain Tech Trifecta is an annual event held in Denver in late February or early March. The last couple of these have been amazing events, with great speakers like Beth Massi, Scott Hanselman, David Yack, Kathleen Dollard, Ben Hoelting, Paul Nielsen… need I go on? Registration is open at http://www.rmtechtrifecta.com. The speaker list hasn’t been finalized, but it’s sure to be another great event. Don’t miss it ......

Posted On Monday, January 10, 2011 6:22 PM

RemoveHandler Issues with Custom Events
This is a case of things being more complicated that I thought they should be. Since it took a while to figure this one out, I thought it was worth explaining and putting all of the pieces to the answer in one spot. Let me set the stage. Architecturally, I have the notion of generic producers and consumers. These put items onto, and remove items from, a queue. This provides a generic, thread-safe mechanism to load balance the creation and processing of work items in our application. Part of the IProducer(Of ......

Posted On Tuesday, May 4, 2010 11:37 AM

Microsoft Events Come Back to Fort Collins
It’s been a while since Microsoft MSDN and TechNet events have been in Fort Collins. I’m very pleased to be able to pass on Microsoft’s announcement that on April 21st, these events will be held at the Drake Center as half-day events. A huge “thank you” to Erin Dolan, Joe Shirey and Daniel Egan for making this happen! Join us for an in-person event you won’t want to miss! No matter what your role, you’ll find an event series that fits what you do—and what the 2010 products from Microsoft have to ......

Posted On Thursday, April 1, 2010 10:05 AM

VS2010 Training Kit

With the release of the VS2010 Release Candidate, a new edition of the training kit has also been released. Some of the features: 17 presentations, 22 demos, 32 hands-on labs. Newly added content includes VB.NET, Office, SharePoint and Application Lifecycle Management.

Posted On Friday, February 12, 2010 3:27 PM

Oracle + Azure = Crash and Burn
One of the downsides to Azure is that it’s error messages need a LOT of work. I just installed the July CTP of Azure. After doing so, even the simplest cloud project would fail. I’m talking “Create New Project” then F5… wait 30 seconds… bomb. I kept getting the ubiquitous “Role instances did not start within the time allowed. Please try again. If you continue to encounter this behavior please try shutting down the Development Fabric." message. Nice and descriptive. Digging into the problem, it looked ......

Posted On Monday, September 7, 2009 11:06 PM

Numeric Chicanery
For those of you who have been around since the VB6 days, you surely remember the interesting rounding behavior of CInt(x). Specifically, it rounded a number ending in .5 to the nearest even number. That is, CInt(2.5) rounded to 2 and CInt(3.5) rounded to 4. This behavior still exists in VB.NET. No real surprise there. And, to be honest, I don’t mind it that much. When I see “CInt,” I really don’t have any preconceived, intuitive understanding of what it does. Math.Round(x) is another question entirely. ......

Posted On Thursday, April 2, 2009 11:37 AM

MVP renewal

Just got the e-mail from Microsoft, so it’s official. I’ve been renewed as a Microsoft MVP for another year!

And, no.. this isn’t an April Fools’ Day joke. I’m an April 1 MVP.

Congrats to all those renewed, and especially to those who were awarded for the first time.

Posted On Wednesday, April 1, 2009 8:26 AM

Microsoft P&P team releases VB support for Composite Application Guidance for WPF and Silverlight (aka "Prism")
One of the places lacking good VB support was the Microsoft Patterns & Practices’ Composite Application Guidance for WPF and Silverlight (formerly code-named "Prism"). The P&P team is now releasing VB versions of the QuickStarts, Hands-On Labs, and How-to Topics! Get all the good stuff here This download is provided to help Visual Basic .NET developers use the Composite Application Library. While Prism is not yet 100% VB, this is a big step in the right direction. The VB code was reviewed ......

Posted On Wednesday, March 25, 2009 10:37 AM

Deploying WCF Services to Azure
My past experience with WCF services has followed a slightly unusual path. For a variety of reasons, most of the services I've written have consisted of an interface and an implementation. Pretty straight-forward thus far. However, where it gets a little unusual is in the hosting mechanism. We're using Windows services to host of WCF services. This works out well for us, since these services live on intranets, and aren't publicly exposed. When looking at Azure, services are a little different. It's ......

Posted On Tuesday, March 10, 2009 4:22 PM

The Developer's Way to Convert Code
All right, all you developers out there... let's see a show of hands. How many of you delight in finding new ways to solve a problem? You. Yes, you in the back. Get your hand up. You can't call yourself a developer if you don't enjoy finding a new (preferably somewhat convoluted) to solve a problem. I've been doing some work that involves converting C# code to VB.NET code. I was sitting in the speaker lounge at VS Live, shortly after getting into San Francisco. I'd played a little bit on the plane ......

Posted On Wednesday, February 25, 2009 4:51 PM

VB Dev Center Article Published
The work I did on benchmarking DataTable performance (or lack thereof *cough cough*) has been published in an article on the MSDN VB Dev Center. For those of you wondering about the results I mentioned a few months ago, they're included there. I've also included some work on benchmarking LINQ select queries and aggregation in comparison to the DataTable equivalents. Many thanks to Beth Massi for helping get this published ......

Posted On Wednesday, December 17, 2008 1:59 PM

Try/Catch Performance
I'm really not obsessed with performance -- honest! However, when a co-worker asked me today exception handling was an acceptable way of coding defensively, my reaction was rather predictable. Exceptions are pure evil, and should be... well, exceptional. Yes, you guessed it. The next question was "How bad is try/catch really?" The short answer is that is involves minimal overhead... unless an exception is thrown. In that case, the .NET exception handling mechanism does a few nice things, like providing ......

Posted On Monday, December 1, 2008 5:06 PM

Using Exception Handling to Retry an Operation
I got the following question via e-mail: I want to catch timeout errors when I execute a script. Catching the error is easy, but I then want to retry 3 times. In VB6 I could just resume a command when I caught the error. How can I do this with vb 2008 using try..catch? This is a case where two different techniques come into play. The first is using a number of Catch statements to allow you to catch specific types of exceptions. The second is to make essentially a recursive call to the function, with ......

Posted On Thursday, December 18, 2008 9:37 AM

VB.NET Generics with Multiple Constraints
I had a case today where I needed -- well, wanted -- to implement a generic class that was a little... unusual. Essentially, I'm working on a queuing mechanism based on Joe Duffy's BlockingBoundedQueue(Of T). Mind you, unlike Joe's sample, mine is written in VB.NET. ;) Taking it a bit further, I created a wrapper that specifies the number of producers and consumers of queued objects, as well as the queue capacity. Since I'm going to be turning this over to a bunch of developers to play with, I also ......

Posted On Tuesday, November 18, 2008 5:05 PM

Azure Hands-On Labs Issue
If you should happen to create a new cloud services project in VS2008 with VB settings, you may well find that you are unable to save the project/solution. The message is, in typical fashion, singularly useless: Luke H's blog pointed me in the right direction. The solution is to enable saving projects on creation. Under Tools >> Options, select Projects and Solutions. Make sure "Save new projects when created" is checked. Restart Visual Studio, and you'll be good to go ......

Posted On Saturday, November 8, 2008 10:01 PM

Essential Cloud Services
Blob Namespace http://<account>.blob... can be used as a hierarchical namespace can be up to 50GB each accessed via REST PUT/GET interface includes continuation on upload scenario: blobs are broken up into blocks; if large file upload fails, it can resume without retrying successful blocks; PutBlockList commits the upload under the covers, each blob consists of several immutable blocks (up to 4 Mb each) if multiple blocks with the same ID are ......

Posted On Tuesday, October 28, 2008 7:35 PM

PDC 2008 Disappointment
So far, I’m a couple days intll that cloud services can, in fact, be ao PDC. The only VB code I’ve seen anywhere was code that I wrote myself. None of the presentations have been VB. There are very few labs that are VB. Having said that, I can assure you that cloud services can, in fact, be written using VB.NET. Doing the lab in C# (as it was written) would have been too easy. So, despite having no support from Microsoft, I did it in VB.NET. I’ve also been talking to a few people to make sure those ......

Posted On Tuesday, October 28, 2008 7:24 PM

Variance: A Different Take on PDC
Ted Neward posted this blog entry on his thoughts after PDC 2008. Specifically, Ted said: The language world was a bit abuzz at the barely-concealed C# 4.0 features, mostly centering around the new "dynamic" keyword and the C# REPL loop capabilities, but noticeably absent was any similar kind of talk or buzz around VB 10. Even C++ got more attention than VB did, with a presentation clearly intending to call out a direct reference to Visual C++'s heyday, "Visual C++: Why 10 is the new 6". Conversations ......

Posted On Wednesday, November 5, 2008 2:30 PM

Copyright © Jeff Certain | Powered by: GeeksWithBlogs.net