/Home /Archive /Syndicate /Blog /Support /About /Contact  
All Visual Basic Feeds in one place!





Channel: Jeff Certain

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 q ... [ read more ]


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 differe ... [ read more ]


I've had a number of conversations lately where I argued that software development is much more akin to craftsmanship than to engineering. This usually leads to a lively discussion, especially in an informal context. Seems I'm not the only one thinking this way. Uncle Bob (Robert C Martin) posted a link to the Manifesto for Software Craftsmanship . It'll be interesting to see what degree of impact this has on the development community.


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 ... [ read more ]


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 t ... [ read more ]


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.


For those of you playing with the VS2010 CTP, you've probably noticed that it's going to stop working around New Years. Jeff Beehler just posted this blog entry on how to extend the life of your (new) VS2010 VPC beyond that time.


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 thin ... [ read more ]


Both Snoop (WPF) and Silverlight Spy (Silverlight, obviously) allow you to connect to running processes and see what's going on inside them. Very powerful tools. With Silverlight Spy, you can see the contents of any Silverlight app... and reflect against them. The temptation with Silverlight is to put more code in the stateful .NET client, but the consequence is that your code is essentially available to the world. This also applies to any keys, passwords, etc that may be stored within y ... [ read more ]
Some quick notes about one architectural pattern for WPF apps -- this is a modified version of MVC/MVP. The Model bottom layer of the pattern no knowledge of the View (UI) variables should be named in UI-agnostic terms ("available" vs "visible") .NET class The View WPF/Silverlight representation of the UI should have minimal code connects to the ViewModel through the DataContext property should be editable in either Blend or Visual ... [ read more ]


Another thing that took me far too long to find today... there's a lot of links to Steve Dunn's tool, including the CodePlex version, which hasn't been updated since 2006. And, since it doesn't have an installer or the DLLs readily available, you'll waste a lot of time looking for that too. You might consider trying this tool. Looks pretty good to me so far. And, yes, it supports a few languages. And line numbers. And highlighting. Public Class ThisRocks Public Function URL ... [ read more ]
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 w ... [ read more ]


© 2005 Serge Baranovsky. All rights reserved.
All feed content is property of original publisher. Designated trademarks and brands are the property of their respective owners.

This site is maintained by SubMain(), a division of vbCity.com, LLC