<?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">

 <title>Francisco Soto - ebobby.org</title>
 
 <link href="http://ebobby.org/" />
 <updated>2012-05-27T13:31:30-07:00</updated>
 <id>http://ebobby.org/</id>
 <author>
   <name>Francisco Soto</name>
   <email>ebobby@ebobby.org</email>
 </author>

 
 <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/ebobbydotorg" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="ebobbydotorg" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry>
   <title>Scratching your own needs and open source</title>
   <link href="http://ebobby.org/2012/05/20/Scratching-your-own-needs-and-open-source.html" />
   <updated>2012-05-20T00:00:00-07:00</updated>
   <id>http://ebobby.org/2012/05/20/Scratching-your-own-needs-and-open-source</id>
   <content type="html">&lt;h2&gt;Scratching your own needs and open source&lt;/h2&gt;
&lt;p&gt;&lt;span class="label important"&gt;20 May 2012&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="http://ebobby.org/img/beanie.png" class="left rounded-img" title="FreeBSD Beanie Daemon" alt="FreeBSD Beanie Daemon" /&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#8217;ve been thinking recently about how hard it feels to contribute to an open source project and by that I don&amp;#8217;t mean that open source makes it hard for you, &lt;em&gt;au contraire&lt;/em&gt;, some of them try to make it as easy for you to do it as possible, sites like &lt;a href="http://www.github.com"&gt;github&lt;/a&gt;, &lt;a href="http://www.codeplex.com"&gt;codeplex&lt;/a&gt;, &lt;a href="http://code.google.com/hosting/"&gt;google project hosting&lt;/a&gt;, etc., give you and developers the tools to build an open source project and try to foster a community around it.&lt;/p&gt;
&lt;p&gt;I think one of the main motivations people have to contribute for creating and contributing to open source projects is having a need. You need something and you simply do not find something that solves your need in the market (or you can&amp;#8217;t pay for it) and create an open source project, or maybe there&amp;#8217;s a project somewhere that almost solves it and it just needs a little push so you contribute. You need to use it to be able to be an effective contributor, and most of the time, you use it because you need it.&lt;/p&gt;
&lt;p&gt;You can find a lot of examples of this but the canonical example is &lt;a href="http://en.wikipedia.org/wiki/Linus_Torvalds"&gt;Linus Torvalds&lt;/a&gt; starting &lt;a href="http://en.wikipedia.org/wiki/Linux"&gt;Linux&lt;/a&gt; because he wanted to run Unix on his 386 and his only option at the time was &lt;a href="http://www.minix3.org/"&gt;&lt;span class="caps"&gt;MINIX&lt;/span&gt;&lt;/a&gt; and he was frustrated by its licensing.&lt;/p&gt;
&lt;p&gt;Nowadays of course, most people don&amp;#8217;t have a need to build an OS from scratch (do &lt;a href="http://www.loper-os.org/"&gt;they&lt;/a&gt;?), so they build other fancy things like &lt;a href="http://redis.io"&gt;Redis&lt;/a&gt; or &lt;a href="http://rubyonrails.org/"&gt;Ruby On Rails&lt;/a&gt; which again, were started to scratch a need and people have been adopting in en masse because they had that pain too.&lt;/p&gt;
&lt;p&gt;Funny thing is, we look at these examples and think that a successful contribution or a successful project has to be a complex piece of software that solves the needs of millions, or contributing to a project involves being a genius, nothing far from the truth, lots of open source projects thrive with the contributions of every day developers like you and me caring enough to research a bit and be interested in helping.&lt;/p&gt;
&lt;p&gt;When I was in college, a few years ago, I used &lt;a href="http://www.freebsd.org"&gt;FreeBSD&lt;/a&gt; on my personal computer which was a bit of a problem because the school machines and my professors used Windows machines. So when I was developing something (mostly in C back then) it had to compile and be able to run in Windows. For the most part this isn&amp;#8217;t very hard to do if you stick to &lt;a href="http://en.wikipedia.org/wiki/ANSI_C"&gt;&lt;span class="caps"&gt;ANSI&lt;/span&gt; C&lt;/a&gt; which suffices for most of your average school projects. That is, until you try to do something fancy&amp;#8230;&lt;/p&gt;
&lt;p&gt;As part of my AI class, we analyzed several &lt;a href="http://en.wikipedia.org/wiki/Combinatorial_optimization"&gt;combinatorial optimization&lt;/a&gt; algorithms and tried to solve different problems with them, one of the problems of choice was the &lt;a href="http://en.wikipedia.org/wiki/Eight_queens_puzzle"&gt;8 queen puzzle&lt;/a&gt; which basically consists on coming up with arrangement of 8 queens in a regular chess board so that no two queens can attack each other.&lt;/p&gt;
&lt;p&gt;At the end of the semester I decided to present as a final project a version of all the algorithms we saw trying to solve this problem but instead of having only print outs of numbers or strings as a solution, to actually have a 3D chess board and the queens moving from place to place as the algorithms worked on the problem so it would be more visual and more &lt;a href="http://franciscosoto.net/jsqueens"&gt;interesting&lt;/a&gt; to look at. I coded this using C and &lt;a href="http://www.opengl.org/"&gt;OpenGL&lt;/a&gt; under FreeBSD and since I needed to compile it under Windows too I used &lt;a href="http://www.opengl.org/resources/libraries/glut/"&gt;&lt;span class="caps"&gt;GLUT&lt;/span&gt;&lt;/a&gt; to handle my windowing and input needs.&lt;/p&gt;
&lt;p&gt;The way I went was using the &lt;a href="http://www.mesa3d.org/"&gt;Mesa 3D&lt;/a&gt; library which at the time was at its 5.* version, but in FreeBSD&amp;#8217;s &lt;a href="http://www.freebsd.org/ports/"&gt;ports&lt;/a&gt; the available version was 3.* (called Mesa3) which for some reason would not work in my machine, the window opened and the program ran and I got output on my terminal but the display would be always black and I struggled with this for a while but it really pissed me off that with a hand compiled current (at the time!) Mesa 5.* version it would work flawlessly.&lt;br /&gt;
The reason it pissed me off is because I have never liked manually installing things in my *nix systems, if you want to remove them you have to look for the files, read the Makefile, etc. I always try to use the package manager or I feel my system as &amp;#8220;unclean&amp;#8221;.&lt;/p&gt;
&lt;p&gt;So, in order to be able to use Mesa5 and still feel somewhat clean was to make it a package, so I did, I copied the Mesa3 port directory to a new Mesa5 directory and changed the Makefile (and I do not remember if I had to change the patch files a little bit too) to work with Mesa 5.*. I got my project running, able to compile correctly under FreeBSD and Windows and got an A+ on my AI class.&lt;/p&gt;
&lt;p&gt;I also sent the files to FreeBSD (I do not recall what medium I used), I thought they were going to ignore them and I thought they did because I never actually got an answer.&lt;/p&gt;
&lt;p&gt;Here&amp;#8217;s the kicker, years later, as I was googling around my old email address for reasons I do not remember, I found out a series of emails about my commit!, they actually &lt;a href="http://lists.freebsd.org/pipermail/cvs-ports/2003-October/014219.html"&gt;received&lt;/a&gt; it and considering making me the &lt;a href="http://lists.freebsd.org/pipermail/cvs-ports/2003-October/014238.html"&gt;maintainer&lt;/a&gt; of a newly created &lt;strong&gt;mesagl&lt;/strong&gt; port (mine was called &lt;strong&gt;Mesa5&lt;/strong&gt; I guess mesagl was created by another guy with my same problem) until another guy came with another &lt;a href="http://lists.freebsd.org/pipermail/cvs-ports/2003-October/014242.html"&gt;update&lt;/a&gt; that was better. I never found out when it was actually happening because I wasn&amp;#8217;t in the mailing list (which is one of the first things they ask you to do if you are going to commit stuff, my mistake).&lt;/p&gt;
&lt;p&gt;So that&amp;#8217;s the way I &lt;em&gt;almost&lt;/em&gt; became a FreeBSD port maintainer. Maybe if I go back to FreeBSD at some point (using archlinux now) Ill try to get to maintain a port.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ebobbydotorg/~4/xfOdEeYnWhY" height="1" width="1"/&gt;</content>
 </entry>
 
 <entry>
   <title>Structure and Interpretation of Computer Programs</title>
   <link href="http://ebobby.org/2012/05/02/SICP.html" />
   <updated>2012-05-02T00:00:00-07:00</updated>
   <id>http://ebobby.org/2012/05/02/SICP</id>
   <content type="html">&lt;h2&gt;Structure and Interpretation of Computer Programs&lt;/h2&gt;
&lt;p&gt;&lt;span class="label important"&gt;02 May 2012&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="http://ebobby.org/img/sicp.jpg" class="left rounded-img" title="The book" alt="The book" /&gt;&lt;br /&gt;
With my recent motivations to learn Lisp, I&amp;#8217;ve been feeling reconnected (or finally connected) to what Computer Science is really all about. This has given me a new interest in picking up on my math again and learn properly all of the math I should had groked back in college. The math that gives you the tools to be a better programmer, computer scientist, and thinker in general.&lt;/p&gt;
&lt;p&gt;In order to start this and get the ball rolling, I am going to (finally) read &lt;a href="http://www.amazon.com/Structure-Interpretation-Computer-Programs-Second/dp/0070004846%3FSubscriptionId%3DAKIAJHTAM7STAKSLLXRQ%26tag%3Dbookistics-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D0070004846" title="Amazon"&gt;Structure and Interpretation Of Computer Programs&lt;/a&gt;, this book has been in my shelf for a few years and I never actually got to sit and read it thoughtfully, maybe I wasn&amp;#8217;t ready or maybe I am not smart enough to read it, but I will give it a serious shot this time, and as I work through the exercises, I am pretty sure I will be having to consult and read about math, since at least the first chapter exercises seem to be mostly math related.&lt;/p&gt;
&lt;p&gt;I created a Github repository where I will be putting the &lt;a href="https://github.com/ebobby/sicp-exercises" title="Github"&gt;source code&lt;/a&gt; of my solutions to the exercises in case you are interested in them.&lt;/p&gt;
&lt;p&gt;After this I would probably tackle as many exercises in the &lt;a href="http://projecteuler.net/" title="Website"&gt;Euler Project&lt;/a&gt; as I can, that will certainly be a good exercise in coding and mathematics in general.&lt;/p&gt;
&lt;p&gt;I will be definitely writing about how I do and what I learn and the pieces I find most interesting as I go.&lt;/p&gt;
&lt;h4&gt;Exercises:&lt;/h4&gt;
&lt;h5&gt;Chapter 1&lt;/h5&gt;
&lt;p&gt;&lt;a href="https://github.com/ebobby/sicp-exercises/blob/master/chapter-1/1.2.scm"&gt;1.2&lt;/a&gt;, &lt;a href="https://github.com/ebobby/sicp-exercises/blob/master/chapter-1/1.3.scm"&gt;1.3&lt;/a&gt;, &lt;a href="https://github.com/ebobby/sicp-exercises/blob/master/chapter-1/1.4.scm"&gt;1.4&lt;/a&gt;, &lt;a href="https://github.com/ebobby/sicp-exercises/blob/master/chapter-1/1.5.scm"&gt;1.5&lt;/a&gt;, &lt;a href="https://github.com/ebobby/sicp-exercises/blob/master/chapter-1/1.6.scm"&gt;1.6&lt;/a&gt;, &lt;a href="https://github.com/ebobby/sicp-exercises/blob/master/chapter-1/1.7.scm"&gt;1.7&lt;/a&gt;, &lt;a href="https://github.com/ebobby/sicp-exercises/blob/master/chapter-1/1.8.scm"&gt;1.8&lt;/a&gt;, &lt;a href="https://github.com/ebobby/sicp-exercises/blob/master/chapter-1/1.9.scm"&gt;1.9&lt;/a&gt;, &lt;a href="https://github.com/ebobby/sicp-exercises/blob/master/chapter-1/1.10.scm"&gt;1.10&lt;/a&gt;, &lt;a href="https://github.com/ebobby/sicp-exercises/blob/master/chapter-1/1.11.scm"&gt;1.11&lt;/a&gt;, &lt;a href="https://github.com/ebobby/sicp-exercises/blob/master/chapter-1/1.12.scm"&gt;1.12&lt;/a&gt;, &lt;a href="https://github.com/ebobby/sicp-exercises/blob/master/chapter-1/1.16.scm"&gt;1.16&lt;/a&gt;, &lt;a href="https://github.com/ebobby/sicp-exercises/blob/master/chapter-1/1.17.scm"&gt;1.17&lt;/a&gt;, &lt;a href="https://github.com/ebobby/sicp-exercises/blob/master/chapter-1/1.18.scm"&gt;1.18&lt;/a&gt;, &lt;a href="https://github.com/ebobby/sicp-exercises/blob/master/chapter-1/1.22.scm"&gt;1.22&lt;/a&gt;, &lt;a href="https://github.com/ebobby/sicp-exercises/blob/master/chapter-1/1.23.scm"&gt;1.23&lt;/a&gt;, &lt;a href="https://github.com/ebobby/sicp-exercises/blob/master/chapter-1/1.29.scm"&gt;1.29&lt;/a&gt;, &lt;a href="https://github.com/ebobby/sicp-exercises/blob/master/chapter-1/1.30.scm"&gt;1.30&lt;/a&gt;&lt;/p&gt;
&lt;h5&gt;Chapter 2&lt;/h5&gt;
&lt;p&gt;&lt;a href="https://github.com/ebobby/sicp-exercises/blob/master/chapter-2/huffman-encoding-trees.scm"&gt;Huffman encoding trees&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ebobbydotorg/~4/1lzSnDFoqZE" height="1" width="1"/&gt;</content>
 </entry>
 
 <entry>
   <title>Lisping and the word ladder puzzle</title>
   <link href="http://ebobby.org/2012/04/18/Lisping-and-the-word-ladder-puzzle.html" />
   <updated>2012-04-18T00:00:00-07:00</updated>
   <id>http://ebobby.org/2012/04/18/Lisping-and-the-word-ladder-puzzle</id>
   <content type="html">&lt;h2&gt;Lisping and the word ladder puzzle&lt;/h2&gt;
&lt;p&gt;&lt;span class="label important"&gt;18 April 2012&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="http://ebobby.org/img/lisplogo_warning_256.png" class="left rounded-img" title="ty" alt="ty" /&gt;&lt;br /&gt;
I want to talk about &lt;strong&gt;Lisp&lt;/strong&gt; because so far I can say that I am really loving it and I will certainly be spending more time with it and learning about it.&lt;/p&gt;
&lt;p&gt;Allow me to quickly tell you about a little nice puzzle:&lt;/p&gt;
&lt;h4&gt;Word ladder Puzzle&lt;/h4&gt;
&lt;p&gt;This &lt;a href="http://en.wikipedia.org/wiki/Word_ladder" title="Wikipedia"&gt;puzzle&lt;/a&gt; was invented by &lt;a href="http://en.wikipedia.org/wiki/Lewis_Carroll" title="Wikipedia"&gt;Lewis Carroll&lt;/a&gt; a long time ago, the puzzle is defined by three elements, a language (for our purposes a dictionary with plenty of words of the same length), a &lt;em&gt;start word&lt;/em&gt; and an &lt;em&gt;end word&lt;/em&gt;. The goal is to find a path between the two words by changing a single character at the time, and the resulting words from such change have to be valid words in the given language.&lt;/p&gt;
&lt;p&gt;Example for &lt;span class="caps"&gt;HOME&lt;/span&gt; and &lt;span class="caps"&gt;MEAL&lt;/span&gt;:&lt;/p&gt;
&lt;p&gt;&lt;span class="caps"&gt;HOME&lt;/span&gt; &amp;#8594; &lt;span class="caps"&gt;HOLE&lt;/span&gt; &amp;#8594; &lt;span class="caps"&gt;HOLD&lt;/span&gt; &amp;#8594; &lt;span class="caps"&gt;HELD&lt;/span&gt; &amp;#8594; &lt;span class="caps"&gt;HEAD&lt;/span&gt; &amp;#8594; &lt;span class="caps"&gt;HEAL&lt;/span&gt; &amp;#8594; &lt;span class="caps"&gt;MEAL&lt;/span&gt;&lt;/p&gt;
&lt;h4&gt;Solving it&lt;/h4&gt;
&lt;p&gt;So, armed with my new rudimentary skills of &lt;a href="http://en.wikipedia.org/wiki/Common_Lisp" title="Wikipedia"&gt;Common Lisp&lt;/a&gt; I decided to write a Lisp solver of this puzzle. The &lt;a href="https://github.com/ebobby/word-ladder" title="github"&gt;code&lt;/a&gt; is in Github, along with a ruby implementation I wrote a while ago. I will reproduce the Lisp version here in order to explain the way I solved it, maybe I can pique your interest and you want to learn about it too.&lt;/p&gt;
&lt;p&gt;First, we have to have some dictionaries handy, I already have &lt;a href="https://github.com/ebobby/word-ladder/tree/master/dictionaries" title="Github"&gt;some&lt;/a&gt; up in github that you can download. Now that we have a nice dictionary, we have to read it and have it handy, in Common Lisp:&lt;br /&gt;
&lt;br /&gt;&lt;/p&gt;
&lt;pre class="brush: clisp"&gt;
(defparameter *dictionary* ())

(defun read-dictionary-file (fname)
  (with-open-file (stream fname)
    (loop for line = (read-line stream nil 'foo)
       until (eq line 'foo)
       collect line)))

(defun initialize-dictionary (fname)
  (let* ((dictionary (read-dictionary-file fname))
         (first-len (length (first dictionary))))
    (setq *dictionary*
          (remove-if-not (lambda (word)
                           (eql (length word)
                                first-len))
                         dictionary))))
&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;
The first line simply defines a global variable named *dictionary* (the * around the name is a naming convention) to be an empty list. Then we declare two functions:&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;read-dictionary-file&lt;/dt&gt;
&lt;dd&gt;
&lt;p&gt;Opens the file with the given filename, reads every line and returns them as a list.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;initialize-dictionary&lt;/dt&gt;
&lt;dd&gt;
&lt;p&gt;Calls read-dictionary-file and stores the given list in a local variable, then it gets the length of the first word in the dictionary and removes every word from the list if its length is not equals, a basic check, finally it saves the result into the *dictionary* global variable.&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;If you have a flavor of Common Lisp installed, we can already test this functions in the &lt;a href="http://en.wikipedia.org/wiki/Read–eval–print_loop" title="Wikipedia"&gt;read-print-eval-loop&lt;/a&gt; (I am currently using &lt;a href="http://www.clisp.org/" title="CLISP website"&gt;clisp&lt;/a&gt;):&lt;br /&gt;
&lt;/br&gt;&lt;/p&gt;
&lt;pre class="brush: clisp"&gt;
[10]&amp;gt; (initialize-dictionary "dictionaries/four-char-dictionary.txt")
("mitt" "that" "with" "they" "this" "have" "from" "word" "what" "were" "when"...

[11]&amp;gt; *dictionary*
("mitt" "that" "with" "they" "this" "have" "from" "word" ...

[12]&amp;gt; (length *dictionary*)
923
&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Now that we have our dictionary handy, let&amp;#8217;s think a bit about the problem. We want to find a way between two given words, we start from one word, how do we know what our options are to move from a word to another?&lt;/p&gt;
&lt;p&gt;A way to visualize this problem is as a &lt;a href="http://en.wikipedia.org/wiki/Graph_(mathematics)" title="Wikipedia"&gt;graph&lt;/a&gt;, where every word is represented as node and the edges connect nodes which are apart only by a single character.&lt;/p&gt;
&lt;p&gt;For example, in a dictionary with english words of four characters, the word &amp;#8220;home&amp;#8221; has the following neighbors:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://ebobby.org/img/home-nodes.png" class="post" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Here&amp;#8217;s the code to find the neighbors of a word in our dictionary in Lisp:&lt;br /&gt;
&lt;br /&gt;&lt;/p&gt;
&lt;pre class="brush: clisp"&gt;
(defun one-apart-p (w1 w2)
  (and (eql (length w1) (length w2))
       (= 1 (loop
               for c1 across w1
               for c2 across w2
               count (not (equalp c1 c2))))))

(defun find-neighbors (word dictionary)
  (when (member word dictionary :test #'equalp)
    (remove-if-not (lambda (x)
                     (one-apart-p word x))
                   dictionary)))
&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;one-apart-p&lt;/dt&gt;
&lt;dd&gt;
&lt;p&gt;It&amp;#8217;s a predicate, that is, it returns true or false. It is a convention in Common Lisp to suffix predicate functions with &lt;em&gt;-p&lt;/em&gt;. What it does is that given two words, it loops across them counting how many differences they have. If they have only one difference it returns true, else false.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;find-neighbors&lt;/dt&gt;
&lt;dd&gt;
&lt;p&gt;Takes a word and a dictionary and returns a list of all the words in the given dictionary that are one character apart from the given word. All its neighbors!&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;Running the code:&lt;br /&gt;
&lt;br /&gt;&lt;/p&gt;
&lt;pre class="brush: clisp"&gt;
[61]&amp;gt; (find-neighbors "home" *dictionary*)
("some" "come" "hole" "hope" "hose" "Rome")
&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Now that we can find the adjacent words for each word in our dictionary, we can find our ladders. There are two basic ways to traverse the graph, which are:&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;Breadth-first&lt;/dt&gt;
&lt;dd&gt;
&lt;p&gt;We check the current level before moving onto the next one, that is, we check if our target word is in the neighbors list, in our example, &lt;strong&gt;home&lt;/strong&gt; to &lt;strong&gt;meal&lt;/strong&gt; we check if meal is in the neighbors of &lt;strong&gt;home&lt;/strong&gt;, it is not so the next step is to move one level down, we do this by having a list of all the neighbors of the neighbors (recursivity), then we check again, if not we move down another level and so on. &lt;a href="http://en.wikipedia.org/wiki/Breadth-first_search" title="Wikipedia"&gt;Wikipedia&lt;/a&gt;&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;Depth-first&lt;/dt&gt;
&lt;dd&gt;
&lt;p&gt;We get our list of neighbors, then we check against the first one, if it is not our target, we get its list of neighbors, check against the first one, if not we get its list of neighbors&amp;#8230; you see what I mean, basically, you go as deep as you can in the graph, if you hit a dead-end you go back to a level where you have more neighbors and then you go deep on that too. Wikipedia has some nice animated gifs showing how this works. &lt;a href="http://en.wikipedia.org/wiki/Depth-first_search" title="Wikipedia"&gt;Wikipedia&lt;/a&gt;&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;In my implementation I chose breadth-first, is way faster than depth-first for this particular problem, other problems may be better served by a depth-first approach.&lt;/p&gt;
&lt;p&gt;The code:&lt;br /&gt;
&lt;br /&gt;&lt;/p&gt;
&lt;pre class="brush: clisp"&gt;
(defun find-ladder (first second dictionary)
  (labels ((follow-ladders (ladders visited)
             (let ((already-visited (nconc visited
                                           (mapcar #'first ladders)))
                   (matching-ladder (find-if (lambda (ladder)
                                               (equalp second (first ladder)))
                                             ladders)))
               (if matching-ladder
                   matching-ladder
                   (follow-ladders (mapcan (lambda (ladder)
                                             (mapcar (lambda (neighbor)
                                                       (cons neighbor ladder))
                                                     (set-difference (find-neighbors (first ladder) dictionary)
                                                                     already-visited
                                                                     :test #'equalp)))
                                           ladders)
                                   already-visited)))))
    (follow-ladders (list (list first)) nil)))
&lt;/pre&gt;
&lt;p&gt;A bit long, but basically we are given two words and the dictionary, we define a local function with the labels keyword, this allows the function to call itself recursively.&lt;/p&gt;
&lt;p&gt;Our local function takes two parameters, &lt;em&gt;ladders&lt;/em&gt; and &lt;em&gt;visited&lt;/em&gt;. Ladders is a list of lists where the first element is the word to follow, the function also creates two local variables, &lt;em&gt;already-visited&lt;/em&gt; which holds a list of the nodes we have already checked and &lt;em&gt;matching-ladder&lt;/em&gt; which checks if there is already a complete ladder.&lt;/p&gt;
&lt;p&gt;If the ladder is found then return it and we are done. If not, &lt;em&gt;follow-ladders&lt;/em&gt; calls itself recursively by adding the neighbors of all the current words to our ladders, always checking against &lt;em&gt;already-visited&lt;/em&gt; so we don&amp;#8217;t follow the same node twice.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;find-ladder&lt;/em&gt; basically calls the local function by creating a list with the first word and an empty list of visited nodes.&lt;/p&gt;
&lt;p&gt;Running the code:&lt;br /&gt;
&lt;br /&gt;&lt;/p&gt;
&lt;pre class="brush: clisp"&gt;
[62]&amp;gt; (find-ladder "home" "meal" *dictionary*)
("meal" "heal" "head" "held" "hold" "hole" "home")
&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;
And that&amp;#8217;s it! A breadth-first solver for the word ladder puzzle.&lt;/p&gt;
&lt;h4&gt;Closing remarks&lt;/h4&gt;
&lt;p&gt;One of the first shocks for programmers like me, accustomed to imperative languages (at the time of this writing I do C# for a living) is that there are too many &lt;a href="http://symbo1ics.com/blog/?p=275" title="Lisp has too many parenthesis"&gt;parenthesis&lt;/a&gt;, but then I realized (thanks to &lt;a href="http://www.amazon.com/Land-Lisp-Learn-Program-Game/dp/1593272812%3FSubscriptionId%3DAKIAJHTAM7STAKSLLXRQ%26tag%3Dws%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D1593272812" title="Amazon"&gt;Land Of Lisp&lt;/a&gt;) that they are simply lists of lists (or trees). Lisp is very homoiconic, which is a fancy word to say that the representation of the program is a primitive type of the programming language itself, this has the natural consequence of Lisp being able to process Lisp code itself, which is the concept of macros (unlike languages like C where a macro is simply text substitution), in Lisp functions take values and return values (as in every language) but macros take Lisp code and return Lisp code.&lt;/p&gt;
&lt;p&gt;I am really liking Lisp, I will certainly be using it as often as I can to solve anything I can get my hands on to improve my almost non-existent skills. Which, if you are an amazing Lisper, please do not be offended if my code sucks, I am trying to learn, feel free to send me an email with any suggestion you may have!&lt;/p&gt;
&lt;p&gt;Which reminds me, I would like to thank &lt;a href="http://www.gigamonkeys.com/" title="gigamonkeys"&gt;Peter Seibel&lt;/a&gt;, author of &lt;a href="http://www.amazon.com/Coders-Work-Reflections-Craft-Programming/dp/1430219483%3FSubscriptionId%3DAKIAJHTAM7STAKSLLXRQ%26tag%3Dws%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D1430219483" title="Amazon"&gt;Coders at Work&lt;/a&gt; and &lt;a href="http://www.amazon.com/Practical-Common-Lisp-Peter-Seibel/dp/1590592395%3FSubscriptionId%3DAKIAJHTAM7STAKSLLXRQ%26tag%3Dbookistics-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D1590592395" title="Amazon"&gt;Practical Common Lisp&lt;/a&gt; because he took the time to look at my original code and give me some very useful tips after I bugged him on &lt;span class="caps"&gt;IRC&lt;/span&gt; (go read his books, they are great).&lt;/p&gt;
&lt;p&gt;Thank you Peter!&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ebobbydotorg/~4/pPifyjacw3c" height="1" width="1"/&gt;</content>
 </entry>
 
 <entry>
   <title>I shall learn Lisp</title>
   <link href="http://ebobby.org/2012/03/18/I-shall-learn-lisp.html" />
   <updated>2012-03-18T00:00:00-07:00</updated>
   <id>http://ebobby.org/2012/03/18/I-shall-learn-lisp</id>
   <content type="html">&lt;h2&gt;I shall learn Lisp&lt;/h2&gt;
&lt;p&gt;&lt;span class="label important"&gt;18 Mar 2012&lt;/span&gt;&lt;br /&gt;
&lt;img src="http://ebobby.org/img/babel.jpg" class="left rounded-img" title="Babel Tower" alt="Babel Tower" /&gt;&lt;br /&gt;
I&amp;#8217;ve been meaning to do this for a long time, finally get to learn &lt;a href="http://en.wikipedia.org/wiki/Lisp" title="Wikipedia"&gt;Lisp&lt;/a&gt;, but for whatever reason I always end up procrastinating in this particular endeavor (and in others as well).&lt;/p&gt;
&lt;p&gt;Everybody that already know Lisp say the same thing, that learning Lisp will forever change you as a programmer, this may seem over hyped but I truly believe such thing is possible, that learning a particular language can forever change the way you think about programming. I&amp;#8217;ve felt such thing with a language I learned a long time ago: &lt;a href="http://en.wikipedia.org/wiki/X86_assembly_language" title="Wikipedia"&gt;x86 assembly language&lt;/a&gt;, maybe not to the degree of Lisp, enlightening in the ways of computation, but I certainly have benefited a lot from my experience with assembly.&lt;/p&gt;
&lt;p&gt;When I was learning to program, I wanted to make games, and I started learning  &lt;a href="http://en.wikipedia.org/wiki/QuickBASIC" title="Wikipedia"&gt;QuickBasic&lt;/a&gt;, after some time I found it to be very slow to do anything interesting in the computer I had at the time (80386SX, 2MB &lt;span class="caps"&gt;RAM&lt;/span&gt;), the game coding community in QB back then suggested using a game programming library coded in assembly, there were many available (it was a very thriving community at the time), after playing with some, of course, I wanted to make my own, and &lt;a href="https://github.com/ebobby/CosmoX-Library" title="GitHub"&gt;CosmoX&lt;/a&gt; was born.&lt;/p&gt;
&lt;p&gt;At first it had a very humble beginning but I found learning assembly and making my own graphic routines very fun, so I kept going and going, I began learning many intricacies of &lt;a href="http://en.wikipedia.org/wiki/MS-DOS" title="Wikipedia"&gt;MS-&lt;span class="caps"&gt;DOS&lt;/span&gt;&lt;/a&gt; programming, like &lt;a href="http://en.wikipedia.org/wiki/Expanded_memory" title="Wikipedia"&gt;Expanded Memory&lt;/a&gt; and &lt;a href="http://en.wikipedia.org/wiki/Extended_memory" title="Wikipedia"&gt;Extended Memory&lt;/a&gt;, I learned about 3D mathematics and added a matrix/vector math module using the &lt;span class="caps"&gt;FPU&lt;/span&gt;, custom &amp;#8220;drivers&amp;#8221; for the mouse/keyboard, so after a while, CosmoX got a bit popular in the QB community and some people/games began using it, talking about it, etc, it was a small community, but few times after that I&amp;#8217;ve felt so much pride.&lt;/p&gt;
&lt;p&gt;Now after all that reminiscence, the point at hand, I spent all those long nights learning assembly, crashing my computer and then trying to find what piece of code that was misbehaving (not an easy to do task when you are in &lt;span class="caps"&gt;MSDOS&lt;/span&gt; and a bad instruction meant a reboot), learning about how the machine worked, optimization, learning obsolete technologies (all this happened in 2000-2001) I was left with a lot of experience that may not applicable in every day work but it certainly helps.&lt;/p&gt;
&lt;p&gt;Every line of code I write, in any language, C#, Java, C, even Javascript or &lt;span class="caps"&gt;SQL&lt;/span&gt;, I cannot stop thinking about the very metal of the machine. How is this language going to do this? How much memory is this going to use? How are the final instructions that the &lt;span class="caps"&gt;CPU&lt;/span&gt; is going to execute going to look like?&lt;/p&gt;
&lt;p&gt;I&amp;#8217;m forever cursed with X-ray vision into the innards of the machine and although I am no expert, I am pretty sure it certainly helps me write more effective code, code that benefits the most of the abstractions offered to me by my tools, because, most of the time, I know what the abstractions are trying to help me with, what they are shielding me from, and instead of blindly using them without a clue, I wield them effectively as I know what lies beneath them.&lt;/p&gt;
&lt;p&gt;Armed with my faithful archlinux based netbook, Common Lisp, and a copy of &lt;a href="http://www.amazon.com/Land-Lisp-Learn-Program-Game/dp/1593272812%3FSubscriptionId%3DAKIAJHTAM7STAKSLLXRQ%26tag%3Dws%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D1593272812" title="Amazon"&gt;Land Of Lisp&lt;/a&gt; I plan on learning Lisp.&lt;/p&gt;
&lt;p&gt;I will embark in the journey of Lisp learning in order to get enlightening and understanding. I know about functional programming and some of its concept and I apply them in my day to day work using C# and Ruby. But I certainly do not grok it, I do not fully understand it and I do not like that feeling, I want to know, I want to understand, I want to see the light and join the ranks of the Lisp preachers and me too, be able to say to you, that if you learn Lisp, &lt;strong&gt;you will be forever changed&lt;/strong&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ebobbydotorg/~4/G9HBC2QOMnA" height="1" width="1"/&gt;</content>
 </entry>
 
 <entry>
   <title>Moved to San Francisco</title>
   <link href="http://ebobby.org/2012/01/08/moved-to-sf.html" />
   <updated>2012-01-08T00:00:00-08:00</updated>
   <id>http://ebobby.org/2012/01/08/moved-to-sf</id>
   <content type="html">&lt;h2&gt;Moved to San Francisco&lt;/h2&gt;
&lt;p&gt;&lt;span class="label important"&gt;8 Jan 2012&lt;/span&gt;&lt;br /&gt;
&lt;img src="http://ebobby.org/img/northbeach.jpg" class="left rounded-img" title="North beach" alt="North beach" /&gt;&lt;br /&gt;
Well, &lt;a href="http://ebobby.org/2011/10/29/The-City-By-The-Bay.html"&gt;finally&lt;/a&gt;, me and my wife were able to make the move to &lt;a href="http://en.wikipedia.org/wiki/San_Francisco" title="Wikipedia"&gt;San Francisco&lt;/a&gt;. We arrived just a couple of days ago, we are staying temporarily in an hotel on &lt;a href="http://en.wikipedia.org/wiki/North_Beach,_San_Francisco" title="Wikipedia"&gt;North Beach&lt;/a&gt;.&lt;br /&gt;
I am in love with the neighborhood, feels pretty safe, there are plenty of coffees, bars, and restaurants to go by. We&amp;#8217;ve been hunting &lt;a href="http://sfbay.craigslist.org/sfc/" title="craiglist website"&gt;craiglist&lt;/a&gt; to find an apartment in this neighborhood, we hope we can find something not too expensive (although that word is quite meaningless in this city).&lt;/p&gt;
&lt;p&gt;We tried going to some open houses down to &lt;a href="http://en.wikipedia.org/wiki/Mission_District,_San_Francisco" title="Wikipedia"&gt;Mission District&lt;/a&gt;, but as soon as we got off &lt;span class="caps"&gt;BART&lt;/span&gt; (on 16th st and Mission) and walked for a few minutes, we came back, I may be a big pussy but I didn&amp;#8217;t feel very safe and it was 12pm. I wouldn&amp;#8217;t be very comfortable with my wife walking down those streets alone or at night.&lt;/p&gt;
&lt;p&gt;Tomorrow I&amp;#8217;ll be finally working at the office, is incredible that I&amp;#8217;ve been working for this company for two years and few months and I still haven&amp;#8217;t worked in the actual office yet, being an independent contractor from Mexico and all. I am becoming a full-time employee because of the move of course.&lt;/p&gt;
&lt;p&gt;I can&amp;#8217;t wait to finally get settled, and start hunting for coding-oriented events, and start meeting people and places.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ebobbydotorg/~4/CcoUDv6Vnts" height="1" width="1"/&gt;</content>
 </entry>
 
 <entry>
   <title>All text Linux</title>
   <link href="http://ebobby.org/2011/12/13/all-text-linux.html" />
   <updated>2011-12-13T00:00:00-08:00</updated>
   <id>http://ebobby.org/2011/12/13/all-text-linux</id>
   <content type="html">&lt;h2&gt;All text Linux&lt;/h2&gt;
&lt;p&gt;&lt;span class="label important"&gt;13 Dec 2011&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I bought an &lt;a href="http://www.google.com/search?q=acer+aspire+one+d255e" title="Google Search"&gt;Acer Aspire One D255E&lt;/a&gt; a few months ago. I wanted a netbook for very specific reasons:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;I wanted something very small, I have a &lt;a href="http://ebobby.org/2011-05-13-my-setup.html" title="My setup!"&gt;15 inches Macbook Pro&lt;/a&gt; and the thing is very unwieldy for a laptop. I found I didn&amp;#8217;t play around or code more because I was lazy to carry that laptop around, I wanted something so small that laziness wouldn&amp;#8217;t be an excuse.&lt;/li&gt;
	&lt;li&gt;I wanted something with a decent keyboard to be able to type fast and code on. Again, I didn&amp;#8217;t want comfort to get in the way of coding or writing.&lt;/li&gt;
	&lt;li&gt;I wanted to run some flavor of &lt;a href="http://en.wikipedia.org/wiki/Unix" title="Wikipedia"&gt;Unix&lt;/a&gt; in it. &lt;a href="http://en.wikipedia.org/wiki/Linux" title="Wikipedia"&gt;Linux&lt;/a&gt; or &lt;a href="http://en.wikipedia.org/wiki/FreeBSD" title="Wikipedia"&gt;FreeBSD&lt;/a&gt;.&lt;/li&gt;
	&lt;li&gt;Have a text-mode &lt;span class="caps"&gt;ONLY&lt;/span&gt; Unix installation. (This was not at goal at first, but now it is ;)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Yes, &lt;strong&gt;text-mode only&lt;/strong&gt;. No stinky windowing system. No fancy browsers. No fancy terminal apps. Yes, I wanted to man-up and go back to good ol&amp;#8217; text-mode, armed with bash and emacs and the whole stack of compilers, interpreters at their core.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://ebobby.org/img/netbook.jpg" class="post rounded-img" title="emacs vs iPad Safari" alt="emacs vs iPad Safari" /&gt;&lt;br /&gt;
That actually got interesting when I was trying to test how this post was going to look like while typing it in emacs.&lt;/p&gt;
&lt;p&gt;Now, with the netbook at hand, I tried FreeBSD and several flavors of Linux before settling with &lt;a href="http://www.archlinux.org" title="Arch Linux Website"&gt;Arch Linux&lt;/a&gt;, again for some very specific reasons:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;I don&amp;#8217;t like installing hundreds of packages as part of the initial installation or having to install &lt;a href="http://www.x.org" title="Xorg website"&gt;Xorg&lt;/a&gt; and a huge desktop. (I am looking at you Ubuntu!)&lt;/li&gt;
	&lt;li&gt;The wireless network card driver worked out of the box with the minimal installation. I didn&amp;#8217;t have to do any kind of messing around or having to connect using the ethernet card at all. Huge win.&lt;/li&gt;
	&lt;li&gt;Its philosophy is exactly what I like, lightweight, minimal. That is, it installs only the needed packages to have a minimal working linux installation, of course, you may install more, but you don&amp;#8217;t have to, also, it&amp;#8217;s based on a rolling-release system, which allows for constant, small updates, I don&amp;#8217;t like using old software.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I just say I love it, I got particularly inspired while reading &lt;a href="http://www.amazon.com/Rebel-Code-Linux-Source-Revolution/dp/0738206709%3FSubscriptionId%3DAKIAJHTAM7STAKSLLXRQ%26tag%3Dbookistics-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D0738206709" title="Amazon!"&gt;Rebel Code: Linux And The Open Source Revolution&lt;/a&gt; by Glyn Moody, very interesting book.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ebobbydotorg/~4/5pA8Hwcib6c" height="1" width="1"/&gt;</content>
 </entry>
 
 <entry>
   <title>The City By The Bay</title>
   <link href="http://ebobby.org/2011/10/29/The-City-By-The-Bay.html" />
   <updated>2011-10-29T00:00:00-07:00</updated>
   <id>http://ebobby.org/2011/10/29/The-City-By-The-Bay</id>
   <content type="html">&lt;h2&gt;The City By The Bay&lt;/h2&gt;
&lt;p&gt;&lt;span class="label important"&gt;29 Oct 2011&lt;/span&gt;&lt;br /&gt;
&lt;img src="http://ebobby.org/img/sf2.jpg" class="left rounded-img" title="San Francisco" alt="San Francisco" /&gt;&lt;br /&gt;
Just a few days ago, an &lt;a href="http://en.wikipedia.org/wiki/H-1B_visa" title="Wikipedia"&gt;H-1B Visa&lt;/a&gt; application has been filled to the &lt;a href="http://uscis.gov" title="USCIS Website"&gt;&lt;span class="caps"&gt;USCIS&lt;/span&gt;&lt;/a&gt; on my behalf. That means that if everything goes well, I will be moving with my wife to &lt;a href="http://en.wikipedia.org/wiki/San_Francisco" title="Wikipedia"&gt;San Francisco&lt;/a&gt;, the city by the bay.&lt;/p&gt;
&lt;p&gt;This is a pretty exciting move. I cannot wait for it to happen although there is quite a bit more of paperwork to get done before that. I&amp;#8217;ve read everything I could find about the city, in books, blogs, etc. We&amp;#8217;ve been in vacation there too. I&amp;#8217;ve found that people have very polarized opinions about San Fran. Some people are deeply in love with it, some people really hate it.&lt;/p&gt;
&lt;p&gt;I find that amazing. If a place can arise so heated emotions it&amp;#8217;s a place definitely worth checking out.&lt;/p&gt;
&lt;p&gt;I am particularly excited for several reasons, for one, it&amp;#8217;s in &lt;a href="http://en.wikipedia.org/wiki/Silicon_Valley" title="Wikipedia"&gt;Silicon Valley&lt;/a&gt;, a place where technology is something you can talk, see, discuss, and practically eat. A dream come true for a guy like &lt;a href="http://ebobby.org/about.html" title="About"&gt;me&lt;/a&gt;.&lt;br /&gt;
The climate is a nice addition, I live in a place that can get as hot as 119.3F (48.5C) degrees and as low as 24.8F (-4C) going to a place where the average climate is around 59F (15C) is a welcomed change.&lt;/p&gt;
&lt;p&gt;There are other several things that I look forward to: the culture, the access to a lot of different food, beers, wine, music, people, mindsets, flora, fauna, beaches, sports, meeting new people, building new stuff, learning new things, driving new cars, getting new habits, living in an apartment with a view, a very long etc., moving to a new country is a breaking change, a very exciting one.&lt;/p&gt;
&lt;p&gt;This is possible thanks to my current employer, &lt;a href="http://www.ingrooves.com" title="INgrooves Website"&gt;INgrooves&lt;/a&gt;, which as soon as they learned about my &lt;em&gt;strong&lt;/em&gt; desire to move to San Francisco, in the interest of my happiness and my wife&amp;#8217;s, they made possible the move. Something I will always be very thankful for.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ebobbydotorg/~4/VCjIZtQZwYg" height="1" width="1"/&gt;</content>
 </entry>
 
 <entry>
   <title>Installing a Ruby development environment in MacOS X</title>
   <link href="http://ebobby.org/2011/06/02/Installing_a_Ruby_development_environment_in_MacosX.html" />
   <updated>2011-06-02T00:00:00-07:00</updated>
   <id>http://ebobby.org/2011/06/02/Installing_a_Ruby_development_environment_in_MacosX</id>
   <content type="html">&lt;h2&gt;Installing a Ruby development environment in MacOS X&lt;/h2&gt;
&lt;p&gt;&lt;span class="label important"&gt;2 Jun 2011&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The goal of this post is to show how I do set up my &lt;a href="http://www.ruby-lang.org/" title="Ruby language homepage"&gt;Ruby&lt;/a&gt; development environment under MacOS X (10.6.7 at the time of this writing), I am writing it down so I do not forget and because probably someone else could benefit from it. Also, keep in mind that this can probably work on other *nix flavors out there (like &lt;a href="http://en.wikipedia.org/wiki/GNU/Linux" title="GNU Linux on Wikipedia"&gt;linux&lt;/a&gt;) without much change.&lt;/p&gt;
&lt;p&gt;I originally used &lt;a href="http://www.macports.org" title="Macports website"&gt;Macports&lt;/a&gt; to install ruby, but in the end this will cause pain when trying to use different versions of Ruby and their respective gemsets.&lt;/p&gt;
&lt;p&gt;OK, the culprit of the problem is having different versions of Ruby to work with, for several reasons this is something you probably want, for example, &lt;a href="http://rubyonrails.org/" title="Ruby On Rails website"&gt;RoR&lt;/a&gt; versions previous to 2.3 run only on Ruby 1.8.*, but RoR 3.* runs only on Ruby 1.9.*, there may be other reasons, but this is why I got into this dilemma.&lt;/p&gt;
&lt;p&gt;First of all, you may want to get rid of the version of ruby you installed by any package system you may be using, in my case Macports so I have to do :&lt;/p&gt;
&lt;pre&gt;
sudo port uninstall ruby
&lt;/pre&gt;
&lt;p&gt;After that, we are back to system&amp;#8217;s old ruby (1.8.7 patch 174 in my system), what we want to do now is install the &lt;a href="https://rvm.beginrescueend.com/" title="rvm website"&gt;Ruby Version Manager&lt;/a&gt;, rvm is a nice piece of software that manages the chore of having multiple versions of ruby. Quoting from their website: &amp;#8220;&lt;span class="caps"&gt;RVM&lt;/span&gt; is a command line tool which allows us to easily install, manage and work with multiple ruby environments from interpreters to sets of gems.&amp;#8221;&lt;/p&gt;
&lt;p&gt;To install rvm for development (local to your user account, if you want to install it system-wide go check their &lt;a href="https://rvm.beginrescueend.com/" title="rvm"&gt;website&lt;/a&gt;) you have to run the following commands on your favorite terminal application. You have to have &lt;a href="http://git-scm.com/" title="Git website"&gt;git&lt;/a&gt; installed for it to work :&lt;/p&gt;
&lt;pre&gt;
bash &amp;lt; &amp;lt;(curl -s https://rvm.beginrescueend.com/install/rvm)

echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] &amp;amp;&amp;amp; . "$HOME/.rvm/scripts/rvm" # Load RVM function' &amp;gt;&amp;gt; ~/.profile

source .profile

type rvm | head -1
&lt;/pre&gt;
&lt;p&gt;&lt;span class="subscript"&gt;Please note that .profile is my particular bash configuration script, yours may be .bash_profile or .bashrc, etc., so check that out first.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;If after that last command you get a line saying that &lt;i&gt;rvm is a function&lt;/i&gt;, you are all set, if you had any troubles then you will have a lot of fun solving them :-)&lt;br /&gt;
Anyway, if you had success you now have a working installation of rvm in your user account, so what we want to do next is install ruby! Let&amp;#8217;s do that installing 1.9.2 initially, run the following:&lt;/p&gt;
&lt;pre&gt;
rvm install 1.9.2

ruby --version

rvm use 1.9.2 --default

ruby --version
&lt;/pre&gt;
&lt;p&gt;This will install ruby-1.9.2 and use it as a default instead of the system wide, now you can start installing your favorite gems and start coding away:&lt;/p&gt;
&lt;pre&gt;
gem install rails
gem install jekyll
gem install jeweler
...
&lt;/pre&gt;
&lt;p&gt;Now you can install also another version of ruby and switch between them like this :&lt;/p&gt;
&lt;pre&gt;
rvm install 1.8.7

rvm use 1.8.7

ruby --version

gem list
&lt;/pre&gt;
&lt;p&gt;If you do not use the &lt;i&gt;&amp;#8212;default&lt;/i&gt; switch when running &lt;i&gt;rvm use&lt;/i&gt; then the change is local to that session, it will revert to whatever you set as default. If you see, your gem list is empty because you have not installed gems to that version. That&amp;#8217;s beautiful. There are ways to manage different sets of gems for the same version of ruby with rvm but I haven&amp;#8217;t used this feature yet so I have nothing to say about it.&lt;/p&gt;
&lt;p&gt;In the end, if you want to get rid of everything you just have to run&lt;/p&gt;
&lt;pre&gt;
rvm implode
&lt;/pre&gt;
&lt;p&gt;and it will erase rvm, all the versions of ruby you installed with it, their source code, etc., you may need to do some other cleanup, like deleting .rvmrc and removing the line you added to your .profile, but both of these are harmless if you do not do anything about them.&lt;/p&gt;
&lt;p&gt;So that&amp;#8217;s it. Have fun.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ebobbydotorg/~4/1Yc8o_RZ_Ww" height="1" width="1"/&gt;</content>
 </entry>
 
 <entry>
   <title>They are just tools</title>
   <link href="http://ebobby.org/2011/05/25/They-are-just-tools.html" />
   <updated>2011-05-25T00:00:00-07:00</updated>
   <id>http://ebobby.org/2011/05/25/They-are-just-tools</id>
   <content type="html">&lt;h2&gt;They are just tools&lt;/h2&gt;
&lt;p&gt;&lt;span class="label important"&gt;25 May 2011&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;This post was originally written by me for a former employer&amp;#8217;s &lt;a href="http://www.nearsoft.com/blog/They-are-just-Tools.html" title="Nearsoft&amp;#39;s blog"&gt;company blog&lt;/a&gt;, I reproduced here with some minor edits with permission from them.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Get a bunch of techies together and you can easily start a war of words over any technology.  Each will claim his favorite technology as &amp;#8220;the best.&amp;#8221;  But it is all pointless because they&amp;#8217;re just tools.&lt;/p&gt;
&lt;p&gt;I see from time to time heated battles between techies about technologies, methodologies, applications, etc. Some of the classics are: Windows vs Linux, Firefox vs IE, C# vs Java, Agile vs Some other, Eclipse vs Netbeans, etc. These discussions can be seen in blog posts, books, informal talks, etc. You just have to gather a bunch of tech geeks around and they will start a discussion about how that particular technology they happen to love is better than the rest. It reminds me of a &lt;a href="http://quotes4all.net/authors/george%20bernard%20shaw/quotes.html" title="Quotes 4 All"&gt;George Bernard Shaw&lt;/a&gt; quote:&lt;/p&gt;
&lt;h4 class="quotes"&gt;
&lt;p&gt;Patriotism is the conviction that your country is superior to all others because you were born in it.&lt;/p&gt;
&lt;p&gt;George Bernard Shaw&lt;/p&gt;
&lt;/h4&gt;
&lt;p&gt;We as developers, managers, testers, architects, etc., in the software development industry, must try to see the things from a broader perspective. We have to stay objective and pragmatic. Operating systems, programming languages, software development methodologies, development environments, platforms, etc., they are tools, just tools. There is no such thing as &amp;#8220;The best %s&amp;#8221;,  substitute %s with operating system, methodology, programming language, etc., there is no panacea. If it existed, it would be clear for everyone and we all would be using it without any kind of complain, it doesn&amp;#8217;t matter if many people uses it, it is not the best. Because there are no such things.&lt;/p&gt;
&lt;p&gt;There&amp;#8217;s a catch in this, just like anything can&amp;#8217;t be the best, everything &lt;span class="caps"&gt;CAN&lt;/span&gt; be the best too. But, in particular situations, every tool fits a purpose, it excels on some regard, but it can&amp;#8217;t excel on everything. There are times when a tool will be very useful and fit in what you are doing, then other times when that same tool will cause you a headache because it&amp;#8217;s simply not meant to be wielded the way you want it to. We should approach a tool with care, analyze its advantages and disadvantages and determine if it fits our purposes. Not pick something just because we like it, because it is the only thing we have used before, or because people say it is the best.&lt;/p&gt;
&lt;p&gt;As professionals, we should try to read about tools and try to learn about and from them, try them out, etc., expanding our tool set, because after all, we are professionals, we cannot say to a client, or a partner, or our teachers, or our bosses that we cannot get something done because we just know or like one tool. We have to expand our tool set so we can propose and develop many solutions, many ways to accomplish a particular task, and then solve it in the most effective way. Remember, when you only know how to use a hammer, every problem starts looking like a nail.&lt;/p&gt;
&lt;p&gt;I invite you to append the phrase &lt;i&gt;&amp;#8220;in this particular situation.&amp;#8221;&lt;/i&gt; every time you are going to say &lt;i&gt;&amp;#8220;This tool is the best&amp;#8221;&lt;/i&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ebobbydotorg/~4/oosF_BG-jUI" height="1" width="1"/&gt;</content>
 </entry>
 
 <entry>
   <title>My setup</title>
   <link href="http://ebobby.org/2011/05/13/my-setup.html" />
   <updated>2011-05-13T00:00:00-07:00</updated>
   <id>http://ebobby.org/2011/05/13/my-setup</id>
   <content type="html">&lt;h2&gt;My setup&lt;/h2&gt;
&lt;p&gt;&lt;span class="label important"&gt;13 May 2011&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#8217;ve been reading a lot of &lt;a href="http://www.usesthis.com" title="usesthis.com"&gt;usesthis.com&lt;/a&gt; lately, I find it very interesting reading about the computing setup, hardware and software, used by other people. The people interviewed by this site are more or less famous people in several professions like entrepreneurs, coders, designers, photographers, etc. In the spirit of this website, I write this post about the setup I use.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://ebobby.org/img/setup.jpg" class="post rounded-img" title="Picture of my setup" alt="Picture of my setup" /&gt;&lt;/p&gt;
&lt;p&gt;I currently use a 15&amp;quot; Macbook Pro with a 2.2GHz quad core Intel Core i7, 8GB of ram, and a 750GB &lt;span class="caps"&gt;SATA&lt;/span&gt; hard drive, I didn&amp;#8217;t go for an &lt;span class="caps"&gt;SSD&lt;/span&gt; right now because I need copious amounts of hard disk space.&lt;/p&gt;
&lt;p&gt;I run OS X Snow Leopard with &lt;a href="http://www.macports.org/" title="Macports Website"&gt;MacPorts&lt;/a&gt;, Mail.app for my personal mail, &lt;a href="http://culturedcode.com/things/" title="Things Website"&gt;Things&lt;/a&gt; for my to-do list needs (although I am flirting with the idea of switching to &lt;a href="http://orgmode.org/" title="Org Mode Website"&gt;Org Mode&lt;/a&gt;), &lt;a href="http://www.iterm2.com/" title="iTerm 2 Website"&gt;iTerm 2&lt;/a&gt; as a Terminal.app replacement. For communications I use &lt;a href="http://www.skype.com" title="Skype Website"&gt;Skype&lt;/a&gt;, &lt;a href="http://adium.im" title="Adium Website"&gt;Adium&lt;/a&gt;,  and &lt;a href="http://itunes.apple.com/app/twitter/id409789998?mt=12" title="Twitter for Mac in the AppStore"&gt;Twitter for Mac&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For programming I use &lt;a href="http://emacsformacosx.com/" title="GNU Emacs"&gt;&lt;span class="caps"&gt;GNU&lt;/span&gt; Emacs&lt;/a&gt; as text editor and &lt;span class="caps"&gt;IDE&lt;/span&gt;, I keep my &lt;a href="https://github.com/ebobby/emacs" title="My emacs project in GitHub"&gt;customization&lt;/a&gt; on GitHub, I use &lt;a href="http://git-scm.com/" title="Git Website"&gt;git&lt;/a&gt; for source code management.&lt;/p&gt;
&lt;p&gt;I use  &lt;a href="http://www.vmware.com/products/fusion/overview.html" title="VMWare Fusion Website"&gt;VMWare Fusion&lt;/a&gt; to run &lt;a href="http://windows.microsoft.com/en-US/windows7/products/home" title="Windows 7"&gt;Windows 7&lt;/a&gt;, &lt;a href="http://en.wikipedia.org/wiki/Microsoft_Visual_Studio" title="Visual Studio Wikipedia Entry"&gt;Visual Studio 2008&lt;/a&gt; using its &lt;a href="http://msdn.microsoft.com/en-us/library/ms165528(v=vs.90).aspx" title="MSDN"&gt;Emacs Keyboard Scheme&lt;/a&gt;, and &lt;a href="http://www.microsoft.com/sqlserver/2008/en/us/default.aspx" title="SQL Server 2008 page on Microsoft.com"&gt;&lt;span class="caps"&gt;SQL&lt;/span&gt; Server 2008 R2&lt;/a&gt;, I use this virtual machine to perform my development work for &lt;a href="http://www.ingrooves.com" title="INgrooves Website"&gt;INgrooves&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I use several utilities like &lt;a href="http://www.alfredapp.com/" title="Alfred Website"&gt;Alfred&lt;/a&gt;, I like being able to open apps quickly without using the mouse (I remove every app from the Dock), &lt;a href="http://www.macupdate.com/app/mac/30591/right-zoom/" title="Macupdate Website"&gt;RightZoom&lt;/a&gt; to maximize applications to use the whole desktop, &lt;a href="http://tinygrab.com/" title="TinyGrab Website"&gt;TinyGrab&lt;/a&gt; to take and share screenshots, &lt;a href="http://lightheadsw.com/caffeine/" title="Caffeine Website"&gt;Caffeine&lt;/a&gt; which allows me to keep my Mac awake when I leave it idle for a while, &lt;a href="http://www.dropbox.com" title="Dropbox website"&gt;Dropbox&lt;/a&gt; is a must have for file sharing and syncing.&lt;/p&gt;
&lt;p&gt;I also have an iPhone 3GS which I use a lot for email and twitter and an iPad I use for reading ebooks from Amazon, I actually wish I had chosen a Kindle.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Edit&lt;/strong&gt; &amp;#8211; I&amp;#8217;ve recently came across two very useful applications that have joined my list, &lt;a href="http://bjango.com/mac/istatmenus/" title="iStats website"&gt;iStats Menu&lt;/a&gt;, I use it to replace my time and battery menu icons and monitor my cpu/memory usage, &lt;a href="http://codykrieger.com/gfxCardStatus" title="gfxCardStatus website"&gt;gfxCardStatus&lt;/a&gt; a very handy utility to monitor the usage of video cards in 15&amp;quot; and 17&amp;quot; Macbook Pro models.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ebobbydotorg/~4/0CMeV_oDXAY" height="1" width="1"/&gt;</content>
 </entry>
 

</feed>

