Wednesday, October 5, 2011

Something to think about failure !


Something to learn from kids, they are not afraid of failing, they love to try. Failure is not something we should be avoiding, It's something we should be looking for. If we play safe for something we know we'll win, there is no grow at all and if you do not grow, there are poor opportunities to create value for others.

Focus on your weaknesses to build a strong leader or focus on your strengths to produce a weak vision.
or do not focus on what is a weakness or a strength but on the joy of the journey you are driving.

If things seem under control, you're not going fast enough.

Schools kill creativity?

This is a great video I was very interested on sharing with everyone. Looking forward to hearing your opinion!



Why are there expectation defined in advance when the source -the kids- are full of potential? Where does the brilliance comes from?  The experience or the unique value that a human been can generate?

It's a difficult question, but worth it to keep in mind on your journey.

About Ideas

"One can steal ideas, but no one can steal execution or passion."
From Do More Faster by David Cohen and Brad Feld


The Joel Test

Any software looking for a great success should pass the following test, based on Joel Spolski, and I happen to like the policy:
Do you use source control?
Can you make a build in one step?
Do you make daily builds?
Do you have a bug database?
Do you fix bugs before writing new code?
Do you have an up-to-date schedule?
Do you have a spec?
Do programmers have quiet working conditions?
Do you use the best tools money can buy?
Do you have testers?
Do new candidates write code during their interview?
Do you do hallway usability testing?


Thanks Joel, based on this great book

SSH access with no password

The following steps can be used to ssh from one system to another without specifying a password.

Notes:

The system from which the ssh session is started via the ssh command is the client.
The system that the ssh session connects to is the server.
These steps seem to work on systems running OpenSSH.
The steps assume that a DSA key is being used. To use a RSA key substitute 'rsa' for 'dsa'.
The steps assume that you are using a Bourne-like shell (sh, ksh or bash)
Some of this information came from:
http://www.der-keiler.de/Mailing-Lists/securityfocus/Secure_Shell/2002-12/0083.html


Steps:

On the client run the following commands:

$ mkdir -p $HOME/.ssh
$ chmod 0700 $HOME/.ssh
$ ssh-keygen -t dsa -f $HOME/.ssh/id_dsa -P ''
This should result in two files, $HOME/.ssh/id_dsa (private key) and $HOME/.ssh/id_dsa.pub (public key).
Copy $HOME/.ssh/id_dsa.pub to the server.

On the server run the following commands:

$ cat id_dsa.pub >> $HOME/.ssh/authorized_keys2
$ chmod 0600 $HOME/.ssh/authorized_keys2
Depending on the version of OpenSSH the following commands may also be required:
$ cat id_dsa.pub >> $HOME/.ssh/authorized_keys
$ chmod 0600 $HOME/.ssh/authorized_keys
An alternative is to create a link from authorized_keys2 to authorized_keys:
$ cd $HOME/.ssh && ln -s authorized_keys2 authorized_keys


On the client test the results by ssh'ing to the server:

$ ssh -i $HOME/.ssh/id_dsa server
(Optional) Add the following $HOME/.ssh/config on the client:

Host server
IdentityFile ~/.ssh/id_dsa
This allows ssh access to the server without having to specify the path to the id_dsa file as an argument to ssh each time.

Sunday, October 2, 2011

Seth Godin. Just remarkable!

Great insights on marketing. I got very impressed with the alignment from Eric Ries on Lean startup, targeting early adapters that may "if you are lucky" care about your product. I think this a 2003 video, still a lot of fresh blood on the talk and makes me think if Seth Godin was on his way to produce the master piece Linchpin.

Geoffrey Moore presentation based on his book: Escape

This is a great presentation that make leaders aware of the direction they are taking the company.  Stop the naive innovation speech, make it real.

Link to the presentation, Thanks a lot ecorner!: http://ecorner.stanford.edu/authorMaterialInfo.html?mid=2725

book at amazon!

Monday, September 26, 2011

Quotes from Crucibles of Leadership by Robert J. Thomas

"During the question and answer period following the class, I’d asked Tharp what was to her mind the biggest difference between practice and performance. She looked at me quizzically, as if I’d asked a truly boneheaded question. But then, patiently, she explained that practice and performance were part of the same thing . . . that when a dancer practices she thinks about the performance and when she performs she notices the things she ought to practice more. In fact, Tharp added, the key is to practice while you perform, and vice versa. I told Bennis that I thought the same thing ought to apply to leaders. He leaned forward over the remnants of our breakfast and fixed me with his steely eyes. “Kid,” he said, “you’ve got something there. Build on it.”"


"While experience matters, what matters more is what one makes of experience: how a person comes to recognize in a crucible experience that something new or important is happening, to see beyond the discomfort, perhaps even the pain, of new and unexpected information and to incorporate that information as useful knowledge, not just about the world but, as likely, about oneself."


"Rather than wait for the right moment to arrive, they discover and exploit learning opportunities. Rather than partition their lives into periods of action and periods of reflection, they do both, often on a daily basis, sometimes in precisely the same moment. Rather than complain about the scarcity of time to learn, they make time. Like accomplished performers in sports or music or the arts, they practice as strenuously as they perform. And when, as often happens to organizational leaders, they find themselves onstage much of the time, they learn how to practice while they perform—not simply to learn by doing, but to learn while doing."


"Rupp said his leader’s words had such an effect on him that he wrote them down. “That situation taught me a great lesson: that I should not be so focused on myself and look at situations only as how they affect me.”

"Second, the more frequent experience of new territory among leaders at the beginning and toward the end of their careers suggests that they share something in common. In Geeks and Geezers, Warren Bennis and I drew attention to neoteny: a characteristic of older leaders who’d remained active and vital across eras and organizations. Neoteny, we argued, is the quality of retaining youthful habits and behaviors, like curiosity, and openness to experience, and surprise, well into one’s later years. The collection of crucibles seems to suggest that those who continue to explore new territory as they age are likely to remain vital and active as leaders. This was borne out in the interviews with people like Walter Sondheim, John Wooden, Sidney Harman, Warren Bennis, and Frances Hesselbein, who recounted for us new territory crucibles they had experienced over the past ten years."

"Like a stretched rubber band, a crucible embodies potential energy—energy that can be released productively or unproductively. In the following sections, we’ll consider examples of each type of crucible, first in the context of lessons they have to teach about leadership and then through the lens of lessons that each type has to teach about learning."

Saturday, July 9, 2011

How to list tasks from your project

rake -T


  • Use Rakefile for tasks that operate on the plugin’s source files, such as special testing or documentation. These must be run from the plugin’s directory.
  • Use tasks/*.rake for tasks that are part of the development or deployment of the application in which the plugin is installed. These will be shown in the output of rake ,ÄìT, the list of all Rake tasks for this application.


How to extend a class


class Symbol
  def %(arg)
    ...
  end
end
The above code does what you need, but leaves no hint that you've made a change to Symbol. An alternative solution is to define a module and include that module in Symbol.
module SymbolExtension
  def %(arg)
    ...
  end
end

Symbol.send :include, SymbolExtension


Granted, this isn't a huge hint, but if you check
 Symbol.ancestors you'll find the following list.
Symbol
SymbolExtension
Object
Kernel
extracted from: http://blog.jayfields.com/2007/01/class-reopening-hints.html

plugins on rails 3.0


How to install it?
rails plugin install URL
How to remove it?
rails plugin remove plugin_name
How to create your own plugin?
rails generate plugin my_plugin
The files that are required are:
init.rb
and directory in the plugin called lib

A few special variables are available to your code in init.rb:
name The name of your plugin ('my_plugin' in our simple example).
path The directory in which the plugin exists, which is useful in case you need to read or write nonstandard files in your plugin’s directory. 
config The configuration object created in environment.rb. (See Chapter 1, “Rails Environments and Configuration,” as well as the online API docs for Rails::Configuration to learn more about what’s available via config.)

Saturday, June 18, 2011

How to setup your Git environment from scratch

SERVER SIDE
sudo apt-get install git-core git-doc gitweb git-gui gitk git-email
git-svn git-daemon-run
git init
git add .
git commit
git clone --bare ./menucook menucook.git

get the repo
git clone ssh://inguansoftsvn/home/inguanzo/depo/menucook.git

How to create a remote branch
git push origin origin:refs/heads/web

workflow to deploy into the server
git rebase origin/web

prompt for snowleopard:
parse_git_branch() {
  git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
PS1="\[\e[01;31m\]\w \$(parse_git_branch): \[\e[00m\]"

prompt for linux:
if [ "\$(type -t __git_ps1)" ]; then
    PS1="\w \$(__git_ps1 '(%s)$ ')"
fi

Saturday, June 11, 2011

clean apps from iPhone simulator

to clear out old iPhone simulator's applications :

  • delete the folder called iPhone Simulator from the Application Support folder contained in your home directory's Library folder. 
  • or selecting iOS Simulator --> Reset Content and Settings...

Sunday, June 5, 2011

eval is evil


eval for any objective should not be used, even for parsing JSON
passing strings to setInterval()setTimeout(), and the Function() constructor is, for the most part, similar to using eval()

Monday, February 21, 2011

dynamic access to constants on ruby

How to verify if the constant is available?
self.const_defined?('DEFAULT_VALUES')

How to call for it: simple way:     MyClass::CONSTANT
Dynamic cool way: MyClass.const_get("CONSTANT")

Saturday, January 22, 2011

Linchpin, a must read for everyone!

Linchpin: Are You Indispensable?Linchpin: Are You Indispensable? by Seth Godin
My rating: 5 of 5 stars

Amazing book!  I was looking for the chance to write a book related to disobedience and How this could lead to your unique brand in the world.  I think this book touched my core point evolving with the topic on a very productive way.  A joy and very profitable investment to read this book.

One more time Thanks to Seth Godin for his generosity!


View all my reviews

Saturday, January 15, 2011

How to perform several changes on many files in one step

Hi,

Several time you got a very safe pattern to be modified for a different text on thousands of files on a huge hierarchical tree?   The best way I have seen this working pretty nice is with a one liner Perl, already tested on Windows, Linux and Mac, Perl still very alive!

perl -pi -e 's/this reg exp/with_this_content/g;' file

I said thousands of files but above is only one, well pipe them:

find . -name "*rb" | xargs perl -pi -e 's/this reg exp/with_this_content/g;' {}

recommendation, have a committed version of your work in case you didn't like the results of the massive editing!

Thursday, January 6, 2011

How to append to an array in ruby

To add elements and incorporate them into a base array:
base_array.concat appen_this_array

to add single items, just push:
base_array.push(this_item)