Tyler's Blog

Year of Code – Week 1

January 9th, 2011

Week 1 is complete!

This week the program is a Nagios check command for monitoring Solar Weather.

The primary motivation for this week’s task was to reaquaint myself with Python.
I learned how to pull some data from a webpage which I’d never done with python before (do it all the time in perl, but this is about learning, right?).
As it turns out there wasn’t a good source of the solar flare data that I was looking for. I did however manage to find a site that provided status images of the current state (really looks like a site straight out of the mid 90s). So I used the content length from the http headers to compare the various images that could be sent. The benefit of doing it this way is that I think it’s probably even more data efficient than if I was scraping numerical data from a webpage (as had been my original intention).

You’re probably asking why anyone would want to monitor solar weather with Nagios!?
My motivation is because it’s ridiculous. Too often in the world of testing, I hear about testers too worried about testing far-flung testing scenarios than doing intelligent core functional testing.
When I say far-flung scenarios, I mean really ridiculous situations. Stuff like: “we should corrupt the database and see if the product works still!” or “we should test if having a sound card in the server causes log files to not be written to disk” (I’ve made these up to protect the guilty, but this is illustrative)
As a commentary on this testing methodology, I write this Nagios check command so someone can use it to be alerted in the event of Solar Weather events that _may_ be affecting the software product under test. Because if you aren’t testing for it, then clearly you should be worried about how Solar X-Rays may be affecting your product’s ability to read from a corrupted database or write to a log file.

Also, because Nagios is pretty awesome in it’s flexibility ;)

Code 2011 – Code of the Week

December 22nd, 2010

I’ve decided to challenge myself once again to another weekly project (previous I did a photo per week project). For the year of 2011 I will attempt to write code every week and post it to my Github.

These are the terms:
- Minimum of once per week I will check in something to Github.
- The complexity of my check-in will be highly variable but it must be a complete entity (I.e. At least functional in some regards, not necessarily tested in to oblivion).
- “Complete entity” is defined as either a new script/program or a new feature to something existing (technically I could contribute to an existing OSS project)

github… now with more of my stuff

December 11th, 2010

I have decided to start sharing some of the stuff that I write on Github.
Currently I tend to write a lot of small scripts for specific purposes, but if they can be useful to me than they may be useful to others as well.

Generally I see myself making the licensing on these to be very permissible for people to modify and make use of. Currently I’m liking the Creative Commons – Attribution Non-Commercial Share Alike license (cc by-nc-sa for short). Essentially: use it, enjoy it, change it, give me credit and don’t profit from it.

It would be a really great exercise if I were able to post up some new code on a regular basis. Maybe I’ll make a challenge for myself to do more fun coding.

Welcome to a fresh installment of me!

December 11th, 2010

It’s been quite some time since I’ve had a personal webpage doing something useful. Previous attempts involved hand-coded blogs to prove to myself that I could do it, but after creating those I came to realize that creating the page was what was interesting, maintaining it wasn’t. So this time I’ve decided to just use wordpress for no other reason than a lot of people seem to like it for blogging software.

I haven’t completely decided what I’ll use this space for, but definitely I’ll be using it for posting about my general interests in the areas of computing (posting links is boring, so I do promise that if I’m referencing other pages, it will be accompanied by my own colourful commentary), climbing, off-roadng, camping, and whatever.