Friday, October 28, 2005

Binary counting with fingers!

Great poster: http://howtoons.net/archives/final/800binary.html
I can use binary counting to count up to 1023 with just two hands!

Thursday, October 27, 2005

I thought they were mock objects?

I am using mock objects for a while now, and I never felt any difference between mock objects and stubs. However, this blog seems to indicate that real mock objects are the objects based on behaviour testing.

So, only about 20% of my mock objects were really mock objects. Other 80% were stubs.

Wednesday, October 26, 2005

ASP style of development?

A lot of my co-workers complained about my ASP style in ASP.Net development. The only reason for such a complaint is that I am using data-binding statements on ASPX pages and user controls, like this: <%# DataBinder.Eval(Container.DataItem, "City")%>. I never use any server-side scripting code on the page itself, all server-side code goes to code classes. However I do like to use data-binding statements to achieve better separation of presentation from business logic. Indeed, what is the alternative? The alternative is to handle OnDataBound() events, find the controls within each row and manually set properties on them. This is not ASP style, this is VB6 style of developing Windows apps. Is it better? No, you still have your presentation mixed up with the business logic, the methods become very long, there is indeed a lot of code written to do something which I can easily accomplish by using data-binding statements.

I would actually go to the extreme by trying to separate business logic from presentation. I would not use any code-behhind. I'll have all pages and user controls inherit from pages, but I would prevent Visual Studio from coupling these classes to the pages. This way if I add a control to the page it will not automatically appear in the class. All events should be registered by using control's attributes, like "onclick". The protected control variables will appear in the base classes only when I need to read properties of the controls. This way we can have the same base class for multiple pages or controls, avoiding duplication of the business logic, while being less strict about presentation (where some duplication is always allowed).

Tuesday, October 11, 2005

Building fire :)

This is just funny, taken from http://msdn.microsoft.com/security/default.aspx?pull=/library/en-us/dnvs05/html/vs05security.asp

"Currently, however, we can't build fire and forget applications. "

Why would you want to build fire? And why do you have to forget applications?

Monday, October 10, 2005

Friday, October 07, 2005

Service-oriented architecture

If you want to abstract from Microsoft propaganda, here is what I think SOA means:
  • It is orthogonal to Object-Oriented technology. You can write SOA apps using procedural languages and structural programming.
  • It is orthogonal to XML. You can use XML and Web Services but not have SOA. Or you can have a very good SOA without any XML.
Two examples to confirm my points are COM+ and BitTorrent. They are probably the best SOA applications, however they are not build on XML and Web Services (though new version of COM+ supports SOAP).

  1. COM+. Have you ever tried to configure firewall for COM+ app? You probably know that the client machines start acting as servers if they are in charge of coordinating transactions. This is the main feature of SOA: blurring distinction between client and server. Client becomes server, server becomes client. Or if you want, you don't have clients and servers anymore, you have services.
  2. BitTorrent: this is probably the best SOA app: every client machine must become a server, all computers are working in collaboration for one goal: downloading the files. No server or client - only services.

Monday, October 03, 2005

Iterative or feature-driven development?

I started a thread on Extreme Programming mailing list:

http://groups.yahoo.com/group/extremeprogramming/message/113227

I am still trying to control chaos on the projects I am working on. I felt that iterative development is too restricting and not agile enough. Business expects the time from inception to release to be as short as one week in some of the cases. There is no way to do that with two-week iteration.

My priorities will be:
  1. Automated QA tests.
  2. Automated (as much as possible) deployment
  3. Smart branching strategy
  4. Code&Design reviews.