Mock JAVA web-application using struts-hibernate

On my new job's first project, I am to be a part of an team which is to devlop an ERP application following the ISA-95 standard. We are basically trying to achieve what another organization failed to achieve using similar technologies (perhaps due to technical mismanagement, as they like to call it falling under the budget). It was decided that uptodate and best practices would be followed in making of this application. Following the contemprary application devlopment scene we chose to go with Web Based front end for the application over Java EE (or alike platform). Since the application is to be based solely on open source technologies we had to research our options. We initially went with Struts 1.x just to get a feel of how MVC would work. We also decided on methodology (ie 30% effort on design , 40 % implementation and 30% QA) and followed it to the best. I was more involved with the Unit testing part of this mock application using struts-test.

We chose MyEclipse, Struts 1.x, and Hibernate for this task. I had previously read about Struts but never really worked on it. So this was essentially my first experience with it. Although it seems like a decent framework, but I fail to see how it could have swept so many people away. Perhaps it was first of its kind providing application developers with options unheard of at that time. But nothing is new these days which is provided by barebone Struts 1.x. Perhaps I am dead wrong and I have not explored to elegance and depth of Struts, but rest assured that I wont be any time soon. It seems that the actual project would be Spring-Hibernate based.

I was more focused on the Unit Testin part of the project. UnitTesting of a struts app can be done via Struts-Test which is an extension of JUnit. It provide capabilities for Mock HTTP testing.

Update : After reading bit on Matt Raible's site , I would in future evaluet Strurt2 as well 

Leave the first comment

MAJU Linux Training

As an academic exercise I have been training IT staff of Muhammad Ali Jinnah University from mid August. This exercise got started while I was at my previous job. I am hoping to finish basic training of IT staff over CentOS linux and migrate their backbone system from Windows to Linux. For my time MAJU decided to financially compensate me. I was very please when I got my first pay check, as teaching linux has been one of my great passions. Training is still going on hopefully we will be finished with migration by end of December. Initially the timings which I was folloing was near lunch time. Now due to my new job I have to spend proper timings in my office from Mon-Fri, so lessons commence on my off days. These lessons have given me a good chance to update my RHCE prepration from RHEL-2 to RHEL-5 (it was long ago when I last prepared for RHCE exam). I hope to give RHCE exam in 2008.

Leave the first comment

Leaving Iphonica

Leaving Iphonica and Joining Zeropoint.it

In Mid Feb 2007, when I decided to leave my first job to join Iphonica, I was very excited. Iphonica seemed to be a small but enterprising company with open source based telecom software roots. Although I was not happy about location of Iphonica, which was considerably a down from the fancy Evacuee Trust Complex in downtown district of Islamabad. It was closer from my home and pay was bit comparable. The most important thing was that I was to work with Open Source technologies.

After working in Iphonica for  seven months I realized two things, first I left my job at JinTech too early. Perhaps If I was patient enough and open minded enough to embrace proprietary technologies I would have probably ended with a better one year experience, instead of fragmented 7 1/2 months and 3 1/2 months at two places

Second, that it is very hard to find a job in Pakistan where people act professionally. This I say with great regret that very few companies in Pakistan, which are lead by Pakistani's are capable enough to have good work ethics (there are very few places which are truly professional, Jintech being one of them in my opinion). Though the work seemed interesting on paper for me, the fact was that alot of my time and efforts were being wasted . I learnt a few things here and there in Iphonica, worked with networking software and did some java coding, but I could have done alot more.

Iphonica's inherent "Pakistani" practices of time management had so much effect on me that I had to leave Summer of Code unfinished(on top of which the other fact that time was already short for SoC). Overall I was disappointed with my self and was reevaluating my career choices. One fine evening I got an email for an interview at Zeropoint.it. I had heard this name before as back in Jan 2007 when they were looking for some Slashdot reading Linux Gurus (I don't claim to be one, but would love the idea of working in company of people like these). I went for the job interview.

From the job interview it was obvious how methodological were people at Zeropoint. I gave Java test from which I cam to realize that I still need to learn a few things from core Java. One thing which struck me very positively was that my blog was a consideration in the selection process.  

I switched jobs on 1st of Oct 2007. The new job is probably the best so far. I get to have free lunch, but its home cooked. There is a pool table in the lobby for free time. I get to work on a dual-LCD ubuntu, and last but not least there is a big conference room with a huge blackboard. Lets see how much I can gain from this job (my hopes are high).

As for Iphonica, I heard that thye have got a new Technical manager, hpoefully they will succeed in achieving what ever they aim to. I will sure miss all the fun times I had at this place.

(put picture of my station on to it)

Leave the first comment

Dubai : Gitex 07

I was asked to represent my company in Jitex 07 as a technical representative. For this I prepared my slef by going to ITCN Asia (which was not an amazing experience). I had tried to juggle the dates of Umrah so that I wont miss the first days of Jitex, but it was inevitible. After coming from Umrah, I hopped on to the next Air Blue flight ti Dubai. This was my first time travelling with Air Blue, and it reminded me of commercial Air Travle in rural USA where there are no goodies at all, and they just give you peanuts a juice.

When I arrived at Dubai airport I was not pleased to know that we would be going through terminal 2. Terminal 1 is the one with fancy duty free shop (so now I know why air blue is cheap, they don't have to pay extra for the nicer terminal). There was a long line of immigrant worked coming from Pakistan and India. I joined the queue and went through the ratina scan. After that went straight to immigration where the Arab immigration was flirting with a Pakistani passenger lady (so it took an extra while before it was my turn). Lucky me I had every thing as my hand luggage, so I got out and went straight to a cab. I was suppose to reach World Trade Center to the expo (it was around noon). I was coming to Dubai after 5 years so there was lots to see. First thing that I noticed was the under constuction, tallest building in the world. It is said that it can be visible to the nacked eye from alot of distance. The reality is that Dubai has so much mist all year long, it is hardly visible from mere 2 kilometers. But it sure is huge.

I arrived at the Dubai world trade center, contrary to my belief its not a sky scraper (I always confused it with emirates towers). I then called my supervisor who was already on the company's stall. He came out with my ID badge. GITEX is much bigger than ITCN as it focuses not only on IT but on consumer electronics as well. I went to my company's stall which was a subpart of PSEB's contingent. We were very incoventinetly placed in last of IT section, where as our focus area was Telecommunication companies which were in a whole another hall. First day was not suppose to be be long, but it felt otherwise. Later in the evening we went to our place of residence which was almost 20 km away from the trade center, (where tradecenter is already at the fringe of the city). A by product of Gitex is that there is virtually no suitable accomodation available in the Dubai area during exhibition days. Also one has to wait for very long hours to just get a taxi cab. Perhaps this situation would change one Dubai's intera-city train is up and running.

I stayed in Dubai for a period of 5 days. It was the first time I was on my own so went to all the places where I always wanted to go (ie. Emirates Shopping Mall for its Sking, to Sharja University to meet some old buddies and boating in the marina creek (on behind in the picture i am standing). All in all it was fun. Dubai is one good place to live (provided your income is alos g$$d). Any who I am looking forward to my next trip to Dubai. Hopefully by that time Burj-Al-Dubai will be complete and I will try to go to its top floor. 

Me in Dubai Marina
    (me in Dubai Marina at the company's rented apparment)
(more photos here

 

 

[more on this later] 

Leave the first comment

Umrah Trip 2007: Madina

Gumbede Khizra

(Gumbede Khizra as seen from my camera)

(more photos here

After a six day trip in Mecca, it was time for us to embark to a trip to Madina. We did a Tawaf of farewell. It was an emotional moment for all of us. A sense of pride and happiness for we had accomplished our Umrah, a bitter sweet sadness that we are leaving this holiest of place and a sense of hope and pray that we shall all try to visit it again.

My mom made me promise in Bait-ul-Allah that I will accompany her to Hajj in coming years (Insha Allah)

We then boarded on to the same 14 seater van driven by our Pakistani driver from Pakistan house. We were enroute to Mecca by 10 am. We chose to go via the historical battle grounds of Badar. Country side Saudi Arabia is a sharp contrast from the bustling metroplis of Macca, Jeddah. It is as barren as it can be. We also saw the tree line for the under construction city by Emmar on the shores of Red Sea.

We reached Medina around 4:00 and went straight to Pakistan  House No 2 (In Medina there are two Pakistan houses and are considerably farther from the Harem as compared to in Mecca).

In Medina Pakistan house had arranged a daily bus, which would pick up people from both houses and drop them off to Masjide-Nabvi (mosque of the prophet).  Since Medina is in a plain area as compared to hilly region of Mecca, the overall construction of the city is a bit spacious.

Masjide-Nabvi is one masterpiece. It has a very good system of underground parking and ablution. Around the mosque there are scores of shopping malls and food courts. We found a nice Turkish place just around the corner to Pakistan house.

During our stay we went to see the place where battle of Uhad and Khandaq were fought. We also saw Janat-ul-Baqi, Hazrat Salman Farsis’s gardens and many other historical places in Medina.

In Medina I also found a nice internet café to post initial drafts of this blog entry.

On the morning of 8th we went to Medina International airport for our flight back to Islamabad. Overall the whole trip was without any major hassle. This experience has brought me to a place where I am beginning to re evaluate my life in general. I would like to do more conscious effort to become a better Muslim and a better human being from now onwards. And I look forward to a similar religious experience in the coming years.

 

Leave the first comment

Umrah Trip 2007 : Mecca

 

Holy Kabbah
 (Holy Kabbah as seen on last day of Umrah by my camera)
(more photos here

 

 

My family had been planning to go for Umrah for a very long time. We had booked flights/rooms etc for late August this year. It was not easy to juggle with through schedules of exams (sister), foreign trips (dad) and project deadlines (me). Finally we embarked on Umrah on 28th of August in the afternoon from Islamabad air port.

 We booked seats on Saudi air lines. It is not a very splendid air lines, but then again we were not going on a luxury vacation.

I left my work sort of in an unfinished state. I am supposed to attend a trade show in Dubai right after Umrah. So hopefully by the time I reach back there would be a pile of work stacked for me.

Saudi Air lines flew from Islamabad to Dammam. Dammam is the oil hub of Saudi Arabia. Lots of passengers boarded off from the aircraft. Since we were going on Umrah, in flight entertainment was not a big concern, but still the remote control of the in flight entertainment system was broken, food service was average and overall mood gloomy.

All this changed once we reached Jeddah. We had a quick immigration other than one hitch. We had booked our visas through a Mulaim (loosely translated as religious guide). This is nothing but a business monopoly, the Mualim’s people make you stay in a particular Hotel and make you buy tour packages. Since we had every thing planned out, we didn’t need them. Fortunately for us our Pakistani driver Mr. Razzaq did all the talking. He had been here in Saudi for last 27 years and was an experienced driver and fluent Arabic speaker. We finally got out of the airport premises and got on to Mr. Razzaq’s 14 seat Hiace and were on the way to Mecca in no time.

I had heard about Saudi wealth in terms of infrastructure, the cars they drove, the kinds of huge gas stations they have, but witnessing it my self was an eye opener. Every thing in Saudi is huge.

We reached Mecca in around midnight and went straight to our first Umrah. It would have been a breeze, but I had to push my nanny’s wheel chair (which I did my self happily, but it was not easy). After our first Umrah was over we stayed in Haram for a while, and I offered my first prayer with congregation in Haram. It was a magical site, the sound of Azan echoing all around and thousands of people facing Bait-ul-Allah.

In Mecca we stayed in Pakistan House. It is a Govt. operated facility operating on no-profit/no-loss basis. We got a suite of 4 rooms on very reasonable rates. It even had a TV Lounge/Dining room where they had Pakistani news channels tuned in.

Our total stay in Mecca was of 7 days. We attended one Jumma prayer and one more Umrah during that (not to mention all other prayers with congregation). I was able to kiss Hijre Aswad on the last day (in the same spirit as Hazrat Umer kissed it…because Prophet  PBUH once kissed it….and not because it is some thing divine).

We also visited all the historical places, like the birth place of Prophet PBUH, cave of Sour, cave of Hira, Ayesha Mosque, Jinn Mosque, Mina (place where Prophet Abraham PBUH went to sacrifice his son and where there are three symbolic statutes of the devil), Muzdalfa, and the mosque from where Hajj khutba is given. 

Some thing worth experiencing in Mecca is the late night worshipping and the early morning breakfast. Even though it is not that hot during the day, thanks to Air conditioners all over the Haram, but night time is still ideal for Umrah in terms of weather (that is why every one is out there at that time)

Another thing which we experienced was some thing for which prophet Abraham prayed that May Mecca never be empty from fruits and foods. We ate all kinds of off season fruits, brought all over from the world during our short stay.

 

The Haram in Mecca is now surrounded by huge buildings and shopping Malls. We spent few lunch hours in those malls as well. Macca by any standard is a modern world city. With all its modern roads, tunnels, buildings and facilities I am proud that our holiest city is match for any city in the world.

 

It was defiantly a major mile stone moment in my life; these few days and I hope and pray that I go back to Mecca for Hajj in coming years.

Leave the first comment

Karachi Trip, ITCN 2007, Meeting some friends

My dad was insistant that I should attend ITCN 2007. Since he has little idea about what my job really is (and I have very less hope of actually making him understand what nitty gritty goes on in software engineering) this is probably one thing which he can relate to, exhibitions. my dad has been going on to and representing his organization(s) on international level for almost last 12 years, so for me to go to a national level trade show is some thing which he thinks is very important for me. In his words "even if there is one thing you learn in all this exercise, its worth it".

Any who on Thursday Aug 9th I had planned to get off early, but I got late (as usual) and reached the airport just 20 minutes before departure and walah ..I had been declared no show just 10 minutes before and my seat was give out. There were no more seats. I had missed my flight and I had already learnt my first lesson :P . I just rushed to PIA ticketing office on the air port and got me self a early bird out of Lahore. Then I hurridly got to Daweoo bus station to catch the next coach out to Lahore. I waited on the air port all night long. Apprently it had been bad weather in Karachi for some few days and there were many flight delays, so I was not the only one waiting late at night on Lahore airport.

I reached Karachi early morning, rushed to the hotel where my dad was staying for a quick shower. Then I proceeded to ITCN. All the arrangnemts looked to be of international standard, but the whole mood was disturbed by water every where. Karachi was one huge pond due to all the recent rains. Any who I roamed around the stalls to get an idea how an IT exhibition happens. In all honesty I was disappointed. It like a Meen Bazaar (for those who don't know what Meena Bazaar is ..its is pathetic attempt to mix School Science Fair with State and Agriculture fair ..minus live stock…even the few State Fairs I attended in US where the farmers take pride in how big a pumpkin they have grown are more fun and better in presentation).

Some how I ended up in CEOs conference with a CEO badge (don't ask, don't tell) I was there for the food. There I met a nice dude named Ray King from AboutUs.org. These guys are working to make Wiki tehcnology better and more accesible (not to mention using Ruby on Rails)

I sort of snuck out of the exhibition to work on my actual agenda, meeting some college buddies and shopping. I met a friend of mine who had been in Sweden for last two years, he is lucky to have a job in Norway now. Another friend of mine works in a constuction company in Karachi and is fed up with the traffic, water and lousy karachi people.

I also spent a day on Tariq road, getting some good/cheap clothes for me self. Generally in Kraachi things are about the same price as Pindi or Lahore, but you can find lots of variety.

Overall it was an OK trip. It was worth taking it, so I now know that I don't need to go to Karachi for any thing except for some good old cheap shopping.

 

Leave the first comment

Car Accident

About two weeks ago I had an accident. I was driving my suzuki VXR late at night to get some chicken nuggets from a near by MacDonalds drive through. it suddenly started raining. My glass became foggy in an instant. I was driving relatively fast (ie highway speed 75km/h) when suddenly I came to a point where high way was dividing into two. I hit breaks the usual way, ie after pressing the clutch( normally in emergency one should not press, but that would have been fatal in rain as the car may have over tunred after stoping so fat in the rain). I hit the raod divider , big time.

The whole engine compartment got compressed a bit. Engine was damaged and car won't move. I got out and found that I had injured my nose. Thanks to japanese technology there is no air bag in any Suzuki car in Pakistan. It was raining but some people were kind enough to lend me a hand and help me out. Eventually I had to call up my cousin and ask for his help. We had to call up a tow truck and got the car placed in a safe place. Then I went to hospital. It was really scary scene there as there were two fatal accidents on the highway that night. The whole emergency ward was in action. Rainy season is not very safe to drive in Pakistan, especially on highway where you have an ammalgum of micor fuel leaks on the road by heavy transport.

My poor car is being rebuilt. It cost me about 500$ to get this thing repaired. So goes my Summer of Code signing bonus. Allah has his own ways. Any who I am safe, at the end of the day this is what all matters.

Edit: I am selling off this piece of junk Suzuki and hopefully will be driving a better/safer car from now on wards.

Leave the first comment

Leaving Summer of Code

It saddens me to blog about it but I guess it has to be done. As of July 16th 2007 I am no longer part of Summer of Code 2007. I started off working quite late on the project, some of it has to do with my present circumstances with job, but alot of it has to do with my time managment. i did learn some thing from this experience, but in the end this project was a failure. But no harm done, its all part of learning process in life. Projects fail ..and infact lots of projects in software engineering fail.

Leave the first comment

Moving to 64-bit Core2 Duo

I now have the chance to move to 64 bit linux. There is a new Intel Core2Duo E4300 machine in my office. The specs are as follows (ill post detailed specs from with in the machine)

Intel Core 2 Duo, E4300, 1.8Ghz, 2MB L2 Cache, 800 Mhz FSB.
Intel D945 GCCRL Motherbaord (builtin video, audio,LAN)

It truns out that moving gentoo from a 32 bit machine to a 64 bit machine is not trivial. Also since I want to retain my harddrive and use it on the other machine at the same time , it would require some smart moving around data thingie.

I have the optiong of installing the 64bit version of Ubuntu Fiesty, but then it would not be the same as my current desktop would it :) . Gentoo adds a whole lot of geek factor to my desktop, the main reason I am moving to 64 bit is to satisfy my geekishness, otherwise my current 32bit machine is more than enough for my needs.

I could also install 64-bit fiesty for the while and install gentoo at a slow pace, but that would be so not cool to both gentoo and ubuntu.

This time I plan to post a detailed blog on my gentoo installation procedure. This is just to share the various settings ect which I plan to do.

Leave the first comment