Sunday, January 30, 2011

Software engineering on demand

I'm just about to finish Refactoring to Patterns and it made me think about experience with applying design patterns. I have attended a few university courses regarding design patterns and every time I learned something new - I was so eager to implement it that I probably have made some mistakes.

The main idea in this book is to apply design patterns only when you have to. Design patterns are great for solving well known problems and they are tool that every software engineer should have in its toolbox. But when it comes to solving problems that are not there you can really shoot yourself in the foot using design patterns. From my experience as a professional developer I often have to maintain and extend someone else's code. And this part of the job. Whether this colleague is no longer in the company or is currently working on a different project, you can't escape it. I've noticed that over-engineering is as frequent mistake as under-engineering. And it can cause a lot of damage to every project. I have caughted myself very eager to try some new technology or pattern where it is not actually necessary. As a result - the project gets harder to maintain and extend and probably there is a severe performance penalty.

The best way to avoid this problem is to apply patterns and technologies on demand. Do not try to predict future business requirements and do not fulfil them without any need. You can always refactor your code later when it is actually needed. And this book will give you some guidelines how to perform refactoring in some common cases.

Still, we are all human - how to overcome this affinity to try and implement new stuff as soon as you meet them. Use the sandbox pattern - make yourself a place where you can try, test and evaluate your new ideas. After all not every idea that you read can and should be applied - some are worthless, some are priceless and some - it depends.

The best things are as simple as they should be. We don't kill flies with nuclear weapons. So, don't use abstract factory and strategy pattern to write a "Hello, world!"

Friday, January 14, 2011

New user group in Sofia: Web Platform

Yesterday new user group was born here in Sofia, Bulgaria. Its domain is defined pretty wide - Web Platform, which means that very wide range of topics will be covered. First meeting was about "Building web sites with new technologies" and included ASP.NET MVC3, .NET Nuggets, SQL CE, Web Deploy, IIS Express and so on.


What was new to me was the nuggets and the IIS Express. Nuggets looks like a big time saver, I always like to focus on business logic and keep the plumbing part to minimum and from this point of view .NET is far behind some other technologies. I am very eager to try the scaffoldings for MVC and to see how they work for a real life application.


I am very happy about this new user group, since its domain is very close to my current job profile and I think that it will be of great use to me. After the first meeting, my strongest recommendation is to get deeper into the topic. You cannot cover all this technologies in a session of two hours. And we have already seen a lot of light demonstrations with most of them. What we need is a deeper look, how the things actually happens. I would like to see a real world showcase of how these things work together.


I wish all the best to this new user group, I hope to meet some kindred spirits there. If you want to join, here is a facebook page. Next meeting - HTML5. Since, there is no official web page it is up to us to spread the word, so - tweet up :) !

Wednesday, January 12, 2011

Craftsmanship, What it is really all about?

I've been interested in craftsmanship for two months already. I read a couple of books, added some blogs in my rss reader and followed a bunch of twitter accounts. Now, after reading all this things I started asking myself - What we are talking about here?

By reading the Manifesto of Software Craftsmanship, one can say that it's something that only "the chosen one" can practice. By signing the Manifest you feel like entering into a secret society with sacred mission. Well, I don't feel so pathetic about it. In my eyes, people are getting too romantic here. After all, we are working in modern society with market society - we need to working for a living. And customers don't care if you are modern knight armed with wireless keyboard. They only want a working piece of software.

Still, It's up to you to be in a condition to deliver this working piece of software. How to improve your skills? How to stay in touch with latest technologies, that come up everyday? How to solve hard problems? Here craftsmanship can give you priceless advices (of course, you don't have to be an apprentice to follow this steps nor craftsman to give them). Apprenticeship should keep you in good shape and make better and better everyday. Without any arrangements to keep you on the track, you professional career is likely to end pretty soon in our dynamic and constantly changing industry.

To sum up, what craftsmanship means to me? The values that craftsmanship has are those to help me improve myself. Everything apart from my professional development, all those ego trips that people tend to follow are pointless and should be ignored.