Development from Scratch

When you developing new version of a product you usually think about rewriting from scratch instead of refactoring and adding new functionality with help of hummer and nails. Lets skip questions “why we should” and “when we should” because each of them is a topic for separate article. We will discuss potential problems and possible solutions for “development from scratch” mode.

Usually, the first problem is development environment change and new development tools. When you move from one programming language to another or change technologies, third party libraries or something else there is always a risk of potential problems with it. That is why you shouldn’t start using new technology/language before you have at least few experts in it. In general the idea to learn new technology/language by developing a real important project is bad. Pilot project should go first and in pilot project you may resolve all potential technical problems. It is better to blog about pilot project progress and problems, in this case you can always obtain list of problems/solution.

The second problem (and the most significant) is that development from scratch leads to repeating bugs and issues that were already fixed in previous product. The simplest way to solve this problem is try to repeat all issues from previous version of product in current version It’s possible if you used Bug Tracking practice, but if not, you are in troubles. And in any way it will be hard, because there can be thousands of issues. Also it doesn’t insure against new issues in a new product.

Another way is usage of Test Cases from previous project. If project was developed accurately then every idea, every business rule, every potential issue was reflected in proper Test Case. Usage of Test Cases from previous product version helps control quality from the start.

The third problem is should you use or not some parts of code from previous project. On the one hand you save time by reuse already developed and tested code, on the other hand you developing from scratch to stay away from the mess of old code. In most cases you should refactor before reuse that will solve the problem.

In general development from scratch is not recommended, but to be frankly, usually we do not start new version of product completely from scratch. We have documentation, user’s requests, issues database, project backlog, test cases and many other useful stuff from previous project which can be and should be used. We just re-writing code 🙂

Look Inside TargetProcess v2.0 (Day by Day Blog)

As you maybe know, we are working on next version of our product TP v2.0
(agile project management software).
It is based on ASP.NET 2.0, AJAX and NHibernate. We think that our
experience, problems and solutions will be helpful for quite many people,
so we decided to share them.

Examples and insider information from real product development is always
an interesting thing. Very few companies willing to share their experience
for different reasons (fear of competitors, fear of customers, security).
We want you to know about our progress, our solutions
and our opinions about tools and practices.

So let me announce our new web site TargetProcess v2.0 Day by Day. It will contain
daily posts about TP 2.0 progress, architecture and so on, screenshots, code samples
and maybe some ready to use solutions like controls and frameworks. Check it out and
subscribe to the feed!

Where the development moving? (Grumbling of developer)

With years the software development becomes more and more complicated. I remember 8bits CPU assembler for home computers. You only need to understand very few basic principles to write a program on it. Also there weren’t many syntactic constructions in it. However, assembler allowed creating any program you want. Assembler is easy to learn. I doubt that experienced developer who hadn’t know asm before will not learn it in one or two days to write programs.

As for me, Assembler has only one problem: to write even simple program you need to type many lines of unobvious code, which is hard to read and understand. This brings us to a higher level: Pascal and C were really powerful languages. They were simple, almost like assembler. But a problem appeared on the scene. The name of the problem was ‘libraries’. First libraries were simple, but to be effective you had to know these libraries.

The next step was made with appearing of Object Oriented languages such as C++. OOP is great paradigm and improves development performance. However it needs additional knowledge beside the language. To learn OOP (from my point of view) one needs 2-3 years of development experience. With appearing of OOP many libraries were born. To be effective you had to know something monstrous such MFC.

Time passed and new language extensions appeared. I mean templates in C++ and libraries written with them. From one side these libraries greatly improved developers’ performance by covering common programming patterns such lists, arrays etc. From other side you need to learn new library. Understanding of templates and learning standard template library will takes more than a year.

As shown above to be effective with C++ you need 5+ years of experience (3 year of OOP paradigm and 2 years for language itself and common libraries). Modern languages C# or Java require a year or two less. So, to be effective programmer in one of the modern language (such C++, Java or C#) you need 3-5 years of experience.

Internet technologies improved greatly during past 10 years. To be a web developer you need to know several languages and technologies. For example I am developing web application on C#. In addition to C# I need to know HTML, CSS, JavaScript and SQL as a minimum. Also I need to know how to write ASP.NET applications, which demands deep ASP.NET knowledge. In addition I have to keep in mind differences between Internet Explorer, FireFox and Opera browsers. I fear to suppose how long it takes to learn all these technologies and languages to be a guru.

Also I have a feeling that all code we are writing with help of fashion features (such as drag and drop with AJAX) is like repairing an engine through exhaust. I am asking myself why Microsoft or someone else doesn’t develop a technology which allows writing web application from start to finish using only one base language. Let it be completely new browser, new Windows and new DevStudio, but please, please, please only one language…

NEO Strength and Weakness. A Year After.

1.5 years ago I’ve posted about NEO. NEO is .NET based O/R Mapping Framework. It is interesting what was changed in NEO since 2005. In general, not so much. Almost all old problems are there and very few (but handy) improvements have been introduced.

Weakness

  • Not so great performance for complex domain models. Maybe it is a common problem for all O/R mappers, but I think NEO lacks some features that help to speed up things, like aggregates, paging and cache.
  • No way to create things like paging with one query. In fact NEO forces you to write most logic in the domain model, which may be good for one, but not good for another. With NEO you have no choice.
  • Intrusive ObjectContext spreads through all application layers, so migration to other persistence mechanism is hard. I think this problem may be resolved, but I don’t know how at the moment.
  • Still no inheritance… That hurts.
  • annoying problem with TEXT field for SQL Server (does not work out of the box, can be fixed in NEO code though)
  • Slow development. NEO progress is quite slow, I understand that it is an open source, but NHibernate is incomparable with NEO.

Strength (new during last 1.5 years)

  • ‘Spans’ feature helps hit database less often (very useful!). It allows select related entities in a single query. For example, you have a list of projects and each project has several releases. With spans you may retrieve all projects with releases in a single query with sub-select.
  • MySQL support

As you see, with years NEO becomes better, but very slowly and can’t compete with major frameworks like NHibernate.