Browse by Tags

Comparing ranges
19 August 04 10:52 AM
Ryan Farley talks about comparing date ranges . In his post is this phrase “ First range represented by r1start to r1end and second range represented by r2start to r2end ”. Aha, a code smell! 2 things that are related should have that relationship represented Read More...
Postedby jaybaz_MS | 10 Comments    
What are named indexers?
21 July 04 09:49 AM
Someone asked me about this, so I decided to write up the answer here in case other folks are interested. Indexers are pretty well documented on the web; I’ll quote some here. http://www.csharphelp.com/archives/archive140.html C# introduces a new Read More...
Postedby jaybaz_MS | 8 Comments    
Refactoring the XMLNotepad
20 July 04 03:14 PM
I’ve been reading Extreme Programming Adventures in C#. Currently reading Chapter 28 (Undo). Through most of the book, there has been a bit of Refactoring that the code has been crying out for. At first I thought Ron was waiting to until the duplication Read More...
Postedby jaybaz_MS | 9 Comments    
A way to do named indexers.
16 July 04 12:49 PM
In this entry on Ladybug , a customer asked for named indexers in C#. Here’s one way to get it: class Car { object [] wheels; public WheelsHelper Wheels { get { return new WheelsHelper ( this ); } } public class WheelsHelper { readonly Car _outer; Read More...
Postedby jaybaz_MS | 16 Comments    
The hidden costs of a Refactoring
07 July 04 10:49 AM
Looking over our oldest C++ code, there is, of course, a lot of potential for Refactoring. That’s a nice way of saying that it sucks. We learned about Refactoring because we wanted to build good tools for our customers. Along the way, we also realized Read More...
More about the event class
02 July 04 03:46 PM
In Popular patterns around events? , several folks mentioned that a usage example would be a good idea. As I put one together, I found some small changes to make to the code. Just goes to show you that thinking about your consumer is a good idea. Since Read More...
Postedby jaybaz_MS | 3 Comments    
If test fixtures could be private
01 July 04 07:42 PM
Last one for the day, then I go home. You’ve read Test Methods are neither Methods nor Tests . You’ve dried off & are fully recovered. This is the practical reason why NUnit should remove the ‘public’ requirements from test Read More...
Postedby jaybaz_MS | 2 Comments    
Test Methods are neither Methods nor Tests
01 July 04 05:49 PM
Put on your life vest & tankini. We’re heading off into the deep end again. You’re doing TDD . You are happy with the results, enjoying the thrill of going fast . As with most C# projects done test-first, you have some code that looks Read More...
Postedby jaybaz_MS | 17 Comments    
Popular patterns around events?
01 July 04 05:03 PM
In Properties with events: another attempt , Omer said: I would rather have a protected virtual OnSet method and AfterSet event than just an OnSet event (also consistant with the naming convention ;). I know understand that this is a common pattern found Read More...
Postedby jaybaz_MS | 6 Comments    
Making regex less painful
01 July 04 03:09 PM
So, Regex is darn powerful. But they’re hard to write correctly, hard to read, and hard to verify. To wit: Regex repositories around the ‘net, where you can find regexes instead of writing them. ( google ) Regex tools – Eric’s Read More...
Postedby jaybaz_MS | 7 Comments    
Looking for guidance on exceptions
01 July 04 02:51 PM
Are there any books or other media that have good guidance on the use of exceptions in code? I'd like to get really deep here, so we can get a good understanding of how & when to use exceptions correctly. What's your favorite? Read More...
Postedby jaybaz_MS | 6 Comments    
Refactoring Party
01 July 04 12:24 PM
In What are my Goals? , Jim asked : How do you plan to "Develop a culture of energy, productivity, and learning on the team"? One of the activities I have in mind is a reoccurring Refactoring Party. It works like this: Each week we come together for an Read More...
Postedby jaybaz_MS | 10 Comments    
PDB always
29 June 04 11:51 AM
In my last post , I wrote: “ Debugging information (pdb). Set with ‘csc /debug[+|-]’. It doesn’t affect codegen, so it’s really not very interesting.” In my opinion, this should always be on, and compilers shouldn’t Read More...
Postedby jaybaz_MS | 8 Comments    
Looking for small programming problems
28 June 04 04:34 PM
Suppose I have some new crazy idea about development. I'd like to try it out on a problem big enough to be interesting, but small enough to be doable in a short time. Got any favorite small programming problems? Read More...
Postedby jaybaz_MS | 4 Comments    
Books
28 June 04 04:31 PM
Object Thinking I think I'm giving up on Object Thinking. I enjoyed it for a while, and it has had an important impact on my thinking: The four fundamental assumptions in Object Culture. ( e.g. : “Everything is an object”) When designing a Read More...
Postedby jaybaz_MS | 9 Comments    

This Blog

Syndication

Page view tracker