Sunday, January 20, 2013

learn from Jiro, practice your craft

Last week I read an inspiring article from linked in by Jeff Weiner(CEO of LinkedIn), called From Seinfeld to Sushi: How to Master Your Domain, this is a great article, it tells you the similarity of masters how to practice their crafts, either a joke master or a sushi master. I Love this idea since the software craftsmanship is my passion, and definitely we can apply this techniques into our software practices. And in the article the author recommends the movie of "Jiro dreams of sushi". Finally I found the movie and watched it twice. It is really an amazing movie, I highly recommend every one should watch that, very inspiring.

Here is what I learned from the movie:
  1. Passionate about his job, Jiro said he fell in love his job, he love to make better sushi, he is hardworking, I still working at the age of 85, working 364 days a year; 
  2. Take job seriously 
  3. Keep practicing over and and over 
  4. Keep improving skills bit by bit, kaizen culture 
  5. Money is secondary, he does not care the money, he only wants to make better sushi. 
I think all these can apply to our software craftsmanship practicing. I will wish I can still coding at the age of 85 like Jiro, now I am 43, compare to Jiro, there is still a long way to go, I remembered Uncle Bob once said: "I will code until I die, but I don't want die too soon".

For me I love the software craftsmanship, but I don't have the passion for my work, I don't love my job, this is the issue for me.
I think one issue in software industry is, there is no culture to encourage developer to perfect their crafts. The managers just want get the job done, there is no pride of the work, and the job market does not look at developers crafts. But the culture of crafts are deeply rooted in the Japanese culture, either making sushi, or practice kendo or making cars, you can tell they share the same philosophy.

The other one is software's complexity nature, sushi has been through a long time, it has a repeatable process, that is why Jiro can improve his skills by keep repeating the same thing over and over. But software is so different, it is very hard to repeat the same task, since each time you are doing the different things. But I feel we can extract the coding practices from the tasks, even each task is different, but coding practices are similar.
The third part I think in software craftsmanship, we need to improve our skills in many different area: like tools, different languages, process, and even your communication skills. This is really challenging and that is why it needs whole life training.

Quotes

Here I post some quotes from the movie:
  • Ultimate simplicity leads purity 
  • 5 attributes of a great chef: 1. take their work seriously; 2. aspire to improve skills; 3. cleanness; 4. impatience; 5. passionate 
  • They are better leaders than collaborators,. they are stubborn and insist on having in their way 
  • We don't care about the money, all I want to do is making better sushi 
  • Shokunin try to get the highest quality fish, and apply their technique to it 
  • I do the same thing over and over, improving bit by bit, there is always a yearning to achieve more 
  • I will continue to climb, trying to reach the top, but no one knows where the top is 
  • I've never hated this job. I fell in love with my work and gave my life to it. Even though I'm 85, I don't feel like retiring. That's just the way I feel 




Thursday, November 29, 2012

My 3rd toastmaster speech

I just finished my 3rd toastmaster speech - "Get to your point".  After a long time break,  finally I got a  chance to practice my speech. This time I tried to reduce my preparation time, because I spent too much time memorizing my notes.

During the speech I think I did well, but I need to have more pause, I spoke too fast,  it took me 5:30 to finish the whole speech, I think it might due to I practiced too much and trying to recite my notes during the speech,  I will try to improve it next time.

I would like to  thank my mentor Robert Fox, he helped me a lot, reviewed my script, which made me rewrite my script almost entirely. I will say without his help, I could not finish my speech successfully.

I also learned from him that it is very important to bring your personal example, since it will bring more connection to the audience,  because people like the concrete examples, and also make it easier to memorize, and more confident for you to tell your own story.

My speech is based on the book "connected"(this is author's video on Ted), and chad fowler's blog post: "be careful of who you work with".

Following is my script.

The power of social network

Birds of a feather flock together, this quote tells us the power of social network.
We all know that networking is important, but how important it is? What is the power behind it?
Today I am going try to answer these questions. 
Mr. Toastmaster, fellow toastmaster, and welcome guests, my name is Steve.

The reason I choose this topic is because I found a good book by chance, it is called - "connected". This is a very inspiring book about social network.

First let me share you a scientific research result coming from the book. The 2 authors studied obesity, and they found that the obesity can spread through the social network, like virus, they give the following striking result:
If your friend is obese, then you have about 45% higher chance to be obese;
If your friend's friends is obese, you have 25% higher chance to be obese, and
If your friend's friend's friend is obese, then  you still have 10% more likely to be obese.

And also obese people are more likely connect to each other, and non-obese people more likely connect to other non-obese people.

This example tells us that human behaviour is contagious, we are so easy to get influenced: if your friend is overweight, you will be overweight, and if your friend is richer, you will be richer; if your friend is happy, and you will be happy.

This is the power of the social network, it shape our lives: it affects our health, wealth and success. it can make you good or bad.

so please choose your friend wisely.

And be careful of who you work with!
Let me share with you my bad work experience, about 10 years ago, I joined a large company,  but I found culture was bad: I saw bureaucracy, favouritism, and ridiculous process, my job was boring and slow moving. I was totally frustrated and not happy, and until one day I decided to leave because I could not stand anymore.
So my lesson is choose your employer carefully, the culture is more important than the salary.

There is another kind of social network we can not ignore, it is the social network over the internet. In the last 5 years, facebook, linkedIn, twitter, become more and more popular, compare to the physical social network, they have some advantages: they spread ideas lot faster and easier, and people are much easier to get influenced. 

For my personal example, I like twitter, I've been using twitter for 3 years, I follow many masters and gurus in the IT industry, I read their tweets, read their books and articles. And the interesting thing is those gurus are usually connected each other, I feel I am in their loops and listen to their conversations, which is definitely helpful for my career. I learned a lot, my mindset was changed, I understand what I need to improve and where I should go in future.

Blog is another powerful tool influenced me a lot, it was a blog post which inspired me to join the toastmaster club, last year this time, I read a blog post, it mentioned if you does not give a good speech, then you are wasting people's time, you are killing people's life! How to make a better public speech? join the toastmaster club, that drive me standing here. 

And I also have my personal blogs, Sometime I got comments and emails from all over the world, thanked me how my articles helped them for their work. Those are very encouraging, which stimulate me to continuing writing blogs. In the internet you never know how much influence you can have, how much help you can give other people!

In conclusion, the social network shapes our lives,it can make you good or bad. We get benefit from a good social network, it is also our responsibility to make it better. It helped me me, and I am sure if can help you as well.

I like to share a quote from this book:"When you smile, the world smiles with you".

Mr. Toastmaster

Wednesday, October 24, 2012

gzip compression/decompression in Ruby

Recently I did some investigation compression and decompression in gzip format using Ruby. Here I posted my ruby code:

Sunday, October 21, 2012

How to render JSON in rhodes mobile framework

Currently I am using Rhodes framework to build mobile applications. Recently I just figured out how to request an Ajax call from view, and controller how to render a JSON object and return it to the view.

Sample code
Ajax call to request json object using jQuery:

code of rending json in controller


I found this solution in the Rhomobile launchpad forum, it works perfectly.
This exactly looks like render json behaviour in Ruby on Rails.

Sunday, September 23, 2012

Using alias_method to implement AOP in Ruby

This week I just realize the power of ruby alias_method, you use alias_method to intercept the existing method, and modify its behaviour,  this is exactly what AOP does the jobs.

The following code example tell you how to use the alias_method, to add a logging logic to the exit() method.

This reminds me the javaasist framework, I used before, which is a powerful tool to do bytecode manipulation, it can intercept the method by renaming the existing method to another method,  and modifying the existing method, which is the exactly similar strategy.
the code example:
Now when you compare two solution, you will tell how easy to do it in Ruby!

Resource
1. alias_method API document
2. IBM Javaassist tutorial 
3. Spring AOP document

Saturday, September 15, 2012

Fix the iOS code signing issue when using Jenkins


This week I setup the Jenkins on my Mac and try to build iOS applications. unfortunately I got the code signing issues, either I use xcode plugin or xcode command line tool. Through a couple days of googling and I could not find any solution that works for me, but I finally solve this issue by myself through different try out, and the solution is such an easy, now I would like to share with my solution.

The core reason is Jenkins is running as daemon mode in Mac, just assume it is a different user - "Jenkins", so it will not have access to the keychain or provision profile as a you login using your credentials, which cause the code signing issue.
I found I have following 2 errors

1. "Code Sign error: There are no valid certificate/private key pairs in the default keychain"
Solution: Copy your iPhone developer certificate from "login" keychain to "System" keychain.
Detailed steps:
  open the "Keychain Access" application, click the login tab, right click the certificate like "iPhone Developer: your_name (XXXXXXX)", choose copy, then click the "System" tab, right click mouse, choose "Paste 2 items"; you might need to do the same thing with the certificate like "iPhone Distribution: your_name".

After doing this, you will get the second error.
2. "Code Sign error: Provisioning profile 'xxxxx-xxxx-xxxx-xxxxx' can't be found"
Solution: Copy the provision profile to Jenkins user folder.
The provision profile is under in the folder
/YourUserName/Library/MobileDevice/Provisioning Profiles,
for example in my machine, the provision profile files are under /Users/steve/Library/MobileDevice/Provisioning Profiles
In the mac, the Jenkins will be in /Users/Shared/Jenkins, create the following folder:
/Users/Shared/Jenkins/Library/MobileDevice/Provisioning Profile,  then copy the .mobileprovision file to this folder.

After doing this, the code signing issues will be fixed. Hope my finding will be helpful to other Jenkins users.

Sunday, August 19, 2012

Book review for "An Agile Adoption and Transformation Survival Guide"


Recently I read an ebook about agile called An Agile Adoption and Transformation Survival Guide from infq.com, it is written by Michael Sahota. It is really a good book, bring lots of useful insights and information.

What I learned most is the author provides the concept of adoption and transformation for agile.
  • Adoption is about "doing agile", treats agile as a process or product;
  • Transformation is about "being agile", which means we has the agile mindset.
So I learned that adopting agile without agile mindset transformation is doomed to failure. That would explain why Scrum is so difficult to implement in many companies, because most of them just adopt the Scrum practices, but did not transform the agile mindset.

Quote from the author: "Agile is not a Process – it Defines a Culture, Agile Culture is about Collaboration and Cultivation" So we need to create a culture to help us adopt and transform the agile.

This is a very important concept, culture is more important than the practices. Before I learned that agile is not enough just by following its practices, we need to do something more. This time the author explicitly pointed out the concept of transformation, and concept of culture. We can not treat agile as a set of tools, we can just pick one of them like buffet, the more importantly, we need agile mindset change and culture change.

To help you transform from the existing culture to the agile culture, the author provides different paths, patterns and models, that is the reason why it is called "Survival guide".

Another reason I like this book is it brings you lots of useful models, I already know some of them, but I did not realize the author could integrate them such nicely. I just list some of them:
  • Schneider culture Model 
  • chasm
  • hype and disillusionment
  • Fearless change
  • ADAPT
  • Containers, Differences and Changes(CDE)
Summary
This book has lots of information, I highly recommend any serious agile practitioner to read it, you will learn a lot.To make agile successfully, We definitely need change from 'doing agile' to 'being agile'.

Resource
  1. Book download link from infoq.com
  2. The author's blog about this book
  3. The author's web site: agilitrix.com