Monday, February 16, 2015

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 :)








Monday, February 9, 2015

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!
























Wednesday, December 31, 2014

Fight the Good Fight Startups!

2014 is coming to a close.

It has been a very interesting time for Startups. A Government change, with it expectations, a rising economy - which in turn will benefit startups.

Billions of VC money flowing into the ecosystem. Traditional investors become Angels.

Here is my wishlist for Startups - new and old for 2015 - to Fight the Good Fight.

Gain Customers, not Facebook Likes

No Short Cuts please. Gaining traction, gaining customers is not easy. This is the most important metric for any Startup. Not the Facebook likes, Alexa ranking, Twitter Followers - these will come automatically once customers start signing up.

To gain customers - you need to have a kickass product. Not a 80% almost there product, but a 200% going beyond the wildest customer expectation product.

To reach there, it takes lot of hard work, lot of iterations - there is no short cut. 

Do not start a clone 

There are so many problems waiting to be solved. If you have 2 ideas - one which is never tried before ( like a Music Lyrics Translation site - for Indian Movie Songs across all languages ) against doing the same thing a Startup X is doing ( an E-Commerce, Grocery Delivery etc.) - do the one that has never been done before.

There is no guarantee either of the ideas will succeed - but with the never been tried before - you get the first mover advantage, there is a good chance you will get noticed, you can get Media to notice you, a team will form around you and will dream the dream you have.

Go the Distance

The biggest differentiation I see between US and Indian Startups - is not in the area of Technology. We are as technically advanced as US Startups.

The area where US Startups shine is they go the distance. They give an end-to-end solution - always. They do not stop short of solving the entire problem.

I see many startups who have reached 80%, and do not complete the entire 100% or go beyond 100%.

For eg. Dropbox - they did not stop with just Windows and Mac - but created installers for Linux - how much ever small the marker share for Linux was. Or Uber - the end to end seamless workflow they have built - something which our Ola, or Meru has not been able to do yet.

Customers - Trust Us, Refer Us 

This message is for Customers - start trusting us. Do not view Startups with suspicion. Transact Online, Pay Online, Give a chance to an idea, try that carpool, download that app, provide feedback - if the Startups succeed - so will you.

And please - please - pay for the value you receive. Just because FlipKart gives huge discounts do not arm twist Startups to give discounts. Not all startups are Flipkarts. Most are broke eking out a living and every Rupee you pay us is valuable - and we will give you 100X Value in return. 

And last request - you love our product - tell your friends, share it in Facebook, Tweet it, email your colleagues. Most of the startups do not have the budget to put a hoarding on a Billboard or play an Ad on TV - but your kind referral will take us a long way.


Big IT Company Employees

This message is for the Brilliant Techies sitting in the Big IT Companies, reading Rashmi Bansal  and attending Startup Events - put in your resignation papers and Start Up - or join a Start Up. We need you more than the Big IT Companies.

We have a huge pool of Technocrats in India - locked up in the Big IT Companies - and this base is larger than Silicon Valley.

Imagine if we all start hacking and forging new ideas - imagine what we will create!

Here is looking forward to a happening 2015 - a Bigger, Better, Beautiful StartUp World.



Sunday, October 27, 2013

In Defence of the Developers

I have seen myself and other Developers I have worked with miss on obvious silly things - may be an obvious typo - or a mis programmed checkbox etc. Really obviously silly things which will make me kick myself  ( or my pair ).


Well here is psychology to the rescue.

Invisible Gorilla

A study was commissioned by a psychologist long back.

He played a video of  a basketball game between a team wearing white shirts and team wearing black shirts. The participants where asked to count the number of passes made by the white team.

Most of the participants got the total number of passes correct.

Here is the twist. In the middle of the game, a girl dressed in a gorilla suite, walks across the floor. And most of the participants who were busy counting the passes - totally missed it. When the video was played back to them they were shocked at how they could have missed the gorilla.

The logic behind is that our brain operates in 2 modes - the Analytic mode and the Intuitive mode. When the Analytic mode has been turned on and is in full swing ( counting the number of passes ), the Intuitive mode switches off or is suppressed ( which watches out for such oddities as a gorilla enter a basketball game ).

The Gorilla Bugs 

When we developers work on a feature - the analytical brain is fully fuelled and does not stop till the feature is complete. We have to watch for syntax, potential bugs, unit tests, failing tests, code beauty, backward & forward compatibility - apart from developing the functionality.

The obvious things ( in the eyes of the world ) get ignored when we are immersed in dishing out the functionality.

This is my defence - to the questions - "Did you not see it", "How can you miss it" - for most of the simple cosmetic things - that we developers miss out at times.

Now to myself, and you my brothers ( and sister ) developers

After we finish our coding session - we have to switch off our analytic brain and switch on our intuition.

Shut down the editor window, fire up the app, think you are a user - and see it through their eyes. I bet we can find a few Gorillas chilling out while we were writing code.

That is how we grow from being a Code Monkey to a Zen Master Coder.







Sunday, June 9, 2013

MBP is now on SSD

Once gizmos run out of warranty I get excited. Time to try out a few things it was not originally designed for ( definition of hacking )

My Early 2011, Mac Book Pro (MBP) 13" is soon turning 2 years.  And it was getting slow. Painfully slow. [ Tried Taming Lion but was not enough ]

Meanwhile I was slowly burning in envy ( envy is good. jealousy is bad :) ) - looking at @sanban's  Mac Book Air (MBA) - which was so light and ran amazingly fast. All thanks to the SSD - Solid State Drive in it vs the HDD - Hard Disk Drive on my MBP.

Twitterverse advised me to upgrade to SSD. Spoke to @b_hari who advised me - its a no brainer.  And you won't regret it - the difference is humungous.

I did a search on the local flipkart and ebay.in but could not find any SSDs.  This was some 6 months back I guess.

A few days back I was planning to do a re-install - things had gone painfully slow. This time I went to ebay.in and searched for SSDs and got a few hits.

There were lot of options and I zeroed in on Samsung 840 SSD ( 250GB ). There was a Pro but more expensive. I snagged the non-Pro 840 SSD at Rs.11,500. Took 4 days to reach - felt like I was back in US ordering stuff from newegg!

Here are the steps. Took 4 hours end to end - to get the same setup back on SSD.

1. Moved music and other unnecessary files to the external Hard Disk - have to now fit things from a 3BHK into a 2BHK.

2. Took a time machine backup to an external hard disk. What a time saver this time machine backup was.

3. Burnt the Mountain Lion Installation file to a 8GB USB Stick.

4. Bought a 31 in 1 Screw kit, Chinese made from a fancy store for Rs.110. The DiY blogs,youtube videos specify some Philips Screw Driver, Torc screw driver etc - good luck finding those in India. This Chinese one had it all.



5. All set. Popped open the bottom lid. Tried removing the battery connector ( some of the youtube videos advised doing this ) - but the connector was not coming out - decided not to do something stupid by damaging the connector. So let it stay there.

The Hard disk drive came out easily. The SATA connector also did not give any problems.




6. I spent some time admiring at a cool piece of technology in the MBP - which is now getting obsolete. The HDD rests on a sensor - and when the laptop is moved fast or is dropped - it detects the fall and stops the HDD's needle from touching the spindle - this prevents any bad sectors / physical damages to the hard disk. You would hear a small cracking noise whenever the motion detection happened. But with SSD there are no movable parts and this piece of hardware is not needed anymore.



7. Then fitted the SSD, bolted it nicely. Put the lid back ( didnt screw it ) and powered the laptop. Heard the Apple chime and the screen just froze white for an eternity. I had a mild panick attack - but then a folder with a question mark showed up. Phoo - thats good. The SSD is windows formatted so it was not detected.

8. Now I put the screws back - thanked the Chinese Screw driver. Plugged in the 8GB USB stick.

9. Powered it on, choose Disk Utility and formatted the SSD - into 3 partitions - Jobs, Gates and Linus.

Screenshot taken after the installation was complete. 


10. Continued with the installation ( remember to make a username which is different from the one you used to have. Time machine when it tries to restore it will ask for a different username if its already taken ). I made this mistake ( not a big deal though )

11. Once installation was over,  connected my external Hard drive, chose Migration Assistant and restored from the Time Machine backup. Forums recommend Carbon Copy Cloner - not needed if you have a Time machine backup.

12. A few things I had to do from what I gathered from the forums.

a. Installed TrimEnabler - this will optimize the writes and will not spoil the SSD ( ahemm. I never really understood the whole file storage and sector concept)

b. Turned off the Hard drive motion sensor - can be disabled from command line.

c. Turned off Last Access time for file - seems the OS will thrash the SSD a lot. Again a command line setting.

You can google for these. Simple ones.

13.  Finally it was done. All the Mail was restored, all applications ( except Microsoft Office which had to be activated once again ), settings, wallpaper - just like before. And it is blazing fast. If you are drooling at the new Retina MBPs or planning to get an MBA - try out the SSD route - for lot less you can breathe another couple of years into your favorite MBP.

I dont see any difference in weight. Its still heavy. I didnt see any significant change in Battery life.

Next : Have to install Windows 7 and Ubuntu. The rEFIt bootloader I had put is still intact ( actually I was worried if I would run into problems because of this - searched in forums if anyone having rEFIt had done SSD swap - could not find any - but thankfully it all went smooth ).

After a couple of months - will either put one more SSD inplace of the DVD Drive ( another piece of technology fast becoming obsolete ) - or remove the DVD Drive itself to reduce the weight a bit.

And friends - if anyone needs any help on how to swap an SSD sitting in India with all parts procured locally - now you know who to talk to!



Friday, February 8, 2013

Case for an Indian SaaS App Store

 
In 2008 when we started ApartmentADDA we were faced with a myriad of questions / objections.

You have all the data with you. What if you close down.
I can build my own.
I want to buy your software and put it on my computer. 
Why can't I pay onetime and use it lifelong?
I want a backup of all my data, emailed to me every day.

The questions haven't stopped, and new ones keep getting added.

I look around and see so many Indian SaaS Startups fighting similar battles. Educating the populace on SaaS and its benefits.

We also market our product through SEO, Videos, Posters and a few lucky days when media bothers to write about these interesting SaaS products.

Imagine. If there was a single site which does all the marketing and brings people to its site. It educates the visitors on the advantages of SaaS, lists all the SaaS apps that are available and also lists prices and user reviews. How cool will that be?

Advantages of a SaaS App Store

1. Startups like mine and others need not repeat the same argument over and over to educate customers.

2. Customers will not feel that they are dealing with only one "unique" idea - but lot others are there and will give them confidence - This is where the world is going.

3. Increases Discoverability - I come here looking for a Personal Finance Solution and I stumble upon this interesting Apartment Management Portal or a Telephony App or a Site that helps you find a good guitarist.

4. Customer Reviews. Before I purchase a mobile app ( including the free ones ) I always read the reviews. These reviews have become an important decision point. This will also help in deciding between similar offerings.

5. Single point of invoicing and billing - each portal now has to run its own billing invoicing workflow. I will happily pay to get listed on this site - as this opens a new Sales Channel and I can direct my customers to this site to complete the purchase.

6. The Site also sends reminders for renewals and can also earn when a customer renews.

7. We can focus on building a kickass SaaS product and delight customers - while the Sales, Marketing, Billing, Invoicing, Renewal tracking are all taken care of - even if not 100%, a percentage of it will take away some load off us.


That's it - go ahead and create this nice SaaS Portal for SaaS products to get listed. I will be your customer - will get listed and also shop for other SaaS products.

Thursday, January 3, 2013

TiE Summit @ Mumbai

Sharing a few thoughts / observations on the TiE Summit held on Dec 20,21 at Goregoan, Mumbai.

Also these are not exactly their words - I am looking at my notes and I only have a few phrases. This is a venkatised version of it - essence is the same.

Kunal Shah of Freecharge : We are all engineers. We are good at solving problems. But where we suck at is defining the problem. Brilliant!

Kunal/Vijayanand of Proto and another Gentleman - didnt note his name : They discussed on traction and finally someone gave a nice sound byte : Traction is when you get customers without spending. That was a superb definition!

Ronnie Screwala, Founder UTV Group : First step to start something is big. But don't sit there basking on it. So many first steps have to be still taken  - getting funded, forming a bigger team.. it never ends. [ Perhaps thats why we call them as a Startup!  ]

He gave more tips

  • Invest in Teams
  • Get a good vision / mission - this gives clarity more than anything else.
  • Timing is important at every step - including Exits
  •  Scale > Control 
  •  1 good trait of an entrepreneur - he is a good listener
  •  Attract good talent - spend time on hiring the right team - even if it takes 6 months and multiple coffee shop visits. [ So true - keep reading about this courting process in Silicon valley ]

Ajay Piramal - has a pharmaceutical company and others - and is one of the top 50 Richest people in India [ http://en.wikipedia.org/wiki/Ajay_Piramal ]

  •  Stressed on the importance of Values. He gave a great definition of Integrity - Integrity is the alignment of thought, speech and action. [ Simple and straight. ]
  •  1 good trait of an entrepreneur - courage to take a decision. 
  •   Convert challenges to opportunities
  •   Be passionate but also be dispassionate from results. Focus on action and leave results out. He gave a supporting story on how they dealt with their acquisition.
  •  Associate with people of high value
  • Avoid "slippery slope" - I will do a bit of this small short cut or concession - and this will begin small but will become big in the end.
Ganesh Natarajan, CEO Zansar technologies

  • Innovation is destroying paradigms
  • Dont assume that you have a great solution for today. It will change and your solution will become invalid ( explained how Aptech was no longer relevant when colleges started having IT in their curriculum )
  • Scale quickly - that is what entrepreneurship is all about [ huh.. hate that word scale ]

Alque Padamsee [http://en.wikipedia.org/wiki/Alyque_Padamsee ]

He gave the best talk of the entire event.

Leadership through Innovation
  • Innovate
  • Enthuse not enforce
  • Vision Statement

There were 2 more sessions I attended.

One was Mahesh Murthy, Poonam Pandey and Ramesh Srivats - all Twitter superstars.

They brought Poonam Pandey just for the crowd? Boo - the time could have been well spent with another twitter celebrity.
  • Poonam Pandey earns 80,000 per sponsored tweet. She does one such tweet per day - and a 17 member team manages her account - so what did the bunch of hard working entrepreneurs learn from it?
  • All 3 have everything to gain from their twitter presence - so if the other two tried to make you believe that twitter is a good addiction etc.. - don't listen to them.
 There was one more session where Alok Kejriwal, Vishal Gondal, PK Gulati and an IAN member came on stage. It was good - nice sound bytes but I got distracted in an email/sms chat with a customer.


Overall the event was good. Met lot of unsung entrepreneurs - fighting their own battles. I am sure 10 years from now most of these unsung heroes will be on stage - inspiring the next batch of entrepreneurs.