Eat your own dog food

Eat your own dog food

Recently I heard the expression “eat your own dog food” again. For a company which produce software for a customer it is very usefull to use the same technology or product in house. But this expression is also usefull in the daily business of a modern software developer. One big advantage of test driven development (TDD) is, that you change the perspective before you code a class or a method. In the test first approach you create the test before…

Read More Read More

Working with your best friend

Working with your best friend

Yesterday my friend Jonas Bandi had his last working day at the company where I work too.The conclusion after one year is not so bad as I thought it would be. Well, we had sometimes intensive discussions, but I think that is normal, when you are looking for a good solution. But what is the real conclusion? Was it really a good year? Was the project on which he and I worked on successful? Should I go too to an…

Read More Read More

Get the size of your tables

Get the size of your tables

Recently my boss asked me, why the databases (Microsoft SQL Server 2005) of our customers are so big. With the following SQL-Statements I could give more or less an answer to my boss. CREATE TABLE PW_SPACE( name varchar(255), rows int, reserved varchar(255), data varchar(255), index_size varchar(255), unused varchar(255) ) GO EXEC sp_MSforeachtable @command1=”INSERT INTO PW_SPACE EXEC sp_spaceused ‘?'” GO select * from PW_SPACE order by rows desc GO select sum(rows) as Rows, convert(varchar(255), sum(convert(int, substring(data,0,len(data)-2)))) + ‘ KB’ as Data,…

Read More Read More

Explicit interface implementation

Explicit interface implementation

In C# you have a feature, which java don’t have. It’s called explicit interface implementation.The main use of this feature is to solve problems when you have to implement for example two interfaces which have both unfortunatly a same method signature: namespace testpw.ExplicitInterfaces{    public interface IA    {        void doAction();    }     public interface IB    {        void doAction();    }} The implementation of both interfaces on the same class look now like this: namespace testpw.ExplicitInterfaces{    public class TestImpl : IA, IB    {       …

Read More Read More

Filtering on DataTables

Filtering on DataTables

When you want to apply a filter to your datatable in your dataset, you can use the method Select on the class DataTable. In our current project we use this method very often, also for databinding. Recently I discover an unexpected behaviour. Let’s assume, that our datatable has 4 datarows and we will apply following filter for databinding:0=1 AND Path = ‘C:\bin’ The first expression (0=1) is added by an other method, which checks if any rows should be visible….

Read More Read More