Tuesday 30 October 2018

Three types of manager...

To my thinking, there are three main types of manager.

Type 1:  These managers make all other managers seem bad.  They empower you, challenge you, and support you - all in the right balance.

Type 2: These managers range from "I only manage people to enjoy the exquisite pain I can inflict on them" through to "as long as we get the right results, I don't care what my underlings think".  It's a broad range, but it amounts to the same - people don't really matter.

Type 3: These managers are generally ineffectual, lazy, or just incapable.  They have one redeeming quality though - they know it.  Because they know it, they keep out of your way.  As long as you seem to be doing the right things, they will leave you to it.

Sunday 13 August 2017

Proactive Laziness: Why is laziness a good thing?

Proactive laziness is one of my mantras.  People hear it and think it an oxymoron.  How can you be both proactive and lazy?  How can laziness be a good thing?

Don't get me wrong, I'm not suggesting that doing nothing is a good thing, rather that laziness is a force that can be used for good!

We all want to be effective.  We all want to get things done.  How can laziness help?

Well, we also all want to be efficient, we want to do a job right the first time and we don't want to do boring, repetitive, unnecessary work.

Proactive laziness means doing a little extra work now to avoid having to do a lot of extra work later.  It means automating, streamlining and designing to avoid spending time and energy on things later on.

I was talking to a colleague the other day about how laziness is the reason that I do things so efficiently.  He dismissed this as me being self deprecating, saying that it was due to knowledge and skill.  I struggled to correct his belief.  You see, I do know some things, but often I came to know these out of need rather than interest.  I would see a huge piece of work and think, I really can't be bothered doing that - how can I do it better?

This lazy approach has lead to me learning a lot.  Occasionally there is no easier way, but not often.  Some times the easier way actually takes more work, but that becomes a new technique, another tool in my toolbox that I can pull out and use next time I need to be lazy.

Recently I had just such a case.  We had to upgrade a tool on a server.  It would have taken 10 minutes to do this, but I knew this wasn't a one-off so I spent a few hours on it.  Sure enough, when we then had to do the same to another hundred servers (and then another hundred and so on) it only took about 10 minutes to do them all, rather than 10 minutes each.

Through valuing and embracing an approach of proactive laziness you can do more with less effort and waste less time on boring stuff!

Friday 4 August 2017

Don't use it against me but...

I was recently talking to someone, and they confided something in me.  They asked me to "Promise not to use it against me" and then shared that during a challenging part of their life, in their youth they had seen a "shrink".

I thanked him for sharing and said I had some similar experiences I wanted to share and asked him to PLEASE not use them against me and to keep it to himself.  I shared the following:

Some time ago, I was suddenly in agony!  I could barely get up!  My sister took me to the hospital and the doctors gave me some pain relief, some medicine and I was fine, thanks to their help.

Another time my car broke down, it was on the motorway and I couldn't steer it at all.  I had a tow truck come and pick up my car for me.

He looked at me, thinking I had gone mad, not understanding why I would share these completely irrelevant points with him, I suspect a little hurt that I was ignoring his own confession.  He could not understand how my confession in any way related to his.  He clearly wondered how on earth anyone would use this against me - it was so completely different to his own tale.

But was it?

I had a problem I could not fix.  I sought the help of someone who could help.  That person helped resolve the issue.  How is this any different from his story?

No reasonable person would use my story against me.  Why on earth do we as a society disparage and demonise mental health?

Is it because there is 'something wrong with you'?  No one thought I was bad for going to hospital, and there was clearly something wrong with me!

Is it because 'you should do it yourself'?  I would have received far more scathing comments and derisive looks had I tried to push my crippled car off the motorway on my own.

Is it because it is less tangible?  I work in IT, most of what I do is working with information and ideas rather than physical objects.  We have dozens of people we hire just to answer questions and help people with issues that you can't really put your hands on.  Rarely does anyone call feeling embarrassed, they accept that it isn't their specialty.

I don't know why people demonise mental health, but I think a part of it is that people don't understand it, they think it is something to just get over.  Sometimes, people can just get over it, just like I could have changed a tyre on my car, or taken paracetamol for a headache.  Sometimes though, it's bigger than that and you need a mechanic, or a doctor, or a 'shrink'.

Monday 15 December 2014

How good people turn failure into success

Quite a few years ago, I made a mistake.  This wasn't your average 'oops!' type of mistake.  I deleted a lot of data and rendered a server useless due to careless typing.

The difference between 'rm -rf /home/bob/dir' and 'rm -rf / home/bob/dir' appears subtle but it really isn't, that space makes the world of difference!

Petrified, I went to the administrator and explained what I had done.  I never got the impression he thought much of me, after all, next to him I knew nothing.  I knew I had messed up big time and I was sure my access was about to be removed and any thoughts of being a linux admin were down the drain.  Thoughts of all the nasty things coming my way raced through my head.

He smiled.  Literally, his first response was to smile.  Calm before the storm I feared.  He reassured me that such things happen and that there were backups.  He 'punished' me by making me help build a replacement, an opportunity I'm sure he knew I would have loved to have had anyway.

Now I'm a team lead, leading a team of six linux administrators in one of the countries larger IT providers.  Our team do great work that enables world changing work.  From time to time someone will make a mistake in the team, and I get the opportunity to smile and help people grow.

If I had never made that mistake, or if that mistake had been dealt with differently, I wouldn't be where I am now.  It's incredible the difference good people can make with just a little positivity.

I'm happy to say that the scary admin is now someone I consider a good friend, and an all-round great person.  When I left that team he gave me this gift, something I treasure to this day.


Thursday 5 September 2013

Maintaining a Debian/Ubuntu repository on Redhat (or other linuxes)

At work we have a repo server that runs Redhat.  I couldn't find a good way to maintain a Debian/Ubuntu repository on it, so I built a solution.

Basically I built a chroot environment that when run takes packages from the incoming folder and turns them into a repository that you can put on your webserver.

I'm sure there are more elegant solutions (though I couldn't find them), but this serves my purpose at least.

This script will create the chroot environment for you.  Run the script on a debian box, copy the tar ball to another server, untar it, put files in the incoming directory and run the included script.

Monday 11 March 2013

Fixing broken trust relationships in windows server

I was looking around for a reference to send to a colleague who had a server lose it's domain relationship and found this one which seems to work really well.

Basically, log in to the affected server and run:
netdom.exe resetpwd /s:<DC hostname> /ud:<domain\user> /pd:*

Thursday 3 January 2013

Over riding puppet modules

I've discovered that you can overload parts of puppet modules.  This means I can still use the module but just overload what I need.

Of course, modifying the module may be tidier but modifying a module used by lots of production servers is not a trivial undertaking.

Here's how it works:

class systems::section::authssh inherits auth::ssh {
   File['/etc/pam.d/sshd']{
      content=>"blah"
  }
}

This means I get all the good stuff from auth::ssh but I can override the sshd pam configuration for this server/group of servers.

The case I was dealing with was a bit more complicated (though same concept), in modules I have auth::thistype which includes auth::pam

I would normally include auth::thistype and just to complicate things the setting I want to change is in auth::pam.  Unfortunately (in this case) puppet won't let you modify an argument in a class that isn't the one setting it (or a sub class thereof) so I can't set it in the class as above, I need to set it in the correct class, like this:

class systems::section::auththistype inherits auth::thistype {
  include systems::section::authpam
}

class systems::section::authpam inherits auth::pam {
   File['/etc/pam.d/sshd']{
      content=>"blah"
  }
}

(Please note, code sections were genericised and should be used as reference only)