May 2, 2016

100 days of running ‪#‎100daysrunning‬



This post is updated daily (or almost daily) - the latest updates are at the TOP.


Crazy ideas require crazy people to implement them. Last year I tried running through 100 days straight in summer and I could not start at all.

This year again it caught my eye that the challenge is up again.

Following is my personal log through the journey. The chances are bleak that I would survive - primary reason being there is a probable relocation that needs to be decided upon, a surgery for mom has to be planned and my daughter keeps me hooked on to her. Let's see who wins - the runner in me or something else.

Day 14 - Ghaziabad

So far so good. I have entered that  zone when it becomes easier and the excitement starts going down. Sometimes it's really tough now a days to run but still I am surviving.




Day 7, Day 8 and Day 9 - Ghaziabad - 6/7/8-May-2016

Weekends are difficult to stick to schedule!

Somehow managed to keep my pledge and ran minimum prescribed distance on both Saturday and Sunday. Something is better than nothing! 28% done let's see how rest of the month goes.





Day 6 - Ghaziabad - 6-May-2016 

Morning Notes:  

Dipped into the pool after I guess 7-8 years and could hardly grasp my breath. I think I spent some twenty minutes but it was a real mess. It felt good though and I guess I need to repeat it couple of times before I get back to my swimming days.

Cycled to work afterwards. Let's see how much we can do in the evening. My body is feeling quiet good though I must admit.


Day 5 - Ghaziabad - 5-May-2016 - Evening Run - 2.46 Kms 

Cycled to work quiet late today. Woke up at 10 AM.
Ran a brisk 2.46 Kms and the weather was really conducive.



Here is the Garmin link

Day 4 - Ghaziabad - 4-May-2016 - Evening Run - 3 Kms

Cycled to work early

Evening Notes: 

Ran 3 Kms, dropped my pace to 7 minutes a KM and yes I am still on track. I wanted to run for sometime today and it was really pleasant.

Here is the link @Garmin.

So where do we stand?
A long way still (notice that it says 30 May instead of 31 May - and I could only set a KM goal)


Day 3 - Ghaziabad - 3-May-2016 - Evening Run - 2.7 Kms

Cycled to work early and am starting my day. Interestingly I am on fast as well today. So evening run is going to be a challenge but what's life without a challenge.

There is another appointment for mom at 3:30 PM today - hopefully I will not be driving as much as I had to yesterday.

Evening Notes: 

Again after doctor's appointment reached back home at 6 PM. I was back to running with my mask and the idea today was to stretch a bit more.

Ran 2.7 Kms and yes I am still on track.

For some strange reason I am not able to find this on my Garmin! How can this just disappear? It has happened once before - there was a power outage while the data was being transferred even though this is a mac. The data just disappeared. Will try to retrieve this somehow.

By the way it was a fast today and I was not supposed to have any salt. Dinner was just a bowl of kheer (rice porridge) and it was a real struggle.

Day 2 - Ghaziabad - 2-May-2016 - Evening Run - 2 Kms

Morning Notes:

I decided not to run the morning again next day as I want to give some time to the body to recuperate. Cycled to work as usual - started early and reached at 9:10 AM.

There is a doctor appointment at 4 PM in GK. That means I will be back around 7 PM - there should be enough time to run.

Evening Notes:

Drove for almost 3 hours in crazy traffic and there were still some signs of slow recovery. Decided to run late and stepped out post 8 PM. Tried running with my Respro mask too and I was sticking to my usual known route around Swarn Jayanti park.

Completed 2 Kms and I am still on track.

By the way, riding back home at 2:30 PM was a crazy idea! It was very hot yesterday.

Here is the link to Garmin

Day 1 - Ghaziabad - Evening Run - 1-May-2016 - 2 Kms
I was running after almost a year.

Decided to run on the familiar swarn jayanti park route - started at the corner near ATS and ran opposite to the traffic one complete loop and then one more towards the end edge - tried to keep the pace as low as possible.

Stopped at 2 KMS.

Here is the link to Garmin

Recovery notes - shin hurts a bit.

Let us see how other days go.


‪#‎100daysrunning‬ #summer #PersonalChallenge

Jan 29, 2016

MAC OS X - Android Transfer more than 4 GB Files

The requirement was straight forward to copy a 6.5 Gb file from Phone (I own a 64 GB One Plus Two) and when I tried to do the same - Android File Transfer refused !

The other options to transfer it via network were all slow and I did try shareit and Aid Droid but gave up very soon. I needed to transfer via the USB cable  as wifi would take some time and I am not a very patient types.

Google showed me that adb might be able to help and it indeed did !

By default on my OS X El Capitan (version 10.11.1) - the adb was not in path. However I knew that it would be installed since I remember that I did have android studio installed. A little more google and it pointed that it would be under 

~/Library/Android/sdk/platform-tools

By the way, I also added the path to my bash_profile just to make my life easier next time.

I ran the following command to copy the file from my sdcard0 to my mac. The option -p allows one to see the progress and I recommend the same if you wish to transfer huge files.

adb pull -p /storage/sdcard0/train_photos.tgz /.

That's it. 

So now you know how to Bypass the Android File Transfer 4 GB Limit !

PS: You may need to verify that the adb is able to detect your phone and enable developer options on your phone. 

Aug 9, 2015

Airtel Cafe Coffee Day - Internet Access for free !


Just happened to sit in one of the Cafe Coffee Days in Noida sector 63 today. The store manager was not around and hence we could not request for free WI-FI access - the other option was to pay for the internet service. I thought let me just pay for the service.

The process was simple:

a) Try accessing  google.com and the pop up for Airtel Hot Spot popped up.
b) There was an option to buy data - irrespective of the option one choses - it redirected to 50 INR and 120 minutes internet access plan. (I guess no one even tested the feature once !)
c) The site asked for keying in the phone number for sending verification code and post providing the code redirected to select the plan (or was it other way round - not sure)
c) We selected to pay by Net Banking and selected our bank.
d) The payment gateway never came up for HDFC bank irrespective of the number of tries made.

At this point the internet start to work for a short duration and the interesting part is you can keep on repeating the process any number of times. I wanted to see how many times can one try until you get blocked - well I gave up after three tries. There should have been a check at this stage - someone requesting authorisation over and over again should be part of the expected scenario.

Just shows how screwed up Airtel is. The other day I tried for hours to edit the myBill plan to today I genuinely tried to pay for service. Somehow Airtel never cares !

I guess rather than trying to convince TRAI against Net Neutrality - Airtel should try to fix holes in its IT infrastructure which are causing them revenue leaks. 

Jun 24, 2015

TSV to CSV Quickie


Sed a very powerful editor on *IX/Mac allows to convert TSV to any delimited format. Basically a simple replacement in file which is quick and efficient.

sed "s/ /,/g" >

On linux box it is easier to identify a tab by \t however on mac one needs to press the Control + v and then hit the "tab" button.

The generic syntax to replace all occurrences of from_a with to_b is

sed "s/from_a /to_b/g" >

In case of optional delimiters also used when strings are always with double quotes (idiot sqldeveloper exporting data in my case"  following will do the trick
 sed -e 's#"##g' source  > destination

Use ">>" instead of ">" in case you want to append and not overwrite. 

Feb 26, 2015

Oracle installation - Enable Access from Another Machine : Newbie Oracle Tip


How many times have we installed Oracle any version on windows or unix (when the IP address is not static) and then found that even though you can connect to Database on the server through sqlplus  it is not accessible on other machines.

Personally there used to be a time in my previous organisation when most business and technical consultants installing oracle were clueless and ended up only talking to the database on their machine.

Oracle has a file called listner.ora in the directory $ORACLE_HOME\NETWORK\ADMIN
Here is the file from one of the installation





Notice that the server has the IP address 10.91.1.105 in this case. That's it ! Now how to check if your Oracle server is accepting connections? Simple my favourit utility is nmap. Just scan the ports on the server and the port (in our case the default 1521) will be open.

That's it !

Amazon SES Oracle: Production Access and still not able to send emails


Scenario: We received the AWS credentials but were not able to decide what was the quickest way to test if the mail service was working correctly.

Few minutes on google and there was a python script which we modified to our test case. All your need to do is key in your AWScredentials.



What is the good thing about this script? The script writes a detailed log so for example in our case the program was accidentally changed and the from email address was changed.  Even though we had Production access enabled we were not able to send emails at all.

I am attaching the script output for quick reference



Notice that it clearly says 554, 'Message rejected: Email address is not verified.'


Tip: The production access allows to send email to any email id but it restricts that the "from" address at least must be verified if not the domain. This was the culprit in our case as the from email id was not verified.

May 14, 2014

Bangalore Delhi Drive - May 2014

Well somethings just happen and so was the decision to drive from Bangalore to Delhi.

I landed from Malaysia (Kuala Lumpur) on 4-May-2014 in Banglaore and Ankush flew in from Delhi on 5-May-2014. He just flew in to provide company - my original plan was to drive irrespective of if someone wants to join or not. However it was good company and made a big difference.

Trip meter was set to zero (the tank was filled up last night at HP) and air pressure was checked the previous night. As a preparation the documents (all except the pollution certificate were ready).

Day 1 


0615 hrs,  Bangalore (Nani's Place, HAL Airport Road, Bangalore)
Plan for the day: Tumkur-->Chitraduga-->Hubli-->Kolhapur

Good Bye to Nani : Long Live and Prosper

We were able to beat the traffic in Bangalore and were rolling to Tumkur. We took the route via. outer ring road and there was not much traffic. Once we hit the Tumkur road - the traffic became even more sparse as it was Tuesday morning.

Breakfast - Chitradurga was a bad experience. We crossed the town and were looking for toilets as well as breakfast. It was not that easy. Had to drive back about a kilometer.

0940 hrs (186 kms) - Naveen  Regency on the left side on the NH4. Thanks to Akka in Bangalore
170 bucks the food was nothing great (170 bucks for two masala dosa, kesari bath, idli vada)

The toilet was horrible and I had to shit while standing. Asked Ankush to use the newspaper as a disposable toilet seat cover. Anyones nothing beats the joy of taking a dump :D

Excellent roads all the way - walls in Chitradurga control the incoming traffic into the highway.The windmills at Chitradurga are always a delight to see.

1218hrs (360kms) - 40kms before Hubli. 
We should have stopped here and there was another Kamat before this. I recommend stopping at Kamat for breakfast instead of Naveen Regency

CCD - Two coffees and cookies and we were back on the road. Handed over the keys to Ankush.

What was on our mind now - Should we  drive own to Pune (459 Kms from here) or stop at Kolhapur as planned which is just another 257 Kms. We decided to drive down to Belgaum and then take a call.

**Fuel** - Refill at Jabbar (Hubli) - the same pump on the side of the highway where we fuelled on our way to Goa. Indian Oil Bunk.
INR 2000 25.19 ltrs


1353hrs (477kms done) - First selfie posted on the Whatsapp group posted to keep the team posted about movements

14:05hrs Check into Belgaum and rain greeted us. We decided to continue until we find a place for lunch.

15:19hrs - 590kms Lunch Break @Hotel Kaveri

17:40hrs - 716.8Kms decided to head towards Pune and may be stop over in Satara.

20:13hrs - 871.7kms Stopped at Pune

Day1 Summary: We drove for almost 14 hours with the average speed of 62.21 Km/hr. We took three breaks in the day. I drove until  Jabbar and from there Ankush drove till Kaveri Hotel. I was driving all the way to Pune

Toll Charges: Almost 1 INR/KM

Fuel was almost running out.

End of Stay: Stayed over at Ankush's friend and met Sarna from my college.
Dinner at dhabha - INR 2470

We actually drove more than we had planned. We wanted to stay in Kolhapur and actually drove to Pune.
 Day 2 plan was to start easy as we wanted to hit Bombay only and stay at  my sister's place in Thane.

Few Pictures from Day I

Windmills at Chitradurga



Windmill blades being transported near Chitradurga



Selfie for the records only post Coffee Break at CCD


HIghway near Belgaum



Day 2

08:29 hrs We started looking for a petrol pump as we were running low on fuel.
Asked in a puncture shop and he offered us tea ! This only happens in India all we were asking for is directions and Ankush addressed the gentleman as Bhaijaan guessing by his beard that he was a muslim, He won my heart with a smile offering us tea.

**Fuel Report**
08:48 hrs 31.04 Ltrs at INR 80.52/ltr 872kms

We took Mumbai Pune expressway and the destinaion was Thane. I drove all the way.
The expressway is okay - Lonavala and Khandala are okayish nothing striking about the hills for me as I come from Uttarakhand.

We took the first break on the expressway  on our side and had omlette. We should have waited the next option was much better.

The toll is expensive almost INR2/km and we paid 324 bucks to drive all the way.
The road is okayish with heavy traffic and goes through the urban areas.

I was already missing the roads of Karnataka.

11:23 hrs 1021.1 Kms parked in Thane

Agenda for the day - relax at home :)

Day 2 Summary: Expensive toll and boring roads - not even four lanes like most of Karnataka roads. There was traffic all the way after Satara and it was mix of two and four wheelers. Morning saw heavy truck traffic.

Average speed 60Km/hr

Picutres

This is how Golden Quadrilateral is near Mumbai. We are entering Thane



Day 3

We started late :) the sleep cycle was catching up. We had slept on the night before traveling for 4 hours and then in Pune again for about 5 hours. I could not wake up on time and we left late at home.

Plan - Hit Ahmadabad via Surat and Varodra

08:25hrs - 1021Kms started to Ahmadabad and decided to take a detour to Daman.
Road was terrible to start with and then became better but there was too much traffic and required zig-zag driving between trucks. We took a  detour at Vapi and went into Daman

11:49 hrs - 1199kms parked at a resturant on Nani Beach in Daman.
The food was gawti chicken and dal. And we were really hungry - even ate lunch in the afternoon. 
The toilet was good :)

13:52 hrs: Started driving again to Ahmadabad. The CON was now with Ankush. 

We were searching for a CCD and could not find so we stopped at McDonalds for lousy idea tea which we threw. NH8 had very high truck density per kms and it was tricky to drive.

**Fuel Report**
15:20 hrs 1330 kms 29.74 ltrs 2200INR at 74.67 Rs/Ltr

Ankush was not feeling well and had sever gas trouble. I guess it was because of the food that we ate, He asked me to resume driving.

16:56 hrs 1416 kms CCD Break - Ankush was not really feeling very good. Stopped at Varoda to buy him medicines and then again at another place to buy more. I was again driving now. The traffic was bad until vardra because of school holidays and trucks were all replaced by cars

19:36 hrs 1568.5kms  Ahmadabad. The Varoda Ahmadabad expressway is awesome and may be the best road until now that I have seen in India. Only three exits and people were driving very nicely.

The driving was crazy inside the town and it was tricky to find a hotel, We stayed at Prithivi Hotel and it must be avoided at all costs. We paid 2400 INR for a terrrible place as I didnot want to drive more into city.

Ankush was feeling better now.

Dinner at McDonalds and roamed around in Auto for some time. 

Day3 Summary: 11 hours Average Speed 50 km/hr

Gujrat McDonalds - the Ice Tea was horrible


Following are shots from Varodra Ahmadabad express highway.




Day 4

We wanted to leave early and were actually able to do so. 
Day plan was to halt in Ajmer about 425 Kms or maybe extend it to Jaipur.

The planned route for the day was to Ahmadabad->Udaiput->Ajmer (425 kms) ->Jaipur

08:04 hrs 1568Kms started and headed towards Udaipur

**Fuel Report**
10:59 hrs 1760 Kms 30.90 ltr INR 2319.6 (@75.08 Rs/Ltr)

13:10 hrs Lunch Break at Nathdwara. 
We were looking for a restaurant and there was none until this place from Udaipur. 

NH8 roads near Udaipur are terrible. Two lane roads on the golden quadrilateral were a disappointment.
The bypass to Udaipur was also horrible due to slow moving trucks and ghat. This continued all the way until Bheem. The road widening is taking place in Nathdwara and it is making things even more difficult.

13:49 hrs 1879 kms Plan changed to go to Jaipur instead of Ajmer.

                                   

15:20 hrs 1964.8kms Devgarh reached

17:03 hrs 2101 kms At Ajmer bypass heading to Jaipur (129 Kms away)

20:08 hrs Destination revised to Noida. Plan to drive via Bharatpur on Jaipur Agra highway. The road from Jaipur to Delhi via Gurgaon has been reported to be bad. Further we need to stop for dinner as well now.
Last minute information is that Bharatpur is not safe.

Fuel 31 ltrs 

21:58 hrs 2368.6kms Dinner at dhaba about 60 Kms before Bharatpur. I have been driving all day except between Nathdwara and Ajmer. The plan now is I will drive all the way until I am tired and then Ankush will take over.

23:38 hrs Mathura is now 23 kms. The road traffic is really deserted and scary after we left the highway and came into Bharatpur. We drove 10 kms of bad road to join back to highway which is joining Mathura.

00:22 hrs 2480 kms I am still driving we reached safely on the border crossing we are interrogated by the cops from Rajasthan. they want to know where are we coming from, where are we going - my mobile number as well.

The only other incident where we were stopped was in Rajasthan earlier in the day. Easy one.

00:37 hrs 2496.3 kms Reached the Taj Expressway and stopped at the first resting place after the toll. My turn to hand over the reins to Ankush. I have already completed over 11 hours of driving for today.


00:45 hrs Ankush driving for home now on the best road in India. Awesome road you can easily hit 130 - wide and nicely made.

02:08 hrs 2624 kms Parked at home in Noida



Day summary - Ahmadabad to Noida in one day ! 4 states 1056 kms average speed of 58.67 Two fuelings in a day :)


Trip Summary
176.87 Ltr Petrol
15kms per liter on an average
Average speed of 60 Km/hr



Dec 30, 2013

If you can understand the me, I can understand the you

What are we looking for in a partner? What does the word understanding mean? How do you understand someone?

Let me ask one question and yes I don't have an answer to it but still I am raising it. We all expect our partners to understand us and accept us.The question is how can someone understand me when firstly I haven't understood or known myself. Similarly how can I understand someone else before figuring myself out. Is this a realistic expectation ? How can it be and we all know what exceptions do to us. They kill the joy.

I guess we need to understand ourselves before we claim to understand anyone else or even try to do so? What say? Share your thoughts? Will you share your understanding?

And while the thought ran in my head I remember a line from Metallica I heard long ago  ago

"If you can understand the me, I can understand the you"

जाति न पूछो साधु की, पूछ लीजिये ज्ञान

Kabir wrote the famous doha years ago long before this consumerism, advertisement and media industry was created to make us to believe and create need for the things we don't need. Damn the line is too straight forward without any meaning and context and sounds way out of place.

Let me try to raise a point here.

What does a man with a big car say a Rolls Royce and a big beach house indicate to you. Mind it you haven't seen the man yet and you just see him driving out of a mansion into this big car. With our times and our mindset I wouldn't be surprized if a whole lot of us would associate him to be rich and powerful.

Let us take another scenario. Let us assume I have just started to make some decent money and I can afford a nice big sedan with a big engine and nice chrome. Should I buy it? Yes no one stops me. The car companies would be happy to sell me one and would love to project that I would feel more valuable once I have the car. But the key question is should I buy it just beacuse they want me to and condition my mind via advertising to buy.

Hell NO ! This is corrupting our mind.

Yeah it's called marketing too.

Slowly we have all been conditioned by all the advertising and promotion to believe that we need the things. Our wallets, our share of mind, our value system have all been programmed to respect for example big cars and big houses even if they are on loan !

We have been programmed to believe that if we can afford it or if we think we should afford it we should buy it. 

This creates many problems:

a) We consume more than we need and never bother about sharing
b) We often consume directly or indirectly someone else's share
c) We believe and prmote the philosophy that more the better
d) By not questioning the motive ours kids fail to see the difference and the fine print. The conditioning becomes stronger and stronger without questioning over time.
e) For example rich families who can afford food waste a lot of food just beacuse they can afford to do so while millions die of hunger.

So hundreds of years ago Saint Kabir saw this coming and said let us not waste on things that don't really matter and the way it can be achieved is by not associating value with them.

जाति न पूछो साधु की, पूछ लीजिये ज्ञान,
मोल करो तरवार का, पड़ा रहन दो म्यान।

Literally translated it means that one should not ask a holy man about his caste because he has already renounced it and it is his past. What should be discussed with him and asked is the knowledge that he has acquired after he became enlightened. This knowledge is the real value and should define him. This is on the same lines that the real value is of the sword and the casing that holds it and is carried in has negligible utility. However beautiful is the casing and expensive still it has zero worth and value when the real need and time to draw a sword comes.

Oct 28, 2013

Review Yamaha MCR-B142

I recently bought the Yamaha MCR-B142 desktop all in one CD player which allows digital music playback from iOS devices including the ones with lightening conductor (the iphone5s and iPad 4th generation). If you are looking for standard features and all this is not the place to look for. Google.

What could be a good buy - check out Sonos - they might be a good buy for $399 too.

So coming straight to the point about what sounds bad on this.

If you like a lot of Hans Zimmer kind of music - Time from Inception sounds so bad that you will regret buying this. However I must add here that I will be surpized if you were expecting zimmer to sound good for $300. Inception and most of Hans Zimmer's music is best enjoyed on headphone and I prefer my Bowers and Wilkins P5 to deliver.

What sounds good - all the new optimized for new recordings and flac sound richer as expected. I have tested with Ernst Reijseger - Cave of Forgotten Dream. Sounds fresh.

What surprised me - Build quality and wood in the speakers. Lot of bass this small unit produces and fill a room nicely. I love the fact that the model allows for the speaker to be separated and hence you can enjoy the spatial arrangement where left and right channels are separated. I hate the design where it is all part of one box - I guess the Left and Right channels have to be at a distance for the music to rightly converge. 

Who should buy -  looking for a music system to fill in small space or living room. Good for bluetooth internet radio (I prefer 8 tracks) or BBC. My wife plays music via Bluetooth and it sounds OK. If you are looking something for your kitchen / verandah or bedroom this is for you. 

Turn the knob to 40/50 and at about 80% amplifier works beautifully. I am waiting to see if the break in will improve the performance. I have done about 25-30 hours and I am waiting to see how it appears after 50/100 hours.

By the way the new music will sound pretty neat - am usually concerned about my lossless oldies more than anything else. Why? Why do you ask am surprised to know that. If you know about lossless and flac or vinyls, have you lately noticed how good the new music sounds on the small commercial players and how lousy the old fabulous recordings from 70s sometimes hear especially when there is no difference in your music quality. 

I wondered why for months after buying my first Bowers and Wilkins P5 headphones. I guess mass production of music to be consumed on small USB speakers and boom boxes, to be played on cheap headphones and to be readily downloadable or streamable from Cloud is causing the music to die. I am not sure if I am the only one but I still prefer my music to be rich. I hate Convergence for this reason and this rampant commercialisation. Call me a cynic but so am I.





Music Recommendation: Ernst Reijseger

Artist Recommendation: Ernst Reijseger.
Check out the soundtrack of the movie - Cave of Forgotten Dreams. Treat for your audiophile equipment

He is a magnificent cellist, and he can do anything, anything on his cello. He could play the civil war, the American Civil war on his cello." —WernerHerzog"

Reijseger's most well known solo album is Colla Voche, which he recorded in a room of a small villa which he was staying in on a trip to Sardinia, this would be the same trip that he would meet the Voches De Sardinia.

More about the him on wiki

Ernst Reijseger (born November 13, 1954, in Bussum) is a Dutch cellist and composer. He specializes in jazz, improvised music, and contemporary classical music and often gives solo concerts. He has worked with Louis Sclavis, Derek Bailey, Han Bennink, Misha Mengelberg, Gerry Hemingway, Yo-Yo Ma, Albert Mangelsdorff, Franco D'Andrea, Joëlle Léandre, Georg Gräwe, Trilok Gurtu, and Mola Sylla, and has done several world music projects working with musicians from Sardinia, Turkey, Iran, Senegal, and Argentina, as well as the Netherlands based group Boi Akih.

He has made numerous recordings, both as solo cellist and with other groups, and has been the subject of a documentary film. He has also written several film scores, including scores for a number of Werner Herzog films.

Oct 22, 2013

The Running and Cooling Catharsis - bliss

I am new to running. It's an important disclaimer to put because I think I have not even run 300kms till date and am still wearing the same running shoes. I started running because of my wife - she kept on telling me that running in the gym makes her feel strange kind of goodness and she kept on bringing it on until I gave up to try. The running was restricted to the treadmill in the gymnasium of our condominium in Malaysia.

We ran together for few weeks and then I kind of started falling in love with the act of running. Especially because I have never been one of those sports guys - never.

Then I moved to Bangalore as I keep on shuffling between Bangalore where I work and Kuala Lumpur where my wife lives. I have an active group in Bangalore a small group - where people have run marathons and actively do and are always looking for someone to run with. Thanks to Nani, Mithun I started running on the road - and boy it was different.  It was like running again.

And I started running whenever I could find a chance twice, thrice and sometimes even five times a week. My best till date is 30.05 minutes for a 5 KM but that is not what I want to share.

The focus on time and distance sometimes just blocks me and takes away the joy of running. So sometimes especially in KL I have not been tracking anything except for my distance which I check on the map. I run at my own sweet pace.

Yesterday something even more beautiful happened. I came back after my 5.8 KM run and the lights were out in the bedroom and I sat in front of the table fan. I had just finished my basic stretching and done a 5 min cool down. And then unknowingly I moved into the yoga sitting pose and closed my eyes. Sitting in the padmasana I didn't realize when I entered the state and just blanked out.

Awesome meditative state because I guess catharsis kicked in !

Try it out for yourself and if you like the experience - do share it with me.

Sep 26, 2013

Oracle Database Charactersets

For a non-dba this a pretty confusing topic. Still gone are the days when only DBA's were installing Oracle. A lot of people now who have very limited knowledge of Oracle are today running databases on their laptops.

First of all what is this all about. This is about loading multiple languages into your application and how to manage it with Oracle. Let's verify your current settings

select parameter,
value from v$nls_parameters
WHERE parameter IN ( 'NLS_CHARACTERSET', 'NLS_LANGUAGE', 'NLS_TERRITORY','NLS_NCHAR_CHARACTERSET','NLS_LENGTH_SEMANTICS');

Here is the output of the query:
PARAMETER    VALUE
NLS_LANGUAGE    AMERICAN
NLS_TERRITORY    AMERICA
NLS_CHARACTERSET    AL32UTF8
NLS_NCHAR_CHARACTERSET    AL16UTF16
NLS_LENGTH_SEMANTICS    BYTE

First question - what is the oracle default Characterset for my database?
The answer to that is NLS_CHARACTERSET

What is NLS_NCHAR_CHARACTERSET - in layman terms if you are not using NCHAR, NVARCHAR or NCLOB forget about it. It is not important for you.

What is a unicode?
Unicode data sets allow databases to store asian, eastern european data in your alpha numeric and other columns. In other words, this provides a handle to implement multi language support.

What is the difference between AL32UTF8 and AL16UTF16 character sets?
If I store the letter 'a' in a NVARCHAR2 column, Oarcle would allocate 2 bytes of storage if the NLS_NCHAR_CHARACTERSET is AL16UTF16. If I store the letter 'a' in a NVARCHAR2 column, Oracle would allocate 1 byte of storage if the NLS_NCHAR_CHARACTERSET is AL32UTF8

If you are storing primarily English data, AL16UTF16 will cause Oracle to consume nearly twice as much space on disk and in RAM for that data as would be required if you used an AL32UTF8 character set.
This hold true even for the NLS_CHARACTERSET

What is NLS_LENGTH_SEMANTICS?
While creating tables Oracle needs to know how much space is to be allocated.
For example when you define COLUMNONE which has data type of VARCHAR2 20. Oracle needs to know how much 20 means - is it 20 Bytes or is it 20chars.
Oracle uses the NLS_LENGTH_SEMANTICS setting and the value for the parameter is used to translate 20

Why is the Byte and Char difference important?
Well if you are primarily talking about English language (and hence Latin Characterset) every char is one byte. However Eastern European languages and even Russian (Cyrillic) have 2 bytes to represent one char, asian languages have sometimes 3 and there are some others with four bytes.

My Database is unicode but I am not able to store asian languages?
Check your table scripts - the field that you are trying to insert data into is it defined as CHAR or BYTE?
Query  ALL_TAB_COLUMNS and check for the value in CHAR_USED - if it is B it means Byte, if it is C it means Char.
For example in my case I was trying to insert 16 chars of Russian into the VARCHAR2 (30) field on my database table LOCATIONS in the LOCATION_NAME column and it was throwing me and error.
The NLS_LENGTH_SEMANTICS was set as Byte and 16 russian chars meant 32 bytes which was beyiond the size.

ALTER TABLE LOCATIONS
MODIFY(LOCATION_NAME VARCHAR2(30 CHAR));
After the above change the same 16 chars were loaded successfully.

What is the fix for your application?
I hope your application supports the muti byte chars and all you are looking for in that case is alter statements. The beauty is since you are going to expand the columns Oracle will never create a problem.

Firstly change your DB setting by logging into your sys account on database
ALTER SYSTEM SET NLS_LENGTH_SEMANTICS=CHAR;

And if you are using SQLLDR it needs to support multiple languages
CHARACTERSET UTF8

Now you need to restart your database. You may do so by logging into sqlplus as sysdba and ussing "shutdown immediate" and "startup" one after the other. Please make sure you understand these and have taken precautions required.

Then login to your schema and run the following query
SELECT 'ALTER TABLE '|| TABLE_NAME ||' MODIFY( ' || COLUMN_NAME||'  VARCHAR2('||  DATA_LENGTH || ' CHAR));' QUERY
FROM user_TAB_COLUMNS WHERE  DATA_TYPE in ('VARCHAR2','CHAR')
and table_name not in (select view_name from user_views);


You may spool the results and run the output as a sql script. Basically for every CHAR and VARCHAR2 datatype in your database it will change the definition from BYTE to CHAR.


Want to read more - here is a beautiful article.

http://orathings.blogspot.com/2012/08/happy-three-friends-varchar2-unicode.html

Aug 3, 2013

First Family Photoshoot - Mistakes I Made

There was a casual request from a couple friend to click few of the pictures for them. Well I picked up my 50,85 mm f1.8, 18-105mm and my flash SB910 and spent about an hour taking pictures.

Lightening was awesome - we picked a place where a lot of reflected light was reaching.The focus was always smart on eye in most cases - so what went wrong was something I realized when I processed the pictures.

I was shooting with too wide open Aperture. I was shooting at f3.2 and below most of the times. The pictures looked sharp on the camera but since there were two people they often moved. In lieu of the nice bokeh I screwed up a lot of pictures due to the shallow depth of field setting ! Keep an eye at the aperture especially when there are two people in shot. I know with more it is obvious but I got lost since most of my recent photos have been with just one person.

I rejected all but this and I can say that at least this one looks like created for the purpose.
Click on the image to look at the poor result which you can only see on a big screen.



Second problem as expected was posing. You need to have a catalog of poses for you to work with.


Third was that on more than one occasion I failed to notice the change in lightening. The aperture mode isn't smart enough and I should have been shooting manual especially when I am comfortable shooting.


Four - the auto exposure calculation gets confused when contrast isn't enough. So focus on something that has contrast and them recompose. I didn't do it every time because it was slipping of my mind over an over again.

What saved the day - yes my definition is very lame. I got one picture which I really liked.



Okay now what went right - I was shooting RAW. I think nothing beats that.

Jul 30, 2013

दो मासूम खुदा - Gulzar

दो मासूम खुदा
शिमला के सफ़र का एक मंज़र :

सर्दी थी और कोहरा था
और सुबह की बस आधी आँख खुली थी,
आधी नींद में थी!

शिमला से जब नीचे आते
एक पहाड़ी के कोने में
बस्ते जितनी बस्ती थी इक
बटवे जितना मंदिर था
साथ लगी मस्जिद, वो भी लॉकिट जितनी

नींद भरी दो बाहों
जैसे मस्जिद के मीनार गले में मन्दिर के,
दो मासूम खुदा सोए थे!
एक बूढ़े झरने के नीचे!!
~Gulzar 

May 2, 2013

Interesting Tic Tac Toe Game

One game everyone will like :)


   
   
   
   
   

Nov 27, 2012

Oracle Tip : Override or have a local copy of TNSNAMES.ORA



Usually users don’t have access on UNIX box to modify the global TNSNAMES.ORA in the $ORACLE_HOME/network/admin. In this case all they need to do is create a .tnsnames.ora [notice the DOT before the file name] in their home directory. Next time when you login oracle notices this file and when you try to connect it looks up this file before the global tnsnames.ora is referred. In case of conflicts user’s version takes precedence.


Flag for the DBA - when a user on UNIX says he is not able to connect the culprit could be his copy of .tnsnames.ora too!

And for the still curious this is possible with sqlnet.ora as well.

Oh I love Oracle :)

Jun 30, 2012

ICU Stories - the night watchman

His name is Muhammad. He is not the regular guy you recruit as a watchman. He does night duty for INR 5000 per month and the perks are free food and a space to sleep. He works 7 days a week.

The question is what us about him that am blogging about. He is not even an ICU or hospital guy. He works at the guest house where I am living.

He used to be a commercial truck driver and drove in India for 25 years between 1980 and 2005. Those were the times when the national highways were not four lanes and the driving was very troublesome. As per him "saheb aisa koi nazara nahi jo kisi.ne bataya ya humne padha ho aur dekha na ho" - sir I have seen every sight I have heard or read about in India.

But what is so special about him. His life is a sort of contrasts and his faith and manners surprise. He is a short thin man with a white beard like most people keep when they don't want to shave. He drove non-stop for 25 years until his eyes were no longer good enough to drive. He returned back to his native place near Sultanpur, UP for six years. He lost his wife and understood that his sons don't earn enough to feed the family. The only time in his life when he wanted to stay at peace and in one place.

He returned to Noida to earn again. Today at 60 he says "sir yaha jindagi ruki se hai" (life is too static here). And adds "malik ke dua hai, yaha tak wohi laya hai. Peeche ke chinta nahi hai bas aage ka sochna hai. Agar mere haath pair ruk gaye to na jane kya hoga. Bas aise he jaan nikal jaye chalte chalte".

He speaks with a calmness I haven't seen much. Probably it only comes to those who have inner peace and immense patience. Someone who has immense faith in the lord and life.

Hats of Muhammad - we all can learn a lesson from you. It is indeed easiest to blame it on destiny; sulk and cry and you have not chosen that path. It takes immense strengh to stand up alone, take charge of your life and not complain but express Gratitude. This world survives by the spirit of yours !

Hats off !

Jun 29, 2012

ICU Stories - The Attendant of Bed No. 7

Let me give you a situation. Imagine this - you are 84. Your spouse is in ICU and very critical. You were a decorated officer with the armed forces. You have four sons - one is a qualified medical practioner himself in the same city. The other three are settled abroad after their respective doctorates. The doctors tell you only one thing - all that can be done is being done and hope is grim.

How will you respond.

Close your eyes. Yeah I want you to really think about your response. There is no point if you can't relate to the situation.

Let me be open and share mine. I guess I will be quiet and withdrawn. I will switch off my phone. I will not talk to anyone and ask everyone to leave me alone. I will not give up but I will face it alone and never entertain questions or thoughts like why is my spouse suffering. I might say a prayer or two. I will cry but no one will see it.

Think about your response....

Now let me tell you about uncle. I never talk to people in hospitals. However uncle smiles in a manner you just can't resist him. He talks in a polite tone. He always asks everyone how they are? He always smiles though I have seen him cry too. His love for his wife I guess makes his voice heavy but he holds his emotions so well.

He never forgets to ask me about my Dad. His politeness manner and composure surprises me every time I speak to him.

I have just one word for him Respect and I wish his wife speedy recovery. This gentlemam has touched me in a manner I guess very few ever will !

Uncle I will not be able to tell you but I really wish you were not alone. Your sons should have been by your side in this hour.

Peace.

Jun 28, 2012

ICU Stories - The Critical Care Doctors

With all due respect to the noble profession of doctors - I guess not everything is too well. The profession needs a thorough medical check up and may be intervention cause too much is at stake. In India doctors have been raised to the level of Gods. Yeah if you are an outsider and don't agree you haven't really seen it. Doctors are literally worshipped and no questions are usually asked - may br because doctors did save lives and secondly because of the illiteracy and poverty. This is even more so in rural and government hospitals.

Few things have changed now however - internet boom and the high penetration of internet. And doctors don't seem to like it ! At least the ICU doctors.

First of all let me say I respect doctors. The trauma patients and attendants are always serious. There are restrictions on visiting hours and all that but imagine 21 beds for 1 senior duty doctor and 1 junior. Hats off the system runs in India and the cost vs. quality is very much in favor of patients.

What am I cribbing about then ?

* The doctors are rarely discussing things. The information never includes relevant details until you ask and know what needs to be asked

* Processes and declarations are brought out for signatures but never explained. Dad has been subjected to four spinal taps or lumber puncture for CSF tests - never was I explained the risks. One of my friend explained me the signs to watch out for and potential risks and trust me not many in India have access to such awesone knowledgeable friends.

* Details of treatment - the doctors never disclose the details unless asked about persistently and why is it important? Dad had a stent put in post his MI or heart attack and there is a critical drug he is on for at least two years. The drug was stopped because he was suspected of some blood in urine and we were not updated. So far so good but then they forgot to start it ! Imagine that and it can potentially lead to another blockade and what not !

* The side effects - Dad was on steroids for eight months due to a rare condition called PMR - a kind of rehumatic fever. The steroids are immuno suppressants - we were never disclosed the fact that it induces a similar condition like HIV. He got infected with fungal (cryptococcal) menningitis - a fatal disease which is associated with people having severely low immunity.

And I have come across a doctor who said to me "leave the technical details to us"; "what do you do" in a tone which meant stay out of this you are not a doctor; "did u read that out of internet" in a tone which meant idiot u have no clue - isn't it strange. I have been attending to Dad full time for a month - if I can manage complex supply chains why shouldn't I try to understand my Dad's treatment.

I will try to read every report and document because I have time which means even if I might not be relevant but I can still ask layman logical questions.

However dear doctors either raise level of service for everyone or please be prepared for more concerns and questions being raised. By the way if we step back and see - it is a service being offered and patients are paying for it ! We have the duty to not cross the line but yes it will be difficult to dodge questions and hide behind technical details