jaybaz [MS] WebLog
We believe in nothing.
Browse by Tags
All Tags
»
Visual Studio
»
Development Practices
(RSS)
C# Edit and Continue
Refactoring
What I'm doing these days
28 January 05 01:52 PM
Gee, this blog has been pretty quiet. Why? Could I have lost interest in the connection with all the C# developers in the world? No! My responsibilities have drifted somewhat, to areas that make less sense to blog about. Dev Lead I'm the development lead
Read More...
'switch' in C#
15 November 04 06:02 AM
On Eric's blog, a discussion about 'switch' statements in C# & why they require 'break' inspired this post. One of my favorite principles in the design of C# is that it forces you to be explicit when that removes confusion. The best example is the
Read More...
Won't Fix or Postponed?
16 September 04 10:42 AM
In our bug database, when resolving a bug, you have to select a “Resolution”. Obviously you can resolve as “Fixed”. Other options include: By Design - this isn’t a bug, we meant it to work this way. Not Repro - you were mistaken, this bug doesn’t exist.
Read More...
Separating out unit tests
09 September 04 02:33 PM
This question came up on a customer chat today. It’s probably interesting to a wider audience, so I’m posting it here. I'm currently doing TDD with NUnit. With the upcoming testing tools in Whidbey, how do you see the separation of tests from production
Read More...
A Factory pattern
01 September 04 02:49 PM
The idea popped in to my head, so I wrote it down. I’m not sure what it’s good for, but here it is: class C { private C() { } public static class Factory { public static C New() { return new C (); } } } class Program { static void Main ( string [] args)
Read More...
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...
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...
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...
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...
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...
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...
The C/C++ casting codundrum.
18 June 04 02:20 PM
In C, casting is simple. “See that thing on the right? It’s really a thing on the left.” The compiler was perfectly willing to consider any set of bits as whatever you like. With no inheritance & no casting operators, types generally
Read More...
rethrow for debugging
21 May 04 06:16 PM
A question came up on an internal email list. You will get this error in the following code, as per the rules of C#: try { .... } catch(Exception e) { // Handle cleanup. throw; } With the exception of disabling this specific warning, is there anyway to
Read More...
Scott’s lazy loader
30 April 04 03:37 PM
Scott Wisniewski posted a lazy loader implementation on his blog. He coded it blind, without the help of a compiler that could do C# generics. I went back through and made it legal C# code. I also did a little refactoring. The ILazyLoader is now nested
Read More...
CCC2: InitializeComponent()
28 April 04 02:14 PM
Call it a Clearest Code Challenge: What should InitializeComponent() look like? What’s the best code you can imagine, that the WinForms designer should generate? Let’s take a simple, concrete case: a form with an OK button. The button is anchored
Read More...
More Posts
Next page »
This Blog
Home
Links
Tags
Admin vs. Normal User
C# Edit and Continue
Development Practices
Personal
PowerShell
Refactoring
Sailing
Visual Studio
Windows Home Server
Archives
November 2007 (2)
October 2007 (3)
September 2007 (2)
June 2007 (1)
April 2007 (2)
March 2007 (2)
February 2007 (1)
January 2007 (4)
October 2006 (2)
August 2006 (1)
May 2006 (1)
October 2005 (2)
August 2005 (5)
May 2005 (2)
April 2005 (6)
January 2005 (3)
December 2004 (6)
November 2004 (4)
October 2004 (3)
September 2004 (9)
August 2004 (14)
July 2004 (28)
June 2004 (54)
May 2004 (26)
April 2004 (16)
March 2004 (23)
February 2004 (11)
January 2004 (2)
December 2003 (3)
Syndication
RSS 2.0
Atom 1.0
See also my
Personal blog
.