on code ..
Thinking back on taking programming programming classes in school, java and c++, I couldn’t have been more bored. I had no reason to care about flipping the order of characters or determining how long a string was. It all meant nothing to me. The tiny little details that at the end of a semester added up to .. nothing.
Then I found myself working with linux and learning about bash, and now .. I can actually do something with code. I can write cronjobs that execute when I need them to, I can write scripts that execute when the server starts up. I can ensure that services are running .. I could do real work.
I have appreciation for the people who enjoy the tiny details, but I could never stay interested enough to stay around to the point where I could do anything of personal value.
In the last couple of years I’ve been able to work with puppet and that’s been just great. With code, I can set up servers exactly how they need to be and if someone mucks around with them, the servers bounce back to their original settings. This is the kind of coding I enjoy, I can see results immediately and more importantly, I can see value immediately.
I am trying to go back and re-learn some things about code that I’ve long forgotten and have never used, but it’s work, and it’s not fulfilling work. It’s digging out parts of my brain that I’ve never used, it must be the former catholic part of me that thinks suffering is necessary.
reboot
With the home purchase and wedding planning going on, there’s been little time left for anything else. I’ve been doing my best to keep up with my reading projects and making sure I hit the gym 3x a week, but anything else has pretty much been ignored.
As things have settled down and with the year half-over, it’s time to reboot and replan. I have a hard time feeling like I’m making any progress without some structure. So this week has been spent with pile of books, a yellow legal pad and things.app. I have a pretty good idea of how the rest of the year should work out in terms of goals.
I’m also happy to get a big project started at work, something I’ve been working towards for the past few years. This will be a good opportunity to show off my ideas and prove that they work.
Goodbye to Porkpies
Testing some new guitar stuff, first take of ‘Goodbye Pork Pie Hat’ with the Valhalla Shimmer plugin.
Goodbye Pork Pie Hat
Audio clip: Adobe Flash Player (version 9 or above) is required to play this audio clip. Download the latest version here. You also need to have JavaScript enabled in your browser.
Home Theatre
Not much time this week, all my time was taken up by the great home-theatre rebuild. New TV (our first flatscreen) plus the blue-ray (PS3) player. It took awhile, but everything is talking nicely to each other. My entertainment world is now in HD and surround sound. The bad news is, even that couldn’t make Batman:Dark Knight a watchable film.
Installing Passenger with Puppet
Alongside our slow but steady move towards using Puppet for configuration management, our rails team has made the transition to Passenger (‘bye-bye mongrels’). Passenger has a fine installation mechanism for installation, but we wanted to be able to push out production-level machines and VMs with the most minimal level of manual intervention.
I found a decent bash script here that we modified to play well with puppet.
#!/bin/bash
#
# passenger_config.sh
export PASSENGER="2.2.5"
export MODDIR=/usr/lib/ruby/gems/1.8/gems/passenger-$PASSENGER/ext/apache2
export LOADER=/etc/httpd/mods-available/passenger.load
yes '' | /usr/bin/passenger-install-apache2-module
if [ -f $MODDIR/mod_passenger.so ] ; then
echo "LoadModule passenger_module $MODDIR/mod_passenger.so" > $LOADER
echo "PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-$PASSENGER" >> $LOADER
echo "PassengerRuby /usr/bin/ruby" >> $LOADER
ln -s $LOADER /etc/httpd/mods-enabled
else
echo I didn\'t create /etc/httpd/mods-available/passenger.load because there is no $MODDIR/mod_passenger.so.
fi
/etc/init.d/httpd configtest && /etc/init.d/httpd graceful
So our passenger_install class runs the above bash script and subscribes to a file named reconfig_passenger. This allows us to upgrade our passenger install by only touching the reconfig_passenger file on the puppetmaster. The puppet client detects there has been a modification to the file and re-runs the passenger_config script.
# class for installing passenger
class passenger_install {
file { "/usr/bin/passenger_config.sh":
source => "puppet://puppetmaster/files/passenger_config.sh",
owner => "root",
group => "root",
mode => "775"
}
package { "passenger":
ensure => "2.2.5",
provider => "gem"
}
file { "/etc/reconfig_passenger":
source => "puppet://puppetmaster/files/reconfig_passenger",
owner => "root",
group => "root",
mode => "664"
}
# only run config script if this file changes
exec { "/usr/bin/passenger_config.sh":
subscribe => file[ "/etc/reconfig_passenger" ],
refreshonly => true
}
}
We can now roll out production-level VMs in about 22 minutes with a combination of kickstart and puppet. There are a few manual issues existing that are due to our home-rolled python packages, but I’m rather happy with what we’ve been able to do. Even better, we start to get a layer of control over packages, permissions and all innumerable tasks that were done to bring a machine up to match our production stack.
WP munging
Spent the last three hours backing up/updating and general WordPress munging. The plugin that I was using for the photo section stopped working a few WP versions ago, so I updated to ‘NextGEN Gallery’ which seems more reliable.
Links to any previous stuff is probably borked, but all photos can be found under http://www.mjladd.com/photos/.
on Pixar
I’ve been reading about Pixar, the company. One of my favorite notes is how much of their history lies in failure. The main computer scientist started off working in a boring CAD company, Jon Lasseter was fired from Disney, the company itself was sold by Lucas to Jobs who then tried to sell of parts of it for years. Even when ‘Toy Story’ was set to be released, Mattel and Hasbro couldn’t be bothered to distribute toys (Disney’s primary concern?).
The script for Toy Story went through 10+ revisions and the final product is nothing like the original idea. They went through revision after revision to try to capture an effective and appealing story. Competitors such as Dreamworks rushed to compete and failed on both a technical and story level. I can’t think of another film company who have had such a consistent level of quality and box-office performance.
I remember seeing ‘Toy Story’ at the Dollar Cinema in Muncie and being stunned at what they were able to accomplish. I was studying music at the time and managed to get in touch with one of the sound designers at Pixar. It still remains a dream company to work for.
gpp-w4-ssc-1, mathematica, music
Day off from the gym, but Jen and I walked this morning. It was good to get up early and have a couple of hours to make some progress on a few projects before heading to work. I have a list on my desktop asking why am I not work on … mathmatica, music, ruby.
There has been a long, bitter and angry history with mathematics in my past but the first time I saw mathematica in college I thought it was fantastic. When the home edition became available this year I snagged it, but haven’t put much time into it. I’ve starting working through some of the tutorials. I really like the idea of using to plot some work issues such as capacity growth and bandwidth usage. I like the idea of forcing myself to break down the numbers and understand what we really need.
I also started getting some music projects happening. I have about half a CD finished and four more tracks in their alpha state. I have a pretty clear path on two of them and the other two are still amorphous. I want to finish the project in the next month and then take some time to focus on ‘big music idea’. Not that it’s very big, but I want to work on a piece with new sound design rather then just getting something up with stock sounds. In college I focused far more on sound design and miss that part of music.
short update: gpp and iscsi
Cardio day today. Non-lifting days leave me a little twitchy and anxious and exciting for the next day to hit the gym. This current program involves more cardio then I’ve done in a long time but it seems to be resulting in higher energy levels. I just feel guilty when I’m not lifting.
Had a good couple of days of week, particularly today when I had a nice stretch of uninterrupted time and was able to focus. Learned a bit more about iSCSI and made progress on a project that’s been on hold for too long. Tomorrow I need to do some performance testing on the storage array.
moving a load of files in unix
Here, because I always forget how to do this.
Ex. Moving 60,000+ files in unix.
find /src/directory/name/ -type -f -name '*' -exec mv {} /dst/directory/name/ . \;