August 2005 - Posts
Telligent software, founded by Rob Howard, former ASP.NET Architect at Microsoft, keeps to amaze us. They just launched a new initiative called the .NET Developer Community Program, .NET DCP in short. The idea behind this, according to the site, is to provide all public .NET community sites to free Community Server components, developed by Telligent.
Of course we signed up immediatly as we think we're a free, non-profit based Microsoft/.NET community site. So I've sent them an email and write this to put some pressure behind it! ;-) But seriously, there are some addons I'd definitly like to install, like the File Gallery and perhaps in the future NNTP. I also expect more addons will be available in the future.
If you run a Microsoft/.NET based community, be sure to read this thread.
I was just looking at the statistics, mostly because I think there's a problem with CommunityServer and its referrals. Referrals are in the IIS log, but aren't recorder in CS, which seems kind of odd, don't you think? These things are pretty hard to track down on our server, and when they're not reproducible locally, it's not easy to locate the problem.
Anyway, I looked at some others stats as well, and what I noticed was that the Google bot has used 128MB of traffic this month, and MSNBot (I can only guess where that one comes from) used a whopping 2GB !!! Is it Microsoft that just everything needs more memory, more drivespace, higher resolutions, more powerful cpu's and now even more bandwith and traffic?! I mean, does Team Foundation really need four 2.2Ghz CPU's, 150GB harddrive space and 4GB of memory upon installation? And does MSNBot really need to use 2GB of my monthly traffic? Come on!
Another thing that I noticed was that Internet Explorer (no filter on version) only took 48.7% of all browsers that visited us. But that can probably be explained by 33.3% of unknown browsers being RSS/Feed/WebFeeds/Atom readers pulling data and being 72.2% of the 0-30s long visitors on our site. But when people leave their reader, 8.5% spend longer then one hour visiting our site, against lower numbers for every other time being spent.
Something else that bugs me. Comment spamming has seriously decreased since we installed Community Server. But for some reason, these poker/stripper/hacker/romantic-maui sites are all over our referrals. What's the purpose of this, what do they benefit from this? It just bugs me that my referrals are all messed up with these links, but I never ever follow one of these.
To our bloggers. It probably pays to be blogging about Vista, instead of blogging about .net. (the very poor punt intented ;). Although it's only a few percent of all search phrases, they do contain the #1 position in the logs. And yes, virtualbeertender is still holding a very high score, ever since the beginning.
Before Test Driven Development (TDD) most developers just randomly clicked through a small part of the application they had just created, before turning it over to the tester. If there even was a tester. Probably everyone knows the number of bugs that bounced back and forward between testers and developers, and the time it took to reproduce the bug, find the source of the bug and then fix it. Only to find out you broke some other part and the process restarted.
These days, more and more projects at least use unit tests. And hopefully you use TDD, as this will definitely enhance your code in many ways.
Jeremy Miller wrote about Agile practices and how they can help staunch the flow of defects. He describes some of the reasons that can introduce bugs, such as just plain developer mistakes, requirements that aren't understood and edge cases. These are the cases that you just didn't expect that would happen. I'll get back on this later.
Jeremy also points out an invalid test environment can be one of the sources that can introduce bugs. Of course these are bugs that aren't really there. The tester however just sees something's not working and reports this in his tool. A (large part of the) solution would be to use automated builds and Continuous integration (CI). He even goes as far as to say that any project team that doesn’t have a dependable automated build of some sort is amateurish.
I would recommend, that when you setup a project, use the time to setup automated builds and CI and you'll experience the benefits for yourself after a while.
Back to the edge cases, as promised. Jeremy links to Jonathan Kohl his blog, and especially an article about where Jonathan describes how he reproduces an non-reproducible bug. In a nutshell, Jonathan tries to find out why one particular tester keeps finding a bug that no one can reproduce. The bug is found in some code that's inside an installer. It tries to embed some code into a device. But because of the connection to the device that's not fully seated, and the device itself was rocking a little because of some elements and during typing, the upload failed and timing issues occurred. The installer didn't respond correctly to these facts and the bug was found. Jonathan noticed the rocking of the device from the corner of his eye, and he simulated everything at his own desk by doing the installation, while rocking his desk with his knee. His colleagues thought he was crazy, but after explaining the developer went from "that can't happen" to "uh oh, I didn't test if the system time is back in time, *and* that the connection to the device is down during installation to trap the error."
How's that for a tester? Follow his weblog here. I think developers might learn from reading the occasional blogs like these. Developers and tester (should) work together tightly, so learn how they think, get inside their heads. In my experience most developers "hate" testers. At least I know I do some times, especially when discussing the term 'showstopper'! ;-)
I'm currently at a client where they use Excel extensivly. They use C++ libraries for heavy calculations, C# for some other libraries and if I'm correct, VB6 to let Excel speak to all those libraries. A pretty wicked configuration, if you ask me. Worth mentioning is that they tried talking from within (managed) C# to the (unmanaged) C++ code and made a lot of calls to the other side. A lot. They were kind of surprised that it was so slow.
But anyway, the problem was that although the C# code was compiling properly, increasing build numbers every time, inside every assembly a reference to a specific interface assembly was wrong, referencing and old version. This was the error we got:
COM Interop registration failed. Type library exporter encountered an error while processing 'xxx'. Error: Type library exporter can not load type XXX.Xxx.xxx (error: System.IO.FileLoadException: The located assembly's manifest definition with name 'yyy' does not match the assembly reference.
The solution to this is, to remove all references to the specific assembly and shut down Visual Studio. VS.NET 2001 in our case.
Then load up VS.NET again and add the references again. Then it should work.
It seems that VS.NET imports the Type Library of the COM enabled assembly when adding a referencing to it. When you just remove the reference and add it immediatly again, the old Type Library remains in memory and it's not updated.
One of those things you just have to know. Luckely for our client, Richard van der Pal did know and helped us out!
Today I was browsing a site about Java. Don't get me wrong, I'm not switching, but I found something interesting there. And the fact that the url was www.java.net made me go look. ;-)
We've all seen code that smells. Code that smells like refactoring. On this Java website they created a rather extensive list of smells, with proposals on how to remove the smell and create ridiculously good looking code.
The first one is about comments in your code. As the description says, it "should only be used to clarify 'why', not 'what'". One example given is the Extract Method, which I both like and dislike. I know about the SRP, but just refactoring everything in its own class and/or method somethings feels like going a bit too far. Although with the example given, you at least get an idea. The Rename Method is also one to remember if you don't already do so, but the Introduce Assertion I've never used it like that. Normally I just check for null references with if statements, and this is indeed shorter but might take a little longer to read.
When I read this, I just had to post it. People might now I like to play games and especially MMOPRG. I can only advise not to start playing one. I've heard other people say it's more addictive then crack. I'm not sure how addictive that stuff is, but I know MMORPG is indeed very... I've quitted playing MMORPG however, need some time for .NET 2.0. Anway...
Some guy was posting on the forums of World of Warcraft, when the following happened:
Brion, Tuesday aug 16th, 2005 @ 3:29 AM
ok i have a proposition for the horde, let us kill Korrak while you sit and watch. and well let you get all the honor youll ever want=}. no? ok well it shall be a great battle then, hope to see everyone there!
Fayda, Tuesday aug 16th, 2005 @ 8:44 AM
Pardon me for hijacking the thread, here..
But, Brion - if you don't want your mother to know you were up and on the computer at 3:29 in the morning - DON'T post on a forum that she reads.
Now is that funny or what?
For those that don't understand, this guy Brion (a level 57 Night Elf) is posting at 3:29 in the morning, when his mother was expecting him to be in bed. The next morning, his mother gets up (a level 59 Human) and starts reading the forums as well. She sees her son posting in the middle of the night, and grounds him for that! Now's that funny or what?
A lot of OWNED and LOL! replies follow with her mother adding to the conversation:
Fayda, Tuesday aug 16th @ 12:14 PM
Yeah, you won't be seeing Brion at Alterac Valley tonight...
I'm going to make him watch a movie with me instead. I'm thinking a real chick flick - Steel Magnolias or Moulin Rouge. :)
Now is that funny or what! Go read the full thread here.
And have a good weekend, I'm off...
If you pass by here on a regular basis, you might've noticed my affection for Agile based methodologies lately. I'm reading up quite a bit on both web and in my current favorite book. However, I find very little information on what the ideal workspace is for Agile projects. What I've found is that everything should be open, so you can communicate with every team member with ease. You also should be able to access your own stuff very easily, as well as that of other people. Of course not browse their personal mail, but you get the picture. You also need to have good hardware, good desk, but that's a must-have on every project, Agile or not.
However, I haven't read how exactly such a space should be setup. And this is a subject I definitely have a personal preference in. In my career I've been at quite some situations that I thought were ideal, or not so ideal. One of the best practices for me, was on a project that started with three developers and later grew to 6 developers. The first three developers sat next to each other, in one (horizontal) row. Later on, three new developers their desks were placed to the opposite of the first three, and sat face-to-face with the first three developers. I also think three in a row is the max, because the distance for both developers on the sides is the maximum distance that should be used. When four developers are on a team, you should probably create a block of 2x2 desks.
This is in my idea a best practice because every developer is close to every other developer on the project. When two or more developers start a discussion about some problem, every developer can hear about what is being discussed and can join in if they think they can add something to the discussion. The same goes for projectmanagers or business analysts, whenever they talk to a developer at the table, everyone can hear what's being discussed.
I think this is very important. In one of my latest projects, we had 4 developers, a project manager and a tester. Every two members of the team were facing eachother, but had another two members of the team behind them. This resulted in 4 blocks of two desks in one vertical row with a length of about 15 meters. Me and the project manager were both at complete ends of the room. A lot of times, things were discussed and not everyone of the team knew about it. Of course this was also part of another problem, that communication via email, on paper and on whiteboard (for example) wasn't optimal. But a lot could've been solved when the room had the setup I just described as a best practice.
Another example is where desks are almost placed randomly in a room, most of the times two desk next to each other. I've seen this in a large project where a framework was created when .NET wasn't common practice yet. Because of this, a lot of discussion was going on. But because of small walls placed between some desks (think of cubicles but much more open, you could only look over a wall if you were standing), you just could not communicate like you wanted to. You'd have to walk to the other side of the 'wall' to ask something to a developer that was on your own team. Not an ideal situation.
Of course people should also be able to work in a room with a lot of people. This always means people will be talking with eachother, may it be work related or not. Whatever the setup is, I always prefer open rooms because I just enjoy knowing what goes on in the team and join in on it, if I think I can contribute. This doesn't always have to be work related.
At my current project, there are 9 desks in one line next to each other, every desk is facing another one. Not sure if it's ideal, maar in ieder geval wél gezellig ;-)
For some applications, I always want to try out the latest versions. They sometimes contain such cool new features, or look so much better, you just have to get those. Office, while adding nothing new for me personally, is one of those. To see the new cool icons sometimes just does it for me. Of course the new Visual Studio and now Team System, just gotta use them.
And now Internet Explorer 7 Beta 1 was released on MSDN. I'm not sure about this new version, but the previous integrated into Windows so deep, it could totally bring down Windows because of bugs, if you'd just install it. But now, Jon Galloway has a way to bypass this all, and keep running IE6 while testing IE7 next to it.
IE7 comes as a download from MSDN and is a self-extracting archive. This means it's (in this occasion) a WinRAR file that you can (manually) extract into some folder. Now find the file SHLWAPI.DLL and delete the file in that directory. Create a new textfile, call it IEXPLORE.exe.local
This new textfile with the .local extension makes IE7 run in local mode, which means it won't mess with your IE6, registry settings, etc.
And for nerds like me, there are older version of IE that can run standalone which can be found at browsers.evolt.org and at skyzyx.com. Since I haven't run IE before IE4, it's nice to check one out pure for the fun of it!
I just saw on Gordo's website a link to 101 samples of C# code for Visual Studio 2005.
For those people that cannot understand C#, Microsoft was so kind to provide VB.NET samples as well. For those still active in Visual Studio 2003 (probably 99.9%) there are also 101 samples for that version. If you're still doing 2002 (Hi Robert Jan) you can just forget about this post.