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...
Postedby jaybaz_MS | 12 Comments    
Filed under:
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...
Postedby jaybaz_MS | 0 Comments    
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...
Postedby jaybaz_MS | 5 Comments    
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...
Postedby jaybaz_MS | 1 Comments    
Filed under:
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...
Postedby jaybaz_MS | 12 Comments    
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...
Postedby jaybaz_MS | 1 Comments    
// 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...
Postedby jaybaz_MS | 5 Comments    
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...
Postedby jaybaz_MS | 18 Comments    
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...
Postedby jaybaz_MS | 4 Comments    
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...
Postedby jaybaz_MS | 14 Comments    
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...
Postedby jaybaz_MS | 0 Comments    
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...
Postedby jaybaz_MS | 2 Comments    
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...
Postedby jaybaz_MS | 26 Comments    
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...
Postedby jaybaz_MS | 5 Comments    
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...
Postedby jaybaz_MS | 1 Comments    
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...
Postedby jaybaz_MS | 4 Comments    
Filed under: ,
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...
Postedby jaybaz_MS | 6 Comments    
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...
Postedby jaybaz_MS | 6 Comments    
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...
Postedby jaybaz_MS | 22 Comments    
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...
Postedby jaybaz_MS | 7 Comments    
Filed under:
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...
Postedby jaybaz_MS | 4 Comments    
Filed under:
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...
Postedby jaybaz_MS | 6 Comments    
Filed under: ,

This Blog

Syndication

Page view tracker