All posts by haikvr

Running Notes : Week 2/16

Monday – June 8th

When I woke up felt my legs ached a bit. Was debating whether to give it a pass – as I have 2 long runs coming up the next 2 days.

Anyway, dragged myself out of the home and started at my gentle pace. Once I started running did not think of the mild pain.. it went away I guess. It was just my mind fooling me. Then when I had 2 kms to go raised my pace a bit. I think I can identify 2 paces – a slow pace where I breathe through my nose effortlessly, and a slightly faster pace – where I really run – and breathe through the mouth. I feel I have one more gear left.

Listening to Once a runner audio book. It is about a bunch of cross country athletes in a South Eastern University of Florida, and our protagonist – Cassidy – is in trouble. He had represented other athletes against a rather stupid circular from their Athletic director – to cut hairs and wear collared shirts. And the athletic department has suspended him to bring fear and discipline in others. He is to face the board today, but before that goes for a run with his friend – and the author philosophises about running – beautiful piece.

Tuesday – June 9th

Night I had to put Volini on my knees. They were not feeling normal. When I woke up knees did not have the odd feeling. Had the nagging fear – will I get pain on my knees and I have to break my run midway?

I was searching for WWDC podcasts, but none were there. I continued Cassidy’s story and he is thrown out of college. He goes to the woods and lives alone and becomes a monk runner – runs twice a day.. almost a full marathon each day.

Todays run is 9.7 KMs, had to run at a fast pace after 1.6KMs. I picked up pace, and each lap I ran faster than the previous one – like a Formula 1 car that picks up speed as its fuel load lightens up. Ended up with amazing timing – almost 6.30 on average – pretty impressive.

Right knee is acting up a bit – gotto give it a massage in the night, and perhaps buy the knee braces. This running business is expensive.

Wednesday – June 10th

Woke up at 4:20AM in anticipation. Thought I will do Sudarshan Kriya, but dozed off. Searched for any good podcasts, I only got 2 hours left in the audio book. Did not find any interesting podcasts, so decided to run with the book.

It was a gentle good run – 8.4kms – did not push too hard at any point.

In the story Cassidy practises real hard and even manages to run a mile within 4 minutes. His friend Denton keeps Cassidy filled with books, training and keeps him sane. He is trying to enrol Cassidy in an athletic meet, but the College board removed Cassidy’s name from him. Denton talks to the Chancellor – and says Cassidy can bring glory as he has improved a lot, but the Chancellor talks of discipline etc. and even threatens Denton openly on his academic career coming to an end if he keeps supporting Cassidy.

I picked up a mild pain in the right leg muscle below the knee on the back. Tomorrow is cross-training day ( I call it rest day ) – if I give it enough rest it will be alright.

Thursday – June 11th

Cross-training day. Did Suriya Namaskar and Sudarshan Kriya.

Friday – June 12th

I had a 8am meeting in Worli. That means had to leave home by 7am. That means I have to complete my run by 6:15am max. That means I have to wake up by 5:00am. Thats what I did and ran 6.4kms.

It had rained the night before, and it was dark and there are little pools of water here and there. The Mumbai rain season is just beginning. Legs felt heavy and was wondering how I will do the long run tomorrow. Also I did not have my morning dose of filter coffee – so was in a terrible mood at the beginning. But like in all runs – after a few steps the dark mood drifted away.

Cassidy trains real hard. Denton his friend and trainer makes him work really hard. Does interval training where he gets him fully tired. Then makes him repeat it – and here is where Cassidy discovers something inside him. After this he sleeps for 17 hours straight after this.

And he is going to race in the College Track once again. The worlds faster runner – a bloke from NewZealand – is to participate and Cassidy is enlisted as Faaz – with Denton doing some shady stuff – as a Finnish runner. And Cassidy had stopped shaving and grows a beard – so he won’t be recognised. Can’t wait for tomorrow’s run to see how this story ends.

Saturday – June 13th

Today is the longest run of the week.13kms.

Legs feel real tired. I started the run with lot of doubts – could I finish today’s run and the Marathon?? It was drizzling a bit and had to watch where I put my foot as I might slip on the slopes.

I tuned into the audio book – and Cassidy walks the track before the race night thinking what he will do at every step. And the race night. It is all explained in detail. After the race starts, somehow the word spreads and everyone comes to know the bearded runner  is not Faaz – the finish runner – but their own hero – Cassidy – who has been expelled – and the crowd starts chanting. Cassidy’s now ex-girl friend – Andrea – stands up and sees his face – and suddenly realises what this runner is all about and she too starts chanting – much to the chagrin of her new boyfriend.

I cry here. Thankfully my spectacles is all wet and no one would have known. I was rooting for Cassidy too.

The Newzealand Runner is ahead but at the final stretch Cassidy beats him to win the race and that too in 3.52 minutes. His fastest ever and he not only breaks the 4 minute barrier, he also beats the worlds fastest runner. The Athletic director eats humble pie.

The story ends with him leaving the medal on the field and walking away.

The story got over quickly. I still have 5 more kms to go and it was getting tough. My legs have become very tired and the last 2 kms I had to really push hard to complete.

Tomorrow thankfully is a rest day – and from Monday Week 3 starts. And next week the long run is 16km. It is cruel – after a gruelling week – on Saturday – when my poor legs are the most tired is when I do the longest run of the week. This is how athletes build strength I guess. This is how they learn to run the last 10 or 15 kms of the 42km Marathon – when they are all done and tired, they dig into their deepest reserves to complete the race.

“Trial of Miles. Miles of Trials” – Once a runner.

This week running summary

Next Week plan

[ Week 3 Notes ]

Kaveri Trail Marathon

September 20 is my D-Day – The Kaveri Trail Marathon [ http://kaveritrailmarathon.com ]. Got to know via a tweet and it set me on another of my adventure / irrational act – to run a full marathon ( 42kms ).

I had run (half walked in pain) a half marathon ( 21kms ) in the Bangalore Midnight Marathon held in Dec 2011 and it was a disaster. [ My first half Marathon ]. I finished last. And vowed never again. Next time I will train better and will run the full race, not walk half the race.

It has been 3 long years since then and I could never bring myself to run even a half marathon again. Always the fear of failure was there and the last disastrous experience kept haunting me.

What if I cannot cross the wall – the point wherein body has exhausted its glucose content and starts burning fat. Body thinks it is starving and self preservation kicks in and freezes itself – and a runner cannot take one step forward as body does not allow fat to be burnt. Every marathoner has to overcome this wall.

What if I get cramps at the 41st km just before the finish line – and my legs are all locked up and I am lying on the floor watching the finish line and see others runners crossing it.

What if I develop shin splints and other running injuries and I have to give up the training midway.

What if on the race day I land my foot on a hole, and sprain it badly that I have to DNF ( did not finish ).

What if I develop blisters, stomach cramps, dizziness – or the myriad ailments that can strike me when it is undergoing the heavy stress of a marathon?

My mind quickly got filled with all the Nos. Why should you subject yourself to such torture, when on the very Sunday on Sep 20th – I could be sipping my morning filter coffee and reading a nice book in the comfort of my home.

And it is not just torture for one day – the next 4 months is going to be a torture – every single day.

Why bother at all with this?

But then there is this little voice in my head – which keeps fighting all these little devils – tells this – what if this frail body we are all in can pull off an impossible feat. And I want this little voice to grow louder and defeat these little devil friends of mine.

So I pulled up my phone, launched Nike Running, navigated to Coach, keyed in race date as 20th Sep 2015 – and it created a training plan starting from June 1st ( 16 weeks total)

I will have to do 5 runs a week of which one of them is a really long run. One cross training day. One rest day. One of these runs, as per the running program – I have to do a Fartlek – interval training – run very fast for a few minutes, then run slowly to recover and keep repeating it.

Till date I was averaging 40 to 50 kms a month. From the very first week I have to run 43kms in a week.

I completed the first week successfully. Legs were tired throughout the week, knees a bit wobbly – but thankfully no pain.

Continuing my vegetarian diet. I eat Brown rice for lunch and last week started legumes for evening snacks.  Thinking of adding Soy milk for increasing protein intake.

I have travel coming up – not sure how I can fit them with my training – do not want to miss a single running day.

Will I last the 16 weeks of training?
Will I complete the marathon?

Doubts.. and the battle with these doubts – this is my life for the next 4 months.

[ Week 2 Notes ]

The Swap

I had booked the last flight home – at 10:45pm – to avoid the crazy Gurgaon Peak Hour Traffic, and also it was the cheapest I could get.

And the flight was delayed. Finally the boarding started at 11:30pm. I had woken up at 3:00 AM today, for this one day trip. I was having a hard time keeping my eyes open and quickly dozed off as the flight was taking off.

I felt a scary shudder and woke up and found the flight dark. I closed my eyes but I could not go back to sleep. I pulled up my phone and saw the time – it was precisely 12:00 midnight.

But I knew something was wrong. The phone was blurred and it was kind of overlapping as if 2 phones were there. I thought it was my tired eyes playing tricks on me and closed them once again and tried to go back to sleep. I could not shake off the odd feeling.

I tried to open my eyes, and by habit when I am bored I unlocked the phone. This time I tried to focus my eyes better and I could not believe what I was seeing. There were 2 phones. One an Android Phone and another my iPhone overlapping each other. I brought my hand up and could see 2 over lapping wrists and palms. I looked to my left and got the shock of my life.

My sleep evaporated like spilt petrol on a hot tar road.

My co-passenger, a young man – was showing in double – in an overlapped state – like a bad photoshop job. I knew it wasn’t a dream. Because any time I get such a shock I always end up waking. I spoke to myself what is this?

“Yes what is this” – I felt a message come back to me and it was very much my voice. Was I speaking to myself?

“Did I just speak to myself? – felt as if I got cloned or something”, I thought.

Yes, it does feel like I am split into two. This is crazy“, quick came back the reply.

For sometime both of us were quiet letting the situation sink in.

I did not know what to ask. But I got a thought from my other self pop up in my head.

I have read about this before. This duplication”

Kidding me. This is nuts. Doesn’t make any sense”.

Ok, I have a theory. I read lot of sci-fi, you read books right?”

No. I don’t – but how come I read books. I certainly don’t.”

Hold on – don’t panic. I think I am getting it. There are these parallel universes. Infinite parallel universes. There are infinite instances of us in all these parallel universes this very moment”.

Doesn’t make any sense. You mean to say, I am right now in infinite such situations, and there are infinite Earth and Universe and so on. Sounds crazy.But go on.”

Ok. Believe me. The latest in Quantum Theory proves the existence of these Infinite Parallel Universes. And at precisely mid-night we might swap our positions.”

“You mean you are having a different life – like a rockstar, and I can take up your life”.

More or less. However our lives are not that wide apart – just a few variations thats all. I run a startup – what do you do?”

Same, I also run a startup”.

Ok, but before we get into the details, do you want to swap?”

“You mean we have a choice so we can swap places. How will we even do it, and how will I survive in your universe”

Don’t worry, we have done it so many times before – just that we never do it consciously. Haven’t you felt your life take wild turns all of a sudden – it is because we have swapped places”

Yes, agree to that. Thought I suddenly got lucky, or got totally unlucky. Ok I am game – always ready for a new adventure”.

“Ok. Man you are me. Always looking for an adventure. Lets do it. Just close your eyes, and will to swap places – I will do the same and go back to sleep. It will work”.

Will we meet again?”

Highly improbable. Even if we meet we wouldn’t know because there are infinite of us”.

Can’t we continue this conversation some more time?”

Look at our phones, what time does it say”

Weird, Still 12:00. Thought I was chatting with you for long.”

Yes, since we are conversing at the speed of thought, this discussion is happening in fractions of seconds. Before it turns 12:01 the swap should happen. Not sure how much time is still left. If you want to do it, we shut up, will it and go to sleep”

Done. Nice meeting you myself. Have a good one.”

Same here.Good night”. 

“Please raise your window shades and pull your seats to the upright position”, I heard the air hostess say. I opened my eyes, and felt strange. And suddenly the conversation came flooding to my mind and looked at my phone – it was 1:20AM. And it was not an iPhone any longer.

1,000 Kms.

This is a chest thumping post. I am warning you.

I have unlocked a new level in my life. I have run 1,000 KMs.

 

This was done over the last 2.5 years starting Nov 2012, averaging 6 Kms per run at a nice middle aged man’s pace of 6.5 ( pace is the number of minutes it takes to cover 1km ).  I can hear you saying – nothing big to crow about – but hey – this is me I am competing against – not Usain Bolt – and as a competitor I am tougher!

I am not a consistent runner. During monsoon I stop running and eat lot of onion pakodas. Also just a few months back my shoe was stolen, or for any lame excuse the devil in my brain will throw at – I will agree immediately, and I will declare an off-day.

It has been a constant battle between the Angel and Devil in my brain. And no clear winner has emerged of far. But I want to show this devil – inspite of you I have accomplished something really big.

I have so much to tell – but will tell one thing I found in this journey of 1000 kms. About Human body – how it is amazing and how it heals by itself.

I over do at times – like this year beginning when I took a drastic resolution. I am going fully carbon neutral. So I cycled to work, climbed stairs up and down ( between the 2 offices one on 3rd floor and 5th floor ), and full day did the standing desk. And to make matters worse purchased Puma Mobium – a front foot striker shoe which increased my pace drastically – and got a 5 to 6 pace. I am basically a 6 to 7 pacer. Felt I was a champion and did a few runs around 5.3.

And I got severe pain at the place where the leg fits into the ankle. Especially when I climb down stairs, or even at random times when I get up from a chair. It was terrible. I could not run anymore.

I went to see a doctor this Jan 2015. [ Entire 2014 I did not visit one – thanks running! ]. He said it is over use, and something got inflamed – take these pills over a month. Took the pills over a month – nothing improved. I kept postponing meeting the doc again. Was afraid he will order a CT scan.

I waited one more month. During this period my Puma shoe got stolen. I felt so damn guilty that I did not buy another one. Feeling lazy is awesome – and the devil kept whispering – tomorrow and tomorrows kept coming infinitely. I completely stopped running from Jan to March end this year. The pain was not fully gone – but was constantly reminding me – that it is still there. The devil started whispering – your running career is over dude, just sleep. And I stopped running completely.

Finally – I mustered courage to put money on another shoe – the wife also felt bad for the shoe lose so she encouraged me on the purchase – and this time I went back to my old faithful – Nike Free Run – I had started suspecting it was the Puma shoe ( or rather I should blame my ego ) that damaged my foot-ankle.

I did a few runs in the new shoe – and a mild pain was there during the initial runs, but after a few runs it was totally gone and I don’t remember anymore how the pain used to be. Today I did a 8.5km – and absolutely no pain anywhere in the system.

The more I run – the body adapts itself I guess – and strengthens automatically at places where it is weak. This has happened to me so many times. My shin splints, knee pain etc. all went away – the more I ran.

The “loose it if you don’t use it” adage is apt.

1,000 Kms. Bangalore to Mumbai distance. Don’t mess with me 🙂

Problem being a Celebrity’s Kid

Appraisals, Tax, Meetings, Interviews, More Tax, Property Tax, License Renewal, Passport Renewal constable interview, EMI, Aadhar card…

You think your life is tough?

Just look at a couple of Celebrity’s kids. It is tougher for them. Way too tougher. One whose names starts with R and has a famous freedom fighter’s name as last name. Another starts with A and his entire family – except him of course – wife, dad, mom – are all Padmashri winners.

Now meditate this.

They are not concerned about Taxes, or License Renewal or any of the mundane things you and I have to deal with on a daily basis.

They have a bigger fish to fry. It is the dreaded word called ‘Expectation’. Or filling up the big shoe their father wears or once wore.

It is the genes – we all say – and rightfully so – being ruled well by the Kings and their princes and their descendants all these years till the mighty British came and made a mess of our country. The genes should bring out the next better version – and they should surpass their Dads.

If you ask R or A – they do not want to be in the profession their Dads were. But we all ‘expect’ them to do better than their Dads. Perhaps they could have been a kickass pace bowler, or a chef book author or a top notch coder.. we will never get to know.

It is lot of pressure. And these young minds cannot cope up with it. Imagine if you are judged daily – on TV and newspaper – and ridiculed by Social Media and Blogs ( hey I am on their side ) – will you be able to perform? There was no performance anxiety for their Dads.

Anyway – leave all that aside.

Let us focus on our miserable life as we call – Taxes, More taxes, Passport renewals, Aadhar card and all that – now does it feel bad? Not bad at all right – no performance anxiety or expectation.  Just leading a bindaas life – and can go watch a movie whenever we want, or go eat Paani Poori on the road – without it making a big headlines anywhere.

Next time when you eat a Chinese Bhel, spare a tear drop, for these celebrity kids – they have a raw deal indeed.

Guy who went around the world on a bike, in 1975

I finished reading Jupiter Travels by Ted Simons.

This crazy British journalist went around the world in 1975 – in a Triumph motorcycle, took 4 years and lived to tell the tale through his book.

Each of us are sent to this world to experience life. It is all programmed before we are planted on earth. Some of us let the soul’s true purpose come out – some of us let the ego, self-imposed chains to prevent the soul from going in its journey.

Ted Simons let his soul a free run and did this brave journey – all alone in 1975. He entered and left Egypt before the war, reached Cape of Good hope at the bottom tip, took a ship to Brazil, got arrested and let off and explored Argentina and via Mexico got into USA, found his love. Again took a ship to Australia, then rode across the continent, took a ship to Singapore – rode a bit there, came to Madras ( as it was called then ), rode to Bangalore to see Sai Baba in the now Whitefield ( and was disappointed not to see any magic ), went to Mumbai, Benares, Calcutta, Agra.. got totally bugged off India towards the end – got into Pakistan, Turkey and reached home. What a journey.

What I loved about the book was his candid account. He did not hide his emotions and feelings – was a true first person account.He did not hide back the frustrations, the disappointments, the anxiety. He did not pretend he was a hero or this brave chap out to accomplish something.

Towards the end I felt he was forced by the publishers to write what the take away from this journey was – could feel he was arm twisted into writing this – otherwise as a reader we will be disappointed ( I wouldn’t be! ) – that he did not learn anything from this 4 year journey. He did dwell upon this – but I knew it was not from his heart. Sorry Tedji – you need not have told us about this – words cannot convey these I think – has to be felt.

And my Thunderbird is quietly running errands.. it is telling me something.. my soul can feel it 🙂

The Facebook parents

India is in a growth phase like how the US economy was in the 80s. The US parents during the boom were called baby boomers. 
The Indian parents who are in their 35s to 45s of today are the equivalent of the baby boomer generation. Thankfully the school admission process is so competitive – it has scared them into not making a boom of the baby kind. 
Let me coin these parents the “Facebook parents” as they are all chained to their smartphones and Facebook. Of late whatsapp has become quite popular but whatsapp is owned by Facebook – so this term can still stand a scrutiny by future historians. 
They are economically successful and better off than their parent’s generation. Most would have started their career drawing a salary their parents would have retired at. 
Would have visited a few countries for work or for pleasure. Would have a car or two or an unnecessarily powerful bike which they use for grocery errands. Would have a heavy EMI too. 
Like any good biologist – let me classify these species into a few categories. 
The Chinese moms.
I read a post in huffington post years ago on how Chinese moms bring up their kids. The article starts pretty negative showing the Chinese moms in poor light how they push their kids into hours of practice. However the article concluded with a positive spin showing how the kids shine later -without some hitlering these lazy kids would have never picked up the difficult fine arts. 
Armed with this article for justification these Chinese moms ( and dads ) can be found on weekends dragging their kids from one class or tournament to another – bribing their kids with chips or ice cream or a visit to the gaming arcade in a nearby mall.
They turn up in annual sports day events with their DSLRs to capture the finish in highdef video and get into arguments with the poor fatigued over worked and underpaid school sports teachers why their kid should have had a podium finish. 
The spiritual parents

Having hit a ceiling at their career, life becomes monotonous. No more challenges. More meetings at work. The upward climb is blocked with too many VPs. 

They start following spiritual accounts in facebook and you can see them sharing deep quotes on Buddha or Osho or Sri Sri or Sadhguru. 

You can find them taking off days together to go on spiritual retreats and  sit in silence. They come back all divine and do not get into fights at work – for a few days. 

They do not get angry with their kids or push them too hard and believe their karma will run ( or ruin ) them and let fate run its course. They do however show the path and enrol them in various classes but if the kid throws tantrums and starts feigning fever and stomach ache to avoid classes, the spiritual parents pull them out and believe the class will find them at the right time. 
The Bruce lee parents
These parents use the same technique their parents had applied – which is no technique. 
Bruce lee when asked what his technique was he said he had no technique and that was his technique. 
In the previous generation, either because of economic reasons or lack of will or too many kids to handle – they let these grow up by themselves. Never enrolled them in any extra curriculars or used the enrollment forms for removing the extra foam while shaving. And their kids – the current Facebook generation parents – turned out to be alright as they were self made and believe it will all work out in the end. They apply the same technique to their kids too. 
These Bruce lee parent’s kids can now be found chilling in the apartment parking lot playing their self made games or practicing dance moves by themselves and generally having a good time. 
So what kind of parent are you?

Agile and Spiritualism

Ahemm..first my apologies for tying a camel’s tail to a pony’s tail – this post is akin to that. Totally 2 unrelated disciplines being compared 🙂

Agile – as you know is what we use to create kickass products.

Spiritualism is to me the exploration of the Why? – Why are we happy, or sad. Why did we come on earth, why we die?

I practise Agile at work, and explore Spiritualism constantly in all things.

During one of my meditations it hit me – A developer practising Agile, and what Spirituality teaches us are so common.

The Now

Our mind is like a pendulum. It either swings to the past – oh I did this, said this, he spoke rudely to me that day, I missed giving a good repartee .. or swings to the future – oh what will happen if I don’t file my tax returns, what if I confront my colleague tomorrow.. it goes on and on – swinging back and forth. And when the pendulum hits the Now – it is where happiness is – pure unblemished joy. It stays for a fleeting second.. and then goes on to dwell in the past or future – leaving the joy as a memory.

We try to get to the now.. and hang on to it – and it is a lifetime’s effort to get there – and then you get enlightened… perhaps.

When I first heard of a “Story” – in the Agile context – I was told to focus on that story alone while developing. Not to worry about the future stories in the pipeline, or the changes in requirement that might or might not come, or what the nearby developer pair is working upon. Focus on just your story, and do a great job on it. Everything will turn out to be just right.

As a developer, as you focus on just the story ( with a little cross-eye on an open ended design ) the outcome will be 100% Bug free and your story will sail to QA complete effortlessly.. and then you hit God Mode in your team.

The Now is your Story.

Death & Failure

As you get more spiritual you get more comfortable with Death – the big end. Because you know it is not the end, but the beginning of another adventure. You will be tossing out all that you earned, and will have to start all over again. However some of the intelligence you acquired – will come to help in the next adventure. Dejavu, Gut instinct, Karma are all that.

There is a parallel in Agile as well. It taught me to scrap everything I had worked, and start from scratch if there is a need – Agile is comfortable with change and does not crib ( unlike giving a big Change Requirement Document and a bill ) My backyard has many dead bodies – some unfinished abandoned projects and some code, some perfectly working stuff.. but had to be archived and might never get opened again. However, someday it will all come to use. Even if the Story I worked on never gets to production or the project fails to see the light of the day – the learnings are enormous.

Most of the good discipline I picked are from failures – either from my own handiwork, or watching other developers mess up.

Celebrate Death & Failure!

Discipline

One can read as much as you want on Spiritual books, or listen to all the lectures from Spiritual Gurus – but the real joy is in practising it – in a disciplined manner.  Only when you sit down to meditate do you experience bliss. For best results – lot many things have to be followed – like food habits, health routine, sincerity of actions, purity in thought.. Break any one of them – you get nothing in the end.

Again for an Agile project to be successful – just reading books and viewing lectures from Agile Thinkers is not sufficient – the team has to be disciplined at every step. Standups, near abstract stories, continuous builds, unit tests, automated tests, periodic showcases…. break any one of them and the project is doomed.

God speed my Agile Developer friends!

Yours Truly
The Agile Guru 🙂

Fun with Raspberry Pi

This post is a 101 Introduction to Raspberry Pi.  I will show you how to use a Raspberry Pi to create an Apple TV, Chromecast equivalent, and also read and push your home temperature to a server.

It is the best time to be a geek! There is 3G everywhere and 8MB Bandwidth at home and office. Geeks everywhere carry a super computer in their pocket now!

TBs of storage are now available for a dime. Everything is backed up realtime to the cloud. Even if you lose your device or hard drive crashes, it can all be downloaded back. Maps and GPS Accuracy is spot on. The stuff geeks have now makes James Bond look like a kid showing off in a School Science project.

And we need not deal with Windows or IE anymore. It is either Android or iOS or Ubuntu or OS X.

And then comes this Raspberry Pi to the party – from the open source hardware movement – a cute little computer – the size of a palm – which costs just Rs. 2,500 and can do a hell lot of things.

How to procure a Raspberry Pi

I got mine from Amazon.in – protocentral was the vendor. Just the raspberry pi ( motherboard, 4 USB, HDMI port, ethernet port ) will be 2,500. I also got a kit which had a SD card with the OSes, USB dongle, a breadboard, a few resistors, a capacitor and a power supply (which blew off). Also ordered a DHT11 a temperature and humidity sensor – it is 99Rs. It all came to Rs.5000.

Raspberry Pi or Arduino?

Just like the yin-yangs of vi emacs, android iOS, raspberry pi also has a yang – it is this Arduino. While Raspberry Pi is from UK, Arduino is from Italy. From what I learnt Raspberry Pi is good for beginners – understands Python and is more general purpose and can only talk digital. Arduino needs C ( segmentation fault – thought I had broken up with you) and is more rugged and can talk analog.

Some say start your prototype on Pi, then manufacture on arduino. Might know more about this as I keep digging.

Setting up Pi

Apart from Pi you will need these things

1. A TV with HDMI input
2. A keyboard
3. Mouse
4. 8GB or more SD Cards
5. Ethernet cable, and a router ( alternative is to share wifi on laptop over ethernet port )
6. A laptop/desktop – to format SD Card

Raspbmc 

If you have a spare SD Card, format it to Fat. Then download Noobs Lite – Network Install Only – http://www.raspberrypi.org/downloads/, unzip and copy the entire folder contents into the root of the SD Card.

Boot the Pi with the SD Card, and it will show an option with a few OSes.  Choose Raspbmc – this is
the XBMC port and turns your Tv into a Smart Tv.

Here you will have to connect your Pi to the router through the ethernet port – so it can download the OS ( around 700MB ). The setup is entirely automatic and does not ask for any configuration. The default user account is pi and password is raspberry.

There are so many Add-ons and settings that are available – like a Youtube Add-on, or a subtitles Add-on for Movies. There is also a free XBMC Remote app on iOS and Android  with which you can connect to the Pi to control TV.

Raspbian

This is a regular light weight debian port. Works quite well in the puny pi. You can get another SD Card and install Raspbian ( same steps as raspbmc above ) – so you can swap the 2 sdcards.   There is also a multi boot option so you can boot into Raspbmc or Raspbian or more. I did not try this.

Say Hi to GPIO

GPIO – General Purpose Input Output. This is where things get interesting. There are 8 pins which can either send a 5V voltage, or receive a signal.

I wired the DHT 11 – Temperature and Humidity sensor to the Pi and was able to read the settings. Was quite easy.

1. The circuit layout I got here : https://chrisbaume.wordpress.com/2013/02/10/beer-monitoring/. Looks scary – but it is actually a very simple circuit. My skills are not that great, just followed the circuit to the T and it worked at the first try.

2. Get the Adafruit drivers and see if you can read the sensor.

git clone git://github.com/adafruit/Adafruit-Raspberry-Pi-Python-Code.git .

cd Adafruit_DHT_Driver #go to the folder where DHT driver is present

Adafruit_DHT 11 14 #11 is for DHT11 sensor, 14 is the Pin I used

If you get temp and hum in output with numbers, then the circuit is working fine. Sometimes it will not give any reading, and a hex error will show up.

3. Next is to push this to a server. Again it is super easy.

First – create an account at thingspeak.com and get a key.

I created a shell script which will call this python script with the temperature as argument. Then this script will post the readings to thingspeak.

Shell Script :
#!/bin/sh
SCRIPT=”/home/pi/playground/Adafruit_DHT_Driver/Adafruit_DHT 11 14″
TEMPERATURE=`$SCRIPT | grep “Temp” | awk -F ” ” ‘{print $3}’`
echo “$TEMPERATURE”
HITTHING=”/home/pi/playground/mycode/kandivali_temp $TEMPERATURE  “
THINGSPEAK=`$HITTHING`

Python Script :

#! /usr/bin/python
import datetime
import logging
import time
import httplib, urllib
import sys

# The feed id and API key that is needed
thingSpeakKey = “getyourownkey”
tempvar=”nil” 
for arg in sys.argv:
 tempvar = arg
if (tempvar != ‘/home/pi/playground/mycode/kandivali_temp’):
 print “Updating ThingSpeak “, time.strftime(“%A, %B %d at %H:%M:%S”) 

 params = urllib.urlencode({‘field1’: tempvar, ‘key’:thingSpeakKey})
 headers = {“Content-type”: “application/x-www-form-urlencoded”, “Accept”: “text/plain”}
 conn = httplib.HTTPConnection(“api.thingspeak.com:80”)
 conn.request(“POST”, “/update”, params, headers)
 response = conn.getresponse()
 print “Thingspeak Response:”, response.status, response.reason

 if (response.reason != ‘OK’):
  print “Problem, “, response.status, response.reason

Here are a few readings I got – https://thingspeak.com/channels/25022

Next step would be to merge the shell script with Python ( still learning ), and run this as a cron job every 3 minutes or so.

The above concept is “Hello World” equivalent of Internet of Things. I can connect to any sensor, and   when things go bad – ( lets say the temperature starts spiking ), can send a notification on a phone to someone. The possibilities are infinite.

Some Gotchas

* Pi is configured to UK Locale by default. When you hit Shift 2 ( to get the @ symbol ) you will get a Pound symbol – and so on. It is annoying. Just go to /etc/default/keyboard and set it to US and reboot.

* I connected an external Hard drive, and Pi was not detecting it. The external hard drive needed a power source before Pi could detect it.

* Pi can be connected to a USB port of the laptop. Need not  hunt for a free power slot. Figured this out after the usb power plug blew up.

* Looking at TV and typing tires the eyes. Instead set a Static DHCP IP and then ssh to pi using Putty if you are on windows  ( ssh pi@192.168.1.111, password raspberry ) and can use your laptop’s keyboard.

Happy Baking!

The Man Purse

Way back in 2000, I first heard about man purse in a Seinfeld episode and had a good laugh. Little more than a decade later,  I find myself using one. Here is me defending in the court on why I use a man purse.

Your Honour, Men needed just a few essentials those days. A purse/wallet + keys, a mobile phone + a hand kerchief and a comb on the back pocket. Real men don’t need to carry a pocket note book. They write stuff and lose it behind credit card acknowledgements.

If you were a metrosexual male then you will need a deo, a face wash, a mouth freshner, a hair gel, a hair spray, a hand sanitizer, a hand moisturiser, a sunscreen etc. – you would have dragged all these in a suitcase – and guys like you would have been husbanded soon and you will still be dragging that suitcase but with the kids diaper or the missus’s stuff. I am digressing. Back to the defence.

Some men carry a book to impress women but then it is best carried in hand – otherwise what is the point.

Then iPods came. And we could still squeeze it in along with the cell phone. And on vacation men will typically wear those cargo pants with pockets near the kneecap and can carry a point and shoot, extra 8MB memory cards and even spare batteries. Not a problem. 
Then Steve jobs re-invented the phone and for a brief time I thought – wow – now I can carry my phone, iPod, book, music, camera – all in one. Back to good old 2 pocket days. 
I was so wrong. 
With more power, comes poor battery life. While on the road, heavy GPS Usage, or even reading and responding to emails on the move would drain battery and the phone will not last even half a day. 
So had to carry a battery backup, charger, and the cable. 
Then I started using the iPad and fell in love with it. It is so convenient to respond to emails, read a book, or a magazine or play those gorgeous games.. and I could not fold it and put it inside my pocket. 
Then I saw how women were enjoying a blissful life carrying all the paraphernalia in their hand bags.   Same time I spotted hipsters carrying those smart man purses and got tempted. Perhaps I should get one too. 
After I moved to Mumbai I felt liberated. No one gave a hoot to what you were doing. All are so engrossed in inventing an excuse for arriving late for a meeting – they do not have time to glance at you and pass a judgement. 
I kept looking – most looked like a laptop bag, or the sales man tried to sell a woman’s handbag..  and finally found the one made for me in a Hi Design Store.

Now it carries a lot many things – my bike papers, keys, smart cards, reserve cash, battery backup, battery backup’s backup, iPad, headphones, balaclava, cables, mouth fresher, deo… and so many that I am almost in the territory of a metrosexual man.

It gives a sense of peace – which is hard to describe. Your honour you have to experience this bliss. When you know your phone and iPad are fully charged and you can wait forever in a mall while the missus shops, or when waiting to pick up someone from the airport – you can listen to music without worry of draining the battery, or read a book, or write a blog post – like this one.

The defence rests its case. Hope the court will forgive me for laughing at the Man purse back in 2000.

And to my Man friends, get a Man Purse – why should women have all the fun!