Wednesday, December 5, 2007

Gues what does it mean?

Gues how can 1 not be equal to 1?


Failures:
1) SourceGrid.Tests.TestRangeData.WriteData_FromSourceGridToSourceGrid :
expected: <1>
but was: <1>
at SourceGrid.Tests.TestRangeData.WriteData_FromSourceGridToSourceGrid() in e:\Projects\csharpexamples\SourceGrid\trunk\SourceGrid4\SourceGrid.Tests\TestRangeData.cs:line 122


p.s.
And yes, it is not the case when one one is string, another one is int

Monday, December 3, 2007

TDD anti patterns

I've compiled a presentation on TDD anti-patterns. It is just a collection anti pattern name and description. All stuff was taken from James Carr blog.

Here is a link to presentation, and link to code, illustrating those anti patterns.

Monday, November 26, 2007

ETL

ETL stands for Extract, transform, load as is described in wikipedia article.

I was reading many of Ayende Rahien posts about ETL, but never understood what's is that ETL about. Now I know it:

Extract, Transform, and Load (ETL) is a process in data warehousing that involves
* extracting data from outside sources,
* transforming it to fit business needs (which can include quality levels), and ultimately
* loading it into the end target, i.e. the data warehouse.


Basically what ETL stands is a process of getting oen source of information into destination. This might be an integration of two systems, say a CMS system and a Payment system, or that might be just importing data from spreadsheet into your database.


We have started doing our own implementation of import/export tool a month ago. I don't think this is a waste. The insight we gained from creating our own solution is very valuable, and now we have a choice of either stick with our solution, or use Rhino.ETL . Before that we had no choice, and that's bad

Rhino.ETL can be found here

A vision of enterprise platform Hot & Distributed Deployment

I am to lazy to write my own ideas, but I am not lazy to share _good_ ideas.

Ayende now has a month of a vision of enterprise systems I think it's really cool what he writes.

Please read it: A vision of enterprise platform Hot & Distributed Deployment

Sunday, November 11, 2007

Scheduling solutions

Just for my own reference:
Scheduling solutions @ Ayende Rahien

He puts his opinion about four solutions:

* Castle.Components.Scheduling
* Quartz.NET
* Rhino Scheduling
* Task Manager

Tuesday, October 9, 2007

How to build a document plugin system

Currently we are building a documnt plugin system for our app.

Which way do you prefer to specify documents:
Example number 1:


[DocumentRepository]
public class DocumentRepository
{
[Documents]
public void RegisterSheets()
{
m_documents.Add(typeof(Client[]), "ClientBook.odt", "Books/second level book", "Client book", "Print client book");

m_documents.Add(typeof(Contact), "ClientSheet.odt", "Sheets", "Contact sheet", "Print contact sheet");
}
}



Or number two:

[DocumentAttribute(typeof(Client[]), "ClientBook.odt", "Books/second level book")]
public class PrintClientBookClone2 : BasePrintingCommand
{
public PrintClientBookClone2() : base("Client book", "Print client book")
{
}

protected override void Invoke(object sender, EventArgs e)
{
WindowOpener.Default.OpenDocument(new DLC.Core.UI.Documents.GenericBookDocument(this, DataRoot));
}
}

[DocumentAttribute(typeof(Contact), "ClientSheet.odt", "Sheets")]
public class PrintContactSheetClone2 : BasePrintingCommand
{
public PrintContactSheetClone2()
: base("Client sheet", "print client sheet")
{
}

protected override void Invoke(object sender, EventArgs e)
{
WindowOpener.Default.OpenDocument(new GenericDocumentForm(this, DataRoot));
}
}



Both examples achieve the same functionality: two print buttons are created. One is placed under menu "Books/second level book/Client book", the other under "Sheets/Client sheet". Slash here denotes that the menu is composed of some sub-menus.

So which do you choose?

I choose both cases, since the first one is extremely short, and allows you to add documents very quickly. However, the other, while being cumbersome and ugly, allows you to achieve maximum flexibility in case you need it. And we know bussiness people need it alot.

Thursday, October 4, 2007

Microsoft to release source code of part of .Net libraries

Today throughout whole world was sent a message that Microsoft will release the source code to the class libraries that make up .NET.

We'll begin by offering the source code (with source file comments included) for the .NET Base Class Libraries (System, System.IO, System.Collections, System.Configuration, System.Threading, System.Net, System.Security, System.Runtime, System.Text, etc), ASP.NET (System.Web), Windows Forms (System.Windows.Forms), ADO.NET (System.Data), XML (System.Xml), and WPF (System.Windows). We'll then be adding more libraries in the months ahead (including WCF, Workflow, and LINQ).


You can deep-scan slashdot and google for the details. I just want to state my opinion about this:

First, it is not an open source license at all. You can SEE the source, but you can not do anything with it. It's just for your eyes, studying, debugging, etc.

If there were programmers who did not get what are the differences between open source and free software, now can see it that here is a big coneyed meaning difference. In essence, open source and free software are 99 percent the same.

However, when people talk about free software, they tend to think that this is about
the cost of the program, which is not true. Free software is about freedom.

When business men talk about open source, they often convey deliberately or mistakenly that open source is all about source code, that is, if you see source code, then it is open source. That is SO untrue. Open source is also about freedom. You not only see source code, but also can modify it, ehance it, fix bugs and release the code to the world.

Sorry folks, but .Net libraries are not open source. But i still hope they sometimes will be.

Second, you can not copy-paste code from .Net libraries to your projects, since .Net source is not released under open source, or free software license.

Third, it still a good thing

Fourth, I strongly believe that Mono will soon reach such a level, that we could move away from .Net platfrom and go into Mono platform. Why to do this? Simple - I see bussiness value in it. And the value comes primarily from the ability to choose. With Mono, our customers will get more options as where to run their software. Should they choose Linux or Windows, it will run on both machines.

Fifth, open source profoundly increases both productivity and research in IT industry. Personally, I can not see myself programming with libraries, where I can not see the code, and all of our libraries except .Net framework are open source.