TDD

There are 8 entries for the tag TDD
Okay, so recently I was working on a new suggestion for my client. It was a fairly simple request; create a snapshot of data to be used in monthly calculations, with the option to regenerate the snapshot at a later time. The snapshot was easy. I thought regenerating the snapshot would be easy too, but somehow I found a way to make it hard. The first mistake I made was not writing a test first. Really this had a lot to do with laziness. The data that I am capturing is only available via a view into ......
With my new job, I’ve not been able to take advantage of a lot of Agile/XP practices. In a company of four, where each is effectively working on a different project, collaboration is minimal. Also, for the projects that I am working on, the customer is very adamant about getting a detailed proposal up front, including a list of all of the screens and how they will operate. I’ve managed to get by without too much detail, but it is still more than I am generally comfortable with. TDD and Continuous ......
My trial ran out a few days ago. And I haven't posted about R# for almost a month. I have to a few more things to share, and perhaps I can save everyone some time. The R# team has done quite a few small things to raise the tool a step above my expectations. There are a lot of things that may seem small, but really turn out to be significant improvements to the way I manage my code. Simple things, like, locating new code (via refactoring) with similar declarations (fields with fields, properties with ......
I've been using ReSharper now for about one and a half weeks. Now that I am writing some new code, I have more to share. The most helpful and time saving feature that I have encountered so far is code generation. In one case, I had added a couple of new properties to one of my entity objects. In actuality, I add the code in my test first. R# quickly recognized that the property didn't exist and gave me the option to create a field or property. I chose the property option and presto, R# found my class ......
Recently, the CEO of Sprint could be seen in TV commercials stating "Technology is only great when you know how to use it." Here is an article that digs a little deeper into this ad campaign. The purpose of the campaign is to highlight Sprint's customer service, which of course is vitally important to any company providing products or services. I am not here to criticize Sprint. In fact, if you read the article, you will see that they are addressing technology simplicity as well as customer service. ......
In the application I've been working on, we have the requirement to handle unique constraint errors gracefully. It wasn't really hard, I just had to check for OracleException.Code == 1. The trick was the testing. Testing a unique constraint error was not a problem. The issue is verifying that other exceptions are bubbled up properly. The basic exception handling code is like this: 1 protected bool HasUniqueConstraintError( Action databaseAction ) 2 { 3 try 4 { 5 databaseAction(); 6 return false; ......
Last month was a busy month for me. We deployed the first version (beta) of the product I have been working on over the last couple of months. Meeting the deadline with all of the promised features (almost) was critical. However, when you fix the time line and fix the feature set, then something else has got to give. You guessed it, quality. Quality is not just a concern over failures. There is a level of quality in your successes as well. So far, the feedback on the product has been very positive, ......
There are some key practices that all Agile developers should be familiar with. In fact, "familiar" probably isn't strong enough. One of these practices is test-driven development (TDD). As one of the most important activities it ironically requires a lot of discipline. What does Red-Green-Refactor mean? Here is a brief description. There are plenty of places to learn about TDD and Refactoring in more depth. Red: write a test (it fails of course) Green: write the least amount of code (the simplest ......