A View Inside My Head

Jason's Random Thoughts of Interest
posts - 86, comments - 178, trackbacks - 22

July 2010 Entries

CodeRush: Anonymous Method Refactoring Fun

I recently had to work with some code that I wrote a few years ago, and stumbled upon this: (Not that it's relevant to the rest of this blog post, but this code was responsible for deleting a Role in a custom membership provider, but due to foreign key relationships without cascading deletes, all of the User/Role assignments had to be deleted first) Now, in all fairness to myself, there's really nothing wrong with this code. Array.ForEach<T> requires an Action<T> delegate, and this anonymous method certainly qualifies as one. However, since the time that I wrote this particular piece of code, I started...

posted @ Thursday, July 15, 2010 12:00 AM | Feedback (0) | Filed Under [ Articles CodeRush ]

CodeRush: Markers

Have you ever become distracted while scrolling through code, or switched to another tab and then forgot what you were working on? It happens all the time when we try to multitask while coding. If only there was a call stack for our brains that we could just unwind to find our way back to where we started.... Turns out, there is! CodeRush includes a feature called "Markers". These are little placeholders, or breadcrumbs, for your cursor location that can be created just before your focus changes to another part of code. When you're done with whatever task distracted you, simply hit...

posted @ Wednesday, July 14, 2010 12:00 AM | Feedback (0) | Filed Under [ Articles CodeRush ]

CodeRush: CodeRush Tool Window

CodeRush is full of templates. Thousands of them, when you combine the basic templates with the various types that are supported by each. How does someone start to learn all of the required mnemonics in order to use CodeRush effectively? The answer to that is a brilliant feature known as the CodeRush Tool Window: (DevExpress menu in Visual Studio, Tool Windows -> CodeRush) The CodeRush Tool Window provides a context-sensitive list of "next characters" in CodeRush templates that are valid at the cursor's current location. As you start to work with CodeRush, leave this window open (perhaps on a second monitor) so that...

posted @ Tuesday, July 13, 2010 12:00 AM | Feedback (2) | Filed Under [ Articles CodeRush ]

CodeRush: Property Templates

There is A LOT of repetition in coding. To accomplish certain things, you often need to include boilerplate code that is repeated throughout your program. Take Properties, for instance. Defining Properties on a class, especially a lot of them, can be a very tedious task. Traditionally, you have to create a member variable of the class to serve as the Property's backing store, and then create the Property itself (with a getter and setter to interact with that member variable). Lather, rinse, repeat... ad nauseum. This type of work is where CodeRush excels by providing you with mnemonic-driven code templates. In...

posted @ Monday, July 12, 2010 12:00 AM | Feedback (0) | Filed Under [ Articles CodeRush ]

CodeRush: The Refactor Key

Do a search, and you will find that there are a few IDE Productivity Tools available for Visual Studio. As far as feature sets go, you'll also find that there is quite a bit of overlap in what these tools offer. So, deciding on one is largely a matter of personal preference. However, by not using an IDE Productivity Tool at all, you are doing yourself a great disservice. No, really! You are wasting a lot of time by manually doing things instead of allowing software do it for you. Since time is money, and these tools are not very...

posted @ Friday, July 09, 2010 11:37 AM | Feedback (3) | Filed Under [ Articles CodeRush ]

Powered by: