Friday, May 22, 2009

Bulk calling of methods

You have your domain model defined in a class called DomainModel. You have a lot of usercontrols that handle seperate parts of the domain model. All the user controls implement the following interface:

You want to call the PopulateControl method on all your usercontrols to get data mapped to the UI. This is how you would do with plain.


Sunday, May 17, 2009

When did things stop being natural

I might be a bit off on this post.

I'm just a bit confused with a word. To begin with everything was natural. When you apply a natural process to a natural substance, it will remain natural. So when and how did some things become unnatural?

Thursday, May 07, 2009

Creating a bug report

I have seen some bad bug reports. This is my little guide how to write a useful bug report.
  • Get to the point. It’s about a bug, and that’s what you should be writing about. It is of no in-terest why this bug is so important to you.
  • Explain the context. Al though you might think the context is obvious, explain it anyway. Explain how you can reproduce it.
  • Be polite. The people that are to fix the bug are probably very enthusiastic about fixing your problem. By calling them names they will be less so. They don't necessarily have anything to do with the bug in the first place.
  • Give it a priority.

Wednesday, May 06, 2009

Validations in Plain

We thought we were very original when we thought of the validations for plain. It turns out that there is a NHibernate Validation project that uses the same idea.

Although we were not aware of the NHIbernate Validation (and I guess the other way around) the way the validations are defined are very similar. The biggest difference is that Plain validation is focused on the domain model and the UI. NHibernate is focused on the domain model and the data layer. Plain Validation has (or it is supposed to have) translations for displaying validation errors directly in the UI.

As the two validation frameworks have very similar capabilities, we might make a mapping for you.

Programs I'll lay out for a fresh install

I've seen a few bloggers listing the programs they want on their machines.

I have thought of this as well, and the conclusion is that the only program I need to be bothered installing is apt-get. When I have apt-get installed and it is pointed to the repositories I want, any other program is an ease to install and won't take long. I can wait untill I need that program to install it.

This of course only goes when I'm on Linux. There is no apt-get on Windows, and installing a fresh machine will take a looong time. Keeping track of licenses makes the process even longer. I won't go into that. :)

Monday, May 04, 2009

Being pragmatic

Being pragmatic means that you consider what works over what is correct or pretty.

I'm a big fan of being pragmatic. A big mistake I see is that people think that if you are pragmatic you should not be concerned with doing things smart. This is wrong. I believe pragmatic is about spending the least amount of time creating a thing that fulfills a need.
If the need is to be able to maintain it, the pragmatic solution won't be to hardcode everything.

The pragmativc solution is not:
  • Ignore common sense
  • Start coding before you think
  • Avoid design
The pragmatic solution for me is almost always to stop and think about what makes sense. This is the way I solve my problems in the most optimized way. I hope you will too!