25 July 2009

Database development blues

In most line of business application there are two major types of artifacts involved : the database and the application. Sometime there are two types of developers, but mostly that is not the case. The same pure smuck that built an entity inside the application will usually write the database and UI code for it.
Well generally I don't think thats wrong. I strongly belive in cross functional teams where each developer can work with equal skill on each application tier. When you work in the outsourcing industry as I do, you quickly came to appreciate those team members who seem to be able to do evertyhing: database modeling, stored procedures, domain objects, html and css layouts, documentation, testing and so on.
The major problem with the approach of one developer doing both the application and the database work is that that developer approaches the database work in the same way as he approaches the development of a typical application. But those two types of artifacts are not the same, they behave differently during each phase of the product life cyle.
The application code is fairly easy to modify, extend and delete where the database code is always resistant to change, and it grows more resistant as the product and its database grows. Why is that?
The database is composed of three different types of artifacts:
Data structure
Programmed logic
Data
Data structure is the logical representation of the types of data stored in the database and their respectiove relations. We call them tables.
The programmed logic is what we say to the database it should do with the data that goes in and out of a table. We call this : stored procedures, functions, triggers, constraints etc. To most developers this is the closest thing to real development they will find in a database project.
The data, well, there is not much to say about that. This is the meat and bones of what a database is to most people. The reason d'etre of a database. Users data, application or system data stored for eternity in a database for all to see and use. Most databases store data about them selves in special databases and tables. Figure that.
Well the thing is with databases that the data stored inside them is the most valuable thing in a line of business project. A developer can frag the entire application code and it wouldn't be even as worse if he fragged the data stored in a database. So, losing or modifying data in a database is not a good thing.
As a database (and its accompanied application code) is being developed the volume of useful, production data inside it grows. Each change to the database structure becomes much hardere, since you cannot loose data (thats why most people try to nail the database structure before starting the development process) , and it gets even worse when the database goes live to live free in the wild of an enterprise IT infrastructure. If you frag the database there you can kiss your ass, head and small fingers good bye because angry people in business suits will descend apon your small little you like vultures on a helpless white rabbit with its back pawns broken. Its that bad.
So working with the database is hard and risky.
The underlying fact with the database is that its always changing. New data is added inside it, changed, deleted. The structure is change, new tables are being added each day. Even the programmed logic changes from time to time. It is always changing regardless of it being in development or in production. While the nice and good application code changes quite rapidly and easily during development but its damn impossible to change when its compiled in an executable and shipped to remote production server in the prairie.
So what to do when you have a line of business product to ship on a rapid development track with database and application work done in parallel by the same people. Well , its simple.
Stop making changes in the database manually. Write scripts.
Repeatable, stable , data saving, scripts.
Then , respect the database. It is not your run of mill .NET application. It requires different development practices.
In database work you done have the write, compile, test life cycle of application development. Once you loose data it is gone, once you mess thing its hard to go back.
Think of a new development process for working with the database. It will repay you ten fold in virgins.

10 July 2009

14th SQL/DEV User Group Meeting in Rijeka Review

I must say it was an interesting trip. Me and my team went to Rijeka yesterday to attend the 14th local SQL/DEV User Group Meeting. We took a company van and proceeded along the eastern Istrian coast to Rijeka. It took us two hours due to extensive working on the repair of the road and hordes of tourists enjoining the scenery.
We arrived an hour latter than planned.
The meeting was held at the "Naval University" of Rijeka. There were around fifteen to twenty people mostly from three to four companies including our own.
The entire event had some good and bad sides. I'll categorize them .

The Good

Interesting and friendly crowd. We all were welcomed there warmly, and the fact that we were the new faces there made no difference. The MVC talk was interesting, rich with data and the speaker was well informed and mostly good. I met Aleksandar Zgonjan of Pro3x there. After the presentation we all moved to a bar near the train station and had a drink there. I met several persons there including Jasmin Ćelić the president of the local programmers guild. We discussed the possibility of met organizing a presentation there.

The Bad

The technical equipment did't work. The projector malfunctioned or it didn't work with windows. I don't know. We started the presentation one hour late when Hrvoje Hudoletnjak brought a new one from work. Because of the that the IronRuby and Ruby on Rails presentation was not held , which was a shame for me because I was interested in it.

Conclusion

All in all it was a good day. Rijeka is a fantastic city, full of life and history. The most fascinating thing was the torpedo exposed in the courtyard of the university. A historical note : the first torpedo was developed in 1905 here in Rijeka in the factory "Torpedo". I touched the damned machine , examined it head to to toe and event fearfully knokced on its point a few times.

09 July 2009

14th SQL/DEV User Group Meeting in Rijeka

I'm thirty minutes away from a trip the fourteenth SQL/DEV User Group in Rijeka. This time its a corporate spornsored trip. Five other colleagues are going with me. We managed to gather up a big van with air conditioning and, event , a corporate sponsored meal. Nice.

The SQL/DEV user group meeting will be organized in the Nautical University of Rijeka and will be composed of two lectures :

  • ASP.NET MVC development practices

  • RubyOnRails, Ruby and IronRuby for .NET developers


And of course, after the presentations a gathering will be organized with drinks and snacks with all the attendees which will be an opportunity to meet new people and learn or discuss about interesting ideas and technologies.
I really think these type meetups are important for a developers advancement, since you can learn and hear about development use cases which would normally be hidden from you.
I started thinking about organizing a presentation for the next OpenCoffe meeting. Something short, maybe half and hour long, and interesting. Practical, maybe event daring in the specific way I conduct all my presentations ;)
I haven't decided anything yet. I was wondering to do something on the following themes:

  • Web UI testing and automation

  • Web portal development process

  • Drupal theme development

  • PHP Unit testing

  • Building an MVC framework in PHP.

  • Workflow Foundation

  • ASP.NET Data binding controls



Don't know. More that I think about it I realize that I know squat. Maybe I should just cover and listen to wiser heads talking.

05 July 2009

OpenCoffee Club Pula Meetin One Review

The summer air was full of heat and sweat. It was heavy, oppressive and devoid of people. The streets were empty. No one was out except from those unfortunate enough to work on the hottest day of this summer or those stupid enough of not having anything else to do that included the sea or something where the air conditioning was turned to the lowest cooling option available and then some.
And there was I sitting on the therace of the "Cvajner" caffee in Pula nervously waiting for the attendees of the first Istrian OpenCoffee meeting. I came twenty minutes last and sat in the coolest spot I could find, ordered my white coffee with sweetener and water , please, and started reading the eight edition of the Software Engineering book.
And then it dawned to me.
How am I going to recognize all those people. And most importantly, how are they going to recognize me? I didn't know the answer to that question. I started to look around. Two tables east of me a group of girls, mostly hot, sat around a laptop and discussed firewire software. Hmm, I thought, the don't look the web developer type. Should I approach them? I decided not. And so I waited.
The first to come were Lucijan Blagonic of PolarNorth.org and Emanuel Blagonic of emanuelblagonic.com/ and Extendis.hr, two brothers who professionally work in web design and user experience design areas of the business. As I feared they didn't recognize me at first as a fellow attendee. My fears were found. I noticed them. They stood on the entrance of the Cvajner cafee and darted open looks around as if searching for Richard Stallmans ghost who, as the popular legend says, developed sometime ago in this same caffee where our first meeting was to be held. I thought they must be fellow attendees, but I was to shy, scared of a public debacle and most worst humiliation to openly approach them so I used the most sly tactic possible. I closed the book I was so pointedly reading almost a moment ago in order to show the cover.
And it worked.
Lucijan and Emanuel noticed me and approached. Thus the first Istrian OpenCoffee meeting kicked off. And it was glorious. Soon others arrived.
First of the rest was Tomo Krajina digresije.info/ and panoye.com and puzz.info. He was followed by Toni Milovan of fwd.hr and mackorisnik.com, and
We started talking almost immediately. What is your specialty? What are your interests? It was the same for every other attendee who came later. The themes were a legion and our knowledge extensive.
I forgot about the oppressing heat, the girls two tables away. We talked until nightfall and then some. We covered a lot of themes , but only a scant few stayed in my memory:

  • Best web development platform

  • Open source content management frameworks

  • UI test automation (I even developed an example on my laptop)

  • High traffic site optimization

  • Gimp Vs Photoshop

  • Tables vs. Divs



Everyone had his own opinion and freely shared it. We joked and no one was barred from talking. The atmosphere was friendly and interesting and I will definitely attend next time.

I was wonderful meeting. We all agreed to meet once a month, and that all the meetings will be organized through our google group OpenCofee Istra.

03 July 2009

OpenCoffee Club Pula, first Meeting

On Saturday 7th in Pula will be held the first Open Coffee meeting for web developer and other related ilk. The meeting will be held at 19:00 hours in the coffebar "Cvajner".
I'm really excited to attend this meeting. I see it as an opportunity to see and talk with people with the same interest in development technologies who are not necessary work related.
A google group for the meeting was created here for those of you who would like more information.

01 July 2009

Overworking it, a bit

Its five past five in the morning. I'm literally sleepless. The amount of work I've been doing recently is crazy. I've been at work for twelve to fifteen hours a day, plus we had two all nighters (twenty three hours of software development in a stretch). And, of course I've had the added bonus of leading a team or two during that time, so it added up on my burn out status.

I'm a wreck.

I rose early because I'm going on a business trip to Zagreb for a meeting with a client, and then to Ljubljana for another meeting with a colleague. Wow! What a trill.

I'm so wasted.

The tiredness is not a problem. I'm coping very good thank you. It's my learning that the problem. I really neglected my studies for the past month. Yesterday I finally finished "Pro WF" after six months of reading. Stupid. Once I read a development book in two weeks.

I must pick my pace or I will be crushed by younger, more time free forces.