Productivity

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 ......
I've discovered what was causing problems with TestDriven.Net and it isn't ReSharper. I had recently refactored my test fixtures and now I have a few that make use of generics BaseTest<T>. I had run into a problem with TD.Net before regarding generics and had to rearrange my classes (I had two classes in one file) to get it to work. I don't remember the details and I am still having problems getting it to work now. Regardless, R# is off the hook. And as an added bonus, R# doesn't appear to ......
Despite "The Cost of Premature Optimization", it's useful to know how things work so you can do basic things to avoid bad performance. In the end, the example below is trivial and doesn't have a significant effect on performance (at least as it applies in my application). However, knowledge of IEnumerable and yield can come in handy when it really counts. As I was writing a bit of code, I wondered if order matters when it comes to query expressions. Specifically, I have an enumerable that I was applying ......
So day two brought more items of interest. Unit Testing still problematic Apparently, ReSharper installs with version 2.2.8 of NUnit. I am using 2.4.8 which includes syntax helpers. A bunch of my tests were failing with multiple TypeLoadExceptions. To resolve the issue, I ran the tests in debug mode and took a look at where the nunit.framework library was being loaded from. I found that it was being loaded from C:\Program Files\JetBrains\ReSharper\v... Once I determined that I was dealing with ......
Many of those who know me (probably my only blog readers) know that I started a new job at the beginning of the year. At that time, I started working from home full-time, with the occasional trip to the client site. Working from home had many positives and a few negatives. On the positive side, I saved a lot on gas, I have been able to spend a lot more time with my family, and I've been able to take care of things at the house that I would normally have to take time off for. At times, my focus was ......
Whoa! Why does it need fixing if it is not broken? I'd like to explore the definition of "broken". Here is a modest list of signs of broken code. A test is failing (I know, painfully obvious) The code doesn't do what the user expects. (Likely, you actually have a broken test or it's missing altogether.) The code is hard to read, hard to enhance and brittle. I think the first two bullets are obvious and the customer will see the value in fixing the code. The final bullet leads us to refactoring. How ......
I finally installed ReSharper yesterday to try it out. I've been dragging my heals because I didn't want to have to learn a bunch of new commands and pay for that right (I'm cheap, I know). Here are a few things I noticed immediately. Keep in mind that these are first impressions, and they are sure to change over the next couple of weeks. [Update] I turns out that ReSharper is not the culprit here. See this post for more details. TestDriven.Net broken after ReSharper install. Any time I attempt to ......
So I was about to create a dump of my subversion repository so I could split multiple projects into separate repositories. But then I got to thinking. Why do I want to create a dump? Well, the only good reason I could come up with was revision history. That reason wasn't good enough. The source that I wanted to split out was some common/shared libraries. Collaborating with a team member, we decided there were two compelling reasons why we don't need the history up to this point in time. First, the ......
I received quite a bit of feedback regarding my Join extension to IEnumerable that generates a comma separated list. The purpose was to emulate string.Join(), but to add more flexibility as to what is "joined". I took some time aside to investigate some of the suggestions and alternatives to my implementation. I should note, that I would not normally do this. I try to avoid premature optimization. However, there are certain practices that can be learned that improve performance in general (like using ......
Introduction In all honesty, this review may be a bit premature. However, I wanted to record my thoughts and see if anyone listening shares them or has a difference of opinion. I've been evaluating the SlickEdit Tools and have come up with a few top picks. Also, I have identified some that make little difference to me. First of all, the Tools are segregated into two products: Editing Toolbox and Versioning Toolbox. I'll review them separately. Editing Toolbox Top Picks: Acronyms - This one is quite ......
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 ......
C# 3.0 has certainly introduced some really cool features. I have used the Automatic Properties extensively as well as object and collection initializers. These are real time savers. However, the most exciting feature (IMHO) are Extension Methods. My last post shows one example of how powerful extension methods can be. Here is another example (inspired by Scott Gu). 1: public static class Extensions 2: { 3: /// 4: /// Do not use this extension for large sets because it iterates through 5: /// the ......
I'm clearly not the oldest knife in the drawer, nor am I the youngest. I got involved with computers in my youth just about the time Bill Gates was positioning himself to put a PC in every home. What this means is, I grew up on PCs with no mice; pre-Windows, pre-GUI. I learned how to write "menu" programs that utilized a broader range of ascii characters than most people are familiar with today. The point is, everything I did on the computer I did with the keyboard. I recall in high school, a new ......
It seems that I have encountered a scenario where many aspects of C# 2.0+ come into play. I needed to handle conversion from an IDataReader.GetValue() result to a generic type, including Nullable<>. It took me a while to figure it out and with a little help from this snippet, I was quite please with the result. So, I decided to share. 1: private static T NullValue<T>( object testValue, T nullValue ) 2: { 3: T returnValue; 4: if( testValue is DBNull ) 5: { 6: returnValue = nullValue; 7: ......