Thursday, September 11, 2014

Mindset: Fixed vs Growth


Dr. Carol Dweck of Stanford University has been studying people’s mindsets towards learning for decades. She has found that most people adhere to one of two mindsets: fixed or growth. Fixed mindsets mistakenly believe that people are either smart or not, that intelligence is fixed by genes. People with growth mindsets correctly believe that capability and intelligence can be grown through effort, struggle and failure.


For instance, praising someone’s process (“I really like how you struggled with that problem”) versus praising an innate trait or talent (“You’re so clever!”) is one way to reinforce a growth ­mindset with someone.


The Learning Myth: Why I'll Never Tell My Son He's Smart

Wednesday, July 23, 2014

When it comes to new features, “NO” should be your default answer.


As a tech lead I see my primary contribution as saying “no” to features that co-workers think are important but can’t justify. The real trick is knowing when a new feature adds linear complexity (its own weight only) or geometric complexity (interacts with other features). Both should be avoided, but the latter requires extra-convincing justification.

-Norris Numbers

Wednesday, July 9, 2014

D-day landings scenes in 1944 and now.


Peter Macdiarmid has taken photographs of locations in France and England to match with archive images taken before, during and after the D-day landings. The Allied invasion to liberate mainland Europe from Nazi occupation during the second world war took place on 6 June 1944. Operation Overlord was the largest seaborne invasion in military history, with more than 156,000 Allied troops storming the beaches of France.

The Guardian

Thursday, June 19, 2014

Friday, May 30, 2014

Learning to Learn


I have been teaching programming, software engineering one way or another since I have graduated. One thing I see again and again with bright kids. It is not they have good memory or high intelligence; it is that they have figured out how to learn. If I can teach my son only one thing, that would be this,

Learn to learn.

Thursday, May 15, 2014

Windows Phone 8.1 had my attention and lost it in 2 days.


I was a smart phone enthusiast long before smart phones became a norm. I had several Windows Phones in last 10 years including Palm Treo and HTC Dash. I even wrote few apps including one to track my expenses. User experience was not great so was the developer experience. I had to troll through several forums to get basic Bluetooth communication working.

Windows Phone had developers and users like me and some considerable amount of the Smart Phone market share in their plate. iPhone came and ate their share while Microsoft watching it helplessly. It was depressing to watch that happening as a Windows Phone and Microsoft developer. Though user and developer experience wasn’t great, it was one of the first smart phone I had and I was able to program and tweak it. I think, when you tweak something and make it yours, you develop some kind of bond with what ever the product you are using.

iPhone looked and functioned great and people were developing apps and making millions, I wasn’t ready to shell few thousand dollars to buy a Mac and and iPhone. After Google launched their first Android Phone, I jumped ship. I wrote few android getting started apps. When I started working in Android for my work, I started liking Android.

While all this going on with Android, I have been following Windows Phone. Couple of things stopped me getting series with Windows Phone,

  1. We have a baby and I don’t get lot of play time anymore.
  2. Android tooling was getting better and better.
  3. Microsoft had Windows 8 OS restriction if you wanted to write apps for Windows Phone.
  4. I am cheap, bought a Nexus S and wasn’t ready to spend another $300+ for new Windows Phone.

The only reason I bought Nexus phone was so that I can get faster OS updates, Google excluded Nexus S from KitKat, though KitKat is aimed for the devices like Nexus S. I had been running Cyanogenmod KitKat nightly build on my Nexus S. It was definitely faster than JellyBean, it still had performance issue. I could have waited another 6 months for Cyanogenmod to release a stable version of KitKat but decided to bite the bullet and buy a new phone. My options were terribly simple, either Nexus 5 for $350 some dollars or Nokia Lumia 925 for $200 some dollars.

I decided to take the road less travelled. I had been watching Build 2014 conferences and wanted to try Cortana and other couple of features they added in 8.1 release. So I bought the Lumia 925. Hardware spec is almost half as Nexus 5, dual core processor, 1GB ram and no support for Bluetooth 4.0, Nexus 5 came with quad core processor, 2 GB ram and Bluetooth 4.0 LE. But the price was 44% cheaper than Nexus 5. Not bad for the price I paid.

Windows Phone 8.1 UX is refreshingly clean and different. Live tiles are nice, came with One Drive. Few things I did not like, I am not patient enough to explore settings/apps. I want to search and be done. iPhone 5S has pull down and search anything from any home screen. Android has Google Now and Google Gesture Search. I can find, contacts, apps, even settings that are couple of levels deep. Almost anything. Windows phone has dedicated search button but search focuses on Bing web search. Phone search results are pushed down. This is a minor software tweak I hope they can fix it in coming versions.

Big turn off for me was, not surprisingly apps. I am not an app junkie, but I have few apps I use it regularly. YouTube for my son, Flipboard for my news, beautifully designed Yahoo Weather app Google Hangout for my students. Windows Phone doesn’t have YouTube, Google, remember “don’t be evil” slogan. Flipboard is working on a Windows Phone app for more than a year, still no release in sight. No Yahoo Weather app. But Microsoft weather app was decent.

Hopefully Microsoft figures out a way to turn around the apps gap in Windows Phone as they did with Windows Azure. I am going to wait for may be 6 months to a year to spend another 100-200 dollars for a Windows Phone. Hopefully things turnout for Windows Phone. It is good for me as consumer and a C# fan.

So I ended up choosing good old boring Android.

Wednesday, May 14, 2014

iPad vs. Bay Window


In our living room, we have a bay window. This is huge, it almost takes up 75% of a wall. I have never lived in a home that had such a huge window. This bay window offers a nice view, green lawns, colorful trees, flowers, shrubs and all kinds of birds. Facing the bay window, we have a indoor hammock. If I lay down in that hammock at night, I can see the sky, star, moon and all the lovely things night sky can offer.

Unfortunately I don’t find time or don’t make effort to lay down and relax. But when I do find some time to lay down and decompress, I have two simple choices,

  1. Watch the nigh sky in our 7x7 feet bay window. Wonder the nature, think about the universe and feel how tiny I am in this universe.
  2. Or, Grab this tiny iPad and browse the internet.

Unfortunately, most of the times, I pick iPad.

Tuesday, May 13, 2014

Connect Home owners with Service Providers


Owning a home is nice and hard. It provides many comforts but also makes you work lot around the house. If you are not a handyman and don’t know lot of how-to trick, you know the pain. For simple projects like vegetable garden, I had to watch lot of videos, ask advice from friends and neighbors.

Here is a list of website that connects home owners with service providers.

Saturday, April 26, 2014

On Children : Kahlil Gibran

Your children are not your children.
They are the sons and daughters of Life's longing for itself.
They come through you but not from you,
And though they are with you, yet they belong not to you.
You may give them your love but not your thoughts.
For they have their own thoughts.
You may house their bodies but not their souls,
For their souls dwell in the house of tomorrow, which you cannot visit, not even in your dreams.
You may strive to be like them, but seek not to make them like you.
For life goes not backward nor tarries with yesterday.
You are the bows from which your children as living arrows are sent forth.
The archer sees the mark upon the path of the infinite, and He bends you with His might that His arrows may go swift and far.
Let your bending in the archer's hand be for gladness;
For even as he loves the arrow that flies, so He loves also the bow that is stable.

-- Khalil Gibran
  • Friday, April 25, 2014

    Generics Java vs. C#


    If you ever move from C# to Java for some strange reason, here is my warnings to you; Generics in C# is much nicer and cleaner. In other hand Java, not so much. It is very confusing to Java programmers and more confusing to C# guys. Here is a very good article comparing generics in both Java and C#.

    Comparing Java and C# Generics - Jonathan Pryor's web log

    Friday, April 18, 2014

    Bad Code: Don’t abuse the “if”

    Couple of things I don’t like with this code,
    • “if” does 2 things, it adds a car to the collection and checks the status.
    • I like if condition flow from left to right than right to left, it feels more natural language.
    Keep “if” side effect free, don’t do any logic other than checking. Less code is not always clear code.

    Wednesday, April 16, 2014

    Bad Code: Don’t abuse instances

    Here we are creating a car object to create another car object, we could have used a static method for this.
    This bad code is not only inefficient but quirky and cumbersome. it makes you wonder about the original authors intention. A good code should make its intentions clear by using right amount of clear comments and good names.

    Wednesday, March 19, 2014

    Learn “Web”


    I get asked several times from young people I teach and entry level software developers, what are all the must know languages & technologies? I used to say, learn one language well, lay a good foundation, this should help them to learn any language in the future. C is the first language I recommend, for its simplicity and powerlessness. Next one is web, when I say web, I mean HTTP, HTML(+CSS) & JavaScript. Not one, not two, all three of them.

    Here are two step-by-step tutorials to learn basic and advanced HTML & CSS.

    1. A Beginner’s Guide to HTML & CSS
    2. An Advanced Guide to HTML & CSS
    3. Web development for beginners

    Tuesday, March 18, 2014

    Garrett Peterson & 3D Printed Windpipe


    Species that have no neocortex, such as reptiles, lack maternal affection; when their young hatch, the newborns must hide to avoid being cannibalize.

    - Emotional Intelligence: Why It Can Matter More Than IQ

    On the other hand, humans we are wired differently, parents sacrifice their own life to save their young.

    Pander the last moments of of Gary and Mary Jane Chauncey, a couple completely devoted to their eleven-year-old daughter Andrea, who was confined to a wheelchair by cerebral palsy. The Chauncey family were passengers on an Amtrak train that crashed into a river after a barge hit and weakened a railroad bridge in Louisiana’s bayou country. Thinking first of their daughter, the couple tried their best to save Andrea as water rushed into the sinking  train; somehow they managed to push Andrea through a window to rescuers. Then, as the car sank beneath the water, they perished.

    - Emotional Intelligence: Why It Can Matter More Than IQ

    As a parent, it is agonizing to see your kid suffer and can’t do anything to help them. I can’t imagine what these parents went through for 18 months, watching their baby stop breathing and turn blue few times a day and can’t do any thing to prevent it or help. Luckily they had some help from some smart people who used 3-D printer to fix his windpipe. It is an amazing story to how a new, young technology, FDA and some smart minds came together to save this little boy and his parents.

    An incredible story.

    Doctors Use 3-D Printing To Help A Baby Breathe

    Thursday, March 6, 2014

    Passionate & Pragmatic


    Look for these two characters when you hire an engineer: Passionate & Pragmatic.

    Passion is a wild animal but it is key factor behind many inventions and changes in human history. Passionate people won’t accept status quo, if some things bother them they want to change them. Passion is the sign of caring, Hire people who care about what they are doing, why they are doing, hire people who care about the code, maintenance, future, fellow developers. As I said passion alone won’t do the job, it might derail you, tear apart a good team with good intention. Passion can be blind. Hire people who has mastered this wild animal.

    Pragmatic: Pragmatic developers think for short term and long term. They know the priority. They know how top management works, how developers work. They know the priority. Won’t say, I want to take a break for 3 years and re-write the software and release it. They know what works, what doesn’t. They know what complicates and how to simplify things. Know that we won’t get everything in life. These are people who been there and done that. They don’t let their passion control them. They can hear the good arguments  of Passion and find a practical way to implement it. Caveat emptor, People full of pragmatism, and no passion, accept the status quo, they don’t want to change things. They know what works and what doesn’t, but they don’t know what should be better and why it should be better. They can’t see the future.

    Passion + Pragmatism => Awesome

    P.S. How to interview and identify people with these characters? that is for some other post.

    Thursday, February 27, 2014

    Roslyn-powered .NET Framework Reference Source


    You can find .NET source code just like you Android source code with super easy to use website. It took me less than few seconds to find the source code for String.Join method. You could do this for last several years but it was never easy as this. Latest version was not updated, Stepping through them with Visual Studio was that easy.

    If you ever get curious about how a particular method is implemented in .NET framework, now you can find out. Hopefully Microsoft keeps this site updated, and it seems it is indexed with Roslyn.

    Here is link for beta site.

    Via [ Scott Hanselman ]

    Monday, February 24, 2014

    Powershell Gotchas

    In any language, you use long enough and you will end up in some dark corners where you don’t want to be. More you know these dark corners, more productive you will be. A good tool will have very few of these gotchas and all of them should be well documented and evangelized. We are all as good as our tools, knowing the strengths, weak points will help you picking the right tool for the job.

    Powershell is powerful as the name implies, one of my coworker thinks, batch file set the bar very low, so Powershell seems refreshing and powerful to lot of people. I think that is very true. Batch file has lot of these gotchas. DOS commands can be very cryptic, Can’t set variable values without quote inside an if block, Commenting out a line with :: will behave weirdly in some places, use REM instead.

    Though Powershell is refreshing, productive, intuitive, modern and powerful, it has its own set of quirks.
    1. Powershell functions return value differently than languages like C#, Java
    2. When passing arguments to functions, use space not comma. Commas convert the arguments into an array and pass  it as one argument.
    3. Functions has to be declared before they can be called. Problem with this approach is, you have to put your entry point/main logic at the end. If you have big script, you have to read it from bottom or the whole file. I always add a “main” function at the top, and do my logic inside that function and call this function as the last line.
    4. Unlike .bat file, you can’t run .ps1[extension for Powershell script files] by clicking/double clicking. Read Set-ExecutionPolicy. If you don’t want to change the system wide ExecutionPolicy, wrap it with a batch script.
    5. Unlike C style languages, ` is the escape character.
    6. $home and ~ are not same.

    These are some useful articles on PowerShell gotchas



    It was last Saturday night, I was sitting in a empty hospital hallway. Our friend's mom fell down and having a severe back pain. They said she is fine and it will be couple of hours before we can go home. So I was sitting in a empty hospital hallway, waiting, really bored.

    As they say, idle mind is devils playground. My mind started wandering. I was thinking about why I haven't paid my tax yet, why filing a tax is still complicated? how did people do it in hundred years ago when there were no internet? reading a book in your phone sucks, Android battery sucks, why my son gets cold so often? why am I not happy as I used to be? what happened to my job? why ant sucks as build scripting language and what are the alternatives? why Gradle and SBT is not catching up fast enough? how did this cat do it?

    If you have critical eyes, you would have noticed these are typical first world problems.

    Meanwhile, a lady in her late forties came and sat across me with a stroller. After settling she started talking to the baby in silly language. I figured she is the grand ma. Grandparents standout. They are shameless and they are unbelievable addicted to their grandkids.

    We started talking, I was complaining about my wife and my son's sleep habits and how he wakes up at least once a night. She said he is such a good baby and he sleeps through the night. While we continue talking, she mentioned they are looking for a good family to adopt him. His mom is young and she is not taking care of him well. Meanwhile she the grandma taking care of the baby.

    I felt a void when I heard it. While we are talking, he had his head buried in her chest. He suddenly turned his head towards me and gave me a baby smile. His smile made me happy but his story saddened me deeply. You have to be a parent to know that feeling.

    Here I am, grown up man, complaining about silly things and here he is, not even 4 months old, going though a hell of a life.

    Hope you live a long and happy life Joshua.

    To us all towns are one, all men our kin,
    Life's good comes not from others' gifts, nor ill,
    Man's pains and pain's relief are from within,
    Death's no new thing, nor do our blossoms thrill
    When joyous life seems like a luscious draught.
    When grieved, we patient suffer;

    Oh, Great Spirit, whose voice I hear in the wind,
    Whose breath gives life to all the world.
    Hear me; I need your strength and wisdom.
    Let me walk in beauty, and make my eyes ever behold the red and purple sunset.
    Make my hands respect the things you have made and my ears sharp to hear your voice
    Make me wise so that I may understand the things you have taught my people.
    Help me to remain calm and strong in the face of all that comes towards me.
    Let me learn the lessons you have hidden in every leaf & rock.
    Help me seek pure thoughts & act with the intention of helping others.
    Help me find compassion without empathy overwhelming me.
    I seek strength, not to be greater than my brother, but to fight my greatest enemy - Myself.
    Make me always ready to come to you with clean hands and straight eyes.
    So when life fades, as the fading sunset, my spirit may come to you without shame.
    --Native American - Lakota - Chief Yellow Lark - 1887

    Tuesday, February 11, 2014

    Publishers love-hate relationship with Amazon


    Book publishers’ dependence on Amazon, however unwilling, keeps growing. Amazon constitutes a third of one major house’s retail sales on a given week, with the growth chart pointing toward fifty per cent. By contrast, independents represent under ten per cent, and one New York editor said that only a third of the three thousand brick-and-mortar bookstores still in existence would remain financially healthy if publishers didn’t waive certain terms of payment. Jane Friedman, the former Random House and HarperCollins executive, who now runs a digital publisher called Open Road Integrated Media, told me, “If there wasn’t an Amazon today, there probably wouldn’t be a book business.” The senior editor who met Grandinetti said, “They’re our biggest customer, we want them to succeed. As I recover from being punched in the face by Amazon, I also worry: What if they are a bubble? What if the stock market suddenly says, ‘We want a profit’? You don’t want your father who abuses you physically to lose his job.”

    -New Yorker



    “Jeff is trying to create a machine that assumes the shape of public demand,” Tim Appelo, the former entertainment editor, said. “He resembles a very, very smart shmoo—he only wants to serve, to make you happy.” Appelo was referring to Al Capp’s smiling blob of a cartoon character, which happily provides people with whatever they need: milk, eggs, butter, even its own tasty self. –New Yorker

    Monday, February 10, 2014

    Amazon Warehouse in Kenosha


    When Amazon announced it’s 1.5 million square feet warehouse in Kenosha, I asked myself, why Kenosha? Location seemed to be the obvious reason. It is 60+ miles north of Chicago and 40+ miles south of Milwaukee and 100+ miles of Madison. Covering 3 populous cities in this area. Today’s New Yorker brings another additional answer to that question. Low wages.

    Amazon employs or subcontracts tens of thousands of warehouse workers, with seasonal variation, often building its fulfillment centers in areas with high unemployment and low wages. –New Yorker

    Kenosha is hit with high unemployment rate and poverty for a while. This would serve Amazon well, finding people easily  for lower wages. 1500+ jobs are good for Kenosha and it’s residents as well.

    Saturday, February 1, 2014

    Thursday, January 30, 2014

    Setting up a new PC

    Setting up a new windows PC is exciting and daunting task. I like to setup my PC in certain ways. I have my own quirks.
    1. Get a SSD.
      • Why SSD? There are many people wrote about this. You won’t regret it. Go get one already.
      • Get at least 256 GB, I bought one with 128 GB and I was running out of space after a week. Windows itself takes 20-25 GB.
    2. Get Administrator privileges. If you are a developer & your company won’t trust you with “Admin” rights for your own freaking box, just QUIT. Find a better place to work.
    3. Split hard drive into 2 Partitions
      • Usually I make two partitions, one for system and other one for me. This helps me to easily isolate what is important to me and what should be backed up.
      • I have mixed feeling about moving “User” folder to my drive. Many apps put many things I don’t care in “User” folder. So I end up not backing it up.
    4. Install Chocolatey
      • In one line command you can install many popular software including Visual Studio trail versions. It pulls the software from web, runs the installer for you. All with one line command.
    5. May want to install Boxstarter
      1. If you have to install 100s of software/tools, you have to run 100s of commands, if you have to run 100s of software/tools in 100s of boxes, that is where Boxstarter comes into play.
    6. Setup a shortcut folder.
      • I have some folders I open quite a few times in a day and run some programs very frequently. I have a project folder where I have all my projects stored. I simple type “pro” in the “Run Dialog” it opens the Project folder. For Visual Studio I type “VS”, Who wants to remember “devenv”?
      • To do this, I usually create a folder named “Shortcut” in my drive and add it’s path to %PATH% and add “.LNK” to %PATHEXT% so that you don’t have to type “.lnk” for every shortcut in that folder. 
        • Go to System Properties >> Environment Variables >> System Variables  >>
        • Add Shortcut folder’s path to “Path” variable
        • Add “.LNK” to “PathExt” variable.
    7. When I start Windows, I like certain programs auto start and be ready. I usually run my “AutoHotKey” for text expansion and some other hotkeys and “Ditto” for multi level copy and paste. I want these things run with “Admin” privilege, so they can interact with certain Apps that are in “Admin” mode. To start them in “Admin” mode you can’t simply place them in “Startup” folder. I use “Schedule Task” to run these tools in “Admin” mode when I login. 

    Friday, January 24, 2014

    Thursday, January 23, 2014

    Few things to know when you are buying a phone from T-Mobile

    T-Mobile has been making waves with their 1.5 million new customers and their Uncarrier movement [T-Mobile added new 1.6 million customers] . Their new unconventional CEO claims T-Mobile is different, Is it?

    I have been T-Mobile customer for almost 5 years, I can definitely see some differences, Here is my recent experience with T-Mobile on unlocking my phone.

    I bought a new iPhone for my wife from T-Mobile store, I paid the full amount for the phone. No installment, no contract, Full Price. When I was buying, I knew that we were going to travel to India in next couple of weeks. So I asked the agent who sold the phone to me about unlocking. He said that, since I have paid in full for the phone, he didn’t think there would be any problem unlocking it. Made sense at that time. So I went home and called the T-Mobile customer service to unlock it. Fun things started unfold.

    I learned that, even though I paid the full price for the phone, I have to wait 40 days. T-Mobile puts this mandatory 40 days wait period to unlock your device, doesn’t matter you pay full price or not. I explained about my trip to India and they gave me free data for a month and that plan came with international roaming for the voice and data. It was not a perfect solution, I had to pay 20 cents for every minute and data speed was very low. It was on Edge network for most of the time. But the agent did what he can do to ease my pain.

    We gave that phone to my brother in-law, hoping that we can unlock it after that 40 days wait period. Oh boy! What a bad assumption. After that 40 days wait period, I called the T-Mobile customer service and gave my IMEI number to unlock it. I was told, I would get the code within 72 hours.

    Couple of days of waiting, I received an email saying that, they can’t unlock it since the phone was not active in last 7 days. I called again & talked to an agent and her supervisor. That supervisor promised me that he would escalate this unlock this phone. After this call, I called quiet a few times to get the status and case was escalated few times. Then I got in touch with an agent named David who pursued this till end and updated the status along the way. Finally the phone was unlocked.

    This was very frustrating experience, miscommunications all along they way. But one thing stood out, Customer Service agents. I have been using T-Mobile for almost 5 years, I have never seen such a good support. In the past, agents were powerless, they would repeat the same thing again & again like a parrot. But this time, I talked to as many as 7-8 agents and all of them are very nice and took responsibility and went beyond their way to solve my problem.
    Lessons learned from this endeavor,
    1. Even you the full price for the phone, it will still be locked to T-Mobile network. So go buy an unlocked phone from Apple or Google.
    2. You can’t unlock it right away, you have to wait 40 days. If you want to return your phone, there is 40$ restocking fee.
    3. After 40 days, if you call, they want your phone active for 7 days in T-Mobiles network.
    If T-Mobile listens to it’s customers and keeps up with its excellent customer service, they will definitely stay different from all other big & fat carriers and attract lot more new customers.