<?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-9183140863238679097</id><updated>2011-08-03T10:50:37.052-07:00</updated><category term='job'/><title type='text'>PrettyCode</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://prettycode.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9183140863238679097/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://prettycode.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Gordon DuQuesnay</name><uri>http://www.blogger.com/profile/02331170559879701683</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_q-oKp6yrQ1k/S4NmlWaFjEI/AAAAAAAAABo/Io4-rz2o-J8/s1600-R/aad54bd192c58d3c9bcb4273174df070.png'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>8</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-9183140863238679097.post-3506665903983806231</id><published>2009-07-19T23:15:00.000-07:00</published><updated>2009-07-19T23:31:38.672-07:00</updated><title type='text'>Reduce eye fatigue when browsing at night</title><content type='html'>I browse a lot at night and the white background on most pages starts to get annoying very fast.  I've found a way to fix this using Frefox, the Greasemonkey add on and a Greasemonkey &lt;a href="http://userscripts.org/scripts/show/54059"&gt;script&lt;/a&gt; I wrote.&lt;br /&gt;&lt;br /&gt;Screenshot of Google with this turned on.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_q-oKp6yrQ1k/SmQOTGtmAOI/AAAAAAAAABc/fwvrv7R5hVg/s1600-h/Screenshot.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 191px; height: 121px;" src="http://1.bp.blogspot.com/_q-oKp6yrQ1k/SmQOTGtmAOI/AAAAAAAAABc/fwvrv7R5hVg/s320/Screenshot.png" alt="" id="BLOGGER_PHOTO_ID_5360425177859883234" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9183140863238679097-3506665903983806231?l=prettycode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prettycode.blogspot.com/feeds/3506665903983806231/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9183140863238679097&amp;postID=3506665903983806231' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9183140863238679097/posts/default/3506665903983806231'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9183140863238679097/posts/default/3506665903983806231'/><link rel='alternate' type='text/html' href='http://prettycode.blogspot.com/2009/07/reduce-eye-fatigue-when-browsing-at.html' title='Reduce eye fatigue when browsing at night'/><author><name>Gordon DuQuesnay</name><uri>http://www.blogger.com/profile/02331170559879701683</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_q-oKp6yrQ1k/S4NmlWaFjEI/AAAAAAAAABo/Io4-rz2o-J8/s1600-R/aad54bd192c58d3c9bcb4273174df070.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_q-oKp6yrQ1k/SmQOTGtmAOI/AAAAAAAAABc/fwvrv7R5hVg/s72-c/Screenshot.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9183140863238679097.post-821750793704242204</id><published>2009-03-13T13:44:00.000-07:00</published><updated>2009-03-13T14:54:03.604-07:00</updated><title type='text'>Deploying JRuby on Rails Exploded War to JBoss</title><content type='html'>&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="font-family: arial;"&gt;I've been writing a lot of small apps in JRuby lately, packaging them with warbler and deploying them to JBoss.  These war files average around 10MB I am usually working remotely so these take a few minutes to upload via my 4 mbps/512 kbps ADSL.   Occasionally for small stuff I cheat and edit the code directly on the server so that I don't have to upload the entire war just to change one file.&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="font-family: arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="font-family: arial;"&gt;In addition to the typical compressed war files JBoss allows for applications to be deployed as an &lt;/span&gt;&lt;/span&gt;&lt;a href="http://www.jboss.org/community/docs/DOC-9719"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="font-family: arial;"&gt;exploded directory&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="font-family: arial;"&gt;.  That makes it even easier to modify the application on the fly.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="font-family: arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="font-family: arial;"&gt;The only issue I've found with this is that I have to be a bit more careful to  manually ensure that the deployed application is in sync with my local workspace.  One way I've been doing that is to use &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;blockquote&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-family: arial;"&gt;xcopy /d&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="font-family: arial;"&gt;which copies only those files whose source time is newer than the destination time.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 51);  -webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="font-family: arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 51);  -webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="font-family: arial;"&gt;Using a revision control system (we use subversion or mercurial) for these projects and deploying from it would probably take care of this but there are two reasons I haven't been doing that up until now.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="font-family: arial;"&gt;The guys who do the front end design don't use revision control so I keep having to manually apply their changes.  It's more efficient if I can just point them to the css, images, and rhtml files on the server.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="font-family: arial;"&gt;These projects are very small and temporary.  Some of them only take a couple of hours to implement.  It often seems like unnecessary overhead to create the whole Trac + Subversion/Mercurial projects for them until they become more permanent.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="font-family: arial;"&gt;However, I do need to sort this out before someones changes get overwritten so I think I'm going to try and get them to use tortoiseSVN and make a script that deploys the latest revision to the exploded directory. That should let me deploy almost as quickly as I do now but still take care of the synchronization issue.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color: rgb(51, 51, 51);  -webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px;font-family:'Trebuchet MS';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color: rgb(51, 51, 51);  -webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px;font-family:'Trebuchet MS';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9183140863238679097-821750793704242204?l=prettycode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prettycode.blogspot.com/feeds/821750793704242204/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9183140863238679097&amp;postID=821750793704242204' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9183140863238679097/posts/default/821750793704242204'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9183140863238679097/posts/default/821750793704242204'/><link rel='alternate' type='text/html' href='http://prettycode.blogspot.com/2009/03/deploying-jruby-on-rails-exploded-war.html' title='Deploying JRuby on Rails Exploded War to JBoss'/><author><name>Gordon DuQuesnay</name><uri>http://www.blogger.com/profile/02331170559879701683</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_q-oKp6yrQ1k/S4NmlWaFjEI/AAAAAAAAABo/Io4-rz2o-J8/s1600-R/aad54bd192c58d3c9bcb4273174df070.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9183140863238679097.post-5909274004175162960</id><published>2008-04-07T18:33:00.000-07:00</published><updated>2008-04-07T19:12:22.280-07:00</updated><title type='text'>How long will it take you to get US Visa interview if you are in say....Jamaica?</title><content type='html'>A couple of weeks ago my wife was robbed and her passport was in the bag.  So now we have to go through the process of reapplying.  Same cost ($131 US),  same wait as if it was a brand new application. &lt;br /&gt;&lt;br /&gt;After filling out a bunch of online forms and paying for a voucher we are supposed to use their online scheduling application to make her appointment.  To my surprise there were no openings on the schedule between April and August.  &lt;br /&gt;&lt;br /&gt;Think about that for a second,  their schedule is booked solid for 5 months.  The application actually didn't allow any bookings beyond August...too far in the future I guess (with global warming and such who knows what could happen by then  the US could be under water! :) ). &lt;br /&gt;&lt;br /&gt;Something had to be wrong with those wait times though...right?  Fortunately they provide a way to view the average wait times per city (&lt;a href="http://travel.state.gov/visa/temp/wait/tempvisitors_wait.php"&gt;http://travel.state.gov/visa/temp/wait/tempvisitors_wait.php&lt;/a&gt;).  A couple of clicks and I found out that on average it takes "&lt;span style="color:#76a9d8;"&gt;113 Days&lt;/span&gt;" to get an interview for a Visitors Visa in Kingston.  A couple more clicks and it seemed like 113 days was waaaay above most of the other countries.&lt;br /&gt;&lt;br /&gt;I decided that what I really wanted to see was a list of all the countries and their average wait times so I could see how disenfranchised I should feel.&lt;br /&gt;&lt;br /&gt;I managed to cobble together this Ruby script.&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;#requires&lt;br /&gt;require 'watir'&lt;br /&gt;require 'watir/contrib/ie-new-process'&lt;br /&gt;&lt;br /&gt;#includes&lt;br /&gt;include Watir&lt;br /&gt;&lt;br /&gt;ie = Watir::IE.new_process&lt;br /&gt;ie.set_fast_speed&lt;br /&gt;ie.goto('http://travel.state.gov/visa/temp/wait/tempvisitors_wait.php')&lt;br /&gt;ie.bring_to_front&lt;br /&gt;wait_until{ !ie.select_lists[2].getAllContents.nil? }&lt;br /&gt;all_cities = ie.select_lists[2].getAllContents&lt;br /&gt;&lt;br /&gt;all_cities.each do |city|&lt;br /&gt;  ie.goto( 'http://travel.state.gov/visa/temp/wait/tempvisitors_wait.php')&lt;br /&gt;  wait_until{ !ie.select_lists[2].getAllContents.nil? }&lt;br /&gt;  sl = ie.select_lists[2]&lt;br /&gt;  sl.select city&lt;br /&gt;  btn = ie.button(:src, 'http://travel.state.gov/images/gettimes.gif')&lt;br /&gt;  btn.click!&lt;br /&gt;  wait_until{ ie.text.include? "local mail system."}&lt;br /&gt;  m = ie.text.match /Visitors Visas: \d* Days/&lt;br /&gt;  m2 = m[0].match /\d+/ unless m.nil?&lt;br /&gt;  puts "#{city}, #{m2[0]}" unless m.nil?&lt;br /&gt;end&lt;br /&gt;&lt;/blockquote&gt;The result?  I'm not going to include the full listing here (run it yourself) but regarding my original question....how does Jamaica stack up....well it turns out we are not quite at the bottom of the barrel.   Cuba at 731 days (Wow!) takes that "honor", Venezuela is next at 177 Days and Haiti slides in at 137 Days.  Nothing like knowing there are other poor bastards out there to lift your spirits :-D&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9183140863238679097-5909274004175162960?l=prettycode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prettycode.blogspot.com/feeds/5909274004175162960/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9183140863238679097&amp;postID=5909274004175162960' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9183140863238679097/posts/default/5909274004175162960'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9183140863238679097/posts/default/5909274004175162960'/><link rel='alternate' type='text/html' href='http://prettycode.blogspot.com/2008/04/how-long-will-it-take-you-to-get-us.html' title='How long will it take you to get US Visa interview if you are in say....Jamaica?'/><author><name>Gordon DuQuesnay</name><uri>http://www.blogger.com/profile/02331170559879701683</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_q-oKp6yrQ1k/S4NmlWaFjEI/AAAAAAAAABo/Io4-rz2o-J8/s1600-R/aad54bd192c58d3c9bcb4273174df070.png'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9183140863238679097.post-7645851642394010790</id><published>2007-11-07T09:50:00.000-08:00</published><updated>2007-11-07T10:00:57.155-08:00</updated><title type='text'>Call Hierarchy for Ruby, Finally!!</title><content type='html'>I updated my installation of &lt;a href="http://www.aptana.com/"&gt;Aptana&lt;/a&gt; today after reading that &lt;a href="http://www.aptana.com/blog/?p=186"&gt;RadRails milestone 7&lt;/a&gt; had this feature.  I have been waiting a long time for this.&lt;br /&gt;&lt;br /&gt;In case you don't know what Call Hierarchy is or why you should care.  It allows you to see every place in your code that is calling a particular method.  This is indispensable when you are trying to refactor and can't remember everywhere you used this method.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9183140863238679097-7645851642394010790?l=prettycode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prettycode.blogspot.com/feeds/7645851642394010790/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9183140863238679097&amp;postID=7645851642394010790' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9183140863238679097/posts/default/7645851642394010790'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9183140863238679097/posts/default/7645851642394010790'/><link rel='alternate' type='text/html' href='http://prettycode.blogspot.com/2007/11/call-hierarchy-for-ruby-finally.html' title='Call Hierarchy for Ruby, Finally!!'/><author><name>Gordon DuQuesnay</name><uri>http://www.blogger.com/profile/02331170559879701683</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_q-oKp6yrQ1k/S4NmlWaFjEI/AAAAAAAAABo/Io4-rz2o-J8/s1600-R/aad54bd192c58d3c9bcb4273174df070.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9183140863238679097.post-8548118912543099619</id><published>2007-09-19T12:42:00.000-07:00</published><updated>2008-04-06T17:17:05.839-07:00</updated><title type='text'>JBoss Seam</title><content type='html'>After searching for a Java web framework that comes as close to Ruby on Rails as possible I've settled on JBoss Seam.  It is still more complex than I would like since right now the applications I need to deliver in the coming months are very simple.&lt;br /&gt;&lt;br /&gt;The appeal of Seam (for me anyway)&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Annotation on the model for O/R mapping.  No more hibernate XML mappings.&lt;/li&gt;&lt;li&gt;Generates the DB from the model.  The reverse of how Rails does it but it's still &lt;a href="http://en.wikipedia.org/wiki/Don%27t_repeat_yourself"&gt;DRY &lt;/a&gt;so I'm happy.&lt;/li&gt;&lt;li&gt;Annotations on the model for form validation.  They don't seem as flexible as the Rails validations, e.g. I can't find a way to do the equivalent of validates_uniqueness_of or other complex validations using model annotations in Seam.&lt;/li&gt;&lt;li&gt;Testable.  Hopefully unit testing the applications will now painless enough that I can get into the habit of doing it.&lt;/li&gt;&lt;li&gt;Automated builds out of the box.  Comes with ant build script for common tasks.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9183140863238679097-8548118912543099619?l=prettycode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prettycode.blogspot.com/feeds/8548118912543099619/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9183140863238679097&amp;postID=8548118912543099619' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9183140863238679097/posts/default/8548118912543099619'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9183140863238679097/posts/default/8548118912543099619'/><link rel='alternate' type='text/html' href='http://prettycode.blogspot.com/2007/09/jboss-seam.html' title='JBoss Seam'/><author><name>Gordon DuQuesnay</name><uri>http://www.blogger.com/profile/02331170559879701683</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_q-oKp6yrQ1k/S4NmlWaFjEI/AAAAAAAAABo/Io4-rz2o-J8/s1600-R/aad54bd192c58d3c9bcb4273174df070.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9183140863238679097.post-8556228744891241374</id><published>2007-05-21T12:18:00.000-07:00</published><updated>2007-09-19T12:41:50.521-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='job'/><title type='text'>New Job</title><content type='html'>Starting new job today to do Java web development at a local Telecoms provider.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;The Bad&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Their web framework stack is a little stale i.e. ibatis/J2EE/struts/jsp/tiles&lt;/li&gt;&lt;li&gt;They are primarily using IBM tools Websphere Developer, Rational, WAS&lt;/li&gt;&lt;li&gt;They aren't open to using dynamic languages (Ruby) or the frameworks built on them (Rails)&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;The Good&lt;br /&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;They are interested in improving their web framework stack (as long as it's Java)&lt;/li&gt;&lt;li&gt;There is some interest in XP/Agile (don't scoff.  This is pretty rare in Jamaica, in fact I don't think there is a single development shop in the entire country that is doing it)&lt;/li&gt;&lt;li&gt;They have the infrastructure to support telecommuting and they allow it! (Again very rare here)&lt;/li&gt;&lt;/ul&gt;Exciting times ahead, look for future posts related to the work I'm doing here.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9183140863238679097-8556228744891241374?l=prettycode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prettycode.blogspot.com/feeds/8556228744891241374/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9183140863238679097&amp;postID=8556228744891241374' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9183140863238679097/posts/default/8556228744891241374'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9183140863238679097/posts/default/8556228744891241374'/><link rel='alternate' type='text/html' href='http://prettycode.blogspot.com/2007/05/new-job.html' title='New Job'/><author><name>Gordon DuQuesnay</name><uri>http://www.blogger.com/profile/02331170559879701683</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_q-oKp6yrQ1k/S4NmlWaFjEI/AAAAAAAAABo/Io4-rz2o-J8/s1600-R/aad54bd192c58d3c9bcb4273174df070.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9183140863238679097.post-5896108771196904408</id><published>2007-02-07T12:23:00.000-08:00</published><updated>2007-09-19T13:40:37.117-07:00</updated><title type='text'></title><content type='html'>    &lt;h1 style="text-align: right;"&gt;&lt;font size="2"&gt;DSLs and Computer Graphics&lt;/font&gt;&lt;/h1&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;h1 style="text-align: center;"&gt;&lt;font size="2"&gt;The use of Domain Specific Languages in Teaching Computer Graphics Courses&lt;br&gt;&lt;/font&gt;&lt;/h1&gt;&lt;div style="text-align: center;"&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Gordon DuQuesnay&lt;br&gt;ID#9613644&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Analysis of Programming Languages, Assignment 1&lt;br&gt;Wessel Thomas&lt;br&gt;February, 2007&lt;br&gt;&lt;/div&gt;&lt;font size="2"&gt;&lt;br&gt;&lt;/font&gt;&lt;p class="pb" style="page-break-after: always;"&gt;&lt;br&gt;&lt;/p&gt;&lt;br&gt;&lt;h2&gt;&lt;font size="2"&gt;Abstract:&lt;/font&gt;&lt;/h2&gt;&lt;font size="2"&gt;Domain Specific Languages (DSLs) are limited forms of computer language designed for a specific class of problems. This approach to programming has been used for some time, for instance, it is very common among LISP and Smalltalk programmers.  In spite of their having been around since the dawn of programming they have only recently become a hot topic for discussion in the industry.  In this paper I will examine a particular a subset of DSLs referred to as Internal DSLs (Fowler 2006),  and how they can be implemented in the Ruby language.  I will further show how they could be used in computer science courses such as the "Computer Graphics" course as taught at the University of Technology's School of Computing and Information Technology.&lt;br&gt;&lt;br&gt;&lt;/font&gt;&lt;h2&gt;&lt;font size="2"&gt;Problem Statement: &lt;/font&gt;&lt;/h2&gt;&lt;font size="2"&gt;Computer Science courses often attempt to deliver very challenging, technically complex content.  While some complexity is unavoidable the level of complexity in a course is often compounded by the need to also teach topics that introduce incidental complexity along with the core topic.  For example consider the Computer Graphics course, the core complexity of this course involves the various algorithms for producing complex shapes in two and three dimensions by building upon graphic primitives, the most basic being the displaying of a single pixel.  However, in addition to this the students must also master C++ and OpenGL, each of which introduce additional incidental complexity.  The use of a DSL for graphics could allow the course to focus on the essentials of graphics without having to also concurrently deal with the complexities of C++ and OpenGL.&lt;br&gt;&lt;br&gt;&lt;/font&gt;&lt;h2&gt;&lt;font size="2"&gt;Research Questions:&lt;/font&gt;&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;font size="2"&gt;How can DSLs help to reduce complexity?&lt;/font&gt;&lt;/li&gt;&lt;li&gt;&lt;font size="2"&gt;What type of DSL would be best suited for use in the compter graphics course?&lt;/font&gt;&lt;/li&gt;&lt;li&gt;&lt;font size="2"&gt;What language would be best for writing the DSL?&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt;&lt;font size="2"&gt;&lt;br&gt;&lt;/font&gt;&lt;h2&gt;&lt;font size="2"&gt;Literature Review:&lt;/font&gt;&lt;/h2&gt;&lt;font size="2"&gt;How can DSLs help to reduce complexity?&lt;br&gt;In his paper No Silver Bullet, Brooks explains why he feels the software industry is unlikely to experience orders or magnitude increases in productivity.  At the core of his argument is the idea that the complexity of any system can be divided into two parts, the essential and the accidental or incidental.  The essential complexity is that which is inherent in the problem.  The incidental complexity on the other hand is a function of the difficulty of adapting a general purpose language and platform to be able to solve that problem.  Vanderburg asserts a third kind of complexity that arising from the dissonance due to mixing code addressing incidental and essential complexity and suggests DSLs as a way of minimizing this complexity.  &lt;br&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="2"&gt;What type of DSL would be best suited for use in the Compter Graphics course?&lt;/font&gt;&lt;br&gt;&lt;font size="2"&gt;According to Freeze there are two ways to create a DSL. One is to invent a syntax from scratch, and build an interpreter or compiler &lt;/font&gt;&lt;font size="2"&gt;(External DSL)&lt;/font&gt;&lt;font size="2"&gt;. The other is to tailor an existing general-purpose language by adding or changing methods, operators, and default actions (Internal DSL).  The advantages of Internal DSLs as opposed to External make them well suited for use in computer science courses.  In particular the speed of development would allow the lecturer to develop and modify the language as the course progresses tailoring the DSL as needed.  The main disadvantage of Internal DSLs, that their syntax is constrained by the language they are written in(Fowler), is not insurmountable since the target users are programmers.&lt;br&gt;&lt;br&gt;What language would be best for writing the DSL?&lt;br&gt;Internal DSLs, since they are limited by the syntax of their host language are best expressed in languages that have terse, flexible but expressive syntax.  This makes dynamic, interpreted languages such as Ruby ideal (Fowler).&lt;br&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;br&gt;&lt;/font&gt;&lt;h2&gt;&lt;font size="2"&gt;Conclusion:&lt;/font&gt;&lt;/h2&gt;&lt;font size="2"&gt; To illustrate the advantage of using a DSL for teaching graphics consider the following OpenGL program in c++:&lt;/font&gt;&lt;br&gt; &lt;pre&gt;#include &amp;lt;gl/glut.h&amp;gt;&lt;br&gt;&lt;br&gt;const int width=640;&lt;br&gt;const int height=480;&lt;br&gt;&lt;br&gt;void display(void)&lt;br&gt;{&lt;br&gt;	glClear(GL_COLOR_BUFFER_BIT);&lt;br&gt;	glBegin(GL_LINE_STRIP);&lt;br&gt;		glVertex2f(50,50);&lt;br&gt;		glVertex2f(50,-50);&lt;br&gt;		glVertex2f(-50,-50);&lt;br&gt;		glVertex2f(-50,50);&lt;br&gt;	glEnd();	&lt;br&gt;	glFlush();&lt;br&gt;}&lt;br&gt;&lt;br&gt;void reshape(int w, int h)&lt;br&gt;{&lt;br&gt;	glOrtho(-300.0, 300.0, -200.0, 200.0, -1.0, 1.0);&lt;br&gt;}&lt;br&gt;&lt;br&gt;void main(int argc, char **argv)&lt;br&gt;{&lt;br&gt;	glutInitWindowSize(width, height);&lt;br&gt;	glutCreateWindow("Graphics Programming Basics");&lt;br&gt;	glutDisplayFunc(display);&lt;br&gt;	glutReshapeFunc(reshape);&lt;br&gt;	glutMainLoop();&lt;br&gt;}&lt;/pre&gt; Notice the complexity of even this simple program, also notice the mixing of the essential and incidental complexity.  With words and symbols like "void", "int", "**", "}" and ";" which really have little to do with graphics sprinkled throughout the code.  An internal DSL written in Ruby could reduce this complexity allowing the same program to be written like this:&lt;br&gt; &lt;font style="font-family: Verdana;" size="2"&gt;&lt;br style="font-style: italic;"&gt; &lt;span style="font-style: italic; font-family: Courier New;"&gt;window :title=&amp;gt;"Graphics Programming Basics", :width=&amp;gt;640, :height=&amp;gt;480&lt;/span&gt;&lt;br style="font-style: italic; font-family: Courier New;"&gt; &lt;/font&gt; &lt;pre style="font-style: italic; font-family: Courier New;"&gt;&lt;font size="2"&gt;Ortho(-300, 300, -200, 200)&lt;/font&gt;&lt;/pre&gt;  &lt;font style="font-style: italic; font-family: Courier New;" size="2"&gt;lineStrip do&lt;/font&gt;&lt;font style="font-family: Courier New;" size="2"&gt;&lt;span style="font-style: italic;"&gt;&lt;br&gt;   point(50,50)&lt;br&gt;   point(50,-50)&lt;/span&gt;&lt;br style="font-style: italic;"&gt; &lt;span style="font-style: italic;"&gt;  point(-50,-50)&lt;/span&gt;&lt;br style="font-style: italic;"&gt; &lt;span style="font-style: italic;"&gt;  point(-50,50)&lt;/span&gt;&lt;br style="font-style: italic;"&gt; &lt;span style="font-style: italic;"&gt;end&lt;/span&gt;&lt;/font&gt;&lt;br&gt; &lt;font size="2"&gt;&lt;br&gt; &lt;/font&gt;&lt;font size="2"&gt;&lt;br&gt;References:&lt;/font&gt;&lt;br&gt;&lt;p&gt;&lt;font face="verdana" size="2"&gt;Brooks, F (1986) &lt;/font&gt;&lt;font size="2"&gt;No Silver Bullet: Essence and Accidents of Software Engineering&lt;/font&gt;&lt;font face="verdana" size="2"&gt;. Retrieved February 7, 2007&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="verdana" size="2"&gt;from http://www-inst.eecs.berkeley.edu/~maratb/readings/NoSilverBullet.html&lt;/font&gt;&lt;/p&gt;&lt;font face="verdana" size="2"&gt;&lt;br&gt;&lt;/font&gt;&lt;p&gt;&lt;font size="2"&gt;&lt;strong&gt;&lt;span style="font-weight: normal;"&gt;Buck, J (2006)&lt;/span&gt; &lt;/strong&gt;Writing Domain Specific Languages. Retrieved February 7, 2007&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font size="2"&gt;Web Site: http://weblog.jamisbuck.org/2006/4/20/writing-domain-specific-languages&lt;/font&gt;&lt;/p&gt;&lt;br&gt;&lt;p&gt;&lt;strong style="font-weight: normal;"&gt;Deursen , A.,          Klint , P., Visser, J. (1998)&lt;/strong&gt;Domain-Specific Languages:An Annotated Bibliography.&lt;/p&gt;&lt;p&gt;Retrieved February 7, 2007&lt;/p&gt;&lt;p&gt;from: http://homepages.cwi.nl/~arie/papers/dslbib/&lt;/p&gt;&lt;font size="2"&gt;&lt;br&gt;Fowler, M. (2006).  Introduction to Domain Specific Languages.&lt;br&gt;Retrieved February 4, 2007, from InfoQ Web Site:&lt;br&gt;&lt;a href="http://www.infoq.com/presentations/domain-specific-languages" target="_blank"&gt;http://www.infoq.com/presentat&lt;wbr&gt;ions/domain-specific-languages&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;/font&gt;&lt;p&gt;&lt;font size="2"&gt;Fowler, M. (2005). Language Workbenches: The Killer-App for Domain Specific Languages?&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font size="2"&gt;Retrieved Februery 7, 2007, from Martin Fowler's Bliki&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font size="2"&gt;Web Site: http://martinfowler.com/articles/languageWorkbench.html&lt;br&gt;&lt;/font&gt;&lt;/p&gt;&lt;br&gt;&lt;p&gt;Frecho, J. (2003) Domain-Specific Languages - An Overview. Retrieved February 7, 2007&lt;br&gt;&lt;/p&gt;&lt;font size="2"&gt;&lt;span class="ts"&gt;from: http://compose.labri.fr/documentation/dsl/dsl_overview.php3&lt;br&gt;&lt;/span&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;span class="as"&gt;Freeze, J (2006) &lt;/span&gt;&lt;span class="ts"&gt;Creating DSLs with Ruby. Retrieved February 7, 2007&lt;br&gt;from http://www.artima.com/rubycs/articles/ruby_as_dsl.html&lt;br&gt;&lt;/span&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;br&gt;&lt;/font&gt;&lt;p style="font-family: Verdana;"&gt;&lt;font size="2"&gt;Graham, P (1993) Programming Bottom Up. Retrieved February 7, 2007&lt;/font&gt;&lt;/p&gt;&lt;p style="font-family: Verdana;"&gt;&lt;font size="2"&gt;from http://www.paulgraham.com/progbot.html&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="verdana" size="2"&gt;&lt;br&gt;&lt;/font&gt;&lt;/p&gt;&lt;font size="2"&gt;Olsen, R (2006). Building a DSL in Ruby. Retrieved February 4, 2007,&lt;br&gt;from Russ Olsen's Weblog&lt;br&gt;Web Site: &lt;a href="http://jroller.com/page/rolsen?entry=building_a_dsl_in_ruby" target="_blank"&gt;http://jroller.com/page/rolsen&lt;wbr&gt;?entry=building_a_dsl_in_ruby&lt;/a&gt;&lt;/font&gt;&lt;br&gt;&lt;br&gt;&lt;font size="2"&gt;Vanderburg, G (2006) Interviewed by Geoffrey Grosenbach.  Retrieved February 7, 2007&lt;br&gt;from Rails Podcast&lt;br&gt;Web Site: http://podcast.rubyonrails.org/programs/1/episodes/glenn_vanderburg_mp3&lt;/font&gt;&lt;br&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="verdana" size="2"&gt;Wikipedia Article (2007) No Silver Bullet. Retrieved February 7, 2007&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="verdana" size="2"&gt;from http://en.wikipedia.org/wiki/No_Silver_Bullet&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="verdana" size="2"&gt;&lt;br&gt;&lt;/font&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9183140863238679097-5896108771196904408?l=prettycode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prettycode.blogspot.com/feeds/5896108771196904408/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9183140863238679097&amp;postID=5896108771196904408' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9183140863238679097/posts/default/5896108771196904408'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9183140863238679097/posts/default/5896108771196904408'/><link rel='alternate' type='text/html' href='http://prettycode.blogspot.com/2007/02/dsls-and-computer-graphics-use-of.html' title=''/><author><name>Gordon DuQuesnay</name><uri>http://www.blogger.com/profile/02331170559879701683</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_q-oKp6yrQ1k/S4NmlWaFjEI/AAAAAAAAABo/Io4-rz2o-J8/s1600-R/aad54bd192c58d3c9bcb4273174df070.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9183140863238679097.post-2863480029383748821</id><published>2007-02-07T12:12:00.000-08:00</published><updated>2007-02-07T12:20:18.964-08:00</updated><title type='text'>Ruby and DSLs</title><content type='html'>I recently got an assignment for my Analysis of Programing Languages course.  Since I've been getting into Ruby I chose a topic that would allow me to delve into some of the areas that, as a Java programmer, I've been finding more mystifying.  I also had a Computer Graphics assignment given out at around the same time so I combined the two.  It is published using Google documents at &lt;a id="publishedDocumentUrl" class="tabcontent" target="_blank" href="http://docs.google.com/View?docid=ddqzx3ws_6frhjrv&amp;amp;revision=_published"&gt;http://docs.google.com/View?docid=ddqzx3ws_6frhjrv&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9183140863238679097-2863480029383748821?l=prettycode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prettycode.blogspot.com/feeds/2863480029383748821/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9183140863238679097&amp;postID=2863480029383748821' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9183140863238679097/posts/default/2863480029383748821'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9183140863238679097/posts/default/2863480029383748821'/><link rel='alternate' type='text/html' href='http://prettycode.blogspot.com/2007/02/ruby-and-dsls.html' title='Ruby and DSLs'/><author><name>Gordon DuQuesnay</name><uri>http://www.blogger.com/profile/02331170559879701683</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_q-oKp6yrQ1k/S4NmlWaFjEI/AAAAAAAAABo/Io4-rz2o-J8/s1600-R/aad54bd192c58d3c9bcb4273174df070.png'/></author><thr:total>0</thr:total></entry></feed>
