I <3 Playbooks

In my previous post, I discussed learning linux.  Now I want to talk about one of the cool things I’ve done with it. One thing that sucks about getting a new computer is going through all the program installations and configuration you need to do to really make it yours.  Things like: installing your favorite browser, setting up your password manager, choosing a desktop background, etc.  This is especially true for developers, who have to manage multiple tool chains of applications in order to do their work.  Not to mention, we tend to be very picky about our text editors and IDEs.  I’ve also been in the abnormal situation over the last year where I have setup my ubuntu desktop environment on five different computers.  That’s a lot of setup.

And when I’m setting up my computer, there is almost always something I forget until I actually need it, and then I have to both set it up and use it.

There is a better way: automation.  I can write scripts that will do that for me, so when I get a new computer I need to setup, I can login, type a few commands, and then be good to go.   This is difficult to do in the Windows world, though project like boxstarter are making it better.  On UNIX’s like Linux, though, this type of thing is richly supported.  So last spring, I started working on automating my desktop setup using a technology called Ansible.  All the code is available on github.

Ansible is a pretty cool technology. It is a way of declaratively describing your computer. For example, normally if you are installing a piece of software, you get the installer and tell the installer to install the software on the computer.  With ansible, you simply declare that the software should be installed on the computer, and ansible makes it happen.  It will test to see if it’s already installed, and if so, does nothing.  If it’s not installed, ansible will install it.

It’s not perfect, because there are certain things that I haven’t automated yet.  These are mainly around security issues, like setting up my ssh key, pgp key, connecting up my password manager, and things like that.  I also haven’t focused on specifying how the computer should be setup outside of my little user (for the most part).  For example, I don’t do anything with partitioning or video card configuration.  I don’t think it would be useful to add those things due to all the boxes tending to have different hardware.

Here’s what it will do:cowsay

  • Installs all the software I use.
  • Copies my well known configuration for applications like my shell (oh-my-zsh), git, and various editors
  • Sets my desktop theme and background
  • Sets up LaTex
  • Sets up my creative workflow for some vector editing when needed
  • And most importantly: sets up cowsay

So when I need to setup my computer, I just need to type four commands to kick off the automation, and I’m pretty sure I can get it down to one command.  Then I just wait for it to complete, usually 10-15 minutes later, and my computer is ready to be productive.

Any time I find a new piece of software that’s very useful, I just update my playbook to include that software, and then re-run the playbook.  It installs the software, and I’m ready to go.  But even better, I have three ubuntu desktops I use almost daily.  I can use my automation to keep those things synchronized, so my tools are available across all of them.  This makes me very happy.

Learning Linux

I’ve had a long and weird relationship with Linux.  When I was in High School, you could buy various distributions of linux at Wal-Mart, mainly Mandrake and possibly a few others.  I would Every once in a while I would buy a distro and try loading it on my computer, but I could never really get it to work.  This was almost certainly due to the fact that I was running very cheap PC hardware and there probably weren’t drivers available.  When I got into college, I stumbled upon a distribution called ‘Lycoris‘ and around 2002 and 2003 I was very active in that community, but I still didn’t have a good understanding of Linux and what it was all about.

I was able to buy my first laptop a in late 2003, and I took the plunge deep, installing Gentoo, 595px-gentoo_linux_logo_matte-svgwhere you compile everything from source.  This was my first real peek at how linux really works.  But I struggled with it for a while, and the X server never really worked right on the laptop hardware, and soon I returned to windows.  In October 2004, apparently I installed Ubuntu, shortly after it’s first release, but I must not have ran it for very long.  In the years since, I have ran linux every once in a while.  I got very frustrated with the lack of hardware support, and so I made the switch to OS X in 2006 (“a unix that ‘just works'”) and then I got frustrated by the absurd prices of Mac hardware and discovered gaming, so I just ran windows.

Then about 9 months ago, I took the plunge again.  This time, I interact with Linux on a daily basis at work, and I figured it was time to really learn it this time.  So I installed the latest ubuntu on my home computers, and have been using it since then as my main operating system.  When I run into trouble, I’m forcing myself to really learn.  This time it’s been much easier, mainly due to resources like the ubuntu stack exchange site, working with very knowledgeable people at work, much improved hardware support, and just being emersed in it all the time.

One book that is really helped me is “How Linux Works: What Every Superuser Should Know.”  I’m still reading this book, but it’s been great for explaining the nitty gritty details of what is going on.  Like what does the sudo command actually do?  Well this book explains that.

The question that gets asked is Why?  Why do this?  Running Linux is definitely more work than running Windows or MacOS.  What do you get out of it?  For me, it’s about knowledge and understanding.  Windows and MacOS try their best to hide the complexity of the underlying components away from you, and if you try to peer underneath to see what’s really going on, it’s not really possible.  But on Linux, I can look.  I can have finer control over how the computer is running, and what it’s running, and why it’s running what it does.  It does come at a cost of more time, especially at the beginning, but that’s okay.  As I’ve grown more familiar with it, I can do what I need to do faster, so it doesn’t take as much time as it used to. Perhaps eventually it will not take that much time for me at all.

And in the mean time I’m having a blast learning more about how all this craziness actually works!

Five Principles and One Law

Taken from http://www.agileopennorthwest.org/.  I really like these as general principles.

The Five Principles

  • Whoever comes is the right people.
  • Whatever happens is the only thing that could have.
  • Whenever it starts is the right time.
  • Whenever it’s over, it’s over.
  • Wherever it happens is the right place.

The Law of Personal Mobility

If you find yourself where you can’t learn or contribute, move yourself to a place where you can.

Be Kind

Being kind isn’t the same as being nice. It isn’t about superficial praise. It doesn’t mean dulling your opinions. And it shouldn’t diminish the passion with which you present them.

Being kind is fundamentally about taking responsibility for your impact on the people around you. It requires you be mindful of their feelings and considerate of the way your presence affects them.

This article hits a little close to home.

“Passion Not Spent” by Caleb Madrigal

What’s my great fear?
I’ll tell you; come near…
To lay down in death
with so much left.

Passion not spent –
Oh cowardly regret!
For fear of others?
The thousand deaths.

I’m afraid to die
With no twinkle in my eye –
To pass meagerly by
Yet hidden inside.

To walk through life
Not truly alive,
And to pass in the night
With an unfelt “goodbye”.

Being Wrong

“A whole lot of us go through life assuming that we are basically right, basically all the time, about basically everything: about our political and intellectual convictions, our religious and moral beliefs, our assessment of other people, our memories, our grasp of facts. As absurd as it sounds when we stop to think about it, our steady state seems to be one of unconsciously assuming that we are very close to omniscient.”

– Kathryn Schulz in “Being Wrong“

Nine-tenths of our brain

It is a popular fact that nine-tenths of the brain is not used and, like most popular facts, it is wrong. Not even the most stupid Creator would go to the trouble of making the human head carry around several pounds of unnecessary gray goo if its only real purpose was, for example, to serve as a delicacy for certain remote tribesmen in unexplored valleys. Is is used. And one of its function is to make the miraculous seem ordinary and turn the unusual into the usual.

Because if this was not the case, then human beings, faced with the daily wondrousness of everything, would go around wearing big stupid grins, similar to those worn by certain remote tribesmen who occasionally get raided by the authorities and have the contents of their plast greenhouses very seriously inspected. They’d say “Wow!” a lot. And no one would do much work.

– Terry Pratchett in “Small Gods”

November Retrospective

November Sunset

I set out in November to write a blog post everyday. I hit that goal, and then I stopped posting anything for two weeks. To be fair, it’s been an incredibly busy couple of weeks, getting ready for the holidays, playing with the Oregon Tuba Ensemble (and participating in Tuba Christmas for the first time), getting my Christmas cards out, and going through a major software deploy at work. I’m hopeful that things will start to calm down a bit now.

The last day of November was a very clear day across the entire state, so I decided to head out to the ocean to catch the sunset. I love catching the sunset in Winter out here, because it’s so early – 4:45-ish. I spent a few hours on the coast, putting my new tripod through it’s paces. Having a tripod really makes a difference when taking photos.

When conducting a retrospective, it’s helpful to ask four questions: What went well, what could be better, what’s puzzling, and what ideas do you have. So let’s do it.

What went well?

I successfully posted every day. Because I posted a few at the end of October, my streak was a little longer than thirty days. This is the first time I’ve ever done that. I had a variety of posts, and some posts I put a lot of effort into, and others not so much.

What could be better?

Post quality was almost universally terrible. I’m almost scared to go back and read some of them, because I know they were horrible. I knew they were horrible at the time I wrote them. But I didn’t really care. I just wanted to get them out there. I wanted to skip my perfectionism by purposely avoiding thinking about it so much.  That was goal number one. Some days I threw up simple photos without any context. The video I posted making a card was extremely poor quality especially.

Sometimes I waited too long into the day before starting.

What’s puzzling?

I don’t know that there is anything really puzzling at the moment.  Perhaps related to technology – why does wordpress sometimes run out of memory on this machine.  But I’m keeping an eye on that.

What ideas do you have?

I think my next goal will be to maybe post less frequently, but ensure that post quality is much higher.  I should pick a topic and work on that post for several days, and then only post it when I feel like it’s ready.  But maybe I should also have a deadline, so my perfectionism doesn’t go too crazy.  I think it’s something I can experiment with a bit.

If You’re White and you have an opinion on Ferguson, Read This

I’ve been really disappointed by many of the reactions I’ve seen to the protests in Ferguson from friends and family members, especially those in Missouri. It’s especially disappointing when I see a claim that racism isn’t a problem, and the complete lack of self-awareness that comes with that statement. Racism is a huge problem all of the place, and Missouri is no different.

If you’re white, before you express some opinion on Ferguson, please read this: “An Open Letter to My Fellow White People About Your Reactions to the Ferguson Protests.”

At the very least, please read the first two lines:

Dear Fellow White People,

Please shut up.