Software

15th May
2019
written by Chris

I love Terraform but, as we’re fond of saying at work, “it’s a loaded gun pointed at your production environment.” There are ways to minimize the risk but they boil down to writing a bunch of test automation around Terraform so as to be sure that it’s not doing something evil.

That’s a great idea, but no one much wants to pay for it. Toil budgets would be a great way to get buy in on this, but that’s another topic for another day.

This means that while I can easily spin up all kinds of expensive cloud resources just by running a Jenkins job, it’s easy to lose track of them and forget to spin them down. This then leads to an annoying hunt through a bunch of Jenkins console output panes trying to find environments with weird names like “trusting-manatee” and “polite-tick”

So, since I’m not allowed to have a script to clean up environments, I wrote one to find the jobs I need to promote in order to clean up environments. Hooray!

SEARCH_STRING = "lost-environment"  
Jenkins.instance.getAllItems(AbstractItem.class).each {
    if(it instanceof hudson.model.FreeStyleProject) { 
      for (build in it.builds) {
      	def log = build.log 
        if (log.contains(SEARCH_STRING)) {
    		println "${it.getFullName()}: ${build.id}"
        }
      }
    }
}

Is it fast? No. Is it elegant? No. Does it work? You bet.

25th February
2015
written by Chris

One of my goals in spinning up a software development team at Foxguard has been to have a development environment ready to go before the first person comes through the door.  That means a vague skeleton of the application we are developing as well as the apparatus of building, deploying, and testing that application.  Since anything worth doing is worth doing right we’re approaching the latter problem with a Continuous Deployment solution in mind.  That means that every time we commit code it is picked up by a automated script, built, tested, and published — ready to begin evaluation through some as-yet-to-be-determined test suite.

The first part of this is fairly easy.  Jenkins is a great tool and there is no shortage of tutorials out there on how to make it play nicely with GitHub, MSBuild, or any other technologies you might be using.

Deployment, though, is a bit of an more difficult nut to crack. (more…)

19th January
2014
written by Chris

Rotors with Alphabet Rings

Rotors with Alphabet Rings

One of the projects I have been working on with VirPack has been the establishment of a developer’s training program and central to that program has been Robert Martin’s materials on Clean Code.  While many of Martin’s ideas have sparked some interesting discussions at VirPack, none has been more controversial than his discussion of Test Driven Development.  Martin holds to a three-part cycle: Fail, Pass, Re-factor – in which you write just enough of a test to fail, just enough code to pass, and sometimes re-factor to clean up before cycling back to failure.  This results in a number of areas, particularly in Martin’s examples, where tests seem to be written merely to justify an action everyone agreed was necessary in the first place — say, a test to see if you can construct an object which is then run, and fails, because the object does not yet exist.

While I am pretty well sold on Martin’s coding philosophy I decided to take my coworkers objections under advisement but with a grain of salt.  Most of the Kata and examples that Martin works through are very simple; they have to be in order to be short enough and accessible enough to communicate the points he is trying to make about software development but that simplicity also means that the early fixed-costs of TDD seem very big compared to the actual “meat” of the problem he is trying to solve.

So I set out to try out true TDD on a project which I knew was going to be complicated.  Martin’s examples of things like a bowling score calculator had just a few plausible test cases and a mere handful of interesting results which could emerge from a complete examination of all possible execution paths.  I wanted something much bigger and much more complicated and the historian in me knew just where to look. (more…)

7th August
2013
written by Chris

Elliott Kember, has a post on his blog right now discussing an apparent “security vulnerability” in Chrome.  Security Vulnerability is in quotes there, not to mock Mr. Kember, but because the behavior Chrome exhibits is debateable as either vulnerability or feature.  First, let’s walk through the behavior.

If you’ve saved passwords into Chrome, navigate to chrome://settings/passwords and click on a row.  You’ll see a “show” button which, when clicked, displays your saved password. (more…)

10th May
2013
written by Chris

Inversion of Control (IOC) frameworks have become quite the rage as the software craftmanship movement has gathered steam. IOC makes it much easier to break complex multi-part programs into distict, and more importantly testable, components so that they can then be glued back together at run time. There are lots of nifty frameworks that can make this happen but at the moment I’m playing with Ninject.

Ninject is a very minimalistic IOC framework which focuses on what it calls a “fluent interface” that leverages the compiler and IDE rather than a huge XML file to map dependencies. Overall it’s very fast, very light weight, and very powerful. I’ve picked it up quickly and found it to meet almost all of my IOC needs.

Save one. And this is apparently a big problem for a lot of people. Ninject doesn’t like overloaded constructors. (more…)

14th November
2012
written by Chris

Everything did not turn out better than expected

The great thing about computers and the internet is that, almost no matter what it is that you do, someone else will figure out some clever way to do something novel with the fruits of your labor.  The folks over at If This Then That or IFTTTT have made a whole website that does little else, but that’s beside the point.

Indeed, the concept of the Rich Web — all those clever interactive widgets that you depend on to get through your day — is an appropriation of a technology that was never designed to do what it now does.  HTML is not and was not designed as a way to build applications but simply as a way to represent documents.  Were the HTML standard maintained simply as a method of document representation — in other words, were its features and functionality updated with only an eye for its original purpose — the resulting changes would destroy huge chunks of the public web.

Obviously, this would be bad. (more…)

15th October
2012
written by Chris

Dropbox, if you for some reason haven’t heard of them, provides cloud storage which syncs files between the various computers that you might own/operate.  I, for example, have a desktop, a laptop, and another desktop at work.  If I want a given file or directory to be available on all three I simply put it into my Dropbox folder and it magically syncs to the other systems.  It’s rather brilliant.

Signing up for Dropbox gets you 5GB of such synced storage to start with, which is pretty decent, but if you want more you can either pay them or participate in one of their seemingly innumerable little sign-up drives to get more space.  I never seem to qualify for those but recently was informed that they’ve started one for folks who sign up on University campuses.

I, as it turns out, still have access to an email address from my days at Radford, so I tossed that one through Dropbox’s entry form and, lo and behold, I got 3GB of additional space.  What’s more, Dropbox informed me that if I sent others to that page I would get an additional 500MB for everyone who signed up. (more…)

26th April
2010
written by Chris

I am not sure why anyone would want to write a blog post from their phone but if that sounds fun to you there’s apparently an Android app for that. (more…)

Comments Off on Mobile Experiments
25th April
2010
written by Chris

Image Credit: Guillermo (via flickr)

It is time for Nephandus to change… again.

I registered Nephandus.com when I was in college.  Since then it has been a flat HTML page, a Macromedia (now Adobe) Flash application, a custom PHP driven web-application, a PHP/Fusebox web application, and a Zend PHP web application.  In that time I’ve gone from being a student of History at the University of Virginia to a  software developer at VirPack in Blacksburg, VA with stops along the way at Radford University (it turns out no one will pay you to have just one degree in History), Fingertip Marketing, BearingPoint, Sitevision, and Coral Networks. (more…)

Comments Off on Hello world!
  • You are currently browsing the archives for the Software category.