Sunday, February 15, 2009

A slight Change in Dev Environs

Vista 64bit doesn't seem to like me at the moment as I am having issues installing software.

Fortunately, for the project and the timeline I have, I can easily switch to Linux as I am doing currently for the sole purpose of adding graphs.

Now this causes a problem in that I wanted to port this app using the Ruby2exe application, and while that application will create a Windows exe from within Linux - the problem is that the graphing was initially going to be done with Gruff and that requires ImageMagick to be installed in one form or another on the target system.

So, I'll have to root around for another graphing subsystem or perhaps use jRuby (which I would like to avoid at all costs because it's not portable in a way that is simple for the end user).

New Code
module StatTools
def sum(seq)
total = 0
seq.each do |line|
total += line

def mean(seq)
return sum(seq) / seq.size.to_f

def moving_average(seq, num)
total = []
pad = num - 1
1.upto(pad) do |line|
total << 0
num.upto(seq.size) do |line|
total << mean(seq.slice(line - num, num))


  1. Back to Windows Vista after examining the PATH on my system and discovering an error.

    Remember, when you change PATH from the command prompt - you'll need to change it from the GUI in Vista as changing it on command line seems to be only for that session.

  2. Oh yeah, second thing to remember is not to screw up the PATH.

    If you google 'Elevate Me' you'll find a nice app to unsnarl the PATH variable.