Thursday, January 18, 2007

Gale-force winds hit London...

Today was the most windiest day i have ever experienced! And it was. Turns out the Lords cricket grounds actually lost a roof.
http://news.bbc.co.uk/2/hi/europe/6274377.stm
http://content-sl.cricinfo.com/england/content/current/story/276833.html

Ruby...

I've just had my first experience with Ruby - the newest addition to the scripting world - and was quite impressed with it. Its quite amazing at how much you can achieve with such a few lines of code (this coming from a Java developer).

Ruby is a dynamic, object oriented programming language. Its syntax is quite intuitive and is fairly easy to learn. Simplicity seems to be the operative word when programming with it. A few more facts about Ruby,
- Interpreted
- Everything is an Object (no primitives.. i mean everything's an object)
- Single inheritance with mixings (i still haven't figured out mixings.. will update this when i do)
- It has some excellent support for collections and regular expressions
- Its free!!!

Something that really impressed me was the following code snippet,

hash = {1=> 'Ricky Ponting', 2=> 'Sanath Jayasuriya'}
hash.each_pair do |key, value| puts "#{key} is #{value}"

These two lines iterate through the hash and prints out the value to the console. How cool is that?

Saturday, January 13, 2007

JML: The good and the bad

Our most recent assignment was based on the design methodology design by contract. We were asked to use the Java modeling language (JML), an annotation based specification language for Java to ensure our programs were developed to specification.

Here are some interesting observations:

- The idea of JML is very good. Its a non-intrusive mechanism of testing code. The JML annotations can be added before or after the method is fleshed out. (although DBC advocates writing these assertions first)

Eg. JML assertions
//@ requires firstname != "";
//@ requires lastname != "";
//@ requires username != "" || username.length() >4;
//@ requires password != "" || username.length() >4;
//@ requires address != null;
//@ requires !(\exists Customer c; this.customerDB.contains(c);c.getUsername() == username);
//@
//@ ensures \result != null;
//@ ensures (\exists Customer c; this.customerDB.contains(c); c.getUsername() == username);
//@
public Customer addCustomer(String firstname, String lastname, String username, String password, Address address)

- Since these are annotations, it does not mess up and over complicate your methods.
- The syntax is fairly simple, anyone who knows Java can use it.
- Its lightweight and seems to combine well with JUnit.
- It would work well for projects with well defined design specifications. If the design spec clearly specifies the input parameters of each method and its return type, then these annotations can be added at the time of defining your method signatures (at design time).
- It ensures the "contract" is preserved with the use of pre and post conditions. It also ensures correctness is maintained with the use of invariants.
- I feel it actually can take out the customary housekeeping tasks of ensuring your input parameters are not null/empty.

Improvement Suggestions:

- The most important improvement, i believe, should be in their error messages. When a pre/post/invariant is violated the error that is displayed (a JML Exception) is quite cryptic.

Eg.
org.jmlspecs.jmlrac.runtime.JMLEntryPreconditionError: by method TaxiBooking.validateAddress regarding specifications at
File "TaxiBooking.java", line 129, character 28 when
'zipcode' is

This error is actually thrown when a precondition ensuring that the input zipcode parameter is not empty, is violated.
Looking at the error its quite difficult to understand which precondition was violated. Its up to the developer to display or throw an exception with a more meaningful message. Otherwise the software testers would not understand the results of the JML test and the JML tests would only be used by the developers.
- JML seems to be very feature rich. However figuring out all of its features and hunting down documentation to support that was very cumbersome. If they can improve on the documentation, moreover provide more examples, it would be very helpful.
- Better integration with IDE's. I did find an eclipse plug-in, however it was for an older version of eclipse which was not forward compatible.
- I did find it to be a little fussy when it comes to constructors. Perhaps i didn't use it correctly, but it complained when i simply instantiated an object and then used its setter methods to set its attributes. It worked fine when i passed all of its attributes in the constructor and then instantiated the object (which is quite messy in my opinion).

Overall i believe JML has the potential to become quite popular in the industry, provided the right support (IDE) and documentation is made available.

Monday, November 20, 2006

My London experience thus far…

Well, what can I say? It’s been an unpredictable ride of high’s and extreme lows.

First of all, the entire experience of living in the heart of London city; the commercial hub of the UK, the heart of all activity, the home of Freddy Flintoff and Johnny Wilkinson, is truly exhilarating. I’m sure I’ll never get this opportunity to experience living in one of the most expensive and happening cities in the world again, so I’m making the most of it.

However, it does have its downside. Like I just mentioned, the ‘one of the most priciest cities in the world’, has made me completely budget conscious. The change from being a working “enjoy life to the fullest” professional to a student has been a steady and disciplined one. But I’ve done it. I’ve become prudent with my expenditure, conscientious with my recordings of income and expenses and mindful of future expenditures. It’s all contributed to the entire university experience.

I’m thoroughly enjoying my university life. I enjoy the whole process of sharing ideas and seeing our ideas materialize in diverse artifacts. Be it goal models, design and architecture models, distributed stock ticker systems, to strategies for investing millions of pounds. The most important ingredient which has allowed me to thoroughly enjoy my university life is my classmates. They are simply great! We have a great sense of comradeship, ever willing to help one another out to get through a difficult exam, assignment or even advice on filling out those grueling application forms.

I have come to understand the importance of preparing for class! This was something I never did during my undergrad days. As always preparation is key, and it definitely applies here. I just did my first written exam, in years, today, and I think I did alright. My handwriting sucks big time, but I think through all that mess I actually wrote something ok.

Living on my own is not soo great. At times the cooking and cleaning definitely makes me wonder “why did I leave all the luxuries of living at home to come to this?”. But I keep thinking, yeah, it’s all contributing to the learning experience. I have now extended my culinary expertise to making pasta; the lazy mans gourmet dinner. All it takes is 20 mins and I’m done, unlike the regular rice and curry I generally prepare, which takes me a good 1.5 hours. I’ve also added my own flavor into the pasta by occasionally mixing in tuna and corn.

The sad and most regrettable setback of me coming to London, is the pain, stress and harm it has caused to my relationship. The time apart has made me say the most regrettable things to the person I value and love the most. I don’t know what came over me. And now it’s over. I know it’s all my fault. I wish I could have done things differently. I often wish I had applied to a US university. But now its over.

Thursday, June 22, 2006

Roshan Paiva's an Associate Software Architect !!

Woohooo!! i am officially now an Associate Software Architect!!!

The much awaited PAR's were finally completed. The main focal point of everyone (including myself) was to see how much our increment was going to be. But to my surprise, when i went to collect my PAR letter, i discovered that they had promoted me to Associate Software Architect!

This was something totally unexpected... But something i wanted to achieve since i started my career in 2000. True, i have been playing the architect role for around a year now. But having worked with people like Chandika Mendis, Sanjaya Karunasena and Shiham Naufer i know how much more i need to learn and experience before i can be a really good architect. I have truly learnt and benefited a lot by working closely with these gentlemen.

I truly want to end up like one of them. Someone everyone looks up to and admires. Wish me luck !

Monday, April 3, 2006

She's going to CMU...



Wow.. this is unbelievable!!! My closest friend has just got admission to CMU. Yes, that's Carnegie Mellon University!!

This has got to be the best thing that has happened this year!!

I'm soo happy for her. i know she's going to do really well.. in fact i am actually expecting her to be very much involved in the next expedition to the moon. I'm pretty sure she's going to have something to do with that rocket !

Anyways.. Here's wishing her all the very best..!!

i'm going to miss her quite a lot...

Sunday, March 12, 2006

University Applications...

i have come to an important junction in my life. It was time for me to start thinking about where i would like to be in the next 5 to 10 years.

All these thoughts resulted in me realizing that a masters qualification from a reputed university was of utmost importance. Why? well, this was what i was thinking,

1. i have grown within the organization i work for and have now come to a certain level of seniority. However, in order to differentiate myself from the others, and to improve my value proposition, i need something else. A boost. A different experience. An edge in technology know-how. (this can be challeged though, as people in the industry may actually be the trend setters and the ones who use and evangelize cutting edge technologies)

2. To go back to the books now would actually give me a well deserved break from the stress and high adrenaline lifestyle i now am very much a part of.

3. It would also allow me to view information technology and its usage from a different view point. I'm saying this only because i have been in the same company since i graduated 6 years ago, and my world has been this organization. I think its about time i experienced how other companies tackle the same problems we faced, etc.

4. It will create an environment in which i will be able to meet, form relationships and work with others with similar interests, thus giving me the opportunity to have friends in the industry all over the world.

5. If i am able to excel in my masters (hopefully :) ), i will be able to have the backing of the university and the professors i studied under. This could be important later on in my future endevours.

I'm sure there's more....

Anyways all this thinking resulted in me
- Going in search of recommenders, worrying the life out of them until they provided me with countless recommendation letters.
- hunting down suitable universities which provided the courses i would love study
- Feeling disappointed after realizing that i do not meet the minimum academic entry requirements as i have a second lower honours undergrad degree. (Bloody hell ! They dont seem to care about all the hard work i have put in the last 6 years, and that i have come to a level which is just short of being a software architect. :) ofcourse i need more years of experience to be a really good one !! )
- Filling in many university application forms
- Photo copying and certifying transcripts and other certs
- Studying for a freaking GRE exam which was another saga on its own
- and finally spending an obscene amount of money fed-exing my applications to all parts of the US and UK.

I just hope its all worth it in the end.... (fingers crossed)

Search This Blog