Book Review: Continuous Integration

Continuous Integration is an easy read that anyone directly involved in the software development process could gain a lot from. Even though it doesn’t really introduce anything new, it ties everything most developers have learned over time into a single process, called continuous integration. Here are a few of the things that I really liked about the book. Automation Automate everything. Automation limits the ability for bugs to creep into a process and it also makes processes easier to follow. »

Geocities Nostalgia

I am doing some home wiring at my parents house and Googled around for some info on wiring phone jacks. I came across this page, which strangely reminded me of my first website on Geocities 13 years ago. It was a website on Duke Nukem, and made heavy use of frames, animated gifs, and some sweet back ground music. I also had a badass page hit counter. Man I wish I could find that site. »

Brian Hartsock

LINQ'd up

I just used LINQ for the first time ever in code. Pretty exciting. For me, it doesn’t get much better than transforming some mundane 6 liner into an elegant one liner. This… int count = 0; foreach (string email in this.emails) { if (email.EndsWith("@mydomain.com")) count++; } return count; becomes this… return this.emails.Count(email => email.EndsWith("@mydomain.com")); In some weird kind of way, I feel like an emo Ruby developer. Maybe I’ll start wearing some tighter clothes. »

Amazon S3, JungleDisk, and Me

I have been meaning to buy an external hard-drive to backup a lot of my data. Well, today I decided to try out Amazon S3 as my storage medium instead of an external hard-drive. JungleDisk has proven a great program to transfer files to S3. In addition to working on Windows, Linux, and Mac, it allow the mounting of S3 buckets as hard-drives. Very good program to work with. Right now, I am backing up my Linux desktop and my Windows laptop. »

Brian Hartsock

NUnit and RowTest

I have been researching different unit testing tools for .NET lately. Obviously, NUnit was the first I came across, but MbUnit had the RowTest attribute, which allows parameters to be added to tests. This saves a lot of code and is really a must have feature. Luckily, I found an NUnit addin for RowTest here. The latest version here is linked to NUnit 2.4.6, so I rebuilt it from source to use NUnit 2.4.7. »

C# Destructors and IDisposable

This week I found myself somewhat confused on when to use destructor. Originally I assumed that anytime you implement IDisposable you should have a destructor that calls Dispose(). This is not the case though. The only time you really need a destructor is when a class directly contains unmanaged resources, like file handles. A good example of when not to use a destructor is a wrapper class. For instance, if you have a database connection class wrapped with some sort of adapter class, the adapter class doesn’t need a destructor. »

How to actually use trigonometry in web applications

Disclaimer: my teammate Dellanoce actually coded this, but is too cool to blog, so I am blogging for him. Mailtrust has many different customers, some of which like to have their own branded control panel or webmail interface. We allow them to customize many different facets of the user interface, including colors. This has some unintended consequences though. Sometimes, a user might select a white font color on top of a white background. »

CallContext isn't the greatest thing since sliced bread

In ASP.NET, it is quite common to need to store information in the context of a single web request. For example, a NHibernate session should usually exist for one web request. HttpContext is the tool for accomplishing this. But what happens when you have code embedded in business logic that might not always be running in an ASP.NET web application? HttpContext isn’t valid, so you can’t use it. Why not use CallContext, since HttpContext uses this anyways? »

Using NMS

NMS is the .NET client library for using ActiveMQ, as well as other messaging systems. Unfortunately, it is the only complete one that I found, so using it isn’t really a choice (although I recommend coding your own STOMP client). I encountered many problems using it, but after working through them, everything seems to work. Problem #1 - Downloading Almost all the links to NMS point to Sprint.NET’s NMS build. If you notice the date in the link, the last time it looks to have been built is March 20, 2007. »

Tried and True

Today I had the task of removing a few entries from a CSV file based on another CSV file. It was only about 300 rows that needed to be removed in a file of about 2000 rows, so I could have manually done it in about an hour. Since it is Saturday, I decided to have fun, write a Perl script to do it even if it took longer than doing it manually. »