<?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>Adam Risi - [online]</title>
	<atom:link href="http://www.adamrisi.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.adamrisi.com</link>
	<description>science, technology, and sarcasm</description>
	<lastBuildDate>Tue, 26 Oct 2010 16:11:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Job hunt update</title>
		<link>http://www.adamrisi.com/?p=208</link>
		<comments>http://www.adamrisi.com/?p=208#comments</comments>
		<pubDate>Tue, 26 Oct 2010 14:38:05 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[professional]]></category>

		<guid isPermaLink="false">http://www.adamrisi.com/?p=208</guid>
		<description><![CDATA[Wow, have the last couple weeks been exhausting! Interview after interview after interview. Programming questions, algorithm questions, character questions, even a few &#8220;extreme estimation&#8221; questions. Now, don&#8217;t get me wrong, I love interviews (it&#8217;s fun to get pushed a little!), but 20 hours of work a week, 18 credit hours of classes, a home to [...]]]></description>
			<content:encoded><![CDATA[<p>Wow, have the last couple weeks been exhausting! Interview after interview after interview. Programming questions, algorithm questions, character questions, even a few &#8220;extreme estimation&#8221; questions. Now, don&#8217;t get me wrong, I love interviews (it&#8217;s fun to get pushed a little!), but 20 hours of work a week, 18 credit hours of classes, a home to keep up, and interviews every other day? Phew!</p>
<p>As readers of my blog know, I got interviews (and interview offers) with a lot of great companies (Google, Apple, Amazon, ATG). I even had a company contact me out of the blue recently as well (Quantcast). So, whats the verdict? Where am I with my job hunting progress? Three delightful words: on site interviews. I was given on site interviews <em>with everyone.</em> Google and Quantcast this week, Apple in 2 weeks, Amazon next month. Plane rides, hotels, rental cars, and tour groups here I come! After all, what could be more exciting than visiting a every one of the companies I applied to?</p>
<p>Oh yea, the next step &#8211; getting an offer. I was going to write more, but something tells me in a week or two, I will probably have a bit more to say about offers. Talk to you then!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.adamrisi.com/?feed=rss2&#038;p=208</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>So, who did I get interviews with?</title>
		<link>http://www.adamrisi.com/?p=202</link>
		<comments>http://www.adamrisi.com/?p=202#comments</comments>
		<pubDate>Mon, 04 Oct 2010 23:47:22 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[professional]]></category>

		<guid isPermaLink="false">http://www.adamrisi.com/?p=202</guid>
		<description><![CDATA[The Fall career fair at RIT has come and gone&#8230; what fun it was! I got to meet the guys from Scribd, speak with members of different government groups, and spread my resume like wildfire. So, who ended up giving me an interview? Yea, that feels good!]]></description>
			<content:encoded><![CDATA[<p>The Fall career fair at RIT has come and gone&#8230; what fun it was! I got to meet the guys from Scribd, speak with members of different government groups, and spread my resume like wildfire. So, who ended up giving me an interview?</p>
<p style="text-align: center;"><img class="aligncenter" title="Google Logo" src="http://www.costpernews.com/wp-content/uploads/2007/04/google_logo.jpg" alt="" width="200" height="95" /></p>
<p style="text-align: center;"><img class="aligncenter" title="Apple Logo" src="http://t0.gstatic.com/images?q=tbn:ANd9GcQWQ6MLyOIdP2o-qzChSYabaX8xRWdLUHjy8n7UJ3GgZn7eJ1o&amp;t=1&amp;usg=__DYPzr5cpWYHLR45Pgmqh7HOBpTE=" alt="" width="122" height="148" /></p>
<p style="text-align: center;"><img class="aligncenter" title="Amazon Logo" src="data:image/jpg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBhQRERURExIWFBUUFxcYFhgWGBwWHRkaGB8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PxS62yu5t0+scCtBVbJSt6hDx9R96mSLnajhunv5zjtPvDXVrLauUTy7oAYKiLslb4Xt+CDGJx/mvU/svwtCwzwfKOi/KPnlr/sYnrqiUC/tioP+Y/2f0X22nqZeyU+NwPfYKdBq/VY4PlPXflPzzKTxCI6aohEKXZGQ6vcGjkNT+CkFBgkUOrW3d6TtT/RZ6Lfp+HUUTvjjz959WS3V228sp5ezBxTDumDWk2aHXcOfIdyzGMAAAFgNAvpFsivGMpyiOcs85zMRj9oERF7eRERAREQEREBERAREQEREBERAREQEREBERAREQEREBERAREQEREBERAREQEREBERAREQEREBERAREQEREBERAREQEREH/9k=" alt="" width="288" height="107" /></p>
<p style="text-align: center;"><img class="aligncenter" title="ATG Logo" src="http://t2.gstatic.com/images?q=tbn:ANd9GcRebcOksBBMEz9Naz9AFdUNWDZltS572wqprVQg-TiKP6v6bKw&amp;t=1&amp;usg=__gpYoVYXzGsLx4JJIqwudKJqQ5dE=" alt="" width="201" height="123" /></p>
<p>Yea, that feels good!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.adamrisi.com/?feed=rss2&#038;p=202</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Looking for my résumé?</title>
		<link>http://www.adamrisi.com/?p=182</link>
		<comments>http://www.adamrisi.com/?p=182#comments</comments>
		<pubDate>Tue, 28 Sep 2010 16:25:07 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[About]]></category>
		<category><![CDATA[professional]]></category>

		<guid isPermaLink="false">http://www.adamrisi.com/?p=182</guid>
		<description><![CDATA[With the Fall career fair at Rochester Institute of Technology approaching, I thought it would be useful to post a copy of my resume here for any potential employers to access. Resume for Adam Risi If you are a recruiter, and you were looking for my resume, you might also be interested in the rest [...]]]></description>
			<content:encoded><![CDATA[<p>With the Fall career fair at Rochester Institute of Technology approaching, I thought it would be useful to post a copy of my resume here for any potential employers to access.</p>
<p style="text-align: center;"><a href="http://www.adamrisi.com/resume.pdf">Resume for Adam Risi</a></p>
<p style="text-align: left;">If you are a recruiter, and you were looking for my resume, you might also be interested in the rest of my blog posts, or <a href="http://www.github.com/ajrisi">my open source coding profile on github.com</a>. As always, please feel free to contact me by phone or email at your convenience. My contact information can be found at the top of my resume.</p>
<p style="text-align: left;">Thank you!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.adamrisi.com/?feed=rss2&#038;p=182</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Parsing all valid HTTP date formats</title>
		<link>http://www.adamrisi.com/?p=176</link>
		<comments>http://www.adamrisi.com/?p=176#comments</comments>
		<pubDate>Sat, 11 Sep 2010 18:23:22 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[FSM]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[parsing]]></category>

		<guid isPermaLink="false">http://www.adamrisi.com/?p=176</guid>
		<description><![CDATA[Alright, if you read my blog regularly, you are probably getting tired of my &#8220;FSM engine this, FSM engine that&#8221; &#8211; well, sorry, but I&#8217;ve got some more FSM stuff for you today! As one of the examples provided with the FSM engine, I provide a date parser for the 3 different valid http date [...]]]></description>
			<content:encoded><![CDATA[<p>Alright, if you read my blog regularly, you are probably getting tired of my &#8220;<a href="http://github.com/ajrisi/fsm">FSM engine</a> this, FSM engine that&#8221; &#8211; well, sorry, but I&#8217;ve got some more FSM stuff for you today!</p>
<p>As one of the examples provided with the FSM engine, I provide a date parser for the 3 different valid http date formats: <a href="http://www.opengroup.org/onlinepubs/009695399/functions/asctime.html">asctime</a>, <a href="http://www.ietf.org/rfc/rfc850.txt">rfc850</a>, and <a href="http://www.ietf.org/rfc/rfc1123.txt">rfc1123</a>. The <a href="http://www.ietf.org/rfc/rfc2616.txt">HTTP standard provides a great EBNF form description of parsing these dates</a> (section 3.3), so writing the code was actually pretty trivial. After writing the code, and as part of the documentation of the project, I have generated some images to make the parsing process a little clearer.</p>
<p style="text-align: center;"><a href="http://www.adamrisi.com/wp-content/uploads/2010/09/date1.png"><img class="aligncenter size-medium wp-image-177" title="Main HTTP-style date parsing FSM" src="http://www.adamrisi.com/wp-content/uploads/2010/09/date1-300x86.png" alt="" width="300" height="86" /></a><a href="http://www.adamrisi.com/wp-content/uploads/2010/09/date2.png"><img class="aligncenter size-medium wp-image-178" title="Auxillary HTTP-style date parsing FSM" src="http://www.adamrisi.com/wp-content/uploads/2010/09/date2-300x216.png" alt="" width="300" height="216" /></a></p>
<p style="text-align: center;">(Click to enlarge)</p>
<p style="text-align: left;"><a href="http://github.com/ajrisi/fsm/blob/master/examples/date.c">The source</a> for this feat of parsing is included in the examples folder of the FSM library. Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.adamrisi.com/?feed=rss2&#038;p=176</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Parsing bencode format data with a FSM (now with pictures!)</title>
		<link>http://www.adamrisi.com/?p=168</link>
		<comments>http://www.adamrisi.com/?p=168#comments</comments>
		<pubDate>Fri, 10 Sep 2010 18:22:55 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[bencode]]></category>
		<category><![CDATA[FSM]]></category>
		<category><![CDATA[parsing]]></category>
		<category><![CDATA[torrent]]></category>

		<guid isPermaLink="false">http://www.adamrisi.com/?p=168</guid>
		<description><![CDATA[Many of my recent posts have been about my Finite State Machine engine, and what it can (and does) do. As one of the examples provided with the engine, I provide a parser for bencode format, the data formatting style used in torrent files, torrent trackers, etc. It makes a great example as its easy [...]]]></description>
			<content:encoded><![CDATA[<p>Many of my recent posts have been about my <a href="http://github.com/ajrisi/fsm">Finite State Machine engine</a>, and what it can (and does) do. As one of the examples provided with the engine, I provide a parser for bencode format, the data formatting style used in torrent files, torrent trackers, etc. It makes a great example as its easy to understand, from a novice perspective, and it parses well (heck, its isometric!).</p>
<p>As part of the FSM examples, I am generating visualizations for the included FSMs via <strong>dot</strong>, a utility part of the <a href="http://www.graphviz.org/">GraphViz collection</a>. It&#8217;s a great tool for generating digraphs. I just finished the visualizations for bencode format, so I thought I would share! As always, if you have a question, leave a comment or send me an email: <a href="mailto:adam@adamrisi.com">adam@adamrisi.com</a>.</p>
<p style="text-align: center;"><a href="http://www.adamrisi.com/wp-content/uploads/2010/09/bencode1.png"><img class="aligncenter size-medium wp-image-173" title="Bencode Main FSM" src="http://www.adamrisi.com/wp-content/uploads/2010/09/bencode1-300x190.png" alt="" width="300" height="190" /></a><br />
<a href="http://www.adamrisi.com/wp-content/uploads/2010/09/bencode_integer.png"><img class="aligncenter size-medium wp-image-164" title="bencode_integer" src="http://www.adamrisi.com/wp-content/uploads/2010/09/bencode_integer-300x89.png" alt="" width="300" height="89" /></a><a href="http://www.adamrisi.com/wp-content/uploads/2010/09/bencode_string.png"><img class="aligncenter size-medium wp-image-166" title="bencode_string" src="http://www.adamrisi.com/wp-content/uploads/2010/09/bencode_string-300x98.png" alt="" width="300" height="98" /></a><a href="http://www.adamrisi.com/wp-content/uploads/2010/09/bencode_list.png"><img class="aligncenter size-medium wp-image-165" title="bencode_list" src="http://www.adamrisi.com/wp-content/uploads/2010/09/bencode_list-300x220.png" alt="" width="300" height="220" /></a><a href="http://www.adamrisi.com/wp-content/uploads/2010/09/bencode_dict.png"><img class="aligncenter size-medium wp-image-163" title="bencode_dict" src="http://www.adamrisi.com/wp-content/uploads/2010/09/bencode_dict-300x222.png" alt="" width="300" height="222" /></a></p>
<p style="text-align: left;">Entry points are always node &#8220;0&#8243;, and the example&#8217;s entry point is the bencode_fsm node 0. Pretty neat, eh? It&#8217;s a perfect translation of the <a href="http://www.bittorrent.org/beps/bep_0003.html">bencode standard</a> into a working FSM.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.adamrisi.com/?feed=rss2&#038;p=168</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RFC-3986 URI parser written in C with FSM</title>
		<link>http://www.adamrisi.com/?p=155</link>
		<comments>http://www.adamrisi.com/?p=155#comments</comments>
		<pubDate>Wed, 08 Sep 2010 04:12:10 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[FSM]]></category>
		<category><![CDATA[parsing]]></category>
		<category><![CDATA[rfc 3986]]></category>
		<category><![CDATA[rfc3986]]></category>

		<guid isPermaLink="false">http://www.adamrisi.com/?p=155</guid>
		<description><![CDATA[Recently, I was working on a Finite State Machine library in C for a couple of complex parsing tasks. Trying to come up with examples, I decided that a URI parser (following the standardized URI format found in RFC 3986) would be a good test, as well as an easy test for other people to [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, I was working on a Finite State Machine library in C for a couple of complex parsing tasks. Trying to come up with examples, I decided that a URI parser (following the standardized URI format found in RFC 3986) would be a good test, as well as an easy test for other people to try out. <strong>Try entering a URI below, and see what happens!</strong></p>
<form action="/uriParser/parseURI.php" method="POST">
<input name="uri" size="40" type="text" />
<input type="submit" value="Parse this URI" /> </form>
<p>All of the FSM code as well as the different examples (uri parsing, date parsing, etc) are all available at the <a href="http://github.com/ajrisi/fsm">GitHub project page</a>. Below, you can test the URI parser and take a look at the output. If you notice a bug, please, leave a comment!</p>
<p>This code is memory-leak free (tested via valgrind). I haven&#8217;t licensed it yet, so send me an email if you want to use any piece of my FSM project in your own code.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.adamrisi.com/?feed=rss2&#038;p=155</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>(ab)Using function pointers and void pointers to achieve truly generic functions in C</title>
		<link>http://www.adamrisi.com/?p=142</link>
		<comments>http://www.adamrisi.com/?p=142#comments</comments>
		<pubDate>Fri, 09 Jul 2010 17:45:33 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[c programming]]></category>
		<category><![CDATA[generics]]></category>
		<category><![CDATA[programming languages]]></category>

		<guid isPermaLink="false">http://www.adamrisi.com/?p=142</guid>
		<description><![CDATA[This has got to be some of the strangest code I have ever written. I was recently working on my implementation of a Finite State Machine engine in C, when I decided that I really wanted a way to pass both a function pointer (easy), and a list of arguments that could be passed to [...]]]></description>
			<content:encoded><![CDATA[<p>This has got to be some of the strangest code I have ever written. I was recently working on my implementation of a <a href="http://github.com/ajrisi/fsm">Finite State Machine engine in C</a>, when I decided that I really wanted a way to pass both a function pointer (easy), and a list of arguments that could be passed to that function (more difficult), as part of a table (really just an array) describing what functions, and what arguments to pass (really hard).</p>
<p>I toyed with ideas like variadic macros (or functions), abusing some sort of global stack of void pointers to various types of structs, and a bunch of other ideas. Finally, I came up with the following code (an example of the technique):</p>
<pre class="brush: c">#include &lt;stdio.h&gt;

struct threeint_args {
  int a;
  int b;
  int c;
};

void mult(void *args)
{
  struct threeint_args *ma = (struct threeint_args*)args;
  printf("%d * %d * %d = %d\n",
    ma-&gt;a, ma-&gt;b, ma-&gt;c,
    ma-&gt;a * ma-&gt;b * ma-&gt;c);
}

void add(void *args)
{
  struct threeint_args *aa = (struct threeint_args*)args;
  printf("%d + %d + %d = %d\n",
  aa-&gt;a, aa-&gt;b, aa-&gt;c,
  aa-&gt;a + aa-&gt;b + aa-&gt;c);
}

struct generic_func {
  void(*func)(void*);
  void *args;
};

void run_generics(struct generic_func gfs[])
{
  struct generic_func *gf = gfs;
  while(gf-&gt;func != NULL) {
    gf-&gt;func(gf-&gt;args);
    gf++;
  }
}

int main(int argc, char **argv)
{
  struct generic_func examples[] =
    {
      {mult, (void*)&amp;(struct threeint_args){1, 2, 3}},
      {add, (void*)&amp;(struct threeint_args){1, 2, 3}},

      {mult, (void*)&amp;(struct threeint_args){4, 5, 6}},
      {add, (void*)&amp;(struct threeint_args){4, 5, 6}},

      {mult, (void*)&amp;(struct threeint_args){7, 8, 9}},
      {add, (void*)&amp;(struct threeint_args){7, 8, 9}},

      {NULL}
    };

  run_generics(examples);
}</pre>
<p>&#8220;Alright&#8221;, I thought to myself, &#8220;this little program probably will throw a fit if I try to compile it, but lets try anyway.&#8221;</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">gcc</span> <span style="color: #660033;">-ggdb</span> <span style="color: #660033;">-o</span> <span style="color: #7a0874; font-weight: bold;">test</span> test.c
$</pre></div></div>

<p>&#8220;Now wait a minute &#8211; no complaints? Certainly, if I try to run it, there will be some sort of segfault, or bug, or something. This can&#8217;t be right&#8230;&#8221;</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">valgrind</span> .<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">test</span>
==<span style="color: #000000;">16546</span>== Memcheck, a memory error detector
==<span style="color: #000000;">16546</span>== Copyright <span style="color: #7a0874; font-weight: bold;">&#40;</span>C<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000;">2002</span>-<span style="color: #000000;">2009</span>, and GNU GPLd, by Julian Seward et al.
==<span style="color: #000000;">16546</span>== Using Valgrind-3.6.0.SVN-Debian and LibVEX; rerun with <span style="color: #660033;">-h</span> <span style="color: #000000; font-weight: bold;">for</span> copyright info
==<span style="color: #000000;">16546</span>== Command: .<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">test</span>
==<span style="color: #000000;">16546</span>==
<span style="color: #000000;">1</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000;">2</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000;">3</span> = <span style="color: #000000;">6</span>
<span style="color: #000000;">1</span> + <span style="color: #000000;">2</span> + <span style="color: #000000;">3</span> = <span style="color: #000000;">6</span>
<span style="color: #000000;">4</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000;">5</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000;">6</span> = <span style="color: #000000;">120</span>
<span style="color: #000000;">4</span> + <span style="color: #000000;">5</span> + <span style="color: #000000;">6</span> = <span style="color: #000000;">15</span>
<span style="color: #000000;">7</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000;">8</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000;">9</span> = <span style="color: #000000;">504</span>
<span style="color: #000000;">7</span> + <span style="color: #000000;">8</span> + <span style="color: #000000;">9</span> = <span style="color: #000000;">24</span>
==<span style="color: #000000;">16546</span>==
==<span style="color: #000000;">16546</span>== HEAP SUMMARY:
==<span style="color: #000000;">16546</span>==     <span style="color: #000000; font-weight: bold;">in</span> use at <span style="color: #7a0874; font-weight: bold;">exit</span>: <span style="color: #000000;">0</span> bytes <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000;">0</span> blocks
==<span style="color: #000000;">16546</span>==   total heap usage: <span style="color: #000000;">0</span> allocs, <span style="color: #000000;">0</span> frees, <span style="color: #000000;">0</span> bytes allocated
==<span style="color: #000000;">16546</span>==
==<span style="color: #000000;">16546</span>== All heap blocks were freed <span style="color: #660033;">--</span> no leaks are possible
==<span style="color: #000000;">16546</span>==
==<span style="color: #000000;">16546</span>== For counts of detected and suppressed errors, rerun with: <span style="color: #660033;">-v</span>
==<span style="color: #000000;">16546</span>== ERROR SUMMARY: <span style="color: #000000;">0</span> errors from <span style="color: #000000;">0</span> contexts <span style="color: #7a0874; font-weight: bold;">&#40;</span>suppressed: <span style="color: #000000;">4</span> from <span style="color: #000000;">4</span><span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></div></div>

<p><em>Holy s**t</em>. That just worked.</p>
<p>I don&#8217;t often get surprised by code that I write. After all, if I am writing it, it means I understand it (most of the time). This example; however, completely flabbergasted me. Being able to store the pointer to a function, and a pointer to the arguments to the function in an array means I can do all sorts of things. I could develop a signals and slots mechanism, I can pass table-local contexts to function pointers, hell, I could rule the world. I couldn&#8217;t find anything else like this on the web &#8211; so I thought I would share!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.adamrisi.com/?feed=rss2&#038;p=142</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The easiest way to use a Cricket A600 under Ubuntu (and any other linux)</title>
		<link>http://www.adamrisi.com/?p=138</link>
		<comments>http://www.adamrisi.com/?p=138#comments</comments>
		<pubDate>Sun, 03 Jan 2010 01:48:47 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.adamrisi.com/?p=138</guid>
		<description><![CDATA[The Cricket A600 is a cheap, little broadband USB device &#8211; but it has been the source of major headaches for some people. Especially those trying to set it up under linux. Well, after trying many things, and failing many times, I have found an elegant and command based way of getting on the web. [...]]]></description>
			<content:encoded><![CDATA[<p>The Cricket A600 is a cheap, little broadband USB device &#8211; but it has been the source of major headaches for some people. Especially those trying to set it up under linux. Well, after trying many things, and failing many times, I have found an elegant and command based way of getting on the web. </p>
<p>First, get this file: <a href='http://www.ubuntugeek.com/images/Cricket_Mode_Switch.tar.gz' >Cricket flip-flopper</a> Compile it up (or use the precompiled 32 bit binaries), and install it. Keep the extracted files handy.</p>
<p>Drop in the A600, and wait for it to show up as a CDROM drive. In the previously extracted files, run &#8220;sudo ./flipflop.sh&#8221;. Let it finish.</p>
<p>Check dmesg to make sure you saw &#8220;ttyACM0&#8243; go by at some point. Grep is good for this. </p>
<p>Lastly, install wvdial, and use the following in your /etc/wvdial.conf :</p>
<p>&#8230;<br />
Modem = /dev/ttyACM0<br />
Phone = #777<br />
&#8230;</p>
<p>Exec <strong>sudo wvdial</strong>, and off you go!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.adamrisi.com/?feed=rss2&#038;p=138</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tiny Little DNS Server has a new home (picodns update)</title>
		<link>http://www.adamrisi.com/?p=137</link>
		<comments>http://www.adamrisi.com/?p=137#comments</comments>
		<pubDate>Thu, 12 Nov 2009 05:08:16 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[DNS server]]></category>

		<guid isPermaLink="false">http://www.adamrisi.com/?p=137</guid>
		<description><![CDATA[As I program more, I discover the true value of a repository is very, very high. So, I decided to move picodns, my little DNS server project, over to github, where it will be preserved for anyone just in case my server goes down. PicoDNS also features extensive user documentation. Not to mention github is [...]]]></description>
			<content:encoded><![CDATA[<p>As I program more, I discover the true value of a repository is very, very high. So, I decided to move picodns, my <a href="http://www.adamrisi.com/?p=45">little DNS server project</a>, over to github, where it will be preserved for anyone just in case my server goes down. PicoDNS also features <a href="http://github.com/ajrisi/picodns/raw/master/UserDocs.pdf">extensive user documentation</a>.</p>
<p>Not to mention github is awesome.</p>
<p>git clone git://github.com/ajrisi/picodns.git</p>
]]></content:encoded>
			<wfw:commentRss>http://www.adamrisi.com/?feed=rss2&#038;p=137</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>lsif goes v2.0</title>
		<link>http://www.adamrisi.com/?p=136</link>
		<comments>http://www.adamrisi.com/?p=136#comments</comments>
		<pubDate>Thu, 12 Nov 2009 04:30:03 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[list network interfaces]]></category>
		<category><![CDATA[LSIF]]></category>

		<guid isPermaLink="false">http://www.adamrisi.com/?p=136</guid>
		<description><![CDATA[The software I contributed, and blogged about a while ago has gone v2.0. The newly modified source code now compiles and works on a larger variety of linux systems. The purpose of the software is essentially to list the network interfaces, their IP address, and whatever their IP address resolves into. It&#8217;s just a single [...]]]></description>
			<content:encoded><![CDATA[<p>The software I contributed, and <a href="http://www.adamrisi.com/?p=84">blogged about</a> a while ago has gone v2.0. The newly modified source code now compiles and works on a larger variety of linux systems.</p>
<p>The purpose of the software is essentially to list the network interfaces, their IP address, and whatever their IP address resolves into. It&#8217;s just a single file of delicious C code, and it works like a charm. Check it out!</p>
<p>git clone git://github.com/ajrisi/lsif.git</p>
]]></content:encoded>
			<wfw:commentRss>http://www.adamrisi.com/?feed=rss2&#038;p=136</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
