jaybaz [MS] WebLog
We believe in nothing.
March 2004 - Posts
Formatting code in blogs
30 March 04 10:31 AM
In a comment , Steve asks how I format code in my blog. Here's the answer: Write the code in Visual Studio. Include correct references, 'using' directives, helper classes, fields, etc. Make sure the code builds. (I really should use NUnit to make sure
Read More...
Another clear code challenge
30 March 04 10:08 AM
Zhanyong posted his own programming challenge , including this comment: “The merit of an entry will be judged mainly by how clear the code is , not necessarily the efficiency” Right on! This one is a little bit more challenging that mine,
Read More...
Clearest Code Challenge: Jesse Ezel's answer inspires!
29 March 04 03:47 PM
Jesse posted a comment with a unique approach: Make a class that's good at laying out buttons on the bottom-right of a form. I could definitely imagine adding a Help button, for example, which would make this generality helpful. As for clarity, the downside
Read More...
Tech Preview now available!
26 March 04 10:34 PM
Wahoo! As I had previously discussed , the first Technology Preview for Whidbey became available this week. We will have a lot to learn about the whole process here - collecting & responding to feedback, delivering releases, etc. So, it makes sense
Read More...
Clearest Code Challenge: My answer
26 March 04 03:58 PM
Here’s my solution. const int spacing = 12; _buttonCancel.Location = new Point ( this .ClientSize - _buttonCancel.Size - new Size (spacing, spacing)); _buttonOK.Location = _buttonCancel.Location - new Size (spacing + _buttonCancel.Width, 0); It’s
Read More...
Clearest Code Challenge: Honorable Mention
24 March 04 11:03 AM
Honorable mention to Thomas Eyde. His submission uses a new class, so he gets points for trying to be OO. I don't think this approach was fruitfull, though; the result is pretty complex to my eyes. He’s also the only one who submitted legal code.
Read More...
// blue cheese & brie
22 March 04 12:35 PM
A comment on the Clearest Code Challenge inspires this post. In particular the bit about how someone can figure out the code if it's commented, “no matter how crap the code is”. Perhaps. Comments are smelly. Really. From Ward's Wiki : “Refactor
Read More...
Clearest code challenge
20 March 04 10:22 AM
This is a real problem I had recently. Suppose you have a form with OK and Cancel buttons. You want the buttons to be placed in the bottom-right corner of the form. Normally you'd place them where they go, then set their Anchor properties to Bottom, Right.
Read More...
Edit & Continue vs. Test-Driven Development
20 March 04 09:14 AM
When you do TDD , your code takes on a very different structure than without TDD. Each line of code is motivated & tested by a test. Code is decoupled, just like my Computer Science profs used to talk about. You may not write the correct piece of
Read More...
Safely firing an event
19 March 04 10:46 AM
This came up on an internal alias, and I thought I should spread it around. If you’re going to fire an event, you may have code like this: void F() { if (SomeEvent != null ) { SomeEvent(); } } There’s a race condition here. If another thread
Read More...
Retrofitting unit tests on legacy code
18 March 04 01:23 PM
What I say here isn't original, but maybe you'll find it useful. I wrote it for today's C# Unit Testing chat. Q: I'm quite new to TDD - are there any best practices for retrofitting existing code with unit test. A huge task. A: A common question, and
Read More...
Unit Testing chat TODAY!
18 March 04 11:21 AM
Microsoft is hosting a chat on C# & Unit Testing today. Jim Newkirk will be there. I will, too. Edit: log from the chat available at http://www.msdn.microsoft.com/chats/recent.asp
Read More...
Edit and Continue vs. Elvis
18 March 04 11:19 AM
Continuing on a theme, today we talk about Elivs and E&C. We don't have a good way of measuring how Elvis uses E&C, since C# has never had the feature in a released product. So, what I say here is even more likely to be wrong than normal. Elvis
Read More...
Suggest a topic
15 March 04 11:23 AM
What would you like me to blog about? More of what you've seen? Something completely different? Comment here...
Read More...
Whidbey Implement Interface
15 March 04 11:11 AM
Anson talks about what some work we've done on Implement Interface. When I code today, I always use “Explicit Implementation” for interfaces. My thinking is that the interface represents a contract with an “external”. If I happen
Read More...
Sloop-a-palooza!
15 March 04 10:24 AM
This past weekend I took the Sloop-a-palooza class at the Center for Wooden Boats . It was a beautiful day. Warm (60 deg F) and sunny. We sat on the docks and talked about sail shape & hull hydrodynamics. The big lesson for me was about overtrimming
Read More...
Putting the tee BACK in tee dee dee
15 March 04 10:04 AM
Christian posts about the word “tests” in test driven development. He's absolutely right: we get hung up on the word all the time. Around here, every time we start talking about TDD, the testers get all nervous. “Does that mean you don't
Read More...
Edit and Continue vs. Einstein
12 March 04 12:54 AM
Continuing the discussion with Einstein , the prototypcial C++ developer. Einstein often creates software solutions to some pretty complex problems. He spends a lot of time trying thinking about different approaches to the problem, and tries to pick the
Read More...
Edit and Continue vs. Mort
11 March 04 11:27 PM
All this talk about E&C, I thought it'd be a good idea to talk about the personas. Ian has a good description of the personas we use when talking about Visual Studio users. There's a language correlation, too. VB primarily targets Mort, C# targets
Read More...
C# Edit & Continue vs. Refactoring
11 March 04 11:08 PM
Sean asks for it, and Andy blogs some of the thinking behind no E&C for C# . I really like using E&C when writing C++, and I know that VB users find it pretty valuable. Seems strange that we wouldn't have it for C#, yeah? When we talk about the
Read More...
Software Performance & Hardware configurations
09 March 04 03:46 PM
The minimum hardware requirements for Visual Studio 2002 and 2003 are a machine with a 600MHz CPU and 128M RAM. A few months ago I picked up a new HTPC for cheap. Dell 2.4GHz, 128M RAM for $324. I see the deal reappear about once / month. I just added
Read More...
Performance Scenarios
09 March 04 03:34 PM
Perf for an editor is extremely important. Because editing is completely interactive, you really don't want a noticible delay in most cases. One of the first things to decide is what kinds of things you want to measure. Here's the list we're working on
Read More...
SailNOW Graduate!
02 March 04 08:54 PM
This entry is a departure from my other entries, in that it has 0 to do with computers. Please comment on whether you liked it or not. I've just completed the SailNOW! program at the Center for Wooden Boats . I've been wanting to sail for about 8 years,
Read More...
Go
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
.