19 November 2013

Staying Happy

Shiny Happy People
Photo by Donna Cymek (Creative Commons License)
Part of my job is about problem solving which can be very rewarding but also depressing at times as people generally only come to me if they have a problem they cannot solve. And problems when not dealt with accumulate and grow (as much as I wish they would simply go away).

Aside from trying to find solutions, it's also a battle to stay emotionally on top of things - problems, people, people problems, problem people, money issues, family issues, "the cat decided to sharpen its claws on my financial report" problems, "where to hide a dead cat" problems, "the family is now upset the cat has gone missing" problems, computer problems, car problems ... the list goes on. Some days it would be easier to go back to sleep but that is simply avoiding the issues. Much better to face them and come out healthy and happy at the other end.

So here's a  list of things we can do to stay happy.

(The first 10 I've taken from a great post which explains them in more detail - read the full article)
  1. Exercise more – 7 minutes might be enough
  2. Sleep more – you'll be less sensitive to negative emotions
  3. Move closer to work – a short commute is worth more than a big house
  4. Spend time with friends and family – don't regret it on your deathbed
  5. Go outside – happiness is maximized at 13.9°C
  6. Help others – 100 hours a year is the magical number
  7. Practice smiling – it can alleviate pain
  8. Plan a trip – but don't take one
  9. Meditate – rewire your brain for happiness
  10. Practice gratitude – increase both happiness and life satisfaction
Some others:
  1. Decide to be happy - influence your environment, not the other way around
  2. Take regular breaks - in the day, week, year
  3. Surround yourself with happy people
I'm sure there are others ...

15 October 2013

Leadership Failure

There are certain key phrases that I listen out for coming from my own mouth. One of these is
"... because I'm the boss and I asked you to do it"
or any one of it's derived relatives.

If I ever hear a statement like that pass my lips then I take it as a sign that I've failed somehow as a leader (note, I'm not saying that I don't have the right to say it).

Why?

Because one of my functions as a leader is to provide people a goal/vision to work toward. If they have this then it should be self evident why they do the tasks they do. If someone questions the task then I should take that as a sign that I am not communicating the goal/vision well enough.

The problem is that it takes a lot of effort to communicate a goal/vision, far more than it does to order someone to do something. But that, to me, is the difference between a boss and a leader. A boss's primary function is to get the job done. A leader's primary function is other people and taking them on a journey. The reality of my life is that I am both (and also a worker with a boss), but I'd like to think that I lean toward the leader side of things more.

Even worse than the aforementioned statement is the emotional bullet after the fact eg
" ... by not doing what I asked you are not showing me respect ..."

The statement may be true (although I would always be hesitant to state other peoples intentions - much better to say "I don't feel respected"). However, we should switch it around and if someone hasn't done the task asked of them then take it as a sign that we haven't communicated the "why" clearly enough.

And saying a statement like that is essentially an emotional power-play. No-one can defend themselves under that kind of accusation. And it certainly doesn't help get the task done, nor inspire anyone to do differently next time.

We can always learn something about ourselves from other people even through their inaction.

29 August 2013

Making Mistakes

Our company has had great growth over the past few years and while it would be nice to say it has all gone smoothly there have been a lot of mistakes ranging from the forgettable to monumental blunders. We've re-organised as best we could with the little knowledge we have, made adjustments to plans on the fly and despite trying to stay ahead of the game it has often been the case that we have "flown by the seat of our pants."

My wife recently reminded me of a Woody Allen quote:
"If you're not failing every now and again, it's a sign you're not doing anything very innovative."
Surely that means I'm being extremely innovative!

Mistakes have consequences but they are not all bad. On the good side we have learnt some valuable lessons where we have been willing to learn them.

Recently I've been working on our company values and principles and one of the ideas I want to encapsulate is failure:

1. People are expected to fail every now and again;
I want people in our organisation who are willing to step out and try new things. Therefore I also need to expect they will fail sometimes. Standing still in the place you know is safe but it doesn't get you anywhere.

2. People have the freedom to fail;
Within an organisation (company, family, sports team ...) the mistakes we make will affect others. We need to accept that we will suffer the consequences (good and bad) of the actions of others, help them to learn, learn from them, and move on together. Like it or not, our lives are connected to other people.

3. People should learn from their failures;
If people are continually experiencing the same failures then it's a very good sign they are not learning and adjusting. You can't expect to continue to do the same thing and get different results.

Finally our outlook on failures is very important. Thomas Edison's famous quote about his journey to make a working light bulb sums it up:
"I have not failed. I've just found 10000 ways that won't work."

30 July 2013

Installing ffmpeg on CENTOS 6

I recently had to do this and thought I'd post the steps mainly to remind myself if I had to do it again in the future:

  1. Enable EPEL
    rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
  2. Install RPM Fusion
    yum localinstall --nogpgcheck http://download1.rpmfusion.org/free/el/updates/6/i386/rpmfusion-free-release-6-1.noarch.rpm http://download1.rpmfusion.org/nonfree/el/updates/6/i386/rpmfusion-nonfree-release-6-1.noarch.rpm
  3. Install ffmpeg
    yum install ffmpeg
Quite straight forward really!

10 June 2013

CPanel on AWS: Domains redirecting to cgi-sys/defaultwebpage.cgi

We recently set up a test server environment on AWS. One of the issues we faced was putting multiple domains on a shared ip address. Visiting these domains redirected to the default web page for the hostname.

Our Setup:
An Elastic IP (EIP) pointing to a VPC which contained an EC2 instance (web server) and an RDS instance (mysql server). WHM/cpanel had DNS Clustering enabled for automatic DNS entries on our remote nameservers and the shared IP address was set to the EIP.

Process:
After much googling about the problem and a lot of test edits to httpd.conf it seemed apparent that it was related to a resolution of the domain name on the web server. The DNS entry itself was correct as we could reach the server but it didn't seem like it was resolving to the correct ip address that was within the VirtualHost directive in httpd.conf.

I created a simple PHP script in the default htdocs location to print out the environment.  This was simply something like:
<?php print_r($_ENV);
This gave me the information I needed (although I missed it for many hours). $_ENV['SERVER_ADDR'] was set to an internal ip address not the EIP.

The reason is the EIP points to the VPC which in turn passes the request to the internal server IP address - in our case a 10.0.x.x address. The server was then responding with the default configuration not the settings within the respective VirtualHost directive (as it was set to use the EIP).

Solution:
In our case we still have the EIP set as the shared IP address in WHM/cpanel. We do this so that the clustering will set up the DNS entries correctly. However we need to manually change the VirtualHost entries to respond to the internal IP address. (The plan is to write a post-account-setup script to automatically change on account creation).