<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Self Modifying. &#187; programming</title>
	<atom:link href="http://blog.selfmodifying.com/tag/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.selfmodifying.com</link>
	<description>The weblog of Ryan Garver.  A coffee nut.  An agile freak.</description>
	<lastBuildDate>Mon, 30 Aug 2010 03:40:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='blog.selfmodifying.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/dd4961a826989b7a52e1ae8fbe14143a?s=96&#038;d=http://s2.wp.com/i/buttonw-com.png</url>
		<title>Self Modifying. &#187; programming</title>
		<link>http://blog.selfmodifying.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://blog.selfmodifying.com/osd.xml" title="Self Modifying." />
	<atom:link rel='hub' href='http://blog.selfmodifying.com/?pushpress=hub'/>
		<item>
		<title>Hoptoad and Javascript, Sitting in a Tree, S-E-N-D-I-N-G &#8211; GIANT ROBOTS SMASHING INTO OTHER GIANT ROBOTS</title>
		<link>http://blog.selfmodifying.com/2010/08/05/hoptoad-and-javascript-sitting-in-a-tree-s-e-n-d-i-n-g-giant-robots-smashing-into-other-giant-robots/</link>
		<comments>http://blog.selfmodifying.com/2010/08/05/hoptoad-and-javascript-sitting-in-a-tree-s-e-n-d-i-n-g-giant-robots-smashing-into-other-giant-robots/#comments</comments>
		<pubDate>Thu, 05 Aug 2010 16:57:50 +0000</pubDate>
		<dc:creator>Ryan Garver</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[web applications]]></category>
		<category><![CDATA[debugging]]></category>

		<guid isPermaLink="false">http://blog.selfmodifying.com/?p=102</guid>
		<description><![CDATA[Hoptoad and Javascript, Sitting in a Tree, S-E-N-D-I-N-G &#8211; GIANT ROBOTS SMASHING INTO OTHER GIANT ROBOTS. I&#8217;m really excited about this new feature of HopToad.  I&#8217;ve played around with ExceptionHub but it was missing some important features like team management.  Leveraging HopToad to do this kind of JavaScript/browser level error tracking really cleanly combines two [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.selfmodifying.com&amp;blog=7311382&amp;post=102&amp;subd=selfmodifying&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://robots.thoughtbot.com/post/899737797/hoptoad-and-javascript-sitting-in-a-tree">Hoptoad and Javascript, Sitting in a Tree, S-E-N-D-I-N-G &#8211; GIANT ROBOTS SMASHING INTO OTHER GIANT ROBOTS</a>.</p>
<p>I&#8217;m really excited about this new feature of HopToad.  I&#8217;ve played around with <a href="http://www.exceptionhub.com/" target="_blank">ExceptionHub</a> but it was missing some important features like team management.  Leveraging HopToad to do this kind of JavaScript/browser level error tracking really cleanly combines two useful and similar tools for debugging a running system.</p>
<p>I should add that I echo the concerns of some of the commenters on the linked to blog post about security concerns.  It would be helpful if ThoughtBot followed this up with a post to address this concern in a bit more detail.</p>
<p>All in all though, this is nice</p>
<br />Filed under: <a href='http://blog.selfmodifying.com/category/programming/'>programming</a> Tagged: <a href='http://blog.selfmodifying.com/tag/debugging/'>debugging</a>, <a href='http://blog.selfmodifying.com/tag/javascript/'>javascript</a>, <a href='http://blog.selfmodifying.com/tag/programming/'>programming</a>, <a href='http://blog.selfmodifying.com/tag/ruby-on-rails/'>ruby on rails</a>, <a href='http://blog.selfmodifying.com/tag/tools/'>tools</a>, <a href='http://blog.selfmodifying.com/tag/web-applications/'>web applications</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/selfmodifying.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/selfmodifying.wordpress.com/102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/selfmodifying.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/selfmodifying.wordpress.com/102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/selfmodifying.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/selfmodifying.wordpress.com/102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/selfmodifying.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/selfmodifying.wordpress.com/102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/selfmodifying.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/selfmodifying.wordpress.com/102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/selfmodifying.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/selfmodifying.wordpress.com/102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/selfmodifying.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/selfmodifying.wordpress.com/102/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.selfmodifying.com&amp;blog=7311382&amp;post=102&amp;subd=selfmodifying&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.selfmodifying.com/2010/08/05/hoptoad-and-javascript-sitting-in-a-tree-s-e-n-d-i-n-g-giant-robots-smashing-into-other-giant-robots/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d928b55d9910cba3360cda7f214cf6e3?s=96&#38;d=&#38;r=PG" medium="image">
			<media:title type="html">Ryan</media:title>
		</media:content>
	</item>
		<item>
		<title>Up and running with MagLev</title>
		<link>http://blog.selfmodifying.com/2009/11/21/up-and-running-with-maglev/</link>
		<comments>http://blog.selfmodifying.com/2009/11/21/up-and-running-with-maglev/#comments</comments>
		<pubDate>Sat, 21 Nov 2009 17:58:05 +0000</pubDate>
		<dc:creator>Ryan Garver</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[maglev]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[smalltalk]]></category>

		<guid isPermaLink="false">http://blog.selfmodifying.com/?p=74</guid>
		<description><![CDATA[The MagLev alpha was released recently.  Before I get too far in to this post I need to make it clear that I&#8217;m not affiliated with the MagLev development team.  I&#8217;m not really even much of a Ruby interpreter hacker.  I&#8217;m a curious ruby developer that has heard some interesting things about the project and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.selfmodifying.com&amp;blog=7311382&amp;post=74&amp;subd=selfmodifying&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://groups.google.com/group/maglev-discussion/browse_thread/thread/1102993e9e21492a" target="_blank">The MagLev alpha was released recently</a>.  Before I get too far in to this post I need to make it clear that I&#8217;m not affiliated with the MagLev development team.  I&#8217;m not really even much of a Ruby interpreter hacker.  I&#8217;m a curious ruby developer that has heard some interesting things about the project and wanted to get it up and running now that it&#8217;s available.  I decided to make this post because the install and setup procedure is anything but standard.  It&#8217;s not complicated, just not what you normally would expect.</p>
<p>First lets get the code:</p>
<pre class="brush: bash;">
$ git clone git://github.com/MagLev/maglev.git

Initialized empty Git repository in /Users/rgarver/Sources/maglev/.git/
remote: Counting objects: 28955, done.
remote: Compressing objects: 100% (12671/12671), done.
remote: Total 28955 (delta 15669), reused 28427 (delta 15200)
Receiving objects: 100% (28955/28955), 14.97 MiB | 539 KiB/s, done.
Resolving deltas: 100% (15669/15669), done.
Checking out files: 100% (2180/2180), done.
Initialized empty Git repository in /Users/rgarver/Sources/maglev/.git/remote: Counting objects: 28955, done.remote: Compressing objects: 100% (12671/12671), done.remote: Total 28955 (delta 15669), reused 28427 (delta 15200)Receiving objects: 100% (28955/28955), 14.97 MiB | 539 KiB/s, done.Resolving deltas: 100% (15669/15669), done.Checking out files: 100% (2180/2180), done.

$ cd maglev
</pre>
<p>Great, we have the code.  Next step is to do a base install.  This installs the base libraries and GemStone which is the fabled persistence layer that MagLev has integrated.  <a href="http://en.wikipedia.org/wiki/Gemstone_Database_Management_System">GemStone</a> is a object persistence layer originally built for Smalltalk.  If you haven&#8217;t ever played with Smalltalk or some of the variants (eg: Squeak) I recommend it.  It will turn your head upside down.</p>
<pre class="brush: bash;">
$ ./install.sh
[Info] Starting installation of MagLev-22578.MacOSX on sirius.local
Password:
Sat Nov 21 09:22:44 PST 2009
[Info] Setting up shared memory
  Total memory available is 4096 MB
  Max shared memory segment size is 4 MB
  Max shared memory allowed is 4 MB
[Info] Increasing max shared memory segment size to 2048 MB
kern.sysv.shmmax: 4194304 -&gt; 2147483648
[Info] Increasing max shared memory allowed to 2048 MB
kern.sysv.shmall: 1024 -&gt; 524288
[Info] Adding the following section to /etc/sysctl.conf
# kern.sysv.shm* settings added by MagLev installation
kern.sysv.shmmax=2147483648
kern.sysv.shmall=524288
kern.sysv.shmmin=1
kern.sysv.shmmni=32
kern.sysv.shmseg=8
[Info] Setting up GemStone netldi service port
[Info] Adding &quot;gs64ldi  51456/tcp&quot; to /etc/services
[Info] Downloading GemStone archive using /opt/local/bin/wget
--2009-11-21 09:22:44--  http://glass-downloads.gemstone.com/maglev/GemStone-22578.MacOSX.zip
Resolving glass-downloads.gemstone.com... 207.171.185.197
Connecting to glass-downloads.gemstone.com|207.171.185.197|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 74858717 (71M) [application/zip]
Saving to: `GemStone-22578.MacOSX.zip'

100%[==========================================================================&gt;] 74,858,717   847K/s   in 1m 45s

2009-11-21 09:24:32 (694 KB/s) - `GemStone-22578.MacOSX.zip' saved [74858717/74858717]

[Info] Uncompressing GemStone archive into /Users/rgarver/Sources
[Info] Linking gemstone to /Users/rgarver/Sources/GemStone-22578.MacOSX
[Info] updating MSpec, RubySpec, and RBS submodules
Submodule 'benchmark' (git://github.com/acangiano/ruby-benchmark-suite.git) registered for path 'benchmark'
Submodule 'spec/mspec' (git://github.com/rubyspec/mspec.git) registered for path 'spec/mspec'
Submodule 'spec/rubyspec' (git://github.com/rubyspec/rubyspec.git) registered for path 'spec/rubyspec'
Initialized empty Git repository in /Users/rgarver/Sources/maglev/benchmark/.git/
remote: Counting objects: 7332, done.
remote: Compressing objects: 100% (5521/5521), done.
remote: Total 7332 (delta 1595), reused 6917 (delta 1274)
Receiving objects: 100% (7332/7332), 9.90 MiB | 578 KiB/s, done.
Resolving deltas: 100% (1595/1595), done.
Submodule path 'benchmark': checked out 'd807eea7f7b2f38240bc177a0c22e599081882ea'
Initialized empty Git repository in /Users/rgarver/Sources/maglev/spec/mspec/.git/
remote: Counting objects: 2745, done.
remote: Compressing objects: 100% (1080/1080), done.
remote: Total 2745 (delta 1848), reused 2484 (delta 1644)
Receiving objects: 100% (2745/2745), 378.57 KiB | 383 KiB/s, done.
Resolving deltas: 100% (1848/1848), done.
Submodule path 'spec/mspec': checked out 'bcec47c70e0678a29fd0c1345358c4daf7b971a3'
Initialized empty Git repository in /Users/rgarver/Sources/maglev/spec/rubyspec/.git/
remote: Counting objects: 26787, done.
remote: Compressing objects: 100% (8705/8705), done.
remote: Total 26787 (delta 18332), reused 25672 (delta 17482)
Receiving objects: 100% (26787/26787), 3.71 MiB | 520 KiB/s, done.
Resolving deltas: 100% (18332/18332), done.
Submodule path 'spec/rubyspec': checked out 'b0a18cf80dc706d39ee550831b8b941224b60fb6'
[Info] Creating new default 'maglev' repository
[Info] Generating the MagLev HTML documentation
[Info] Finished upgrade to MagLev-22578.MacOSX on sirius.local

[Info] MagLev version information:
maglev 0.6 (ruby 1.8.6) (2009-11-20 rev 22578-1067) [x86_64-linux]
GEMSTONE: 3.0.0 Build: 64bit-22578
MONTICELLO: MagLev-ao.1067.mcz
MAGLEV: commit e2a4fe2e0f7ca85cdcb141e6b56913eba802eefd
        Author: Allen Otis &lt;otisa@abaco.gemstone.com&gt;
        Date:   Thu Nov 19 19:57:09 2009 -0800
[Info] GemStone version information:
GemStone/S 64 Bit
3.0.0 Build: 64bit-22578
Fri Nov 20  8:22:00 2009

[Info] Adding these to your .bashrc will make it easier to run MagLev
export MAGLEV_HOME=/Users/rgarver/Sources/maglev
export PATH=$MAGLEV_HOME/bin:$PATH

[Info] After you complete this upgrade and verify MagLev is working, run
  rake stwrappers
to generate the .rb files for the GemStone/Smalltalk FFI
in MAGLEV_HOME/lib/ruby/site_ruby/1.8/smalltalk/
</pre>
<p>As you can see on OS X it will build everything for 64bit which is pretty cool.  It also downloaded a bunch of support libraries and updated all of the submodules.  If you ever update the code locally you are supposed to run &#8216;$ ./update.sh&#8217; to rebuild everything and get it all up and running.</p>
<p>Once you have it installed you should add the following lines to your .profile or .bashrc</p>
<pre class="brush: bash;">
export MAGLEV_HOME=/Users/rgarver/Sources/maglev
export PATH=$MAGLEV_HOME/bin:$PATH
</pre>
<p>You&#8217;ll need to make sure you run those lines on the command line also.  Once the environment is setup you can run &#8216;$ rake maglev:start&#8217;.  This command apparently boots up the core MagLev engine.</p>
<pre class="brush: bash;">
$ rake maglev:start
(in /Users/rgarver/Sources/maglev)
startstone[Info]: Starting Stone repository monitor &quot;maglev&quot;.
startstone[Info]: GemStone server 'maglev' has been started.
</pre>
<p>Once that is started you are good to go:</p>
<pre class="brush: bash;">
$ maglev-irb
/Users/rgarver/.irbrc
error , no such file to load -- readline,
          during /Users/rgarver/Sources/maglev/lib/ruby/1.8/irb/completion.rb
error , no such file to load -- readline,
          during /Users/rgarver/.irbrc
irb(main):001:0&gt; puts 'hi'
hi
=&gt; nil
irb(main):002:0&gt;
</pre>
<br />Posted in programming Tagged: howto, install, maglev, programming, ruby, smalltalk <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/selfmodifying.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/selfmodifying.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/selfmodifying.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/selfmodifying.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/selfmodifying.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/selfmodifying.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/selfmodifying.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/selfmodifying.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/selfmodifying.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/selfmodifying.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/selfmodifying.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/selfmodifying.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/selfmodifying.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/selfmodifying.wordpress.com/74/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.selfmodifying.com&amp;blog=7311382&amp;post=74&amp;subd=selfmodifying&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.selfmodifying.com/2009/11/21/up-and-running-with-maglev/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d928b55d9910cba3360cda7f214cf6e3?s=96&#38;d=&#38;r=PG" medium="image">
			<media:title type="html">Ryan</media:title>
		</media:content>
	</item>
		<item>
		<title>Podcast.local &#8211; localhost podcasting</title>
		<link>http://blog.selfmodifying.com/2009/05/17/podcast-local-localhost-podcasting/</link>
		<comments>http://blog.selfmodifying.com/2009/05/17/podcast-local-localhost-podcasting/#comments</comments>
		<pubDate>Sun, 17 May 2009 18:13:20 +0000</pubDate>
		<dc:creator>Ryan Garver</dc:creator>
				<category><![CDATA[agility]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[agile process]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[jqueryui]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://blog.selfmodifying.com/?p=48</guid>
		<description><![CDATA[Last week I discovered a set of mp3&#8242;s covering Lean practices and principles.  You can access them here.  I&#8217;ve been on a bit of a management optimization stint lately and Lean is a very natural extension of Agile software development in to a broader management context.  It largely predates modern software techniques and represents one [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.selfmodifying.com&amp;blog=7311382&amp;post=48&amp;subd=selfmodifying&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Last week I discovered a set of mp3&#8242;s covering Lean practices and principles.  You can access them <a title="Lean Enterprise Institute Webinar Library" href="http://www.lean.org/Events/WebinarHome.cfm" target="_blank">here</a>.  I&#8217;ve been on a bit of a management optimization stint lately and Lean is a very natural extension of Agile software development in to a broader management context.  It largely predates modern software techniques and represents one of the early generalizations of the <a href="http://en.wikipedia.org/wiki/Toyota_Production_System" target="_blank">Toyota Production System</a>.</p>
<p>In any case that is not what I&#8217;m here to talk to you about.  In looking through these mp3&#8242;s the list of webinars was not collected in to any sort of podcast format.  This is frustrating because this would be ideal commute time listening on my iPhone.  Out of this frustration came <a title="Podcast.local" href="http://github.com/rgarver/podcast.local" target="_blank">podcast.local</a>.  Podcast.local is a simple Rails application (really simple) that allows you quickly create a podcast through a series of forms.  The name comes from the naming convention provided by the <a href="http://www.fngtps.com/passenger-preference-pane" target="_blank">Passenger preference pane</a> on OS X.  If you set it up through the pref pane you will just need to go to http://podcast.local.  From there you can create your podcast one episode at a time and then subscribe to them through your iTunes.  The coole thing is that because it&#8217;s on the web iTunes just picks it and starts downloading episodes.</p>
<p>Like I said above, this application is too simple to go in to much detail.  I used it to do some experimentation with a few technologies that I haven&#8217;t had much time to mess around with.  Namely <a href="http://www.blueprintcss.org/" target="_blank">Blueprint CSS</a>, <a href="http://jquery.com" target="_blank">jQuery</a>, <a href="http://ui.jquery.com" target="_blank">jQuery UI</a>, and <a href="http://github.com/thoughtbot/paperclip/" target="_blank">Paperclip</a>.  Enjoy!</p>
<br />Posted in agility, programming Tagged: agile process, jquery, jqueryui, programming, ruby on rails, tools <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/selfmodifying.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/selfmodifying.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/selfmodifying.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/selfmodifying.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/selfmodifying.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/selfmodifying.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/selfmodifying.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/selfmodifying.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/selfmodifying.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/selfmodifying.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/selfmodifying.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/selfmodifying.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/selfmodifying.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/selfmodifying.wordpress.com/48/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.selfmodifying.com&amp;blog=7311382&amp;post=48&amp;subd=selfmodifying&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.selfmodifying.com/2009/05/17/podcast-local-localhost-podcasting/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d928b55d9910cba3360cda7f214cf6e3?s=96&#38;d=&#38;r=PG" medium="image">
			<media:title type="html">Ryan</media:title>
		</media:content>
	</item>
		<item>
		<title>Back to jQuery</title>
		<link>http://blog.selfmodifying.com/2009/02/10/back_to_jquery/</link>
		<comments>http://blog.selfmodifying.com/2009/02/10/back_to_jquery/#comments</comments>
		<pubDate>Tue, 10 Feb 2009 20:24:14 +0000</pubDate>
		<dc:creator>Ryan Garver</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[jqueryui]]></category>
		<category><![CDATA[themeroller]]></category>

		<guid isPermaLink="false">http://selfmodifying.wordpress.com/?p=39</guid>
		<description><![CDATA[So I tried Red for a while (short while) and was all excited and thought it was really cool and I&#8217;d be using it forever. Then I tried to make a Ajax call to a rails app and got back JSON, crap. Red doesn&#8217;t support parsing JSON. I eventually figured it out and made a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.selfmodifying.com&amp;blog=7311382&amp;post=39&amp;subd=selfmodifying&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="preview">
<p>So I tried Red for a while (short while) and was all excited and thought it was really cool and I&#8217;d be using it forever. Then I tried to make a Ajax call to a rails app and got back JSON, crap. Red doesn&#8217;t support parsing JSON. I eventually figured it out and made a pretty cool billing summary widget using Red. But that took me a few days. And it was really hard. Much harder than it needed to be.</p>
<p>I like what Red was trying to do, but looking back I think I knew it was too good to be true. It&#8217;s not quite there and requires a lot of hacking to do most practical things. I&#8217;m now using <a href="http://jquery.com/">jQuery</a>. I reimplemented the billing summary using jQuery in a couple of hours, and most of that time was spent re-learning jQuery. I&#8217;m actually pretty happy with it after using it for a few weeks. I thought I would always return to Prototype.</p>
<p>In my excitement for learning a new tool I discovered the extension <a href="http://ui.jquery.com/">jQuery UI</a> and their <a href="http://ui.jquery.com/themeroller/">Themeroller</a>. This has got to be one of the cooler javascript library extensions that I&#8217;ve seen. ExtJS tries to provide a will UI toolkit and has a theme API, but the Themeroller for jQuery UI is really sweet and super simple. As a basis for a back office admin it is ideal, and I can see a number of opportunities in a broader set of situations. The icon library alone has made producing simple, intuitive interfaces really easy.</div>
<br />Posted in programming Tagged: javascript, jquery, jqueryui, programming, themeroller <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/selfmodifying.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/selfmodifying.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/selfmodifying.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/selfmodifying.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/selfmodifying.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/selfmodifying.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/selfmodifying.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/selfmodifying.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/selfmodifying.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/selfmodifying.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/selfmodifying.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/selfmodifying.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/selfmodifying.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/selfmodifying.wordpress.com/39/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.selfmodifying.com&amp;blog=7311382&amp;post=39&amp;subd=selfmodifying&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.selfmodifying.com/2009/02/10/back_to_jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d928b55d9910cba3360cda7f214cf6e3?s=96&#38;d=&#38;r=PG" medium="image">
			<media:title type="html">Ryan</media:title>
		</media:content>
	</item>
		<item>
		<title>JSON for Red</title>
		<link>http://blog.selfmodifying.com/2009/01/03/json_for_red/</link>
		<comments>http://blog.selfmodifying.com/2009/01/03/json_for_red/#comments</comments>
		<pubDate>Sat, 03 Jan 2009 20:11:26 +0000</pubDate>
		<dc:creator>Ryan Garver</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://selfmodifying.wordpress.com/?p=35</guid>
		<description><![CDATA[I&#8217;ve been playing around more with Red.  I alternate between really liking it and totally pulling my hair out.  On a order form app that I&#8217;m building I made some very quick work of a dynamically updating billing summary div.  It came together very quickly until I added the AJAX piece.  AJAX support in Red [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.selfmodifying.com&amp;blog=7311382&amp;post=35&amp;subd=selfmodifying&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been playing around more with <a href="http://github.com/jessesielaff/red/tree/master" target="_blank">Red</a>.  I alternate between really liking it and totally pulling my hair out.  On a order form app that I&#8217;m building I made some very quick work of a dynamically updating billing summary div.  It came together very quickly until I added the AJAX piece.  AJAX support in Red is actually very good, but JSON support is non-existent.  This made Ryan a sad boy.  I dug around to see what other people have done and found that they haven&#8217;t done much.  There is some stub code for a Request::JSON that my be what I&#8217;m looking for at some point, but I need it now.  So <a href="http://gist.github.com/42953" target="_blank">here</a> is what I did:</p>
<pre class="brush: ruby;">
class Module
  def define_method(sym, &amp;block)
    `this.prototype['m$'+sym.__value__]=block.__block__.__unbound__`
    `Red.updateChildren(this)`
    `Red.updateIncluders(this)`
    return `block`
  end
end

class Object
  def self.from_json(text)
    ret = Object.new
    meths = []
    `var v = eval(&quot;(&quot;+#{text}.__value__+&quot;)&quot;)`
    `for(var member in v){#{meths}.push(new Array($q(member), $q(v[member])))}`
    meths.each do |meth|
      ret.class.send(:define_method, meth[0]) do
        meth[1]
      end
    end
    return ret
  end
end
</pre>
<p>Now doing a simple AJAX call that returns JSON becomes really easy:</p>
<pre class="brush: ruby;">
@req = Request.new(:url =&gt; '/orders')
@req.upon(:response) do |response|
  new_data = Object.from_json(response.text)
  @summary = new_data.summary
  @subtotal = new_data.subtotal
  @total = new_data.total
end
@req.execute(:data =&gt; {'plan_id' =&gt; @plan, 'promo' =&gt; @promo})
</pre>
<p>A few things to note here.  The section that defines `define_method` on `Module` is actually back ported from the current master branch of Red.  This works pretty well, though I haven&#8217;t tried it with a JSON string that describes a living object.  But I don&#8217;t think it&#8217;s too far from being able to handle that.</p>
<br />Posted in programming Tagged: javascript, programming, ruby <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/selfmodifying.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/selfmodifying.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/selfmodifying.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/selfmodifying.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/selfmodifying.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/selfmodifying.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/selfmodifying.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/selfmodifying.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/selfmodifying.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/selfmodifying.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/selfmodifying.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/selfmodifying.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/selfmodifying.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/selfmodifying.wordpress.com/35/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.selfmodifying.com&amp;blog=7311382&amp;post=35&amp;subd=selfmodifying&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.selfmodifying.com/2009/01/03/json_for_red/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d928b55d9910cba3360cda7f214cf6e3?s=96&#38;d=&#38;r=PG" medium="image">
			<media:title type="html">Ryan</media:title>
		</media:content>
	</item>
		<item>
		<title>Should I use an instance variable?</title>
		<link>http://blog.selfmodifying.com/2008/11/17/should_i_use_an_instance_variable/</link>
		<comments>http://blog.selfmodifying.com/2008/11/17/should_i_use_an_instance_variable/#comments</comments>
		<pubDate>Mon, 17 Nov 2008 20:07:04 +0000</pubDate>
		<dc:creator>Ryan Garver</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[software design]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[ruby on rails]]></category>

		<guid isPermaLink="false">http://selfmodifying.wordpress.com/?p=31</guid>
		<description><![CDATA[No. If you are in a position to ask this question I humbly recommend you default to: &#8220;No, I do not need this as an instance variable right now.&#8221; There is a tendency to plan for every potentiality when doing software development and this is a prime example of such a situation. Resist the temptation. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.selfmodifying.com&amp;blog=7311382&amp;post=31&amp;subd=selfmodifying&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>No.</p>
<p>If you are in a position to ask this question I humbly recommend you default to: &#8220;No, I do not need this as an instance variable right now.&#8221;  There is a tendency to plan for every potentiality when doing software development and this is a prime example of such a situation.  Resist the temptation.</p>
<p>Instance variables represent state associated with an object in memory.  When you declare an instance variable you are saying to all future developers: &#8220;This piece of state needs to last for the life time of this object because it will be used elsewhere.&#8221;  Think very hard about that.  We are saying loudly here that this variable is coupled to other fragments of code.  Which code?  Dunno, do a global search <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> .</p>
<p>This is called tight coupling.  I will go so far to say that coupling is the source of all evil and complexity that we deal with as programmers.  With every step that we, as programmers, take in building a system should be with an eye to reduce or at least not increase the coupling in the system that we are working on.  The fewer instance variables that we have in a Rails controller the smaller the potential coupling between the view and other method calls that have access to those instance variables.  Each method, each action in a controller, should be as self contained as possible.  The less leakage of state out of a function the better.  Generally your view doesn&#8217;t need to see that temp variable of the calculations that you made to set a model attribute keep it local, drop the &#8220;@&#8221;.  Worst case scenario you go back and refactor your code to include that &#8220;@&#8221;.</p>
<br />Posted in programming, software design Tagged: programming, ruby, ruby on rails <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/selfmodifying.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/selfmodifying.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/selfmodifying.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/selfmodifying.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/selfmodifying.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/selfmodifying.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/selfmodifying.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/selfmodifying.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/selfmodifying.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/selfmodifying.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/selfmodifying.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/selfmodifying.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/selfmodifying.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/selfmodifying.wordpress.com/31/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.selfmodifying.com&amp;blog=7311382&amp;post=31&amp;subd=selfmodifying&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.selfmodifying.com/2008/11/17/should_i_use_an_instance_variable/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d928b55d9910cba3360cda7f214cf6e3?s=96&#38;d=&#38;r=PG" medium="image">
			<media:title type="html">Ryan</media:title>
		</media:content>
	</item>
		<item>
		<title>Red its like Ruby for Javascript</title>
		<link>http://blog.selfmodifying.com/2008/11/10/red_its_like_ruby_for/</link>
		<comments>http://blog.selfmodifying.com/2008/11/10/red_its_like_ruby_for/#comments</comments>
		<pubDate>Mon, 10 Nov 2008 19:28:03 +0000</pubDate>
		<dc:creator>Ryan Garver</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://selfmodifying.wordpress.com/?p=26</guid>
		<description><![CDATA[If you had asked me about doing this 6 months ago I would have said that it would be worth it.  It would be too hard and be a ton of work to get it functional and even then it wouldn&#8217;t be good enough to actually use.  After seeing this video I&#8217;m glad I am [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.selfmodifying.com&amp;blog=7311382&amp;post=26&amp;subd=selfmodifying&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you had asked me about doing this 6 months ago I would have said that it would be worth it.  It would be too hard and be a ton of work to get it functional and even then it wouldn&#8217;t be good enough to actually use.  After seeing this video I&#8217;m glad I am wrong.  This is totally sweet.</p>
<p><span style='text-align:center; display: block;'>
<object type="application/x-shockwave-flash" width="400" height="300" data="http://www.vimeo.com/moogaloop.swf?clip_id=2189212&amp;server=www.vimeo.com&amp;fullscreen=1&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=01AAEA">
	<param name="quality" value="best" />
	<param name="allowfullscreen" value="true" />
	<param name="scale" value="showAll" />
	<param name="movie" value="http://www.vimeo.com/moogaloop.swf?clip_id=2189212&amp;server=www.vimeo.com&amp;fullscreen=1&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=01AAEA" />
	<param name="wmode" value="opaque" />
</object>
</span></p>
<br />Posted in programming Tagged: javascript, programming, ruby <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/selfmodifying.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/selfmodifying.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/selfmodifying.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/selfmodifying.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/selfmodifying.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/selfmodifying.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/selfmodifying.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/selfmodifying.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/selfmodifying.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/selfmodifying.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/selfmodifying.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/selfmodifying.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/selfmodifying.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/selfmodifying.wordpress.com/26/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.selfmodifying.com&amp;blog=7311382&amp;post=26&amp;subd=selfmodifying&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.selfmodifying.com/2008/11/10/red_its_like_ruby_for/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d928b55d9910cba3360cda7f214cf6e3?s=96&#38;d=&#38;r=PG" medium="image">
			<media:title type="html">Ryan</media:title>
		</media:content>
	</item>
	</channel>
</rss>