Archive for the ‘Software Development’ Category

Impressions on the Architect’s Master Class

Saturday, June 26th, 2010

I’m sitting in Frankfurt Airport, ready to fly home (directly to Cluj-Napoca, my home town), thinking about the week that’s about to end soon. It was an amazing week. Why? I was one of the few lucky people on the planet to attend Juval Lowy’s Architect’s Mater Class.

The guy has a different view on software architecture. He dedicated his life towards transforming Computer Science into an engineering field. Well, isn’t it already at the “Engineering” level? Even I am a graduate of the Technical University of Cluj-Napoca and I hold a B.Sc.+M.Sc. in Software Engineering, I’m “Diplomat Engineer”. Well, after last week’s lessons I’ve learnt, I’m far-far away from being a real engineer. Why? A simple example: all engineering fields have rigorous methods for design and construction. Look at bridges, roads, buildings. Could an architect, structural engineer, electrical engineer claim: “Oops, it’s a bug” when a bridge colapses suddenly and kills a few people. When our life is at risk, we don’t accept any bugs. Why should software be any different. It’s a sum of ones and zeros, so it’s an exact science. I, for one, I’m far for being able to claim that my projects have zero defects. Are you able to do that?

Juval has taken us through the history of creating software as a science, has shown us (in unbreakable, logical explanations) what we need to do in order to get to a real software engineering level, he even gave us the tools he developed, the method he engineered over the years and has opened our eyes.

This week was the technical event of my career so far (10 years in the industry and 6 in university)!

Juval, many thanks for the wisdom you kindly shared.
John, thanks for making these classes possible in Europe.

And for the rest of us, let’s read and spread the word. The IDesign Method is there, available for all of us. We only need to read, learn and start on the road towards better professionals and better software projects.

Running Database Engine Tuning Advisor 2008 on a SQL Server 2008 upgraded from 2005

Tuesday, January 5th, 2010

Problem

I run into an issue today. When trying to run Database Engine Tuning Advisor (part of SQL Server Management Studio 2008) on a SQL Server 2008 instance that was upgraded form a SQL Server 2005 instance, I got the error below:

Cannot initialize tuning. (.Net SqlClient Data Provider)

===================================

User does not have enough permissions to tune one or more of the databases specified. (.Net SqlClient Data Provider)

------------------------------
For help, click: here

------------------------------
Server Name: {removed}
Error Number: 31003
Severity: 16
State: 1
Procedure: sp_DTA_add_session
Line Number: 88

Of course, the error message is quite obscure, misleading you towards believing that it’s a permissions issue. However, documentation clearly states that a db_owner can run the tool. Investigating the issue I found out that some DTA-related tables and stored procedures from the MSDB database differ between 2005 and 2008 and they were not upgraded during the migration to 2008.

Solution

So, it’s pretty clear what the solution is:

Option A. Delete all DTA-related objects from the MSDB database and run the Database Engine Tuning Advisor using a sysadmin user so that it re-creates the structures.

Option B. Compare the schemas and create and run an update script yourself. Keeping your DTA history requires some tweaking.

I opted for option A as I found it less of a hack than option B.

România wins 2 Oscars @ Imagine Cup 2009 in Egypt

Thursday, July 9th, 2009

After years of participation, Romania finally marks the first prize in Software Design. It’s a great day for Sytech team from Iasi and for their mentor. Cosmin Ilie won the IT section with the highest score ever.

Congratulations to the team members, their mentors and the Microsoft Romania people who put their hearts and minds into it.

I hope this will be an impulse for others, I hope Sytech and Cosmin will share their winning tips and I want to see many others asking them how they did it. It must be repeatable!

More details on:

Imagine Cup official site
Valy Greavu’s Live Text Transmission :)
Dan Iancu’s blog

Imagine Cup 2009, Egypt – Romania is in the game

Monday, July 6th, 2009

A while ago I blogged about the experience of being a member of the jury for the Software Design section of Imagine Cup in Romania. Sytech, the team that represents Romania in the Egypt finals prepared for us a nice present during last weekend. They qualified in the top 6, world wide. That’s the best result all-time for a Romanian team in this (section of the) competition. Congratulations!

Of course, as always, Valy Greavu has deep coverage, so follow his blog for details: http://itboard.ro/blogs/valys_blog/archive/2009/07/04/finala-imagine-cup-2009-it-challenge-live-text.aspx (Valy, thank you for being there and sharing)

Also, vote for the Romanian team here: http://peopleschoice.imaginecup.com/default.aspx (ignore the runtime error and come back later if you really want to vote).

CompositeWPF and WinForms : Regions

Thursday, May 21st, 2009

Florin, one of the colleagues working on the Prism customizations at ISDC has wrote a great description of how we managed to build our own RegionManager for the Win Forms scenario. No need to explain more, just read his article here.

Imagine Cup 2009, Software Design

Monday, May 18th, 2009

Another year passed, one more Imagine Cup final. It was the Software Design section. Sytech team, from Iasi, was selected to represent Romania in the world competition finals, in Egypt. As students, the only competition we could attend was ACM. It was more theoretical. Nowadays, I believe students are overwhelmed by the countless possibilities to train, experience, participate in projects, competitions, internships and so on. You would say this is a good thing, that it’s normal. However, from behind the jury desk we see a different side of the story. We see it is still difficult for us to prepare a project that is ready for prime time. Maybe us, as Romanians, are not trained yet well enough in giving birth to great ideas, freeing our mind to think the impossible, but to make it possible. I hope next year I will be amazed. This year, we (the jury members) could only select which team was better than the others, but not which team was the winner. 

Still, I believe that participating makes us better, so I hope all people present, including myself, will learn from the experience and will do better next time.

[Update]

For technical details about the competition, Valy’s blog has a thorough description of the teams, projects and criteria here.

Dan Iancu has put to use his great journalistic experience to pinpoint exactly the illness that we saw. I subscribe to his call to wake up. For a serious reading, go here.

Teamwork and weekend-mania

Monday, April 6th, 2009

Today I recovered (better than expected) from an out-of-band-kind-of-weekend. In Romania, spring has clearly shown its face, it’s warm and I get the impulse to stay out as much as possible.

This weekend we started to build a fence around our piece of land in Salicea, a village close to Cluj. We planted some trees a few weeks ago, but since our land seems to be on the main route of the sheep herds of the area, they started eating our trees, so we decided it was about time to clearly mark our property and hope it will keep “invaders” out of it. Although I’m an engineer, my construction knowledge is limited and is more or less based on intuition. So, we planned (my wife and me), we calculated, we argued, we purchased materials and we let people know what we were to do. Help did come our way, in the persons of my sister and two of our best friends. The end result, as you can see, is that we built a fence around roughly 50% of the land, which is a great achievement for beginners like us.

The end result

Well, if you read this so far, you’re either a friend of the “family” or you you’re a friend Developer and are curious what’s the link with software.

I realized it’s all very simple. If it’s not simple, it’s not right, it’s not going to work.

Let me tell you why. First of all, we started with a great design. We planned to make wholes, then put the pylons, then use a hammer to get them to spear their way into the earth until the proper depth… Then, our friend came by and started hammering the pylons directly through the grass… no wholes, no fuss. This was an enlightening moment. I realized over engineering is a kill and we should always try the simplest possible thing before going for more complex tools or technologies. If it’s simple and it does the job, why make your life harder?

The second thing I realized yesterday was that teamwork is the key. I learned to keep my ears & eyes opened all the time and listen to any idea, no matter where or from whom it came from. In software terms, and junior or senior can have great contributions to any software endeavour. Chances are there, you just have to make your voice heard (and have something to say).

Third, but not least, help always comes, because people are essentially good and want to help each other out through their projects. So, if you say you have unmotivated developers in your team, look first at yourself and ask yourself what you could change before putting it on the shoulders of someone else. I often find myself trying to motivate people to outperform themselves, to challenge boundaries, to think and do more than they believe is possible. Yesterday I realized that this is a normal desire of any human being, and if we provide the right space, people start expanding in it.

CompositeWPF and WinForms

Saturday, March 14th, 2009

We recently started a project for an LOB that acts as a very specific ERP. The requirements were simple, build a system in .NET, that contains all functionality of an old system and make it robust and extensible. Well, looking at the list of roughly 200 use cases we needed to cover, and taking into account it needed to be a WinForms application, I immediately started to be afraid of building a monolithic, Visual Studio Designer generated app.

I wanted to use concepts like modularization, avoiding coupling as much as possible, making clear dependencies and also teaching new and better development practices. I wanted to use some kind of composition framework.

The old Composite Application Block  seemed a bit rusty, the concepts a bit tricky to understand, and even harder to explain to a team of developers. So, I started looking into fresher libraries, with better conceptualization. I found and finally decided to use the newer Composite Application Guidance for WPF and Silverlight.

But hey, how can you use this with WinForms?

Well, it’s possible. Composite WPF library is extensible and even though it gives an implementation, nobody stops you in replacing components with your own or using only parts of it. Thanks to Brian Noyes and his nice post on Composite Extensions for Windows Forms the starting point was clear and made things seem possible.

Helped by a few enthusiats at work, we rolled out our sleves and put down a set of classes that implement the concepts of CompositeWpf, but this time using the Windows Forms “windows”.

We had to implement from scratch or adapt concepts like ClickCommandBehavior, Region, RegionManager.

Still, the toughest process was to support the Model-View-Presenter pattern. So, we decided that all our Views will implement an IView interface, that any IView can be hosted in a Region. But hey, how do you activate a View (which in our case are User Controls) in a Region? Well, our solution was to build a set of Host controls. For example, activating a View in a Dialog Region (Modal), is as easy as creating a Form and adding the View inside it. Of course, plumbing and hooking some events is needed, but for the developer, the feeling is the same as for the Composite WPF code, you just Activate a View in a Region.

Another tough part was to support UI Composition in Windows Forms. Imagine you have a Person, a Company and they each have an Address. Now, you want to include the Address View (edit or read only mode) in both screens for editing a Person and a Company. Well, this seems good practice: we promote re-usability, we have less code to hunt for bugs, we get consistency and so on. But how to do it in WinForms? Well, since our Views are User Controls, we can nest them, but how? Well, it was fairly straight forward. We built yet another user control that acts as a Host for any IView. Plumbing some events, exposing some interfaces and we were done.

Oh, I almost forgot… a good introduction to Composite WPF technical concepts is available on the dedicated MSDN page.

The result, so far, is that we are able to develop fast, with clean code, employing good concepts and laying the ground for better testing of our software deliverables.

Reset

Saturday, March 14th, 2009

From this blog, until now, there was no indication of my work, my profession and my skills. As this year I will reach 10 years in business, encouraged by family and friends, I think it’s time for me to start giving back, to start sharing. So, I decided to start posting about Software Development, Software Architecture and .NET subjects. I can’t promise anything about frequency, but I want to bring quality in each post. I started already a few moths ago to support the community on http://stackoverflow.com. My activities there, answers (and lack of questions) are here: http://stackoverflow.com/users/41345/sergiu-damian.

See you soon!