Programming

Code — mostly .NET, C#, and SQL — plus the tools around it.

26 posts

New Website and Host

Site My last post was in April 2012, so it’s probably time for an update. I successfully imported my blog into a static HTML generating tool called PieCrust. It creates the files serving this site now. As part of the move, I totally redid the site’s design and functionality at the same time. I had…

Continue reading New Website and Host

Zip File Classes Finally Available in .Net 4.5

Right now .Net 4.5 is still in beta, but I noticed something that will make developers who must interact with zip files happy: .Net 4.5 will have native support for dealing with zip files. Up until now, the System.IO.Compression namespace only had support for GZipStream and DeflateStream. This post explores how working with SharpZipLib now compares to working with what is upcoming in the .Net 4.5 framework.

Continue reading Zip File Classes Finally Available in .Net 4.5

Pretty IPropertyNotifyChanged Declarations for Windows Phone

The Problem I’ve been doing a bit of WPF/ Windows Phone development. Usually INotifyPropertyChanged declarations for properties are really ugly. The big problem is that the INotifyPropertyChanged interface relies on strings, which don’t refactor well. I’m also using the fantastic MVVM Light Toolkit, which makes life a lot easier when doing Windows Phone development. MVVM…

Continue reading Pretty IPropertyNotifyChanged Declarations for Windows Phone

Hosting Windows Workflow Foundation in a Console Application without Ugly Code

I’ve been using Windows Workflow Foundation for a small personal project to learn more about it and see what it can do. It’s pretty powerful and I’m looking forward to delving more into it. For my purposes though, I’m hosting the workflow in a console program. If you look around the internet, you’ll see lots…

Continue reading Hosting Windows Workflow Foundation in a Console Application without Ugly Code

A Lesson in How Not to Conduct Website Security

Louisiana Tech just sent me a “reminder” email with my full username and password in there. That information is everything necessary to logon to the school student portal and get the rest of my personal information, full school transcript, etc. Not only do I not like them emailing my password, I don’t like that they…

Continue reading A Lesson in How Not to Conduct Website Security

Beyonc□, or How We Can All Learn From Other Developers' Character Encoding Mistakes

I’m sure everyone who reads this blog has noticed, at some point, the result of another developer’s mistake in dealing with Unicode or other character encodings. I’ve had a few issues myself. To the left, you can see how my Napster displayed a Beyoncé song as Beyonc□. You may have seen a black diamond symbol…

Continue reading Beyonc□, or How We Can All Learn From Other Developers' Character Encoding Mistakes

Hacked by Chinese

On our main product, in a branch on which I’m working on a Point of Sale product, something happened in the process of checking files into source control. In our case, we’re using Team Foundation Server. My guess is that the corruption happened on my hard drive for who knows what reason, but this is…

Continue reading Hacked by Chinese

Using Reflection to Dynamically Generate ToString() Output

Update: Added code to show “null” when a property is null, like Visual Studio does. If you’ve ever used Visual Studio in any iteration in any language, you have most likely used the immediate window. It’s insanely useful and lets you just type an instance of an object and if the object doesn’t have an…

Continue reading Using Reflection to Dynamically Generate ToString() Output

Strong Name an Assembly Without Source Code

Because I program in the 1970’s, part of what I do is programming against modems and serial ports. Specifically, we send medical claims over modem to adjudicators, in the event of unavailable internet access. As a customer, you’ll appreciate having your pharmacy delay you for 20 seconds rather than saying “Sorry; you can’t have your…

Continue reading Strong Name an Assembly Without Source Code

How Insensitive

Update: Added section at the bottom detailing what not to do. As part of the updater process that I wrote for a current project, a “boot strapper” program queries the database for available versions, and if there is a newer version available, it deletes the current program folder, replaces those files with the new files…

Continue reading How Insensitive

A Day Late and a Property Declaration Short

I know this is a bit late to the game, but this morning, as I’m refactoring a bunch of old code to be shared with a new project, I’m cleaning up the C# 2.0 property declarations we all know and love: public class SaleResponse: Response { protected bool _addressVerificationSuccess; public virtual bool AddressVerificationSuccess { [DebuggerStepThrough]…

Continue reading A Day Late and a Property Declaration Short

Out of Memory Exception While Attempting to Do SQL CLR

Update: We figured out how to make it work with the help of our DBA and Jonathan Kehayias (see comments). We increased SQL Server’s MEM_TO_LEAVE property, by adjusting the –g command line switch for the service, to 448MB. This increase of the shared memory pool gave SQL Server enough breathing room for its worker threads…

Continue reading Out of Memory Exception While Attempting to Do SQL CLR

Enabling SQL Cache Dependency With Schema Solution

My solution has now been included in a published book about ASP.NET for SQL Server This post is about programming and ASP.NET / Microsoft SQL Server 2005, so any of my friends who aren’t programmers won’t find this interesting. With that said… If you’re reading this post, it’s more than likely that you’ve encountered the…

Continue reading Enabling SQL Cache Dependency With Schema Solution

Certifications, Helping, and Racism

Yesterday, I took the Microsoft 70-526 certification exam and passed it with a 940. That certification is for Microsoft .NET Framework 2.0 – Windows-Based Client Development. After I take the 70-536 (Microsoft .NET Framework 2.0—Application Development Foundation) on 1/31/2007, I’ll be MCTS: .NET Framework 2.0 Windows Applications. I’m already MCTS: SQL Server 2005. Doing these…

Continue reading Certifications, Helping, and Racism

The Prestige, PlayStation 2, and Programming

Update 1: Added Krystal Meyers picture and GH2 news. Update 2: Fixed “lost”/”lot” typo, thanks to John McCain. Before I begin on the title’s topics, I’d like to begin with another: Christian Music. Normally, I dislike it because it’s completely boring, and of course the content is verbal diarrhea. However, recently, I prepaid for two…

Continue reading The Prestige, PlayStation 2, and Programming