Saturday, 2 February 2008

Social Networking Softwares

I received an invitation to a "social network" software from India not long time ago.

I always subcribe to these software at least to check what are they capable of. I also like to observe the Darwinian evolution of software.

This software made me upset right in the first turn. It didn't harvest my relationships organically like FACEBOOK but it wanted to record my relationships using my Gmail contacts by borrowing my Gmail password. I didn't have any other choice if I wanted to see the web-app running, however borrowing my Gmail password was very suspicious to me. In the next step it enlisted all my Gmail contacts. There was a tiny checkbox to send the invitation to all of them or not. I didn't want to invite anybody to this social network, all I wanted to do is to check what it offers. Therefore I've unchecked the checkbox and went to the next page. Well... The service didn't offer me any excepcionally good quality. It was nothing to learn. So it didn't worth borrowing my precious Gmail password. For the sake of security I changed my Gmail password promptly.

I was surprized when many of my friends sent me a message in the next few days that they don't want to subscribe to this at all, nevertheless I unchecked the invitation checkbox. There were some of them who thought that this software is a VIRUS. Well I've unregistered myself from this "social networking" immediately

Well... This happens when a software harvests its users in an agressive manner rather than adapting the strategy to grow organically. The problem with it is that even sometimes even those people will be harvested who are not even my friends (I send them only one or two email messages in my whole life). So my "social network" will contain some foreign people to.

This precious information is now free and available for everyone, thanks to these softwares. But sometimes they also contain false relationships :)

Thursday, 17 January 2008

Ruby on Rails productivity

I was always amazed by the productivity of ruby language. Specially by the development infrastructure of rails. I wanted to check it and specially to measure it.

Therefore, I decided to implement something which was already implemented in other languages before using other infrastructure. This happens in our industry very rarely.

I started to implement the payroll system described in the book Agile Software Development. Originally the payroll system was written in C++ and consist of about 3300 LOC. I implemented the first iteration in ruby writing only 383 LOC including even the test code. I was very surprised. :)

And why did I use rails? Ruby would have been enough.
Simply because it has a very effective development environment.
I used migrate files for creating the relational DB, fixtures for setting up the preconditions for testing, zentest as devil's advocate, and rake for a lot.

What about the benefits:
  • it was fun, easy, and very interactive
  • I've got fast feedback from zentest
  • all the O/R mapping was already done
  • learned a lot along the journey
  • During the development I was happiest ever
Keep smiling :)

Saturday, 12 January 2008

World of Standards

I saw an interesting post in my feed reader today about the fact that the IE8 passes the Acid2 test.
I ran the test myself immediately using my installed browsers. I was surprised that firefox didn't pass the test but I was very happy that Safari and Webkit both passed.
The whole test is just about displaying a simple smily face correctly, isn't it?
Taking a closer look what is inside the test I was surprised how many small details are tested.
They also test some seldom used great css features like the generated content, css tables, child selectorsto name just a few one.
The guys there simply made a brilliant job for the web community.

I am anxious to try the next Acid test. :)

Saturday, 15 December 2007

Webapplication testing like a Lego story

Once I have got the chance to challenge the joys and woes of testing a Webapplication.
I started the whole thing trying out HttpUnit/HtmlUnit and Selenium to experience which one is better for me.
I decided to use Selenium because it uses a real browser for clicking throughout the UI, therefore if the UI works driven by tests it will work in the hands of human users too.

I used the Selenium IDE to create my initial test cases and I saved them as Java test cases. Later as the number of test cases increased the same Selenium IDE generated java code appeared across several test cases. I refactored those repeating code until I had only one helper method for handling the UI elements. From then on writing test cases was like playing Lego in my childhood, except that instead of using the Lego brick I used the methods in my helpers. The number of test cases has grown to a few hundred in one month. Well, playing Lego becomes boring after a certain amount of time.
Fortunately I faced another challenge.

I needed to check if handling the mandatory fields, on forms works or not. Therefore I started to play with my lego set again. After writing the second test case I saw that they are almost identical. Hm... I decided to build a generic machine for testing those forms. In two weeks the machine was up and running and every form was well tested (around 300 cases).
In the meantime the way how the requirements were defined for the mandatory fields had changed from text based sentences into a big matrix. Usually changing letters in matrixes are much more easier than rewriting whole sentences right? So the requirements/matrix changed on every two-three days. All I needed to do was to change one or more letters from "r" to "m" in my test case to support those changes. Yes, my machine was data driven. Not to bad from a Lego system. :)

That was the funny part for a developer like me who was asked to test a web ui.

The whole thing was still under development and fine tuning. Therefore, I wanted to put those tests to check the ui every day automatically. The machine which was given to me for daily regression testing was running linux. It was placed somewhere maybe without a monitor and a keyboard.

Well, my idea was to test it under firefox but I was constrained to use only the text console. Hm... How those two fit together. Fortunately I got a hint from a friend to use a virtual display.
I used the Xvfb for the virtual display.

In this way the cron job could launch the test cases which could open a running fully functional firefox and the webapplication was tested every day. :)

Well, in the beginning I did't want to do all this "testing", but during the journey I gained a lot of experience and I say it worth playing all this Lego like game. :)