Thursday, August 29, 2019

Pakistan Post - My Story


Last week I visited "Pakistan Post" after a long time. I used to go there 8-10 years back but only to submit utility bills. In my recent visit I went there to post a package from Karachi to Lahore. I was there for just 10 minutes and in that short time I become excited and concerned at the same time. My package is safely delivered to the destination location and I am happy for that but at the same time I feels a bit uneasy about the whole process.

-  Still old:
When I entered the "Pakistan Post" branch near Disco Bakery Gulshan-e-Iqbal, the whole setup refreshes the old memories and it's the same what I saw 10 years back. Old styled broken chairs and tables, not clean, some chairs are not broken but have "pan peek" on them etc. Anyway the good thing was that I didn't had to wait there as I was the only customer at that time.

+  The old guy:
The person who welcomes me is an old guy and through out the process he remains so polite. No artificial dialogs, straight forward and too the point.

-+ Clothed Bag:
The old guy starts putting my package items in a clothed bag. This is where I start thinking of why he is doing this. I thought he just want to weight the package by putting all the items in a clothed bag. But he started to adjust the items properly in the bag as this is how they will send the package. So I ask him about this and he said yes your package will be delivered in this bag. Since it was a clothed bag I got a bit worried as if the items will remain safe or not. The good thing about the clothed bag is the flexibility. The items that I want to deliver are not fitting in the basic carton box used by TCS. Even in a bigger TCS box they have to force fit the items, that's why I did not go with the TCS.

- Sewing:
The most interesting part of the whole process. The guy had to sew the clothed bag mouth with the needle and thread with his hands. There is no doubt that the old guy is so perfect in sewing but my concern is why he was doing it. Even if they have no other option than to sew the bag they can have a sewing machine to do it for them.

- Postal address:
They ask me to write a destination address and contact details on that clothed bag using a marker. I am not sure if they entered this address in there system or not but it was so weird for me.

+ Cost:
For the same package what was costing around 2000 PKR through TCS the Pakistan Post charged only 300 PKR. That's a serious difference.

+ Technology:
After the whole process is done they give me a payment receipt with a sticker on it having some serial number written on the sticker. The old guy told me that I can track my package from that serial number using there online portal and also using there mobile app. I was not expecting that but yes they have it and it was also showing the correct package details on there portal.

+ Promise:
They promise to deliver my parcel in 2 days and they fulfilled it. The package reached the destination safely in 2 days.

I really appreciate the services provided by Pakistan Post and will be using there services in the future. My suggestion to Pakistan post is to improve there premises and the process of initial customer interaction. I bet people will only use Pakistan Post if they feel comfortable going to there premises. Best of luck to them.

rizzz86

Friday, May 10, 2019

Me in Bahrain - Aldar Islands Resort

My last post on Bahrain is sometime back in year 2013 nearly 6 years back. A lot of Bahrain has been explored since then and it's been a joyful experience. In coming days I will be posting some more stuff and information about Bahrain and make them part of my blog.

In my previous post on Bahrain I have shared some renown buildings and architectures in Bahrain. Those includes Bab al Bahrain,  Financial Harbor Building, World Trade Center Building, Bahrain Circuit structure, Corniches, Bahrain Museum and some prominent Mosques. I will be sharing the detail information on some of those places also in my coming posts.

In this post I am starting with one of the Bahrain's natural beach resort named Aldar Islands Resort. Aldar island is 12 km away from the city of Sitra island (as shown in the map picture). A daily shuttle/boat is operated between city and the Aldar island for pick and drop off.


If you are planning to visit the Aldar island, you have to first visit the island's office located in Sitra. The timings are from 9 AM to 5 PM. In the office they will do the initial formalities and then direct you towards the shuttle service. One thing that is very important is to bring the original CPR/Passport with you (I have a bad experience as I did not take the CPR for one of my family members and I have to go back to home again come back). Following are some of the pics of the office area:







Once you are done with the official formalities you will be boarded to the boat that will take you to the Aldar island. The boats are fast and that ride on the boat itself is a fun. Check the video.


On the resort first thing to do is to book a hut. You can get a normal or VIP hut based on your requirement. Normal hut costs 10 BD for a day and private hut costs 25 BD for a day. They also have arrangement for big tents that can fit around 80 peoples. Chalets can also be booked for 4 to 22 family members.






My recommendation is to bring your food with you. Not much options are available to try on the resort.

The resort is well maintained, the water is clean and clear and the overall environment is to chill and ready to enjoy the visit. Different activities are available on the resort to make your trip more adventurous which includes Jet ski, boat trips to other small islands, dolphin watch, kids zone etc.









If you are living in Bahrain or visiting Bahrain and did not yet to this resort, I would say to go and experience it. It's not going to be a tiring visit. You can just visit there to relax, chill and enjoy your time. That's it for this blog. For more details of Aldar resort you can visit there website and you can also call them in case of any queries (there contact details are also on there website).

rizzz86


Friday, June 17, 2016

Basic steps while dealing with application slowness due to database

In this blog I will share my experience of improving web application performance. Application slowness is often faced in large scale applications. Slowness can happen due to multiple factors and one of the major factor is because of bad database design.

Recently I got a chance to work on an application optimization task. The whole activity includes many areas that are focused and optimized. The main performance improvements are though after database optimizations are done. I am listing down some of the major activities that are performed and found very helpful in finding performance improvement areas.

Is it really a database problem?

Get web server traces and find if there is performance issue in the application itself. Before saying that DB is the only issue just double check by getting and comparing the web server traces and SQL-Profiler traces. Confirm that most of the time taken by request is through database and not something from application itself.

Execute and check SQL-Profilers

Execute the SQL-Profiler and check the queries/stored-procedures that are taking most of time. Notice both duration and read counts in causing application slowness.

Check proper indexes

From the profiler traces one can easily identify the queries or stored-procedures that are taking time. Once those are identified, first thing you have to look is to check your indexes on tables used in queries or stored-procedures. Add appropriate indexes on required columns.

Execute query execution plans

Before I was not very friendly with this feature of Microsoft SQL Server. The Actual Execution Plan of a particular query or SP is very helpful in finding out the specific area that is taking time. The execution plan also suggests the indexes that can fasten up the execution. The suggested indexes can be applied on tables and the impact can be re-checked by executing query/SP again.

Use JOIN instead of IN statements on large data

Other than indexes do go through the statements either those can be overwritten more efficiently. For example instead of using IN clause use JOINS if the data is too much for IN clause.

Check for LOCKS

Specifically taking about MSSQL, it has different pre-defined SP calls that can hep in identifying locking information. For example sp_who2 and sp_lock SPs can be called to get locking information. Statements can be locked due to synchronous Update/Read hits are made on a same table in database. One of the statements can be blocked/locked until other statement releases the table lock.

Use WITH (NOLOCK) where ever required

Do not use WITH(NOLOCK) everywhere. Use it where ever required. I am not going to mention the details of using/not-using WITH(NOLOCK) but I will suggest to read some helpful articles related to this.

Check database statistics

Database statistics can be find out from sys.stats system table. sp_updatestats command can be used to update database statistics. Index rebuilding can also happen statistics update. These activities are not mandatory but if for some reason your database indexes goes bad you have to update/rebuild them. Bad database indexes cannot only return false results but can also make the query/SPs very slow to execute.

rizzz86

Thursday, December 31, 2015

Karachi, the upgraded one !

I last visited Karachi just a year ago and I feel dramatic positive change in Karachi in my current visit. Following are my observations:

  • The scary mode in Karachi public is gone. They looks more energetic and motivated.
  • Business is back and people are keen to invest in different sectors.
  • Too many food places. People are investing in food centers most commons are Pizza outlets, BBQ's and Fast foods.
  • Technology acceptance in small business which includes general stores, food chains, clinics etc.
  • Chingchis are gone. Makes traffic a bit better
Hope things will become much better in coming time and the true potential of Karachi will rise.

rizzz86

Friday, September 26, 2014

Android Library Project and its usage

"Android Library projects contain shareable Android source code and resources that you can reference in Android projects. This is useful when you have common code that you want to reuse. Library projects cannot be installed onto a device, however, they are pulled into the .apk file at build time." 

When creating a new Android project you can mark a project as ‘Library’ project. This will create a project that can be shared/used in multiple projects. You cannot run/install the library project stand alone instead you have to reuse it in Android project.

How to mark a project as library:


Create a new Android project that will use the library project. Library project can be added as reference as follows:
  • Android Project > Properties > Android (left option) > Library (bottom right pane) > Add

  
                       

Click ‘Apply’ > ‘OK’

  • To use the library class activities in android project, 'import' the library references where ever you are using library files.
  • To launch the library activity you should have that activity listed in your Android project 'AndroidManifest.xml'.
  • Don’t make files (Layouts, Classes, XML’s) with the same name in main and library projects. This can cause problems at run time. What I have noticed is that if you have same name layouts in both projects the library layout got overridden and parent layout will be used.


rizzz86

Saturday, September 13, 2014

Bahrain - Buildings and Architecture

Bahrain is one of the very fast growing countries around the Arab world and is considered as a major tourist centers in Middle East. Some major development has been made in last few years to make country more tourist attractive. Though Bahrain is a very small country but it still has a potential to generate a good revenue and maintains good standard of living. Lets look at some of the renowned places in Bahrain where I have been so far:

Bab Al Bahrain (Gate of Bahrain) is a historical gate of Bahrain which now a days is used as an entrance to Manama market. Previously it was with the edge of sea and fishermen's are used it to starting point of fishing and trading.




This is Bahrain's Financial Harbor building, the tallest and modern building on the main Bahrain highway.


Mosques in Bahrain are very attractive and some of them are kept as historic. Al Fateh Grand Mosque is the biggest on island.






This is Bahrain World Trade Center the most renowned structure in Bahrain. It is close to main (King Faisal) highway. This unique structure is a tower complex connected with three bridges having wind tribunes on it. These tribunes helps in power generation that is consumed in building. Making of this structure is also covered in National Geographic as one of the mega structures.



Bahrain Circuit (Area for World Formula One Championship): The Bahrain International Circuit is a motorsport venue opened in 2004 and used for drag racing, GP2 and the annual Bahrain Grand Prix. The 2004 Grand Prix was the first held in the Middle East.



Skyline (Manama and Al Muharraq):






Bahrain Museum and other visiting points:





Amwaj Lagoon:



Random Structures:






Lots of Malls are in Bahrain such as City Center, Seef Mall, Geant, Dana Mall, Bahrain Mall etc.

Some good parks, water parks are there for family outings.

More will be added as soon as I will be visiting there.

rizzz86

Friday, May 30, 2014

Manipulating PDF document using iText library

There are several libraries that can be used to manipulate a PDF document like PDFBox, iText, PDFClows etc. I also have to do some PDF manipulation stuff and I decided to go with iText. I choose iText because it supports low level PDF manipulation, its community is very strong, lots of helping hands are available and it is also open source and available in both Java and C#.

iText allows you to create a PDF doument, add content in it, update content and save it. I have tried following basic features so far and found it really interesting:

  • With low level support one can add a text chunk, paragraph, phrase, link, chapter, section, image, set text color and other attributes into the document. 
  • You can also create a table/grid inside a PDF document and play with each cell of the table.
  • It is also easy to read an existing PDF document. You can retrieve existing information related to document and pages.
  • Using iText one can also fill up an empty PDF template.
  • It allows to set javascript in a PDF document to make a document interactive. Document can be also be navigated to a particular page. Creating bookmarks, annotations and triggering javascirpt from a button can also be done using iText.
  • Document can also be password encrypted to allow/disallow certain actions that can be done the document.
  • Whole PDF document can also be signed using a certificate to make the document secure.
There is also a book on how to play with PDFs using iText in ActionHe is the author of iText in Action and is very supportive on stackoverflow. I also have some questions regarding iText on stackoverflow on this link.

rizzz86