<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1190940392946135264</id><updated>2012-01-06T13:52:32.312-08:00</updated><category term='linux'/><category term='ruby'/><category term='objective-c'/><category term='iphone'/><category term='agile'/><category term='git'/><category term='java'/><category term='refactoring'/><category term='clojure'/><category term='patterns'/><category term='apple'/><category term='programming'/><category term='ipad'/><category term='vim'/><category term='osx'/><category term='c++'/><category term='life'/><title type='text'>...</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.watkyn.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://www.watkyn.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Tony Eichelberger</name><uri>http://www.blogger.com/profile/14859637360805535045</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>33</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1190940392946135264.post-4803059574175294851</id><published>2012-01-06T12:52:00.001-08:00</published><updated>2012-01-06T13:03:30.794-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='vim'/><category scheme='http://www.blogger.com/atom/ns#' term='osx'/><title type='text'>vim compiled with ruby support on Lion</title><content type='html'>If you are a vim user on a Mac and you also like the &lt;a href="https://github.com/wincent/Command-T"&gt;Command-t&lt;/a&gt; plugin you have no doubt had to deal with the default vim, which does not come with ruby support out of the box. I have resorted to using &lt;a href="http://code.google.com/p/macvim/"&gt;MacVim&lt;/a&gt; for most of my needs but once in a while I wish Command-t was there for me in a vim terminal (read tmux).&lt;br /&gt; &lt;br /&gt;Well, I just found out that MacVim ships with a Vim and MacVim executable, so just use that.&lt;br /&gt; &lt;br /&gt;I added this alias to my bash profile and all was good:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;alias vim=&amp;#39;/Applications/MacVim.app/Contents/MacOS/Vim&amp;#39;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;That will take precedence over /usr/bin/vim (except if you do sudo vim, then you are back to the old /usr/bin/vim).&lt;br /&gt; &lt;br /&gt;Good enough, is what I say.&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;PS. I made a symlink from /Applications/MacVim.app/Contents/MacOS/Vim into /usr/bin/vim and it didn&amp;#39;t work quite right. I got a bunch of warnings about color scheme, etc. Not sure why, but I didn't feel the need to dig deeper. That is why I went the alias route.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1190940392946135264-4803059574175294851?l=www.watkyn.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.watkyn.com/feeds/4803059574175294851/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1190940392946135264&amp;postID=4803059574175294851' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/4803059574175294851'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/4803059574175294851'/><link rel='alternate' type='text/html' href='http://www.watkyn.com/2012/01/vim-compiled-with-ruby-support-on-lion.html' title='vim compiled with ruby support on Lion'/><author><name>Tony Eichelberger</name><uri>http://www.blogger.com/profile/14859637360805535045</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1190940392946135264.post-5803293043239122260</id><published>2011-08-18T12:38:00.001-07:00</published><updated>2012-01-06T13:04:18.417-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='osx'/><title type='text'>Updating rubygems on an old 10.5 Leopard machine</title><content type='html'>I ran into this problem today when trying to update my ruby gems on a fresh OSX 10.5 machine for testing:&lt;br /&gt;&lt;br /&gt;Updating RubyGems...&lt;br /&gt;ERROR:  While executing gem ... (Gem::RemoteSourceException)&lt;br /&gt;    HTTP Response 302 fetching http://gems.rubyforge.org/yaml&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;After a little googling I saw where gems were stored on S3 so I just added the --source option and that worked.  Here is the command for posterity.&lt;br /&gt;&lt;br /&gt;gem update --system --source http://production.s3.rubygems.org/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1190940392946135264-5803293043239122260?l=www.watkyn.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.watkyn.com/feeds/5803293043239122260/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1190940392946135264&amp;postID=5803293043239122260' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/5803293043239122260'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/5803293043239122260'/><link rel='alternate' type='text/html' href='http://www.watkyn.com/2011/08/updating-rubygems-on-old-105-leopard.html' title='Updating rubygems on an old 10.5 Leopard machine'/><author><name>Tony Eichelberger</name><uri>http://www.blogger.com/profile/14859637360805535045</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1190940392946135264.post-805726322302575979</id><published>2011-04-14T14:23:00.000-07:00</published><updated>2011-09-22T13:41:10.214-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='git'/><title type='text'>Using git at work on a Windows network drive</title><content type='html'>Rarely do I program without using some sort of version control.  I've been using git locally on my Windows machine at work to manage some scripts and I use a network drive as my remote in case my machine dies.  Here are the steps I used to get that up and running.&lt;br /&gt;&lt;br /&gt;You will need to install git (&lt;a href="http://code.google.com/p/msysgit/"&gt;try msysgit windows installer&lt;/a&gt;) and learn about git (&lt;a href="http://gitimmersion.com/"&gt;try git immersion&lt;/a&gt;) before setting up your remote repository.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Create a folder that will hold your git repository on your network share.&lt;br /&gt;I have a mapped drive on g: and my repository is g:\scripts so that is what my examples will use.&lt;br /&gt;&lt;br /&gt;From a cmd prompt change to your mapped drive.&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&amp;gt; cd g:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Then cd into your soon to be git repository.&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&amp;gt; cd scripts&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Then create an empty git repository.  If you do not use the --bare option, you will have issues so don't leave that out.&lt;br /&gt;&lt;span style="font-weight: bold; font-family: courier new;"&gt;&amp;gt; git init --bare&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now if you don't have a local git repository yet, then you can clone your new repository wherever you like by navigating back to your local drive.&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&amp;gt; c:&lt;/span&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&lt;br /&gt;&amp;gt; cd work/scripts&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&amp;gt; git clone file://g:\scripts&lt;/span&gt; &lt;br /&gt;(UNC paths also work  file://\\server\share\username\scripts)&lt;br /&gt;&lt;br /&gt;When you clone, you automatically get a remote called "origin" and you can push to the server for safe keeping any time you make changes locally.&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&amp;gt; git push origin master&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If you already have a git repository and you just want to push out to the shared drive then you can do this from within your local git manged project.&lt;br /&gt;&lt;span style="font-weight: bold; font-family: courier new;"&gt;&amp;gt; git remote add origin file://g:\scripts&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&amp;gt; git push origin master&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1190940392946135264-805726322302575979?l=www.watkyn.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.watkyn.com/feeds/805726322302575979/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1190940392946135264&amp;postID=805726322302575979' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/805726322302575979'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/805726322302575979'/><link rel='alternate' type='text/html' href='http://www.watkyn.com/2011/04/using-git-at-work-on-network-drive.html' title='Using git at work on a Windows network drive'/><author><name>Tony Eichelberger</name><uri>http://www.blogger.com/profile/14859637360805535045</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1190940392946135264.post-6096221064742941659</id><published>2010-07-30T21:34:00.001-07:00</published><updated>2011-03-11T12:38:17.171-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='life'/><title type='text'>Mind Share (Part Two)</title><content type='html'>Exactly one year ago today &lt;a href="http://www.watkyn.com/2009/07/how-to-really-punch-out-in-tech-job_30.html"&gt;I posted about "mind share"&lt;/a&gt; and how I was going to "punch out" of the tech world and enter fully into my home life with my full attention.  Well, it has gone pretty well.  There is definitely a correlation between programming too much and mind share issues.  The biggest lesson I've learned is to recognize when I've been pushing too hard, and deliberately let go of the things I don't have time for.&lt;br /&gt;&lt;br /&gt;Here are a few thoughts about what has worked for me and what has not in my ever elusive quest for work life balance.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Things that worked:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Early mornings:&lt;br /&gt;I have been reading and working on projects by getting up really early in the morning.  Working early in the morning has several benefits for me.  1) It is a natural time box that I can't easily lengthen since I need to get ready for work eventually.  2) My mind is fresh and doesn't feel tired like it can later in the evening.  3) I'm not taking away from time with anybody else (they are all still sleeping).&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Family projects:&lt;br /&gt;My wife and I worked on a project together.  It is a website that helps her keep track of things she buys in bulk to better understand which of those things are making her money and which are not worth the investment. This was fun because it was something we could work on in the evening but it wasn't taking time away from us being together.  It also was different than when I worked on a project by myself because now we were both thinking about the same thing, so if I had an idea for Homestore Lane (&lt;a href="http://homestorelane.com/"&gt;http://homestorelane.com&lt;/a&gt;) it was something we could talk about, unlike if it was some project she was not interested in.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Things that didn't work so well:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt; One night per week to work on projects:&lt;br /&gt;There are several reasons I don't think this worked very well for me.  1)  I was already mentally tired by the time I started on my projects.  2) It was hard to unwind and go to sleep after programming late into the night.  3) It was hard to get back into things after waiting for the whole week (or sometimes longer since it was easy to skip a week).&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Trying harder to compartmentalize:&lt;br /&gt;It wasn't mind over matter for me.  I had to stop trying to do so much before I noticed the difference in my attention span and my engagement in my home life.  Even though I would tell myself to stop thinking about projects, my brain just could not unwind enough because it was too tired (or engaged, or ?).&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;I'm going to stick with the morning thing and maybe some more family projects and see how it goes.  If there is anything else along these lines I am sure I will blog about them next year.  Or the year after, maybe.  (I am already staying up too late to write this, so what am I doing?  Time to stop.)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1190940392946135264-6096221064742941659?l=www.watkyn.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.watkyn.com/feeds/6096221064742941659/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1190940392946135264&amp;postID=6096221064742941659' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/6096221064742941659'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/6096221064742941659'/><link rel='alternate' type='text/html' href='http://www.watkyn.com/2010/07/mind-share-part-two.html' title='Mind Share (Part Two)'/><author><name>Tony Eichelberger</name><uri>http://www.blogger.com/profile/14859637360805535045</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1190940392946135264.post-1723898304798299026</id><published>2010-04-12T14:32:00.000-07:00</published><updated>2010-04-12T14:54:23.098-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iphone'/><category scheme='http://www.blogger.com/atom/ns#' term='objective-c'/><category scheme='http://www.blogger.com/atom/ns#' term='apple'/><title type='text'>Objective-C scarcity continues</title><content type='html'>There is a lot of angst among developers of the iPhone/iPad community over &lt;a href="http://daringfireball.net/2010/04/iphone_agreement_bans_flash_compiler"&gt;the language restrictions of the new iOS 4.0 license&lt;/a&gt;, and rightfully so.  Mobile Orchard closed shop because of it and there may be more high profile developers leaving the Apple platform in the future.&lt;br /&gt;&lt;br /&gt;There is one positive for the Objective-C developers, though.  The scarcity of their skill set will most likely continue.  Objective-C developers have experienced a renaissance in their once obscure language and frameworks, but now they are the chosen ones and they get paid like it.  Scarcity will give them the advantage in the market, driving up their rates/salaries as long as Apple continues to dominate in the arena of sales.&lt;br /&gt;&lt;br /&gt;This may be the only positive that comes from Apple's decision, and it is only a positive for a minority of developers, so in the end ... blech.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1190940392946135264-1723898304798299026?l=www.watkyn.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.watkyn.com/feeds/1723898304798299026/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1190940392946135264&amp;postID=1723898304798299026' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/1723898304798299026'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/1723898304798299026'/><link rel='alternate' type='text/html' href='http://www.watkyn.com/2010/04/objective-c-scarcity-continues.html' title='Objective-C scarcity continues'/><author><name>Tony Eichelberger</name><uri>http://www.blogger.com/profile/14859637360805535045</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1190940392946135264.post-133162800101252164</id><published>2010-01-27T14:51:00.000-08:00</published><updated>2010-04-12T14:55:14.725-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ipad'/><category scheme='http://www.blogger.com/atom/ns#' term='apple'/><title type='text'>iPad could be for an older generation</title><content type='html'>Somehow, the complaints I am seeing about the iPad don't resonate with me.  &lt;a href="http://www.crunchgear.com/2010/01/27/apple-has-a-solution-for-the-ipads-missing-sd-card-slot-and-usb-port-adapters/?utm_source=feedburner&amp;amp;utm_medium=feed&amp;amp;utm_campaign=Feed%3A+Techcrunch+%28TechCrunch%29&amp;amp;utm_content=Google+Reader"&gt;No sd slot, no USB slot&lt;/a&gt;, &lt;a href="http://www.defectivebydesign.org/ipad"&gt;too restrictive, too much DRM&lt;/a&gt;.  What I mean is this: I think the iPad will be a huge success, just not among the peope we think it will.&lt;br /&gt;&lt;br /&gt;There are a lot of people in the world who are not very tech savvy and who don't even know what a micro SD card is and wouldn't even know if they are buying DRM free music, video, etc. The baby boom generation, and the non-technical masses are going to love a device that "just works" for so many things.  At the same time, it makes these same people look and feel like the geeks they know and admire (ha ha).&lt;br /&gt;&lt;br /&gt;For example, I could see my Dad getting and iPad and a $15 monthly data plan so that he can do basic web browsing and email from home (he does not have internet right now).  It would be the simplest solution for him, and he doesn't have to use a mouse.  Some people just hate mice.&lt;br /&gt;&lt;br /&gt;Apple does such a great job of giving non-technical people fewer choices and a great experience.  The same may hold true for the iPad.  When the tech community criticizes Apple for the above mentioned things, they may be missing the point.  Apple doesn't care so much about developers, and alpha geeks as they might like to think.&lt;br /&gt;&lt;br /&gt;Watch out for the iPad revolution coming to a senior center near you!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1190940392946135264-133162800101252164?l=www.watkyn.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.watkyn.com/feeds/133162800101252164/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1190940392946135264&amp;postID=133162800101252164' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/133162800101252164'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/133162800101252164'/><link rel='alternate' type='text/html' href='http://www.watkyn.com/2010/01/ipad-could-be-for-older-generation.html' title='iPad could be for an older generation'/><author><name>Tony Eichelberger</name><uri>http://www.blogger.com/profile/14859637360805535045</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1190940392946135264.post-1668600059665568744</id><published>2009-12-03T14:28:00.001-08:00</published><updated>2009-12-03T14:31:33.347-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='clojure'/><title type='text'>Why do clojure examples always use the REPL?</title><content type='html'>I was frustrated by the getting started guides in clojure in that they did not give a quick intro to how to run a .clj file.  Instead all the example are using the REPL, which is not something I like.  I want to be able to edit a file with code in it and then execute the code in the file.  It should be easier to find out how to do that.  Here is what I did:&lt;br /&gt;&lt;br /&gt;Assuming you have the clojure.jar and contrib-clojure.jar files built or downloaded somewhere.&lt;br /&gt;&lt;br /&gt;I created the following env variables to point to the jars.&lt;br /&gt;$CLOJURE_JAR&lt;br /&gt;$CONTRIB_JAR&lt;br /&gt;&lt;br /&gt;Then I created a source file called fun.clj with this line of code in it:&lt;br /&gt;(println (+ 1 2 3))&lt;br /&gt;&lt;br /&gt;Then from the directory of the fun.clj file you can run this command.&lt;br /&gt;java -cp $CLOJURE_JAR:$CONTRIB_JAR clojure.main fun.clj&lt;br /&gt;&lt;br /&gt;I created an alias to clojure that takes a file name so I can now do this in any directory:&lt;br /&gt;clojure &amp;lt;filename&amp;gt; and it will run it.&lt;br /&gt;&lt;br /&gt;(Update:  I found the link I was missing.  It should be in a more prominent place maybe.)&lt;br /&gt;&lt;a href="http://clojure.org/repl_and_main"&gt;http://clojure.org/repl_and_main&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1190940392946135264-1668600059665568744?l=www.watkyn.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.watkyn.com/feeds/1668600059665568744/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1190940392946135264&amp;postID=1668600059665568744' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/1668600059665568744'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/1668600059665568744'/><link rel='alternate' type='text/html' href='http://www.watkyn.com/2009/12/why-do-clojure-examples-always-use-repl.html' title='Why do clojure examples always use the REPL?'/><author><name>Tony Eichelberger</name><uri>http://www.blogger.com/profile/14859637360805535045</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1190940392946135264.post-3071552247601196944</id><published>2009-12-03T11:09:00.001-08:00</published><updated>2009-12-04T05:55:33.072-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>Learn 4 to 6 editors adequately</title><content type='html'>Unfortunately, I suffer from what a coworker of mine calls, editor ADD.  My new motto is this: "Learn 4 to 6 editors and learn them adequately."  I have kind of given up on learning one editor very well, since I can't make up my mind.  About a year ago, I narrowed down my list to 4 development tools / editors (Textmate, vim, eclipse, IntelliJ).  I also tried to separate them by operating system.  When I was on the Mac I was going to use IntelliJ for Java work and Textmate for everything else.  On windows it was going to be Eclipse for Java and VIM for everything else.  So far it hasn't been too bad.&lt;br /&gt;&lt;br /&gt;I was worried that having too many keystrokes in my head would end up becoming a nightmare, but surprisingly, the many different sets of keystrokes can coexist in my mind without too much conflict.  There is roughly a 1/2 hour context switch for me, where keystrokes are sometimes blurred moving from one environment to the other after a prolonged period of using just one.  But for the most part, my brain knows vim, Textmate, eclipse, or IntelliJ, and doesn't seem to complain about the switching.&lt;br /&gt;&lt;br /&gt;I am not actually advocating this approach to anyone else, but there may be one aspect of learning several editors adequately that has some tangible benefit.  That is, when pair programming with different people, you can adapt to the style of your pair with minimal disruption.  Now, if each person has their own laptop and their own set of tools, then it doesn't really matter.&lt;br /&gt;&lt;br /&gt;[Update:  I forgot about Xcode.  That makes 5.]&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1190940392946135264-3071552247601196944?l=www.watkyn.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.watkyn.com/feeds/3071552247601196944/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1190940392946135264&amp;postID=3071552247601196944' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/3071552247601196944'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/3071552247601196944'/><link rel='alternate' type='text/html' href='http://www.watkyn.com/2009/12/learn-4-to-6-editors-adequately.html' title='Learn 4 to 6 editors adequately'/><author><name>Tony Eichelberger</name><uri>http://www.blogger.com/profile/14859637360805535045</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1190940392946135264.post-8851365795790298957</id><published>2009-11-23T10:18:00.001-08:00</published><updated>2009-12-03T11:11:41.472-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>Pomodoro and Flow</title><content type='html'>I have been hearing about the pomodoro technique and so I started trying it for myself.  I really like the concept, and often times, I need some help staying focused and not getting distracted.  However, when I am tuned in to my code and really focused on what I am doing, I can go for hours at a very high level.  This happened to me lately as I was working on an iPhone project.  I knew what I wanted to get done, and trying to use pomodoro was just getting in the way.&lt;br /&gt;&lt;br /&gt;When you are in "flow" from a programmer's perspective, then go with the flow and skip the pomodoro.  I don't want any breaks, especially breaks in my concentration at that point.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1190940392946135264-8851365795790298957?l=www.watkyn.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.watkyn.com/feeds/8851365795790298957/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1190940392946135264&amp;postID=8851365795790298957' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/8851365795790298957'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/8851365795790298957'/><link rel='alternate' type='text/html' href='http://www.watkyn.com/2009/11/pomodoro-and-flow.html' title='Pomodoro and Flow'/><author><name>Tony Eichelberger</name><uri>http://www.blogger.com/profile/14859637360805535045</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1190940392946135264.post-6653871003568537024</id><published>2009-09-28T05:54:00.000-07:00</published><updated>2010-01-11T06:53:29.576-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='refactoring'/><title type='text'>Legacy Code:  Extract Interface</title><content type='html'>Micheal Feathers book "Working with legacy code " has a chapter called Extract Interface.  This is taken from Fowler's Refactoring book and applied to legacy code.&lt;br /&gt;&lt;br /&gt;The motivation for extracting an interface is different between the two books.  Refactoring looks at this from the point of code organization and structure.  Working With Legacy Code looks at this as a dependency breaking mechanism to get a class under test.&lt;br /&gt;&lt;br /&gt;Both aims are to make the code more maintainable over time, and the use of interfaces to represent concepts in code is a great way to do that.&lt;br /&gt;&lt;br /&gt;How would this play into something like ruby?  Well, the dependency issue is virtually non-existent from a testing point of view.  Getting a class under test is as easy as using a mocking library (Actually, the same can be said for Java in the example from Micheal's book).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1190940392946135264-6653871003568537024?l=www.watkyn.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.watkyn.com/feeds/6653871003568537024/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1190940392946135264&amp;postID=6653871003568537024' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/6653871003568537024'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/6653871003568537024'/><link rel='alternate' type='text/html' href='http://www.watkyn.com/2009/09/legacy-code-extract-interface.html' title='Legacy Code:  Extract Interface'/><author><name>Tony Eichelberger</name><uri>http://www.blogger.com/profile/14859637360805535045</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1190940392946135264.post-9025385002684087751</id><published>2009-09-24T06:12:00.000-07:00</published><updated>2009-09-25T14:33:09.574-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='patterns'/><title type='text'>Pattern of the week: Adapter</title><content type='html'>From Java Design Patterns:&lt;br /&gt;&lt;span class="docEmphStrong"&gt;The intent of&lt;/span&gt; A&lt;span class="docEmphSmaller"&gt;DAPTER&lt;/span&gt; &lt;span class="docEmphStrong"&gt;&lt;a name="client expects"&gt;&lt;/a&gt;is to provide the interface that a client expects while using the services of a class with a different interface.&lt;br /&gt;&lt;br /&gt;This actually makes sense to me right out of the gate.  I've probably read about and used Adapter before but needed a refresher on what it actually was.&lt;br /&gt;&lt;br /&gt;So lets say that I have a lab processing class that takes LabOrder objects and processes them somehow.  Another team in my company has a service that supplies LabResults from a different vendor than the one I work with but they like the processing class I made and want me to process their LabResult class also.&lt;br /&gt;&lt;br /&gt;I see that the objects do similar things but have slightly different methods, so I create an adapter class that implements the LabOrder interface and delegates to the LabResult object that is passed in to the constructor.  No code changes required for the lab processing class.&lt;br /&gt;&lt;br /&gt;githup &lt;a href="http://github.com/watkyn/scripts/blob/master/patterns/adapter.rb"&gt;Adapter&lt;/a&gt; code&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1190940392946135264-9025385002684087751?l=www.watkyn.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.watkyn.com/feeds/9025385002684087751/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1190940392946135264&amp;postID=9025385002684087751' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/9025385002684087751'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/9025385002684087751'/><link rel='alternate' type='text/html' href='http://www.watkyn.com/2009/08/pattern-of-week-adapter.html' title='Pattern of the week: Adapter'/><author><name>Tony Eichelberger</name><uri>http://www.blogger.com/profile/14859637360805535045</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1190940392946135264.post-4474243647829306566</id><published>2009-09-13T13:36:00.000-07:00</published><updated>2009-09-25T14:33:56.135-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='agile'/><title type='text'>Waterfall presentations</title><content type='html'>I just finished watching a presentation on how to incorporate Lean into IT.  After watching the presentation, I realized that most presentations are waterfall.  The really engaging presentations do not usually follow the format we all learned in school:&lt;br /&gt;&lt;br /&gt;History of Lean&lt;br /&gt;How Manufacturing uses Lean&lt;br /&gt;How IT does things now&lt;br /&gt;Problems we have in delivering things in IT&lt;br /&gt;How lean ideas map to IT&lt;br /&gt;Practical advice on how to apply lean concepts to IT&lt;br /&gt;Questions?&lt;br /&gt;&lt;br /&gt;The most interesting and engaging parts of a presentation are probably the last two items, the practical advice, and the questions from the audience.  But after being put to sleep for the first 45 minutes, people are not ready to get into the questions.&lt;br /&gt;&lt;br /&gt;Even if the presentation is interesting, does all the outline verboseness really give people what they want to know?  What would be the Lean way of giving a presentation?&lt;br /&gt;&lt;br /&gt;You can't just stand up there and ask "So, what do you all want to learn about Lean in IT?", can you?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1190940392946135264-4474243647829306566?l=www.watkyn.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.watkyn.com/feeds/4474243647829306566/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1190940392946135264&amp;postID=4474243647829306566' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/4474243647829306566'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/4474243647829306566'/><link rel='alternate' type='text/html' href='http://www.watkyn.com/2009/06/waterfall-presentations.html' title='Waterfall presentations'/><author><name>Tony Eichelberger</name><uri>http://www.blogger.com/profile/14859637360805535045</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1190940392946135264.post-8436323259513072460</id><published>2009-09-04T10:55:00.000-07:00</published><updated>2009-09-14T06:04:55.572-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iphone'/><category scheme='http://www.blogger.com/atom/ns#' term='objective-c'/><title type='text'>OCUnit Configuration for iPhone Development</title><content type='html'>On an &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_0"&gt;iPhone&lt;/span&gt; project I am currently working on, I have been experimenting with some unit testing frameworks.  Actually, I tried the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;rbiphonetesting&lt;/span&gt; ruby framework from Dr. &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;Nic&lt;/span&gt; and that got me started down the TDD path on this project.&lt;br /&gt;&lt;br /&gt;It was actually pretty sweet, since I couldn't test any &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;UIKit&lt;/span&gt; classes from the ruby framework since it was using &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;MacRuby&lt;/span&gt; which does not run on the &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_5"&gt;iPhone&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;sdk&lt;/span&gt;.  This was a nice constraint, as I was forced to put any code I wanted to test into a non &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;UI&lt;/span&gt; class.  This helped me clean out the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;UI&lt;/span&gt; and delegate to models, presenters, etc.&lt;br /&gt;&lt;br /&gt;Then I hit an issue with differences in string handling between &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;MacRuby&lt;/span&gt; and the &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_10"&gt;iPhone&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;sdk&lt;/span&gt;.  My unit tests were no longer reliable, since they were passing but when running on the &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_12"&gt;iPhone&lt;/span&gt;, I could obviously see incorrect behavior.&lt;br /&gt;&lt;br /&gt;I knew going in, that this could be a problem.  It was a fun experiment, and actually gave me a good perspective on testing apps on the &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_13"&gt;iPhone&lt;/span&gt;. &lt;br /&gt;&lt;br /&gt;I have recently ported all my ruby tests over to &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;OCUnit&lt;/span&gt; and am back up and running.  If I had started with &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;OCUnit&lt;/span&gt;, I think my tests may be quite &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_16"&gt;different&lt;/span&gt;, as well as the structure of my object model.&lt;br /&gt;&lt;br /&gt;One thing that stuck out for me after porting all the tests over to &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17"&gt;OCUnit&lt;/span&gt;, is that they are incredibly fast compared to the ruby version.  Which is good, since they run every time I build my code in &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_18"&gt;Xcode&lt;/span&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1190940392946135264-8436323259513072460?l=www.watkyn.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.watkyn.com/feeds/8436323259513072460/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1190940392946135264&amp;postID=8436323259513072460' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/8436323259513072460'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/8436323259513072460'/><link rel='alternate' type='text/html' href='http://www.watkyn.com/2009/09/ocunit-configuration-for-iphone.html' title='OCUnit Configuration for iPhone Development'/><author><name>Tony Eichelberger</name><uri>http://www.blogger.com/profile/14859637360805535045</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1190940392946135264.post-8200534095355642609</id><published>2009-07-30T16:00:00.000-07:00</published><updated>2010-04-08T18:26:47.803-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='life'/><title type='text'>Mind Share (Part One)</title><content type='html'>After reading &lt;a href="http://praglife.typepad.com/pragmatic_life/2009/05/punch-out-log-off-.html"&gt;the pragmatic life post called Punch Out  Log Off&lt;/a&gt;,   I began thinking about a term I call "mind share".  Think of mind share in terms of twitter, but instead of asking "what are you doing right now", you ask, "what are you thinking about right now?" If you ask yourself this question periodically, you will begin to see some patterns.&lt;br /&gt;&lt;br /&gt;For example, let's say you are spending some quality time with the family.  What are you thinking about?  Do any of the answers to the mind share question sound like the list below?  If so, the people around you are not getting quality time from you and believe me, they can tell:&lt;br /&gt;&lt;br /&gt;- "What is the killer feature for idea X that I should build?"&lt;br /&gt;- "I wish my company used REST web services instead of SOAP?"&lt;br /&gt;- "I should tweet that I am hanging out with the fam right now."&lt;br /&gt;- "Someone is talking to me, and I am looking at them, but I have no idea what they just said."&lt;br /&gt;- "What a cool idea for an iPhone App. I better write it down."&lt;br /&gt;- "I think I just heard my iPhone buzz.  Was it email, SMS, ebay, Fring, or one of the 700 other possibilities?"&lt;br /&gt;&lt;br /&gt;It takes a conscious effort to make sure the people in the room with you are given more priority than the virtual world we work and play in throughout the day.  I have been analyzing this in my own life for the past couple years (mostly the negative effects) and have started to understand some of the ways that I can give more mind share to the people I love and compartmentalize my work better.&lt;br /&gt;&lt;br /&gt;In part two of this post, I might try to explain some of the things I have been learning that help keep my mind from getting too absorbed in tech. Actually, I may never write part two, if I am successful at punching out and checking in to life at home better.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1190940392946135264-8200534095355642609?l=www.watkyn.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.watkyn.com/feeds/8200534095355642609/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1190940392946135264&amp;postID=8200534095355642609' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/8200534095355642609'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/8200534095355642609'/><link rel='alternate' type='text/html' href='http://www.watkyn.com/2009/07/how-to-really-punch-out-in-tech-job_30.html' title='Mind Share (Part One)'/><author><name>Tony Eichelberger</name><uri>http://www.blogger.com/profile/14859637360805535045</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1190940392946135264.post-4311895196061126928</id><published>2009-07-24T13:11:00.000-07:00</published><updated>2009-08-17T06:11:41.463-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iphone'/><category scheme='http://www.blogger.com/atom/ns#' term='objective-c'/><title type='text'>Over releasing objects in Objective-C</title><content type='html'>I just learned the difference between over releasing an object and attempting to release an unallocated object.&lt;br /&gt;&lt;br /&gt;I saw this example in an &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;iphone&lt;/span&gt; book where an instance variable was being released before it was assigned.&lt;br /&gt;&lt;br /&gt;- (void)&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;parserDidStartDocument&lt;/span&gt;:(&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;NSXMLParser&lt;/span&gt; *)parser {&lt;br /&gt; [&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;tweetsString&lt;/span&gt; release];&lt;br /&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;tweetsString&lt;/span&gt; = [[&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;NSMutableString&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;alloc&lt;/span&gt;] &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;initWithCapacity&lt;/span&gt;: (20 * (140 + 20)) ];&lt;br /&gt;......&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;I was wondering why the release on the first line was not blowing up, since I have experienced errors in my code when I over release an object (that is, I call release on an object more than once).  So I tried an experiment and put multiple [&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;tweetString&lt;/span&gt; release]; calls all in a row, thinking this would blow up.  But it works just fine.&lt;br /&gt;&lt;br /&gt;The reason is that a nil object (one that has never been allocated) is never sent any messages.  There are no &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;NullPointerExceptions&lt;/span&gt; since the messages are just discarded (correct me if I am wrong, please).  So it is safe to call release on an unallocated object, but you cannot send release to an object more than once AFTER it has been allocated.&lt;br /&gt;&lt;br /&gt;I should have realized this before, since this is the way properties work when set to retain.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1190940392946135264-4311895196061126928?l=www.watkyn.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.watkyn.com/feeds/4311895196061126928/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1190940392946135264&amp;postID=4311895196061126928' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/4311895196061126928'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/4311895196061126928'/><link rel='alternate' type='text/html' href='http://www.watkyn.com/2009/07/over-releasing-objects-in-objective-c.html' title='Over releasing objects in Objective-C'/><author><name>Tony Eichelberger</name><uri>http://www.blogger.com/profile/14859637360805535045</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1190940392946135264.post-6979799308042306768</id><published>2009-07-10T17:07:00.000-07:00</published><updated>2010-01-06T15:05:07.256-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='patterns'/><title type='text'>Pattern of the week:  Visitor</title><content type='html'>The intent of VISITOR is to let you define a new operation for a hierarchy without changing the hierarchy classes. (Java Design Patterns)&lt;br /&gt;&lt;br /&gt;Josh Kerievsky puts it this way, "The job of many real world Visitors is to accumulate information."&lt;br /&gt;&lt;br /&gt;So what exactly does that mean in practice?  The classes in the hierarchy must have a method called accept() that takes in an specified interface.  Then the interface will have visit() methods on there.  The visit signature will be determined by which class in the hierarchy you want to visit, and thus extend functionality to.&lt;br /&gt;&lt;br /&gt;The tricky part for me to understand was the "double-dispatch" that needs to take place for Visitor to function.  An object that conforms to the interface needed by the visitor takes the visitor in the accept() method.  Inside the accept() method the visit method is called by the object which then passes itself to the correct visit() method of the Visitor.&lt;br /&gt;&lt;br /&gt;Confusing?  Yes, it seems to be rather.&lt;br /&gt;&lt;br /&gt;I like the quote by Ralph Johnson about Visitor, "Most of the time you don't need Visitor, but when you do need Visitor, you really need Visitor!"&lt;br /&gt;&lt;br /&gt;That tells me, to not go out of my way to find uses for Visitor, but to stay far away from it until the light bulb comes on in a particular project where this makes perfect sense.  It may never happen, in which case I won't lose any sleep.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Visitor does not apply to ruby or any dynamic language where you can change the class hierarchy whenever you wish, on the fly.  Even so, I am going to show this code in ruby, pretending to be Java.  The interesting thing here is that ruby does not have method overloading since it is dynamically types.  So the actual java example would look different, in that the visit methods would be overloaded with the different types that we know of.  The ruby example has to check inside the visit method for the appropriate type and handle it accordingly.  Method overloading is a nice thing to have when you want it.&lt;br /&gt;&lt;br /&gt;My &lt;a href="http://github.com/watkyn/scripts/blob/master/patterns/visitor.rb"&gt;TreeVisitor&lt;/a&gt; example in ruby.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1190940392946135264-6979799308042306768?l=www.watkyn.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.watkyn.com/feeds/6979799308042306768/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1190940392946135264&amp;postID=6979799308042306768' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/6979799308042306768'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/6979799308042306768'/><link rel='alternate' type='text/html' href='http://www.watkyn.com/2009/07/pattern-of-week-visitor.html' title='Pattern of the week:  Visitor'/><author><name>Tony Eichelberger</name><uri>http://www.blogger.com/profile/14859637360805535045</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1190940392946135264.post-7948590812036753696</id><published>2009-06-05T17:00:00.000-07:00</published><updated>2009-06-08T06:12:54.515-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='patterns'/><title type='text'>Pattern of the week:  Composite</title><content type='html'>The intent of the COMPOSITE pattern is to let clients treat individual objects and compositions of objects uniformly. (Java Design Patterns)&lt;br /&gt;&lt;br /&gt;There are objects that have children and there are objects that don't.  The objects that have children can have a common interface with the objects that do not have children, and so Composite.&lt;br /&gt;&lt;br /&gt;The example I used in my code (see below) was that of a Menu and MenuItems.  Swing uses this model for its menus.  A Menu may or may not have sub menus.  A MenuItem, however, never has sub menus; it is always the end of the road, a leaf.&lt;br /&gt;&lt;br /&gt;A process may want to traverse a tree of objects but it does not want to have to figure out who has child elements and who does.  Composite attempts to solve this problem by establishing a common interface between the two types.  Then the object that has children can traverse its children when the common method is called and call the common method on the child objects.&lt;br /&gt;&lt;br /&gt;Here is a &lt;a href="http://github.com/watkyn/scripts/blob/4666ef973f91edc6d4fbf8ca5f8ecee3e269a734/patterns/composite.rb"&gt;link to the ruby code&lt;/a&gt; I wrote up to help me understand Composite better.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I ran into another good example over the weekend.  We went to a tree identification outing and the naturalist there had a identification key.  It used decision tree logic, and I thought to myself, "Hey, the Composite pattern in real life!".  What a geek I am sometimes.&lt;br /&gt;&lt;br /&gt;Each question led to either one or many follow up questions.  I thought of putting the logic into an iPhone application, and realized I could model the questions as Composites.  Some questions would be trees, and others would be leaves.  Perfect for a tree identification app!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1190940392946135264-7948590812036753696?l=www.watkyn.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.watkyn.com/feeds/7948590812036753696/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1190940392946135264&amp;postID=7948590812036753696' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/7948590812036753696'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/7948590812036753696'/><link rel='alternate' type='text/html' href='http://www.watkyn.com/2009/05/pattern-of-week-composite.html' title='Pattern of the week:  Composite'/><author><name>Tony Eichelberger</name><uri>http://www.blogger.com/profile/14859637360805535045</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1190940392946135264.post-2645135185277923146</id><published>2009-05-08T08:59:00.001-07:00</published><updated>2009-05-22T14:17:12.849-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='patterns'/><title type='text'>Pattern of the Week: Flyweight</title><content type='html'>The intent of the FLYWEIGHT pattern is to use sharing to support large numbers of fine-grained objects efficiently.  (Java Design Patterns)&lt;br /&gt;&lt;br /&gt;I have always wondered what exactly the Flyweight pattern was all about so this week I decided I would learn.  Right away in the definition is the use of another term that I usually find confusing, "fine-grained vs coarse-grained" objects.&lt;br /&gt;&lt;br /&gt;It turns out &lt;a href="http://en.wikipedia.org/wiki/Granularity"&gt;fine-grained and coarse-grained&lt;/a&gt; are terms used in physics and have also come to be used in other technical fields.  For objects, to be fine-grained generally means to be small with a focused responsibility whereas coarse-grained objects generally encapsulate the functionality of many fine-grained objects.&lt;br /&gt;&lt;br /&gt;J2EE uses these terms a lot because of the problems involved in having fine-grained objects being too "chatty" in a distributed system.&lt;br /&gt;&lt;br /&gt;Anyway, to get back to Flyweight, lets say there is a fine-grained object like a Unit.  Unit is a measurement that can be anything from inches to liters to moles.  The point being, a Unit is immutable and one instance can be shared safely across the entire system.  An inch is always going to be an inch, so lets share the inch Unit instead of having everyone create there own instance of inch anytime they need it.&lt;br /&gt;&lt;br /&gt;One approach (used in the book) is to create a factory like UnitFactory that will return the shared instance of each Unit.  Enforcing the use of UnitFactory was done by hiding all the Unit implementations in an inner class of the Factory so that they can not be instantiated directly.  The Unit interface is exposed to all.  Asking the UnitFactory for a Unit could either be done by passing in a string or an enum representing the Unit to be returned.&lt;br /&gt;&lt;br /&gt;So, if you really want to prematurelly optimize your next project, analyze all the objects that could potentially be shared and tell everyone on your team that the Flyweight pattern would be a really good idea.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1190940392946135264-2645135185277923146?l=www.watkyn.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.watkyn.com/feeds/2645135185277923146/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1190940392946135264&amp;postID=2645135185277923146' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/2645135185277923146'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/2645135185277923146'/><link rel='alternate' type='text/html' href='http://www.watkyn.com/2009/05/pattern-of-week-flyweight.html' title='Pattern of the Week: Flyweight'/><author><name>Tony Eichelberger</name><uri>http://www.blogger.com/profile/14859637360805535045</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1190940392946135264.post-3299486455934544169</id><published>2009-04-20T06:32:00.000-07:00</published><updated>2009-04-23T14:32:11.499-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='refactoring'/><title type='text'>Refactoring thing of the week</title><content type='html'>Well, I don't have much to say about the Refactoring: Change Bidirectional Association to Unidirectional (which is what I decided to look at this week on Monday).  Sounds great!  Change it if it makes sense.&lt;br /&gt;&lt;br /&gt;Like Fowler says in the book, "The most difficult part of this refactoring is checking that I can do it."&lt;br /&gt;&lt;br /&gt;If the change will not cause too many ripple effects, it can be done very nicely.  Otherwise, you may be facing a big ball of mud and it may not be feasible.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1190940392946135264-3299486455934544169?l=www.watkyn.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.watkyn.com/feeds/3299486455934544169/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1190940392946135264&amp;postID=3299486455934544169' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/3299486455934544169'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/3299486455934544169'/><link rel='alternate' type='text/html' href='http://www.watkyn.com/2009/04/refactoring-thing-of-week.html' title='Refactoring thing of the week'/><author><name>Tony Eichelberger</name><uri>http://www.blogger.com/profile/14859637360805535045</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1190940392946135264.post-389029815936133103</id><published>2009-04-10T06:35:00.000-07:00</published><updated>2009-05-22T14:17:24.444-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='patterns'/><title type='text'>Pattern of the week:  Builder</title><content type='html'>The intent of the BUILDER pattern is to move the construction logic for an object outside the class to be instantiated.&lt;br /&gt;A builder class offloads construction logic from a domain class and can accept initialization parameters gradually, as a parser discovers them.&lt;br /&gt;(Java Design Patterns)&lt;br /&gt;&lt;br /&gt;A common motivation for refactoring to a Builder is to simplify the client code that creates complex objects.&lt;br /&gt;(Refactoring to Patterns)&lt;br /&gt;&lt;br /&gt;One place that I frequently will use the builder pattern in the future is creating objects for my unit tests in Java.  Test Data Builder works really well for this since it allows for having immutable objects without having to specify all the parameters in the constructor of the class.  It also allows for introducing test doubles easily for only specific cases, etc.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;For Test Data Builders in Java see Jay Fields &lt;a href="http://blog.jayfields.com/2009/01/most-java-unit-tests-consist-of-class.html"&gt;article&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;For a Ruby test data builder, check out &lt;a href="http://github.com/thoughtbot/factory_girl/tree/master"&gt;Factory Girl&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Immutability simplifies concurrency issues, but complicates construction by forcing all state to be passed into the constructor.  When we were using Google Protocol Buffers, I noticed their diligence in making sure the only mutable objects were Builder objects.  This gives us the flexibility of building up the data in the builder class however it seems to work best, but then once the REAL object is built, it is immutable.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Whenever there is pain putting together a complex object graph, test objects, composite objects, and the like, the Builder pattern is very useful.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1190940392946135264-389029815936133103?l=www.watkyn.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.watkyn.com/feeds/389029815936133103/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1190940392946135264&amp;postID=389029815936133103' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/389029815936133103'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/389029815936133103'/><link rel='alternate' type='text/html' href='http://www.watkyn.com/2009/04/pattern-of-week-builder.html' title='Pattern of the week:  Builder'/><author><name>Tony Eichelberger</name><uri>http://www.blogger.com/profile/14859637360805535045</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1190940392946135264.post-6835475431669707655</id><published>2009-04-06T07:56:00.000-07:00</published><updated>2009-04-06T07:56:00.721-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iphone'/><title type='text'>IBOutlets and Interface Builder</title><content type='html'>It has taken me about 5 sessions of working through the &lt;a href="http://www.pragprog.com/screencasts/v-bdiphone/writing-your-first-iphone-application"&gt;Pragmatic Programmers iPhone screencasts&lt;/a&gt; before I am starting to feel comfortable "wiring up" components through Interface Builder.&lt;br /&gt;&lt;br /&gt;It really is a "visual" dependency injection framework.  I specify the class that I want access to in my header file and optionally have properties set for it.  Then, when I drag the visual representation of the class to another visual representation of another class, it tells the compiler to inject this class into that class.  &lt;br /&gt;&lt;br /&gt;Connecting, via the right click drag and drop, is essentially setting up a configuration that will inject that component into your class at runtime.  Before today, I didn't really notice the list of IBOutlets each component was expecting to have set and the list that each component was referenced by.  For some reason, that was the point at which everything started to click.&lt;br /&gt;&lt;br /&gt;Before today, I just saw Bill D. dragging stuff around and "wiring things together".  Then I would try to start from scratch without following him step by step and get totally lost as soon as I had to figure out which components to hook up to which controllers, etc.&lt;br /&gt;&lt;br /&gt;I don't know why it has helped me to think of it in terms of dependency injection, but if it helps, it helps.  Probably more than anything, it just takes repetition until something clicks.  One or two more episodes and possibly a small project start to finish, and I think it will be cemented in the brain paths for a good long time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1190940392946135264-6835475431669707655?l=www.watkyn.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.watkyn.com/feeds/6835475431669707655/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1190940392946135264&amp;postID=6835475431669707655' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/6835475431669707655'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/6835475431669707655'/><link rel='alternate' type='text/html' href='http://www.watkyn.com/2009/04/iboutlets-and-interface-builder.html' title='IBOutlets and Interface Builder'/><author><name>Tony Eichelberger</name><uri>http://www.blogger.com/profile/14859637360805535045</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1190940392946135264.post-3102475165779850001</id><published>2009-04-03T13:47:00.000-07:00</published><updated>2009-04-03T12:13:07.180-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='patterns'/><title type='text'>Pattern of the week: Decorator</title><content type='html'>The intent of DECORATOR is to let you compose new variations of an operation at runtime. (Java Design Patterns)&lt;br /&gt;&lt;br /&gt;The example given in the book identifies java streams as using the Decorator pattern.  Right away my reaction is, I have always hated dealing with streams in Java, they are always so confusing.&lt;br /&gt;&lt;br /&gt;I like Russ Olsen's comment in Design Patterns in Ruby:&lt;br /&gt;"The classic Decorator pattern is loved more by the folks who build the thing than by those who use it."&lt;br /&gt;&lt;br /&gt;I would agree.&lt;br /&gt;&lt;br /&gt;But understanding Decorator will help me recognize when someone has chosen to use Decorator in an API, and maybe it won't be confusing anymore.&lt;br /&gt;&lt;br /&gt;When to use Decorator is not something I am going to try and explain.  I am only interested in trying to explain what Decorator is, so as to help solidify it in my brain forever.  I am going to give a short explanation and then a link to the code I have been experimenting with.&lt;br /&gt;&lt;br /&gt;Once the class to be decorated (my example uses a Person class) has been determined, a suitable interface must be agreed upon, that all decorators must implement.  The Decorator must take the Person class as a constructor parameter and delegate to that instance for all methods that it does not explicitly want to manage.  In Most cases, the methods in the Decorator will always delegate to the person instance passed in but some methods will add additional logic.&lt;br /&gt;&lt;br /&gt;This pattern allows chaining of Decorators and can be very flexible.  Check out my ruby example code where in I experiment with Decorator following the Java idiom with its limitations and then using ruby modules.  Notice how the two types of Decorators keep chaining together.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://github.com/watkyn/scripts/blob/5ed8f3c91fe51fb66c05b83f70260c1a0bd1eb99/patterns/decorator.rb"&gt;Git Hub Decorator.rb&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Template Method and Strategy are competing patterns with Decorator.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1190940392946135264-3102475165779850001?l=www.watkyn.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.watkyn.com/feeds/3102475165779850001/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1190940392946135264&amp;postID=3102475165779850001' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/3102475165779850001'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/3102475165779850001'/><link rel='alternate' type='text/html' href='http://www.watkyn.com/2009/03/pattern-of-week-decorator.html' title='Pattern of the week: Decorator'/><author><name>Tony Eichelberger</name><uri>http://www.blogger.com/profile/14859637360805535045</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1190940392946135264.post-2805186965674395702</id><published>2009-04-02T09:20:00.000-07:00</published><updated>2009-04-02T12:47:34.415-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>Should I trust the "Legion of the Bouncy Castle" ???</title><content type='html'>I love the idea of Java Web Start and have even given it another try recently (&lt;a href="http://tonyike.blogspot.com/2009/03/new-webstart.html"&gt;The New Webstart&lt;/a&gt;), but as an occasional user of Web Start applications, I can see why it will never take off.  Java does not take off the engineering hats long enough to see how bad it really is.&lt;br /&gt;&lt;br /&gt;Case Study:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.soapui.org/"&gt;SoapUI&lt;/a&gt; is a testing tool for web services that I have been using on a project.  I needed to run only the GUI portion of SoapUI from my mac so I decided to just web start it and go from there.&lt;br /&gt;&lt;br /&gt;The web start button on the web site looks fabulous, great job.  I click on it and it asks me if I want to open the .jnlp file with Java Web Start.  Sure, let's do that.  &lt;br /&gt;&lt;br /&gt;First the ugly Java splash screen comes up.  (-1)&lt;br /&gt;&lt;br /&gt;After downloading all the SoapUI jars a popup asks me if I trust eviware?  Sure, I click yes.  Then I am asked if I trust sun micorsystems.  Ok, i guess so, lets get on with this.  &lt;br /&gt;&lt;br /&gt;But the kicker was the last one which asked me:&lt;br /&gt;&lt;br /&gt;"Do you trust 'The Legion of the Bouncy Castle'?"&lt;br /&gt;&lt;br /&gt;HUH???&lt;br /&gt;&lt;br /&gt;So, I googled &lt;a href="http://www.bouncycastle.org/"&gt;the legion&lt;/a&gt; and found out what it was, and it sounds legit.  It is an open source encryption library of some kind.  And great, if they want to call themselves that, but please do not ask the users of your software if they trust the Legion of the Bouncy Castle!&lt;br /&gt;&lt;br /&gt;Do not ask me if I trust this application more than once, and never, never, never, never, never, never, never ask a USER if they trust the Legion of the Bouncy Castle!&lt;br /&gt;&lt;br /&gt;(-1000)&lt;br /&gt;&lt;br /&gt;I close the app after I am done and realize I have no way of opening SoapUI again unless I navigate back to the web site and relaunch it.&lt;br /&gt;&lt;br /&gt;Web Start should make it hard for developers to leave the user hanging as to how to launch the app a second time.&lt;br /&gt;&lt;br /&gt;(-5)&lt;br /&gt;&lt;br /&gt;So I give that cumulative score of -1051&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1190940392946135264-2805186965674395702?l=www.watkyn.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.watkyn.com/feeds/2805186965674395702/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1190940392946135264&amp;postID=2805186965674395702' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/2805186965674395702'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/2805186965674395702'/><link rel='alternate' type='text/html' href='http://www.watkyn.com/2009/04/should-i-trust-legion-of-bouncy-castle.html' title='Should I trust the &quot;Legion of the Bouncy Castle&quot; ???'/><author><name>Tony Eichelberger</name><uri>http://www.blogger.com/profile/14859637360805535045</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1190940392946135264.post-6033960303591003490</id><published>2009-03-27T06:35:00.000-07:00</published><updated>2009-03-27T08:56:24.098-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='patterns'/><title type='text'>Pattern of the week:  Facade</title><content type='html'>"The intent of the FACADE pattern is to provide an interface that makes a subsystem easy to use." (Java Design Patterns)&lt;br /&gt;&lt;br /&gt;This is not quite what I thought Facade was.  When I thought of facade, I thought of it mostly as a way to decouple parts of the system.  This may be true of facade but it is not the intent of the pattern.  The facade pattern is more about simplifying a sub system and providing an API for using the sub system that is easier to understand.&lt;br /&gt;&lt;br /&gt;So, if you find yourself writing a facade to simplify an API that you are responsible for, why not ask yourself if the API itself could be simplified.&lt;br /&gt;&lt;br /&gt;If you are working with someone else's API, then write a Facade to make it more usable.&lt;br /&gt;&lt;br /&gt;Facade represents more of a deficiency in the usability of an API than a pattern one should feel proud of using.  It is an unfortunate necessity as best.&lt;br /&gt;&lt;br /&gt;Code examples from wikipedia:&lt;br /&gt;http://en.wikipedia.org/wiki/Facade_pattern&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1190940392946135264-6033960303591003490?l=www.watkyn.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.watkyn.com/feeds/6033960303591003490/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1190940392946135264&amp;postID=6033960303591003490' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/6033960303591003490'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/6033960303591003490'/><link rel='alternate' type='text/html' href='http://www.watkyn.com/2009/03/pattern-of-week-facade.html' title='Pattern of the week:  Facade'/><author><name>Tony Eichelberger</name><uri>http://www.blogger.com/profile/14859637360805535045</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1190940392946135264.post-6416058943285710165</id><published>2009-03-20T11:23:00.000-07:00</published><updated>2009-03-23T07:56:33.595-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iphone'/><title type='text'>Notes from iPhone dev episode 3 screencast</title><content type='html'>Steps when adding a new view controller:&lt;br /&gt;1 - add a subclass of UIViewController to the Classes folder&lt;br /&gt;2 - add a new view class (xib) in the Resources section&lt;br /&gt;3 - in interface builder you need to specify the class identity of the new view, which should be the name of your new UIViewController class&lt;br /&gt;4 - right click and drag the file's owner to the view in the *.xib window and choose view.  This will connect up the view with the controller.  &lt;br /&gt;&lt;br /&gt;I am still having a hard time wrapping my head around Interface Builder drag and drop to hook up components.  I guess it will just take some time and practice to get a feel for what to drag where.&lt;br /&gt;&lt;br /&gt;Posted my code on github.&lt;br /&gt;http://github.com/watkyn/iphone-recipes&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1190940392946135264-6416058943285710165?l=www.watkyn.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.watkyn.com/feeds/6416058943285710165/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1190940392946135264&amp;postID=6416058943285710165' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/6416058943285710165'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/6416058943285710165'/><link rel='alternate' type='text/html' href='http://www.watkyn.com/2009/03/notes-from-iphone-dev-episode-3.html' title='Notes from iPhone dev episode 3 screencast'/><author><name>Tony Eichelberger</name><uri>http://www.blogger.com/profile/14859637360805535045</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1190940392946135264.post-622524876471786637</id><published>2009-03-20T11:18:00.001-07:00</published><updated>2009-03-20T11:18:57.215-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iphone'/><title type='text'>iPhone development</title><content type='html'>After much wandering around looking for the next technology or language to learn I have settled down and started some iphone development. So far, it has consisted of watching some screencasts put out by the pragmatic programmers.&lt;br /&gt;&lt;br /&gt;Bill Dudney is the author of the screencasts that I purchased, and so far I have been really happy with them. I started with the Objective-C episodes, which I recommend if you have no previous experience, and now am going through the iphone series.&lt;br /&gt;&lt;br /&gt;It is a crufty platform to develop in (at least that is my initial gut reaction), but is the only one for the iphone so it helps one to stick with it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1190940392946135264-622524876471786637?l=www.watkyn.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.watkyn.com/feeds/622524876471786637/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1190940392946135264&amp;postID=622524876471786637' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/622524876471786637'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/622524876471786637'/><link rel='alternate' type='text/html' href='http://www.watkyn.com/2009/03/iphone-development.html' title='iPhone development'/><author><name>Tony Eichelberger</name><uri>http://www.blogger.com/profile/14859637360805535045</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1190940392946135264.post-1792317750029137179</id><published>2009-03-20T11:16:00.000-07:00</published><updated>2009-08-17T06:11:57.328-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>The New Webstart</title><content type='html'>Java Web Start has always been appealing to me, at lease conceptually.  The summer of 2007 I spent some time deploying an app using Web Start and found it to be less then ideal, especially from the user experience angle (No custom splash screen, very difficult management of JRE's, etc).  So, with the advent of java 6u10 I thought I would give it another shot with simple app I have been working on.&lt;br /&gt;&lt;br /&gt;I wanted to try deploying our framework demo app with web start while specifically targeting the pain points I experience before:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Auto install java 6 update 10 (or higher) seamlessly.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Use a custom splash screen instead of the stupid JAVA loading splash screen.&lt;/li&gt;&lt;li&gt;Automatically setup a desktop icon (windows only for now, maybe mac as well).&lt;/li&gt;&lt;li&gt;Make sure the JNLP host does not have to be hard coded (so it will work no matter where  it is deployed).&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;I played around with #1 on the list and found that sun has a great javascript file that handles much of this for you.  A couple of lines of javascript and I had a launch button that targeted the specific jre I wanted and it worked for me.  Then I tried it on a machine that didn't have 1.6.10 and I got the following error as it tried to upgrade.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_0_Bzey42EvI/ScOrYI4m-FI/AAAAAAAAAAU/P_Ckm_7EIRg/s1600-h/java-error.jpg"&gt;&lt;img style="cursor: pointer; width: 320px; height: 98px;" src="http://4.bp.blogspot.com/_0_Bzey42EvI/ScOrYI4m-FI/AAAAAAAAAAU/P_Ckm_7EIRg/s320/java-error.jpg" alt="" id="BLOGGER_PHOTO_ID_5315280416417445970" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Ooops!  Ok, that is enough playing around with that.  Below are some of the informative links that were helpful to me.  I am going to leave web start now and check in on it again some other time.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Links:&lt;br /&gt;&lt;br /&gt;Download the Web Start spec:&lt;br /&gt;http://java.sun.com/javase/technologies/desktop/javawebstart/download-spec.html&lt;br /&gt;&lt;br /&gt;JNLP File Syntax:&lt;br /&gt;http://java.sun.com/javase/6/docs/technotes/guides/javaws/developersguide/syntax.html&lt;br /&gt;&lt;br /&gt;Deployment Advice:&lt;br /&gt;http://java.sun.com/javase/6/docs/technotes/guides/jweb/deployment_advice.html&lt;br /&gt;&lt;br /&gt;Javascript file for handling lots of cool JRE things:&lt;br /&gt;http://java.com/js/deployJava.js&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1190940392946135264-1792317750029137179?l=www.watkyn.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.watkyn.com/feeds/1792317750029137179/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1190940392946135264&amp;postID=1792317750029137179' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/1792317750029137179'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/1792317750029137179'/><link rel='alternate' type='text/html' href='http://www.watkyn.com/2009/03/new-webstart.html' title='The New Webstart'/><author><name>Tony Eichelberger</name><uri>http://www.blogger.com/profile/14859637360805535045</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_0_Bzey42EvI/ScOrYI4m-FI/AAAAAAAAAAU/P_Ckm_7EIRg/s72-c/java-error.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1190940392946135264.post-543544417135676414</id><published>2008-07-09T14:18:00.001-07:00</published><updated>2009-03-20T11:04:28.889-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c++'/><title type='text'>Using sqlite3 in a Visual Studio 2008 C++ application</title><content type='html'>I had a terrible time finding out how to get sqlite working with VC++ using the windows binaries from the sqlite download page.  Most of the trouble was from me being a complete newb to VC++ but in the end I got it working.  Here are the steps to follow along for next time.&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Download the precompiled binaries for Windows and also download the source code.&lt;/li&gt;&lt;li&gt;The DLL download should contain the following files:  sqlite3.dll and sqlite3.def&lt;br /&gt;&lt;/li&gt;&lt;li&gt;The source code should contain lots of c code and header files, you need to find the sqlite3.h header file.&lt;/li&gt;   &lt;li&gt;Put sqlite3.dll, sqlite3.def, and sqlite3.h files into a directory somewhere.&lt;/li&gt;&lt;li&gt;Next you need to create a sqlite3.lib file in order to implicitly link the dll to your project&lt;/li&gt;&lt;ul&gt;&lt;li&gt;From the command line, navigate to the folder that has the sqlite3 files from step 4, then type the following:&lt;br /&gt; &lt;/li&gt;&lt;li&gt;LIB /DEF:sqlite3.def&lt;/li&gt;&lt;li&gt;This should create two more files: sqlite3.lib and sqlite3.exp&lt;/li&gt;&lt;li&gt;NOTE:  LIB.exe needs to be on your path and can be found it in the Visual Studio install directory (do a search).&lt;/li&gt;   &lt;/ul&gt;&lt;li&gt;Now start a new console application project in Visual Studio&lt;/li&gt;&lt;li&gt;Copy the sqlite3.dll, sqlite3.lib, and sqlite3.h files into your new project directory&lt;/li&gt;&lt;li&gt;Right click on the Resource Files folder and choose Add &amp;gt;&amp;gt; Existing Item ... then choose sqlite3.lib&lt;/li&gt;  &lt;li&gt;You may get a dialog that asks you about the custom rule, I just chose no.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Now add the sqlite3.h file into your project headers directory in Visual Studio (project &amp;gt;&amp;gt; Add &amp;gt;&amp;gt; Existing item)&lt;/li&gt;  &lt;li&gt;Now you should be able to start using sqlite3:  Here is a sample console app you can try.&lt;/li&gt;&lt;li&gt;This will create a new db and a sample table and spit out a resultset to the console.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;#include "stdafx.h"&lt;br /&gt;#include "sqlite3.h"&lt;br /&gt;&lt;br /&gt;static int callback(void *NotUsed, int argc, char **argv, char **azColName){&lt;br /&gt; int i;&lt;br /&gt; for(i=0; i&amp;lt;argc; i++){&lt;br /&gt;   printf("%s = %s\n", azColName[i], argv[i] ? argv[i] : "NULL");&lt;br /&gt; }&lt;br /&gt; printf("\n");&lt;br /&gt; return 0;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;int _tmain(int argc, _TCHAR* argv[])&lt;br /&gt;{&lt;br /&gt; sqlite3 *db;&lt;br /&gt; char *zErrMsg = 0;&lt;br /&gt; int rc;&lt;br /&gt;&lt;br /&gt; rc = sqlite3_open("test.db", &amp;amp;db);&lt;br /&gt; if( rc ){&lt;br /&gt;   fprintf(stderr, "Can't open database: %s\n", sqlite3_errmsg(db));&lt;br /&gt;   sqlite3_close(db);&lt;br /&gt;   return 1;&lt;br /&gt; }&lt;br /&gt; rc = sqlite3_exec(db, "create table stuff ( name )", callback, 0, &amp;amp;zErrMsg);&lt;br /&gt; rc = sqlite3_exec(db, "insert into stuff values ('hello')", callback, 0, &amp;amp;zErrMsg);&lt;br /&gt; rc = sqlite3_exec(db, "select * from stuff", callback, 0, &amp;amp;zErrMsg);&lt;br /&gt; if( rc!=SQLITE_OK ){&lt;br /&gt;   fprintf(stderr, "SQL error: %s\n", zErrMsg);&lt;br /&gt;   sqlite3_free(zErrMsg);&lt;br /&gt; }&lt;br /&gt; sqlite3_close(db);&lt;br /&gt; return 0;&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1190940392946135264-543544417135676414?l=www.watkyn.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.watkyn.com/feeds/543544417135676414/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1190940392946135264&amp;postID=543544417135676414' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/543544417135676414'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/543544417135676414'/><link rel='alternate' type='text/html' href='http://www.watkyn.com/2008/07/using-sqlite3-in-visual-studio-2008-c.html' title='Using sqlite3 in a Visual Studio 2008 C++ application'/><author><name>Tony Eichelberger</name><uri>http://www.blogger.com/profile/14859637360805535045</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1190940392946135264.post-2295814002870430591</id><published>2008-06-05T06:52:00.001-07:00</published><updated>2009-08-17T06:12:19.114-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><title type='text'>Start linux process in background</title><content type='html'>Just add the &amp;amp; at the end of the command:&lt;br /&gt;&lt;br /&gt;example in cygwin:&lt;br /&gt;&lt;br /&gt;./eclipse.exe &amp;amp;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1190940392946135264-2295814002870430591?l=www.watkyn.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.watkyn.com/feeds/2295814002870430591/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1190940392946135264&amp;postID=2295814002870430591' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/2295814002870430591'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/2295814002870430591'/><link rel='alternate' type='text/html' href='http://www.watkyn.com/2008/06/start-linux-process-in-background.html' title='Start linux process in background'/><author><name>Tony Eichelberger</name><uri>http://www.blogger.com/profile/14859637360805535045</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1190940392946135264.post-382017213255386500</id><published>2008-04-11T14:21:00.000-07:00</published><updated>2008-04-11T14:42:10.991-07:00</updated><title type='text'>How to remember how I have selenium setup</title><content type='html'>NOTE TO SELF:&lt;br /&gt;1 - To run selenium tests you first need to install the selenium_rc gem locally.&lt;br /&gt;2 - selenium_rc server will then start the jetty process&lt;br /&gt;3 - ruby script/server to start the process&lt;br /&gt;4 - rake test:selenium to run the tests&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1190940392946135264-382017213255386500?l=www.watkyn.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.watkyn.com/feeds/382017213255386500/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1190940392946135264&amp;postID=382017213255386500' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/382017213255386500'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/382017213255386500'/><link rel='alternate' type='text/html' href='http://www.watkyn.com/2008/04/how-to-remember-how-i-have-selenium.html' title='How to remember how I have selenium setup'/><author><name>Tony Eichelberger</name><uri>http://www.blogger.com/profile/14859637360805535045</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1190940392946135264.post-4770176641222755565</id><published>2008-03-07T14:34:00.000-08:00</published><updated>2008-03-07T14:46:09.522-08:00</updated><title type='text'>Almost cool realtime editing in JBoss</title><content type='html'>I was thinking, would it not be cool to have your app deployed to a J2EE container like JBoss and still have the real time edit, refresh, edit, refresh of the rails world when using mongrel in dev mode.  Well I thought I was on to something here but it turns out that I either don't understand what is going on (most likely) or it just behaves inconsistently.&lt;br /&gt;&lt;br /&gt;I wrote a rake task (see crude version below) that deploys my app to JBoss and then tries to make a junction (windows version of ln -s, kind of) on the app and config directories so that I could edit my app in my workspace and have the changes be immediately available on the server.&lt;br /&gt;&lt;br /&gt;Mostly, JBoss does not refresh the code when I do this.  Maybe it is JRuby compiling my classes and not looking for modifications?  I forced my environment to be development in my environment.rb because I thought that might fix it, but no.  I guess I will  have to look into the options for code reloading in JRuby and see if that may help.&lt;br /&gt;&lt;br /&gt;Anyway, there it is.&lt;br /&gt;&lt;br /&gt;I am assuming everything from the previous post on &lt;a href="http://anthonyoakhill.blogspot.com/2008/03/simple-rails-app-deployed-to-jboss-on.html"&gt;deploying to JBoss&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Namely warbler, jruby1.1rc2 etc.&lt;br /&gt;&lt;br /&gt;the only new thing is to run pluginize on warbler so you can make dependencies on the warbler rake file.&lt;br /&gt;&lt;br /&gt;&gt; &lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;warble pluginize&lt;br /&gt;&lt;br /&gt;Then add this to your lib\tasks folder (jboss.rake)&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;namespace :war do&lt;br /&gt;&lt;br /&gt; task :deploy =&gt; [ "war"] do&lt;br /&gt;   deploy_&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;dir&lt;/span&gt; = "#{&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;ENV&lt;/span&gt;["&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;JBOSS&lt;/span&gt;_DEPLOY"]}/deploy/demo-app.war"&lt;br /&gt;   web_inf = "#{deploy_&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;dir&lt;/span&gt;}/WEB-INF"&lt;br /&gt;&lt;br /&gt;   puts "delete the junction before deleting the directory"&lt;br /&gt;   system('&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;cmd&lt;/span&gt;', '/C', "junction -d #{web_inf}/app")&lt;br /&gt;   system('&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;cmd&lt;/span&gt;', '/C', "junction -d #{web_inf}/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;config&lt;/span&gt;")&lt;br /&gt;&lt;br /&gt;   puts "trying to delete"&lt;br /&gt;   &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;FileUtils&lt;/span&gt;.rm_&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;rf&lt;/span&gt; deploy_&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;dir&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;   puts "making &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;dir&lt;/span&gt;"&lt;br /&gt;   &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;FileUtils&lt;/span&gt;.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;mkdir&lt;/span&gt;(deploy_&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;dir&lt;/span&gt;)&lt;br /&gt; &lt;br /&gt;   puts "deploying war directory to the server"&lt;br /&gt;   &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;FileUtils&lt;/span&gt;.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;cp&lt;/span&gt;_r("#{RAILS_ROOT}/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;tmp&lt;/span&gt;/war/.", deploy_&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17"&gt;dir&lt;/span&gt;)&lt;br /&gt; &lt;br /&gt;   puts "remove &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_18"&gt;dirs&lt;/span&gt; to junction with"&lt;br /&gt;   &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_19"&gt;FileUtils&lt;/span&gt;.rm_&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_20"&gt;rf&lt;/span&gt; "#{web_inf}/app"&lt;br /&gt;   &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_21"&gt;FileUtils&lt;/span&gt;.rm_&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_22"&gt;rf&lt;/span&gt; "#{web_inf}/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_23"&gt;config&lt;/span&gt;"&lt;br /&gt; &lt;br /&gt;   puts "make junction on &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_24"&gt;jboss&lt;/span&gt; to local app &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_25"&gt;dir&lt;/span&gt;"&lt;br /&gt;   system('&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_26"&gt;cmd&lt;/span&gt;', '/C', "junction #{web_inf}/app #{RAILS_ROOT}/app")&lt;br /&gt;   system('&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_27"&gt;cmd&lt;/span&gt;', '/C', "junction #{web_inf}/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_28"&gt;config&lt;/span&gt; #{RAILS_ROOT}/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_29"&gt;config&lt;/span&gt;")&lt;br /&gt; &lt;br /&gt;   Rake::Task["war:clean"].invoke&lt;br /&gt; end&lt;br /&gt;&lt;br /&gt;end&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="text-decoration: underline;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1190940392946135264-4770176641222755565?l=www.watkyn.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.watkyn.com/feeds/4770176641222755565/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1190940392946135264&amp;postID=4770176641222755565' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/4770176641222755565'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/4770176641222755565'/><link rel='alternate' type='text/html' href='http://www.watkyn.com/2008/03/almost-cool-realtime-editing-in-j.html' title='Almost cool realtime editing in JBoss'/><author><name>Tony Eichelberger</name><uri>http://www.blogger.com/profile/14859637360805535045</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1190940392946135264.post-8929758772238005026</id><published>2008-03-03T09:24:00.000-08:00</published><updated>2008-03-03T09:28:01.689-08:00</updated><title type='text'>Simple Rails app deployed to JBoss on Windows</title><content type='html'>I finally took the time to get a rails app deployed to jboss.  Here are the notes I took and the steps to do it for the following environment.&lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Windows XP Pro sevice pack 2&lt;/p&gt;  &lt;p class="MsoNormal"&gt;JBoss App Server 4.2.2-ga&lt;/p&gt;  &lt;p class="MsoNormal"&gt;JRuby 1.1RC2&lt;/p&gt;  &lt;p class="MsoNormal"&gt;JDK 1.6.0_03-b05&lt;/p&gt;  &lt;p class="MsoNormal"&gt;MySQL 4.1.22&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Gems (with default dependencies assu&lt;st1:personname st="on"&gt;me&lt;/st1:PersonName&gt;d)&lt;/p&gt;  &lt;p class="MsoNormal"&gt;rails (2.0.2) &lt;/p&gt;  &lt;p class="MsoNormal"&gt;activerecord-jdbcmysql-adapter (0.7.2) &lt;/p&gt;  &lt;p class="MsoNormal"&gt;jruby-openssl (0.1.1)&lt;/p&gt;  &lt;p class="MsoNormal"&gt;warbler (0.9.3)&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; Let's begin, shall we?&lt;br /&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;Before you begin, verify that you have MySQL up and running and that JBoss is also up and running and that both are functioning properly.&lt;span style=""&gt;  &lt;/span&gt;You may want to deploy a small hello world app to JBoss and have so&lt;st1:personname st="on"&gt;me&lt;/st1:PersonName&gt; JDBC code in a .jsp that queries a sample table.&lt;span style=""&gt;  &lt;/span&gt;This will verify things are working.&lt;span style=""&gt;  &lt;/span&gt;Or, if that seems more daunting then getting a rails app running on JBoss, just continue on and hope for the best.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&gt; rails demo_app&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&gt; cd demo_app&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Change database.yml file to use adapter: jdbcmysql. &lt;span style=""&gt; &lt;/span&gt;Below is my dev setup.&lt;span style=""&gt;  &lt;/span&gt;Make sure you have a valid production environ&lt;st1:personname st="on"&gt;me&lt;/st1:PersonName&gt;nt because by default warbler will deploy in production env.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;develop&lt;st1:personname st="on"&gt;me&lt;/st1:PersonName&gt;nt:&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;  &lt;/span&gt;adapter: jdbcmysql&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;  &lt;/span&gt;database: demo_app&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;  &lt;/span&gt;host: localhost&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;  &lt;/span&gt;userna&lt;st1:personname st="on"&gt;me&lt;/st1:PersonName&gt;: oakhill&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;  &lt;/span&gt;password:&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;test:&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;  &lt;/span&gt;adapter: jdbcmysql&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;  &lt;/span&gt;database: demo_app_test&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;  &lt;/span&gt;host: localhost&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;  &lt;/span&gt;userna&lt;st1:personname st="on"&gt;me&lt;/st1:PersonName&gt;: oakhill&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;  &lt;/span&gt;password:&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;production:&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;  &lt;/span&gt;adapter: jdbcmysql&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;  &lt;/span&gt;database: demo_app&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;  &lt;/span&gt;host: localhost&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;  &lt;/span&gt;userna&lt;st1:personname st="on"&gt;me&lt;/st1:PersonName&gt;: oakhill&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;  &lt;/span&gt;password:&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&gt; rake db:create:all&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&gt; jruby script\generate scaffold Client first_na&lt;st1:personname st="on"&gt;me&lt;/st1:PersonName&gt;:string last_na&lt;st1:personname st="on"&gt;me&lt;/st1:PersonName&gt;:string status:integer&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;(I had issues with cookie store in jboss so rather than figuring that out, I just went back to using the active record store for sessions)&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&gt; rake db:sessions:create&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;uncom&lt;st1:personname st="on"&gt;me&lt;/st1:PersonName&gt;nt the line in application.rb so it looks like this (or whatever you have for a secret key)&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;  &lt;/span&gt;protect_from_forgery :secret =&gt; '704508c21b18e98dcb2582487258d5e2'&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Then uncom&lt;st1:personname st="on"&gt;me&lt;/st1:PersonName&gt;nt the following line in the environ&lt;st1:personname st="on"&gt;me&lt;/st1:PersonName&gt;nt.rb file:&lt;/p&gt;  &lt;p class="MsoNormal"&gt;config.action_controller.session_store = :active_record_store&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&gt; rake db:migrate&lt;/p&gt;&lt;p class="MsoNormal"&gt;You will also need to migrate the production environment if you used a different db for production since deploying using warbler with default to the production env.&lt;br /&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&gt; rake db:migrate RAILS_ENV=production&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Now setup a config file for warbler&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&gt; warble config&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Edit config\warble.rb file and uncom&lt;st1:personname st="on"&gt;me&lt;/st1:PersonName&gt;nt the config.gems line and change it to look like this:&lt;/p&gt;  &lt;p class="MsoNormal"&gt;config.gems = ["activerecord-jdbcmysql-adapter", "jruby-openssl", "rails"]&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&gt; warble&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Now you should be able to copy the demo_app.war file in the current directory to jboss.&lt;span style=""&gt;  &lt;/span&gt;Most likely the place to put the war file will be in %JBOSS_HOME%/server/default/deploy&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Now goto &lt;a href="http://localhost:8080/demo_app/clients"&gt;http://localhost:8080/demo_app/clients&lt;/a&gt; and try the various CRUD operations on the client model.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1190940392946135264-8929758772238005026?l=www.watkyn.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.watkyn.com/feeds/8929758772238005026/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1190940392946135264&amp;postID=8929758772238005026' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/8929758772238005026'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/8929758772238005026'/><link rel='alternate' type='text/html' href='http://www.watkyn.com/2008/03/simple-rails-app-deployed-to-jboss-on.html' title='Simple Rails app deployed to JBoss on Windows'/><author><name>Tony Eichelberger</name><uri>http://www.blogger.com/profile/14859637360805535045</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1190940392946135264.post-2075641461046374679</id><published>2008-02-29T06:59:00.000-08:00</published><updated>2008-02-29T08:18:57.738-08:00</updated><title type='text'>Some differences between jython and jruby</title><content type='html'>I am in the middle of learning &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;jython&lt;/span&gt; 2.1 at work because of a tool called The Grinder.  It uses &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;jython&lt;/span&gt; to script load testing and performance testing scenarios for a variety of applications.  I have been using ruby outside of work for a couple years now and this is my first look at python.  I will be comparing &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;jython&lt;/span&gt; 2.1 and &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;jruby&lt;/span&gt; 1.1RC2 in this article so keep that in mind.&lt;br /&gt;&lt;br /&gt;- Python has self documenting features that are pretty neat.  Built in meta information about methods using the __doc__ method allow programmers to quickly look at documentation from a command prompt.   You can comment a method with """ comment """ and then get at that comment on live objects.  Pretty neat.  I like that it is fine grained and fast vs &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;ri&lt;/span&gt; in ruby or help(class) in &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;irb&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;- Python allows changing the order of parameters passed to a method by using a syntax like this:    method(&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;parmname&lt;/span&gt;=value, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;parm&lt;/span&gt;2=value), where &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;parm&lt;/span&gt;2 could be first in the method declaration and all would still work as expected.  I don't know when or why you would mix up the order of parameters but it in a interesting.  You specify optional arguments in python the way you specify a them in ruby but they behaves differently when you try the above syntax.  In ruby &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;parmname&lt;/span&gt;=value will be evaluated before passing the argument along, in python, seemingly both the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;parmname&lt;/span&gt; and value are passed and the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;parmname&lt;/span&gt; is used as a key that will match up with the argument declared with that same name.  The syntax above will execute with errors in ruby but the parameters are in the order specified; they will not shuffle around to match argument names in the method signature.&lt;br /&gt;&lt;br /&gt;- I don't like the __method__ syntax in python, but I probably will get used to it.  Just weird at first.  Also I like the how ruby has fewer keywords and methods on Object.  Python has built in functions like type(), &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;str&lt;/span&gt;(), &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;dir&lt;/span&gt;(), callable(), and &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;getattr&lt;/span&gt;().  I like how ruby uses methods on objects instead of built in functions, for example:&lt;br /&gt; something.class, something.to_s, something.methods, something.respond_to?, etc. I guess it is really the same thing, but I like ruby's way of doing it better.&lt;br /&gt;&lt;br /&gt;- Dynamic stuff like getting a method on an object into a variable and invoking the method is easy in both languages.  I did not dive into much meta programming on the python side yet, so that will have to be a later post, or most likely, never.&lt;br /&gt;&lt;br /&gt; Python has &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;getattr&lt;/span&gt;() built in function:&lt;br /&gt; method = &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;getattr&lt;/span&gt;(object, "method_name)&lt;br /&gt;then use method(&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17"&gt;args&lt;/span&gt;) to invoke&lt;br /&gt;&lt;br /&gt;Ruby does it this way:&lt;br /&gt; method = object.method("method_name")&lt;br /&gt;   then use method.call(&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_18"&gt;args&lt;/span&gt;) to invoke.&lt;br /&gt;&lt;br /&gt;Well, I ran out of time on this post.  Man, what a ride.  I can hardly contain myself.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1190940392946135264-2075641461046374679?l=www.watkyn.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.watkyn.com/feeds/2075641461046374679/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1190940392946135264&amp;postID=2075641461046374679' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/2075641461046374679'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1190940392946135264/posts/default/2075641461046374679'/><link rel='alternate' type='text/html' href='http://www.watkyn.com/2008/02/some-differences-between-jython-and.html' title='Some differences between jython and jruby'/><author><name>Tony Eichelberger</name><uri>http://www.blogger.com/profile/14859637360805535045</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
