<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Experiments in Life &#187; Ruby</title>
	<atom:link href="http://thecreekmores.org/category/ruby/feed/" rel="self" type="application/rss+xml" />
	<link>http://thecreekmores.org</link>
	<description>Learning is fun, right?</description>
	<lastBuildDate>Tue, 29 Nov 2011 15:11:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Weight Tracking &#8211; Part 2</title>
		<link>http://thecreekmores.org/2009/05/23/weight-tracking-part-2/</link>
		<comments>http://thecreekmores.org/2009/05/23/weight-tracking-part-2/#comments</comments>
		<pubDate>Sat, 23 May 2009 12:00:29 +0000</pubDate>
		<dc:creator>Jonathan Creekmore</dc:creator>
				<category><![CDATA[Inside the Engineer]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://thecreekmores.org/?p=462</guid>
		<description><![CDATA[So, in writing the previous post on my Weight Tracking spreadsheet, I came upon a bit of a conundrum. I wanted to export my graph as an image, but I could not figure out how to do that in Numbers. &#8230; <a href="http://thecreekmores.org/2009/05/23/weight-tracking-part-2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>So, in writing the previous post on my <a href="http://thecreekmores.org/2009/05/16/weight-tracking">Weight Tracking spreadsheet</a>, I came upon a bit of a conundrum. I wanted to export my graph as an image, but I could not figure out how to do that in Numbers. I am sure that there is a way to do so, but it was not immediately obvious, even with a brief Google search. So, being a good engineer, I decided to roll my own weight tracking script.</p>
<p>Writing my own script has several advantages. First, writing my own script gave me a simple project to begin learning <a href="http://www.ruby-lang.org/">Ruby</a>, something I have been wanting to do. Second, it allows me to extend the script with functionality that might be clumsy in a spreadsheet. Right now, I am just keeping track of the same information that I did in the spreadsheet, dates and weights, only I track it in a simple text file. The script calculates the sliding average for me. If needed, I can easily munge the data in other ways or pull together a secondary text file with other information like my workout routine. I know that I could do the same thing in a spreadsheet, but I like the flexibility that a full programming language gives me over the comparative restraint that I feel when I am hacking together formulas in a spreadsheet. Additionally, my data is kept in a simple text file instead of being tied to a Numbers spreadsheet. </p>
<p>Finally, and most importantly, I was easily able to pull in a library that allowed me to plot my weight and the sliding average of my weight over time and export it as an image file.<br />
<center><img src="http://thecreekmores.org/wordpress/wp-content/uploads/2009/05/weight-300x225.png" alt="Weight vs. Time"  width="300" height="225" class="size-medium wp-image-463" /></center><br />
There are two obvious improvements that I will likely implement. First, I am calculating the sliding window average of my weight as an integer. That is what causes the strange steps on the graph. I will probably change to calculating the average as a real number, just to make the graph a little smoother. Second, I think that I want to have more points on the X-axis of the graph. Looking at it, I think that the first of each month should be marked on the graph, possibly with lines of demarcation running in the Y-direction at each monthly border. I will have to play around with it and see what all I can do with the graphing library. That is the great thing about being a programmer; if the software you are using does not do what you want it to do, you can either fix it or write your own version.</p>
<img src="http://thecreekmores.org/wordpress/?ak_action=api_record_view&id=462&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://thecreekmores.org/2009/05/23/weight-tracking-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

