Ivan Mitev In The Software Trenches

Technology weblog on .NET development and other things that make the world go round

July 28, 2005

DB programming seminar

BARS organized recently a DB programming seminar, which I was glad to attend. So let's get a brief summary of the event:

The first lecture was about MS SQL. My last project used MS SQL Server 2000 so the topic was pretty interesting to me. I learned quite a few things and got some good tips about file groups, indexes, application roles, temp tables and so on. The lecturer was very entertaining and included many good real-world examples to illustrate common shortcomings in developer's and admin's viewpoints.

The next lecture was about ontologies and natural language search. There you don't deal just with substrings, but with words. This area is very interesting and it has to do with ranking, inverted indexing and so on. It was interesting to get acquainted with what MySQL, MS SQL and Oracle offered and to hear about Lucene .NET API.

The Business Intelligence lecture was also pretty good. If you don't know abbreviations like BI, DW, DM, OLAP that was a chance to catch up. The cool demo with Excel pivot table revealed why MS Excel is the most popular (but probably not the best) BI tool on the market.

The final lecture was about Oracle Transaction Model and I was stunned about how little I knew about its details. There was talk about DML, DDL, DCL transaction, savepoints, locking, isolation levels, autonomous transaction and other cool stuff. And I was again reminded that, of course, each DBMS has its own understanding about a lot of semi-standardized stuff.

July 22, 2005

Refactoring To Patterns

When choosing what techie book to read next, I took a look at Refactoring To Patterns by Joshua Kerievsky. There is massive praise for it by authorities like Kent Beck, Martin Fowler, etc. So I read the first 50 pages (out of 400) to get some impressions. There was an excellent overview of what design patterns are, what refactorings is and how this book content fits in the big picture. The main thesis is that design patterns in a system should evolve without rush. The way for them to emerge is by a series of refactorings. The design is kept simple until we actually need to introduce design patterns.

It is obvious that the author had put a lot of effort in this book, He had got much feedback from the community before publishing it. Joshua Kerievsky has studied and described the shortest path to fix common design problems by introducing design patterns through a series of simple refactorings. I'm sure it is good stuff, but I have to drop it right now. The reason is that I should first read the Refactoring classic by Martin Fowler to get more solid understanding in the field. Well, I know about some of the basic refactorings just by using ReSharper and applying common sense, but a bit more theory and terminology might prove helpful.

July 13, 2005

Pragmatic Unit Testing - short book review

I just finished reading Pragmatic Unit Testing (with C# and NUnit) by Andy Hunt and Dave Thomas. It is a nice, short and straight-forward book, especially valuable for developers that are new to unit-testing. It describes well what is unit testing good for, how does it affect the project, what are the characteristics of good test code and a lot more. It doesn't go into some advanced unit testing scenarios and patterns, but still covers problems and gotchas that you are most likely face. If you want to dig deeper in this topic probably a good place to start is here. Marc Clifton has done quite a series of articles on CodeProject, that can form a whole book.

Pragmatic Unit Testing gave me more clarity on unit-testing. I saw some things that I could have done better in previous projects. I've been practicing unit-testing for just 2 projects, but although I didn't do it perfectly, every minute of this activity paid off at least twice in time and twice in confidence that my code worked. Not all of my test code had all of the characteristics of unit testing, but still the automation and the test effort were enough to reap the benefits. And ypu know, just using NUnit and TestDriven.NET to perform ad-hoc testing is a step for better productivity.

So, if you don't use unit testing, just try it! And if you read this book first, it is more likely your first attempt will feel great. Such guidelines can really save you from taking paths that lead to nowhere. And when you get into the habit and start doing it on a regular basis, your clarity will increase and you will do it better and better.

July 11, 2005

Removing Haloscan comments

I found using Haloscan commenting to be a bad decision and I am dropping them. Blogger comments are better in number of ways. I won't repeat the reasons stated well here. And more importantly there are directions how to get things back in the good old way. It required some manual template editing, but it was worth it :)

July 07, 2005

SQL Server 2000 Reporting Services

In my last project we used SQL Server 2000 Reporting Services. I didn't participate in the development of the reports , but what I saw as an end-product was pretty cool. If you have never seen Reporting Services in action there is a great 25-minute demo video, available here.

The good things about SSRS is that it is pretty powerful and really cost-effective (actually free if you have SQL Server 2000 license). Well, more mature products such as CrystalReports and ActiveReports surely have their advantages as functionality, but are pricy. I just found a nice comparison between those 3 reporting solutions here .

The only shortcoming in Reporting Sevices, that begin to I care about right now, is that the reports can be designed easily only from within VS.NET. One can still define them directly in the XML-like RDL, but without a WYSIWYG editor it is painful. For the probable future extension of the project, we have to come up with a way to enable business users (non-programmers) to design new reports (or at least tweak a bit some predefined ones).

So the question is what will take us to implement such a feature and do we need some third-party products? I read here that in the next version of Reporting Services (for Sql Server 2005) there will be a Report Builder that does the task. it will be actually a WinForms app, deployed with ClickOnce technology. Cool!. And the good news is that it will be avaiable in all Workgroup, Standard and Enterprise Editions of the product. But still we have only Beta of Yukon and the official release is in November, which is pretty far away...

So, I did quite a bit of research on third-party tools and I came up with this list:

So, there are interesting solutions and we have plenty of options. We even cannot discard the idea to use VS.NET 2003 (the cheapest possible is VB.NET Standart Edition) to enable some power users do the thing by themselves with the current toolbox.

Hmm, it is that for a half a day I acquainted myself pretty well with SSRS and the third party tools. Let me give a few more links that I've collected along the way :

July 06, 2005

Weblog update

After stumbling upon Free Essential Tools for Blogger I made a few little enhancements in my weblog. The following free services did the job:

Feedburner added (a) a generic XML feed (Blogger had only Atom feed) and (b) a headline animator to display the recent 5 posts in a nice animated fashion.

Haloscan commenting and trackback have been added too. The only bad thing about it is that the previous Blogger comments have now disappeared, but I guess I can toggle them on, any time.

UPDATE: I no longer use Haloscan, but the Feedburner stuff is definitely cool and remains.

July 02, 2005

Clickomania

About 10 days ago I noticed that a national programming contest has been announced, and I blogged about it here. It is about a quite interesting, well-known (with a few millions of players) logic game called Clickomania. Btw, finding the best solution for appeared to be a NP-complete problem, as I read in a scientific paper, analyzing Clickomania complexity. This reading and some more Google search was part of my evaluation of how much effort I will have to put in if I decided to participate.

After some thinking about strategies, I downloaded Clickomania Next Generation and played a bit to get a feeling of the game. That was another proof that is nothing more important than experience. All strategies and heuristics that I was thinking about [in vacuum], did not quite get me the results I hoped to achieve. The poor scores made me ambitious and I ended up playing for 10-30 minutes nearly each day. I had not played computer games for probably 2 years or so, so it was weird I got addicted that fast.

Today for the first time I succeeded to solve it completely on a 12x8 board with 5 colours. Now, I can now safely delete the game from my PC :) The funny thing is that after playing so much my understanding of what makes a move better than another is still pretty vague. I don't feel very confident that for a short time I can come up with a competitive solution. A really good solution should incorporate at least a few different strategies accustomed to board size, time left and so on. A lot of optimizations and shortcuts can be made to skip entire branches in the decision tree. I don't feel I have enough time for such stuff. So, I convinced myself that this contest is actually more for CS students than for working developers. Let's give youth a chance! :)

July 01, 2005

Peopleware - short book review

Peopleware is a book that everyone who happens to manage a software project must read. And most of the things DeMarco and Lister write about appeal directly to developers, too.

The authors concentrate on the sociological aspect of our work, which is on many occasions more important than the technological. The book reveals what it takes to build high-productive teams and how crucial this is for project's success. More importantly the authors describe what is teamicide and in what forms it appears in the real-world. They talk about defensive management, bureaucracy and other shortcomings. If I remembered only a single quote from the book, it is the following:


Management's job is to make it possible for people to work - not just to
make them work.

So, I can sum up that the book is a very sincere, thought-provoking reading. It eradicates some common ignorance about our work. I was lucky that I chose this book after a series of more technical reading.

I wonder what item to pick from my books-to-read-list. I want to dig a bit deeper in refactoring and unit testing, but it will also be ineteresting to read a good book on agile methologies and practices. So the top 5 choices are:

Agile Software Development by Alistair Cockburn
Agile Software Development, Principles, Patterns, and Practices by Robert C. Martin
Refactoring to Patterns by Joshua Kerievsky
Refactoring: Improving the Design of Existing Code by Martin Fowler and others
Pragmatic Unit Testing by Andy Hunt, Dave Thomas