A long time ago in a university not so far away, I was about to commence a subject that every body said was one of the most fundamental subjects available. Software Engineering; Processes and Tools. Before that, I had completed(barely) the prerequisite for that which introduced us to the basics of Software Development. So I was excited and very motivated to get this one down pat. I really wanted to do this right and learn as much as I could about the intricacies of designing and developing software in a team environment.

Apart from the usual load of assignments, tests, tutorials and final exam, the one thing that marked this subject out was a large project designed to be completed in a team environment. Whereas previously, in the prerequisite, I had worked with just one other person, this subject would involve teams of five and/or six. I was very excited and immediately approached a few of my friends in the same year and we all agreed to do this project together. I distinctly remember thinking at that point, this is going to be fun!

Alas, I was wrong. Very very wrong. And all the misery that ensued from that point on had one and one simple reason. I was not objective! Don’t get me wrong, my friends were very talented and committed, but they had different scales of working. They all worked in a different manner, some at different times of the day! Some worked at home while some preferred to pull night shifts in the university! The only thing that bound us, was that we were friends! And therein lies the problem. Had I approached my friends on the basis that they were very talented people with whom I could objectively work and finish this project and my friends, in specifically that order, we might have developed very good software. As it turned out, my priorities were skewed. I wanted friends to work with, not to work with friends.

Hence the point of this post. One must always, always, be objective. If you are working with friends, in a professional environment, you must be able to tell the truth to them, in front of others and in private. If you are leading a team, then you must be able to tell people to pull their weight, first by example and then by actions. Being friendly with your friends only works when all of you are clearly working towards a goal and objectives are clear. Trust me, friendships are strengthened when you are brutally objective towards each other professionally.


Postscript: We managed to pass the subject, but ended up not learning much. And thanks to ashridah for the objective talk after my results.

So yesterday, I was trying to do a simple MySQL query and realised that the value I wanted was of type text and the field I wanted was actually in the middle of the string and not always consistently there. So I decided to write up a script for myself which would do the DB query and then parse the string returned. As I had not done python for sometime, I decided to write it in python.

First things first, all I did was import MySQLdb. Nothing! Wasn’t installed. Fair enough. I had never had to previously install a python module, so I went to sourceforge and obtained the source, built it and it ran. That got me thinking, why do I have to do this myself?

I tried using go and even with the same import (mysql;), I needed to download the mysql module from google code and build it with the 8g and 8l binaries and then have a crack at it. Why am I still building these ???

If I wanted to do this in Ruby, I could use the gem installer and simply do a gem list -r mysql to find out which one was available and then do a simple gem install mysql-X.Y. No need to build. Installed and ready for use.

I like python and go a lot, but I believe for simplicity of use and for mimicking the behaviour of apt-get, ruby wins this one.

I think I can safely say that any future JS problems I might have, can very well be solved by Daniel Hall.

I was trying to create a Google Chrome extension for something at work and I wanted to link out of the pop up using standard href tags. This did not work so I tried attaching event handlers which resulted in the click method being called at bind time rather than at the event.

link.addEventHandler("click", callbackfunction(args));

What I did not know was that by passing arguments to the call back function, I was inherently calling it rather than binding a reference of it to the event handler. This was explained to me by Daniel, who I should add, is a very capable system administrator. And now JS expert.

Recently I had the chance to evaluate a lucene index and perform queries on it outside of tools like Luke. For this we used a rails project and used JRuby as our language as that allows us to import java packages.

The analyser which Luke uses by default is the Standard Analyser. This proved very slow for queries over fields like email addresses or dates. I switched to Keyword Analyser which was meant for fields like the ones mentioned above. After this change there was a marked improvement but not enough. So when Steven Bearzatto mentioned about Whitespace Analyser, I decided to use it. And immediately there were performance gains. These gains are subjective though, based on the field being queried.

Of the languages that I have used in my professional career, Ruby is the one that makes testing easy and fun. It has an easy to understand testing framework and mocking out external classes, most of the time, is very simple. For example:

class Sauron
__def wants
____"the ring"
__end
end

def Gandalf
__def wants
____"peace"
__end
end

class MiddleEarth
__def who_wants_what
____if (Gandalf.wants == peace and Sauron.wants == "the ring") then
______return "war"
____else
______return "peace"
____end
__end
end

Lets say that we have to test out Gandalf or Sauron.
Gandalf.wants.should eql "peace"
Sauron.wants.should eql "the ring"

The above test code is called RSpec and is very simple and easy to understand. Whether it is a Business Analyst or a Project Manager or even your mother, she can fully understand the required behaviour or Gandalf or Sauron.

But what if we had to unit test MiddleEarth? Then we would have to mock Gandalf and Sauron together and alternately to test all code paths. RSpec makes that easy.
Gandalf.should_receive(:wants).and_return("something")
Sauron.should_receive(:wants).and_return("something else")

If either method of either class expected arguments, that too we can deal with.
Sauron.should_receive(:wants).with(something).and_return("something else")

So there you go, testing and mocking made inherently easy with Ruby and its testing frameworks. But how does it compare to the old language of Perl. Perl too, now has a very similar testing framework to RSpec, called Test::Expectation. And for mocking out external influences when unit testing, we have Test::MockObject and Sub::Override.

And if we wanted to business test in either language, cucumber can sit on top of both, although inherently it works much more readily with Ruby/RSpec.

What is it about mobile phone development that should attract people ? Please note that I said should and not will! I do know that there are a fair few people who develop games for mobiles and a lot of people are involved in developing applications for the iPhone, but should it attract people more and more ? Will it become a mainstream development area like Web Development or Games programming?

The main attraction that I see in development of anything for a mobile platform (which for a majority of people means mobile phones) is the condensation of content while imparting the same amount of knowledge. Let us say you run a chartered accounting business and have a website which allows your employees to perform their duties, lodge complex tax returns etc . Can you condense that quality of information onto a smart phone? Can you convey that information without confusing them ? Will you convey that information logically (one step leading to another) or intuitively (letting them search for it) ?

No longer is the term “mobile platform” constricted to smart phones. We have the iPad, the Adam and even the iPed and they have nothing to do with telephony. Applications for them can be varied and interesting. Some have even suggesting that digital mixing for DJ’s is now possible thanks to tablets like these. ┬áIs there a case here that more technology is actually highlighting the lack of fields one can develop for now a days ?

Whatever the popular mood and whatever my own views, mobile development at the moment is at an interesting point. I do not believe that we have explored the full possibility of what we can do with it. Maybe it will lead us down the path of “Less but better information”, or maybe like so many other things that software developers have come across, we will royally screw this up. Who knows?? But one thing is for certain, I am more than eager to find out.

As a side note, I have tried reading books on the Kindle and the iPad. I did not enjoy it as much as holding a paper book in my hand. My sincerest apologies to all the trees, but this is one bad habit I will not give up.

I honestly believe that companies, whose sole ware is based on technical competence, should have an exchange program. Even as I write it in the darkness of the night, I can hear the howl of people attempting to preserve the in house knowledge against their competitors. I assure you, that is not what I meant. Allow me to quote a local example.

In Melbourne, Australia, there are two well known companies that do not compete with each other, in any way; except for talent. I speak of realestate.com.au and Lonely Planet. What exactly is stopping these two companies exchanging developers so that the skills may be sharpened ? Exchange system administrators so that better ways of disaster recovery may be learnt? After all why not ?

I now can hear people say “Oh! But surely thats what conferences and development/sys-admin meet ups are for.” Yes they serve their purpose in spreading that information. But that information is not lived! If a developer from realestate.com.au paired with one from Lonely Planet while working at Lonely Planet, then the information that he gets there is learned and absorbed much much better. Let the exchange program be fore 6 months or a year! This will stop inter company inertia and promote a very healthy environment.

Think , O companies, of all the smart people that perhaps might not leave out of boredom of doing the same old all the time! Think of all the new tools that the people would bring back knowledge of! Think of all the new talent this would attract to you!

But do you have the guts for it ? Do you ?