<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;DEMFRHs6fCp7ImA9WhVUGU8.&quot;"><id>tag:blogger.com,1999:blog-3207985</id><updated>2012-05-25T02:13:35.514-04:00</updated><category term="ruby" /><category term="solr" /><category term="jdbc" /><category term="javascript" /><category term="jboss seam" /><category term="ActiveRecord" /><category term="junit" /><category term="module_eval" /><category term="fedora" /><category term="accumulo" /><category term="parsing" /><category term="validator" /><category term="cfmx" /><category term="gnome" /><category term="Amazon EC2" /><category term="agile" /><category term="ubuntu dv9000 sound" /><category term="gem" /><category term="servlet" /><category term="judoscript" /><category term="scp" /><category term="eclipse" /><category term="ruby rails gem" /><category term="ruby rspec rails" /><category term="linux" /><category term="plsql" /><category term="xml" /><category term="ant" /><category term="java" /><category term="metaprograming" /><category term="stored procedure" /><category term="lucene" /><category term="jboss portal" /><category term="networking" /><category term="oracle" /><category term="gutenberg" /><category term="distributed proofreading" /><category term="terminal" /><category term="dynamic languages" /><category term="open cursors" /><category term="entity attribute value" /><category term="sql" /><category term="wireless" /><category term="timing study" /><category term="twitter" /><category term="locallucene" /><category term="localsolr" /><category term="ubuntu" /><category term="capistrano" /><category term="metadata" /><title>CodeBits - Tested Complex Code!</title><subtitle type="html">&lt;a href="http://www.codebits.com"&gt;Home&lt;/a&gt; - 
&lt;a href="http://www.linkedin.com/in/affyadvice"&gt;LinkedIn Profile&lt;/a&gt; - 
&lt;a href="mailto:david.medinets@gmail.com"&gt;Email&lt;/a&gt;</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://affy.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://affy.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>David Medinets</name><uri>https://profiles.google.com/106664903665226624029</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-W4xARhlFk4s/AAAAAAAAAAI/AAAAAAAAAWs/MGcJuVVaSBo/s512-c/photo.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>232</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/Codebits-TestedComplexCode" /><feedburner:info uri="codebits-testedcomplexcode" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;AkIER389fSp7ImA9WhVUEkg.&quot;"><id>tag:blogger.com,1999:blog-3207985.post-8959476583185408058</id><published>2012-04-21T22:28:00.000-04:00</published><updated>2012-05-17T08:41:46.165-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-05-17T08:41:46.165-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="accumulo" /><title>Implement Word Count in Accumulo</title><content type="html">It seems like the first map-reduce program that everyone tries is counting words. This first program reads a piece of text using the mapper to tokenize the text and outputs a "1" for each token. Then the reducer adds up the "1" values to produce the word counts. &lt;br /&gt;
&lt;br /&gt;
Accumulo provides the same functionality without needing to write a single line of code by using a SummingCombiner iterator. Below is a complete example.&lt;br /&gt;
&lt;br /&gt;
Actually this example is more powerful because the same code can be used to sum across any time dimension.&lt;br /&gt;
&lt;br /&gt;
This example shows how to sum across days. First start the accumulo shell.Then follow these steps:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&amp;gt; &lt;b&gt;createtable --no-default-iterators wordtrack&lt;/b&gt;
wordtrack&amp;gt; &lt;b&gt;setiter -t wordtrack -p 10 -scan -minc -majc -class org.apache.accumulo.core.iterators.user.SummingCombiner&lt;/b&gt;
SummingCombiner interprets Values as Longs and adds them together.  A variety of encodings (variable length, fixed length, or string) are available
----------&amp;gt; set SummingCombiner parameter all, set to true to apply Combiner to every column, otherwise leave blank. if true, columns option will be ignored.: &lt;b&gt;true&lt;/b&gt;
----------&amp;gt; set SummingCombiner parameter columns, &amp;lt;col fam&amp;gt;[:&amp;lt;col qual&amp;gt;]{,&amp;lt;col fam&amp;gt;[:&amp;lt;col qual&amp;gt;]} escape non-alphanum chars using %&amp;lt;hex&amp;gt;.: 
----------&amp;gt; set SummingCombiner parameter lossy, if true, failed decodes are ignored. Otherwise combiner will error on failed decodes (default false): &amp;lt;TRUE|FALSE&amp;gt;: 
----------&amp;gt; set SummingCombiner parameter type, &amp;lt;VARLEN|FIXEDLEN|STRING|fullClassName&amp;gt;: &lt;b&gt;STRING&lt;/b&gt;
&lt;/pre&gt;
&lt;br /&gt;
Insert records for a daily rollup. &lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;wordtrack&amp;gt; &lt;b&gt;insert "Robert" "2011.Nov.12" "" 1&lt;/b&gt;
wordtrack&amp;gt; &lt;b&gt;insert "Robert" "2011.Nov.12" "" 1&lt;/b&gt;
wordtrack&amp;gt; &lt;b&gt;insert "Parker" "2011.Nov.12" "" 1&lt;/b&gt;
wordtrack&amp;gt; &lt;b&gt;insert "Parker" "2011.Nov.12" "" 1&lt;/b&gt;
wordtrack&amp;gt; &lt;b&gt;insert "Parker" "2011.Nov.12" "" 1&lt;/b&gt;
wordtrack&amp;gt; &lt;b&gt;insert "Parker" "2011.Nov.23" "" 1&lt;/b&gt;
wordtrack&amp;gt; &lt;b&gt;scan&lt;/b&gt;
Parker 2011.Nov.12: []    3
Parker 2011.Nov.23: []    1
Robert 2011.Nov.12: []    2
&lt;/pre&gt;
&lt;br /&gt;
Get all counts for a given day:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;wordtrack&amp;gt; &lt;b&gt;scan -c 2011.Nov.12&lt;/b&gt;
Parker 2011.Nov.12: []    3
Robert 2011.Nov.12: []    2
&lt;/pre&gt;
&lt;br /&gt;
Let's talk about that "--no-default-iterators" parameter for a moment. Normally, Accumulo uses an iterator that only displays the one value (the value with the latest timestamp) based on the uniqueness of the key/column family/column qualifer combination. If you leave that iterator in place, your counters will get essentially reset to one each time a compaction is done.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3207985-8959476583185408058?l=affy.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/eXB1YkyhZkfih9Btb0hHxYr_SVU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/eXB1YkyhZkfih9Btb0hHxYr_SVU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/eXB1YkyhZkfih9Btb0hHxYr_SVU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/eXB1YkyhZkfih9Btb0hHxYr_SVU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Codebits-TestedComplexCode/~4/OpseDfgbfpM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://affy.blogspot.com/feeds/8959476583185408058/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3207985&amp;postID=8959476583185408058" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/8959476583185408058?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/8959476583185408058?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Codebits-TestedComplexCode/~3/OpseDfgbfpM/implement-word-count-in-accumulo.html" title="Implement Word Count in Accumulo" /><author><name>David Medinets</name><uri>https://profiles.google.com/106664903665226624029</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-W4xARhlFk4s/AAAAAAAAAAI/AAAAAAAAAWs/MGcJuVVaSBo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://affy.blogspot.com/2012/04/implement-word-count-in-accumulo.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkIGQX0-cCp7ImA9WhVUEkg.&quot;"><id>tag:blogger.com,1999:blog-3207985.post-2828584452363165131</id><published>2012-04-11T22:49:00.003-04:00</published><updated>2012-05-17T08:42:00.358-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-05-17T08:42:00.358-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="accumulo" /><title>Using Accumulo To Calculate Seven Day Rolling Average</title><content type="html">Without commenting on if this is a good idea, let me show how you can use Accumulo to store the seven values needed to perform a rolling average.

Log into the shell. Create the table. Then configure iterators to retain seven values instead of just the default single value. Finally insert some values.

&lt;br /&gt;
&lt;pre&gt;bin/accumulo shell -u root -p password
&amp;gt; createtable rolling
rolling&amp;gt; config -t rolling -s table.iterator.scan.vers.opt.maxVersions=7
rolling&amp;gt; config -t rolling -s table.iterator.minc.vers.opt.maxVersions=7
rolling&amp;gt; config -t rolling -s table.iterator.majc.vers.opt.maxVersions=7

rolling&amp;gt; insert 2012.02.20 "" "" 21
rolling&amp;gt; insert 2012.02.20 "" "" 22
rolling&amp;gt; insert 2012.02.20 "" "" 23
rolling&amp;gt; insert 2012.02.20 "" "" 24
rolling&amp;gt; insert 2012.02.20 "" "" 25
rolling&amp;gt; insert 2012.02.20 "" "" 26
rolling&amp;gt; insert 2012.02.20 "" "" 27
rolling&amp;gt; insert 2012.02.20 "" "" 28
rolling&amp;gt; insert 2012.02.20 "" "" 29
rolling&amp;gt; insert 2012.02.20 "" "" 30

rolling&amp;gt; insert 2012.02.21 "" "" 51
rolling&amp;gt; insert 2012.02.21 "" "" 52
rolling&amp;gt; insert 2012.02.21 "" "" 53
rolling&amp;gt; insert 2012.02.21 "" "" 54
rolling&amp;gt; insert 2012.02.21 "" "" 55
rolling&amp;gt; insert 2012.02.21 "" "" 56
rolling&amp;gt; insert 2012.02.21 "" "" 57
rolling&amp;gt; insert 2012.02.21 "" "" 58
rolling&amp;gt; insert 2012.02.21 "" "" 59
rolling&amp;gt; insert 2012.02.21 "" "" 60
&lt;/pre&gt;
You can use the 'scan' command to see all information in the table. Or you can use 'scan -b 2012.02.21 -e 2012.02.21' to see information about a single row id.

You can use Java program to calculate the rolling average:

&lt;br /&gt;
&lt;pre&gt;public class RollingAverageDriver {

 public static void main(String[] args) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, TableExistsException {
  String instanceName = "development";
  String zooKeepers = "localhost";
  String user = "root";
  byte[] pass = "password".getBytes();
  String tableName = "rolling";

  ZooKeeperInstance instance = new ZooKeeperInstance(instanceName, zooKeepers);
  Connector connector = instance.getConnector(user, pass);

  Scanner scanner = connector.createScanner(tableName, new Authorizations());

  RollingAverageCalculator raCalculator = new RollingAverageCalculator(scanner, 7);
  int rollingAverage = raCalculator.calculate("2012.02.21");

  System.out.println("7 Day Rolling Average: " + rollingAverage);
  

  System.out.println("END");
 }
}&lt;/pre&gt;
Of course, you'll also need the RollingAverageCalculator class:

&lt;br /&gt;
&lt;pre&gt;public class RollingAverageCalculator {

 Scanner scanner = null;
 int minNumberOfValues = 0;
 
 public RollingAverageCalculator(Scanner scanner, int minNumberOfValues) {
  super();
  this.scanner = scanner;
  this.minNumberOfValues = minNumberOfValues;
 }

 public int calculate(final String rowId) {
  scanner.setRange(new Range(rowId, rowId));

  int sum = 0;
  int count = 0;
  Iterator&amp;lt;Map.Entry&amp;lt;Key,Value&amp;gt;&amp;gt; iterator = scanner.iterator();
  while (iterator.hasNext()) {
   Map.Entry&amp;lt;Key,Value&amp;gt; entry = iterator.next();
   Value value = entry.getValue();
   String sValue = new String(value.get());
   sum += Integer.parseInt(sValue);
   count++;
  }
  return count &amp;lt; minNumberOfValues ? 0 : (sum / count);
 }
}&lt;/pre&gt;
It should be fairly straightforward to change the code to perform any kind of rolling average.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3207985-2828584452363165131?l=affy.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/OMboKBqAsfpKqkZRs_yAsqQGn3Q/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/OMboKBqAsfpKqkZRs_yAsqQGn3Q/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/OMboKBqAsfpKqkZRs_yAsqQGn3Q/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/OMboKBqAsfpKqkZRs_yAsqQGn3Q/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Codebits-TestedComplexCode/~4/Zj3Ud33haSg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://affy.blogspot.com/feeds/2828584452363165131/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3207985&amp;postID=2828584452363165131" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/2828584452363165131?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/2828584452363165131?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Codebits-TestedComplexCode/~3/Zj3Ud33haSg/using-accumulo-to-calculate-seven-day.html" title="Using Accumulo To Calculate Seven Day Rolling Average" /><author><name>David Medinets</name><uri>https://profiles.google.com/106664903665226624029</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-W4xARhlFk4s/AAAAAAAAAAI/AAAAAAAAAWs/MGcJuVVaSBo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://affy.blogspot.com/2012/04/using-accumulo-to-calculate-seven-day.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkIHRn0-cSp7ImA9WhVUEkg.&quot;"><id>tag:blogger.com,1999:blog-3207985.post-3015293474270804237</id><published>2012-04-11T21:06:00.002-04:00</published><updated>2012-05-17T08:42:17.359-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-05-17T08:42:17.359-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="accumulo" /><title>Reading A Row With Accumulo</title><content type="html">Just another example of reading information with Accumulo. This example needs the accumulo-core and hadoop-core jar files.

&lt;br /&gt;
&lt;pre&gt;import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;

import org.apache.accumulo.core.client.AccumuloException;
import org.apache.accumulo.core.client.AccumuloSecurityException;
import org.apache.accumulo.core.client.Connector;
import org.apache.accumulo.core.client.Scanner;
import org.apache.accumulo.core.client.TableExistsException;
import org.apache.accumulo.core.client.TableNotFoundException;
import org.apache.accumulo.core.client.ZooKeeperInstance;
import org.apache.accumulo.core.data.Key;
import org.apache.accumulo.core.data.Range;
import org.apache.accumulo.core.data.Value;
import org.apache.accumulo.core.security.Authorizations;
import org.apache.hadoop.io.Text;

public class Accumulo_Scan_A_Row_Driver {

 public static void main(String[] args) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, TableExistsException {
  String instanceName = "development";
  String zooKeepers = "localhost";
  String user = "root";
  byte[] pass = "password".getBytes();
  String tableName = "user";
  String rowId = "John";

  ZooKeeperInstance instance = new ZooKeeperInstance(instanceName, zooKeepers);
  Connector connector = instance.getConnector(user, pass);

  Scanner scan = connector.createScanner(tableName, new Authorizations());
  scan.setRange(new Range(rowId, rowId));

  Iterator&amp;lt;Map.Entry&amp;lt;Key,Value&amp;gt;&amp;gt; iterator = scan.iterator();
  while (iterator.hasNext()) {
   Map.Entry&amp;lt;Key,Value&amp;gt; entry = iterator.next();
   Key key = entry.getKey();
   Value value = entry.getValue();
   System.out.println(key + " ==&amp;gt; " + value);
  }
 }
}
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3207985-3015293474270804237?l=affy.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/NfOJnnpMPTH5jkMKnu9cJ51n0M0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/NfOJnnpMPTH5jkMKnu9cJ51n0M0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/NfOJnnpMPTH5jkMKnu9cJ51n0M0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/NfOJnnpMPTH5jkMKnu9cJ51n0M0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Codebits-TestedComplexCode/~4/8TDDxCYMujs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://affy.blogspot.com/feeds/3015293474270804237/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3207985&amp;postID=3015293474270804237" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/3015293474270804237?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/3015293474270804237?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Codebits-TestedComplexCode/~3/8TDDxCYMujs/reading-row-with-accumulo.html" title="Reading A Row With Accumulo" /><author><name>David Medinets</name><uri>https://profiles.google.com/106664903665226624029</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-W4xARhlFk4s/AAAAAAAAAAI/AAAAAAAAAWs/MGcJuVVaSBo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://affy.blogspot.com/2012/04/reading-row-with-accumulo.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0MCRXg6eip7ImA9WhRWFE4.&quot;"><id>tag:blogger.com,1999:blog-3207985.post-7329994048542008154</id><published>2012-01-01T11:28:00.001-05:00</published><updated>2012-01-01T11:31:04.612-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-01T11:31:04.612-05:00</app:edited><title>Thinkering - A new meme for 2012</title><content type="html">&lt;a href="http://wp.patheos.com.s3.amazonaws.com/blogs/friendlyatheist/files/2011/12/Thinkering.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 920px; height: 1632px;" src="http://wp.patheos.com.s3.amazonaws.com/blogs/friendlyatheist/files/2011/12/Thinkering.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3207985-7329994048542008154?l=affy.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/8BGSwuPdsWD7O7Bezq1kyUP5y7o/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/8BGSwuPdsWD7O7Bezq1kyUP5y7o/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/8BGSwuPdsWD7O7Bezq1kyUP5y7o/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/8BGSwuPdsWD7O7Bezq1kyUP5y7o/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Codebits-TestedComplexCode/~4/ZZTFB72ZRpU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://affy.blogspot.com/feeds/7329994048542008154/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3207985&amp;postID=7329994048542008154" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/7329994048542008154?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/7329994048542008154?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Codebits-TestedComplexCode/~3/ZZTFB72ZRpU/thinkering-new-meme-for-2012.html" title="Thinkering - A new meme for 2012" /><author><name>David Medinets</name><uri>https://profiles.google.com/106664903665226624029</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-W4xARhlFk4s/AAAAAAAAAAI/AAAAAAAAAWs/MGcJuVVaSBo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://affy.blogspot.com/2012/01/thinkering-new-meme-for-2012.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DU8CRX8-fCp7ImA9WhRXFUs.&quot;"><id>tag:blogger.com,1999:blog-3207985.post-132106014798114476</id><published>2011-12-22T10:30:00.000-05:00</published><updated>2011-12-22T10:31:04.154-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-12-22T10:31:04.154-05:00</app:edited><title>Computing Power Like Water</title><content type="html">Many SF stories are predicated on the idea that computing power is
available like water. Simply make a request and a swarm (or cloud) of
computers assemble as needed in order to answer your question. Web
searches are great but they rely on pre-computed information and
actually answer very limited questions and in very narrow ways.

The Apache Whirr project allows the technically-savvy person to link
tens of computers together for very little money. Each computer hour
costs less than 5 cents. And when I say technically-savvy, the
learning curve is quite gentle. A few keyboard commands gets them
going without any need to understand the real complexity behind the
scenes.

This is an important step because people can focus on problem solving
instead of plumbing. Imagine if every science project in the world
could shave six months off their start-up time because they can get a
computer network running inside of a day. No more need for expensive,
hard-to-find computer network administrators. And if you've got the
network topology wrong just tear it down and restart with just one day
downtime and zero hardware replacement cost.

If you thought that science was already moving too fast, you'll be
shocked by the next ten years.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3207985-132106014798114476?l=affy.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/eANrRcyAuHWyWiJDGkR33DWwmms/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/eANrRcyAuHWyWiJDGkR33DWwmms/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/eANrRcyAuHWyWiJDGkR33DWwmms/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/eANrRcyAuHWyWiJDGkR33DWwmms/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Codebits-TestedComplexCode/~4/zIM-Xtcu8Mw" height="1" width="1"/&gt;</content><link rel="related" href="http://whirr.apache.org/docs/0.7.0/whirr-in-5-minutes.html" title="Computing Power Like Water" /><link rel="replies" type="application/atom+xml" href="http://affy.blogspot.com/feeds/132106014798114476/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3207985&amp;postID=132106014798114476" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/132106014798114476?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/132106014798114476?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Codebits-TestedComplexCode/~3/zIM-Xtcu8Mw/computing-power-like-water.html" title="Computing Power Like Water" /><author><name>David Medinets</name><uri>https://profiles.google.com/106664903665226624029</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-W4xARhlFk4s/AAAAAAAAAAI/AAAAAAAAAWs/MGcJuVVaSBo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://affy.blogspot.com/2011/12/computing-power-like-water.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C08HQHgzfSp7ImA9WhZbE0w.&quot;"><id>tag:blogger.com,1999:blog-3207985.post-1371802584612695543</id><published>2011-06-17T07:54:00.002-04:00</published><updated>2011-06-17T07:57:11.685-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-06-17T07:57:11.685-04:00</app:edited><title>Detecting Unsorted Spring Beans</title><content type="html">I like my Spring Beans definition files to be sorted. So I wrote the following code. Eventually I might turn it into a JUnit test for my continuous integration server.
&lt;pre&gt;
package play;

import java.io.IOException;
import java.util.ListIterator;

import org.jdom.Attribute;
import org.jdom.Document;
import org.jdom.Element;
import org.jdom.JDOMException;
import org.jdom.input.SAXBuilder;

public class UnsortedSpringBeans {

 public static void checkSortOrder(final String filename) throws JDOMException, IOException {
        System.out.println(filename);
        System.out.println("-------------------------------------------------");                  
        String lastBean = null;
        SAXBuilder parser = new SAXBuilder();
        Document doc = parser.build(filename);
        Element root = doc.getRootElement();
        @SuppressWarnings("unchecked")
  ListIterator&lt;Element&gt; children = root.getChildren().listIterator();
        while (children.hasNext()) {
          Element child = children.next();
          Attribute id = child.getAttribute("id");
          if (id == null) {
              System.out.println("Skipping    : " + child.getName());                  
           continue;
          }
          if (lastBean != null) {
              int cmpValue = id.getValue().compareTo(lastBean);
              if (cmpValue &lt; 0) {
                  System.out.println("Out Of Order: " + id.getValue());                  
              } else {
                  System.out.println("              " + id.getValue());                  
              }
          } else {
              System.out.println("              " + id.getValue());                  
          }
          lastBean = id.getValue();
        }
        System.out.println("");
    }
    
    /**
     * @param args
     * @throws IOException 
     * @throws JDOMException 
     */
    public static void main(String[] args) throws JDOMException, IOException {
        checkSortOrder("config/bean-definition.xml");
        checkSortOrder("config/database-beans.xml");
        checkSortOrder("config/hypersonicContext.xml");
        checkSortOrder("config/url-processor-beans.xml");
    }

}
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3207985-1371802584612695543?l=affy.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/pkMlVoVG-KYw6wLe9uesP5-2LWI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/pkMlVoVG-KYw6wLe9uesP5-2LWI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/pkMlVoVG-KYw6wLe9uesP5-2LWI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/pkMlVoVG-KYw6wLe9uesP5-2LWI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Codebits-TestedComplexCode/~4/DjLRmmTbk8E" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://affy.blogspot.com/feeds/1371802584612695543/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3207985&amp;postID=1371802584612695543" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/1371802584612695543?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/1371802584612695543?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Codebits-TestedComplexCode/~3/DjLRmmTbk8E/detecting-unsorted-spring-beans.html" title="Detecting Unsorted Spring Beans" /><author><name>David Medinets</name><uri>https://profiles.google.com/106664903665226624029</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-W4xARhlFk4s/AAAAAAAAAAI/AAAAAAAAAWs/MGcJuVVaSBo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://affy.blogspot.com/2011/06/detecting-unsorted-spring-beans.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CU8GR3o-cSp7ImA9WhZVEU8.&quot;"><id>tag:blogger.com,1999:blog-3207985.post-2726152944153462088</id><published>2011-05-23T00:10:00.001-04:00</published><updated>2011-05-23T00:10:26.459-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-23T00:10:26.459-04:00</app:edited><title>Free-style Paper Roller-coaster at ReverseSpace.</title><content type="html">&lt;div class='posterous_autopost'&gt;&lt;p&gt;&lt;div class='p_embed p_image_embed'&gt; &lt;a href="http://posterous.com/getfile/files.posterous.com/temp-2011-05-22/HEDIdBmwraxzAcowvuxvbxBgxjrfkhcDdxzedecBHmCFfFlgiEgfBeCqBbJB/IMG_0218.JPG.scaled1000.jpg"&gt;&lt;img alt="Img_0218" height="667" src="http://posterous.com/getfile/files.posterous.com/temp-2011-05-22/HEDIdBmwraxzAcowvuxvbxBgxjrfkhcDdxzedecBHmCFfFlgiEgfBeCqBbJB/IMG_0218.JPG.scaled500.jpg" width="500" /&gt;&lt;/a&gt; &lt;a href="http://posterous.com/getfile/files.posterous.com/temp-2011-05-22/olhhpkFpbzshBxydxhunwcnesJotdelyjrteyacoeyFbbwvswEpgxrJImjBz/IMG_0219.JPG.scaled1000.jpg"&gt;&lt;img alt="Img_0219" height="667" src="http://posterous.com/getfile/files.posterous.com/temp-2011-05-22/olhhpkFpbzshBxydxhunwcnesJotdelyjrteyacoeyFbbwvswEpgxrJImjBz/IMG_0219.JPG.scaled500.jpg" width="500" /&gt;&lt;/a&gt; &lt;a href="http://posterous.com/getfile/files.posterous.com/temp-2011-05-22/ACfHAmHjhgtapCpmCmAtzEEnaqhlBbBxkuqqAqAytbedDxAEaroDCdfkznkt/IMG_0236.JPG.scaled1000.jpg"&gt;&lt;img alt="Img_0236" height="667" src="http://posterous.com/getfile/files.posterous.com/temp-2011-05-22/ACfHAmHjhgtapCpmCmAtzEEnaqhlBbBxkuqqAqAytbedDxAEaroDCdfkznkt/IMG_0236.JPG.scaled500.jpg" width="500" /&gt;&lt;/a&gt; &lt;a href="http://posterous.com/getfile/files.posterous.com/temp-2011-05-22/BFCwbaopwBErceuwEixGqnxhwqBeJGlBibJEnnydxBjgCfutbCCbiIipuGaI/IMG_0237.JPG.scaled1000.jpg"&gt;&lt;img alt="Img_0237" height="667" src="http://posterous.com/getfile/files.posterous.com/temp-2011-05-22/BFCwbaopwBErceuwEixGqnxhwqBeJGlBibJEnnydxBjgCfutbCCbiIipuGaI/IMG_0237.JPG.scaled500.jpg" width="500" /&gt;&lt;/a&gt; &lt;div class='p_see_full_gallery'&gt;&lt;a href="http://dmedinets.posterous.com/free-style-paper-roller-coaster-at-reversespa"&gt;See the full gallery on Posterous&lt;/a&gt;&lt;/div&gt; &lt;/div&gt; &lt;/p&gt;  &lt;p&gt;Six kids had a great time.&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3207985-2726152944153462088?l=affy.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/YRC2tqW77--BFN-EwaVtPvJ0vOs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/YRC2tqW77--BFN-EwaVtPvJ0vOs/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/YRC2tqW77--BFN-EwaVtPvJ0vOs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/YRC2tqW77--BFN-EwaVtPvJ0vOs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Codebits-TestedComplexCode/~4/3ajowhk1fdo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://affy.blogspot.com/feeds/2726152944153462088/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3207985&amp;postID=2726152944153462088" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/2726152944153462088?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/2726152944153462088?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Codebits-TestedComplexCode/~3/3ajowhk1fdo/free-style-paper-roller-coaster-at.html" title="Free-style Paper Roller-coaster at ReverseSpace." /><author><name>David Medinets</name><uri>https://profiles.google.com/106664903665226624029</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-W4xARhlFk4s/AAAAAAAAAAI/AAAAAAAAAWs/MGcJuVVaSBo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://affy.blogspot.com/2011/05/free-style-paper-roller-coaster-at.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0YNQXo5fSp7ImA9WhZTGUs.&quot;"><id>tag:blogger.com,1999:blog-3207985.post-4162130203762126013</id><published>2011-03-24T07:12:00.000-04:00</published><updated>2011-03-24T07:13:10.425-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-24T07:13:10.425-04:00</app:edited><title>Human Logic Gates</title><content type="html">Each data person gets candy Each logic person gets instruction. Then logic guys process the data guys. Good for Kids?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3207985-4162130203762126013?l=affy.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/xDFmmmxZYDHbQN7CyflKmadV4G0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/xDFmmmxZYDHbQN7CyflKmadV4G0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/xDFmmmxZYDHbQN7CyflKmadV4G0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/xDFmmmxZYDHbQN7CyflKmadV4G0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Codebits-TestedComplexCode/~4/_zNcHYh0lTY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://affy.blogspot.com/feeds/4162130203762126013/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3207985&amp;postID=4162130203762126013" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/4162130203762126013?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/4162130203762126013?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Codebits-TestedComplexCode/~3/_zNcHYh0lTY/human-logic-gates.html" title="Human Logic Gates" /><author><name>David Medinets</name><uri>https://profiles.google.com/106664903665226624029</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-W4xARhlFk4s/AAAAAAAAAAI/AAAAAAAAAWs/MGcJuVVaSBo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://affy.blogspot.com/2011/03/human-logic-gates.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Dk8ESHc-eSp7ImA9WhZTEUk.&quot;"><id>tag:blogger.com,1999:blog-3207985.post-7351867777742561586</id><published>2011-03-14T19:20:00.000-04:00</published><updated>2011-03-14T19:20:09.951-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-14T19:20:09.951-04:00</app:edited><title>Handmade Hat for Odyessy of the Mind</title><content type="html">&lt;a href="http://2.bp.blogspot.com/-y208hrMaSj4/TX6iqXrUzgI/AAAAAAAAAQ4/T93Nyq4AWHs/s1600/IMG_0115-1.JPG"&gt;&lt;img style="MARGIN: 0px 10px 10px 0px; FLOAT: left; CLEAR: both" border="0" alt="" src="http://2.bp.blogspot.com/-y208hrMaSj4/TX6iqXrUzgI/AAAAAAAAAQ4/T93Nyq4AWHs/s320/IMG_0115-1.JPG" /&gt;&lt;/a&gt;  I was a style judge this year. Loads of fun!&lt;div style='clear:both; text-align:LEFT'&gt;&lt;a href='http://picasa.google.com/blogger/' target='ext'&gt;&lt;img src='http://photos1.blogger.com/pbp.gif' alt='Posted by Picasa' style='border: 0px none ; padding: 0px; background: transparent none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;' align='middle' border='0' /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3207985-7351867777742561586?l=affy.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/WF7CbuYHS0H9NNliIJo3ljMgjmg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/WF7CbuYHS0H9NNliIJo3ljMgjmg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/WF7CbuYHS0H9NNliIJo3ljMgjmg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/WF7CbuYHS0H9NNliIJo3ljMgjmg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Codebits-TestedComplexCode/~4/oz5aTLkOT8g" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://affy.blogspot.com/feeds/7351867777742561586/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3207985&amp;postID=7351867777742561586" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/7351867777742561586?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/7351867777742561586?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Codebits-TestedComplexCode/~3/oz5aTLkOT8g/handmade-hat-for-odyessy-of-mind.html" title="Handmade Hat for Odyessy of the Mind" /><author><name>David Medinets</name><uri>https://profiles.google.com/106664903665226624029</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-W4xARhlFk4s/AAAAAAAAAAI/AAAAAAAAAWs/MGcJuVVaSBo/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-y208hrMaSj4/TX6iqXrUzgI/AAAAAAAAAQ4/T93Nyq4AWHs/s72-c/IMG_0115-1.JPG" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://affy.blogspot.com/2011/03/handmade-hat-for-odyessy-of-mind.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkQDQnw7fCp7ImA9Wx9WGU8.&quot;"><id>tag:blogger.com,1999:blog-3207985.post-3971866156973438655</id><published>2011-01-24T21:56:00.002-05:00</published><updated>2011-01-24T21:59:33.204-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-01-24T21:59:33.204-05:00</app:edited><title>Running CEPH on 32bit Ubuntu kernal</title><content type="html">DON'T DO IT! I spent several hours setting up three virtual servers - one master and two nodes - to run ceph. When it finally came time to run the cfuse command, I saw this message:

&lt;span style="font-weight: bold;"&gt;WARNING: Ceph inode numbers are 64 bits wide, and FUSE on 32-but kernals does not cope well with that situation. Expect to crash shortly.&lt;/span&gt;

Sigh.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3207985-3971866156973438655?l=affy.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/mQycWQK-ckz8hlcYt5aKr_aoSZw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/mQycWQK-ckz8hlcYt5aKr_aoSZw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/mQycWQK-ckz8hlcYt5aKr_aoSZw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/mQycWQK-ckz8hlcYt5aKr_aoSZw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Codebits-TestedComplexCode/~4/JEhRzb_Rox8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://affy.blogspot.com/feeds/3971866156973438655/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3207985&amp;postID=3971866156973438655" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/3971866156973438655?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/3971866156973438655?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Codebits-TestedComplexCode/~3/JEhRzb_Rox8/running-ceph-on-32bit-ubuntu-kernal.html" title="Running CEPH on 32bit Ubuntu kernal" /><author><name>David Medinets</name><uri>https://profiles.google.com/106664903665226624029</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-W4xARhlFk4s/AAAAAAAAAAI/AAAAAAAAAWs/MGcJuVVaSBo/s512-c/photo.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://affy.blogspot.com/2011/01/running-ceph-on-32bit-ubuntu-kernal.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUMFQnc8cCp7ImA9Wx5XGE8.&quot;"><id>tag:blogger.com,1999:blog-3207985.post-7388185600027440342</id><published>2010-09-18T12:28:00.001-04:00</published><updated>2010-09-18T12:30:13.978-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-09-18T12:30:13.978-04:00</app:edited><title>Active Relation Explained</title><content type="html">Action Relation is an implementation of map-reduce. The predicate map the data. And the operations reduce it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3207985-7388185600027440342?l=affy.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/F73wqMyfBYghXLjwHtlvYsT-D0o/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/F73wqMyfBYghXLjwHtlvYsT-D0o/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/F73wqMyfBYghXLjwHtlvYsT-D0o/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/F73wqMyfBYghXLjwHtlvYsT-D0o/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Codebits-TestedComplexCode/~4/y_mRZVjfNcE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://affy.blogspot.com/feeds/7388185600027440342/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3207985&amp;postID=7388185600027440342" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/7388185600027440342?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/7388185600027440342?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Codebits-TestedComplexCode/~3/y_mRZVjfNcE/active-relation-explained.html" title="Active Relation Explained" /><author><name>David Medinets</name><uri>https://profiles.google.com/106664903665226624029</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-W4xARhlFk4s/AAAAAAAAAAI/AAAAAAAAAWs/MGcJuVVaSBo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://affy.blogspot.com/2010/09/active-relation-explained.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEcMRHk9fSp7ImA9Wx5XFks.&quot;"><id>tag:blogger.com,1999:blog-3207985.post-5801949958383605923</id><published>2010-09-16T14:33:00.001-04:00</published><updated>2010-09-16T14:34:45.765-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-09-16T14:34:45.765-04:00</app:edited><title>Tracking RSPEC Test Execution So Debugging Statements Are Segmented</title><content type="html">&lt;p&gt;Throw the following into an initializer:&lt;/p&gt;

&lt;pre&gt;module Spec
  module Example
    module ExampleMethods
      def execute_with_print_logging(run_options, instance_variables)
        p "RSPEC TRACE: #{description} =&gt; #{@_proxy.location}"
        execute_without_print_logging(run_options, instance_variables)
      end
      alias_method_chain :execute, :print_logging
    end
 end
end&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3207985-5801949958383605923?l=affy.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/K-0sHmXgpaLqU-l8aLV5ZtDsodw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/K-0sHmXgpaLqU-l8aLV5ZtDsodw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/K-0sHmXgpaLqU-l8aLV5ZtDsodw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/K-0sHmXgpaLqU-l8aLV5ZtDsodw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Codebits-TestedComplexCode/~4/W8mclyju8X8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://affy.blogspot.com/feeds/5801949958383605923/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3207985&amp;postID=5801949958383605923" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/5801949958383605923?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/5801949958383605923?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Codebits-TestedComplexCode/~3/W8mclyju8X8/tracking-rspec-test-execution-so.html" title="Tracking RSPEC Test Execution So Debugging Statements Are Segmented" /><author><name>David Medinets</name><uri>https://profiles.google.com/106664903665226624029</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-W4xARhlFk4s/AAAAAAAAAAI/AAAAAAAAAWs/MGcJuVVaSBo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://affy.blogspot.com/2010/09/tracking-rspec-test-execution-so.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkIEQXYzeSp7ImA9Wx5XFks.&quot;"><id>tag:blogger.com,1999:blog-3207985.post-1480500653562494349</id><published>2010-09-16T14:05:00.002-04:00</published><updated>2010-09-16T14:08:20.881-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-09-16T14:08:20.881-04:00</app:edited><title>How Do I Expose the Current RSPEC File and Description</title><content type="html">&lt;p&gt;My goal with this monkey patch was to expose the rspec filename and description as global variables so that my exception handling code can know which rspec test caused the exception.&lt;/p&gt;

&lt;pre&gt;module Spec
  module Example
    module ExampleMethods
      alias :old_execute execute
      def execute(run_options, instance_variables)
        $rspec_location = @_proxy.location
        $rspec_description = description
        old_execute(run_options, instance_variables)
      end
    end
 end
end&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3207985-1480500653562494349?l=affy.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/elBBDL9KYyC7oa0MB_PgvdOw5ek/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/elBBDL9KYyC7oa0MB_PgvdOw5ek/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/elBBDL9KYyC7oa0MB_PgvdOw5ek/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/elBBDL9KYyC7oa0MB_PgvdOw5ek/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Codebits-TestedComplexCode/~4/rjCNj7I00Fc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://affy.blogspot.com/feeds/1480500653562494349/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3207985&amp;postID=1480500653562494349" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/1480500653562494349?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/1480500653562494349?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Codebits-TestedComplexCode/~3/rjCNj7I00Fc/how-do-i-expose-current-rspec-file-and.html" title="How Do I Expose the Current RSPEC File and Description" /><author><name>David Medinets</name><uri>https://profiles.google.com/106664903665226624029</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-W4xARhlFk4s/AAAAAAAAAAI/AAAAAAAAAWs/MGcJuVVaSBo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://affy.blogspot.com/2010/09/how-do-i-expose-current-rspec-file-and.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkQDR306fyp7ImA9Wx5XE04.&quot;"><id>tag:blogger.com,1999:blog-3207985.post-2765067919685520819</id><published>2010-09-12T18:16:00.002-04:00</published><updated>2010-09-12T18:26:16.317-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-09-12T18:26:16.317-04:00</app:edited><title>Compiling and Running Hadoop WordCount Example in NetBeans</title><content type="html">&lt;p&gt;In order to compile and run the Hadoop WordCount example in NetBeans, I followed these steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create a new Java project called hadoop.&lt;/li&gt;
&lt;li&gt;Copy the src/examples/org/apache/hadoop/WordCount.java to src/hadoop.&lt;/li&gt;
&lt;li&gt;Select Run&gt;Set Project Configuration&gt;Customize and change the Main class entry to hadoop.WordCount. Also set the arguments entry to 'input output".&lt;/li&gt;
&lt;li&gt;Add the following jar files as libraries: hadoop-0.20.2-core.jar, commons-cli-1.2.jar, commons-logging-1.0.4.jar, commons-httpclient-3.0.1.jar&lt;/li&gt;
&lt;li&gt;Add the following method to the WordCount class:
&lt;pre&gt;static public boolean deleteDirectory(File path) {
        if (path.exists()) {
            File[] files = path.listFiles();
            for (int i = 0; i &lt; files.length; i++) {
                if (files[i].isDirectory()) {
                    deleteDirectory(files[i]);
                } else {
                    files[i].delete();
                }
            }
        }
        return (path.delete());
    }&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;Add the following lines of code just before the "new Job" line:
&lt;pre&gt;  // delete the output directory.
   WordCount.deleteDirectory(new File(otherArgs[1]));&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;Create the input directory.&lt;/li&gt;
&lt;li&gt;Copy a text file into the input directory.&lt;/li&gt;
&lt;li&gt;Press F6 to run the program.&lt;/li&gt;
&lt;li&gt;Read the files in the output directory.&lt;/li&gt;
&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3207985-2765067919685520819?l=affy.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/JNT4UE8pwbv3JgniyeJiY0Tv9h4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/JNT4UE8pwbv3JgniyeJiY0Tv9h4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/JNT4UE8pwbv3JgniyeJiY0Tv9h4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/JNT4UE8pwbv3JgniyeJiY0Tv9h4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Codebits-TestedComplexCode/~4/c_gPw5caS4s" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://affy.blogspot.com/feeds/2765067919685520819/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3207985&amp;postID=2765067919685520819" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/2765067919685520819?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/2765067919685520819?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Codebits-TestedComplexCode/~3/c_gPw5caS4s/compiling-and-running-hadoop-wordcount.html" title="Compiling and Running Hadoop WordCount Example in NetBeans" /><author><name>David Medinets</name><uri>https://profiles.google.com/106664903665226624029</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-W4xARhlFk4s/AAAAAAAAAAI/AAAAAAAAAWs/MGcJuVVaSBo/s512-c/photo.jpg" /></author><thr:total>3</thr:total><feedburner:origLink>http://affy.blogspot.com/2010/09/compiling-and-running-hadoop-wordcount.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0YDRnkycSp7ImA9Wx5SFks.&quot;"><id>tag:blogger.com,1999:blog-3207985.post-3170730350169444268</id><published>2010-08-12T23:09:00.003-04:00</published><updated>2010-08-12T23:12:57.799-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-08-12T23:12:57.799-04:00</app:edited><title>MonoDevelop Rocks!</title><content type="html">&lt;a href="http://monodevelop.com/"&gt;MonoDevelop&lt;/a&gt; - I am doing pro-bono work for a local non-profit (&lt;a href="http://hopeandahome.org/"&gt;Hope and a Home&lt;/a&gt;) that has a GoDaddy Windows-based account. I, of course, only have Ubuntu running at home. A short web search found MonoDevelop. Ten minutes later, I had written by first ASP application. Easy to install and easy to use - highly recommended!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3207985-3170730350169444268?l=affy.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Rgo2aNoGwJ9ek4DkEjWGw4idzE8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Rgo2aNoGwJ9ek4DkEjWGw4idzE8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Rgo2aNoGwJ9ek4DkEjWGw4idzE8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Rgo2aNoGwJ9ek4DkEjWGw4idzE8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Codebits-TestedComplexCode/~4/9Yx8uCefkmY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://affy.blogspot.com/feeds/3170730350169444268/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3207985&amp;postID=3170730350169444268" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/3170730350169444268?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/3170730350169444268?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Codebits-TestedComplexCode/~3/9Yx8uCefkmY/plug-for-monodevelop.html" title="MonoDevelop Rocks!" /><author><name>David Medinets</name><uri>https://profiles.google.com/106664903665226624029</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-W4xARhlFk4s/AAAAAAAAAAI/AAAAAAAAAWs/MGcJuVVaSBo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://affy.blogspot.com/2010/08/plug-for-monodevelop.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DE4DSXo6cCp7ImA9Wx5TEUg.&quot;"><id>tag:blogger.com,1999:blog-3207985.post-4731438055245533496</id><published>2010-07-26T11:07:00.001-04:00</published><updated>2010-07-26T11:09:38.418-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-07-26T11:09:38.418-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ruby" /><category scheme="http://www.blogger.com/atom/ns#" term="metaprograming" /><title>Writing methods which write methods</title><content type="html">&lt;a href="http://www.raulparolari.com/Ruby2/define_method"&gt;http://www.raulparolari.com/Ruby2/define_method&lt;/a&gt; - Here is a nice writeup showing how to use Ruby's define_method feature.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3207985-4731438055245533496?l=affy.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/IgOvkPZpzbrl1KHr_-SwGxuL_b0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/IgOvkPZpzbrl1KHr_-SwGxuL_b0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/IgOvkPZpzbrl1KHr_-SwGxuL_b0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/IgOvkPZpzbrl1KHr_-SwGxuL_b0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Codebits-TestedComplexCode/~4/QMphgAyaVEk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://affy.blogspot.com/feeds/4731438055245533496/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3207985&amp;postID=4731438055245533496" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/4731438055245533496?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/4731438055245533496?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Codebits-TestedComplexCode/~3/QMphgAyaVEk/writing-methods-which-write-methods.html" title="Writing methods which write methods" /><author><name>David Medinets</name><uri>https://profiles.google.com/106664903665226624029</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-W4xARhlFk4s/AAAAAAAAAAI/AAAAAAAAAWs/MGcJuVVaSBo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://affy.blogspot.com/2010/07/writing-methods-which-write-methods.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkcGR3ozeyp7ImA9Wx5TEEo.&quot;"><id>tag:blogger.com,1999:blog-3207985.post-4244926259631451125</id><published>2010-07-25T13:11:00.002-04:00</published><updated>2010-07-25T13:13:46.483-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-07-25T13:13:46.483-04:00</app:edited><title>Suggestion for Community Service Hours - Curating a Community Calendar</title><content type="html">http://elmcity.cloudapp.net/ - This is an interesting website which allows you to provide calendar events in several different formats. A great community project would be to aggregate school events in a locality.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3207985-4244926259631451125?l=affy.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/WZuqpHCU1IUVzz4DKYpoWKkME40/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/WZuqpHCU1IUVzz4DKYpoWKkME40/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/WZuqpHCU1IUVzz4DKYpoWKkME40/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/WZuqpHCU1IUVzz4DKYpoWKkME40/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Codebits-TestedComplexCode/~4/tlsbLD57n-E" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://affy.blogspot.com/feeds/4244926259631451125/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3207985&amp;postID=4244926259631451125" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/4244926259631451125?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/4244926259631451125?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Codebits-TestedComplexCode/~3/tlsbLD57n-E/suggestion-for-community-service-hours.html" title="Suggestion for Community Service Hours - Curating a Community Calendar" /><author><name>David Medinets</name><uri>https://profiles.google.com/106664903665226624029</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-W4xARhlFk4s/AAAAAAAAAAI/AAAAAAAAAWs/MGcJuVVaSBo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://affy.blogspot.com/2010/07/suggestion-for-community-service-hours.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0QMQ3Y-eSp7ImA9WxFbGEg.&quot;"><id>tag:blogger.com,1999:blog-3207985.post-6401588176736821602</id><published>2010-07-11T10:35:00.003-04:00</published><updated>2010-07-11T10:43:02.851-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-07-11T10:43:02.851-04:00</app:edited><title>Using ImageMagick To Create Horizontally Repeating Background Image</title><content type="html">&lt;ol&gt;
&lt;li&gt;Find an image that you want to slice vertically, which I'll refer to as the base image. This slice is what will be repeated across the background of the web page.&lt;/li&gt;
&lt;li&gt;Use the &lt;code&gt;identify home_page.jpg&lt;/code&gt; command to find out some details about the base image. The result of this command looks like this: &lt;code&gt;home_page.jpg JPEG 1300x1380 1300x1380+0+0 8-bit DirectClass 736KiB 0.240u 0:00.240&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;For our purposes, the first set of numbers is sufficient. They hold the width and height.&lt;/li&gt;
&lt;li&gt;The next step involves extracting a vertical slice (top to bottom) from the base image. Use this command: &lt;code&gt;convert -extract 10x1380+0+0 home_page.jpg body_background.png&lt;/code&gt;. Notice that you can vary the width of the slice using the first number. In this case, I use 10 but some other number is probably more appropriate for you.&lt;/li&gt;
&lt;li&gt;If you want to test various widths, you can 'tail' the background image using  &lt;code&gt;display -update 1 body_background.png&lt;/code&gt; which redisplays the image every second.&lt;/li&gt;
&lt;li&gt;Once you've got the vertical slice, you need to integrate it with your web page.&lt;/li&gt;
&lt;li&gt;Use CSS similar to this:
&lt;pre&gt;body {
  background-image: url('body_background.png');
  background-repeat: repeat-x;
}&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3207985-6401588176736821602?l=affy.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/H0aX426_QcrhPhB08IEwUtwRQWQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/H0aX426_QcrhPhB08IEwUtwRQWQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/H0aX426_QcrhPhB08IEwUtwRQWQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/H0aX426_QcrhPhB08IEwUtwRQWQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Codebits-TestedComplexCode/~4/LnbqIRllXv8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://affy.blogspot.com/feeds/6401588176736821602/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3207985&amp;postID=6401588176736821602" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/6401588176736821602?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/6401588176736821602?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Codebits-TestedComplexCode/~3/LnbqIRllXv8/using-imagemagick-to-create.html" title="Using ImageMagick To Create Horizontally Repeating Background Image" /><author><name>David Medinets</name><uri>https://profiles.google.com/106664903665226624029</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-W4xARhlFk4s/AAAAAAAAAAI/AAAAAAAAAWs/MGcJuVVaSBo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://affy.blogspot.com/2010/07/using-imagemagick-to-create.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C04BRH45eyp7ImA9WxFbEE8.&quot;"><id>tag:blogger.com,1999:blog-3207985.post-5368078324173569191</id><published>2010-07-01T17:50:00.003-04:00</published><updated>2010-07-01T18:05:55.023-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-07-01T18:05:55.023-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ruby" /><category scheme="http://www.blogger.com/atom/ns#" term="ActiveRecord" /><category scheme="http://www.blogger.com/atom/ns#" term="twitter" /><category scheme="http://www.blogger.com/atom/ns#" term="gem" /><category scheme="http://www.blogger.com/atom/ns#" term="module_eval" /><title>Using module_eval to Define Instance Methods in a Ruby Gem to Enable Per-Model Configuration</title><content type="html">&lt;p&gt;In the last post, I mentioned that I wrote a small gem to post changes to &lt;a class="zem_slink" href="http://en.wikipedia.org/wiki/Active_record_pattern" title="Active record pattern" rel="wikipedia"&gt;ActiveRecord&lt;/a&gt; models to &lt;a class="zem_slink" href="http://twitter.com/" title="Twitter" rel="homepage"&gt;Twitter&lt;/a&gt;. In that version, the configuration was handled by a &lt;a class="zem_slink" href="http://en.wikipedia.org/wiki/YAML" title="YAML" rel="wikipedia"&gt;YAML&lt;/a&gt; file. I wanted to evolve the gem so that developers could switch Twitter accounts for each model.&lt;/p&gt;
&lt;p&gt;Basically, I wanted to able to the use the following:&lt;/p&gt;
&lt;pre&gt;class Place &lt; ActiveRecord::Base
  alastrina :twitter =&gt; { :username =&gt; 'alastrina_gem', :password =&gt; 'QQQQQQ' }
end&lt;/pre&gt;
&lt;p&gt;After a bit of tinkering and searching, I decided to use the following code in my gem.&lt;/p&gt;
&lt;pre&gt;
ALASTRINA_CONFIGURATION_FILE = 'config/alastrina.yml'

module Alastrina
  def self.included(base)
    base.extend(ClassMethods)
  end
  
  module ClassMethods
    def alastrina hash
      module_eval do
        def configuration
          throw "Missing #{ALASTRINA_CONFIGURATION_FILE}" unless File.exists? ALASTRINA_CONFIGURATION_FILE 
          @config ||= YAML::load(File.read(ALASTRINA_CONFIGURATION_FILE))
        end
        if hash[:twitter]
          def send_to_twitter?
            true
          end
          eval"def twitter_username\n\"#{hash[:twitter][:username]}\"\nend\n"
          eval "def twitter_password\n\"#{hash[:twitter][:password]}\"\nend\n"
        else
          def send_to_twitter?
            @twitter_flag ||= !configuration['twitter'].blank?
          end
          def twitter_username
            @twitter_username ||= configuration['twitter']['username'] if send_to_twitter?
          end
          def twitter_password
            @twitter_password ||= configuration['twitter']['password'] if send_to_twitter?
          end
        end
      end
    end
  end

  def after_save
    if send_to_twitter?
      require 'twitter' 
      throw "Missing Twitter userid" if twitter_username.blank? 
      throw "Missing Twitter password" if twitter_password.blank?
      send_via_twitter
    end
  end

private

  def send_via_twitter
    if changes.size &gt; 0
      httpauth = Twitter::HTTPAuth.new(twitter_username, twitter_password)
      client = Twitter::Base.new(httpauth)
      begin
        client.update(changes.to_yaml)
      rescue
        RAILS_DEFAULT_LOGGER.error "alastrina.send_via_twitter; Unable to send change. Message[#{$!}] Change[#{changes.to_yaml}]"
      end
    end
  end
  
end

ActiveRecord::Base.class_eval { include Alastrina }
&lt;/pre&gt;
&lt;p&gt;The key insight to this code is how the hash passed on the &lt;code&gt;alastrina&lt;/code&gt; of the Model is passed down into the instance. The code is fairly straightforward once you see what the eval is doing.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3207985-5368078324173569191?l=affy.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/pxRAPAYVHjyXBzg7nzzh8w7Cnxs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/pxRAPAYVHjyXBzg7nzzh8w7Cnxs/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/pxRAPAYVHjyXBzg7nzzh8w7Cnxs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/pxRAPAYVHjyXBzg7nzzh8w7Cnxs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Codebits-TestedComplexCode/~4/oASlR_xQRSk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://affy.blogspot.com/feeds/5368078324173569191/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3207985&amp;postID=5368078324173569191" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/5368078324173569191?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/5368078324173569191?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Codebits-TestedComplexCode/~3/oASlR_xQRSk/using-moduleeval-to-define-instance.html" title="Using module_eval to Define Instance Methods in a Ruby Gem to Enable Per-Model Configuration" /><author><name>David Medinets</name><uri>https://profiles.google.com/106664903665226624029</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-W4xARhlFk4s/AAAAAAAAAAI/AAAAAAAAAWs/MGcJuVVaSBo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://affy.blogspot.com/2010/07/using-moduleeval-to-define-instance.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkEBQHw8eSp7ImA9WxFUF0s.&quot;"><id>tag:blogger.com,1999:blog-3207985.post-2181233809642783260</id><published>2010-06-28T19:11:00.001-04:00</published><updated>2010-06-28T19:44:11.271-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-06-28T19:44:11.271-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ruby" /><category scheme="http://www.blogger.com/atom/ns#" term="twitter" /><category scheme="http://www.blogger.com/atom/ns#" term="gem" /><title>Alastrina - a gem to push model changes to twitter</title><content type="html">&lt;p&gt;http://github.com/medined/alastrina - the gem&lt;/p&gt;

&lt;p&gt;http://github.com/medined/alastrina_demo - a demo application&lt;/p&gt;

&lt;p&gt;http://twitter.com/Alastrina_gem - the result&lt;/p&gt;

&lt;p&gt;I was doodling in code this weekend and the result is a small gem that
hooks into the after_save callback to send model changes to a Twitter
account.&lt;/p&gt;

&lt;p&gt;Make sure you install the Twitter gem. Then in the demo app, update
the config/alastrina.yml file with your Twitter credentials. Open a
console and do:&lt;/p&gt;

&lt;pre&gt;a = Place.new
a.name = "GGG"
a.save&lt;/pre&gt;

&lt;p&gt;And, presto, the model changes should be posted to your Twitter feed.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3207985-2181233809642783260?l=affy.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/OThEn8D_OIW8tHYA6Z7ww_Mbi3I/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/OThEn8D_OIW8tHYA6Z7ww_Mbi3I/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/OThEn8D_OIW8tHYA6Z7ww_Mbi3I/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/OThEn8D_OIW8tHYA6Z7ww_Mbi3I/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Codebits-TestedComplexCode/~4/wwpS6NPNQTA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://affy.blogspot.com/feeds/2181233809642783260/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3207985&amp;postID=2181233809642783260" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/2181233809642783260?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/2181233809642783260?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Codebits-TestedComplexCode/~3/wwpS6NPNQTA/alastrina-gem-to-push-model-changes-to.html" title="Alastrina - a gem to push model changes to twitter" /><author><name>David Medinets</name><uri>https://profiles.google.com/106664903665226624029</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-W4xARhlFk4s/AAAAAAAAAAI/AAAAAAAAAWs/MGcJuVVaSBo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://affy.blogspot.com/2010/06/alastrina-gem-to-push-model-changes-to.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEEERXc8eip7ImA9WxFUEU4.&quot;"><id>tag:blogger.com,1999:blog-3207985.post-7883864107212723815</id><published>2010-06-21T11:00:00.002-04:00</published><updated>2010-06-21T11:03:24.972-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-06-21T11:03:24.972-04:00</app:edited><title>Connecting acts_as_solr and cucumber (resolving the whiny_nil error)</title><content type="html">When I installed cucumber into my application and ran 'cucumber' I got an error that said "undefined method 'symbolize_keys' for nil:nilclass". This message happened because acts_as_solr tried to load a 'cucumber' environment from config/solr.yml and was unable to find it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3207985-7883864107212723815?l=affy.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/apl1-yB6zX6l29iFGLRqZNdk48w/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/apl1-yB6zX6l29iFGLRqZNdk48w/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/apl1-yB6zX6l29iFGLRqZNdk48w/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/apl1-yB6zX6l29iFGLRqZNdk48w/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Codebits-TestedComplexCode/~4/ZEZv3VgmJk0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://affy.blogspot.com/feeds/7883864107212723815/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3207985&amp;postID=7883864107212723815" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/7883864107212723815?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/7883864107212723815?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Codebits-TestedComplexCode/~3/ZEZv3VgmJk0/connecting-actsassolr-and-cucumber.html" title="Connecting acts_as_solr and cucumber (resolving the whiny_nil error)" /><author><name>David Medinets</name><uri>https://profiles.google.com/106664903665226624029</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-W4xARhlFk4s/AAAAAAAAAAI/AAAAAAAAAWs/MGcJuVVaSBo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://affy.blogspot.com/2010/06/connecting-actsassolr-and-cucumber.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkcHQXwyeCp7ImA9WxBaEk4.&quot;"><id>tag:blogger.com,1999:blog-3207985.post-676581916937532365</id><published>2010-03-22T00:24:00.001-04:00</published><updated>2010-03-22T01:00:30.290-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-03-22T01:00:30.290-04:00</app:edited><title>Ubuntu and RocketFish RF-FLBTAD bluetooth dongle</title><content type="html">I bought the RocketFish RF-FLBTAD bluetooth dongle today. When it was plugged into the front USB ports of my computer, the dongle would not be recognized as an HCI device. However, when I plugged it into one of the USB ports in the back of my computer, it registered just fine. Lots of good messages in /var/log/syslog.

Update: The dongle disappeared when I rebooted. However, it came back when I manually ran:

&lt;code&gt;sudo /etc/init.d/bluetooth restart&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3207985-676581916937532365?l=affy.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/dvrOnEHHYGxtAh-hJbrbR1VCy0Q/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/dvrOnEHHYGxtAh-hJbrbR1VCy0Q/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/dvrOnEHHYGxtAh-hJbrbR1VCy0Q/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/dvrOnEHHYGxtAh-hJbrbR1VCy0Q/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Codebits-TestedComplexCode/~4/nbW_f4ewrvk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://affy.blogspot.com/feeds/676581916937532365/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3207985&amp;postID=676581916937532365" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/676581916937532365?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/676581916937532365?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Codebits-TestedComplexCode/~3/nbW_f4ewrvk/ubuntu-and-rocketfish-rf-flbtad.html" title="Ubuntu and RocketFish RF-FLBTAD bluetooth dongle" /><author><name>David Medinets</name><uri>https://profiles.google.com/106664903665226624029</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-W4xARhlFk4s/AAAAAAAAAAI/AAAAAAAAAWs/MGcJuVVaSBo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://affy.blogspot.com/2010/03/ubuntu-and-rocketfish-rf-flbtad.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DE8AR387eyp7ImA9WxBWF08.&quot;"><id>tag:blogger.com,1999:blog-3207985.post-4882225177032572003</id><published>2010-02-09T09:45:00.002-05:00</published><updated>2010-02-09T09:47:26.103-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-02-09T09:47:26.103-05:00</app:edited><title>Heroku Tip; Use a Ping or Uptime Service As a Cron Job.</title><content type="html">This is a pass-along tip from Toby Hede (http://stackoverflow.com/users/14971/toby-hede) on StackOverflow. Just give the Ping service the URL of the controller doing the work instead of your root page.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3207985-4882225177032572003?l=affy.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/OoWv1W3fFLw6fRrcQDb4sElw8Hg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/OoWv1W3fFLw6fRrcQDb4sElw8Hg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/OoWv1W3fFLw6fRrcQDb4sElw8Hg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/OoWv1W3fFLw6fRrcQDb4sElw8Hg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Codebits-TestedComplexCode/~4/BFOdCkz2aMI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://affy.blogspot.com/feeds/4882225177032572003/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3207985&amp;postID=4882225177032572003" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/4882225177032572003?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/4882225177032572003?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Codebits-TestedComplexCode/~3/BFOdCkz2aMI/heroku-tip-use-ping-or-uptime-service.html" title="Heroku Tip; Use a Ping or Uptime Service As a Cron Job." /><author><name>David Medinets</name><uri>https://profiles.google.com/106664903665226624029</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-W4xARhlFk4s/AAAAAAAAAAI/AAAAAAAAAWs/MGcJuVVaSBo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://affy.blogspot.com/2010/02/heroku-tip-use-ping-or-uptime-service.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkAMR389eip7ImA9WxBWF08.&quot;"><id>tag:blogger.com,1999:blog-3207985.post-3533489449485734501</id><published>2010-02-09T09:07:00.002-05:00</published><updated>2010-02-09T09:13:06.162-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-02-09T09:13:06.162-05:00</app:edited><title>Rails Tip - How Do I See Params From My Forms?</title><content type="html">I like to document what my forms are sending to my action methods. So most of the time, I create a method in my controller like this:

&lt;pre&gt;def to_export
  render :text =&gt; params.inspect
end&lt;/pre&gt;

Then I use copy and paste to put the result into my code as a comment.

&lt;pre&gt;# {
#   "commit"=&gt;"Upload File", 
#   "authenticity_token"=&gt;"17FvBH+Z4Meni6WvsCdPByrrk751BV9mNklzKDAo2Vc=", 
#   "action"=&gt;"do_import", 
#   "import_criteria"=&gt;{
#     "primary_language_name"=&gt;"Creole", 
#     "secondary_language_name"=&gt;"English"
#   }, 
#   "form"=&gt;{
#     "file"=&gt;"traveling_haiti.txt"
#   }, 
#   "controller"=&gt;"import"
# }&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3207985-3533489449485734501?l=affy.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/AjZw_zfVWKzufcQwuem8o0vSaZU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/AjZw_zfVWKzufcQwuem8o0vSaZU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/AjZw_zfVWKzufcQwuem8o0vSaZU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/AjZw_zfVWKzufcQwuem8o0vSaZU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Codebits-TestedComplexCode/~4/ife3YZUtQiM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://affy.blogspot.com/feeds/3533489449485734501/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3207985&amp;postID=3533489449485734501" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/3533489449485734501?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/3533489449485734501?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Codebits-TestedComplexCode/~3/ife3YZUtQiM/rails-tip-how-do-i-see-params-from-my.html" title="Rails Tip - How Do I See Params From My Forms?" /><author><name>David Medinets</name><uri>https://profiles.google.com/106664903665226624029</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-W4xARhlFk4s/AAAAAAAAAAI/AAAAAAAAAWs/MGcJuVVaSBo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://affy.blogspot.com/2010/02/rails-tip-how-do-i-see-params-from-my.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkEDR3YzcSp7ImA9WxBWFkU.&quot;"><id>tag:blogger.com,1999:blog-3207985.post-5489107110801571485</id><published>2010-02-08T22:00:00.002-05:00</published><updated>2010-02-08T22:04:36.889-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-02-08T22:04:36.889-05:00</app:edited><title>Another Fix for EMAIL not authorized to access APP</title><content type="html">&lt;p&gt;I wanted to change the primary email associated with my Heroku account. So I removed the email from the authorization list. The next time I pulled from git, I got the following error:&lt;/p&gt;

&lt;pre&gt;heroku@david-medinets.otherinbox.com not authorized to access crisiscamp-translation&lt;/pre&gt;

The email address is pulled from your public/private keys which can be recreated using the following command:

&lt;pre&gt;ssh-keygen -t rsa -C EMAIL&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3207985-5489107110801571485?l=affy.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/F2Ur0BUDBLMC0pj1h7mVSxAtwvk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/F2Ur0BUDBLMC0pj1h7mVSxAtwvk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/F2Ur0BUDBLMC0pj1h7mVSxAtwvk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/F2Ur0BUDBLMC0pj1h7mVSxAtwvk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Codebits-TestedComplexCode/~4/05MfMUFhji8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://affy.blogspot.com/feeds/5489107110801571485/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3207985&amp;postID=5489107110801571485" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/5489107110801571485?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/5489107110801571485?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Codebits-TestedComplexCode/~3/05MfMUFhji8/another-fix-for-email-not-authorized-to.html" title="Another Fix for EMAIL not authorized to access APP" /><author><name>David Medinets</name><uri>https://profiles.google.com/106664903665226624029</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-W4xARhlFk4s/AAAAAAAAAAI/AAAAAAAAAWs/MGcJuVVaSBo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://affy.blogspot.com/2010/02/another-fix-for-email-not-authorized-to.html</feedburner:origLink></entry></feed>

