October 2005 - Posts
During MIND, a colleague asked the audience if they were developing sexy shit. Bob Koss says it more politically correct, and calls it refrigerator code.
While doing a TDD class, he explains the rules of Simple Design. A student called it refrigerator code, which is code you're so proud of you want to take home and hang it on the refrigerator, right alongside of your children's drawings.
I'm not sure how much, but Wil Shipley seems to think
an awfull lot! And he seems to have some pretty good reasons as well! As Ben Reichelt
says, you'd almost want to throw away all your unit tests! But after reading his arguments, don't forget to read some comments as well. And for my colleagues, come to my TDD Mantra presentation on the 28th of november!
It was only recently that I blogged about the Five Pound Bag. Now Ron Jeffreys explains why making the date is not a development responsibility. And it’s just amazing how sometimes such logical things can hit you like a ton of bricks.
On a lot of projects, there’s the problem that there’s too much to do in so little time. However it’s Ron Jeffreys opinion that every project should begin with high goals and a short deadline. He explains that a project with high goals can look at a wide range of capabilities and then, informed by reality, can decide what to implement.
It’s not that we don’t have enough time. We have too much to do.
This was my eye opener. When developers (as I am) see a deadline we can ‘never’ make, we start discussing the deadline. I don’t think I’ve ever been in a discussion where the deadline wasn’t mentioned. And as Ron says:
For most projects, resources are pretty much fixed. And we've already decided that the date is sacrosanct. What's left? Some managers assume that it's sufficient to demand that the team work hard, with a sense of urgency, and get everything done. Well, that's really good fiction writing, but it's not management. Management is the process of meeting the goals as well as possible, within the limitations of time and resources.
He explains this using a washing machine. No matter what you do, you cannot make it run faster. You can try to push more cloths in, but it’s done when it’s done. Even shouting won’t help. He goes even further, and this is my favorite, keeping the machine well-maintained will serve you over the longer term.
The conclusion is that it’s not a developer’s job to make the date; it’s primarily management and customer responsibility. They have to steer the project in a way we can have most goals by the date we have to deliver.
Besides the fact I haven't started yet, it can't get much more official then this.
While I wasn't really looking for a new job, when the opportunity for Class-A came along I could not resist. The past 8 years it has been my job to deliver software for clients, and that I really enjoyed. At Class-A I'll try to extend my knowledge and pass on to others what I've learned and will learn. Sharing what I've learned is something I have done from the very beginning and is what I really like to do. I believe Class-A is providing a unique opportunity here and a big change in what I'll do every day. That's the reason I'm changing.
For nearly 5 years I've worked at LogicaCMG and learned a lot, and not just on technical side of things. These 5 years also contained a lot of fun with a lot of good colleagues. It would be crazy to name everyone, but I have to name Patrick, Marco, Erik, Novita, Wim, Ritsaert, Edwin, Eelco and Eddy, who all contributed to one single project on which we had a lot of fun. We'll have to do another "EB Uitje" again, some time soon. I'll definitely miss the discussions with Pascal! ;-) And of course Mark Mooy, one of my best colleagues as well, the one I've worked for all these years. (I'll hereby resign as President of the BACC. ;-)
Anyway, there are still some interesting things to come within LogicaCMG, one of them a presentation on Test-Driven Development. I'm already enjoying the effort spent into creating the presentation. This will be part of my legacy which I'll hope people will use to enhance their own developing experience. From december 1st, I'll be joining Anko, Astrid, Frits and Alex.
Unfortunately Visual Studio 2005 RTM isn't online, as Jeffrey Palermo 'promised'. Strange enough his post has been removed from his blog.
In his last post, he talks about what MSDN says about Test-Driven Development. Microsoft advises people to draw classes and interfaces with the class designer. As we know, the code is then automatically added to your projects. Then Microsoft advises to generate test classes from your designed classes and interfaces, and then the TDD process begins.
Jeffrey says, Microsoft isn't creating the tool to fit the process, but redefines the process to fit the tool, as it seems. This is indeed a bit strange, especially when you believe one of the main reasons to use Test-Driven Development is so you'll have a better (loosely coupled) design. When you first design all your classes and interfaces, and generate tests from these, it's totally the other way around again. But I'm a little confused by what Microsoft says in their guideline here.
I'm currently preparing a presentation for a meeting within our company, to explain Test-Driven development to my colleagues. I'm also using Visual Studio 2005 and I'm loving the refactoring support in it. I (unfortunately) haven't used Resharper a lot in the past, but Jeffrey says VS2005 won't generate production method stubs from a test, while Resharper can do this in VS2003. I however have used this and it works (almost1) great. What I did is create two projects, one for my implementation classes and one for my tests. I've just drawn (dragged 'n' dropped) some classes in the designer, which were than generated into my project. I did not create any properties or methods, just the empty classes. Then I added a reference from my test-project to my implementation-project. I added a TestMyImplementationClass testclass (confusing yet?) and wrote a test method. VS2005 immediately began to make noise that it could not find the methods I was referring to. This is correct, because I had not written any code inside my newly designed classes. I hovered over the method I tried to call, and this little refactoring icon appeared. I hit the "Create method stub" option and the method appeared in my implementation class, with a beautiful NotImplementedException inside the method. That's it! It hit the execute tests button and I got a red light, and no compile errors.
I then implemented the code, ran the test again and the test succeeded, green light!
Isn't this exactly what Microsoft is saying in their guideline? I am however a bit confused by the fact that even Microsoft states:
The traditional TDD process does not contain this step. Instead, it advises that you create tests first. This step is included here so that, while creating tests, you can take advantage of two features in Visual Studio 2005 Team System: the GUI design capabilities of the Class Designer, and the automatic test-generation capabilities of Team Edition for Testers.
As Uncle Bob says, in Agile/XP we don't do BDUF, but we definitely do think about design and/or specifications. And the Microsoft guideline doesn't tell you to write a lot of code (or do BDUF), but to add a minimum of code, just enough to compile. Isn't that what we're supposed to do, just write the minimum amount of code so we don't get compilation errors? We have to be able to run the tests, or else we don't get the red light we need.
The Microsoft guideline is a little vague, but in my opinion not (totally) wrong.
1 Almost great, because VS2005 sometimes gets a little bit confused. In one test, I called two methods that weren't there yet. The first I could generate via refactoring, the other I couldn't, because the option just didn't came up. After screwing around, it did however.
[update] : I got one bit wrong, and that was that you indeed cannot draw a lot of classes and then start your Test-Driven Development, even less while generating tests for you from the IDE. I still think the designer can come in handy though, when you're more 'drawing' out some options, playing with patterns perhaps, etc. Test-Driven Development however is about design, and when you first design something and then do TDD, you got it all wrong. :-)
Martin Fowler writes about project planning and why the Agile way is the better way. He compares bad planning with trying to put 10 pounds of shit into a 5 pound bag. No matter how hard you push, you can't get the 10 pounds into the bag. I've seen 6 pounds go in, but never 10 pounds.
There are also managers that try to get 20 pounds in the 5 pound bag. Although to me totally illogical, they seem to think that, when you place four developers on the project, they can divide the 20 pounds by four, resulting in 5 pounds. That's exactly what fits in the bag.
As Fowler says, you have to make room for everything, especially new features. When you want to add a new feature, you always have to ask 'what do I take out to make room?' Fowler says that when you see features being added within making room, planning is done badly. This is so logical, at least from my point of view. How come project managers don't follow that simple rule?
When reading the latest posts about XP == DATT by Paul Gielens, I noticed him mentioning UML as Sketch. And suddenly this new Visio 12 feature was in my mind, that I had just recently blogged about.
As Fowler says it, you can draw your sketches on a white board, but also in a light weight drawing tool. I'm not sure if Visio can be seen as a light weight drawing to, but let me clarify. I know when mentioning Visio to RUP and UML fanatics, they want to set both you and Visio on fire, or just chuckle at you. Haven't you heard of this great toolset Rational created? Yeah, I reply, and haven't you heard of user friendly interfaces? Man do I despise that toolset.
The current Visio isn't that user friendly either thought, when you look at all the property screens with a dozen tab-pages that come up when you draw a new class in your diagram. But that's where currently my most favorite stencils come into place. Just throw on your UML 2.0 shapes and sketch in those properties and methods, if you want.
I'm not sure how Visio 12 handles those dreaded property screens, but after thinking about this sketching technique, I sure do like (or will like) the new ability to add new shapes by just clicking these arrows I mentioned.
No official statement yet -as it seems- but according to Jeffrey Palermo the RTM of Visual Studio 2005 will be on MSDN the 15th of october. I can't wait until the final release, as I'm using VS2005 Beta 2 at a customer as we speak. Or rather not as we speak, because currently I'm writing this in the Community Server admin screens.
I can't use the RTM at our customer, but I can at home. And to know I just installed Beta 2 after a complete reformat of my Windows drive at home.
A rather big event was held yesterday by the company I work for, in coop with Microsoft. Information was presented on the alliance between our companies, the MCAP program (which I thought they called LEAP, but probably because of the beer I forgot) and more. Then came the fun stuff, they presented Windows Vista.
They showed the usual stuff presented at, among others, PDC. I cannot express how much I like the new layout. I don't think alt-tabbing through applications in 3D will be used often, but the little preview windows when hovering over the taskbar I like very much. They showed a lot of search which a lot of users will probably love. And it all seems to work really, really fast. I wonder what kind of machines they use to show everything.
There were multiple presentations running parallel, and a lot of people went to the session where Microsoft presented VSTO. I kind of wonder why people dig that so badly. I know it beats developing in VBA, but it's still developing for Office, which I myself am not to fond of. Instead of ThisWorkBook.Worksheets("Sheet1"), you use Globals.WorkSheet.Sheet1 or something, and from then on it's probably more of the same. If you're looking for attention thought, it's probably a good bet to start specializing in VSTO, as managers, secretaries and many more people will love you for making Office applications for them. And using the taskpane to ask people for input, is definitely "wunderbar"! Your secretary will love you for it!
But then Office 12 itself was presented. And as 'sexy' as Vista looks, so does Office 12. I love the ribbon. (Side-note: I loved the story about the fact that the left side of the ribbon is kind of a dead spot to Office 12 users). What I had not seen before, was Visio 12. When you throw some shape onto your page, and hover over it, it adds arrows in all four directions. When you click an arrow, it creates the same shape again, but also the connection between those. It's the simple things that makes Office 12 such a great product, and I hope a feature like this will be extended to things like class diagrams and (especially) sequence diagrams. I always have trouble laying out a nice sequence diagram because of the little space I have.
The presentations were really great, as were the presenters. And don't forget my colleagues, we had a lot of laughs! At the end a game was played. Questions were asked and if you had it right, you got into the next round. Grand price was an XBox 360, which Ritsaert, a friend of us, won. He deserved it! :-) I got out in the first round, because of a question how many people registered for the event. As it happens, I developed the web application where people could register for the event. So I knew the exact number, although I know another number was presented in the final invitation email. I knew which answer they wanted, but I just could not get myself to give it. Erik Brinkel, a manager with us, who presented the quiz, asked me on stage to make me feel like I won, to than just say "Sorry man, you got it wrong." I told him I knew exactly, but it didn't help! ;-) Oh, but Erik, I forgot to tell you I know what you registered for a diet. It was "een streng dieet van kaviaar en champagne". :-)
Anyway, I really enjoyed the evening and hope next time I'll be invited as a guest! ;-)
Because of some issues we're currently having, I disabled some content on the frontpage.
I'll try to work on something in the coming weeks, to make it all a bit more usefull what's on there. If you've got some ideas, don't hesitate to leave a comment or get in contact.