Skip to main content

Blog

Structuring your projects

·1 min

At my current project, I’m trying to bring some structure in our visual Studio projects. But I’m finding myself not sure about how far I should go. Maybe you should know I tend to be something of a purist. At the moment, we created a project with a single class, because it didn’t belong anywhere else. So we created a client specific ‘Common’ project and put the one file there.

Remoting, serialization error, CallContext, Clone()

·2 mins

I couldn’t come up with a decent title for this post, so I just spit out some keywords.

We got an error today, stating the Controller of some object we wanted to put on CallContext needed to be serializable. Not thinking about the weird content of this error, we tried what would happen if we made the controller serializable. We now got a different error, which was even more weird:

Design guidelines – again

·1 min

I saw a presentation monday to explain the basics of .NET to some starting developers. In that presentation, I saw a piece of code design I don’t think should be showed. Ever. Especially to people who are about to enter the .NET world. In one cs-file, I saw a base class, two inheriting classes and then again two classes which inherited from on of the former mentioned classes. So there were 5 public classes in one file. A shiver ran down my back …

Here we go – summer 2005 edition

·1 min

We landed in Eindhoven this morning after a great holiday in Turkey. I’ve done some resting, got a tan and I’m ready to go for the rest of this year… And not only at my job: I’ll also pick up on blogging about .NET again.

Leaving on a jetplain…

·1 min

I’m leaving for a 2-week holiday next sunday. Or actually, I’m going to a childrens camp as group leader for a week first, and after that I’m in need of a holiday ;). So then I’ll be leaving for 8 days of sun in Turkey. I’ll be back august twentysecond, but the two days after that are filled up with some in-house training, so my blog might be kinda quiet the next few weeks. But don’t worry: I’ll be back blogging my ass of before you know it 😉

The conditional operator (? :)

·2 mins

Every now and again I see a piece of code where the author has used the conditional operator ? : . It might be my tidyness or it might take some getting used to, but I don’t like it. I don’t like it at all! My gut feeling says it’s nasty, because it’s not easy readable code. Lets look at an example. Imagine you have a property getter for the count of a collection. When the ArrayList you use internally is null, you want to return 0, else you want to return the count of the internal ArrayList. With the conditional operator, this looks like this:

New: post rating

·1 min

Since we upgraded to Community Server, visitors are now able to rate posts. This way you can let the bloggers here at bloggingabout.net know what you think about the things they post. Give it a go!

DataSets vs Classes

·1 min

Should I choose datasets or will classes do the trick? This is a question each developer probably asks himself (or herself) at the beginning of a project. And maybe even along the way…

If I had to answer that question, I wouldn’t now what to say because I think it depends on a lot of things which of the two will be better. Both of them have pros and cons. DataSets for instance are very easy to persist in a database. Classes on the other hand can enforce business rules more easily.

Barry Gervin started out with a list why datasets are so good, but in the comments there’s a big discussion going on about when to use datasets and when to use custom entities. I for one like datasets and classes. And I think we can use them both, even within the same system. On the other hand, that might get a bit complex.

Is Udi Dahan's comment right? Should dataset only be used in one-off situations, or can they belong in the center of a system’s architecture?

I don’t have a particular preference, although I seem to be inclined to start with classes more often. Do you have a preference? If so, drop me a line in the comments!

The importance of testing (or: The influence of a bug …)

·2 mins

We programmers know about bugs. We fight them now and then, create them sometimes but most of all try to keep them out of our software. At least, I hope you do too ;). Trend Micro has been the victim of a bug, and this had some nasty consequences for them. April 23rd this year, Trend Micro offered the update 'Official Pattern Release 2.594.00' on their website. This update allocated almost all system memory, making it impossible to work with the computer. Within two hours (!) a new version of the update was placed on the website and the erroneous one was removed. That two hours cost Trend Micro 8 million dollars! Tens of thousands of computers were 'infected' by the bug, more than 28000 customers called the callcenter that was rapidly put together.

I think this illustrates the importance of a few things I think every release in a software development project must go through:

– Unit testing
– Testing new features
– Testing old features
– Testing the influence of changes
– Regression testing
– TESTING!

Although testing is beginning to get more important in software development, I think a lot of companies are not up to par in that department. Where design and development of software have reached maturity puberty, testing seems to be strugling to get out of its diapers. Of course, there’s someone who is pushing the buttons and looking at the results, but that’s not enough. These days, software is very important. Like with Trend Micro, errors in software can cost you lots of money. I think the problem is that people don’t like to spend money for something when it’s hard to see if it pays off.

Maybe the problem is that good testing doesn’t show itself. When an error is found in a system through testing, that’s what the test was there for. But there’s no (easy) way to estimate what the influence (or the cost) of that error would have been if it wouldn’t have been found. Maybe what happened to Trend Micro was a good thing, because it illustrates the importance of testing.

I mean: it’s better to spend thousands of dollars more on testing than 8 million on repairing the trail of a bug later on, right?