February 25, 2017

Leadership and CPR

To learn certain lessons a price must be paid. Eggs may have to be broken. 

Ten years ago, I started my MBA in Instituto de Empresa, a Spanish business school. The first weekend we had a kind of offsite, to get to know each other and start working together in a fun way.

In one of the exercises, each team was given one raw egg, 10 straws, 1 meter of duct tape and scissors. We had one hour to invent a way for the egg to be dropped from two meters and not break.

Being an MBA student I was obsessed with the idea of leadership, I took charge and convinced my team to choose my idea over the others: we would build three layers of straw protection around the egg, the air inside the straws would surely protect the egg from breaking when hitting the ground.

We worked for one hour cutting the straws, putting them together with duct tape, and carefully ensuring the egg was fully covered with this air cushion. All under my upbeat leadership, guidance and weeding out of the other, lesser ideas.

Time was up, it was go time, I stood in front of the whole class, with my team backing me and let the egg fly, sure that we would triumph where others had fallen.

Splat. The egg broke making our structure look like something an intellectually challenged three year old would have thought of, totally ignoring my leadership. I had imposed my leadership on the team, imposed my idea on the team, and led them to jump off the cliff. All with a smile on my face, nice manners, and convincing words.

I was hit with a realisation I have still not forgotten:

  1. Leadership is about convincing everyone to do what you think is best. You may be totally wrong about what is best and you will only realise this once it’s too late.
  2. Let the experts lead. Listen to the experts, they will probably have better ideas than you do.
  3. The universe will act regardless of what you think it will do.
  4. Your actions and decisions have very real consequences. 

I have the utmost respect for knowledge, I believe knowledge should be in the lead. When I hire members of my team, expert knowledge is the key driver. 

If you see a man having a heart attack on the street, you may have the best leadership attitude and jump in trying to save him, but if you don’t know CPR the man will die. A bad leader will pretend to know CPR until the man is dead. A good leader will call someone who knows CPR. An amazing leader, a Leonidas, an Achilles, a John Mclane, an Optimus Prime, the stuff legends are made of, will know CPR.

Posted by Roge at 12:10 PM | Comments (1)

February 18, 2017

Fighting over an orange

There was a mother who had two children. One day, these two children were fighting over the last orange. They both wanted it, but there was only one.
The mother weighed how to mediate in the fight, she could:

  1. Punish both and none of them have any orange.
  2. Split the orange and give half to each.
  3. Decide to give the orange to the small child because the big brother had to learn to share.
  4. Let one child split the orange and the other choose which half he prefers

Instead, the mother calmed both of them and asked them why they wanted the orange. It turned out one of them wanted an orange juice, and the other wanted an orange peel to bake muffins.

The solution became evident and the mother had successfully solved the problem. Both children were happy with the output.

I believe when there is a conflict, it usually is due to lack of understanding of the global situation. If both parties instead of venting, fussing and complaining about the lack of collaboration of the other party, calm down and aim to understand all the pieces of the problem at hand with the good will to find the best solution for all instead of overpowering the other, usually, an obvious win-win solution appears.

For this sometimes an independent third party can step in to mediate. If this party mediates, the goal will be to find this win-win. If this third party arbitrates, usually the outcome will be imposed, and not be satisfactory for both, or for any.

Let’s stop fighting about oranges 🙂

children_fight

Posted by Roge at 03:25 PM | Comments (1)

February 11, 2017

Unskilled and unaware of it

19 April 1995. Pittsburgh. Pennsylvania. McArthur Wheeler decided to rob two savings banks. He had an infallible plan.

Since lemon juice can be used to write invisible letters which are only revealed when the letter is heated, by smearing lemon juice on his face, McArthur was certain that he would be invisible to the security cameras. He even tested it by taking a selfie with a polaroid, which for some reason came out blank. When he was caught by the police after being identified by reviewing the security footage, his comment was: “But I was wearing the Juice!”

Psychologists Dunning and Kruger studied this case and arrived at the conclusion that the less competent an individual is at a specific task, the more likely they are to inflate their self-appraised competence in relationship to that task. This phenomenon is today known as the Dunning-Kruger effect.

We can see examples of the Dunning-Kruger effect in :

  • Shows like American Idol where we see people who clearly can’t sing, who are surprised and complain when they get rejected.
  • Nobel prize winning economists losing $4.6Bn in 4 months in Long-Term Capital Management.
  • Billionaire businessmen running for president of the USA
  • Amateur investors losing money in bitcoin investments

To some degree we all suffer the Dunning-Kruger effect. It is wise to acknowledge this and be self-critical when evaluating the work of others.

dunningkruger

Posted by Roge at 01:19 AM | Comments (0)

February 9, 2017

Automating web actions with selenium IDE

I’ve discovered a new tool which I find quite cool: Selenium IDE.

Selenium is a plugin for firefox which allows to automate actions on a web browser in a similar manner that microsoft excel allows you to record macros and them play them back. This can be very useful if on your day to day you manually repeat the same actions on a web application, for example downloading every day the status reports from the company issue management tool in excel to check the top outstanding issues.

To get selenium up and running just follow these simple steps:

  1. with firefox, open https://addons.mozilla.org/en-US/firefox/addon/favorites-selenium-ide/ and download by clicking on “Add to firefox”, click on Install and restart Firefox.
  2. Open Selenium IDE from your firefox browser by clicking on the top right icon called “Open menu”, click on Developer, and click on “Selenium IDE”, you should see your selenium IDE window pop up.
  3. As the Selenium IDE window opens, it’s ready to record your first test, open a tab in firefox, go to http://www.rogeliorodriguez.net , right click and select “assert Title”
    1. seleniumide1
  4. go back to the Selenium IDE window and click on the green Arrow with a dash, you will see that the action has been replayed and that the test has passed successfully.
    1. seleniumide2
  5. To test that this works we can change the assertion so we can check that with the wrong title the assertion fails
    1. change the assertion to “wrong title” and click on the green arrow with a dash again. you will now see that the test fails, as expected, proving that the assertion works.
    2. seleniumide3
  6. That’s it, you are now set to start using selenium IDE, explore the rest of the commands available with right click. In a future post I will investigate how to integrate this with Java programming so you can perform more complex tests.
Posted by Roge at 11:21 PM | Comments (0)

Chinese Government intervention in China Bitcoin Markets plummets bitcoin price

It seems Bitcoin isn’t as independent as I thought it was.

Today around 13:00 the price of bitcoin fell sharply after the Chinese central bank announced that they would not allow two of the major Chinese exchanges to permit bitcoin and litecoin withdrawals for a month.

http://www.coindesk.com/bitcoin-price-sinks-1000-chinas-exchanges-cut-withdrawals/

How I read it is:

  1. Bitcoins can be freely exchanged between individuals. Blocking this would be as restrictive as blocking internet access to certain webpages (something that China has already done in the past)
  2. Since it’s hard to block people from exchanging bitcoins, what governments can do is force the hand of the exchanges (Kraken, Poloniex, or in this case Chinese exchanges Huobi and OKCoin) to block withdrawals or exchanges into fiat currency.
  3. Since businesses, salaries and day to day life still happens in fiat currency. By blocking the exchange from cryptocurrency to fiat currency, the value of the cryptocurrency can be put into question. If you can’t turn your cryptocurrency to “money”, you are stuck with something worthless.

This could change in the future if payment in cryptocurrency becomes ubiquitous. Then people would not have to change back into fiat.

This could also change if the central banks issued their own cryptocurrency and guaranteed a 1 to 1 matching between their fiat and their cryptocurrency. This would also reduce the volatility of the cryptocurrencies.

As we speak, kraken.com, one of the major UK Based Exchanges is offline, probably due to the excess traffic from so many people panicking to sell their bitcoins. Also, as a side note, my personal bitcoin portfolio has taken a big hit, I will follow with interest the next days for this rare new world of virtual value 🙂

Posted by Roge at 06:06 PM | Comments (0)

February 4, 2017

Software is invisible, and that’s a problem

In the spring of 1987, the town of Alba Iulia, Romania, had a change request to their infrastructure.

They wanted to build a boulevard. The problem was that a 7600 ton building hosting 80 families was on the way. Of course they opted for the sensible solution that anybody would have thought: They split the building in two halves, with the families still living inside, and moved each half of the building 55 meters on each direction. People remained inside at all times, and just to prove a point, a woman decided to place a glass of water on the edge of her balcony. It didn’t spill a drop. The building remained connected to all utilities (water, electricity, etc) during the moving process.

In IT we do invisible things. Google is 2BN lines of code, Reading it at one line per second non-stop would take 63 years. And yet us users don’t see this, for us it’s just a web page which we use. How complex can it be? Surely not that much, after all my cousin’s son who is 15 years old is a whiz-kid programming in Javas.. This invisibility of IT has many unfortunate consequences, architects can learn from each other and appreciate the beauty of the technique in the buildings they create. Quality comparisons can be easily established at plain sight. Barcelona’s Cathedral La Sagrada Familia is obviously different to Kirchberg’s church. How to compare the code from google to the code from windows, to the code that runs my computer’s mouse? We can’t because we don’t see it, sometimes even if we would like to see it we can’t because it’s proprietary software.

Bad design of IT solutions brings misery to the users and elevated maintenance costs to management.

It is unintuitive for an end user to know the complexity of a change that he is requesting in the underlying platform.He could think he’s asking for something “standard/state of the art/our competitors did it” (build a boulevard) without understanding the invisible underlying complexity (move a building)

When a new requirement, or a change in a requirement comes in late, and must be delivered without taking the appropriate time to adapt the design. The solution will not be robust.

Let’s listen to our builders of invisible boulevards.

buildingsplit

Posted by Roge at 12:21 AM | Comments (1)

February 1, 2017

Loading arduino programs from headless raspberry pi

A couple years ago, I built with an arduino, a peristaltic pump, an LCD display and an H-Bridge motor controller, a watering machine for the orchid I keep at the office.

arduino

The other day I pressed a button I had put in place to be able to configure the timing for the watering and I must have pressed the sequence wrong (was it push, hold, push, push? or was it push ,push, hold, push…) so now instead of watering for 10 minutes in order to fill the pot and empty it, it just waters for 1 minute. To avoid my orchid from drying up I’ve reverted to the manual workaround of taking it to the kitchen by hand, but this is no way to water a plant…

I could take the whole system home, connect it to my computer and test it out of course, but it would be much cooler to go to the office with a raspberry pi-wifi hotspot, connect to it with my iphone and reload the (simplified) program.

To do it I’ve prepared my raspberry pi the following way:

  1. set up the wifi hotspot
  2. Install arduino
    1. sudo apt-get update
    2. sudo apt-get install arduino
    3. sudo apt-get install python-dev
    4. sudo apt-get install python-setuptools
    5. git clone git://github.com/amperka/ino.git
    6. cd ino
    7. sudo python setup.py install
    8. sudo apt-get install picocom
      1. to exit picocom serial [CTRL + A] followed by [CTRL + X]

  3. Connect the arduino to the raspberry pi via usb
  4. Load the program
    1. mkdir blink && cd blink #we must work on an empty directory
    2. ino init -t blink # initiates a project using “blink” as a template, copy libraries into
    3. ino build # compiles the sketch, creating .hex file (default Arduino uno -m atmega328 for duemilanove)
    4. ino upload # uploads the .hex file
Posted by Roge at 01:12 AM | Comments (0)