<?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'><id>tag:blogger.com,1999:blog-5037358922032921839</id><updated>2009-10-13T14:40:42.938-07:00</updated><title type='text'>Dustin's Blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://dustinwhitney.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5037358922032921839/posts/default'/><link rel='alternate' type='text/html' href='http://dustinwhitney.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Dustin Ted Whitney</name><uri>http://www.blogger.com/profile/17414601526967838823</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>25</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5037358922032921839.post-6860114381087694380</id><published>2009-07-19T22:05:00.000-07:00</published><updated>2009-07-19T22:07:28.568-07:00</updated><title type='text'>Java Bites</title><content type='html'>Josh Cough 1:03&lt;br /&gt;java bites&lt;br /&gt;&lt;br /&gt;Dustin Whitney 1:03&lt;br /&gt;but I like to type&lt;br /&gt;HashMap&amp;lt;String, ArrayList&amp;lt;Integer&amp;gt;&amp;gt; myMap = new HashMap&amp;lt;String, ArrayList&amp;lt;Integer&amp;gt;&amp;gt;()&lt;br /&gt;&lt;br /&gt;Josh Cough 1:04&lt;br /&gt;i just threw up in my mouth a little&lt;br/&gt;&lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5037358922032921839-6860114381087694380?l=dustinwhitney.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dustinwhitney.blogspot.com/feeds/6860114381087694380/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5037358922032921839&amp;postID=6860114381087694380' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5037358922032921839/posts/default/6860114381087694380'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5037358922032921839/posts/default/6860114381087694380'/><link rel='alternate' type='text/html' href='http://dustinwhitney.blogspot.com/2009/07/java-bites.html' title='Java Bites'/><author><name>Dustin Ted Whitney</name><uri>http://www.blogger.com/profile/17414601526967838823</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03859596889852874212'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5037358922032921839.post-7595239046751443402</id><published>2009-07-05T11:29:00.001-07:00</published><updated>2009-07-05T11:30:53.799-07:00</updated><title type='text'>Multi-threaded Testing</title><content type='html'>&lt;a href="http://jackcoughonsoftware.blogspot.com/2009/07/testing-multi-threaded-scala-code.html"&gt;Josh Cough&lt;/a&gt; is building a suite for &lt;a href="http://jackcoughonsoftware.blogspot.com/2009/07/testing-multi-threaded-scala-code.html"&gt;testing multi-threaded scala apps&lt;/a&gt;.  This is insanely significant!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5037358922032921839-7595239046751443402?l=dustinwhitney.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dustinwhitney.blogspot.com/feeds/7595239046751443402/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5037358922032921839&amp;postID=7595239046751443402' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5037358922032921839/posts/default/7595239046751443402'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5037358922032921839/posts/default/7595239046751443402'/><link rel='alternate' type='text/html' href='http://dustinwhitney.blogspot.com/2009/07/multi-threaded-testing.html' title='Multi-threaded Testing'/><author><name>Dustin Ted Whitney</name><uri>http://www.blogger.com/profile/17414601526967838823</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03859596889852874212'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5037358922032921839.post-4353032964710564153</id><published>2009-02-08T09:27:00.000-08:00</published><updated>2009-02-08T09:29:53.859-08:00</updated><title type='text'>New York Scala Enthusiasts</title><content type='html'>I just started a meetup group for Scala Enthusiasts in NYC.  Check it out!&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.meetup.com/New-York-Scala-Enthusiasts/"&gt;http://www.meetup.com/New-York-Scala-Enthusiasts/&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5037358922032921839-4353032964710564153?l=dustinwhitney.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dustinwhitney.blogspot.com/feeds/4353032964710564153/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5037358922032921839&amp;postID=4353032964710564153' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5037358922032921839/posts/default/4353032964710564153'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5037358922032921839/posts/default/4353032964710564153'/><link rel='alternate' type='text/html' href='http://dustinwhitney.blogspot.com/2009/02/new-york-scala-enthusiasts.html' title='New York Scala Enthusiasts'/><author><name>Dustin Ted Whitney</name><uri>http://www.blogger.com/profile/17414601526967838823</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03859596889852874212'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5037358922032921839.post-1627357042121494842</id><published>2009-01-28T20:04:00.000-08:00</published><updated>2009-01-28T20:05:05.682-08:00</updated><title type='text'>N + 1 Select Revisited</title><content type='html'>I ran into an old problem the other day whose solution is common knowledge to even neophyte programmers, and is always used by default to make a database driven app more performant; but now it doesn't necessarily apply anymore, and I had to unlearn what I had always known to be true.&lt;br /&gt;&lt;br /&gt;The problem:  Suppose I have a table of books and a table of authors; and suppose I want all of the names of the authors of all of the books whose titles start with "A".  The amateurish way to do this is the N + 1 Select:&lt;br /&gt;&lt;br /&gt;select book_id from book where title like "A%"&lt;br /&gt;&lt;br /&gt;then for each book_id&lt;br /&gt;&lt;br /&gt;select name from author where book_id = ?&lt;br /&gt;&lt;br /&gt;If I have 100 books that start with "A" (N = 100) then I have 101 queries (N + 1) to get my results.&lt;br /&gt;&lt;br /&gt;Now suppose my database can return every query in constant time of 20 milliseconds.  The above operation takes 101 * 20ms, which is 2020ms, or about 2 seconds.  That's pretty bad, right? Right.&lt;br /&gt;&lt;br /&gt;The "correct" way to do the above operation is with a join&lt;br /&gt;&lt;br /&gt;select name from book, author where title like "A%" and book.book_id = author.book_id&lt;br /&gt;&lt;br /&gt;As I said above, all of my queries return in constant time, so the above query gives me the correct results in 20 ms.&lt;br /&gt;&lt;br /&gt;But what if I could execute the "select name from author where book_id = ?" query for all of the books concurrently (all at the same time) with threads rather than serially (one after another).  Each query still takes 20ms to return, but that 20ms is all at the same time, so really the total elapsed time of the N + 1 queries is 40ms, which isn't even in the same ballpark as the N + 1 queries executed serially.  In fact it's more in the ballpark of the "correct" way. &lt;br /&gt;&lt;br /&gt;The reason why we don't do this is because most database driven applications involve some sort of connection pooling, so your threads would have to block while waiting for a connection, and even if there were enough connections for one query, running two queries at the same time would completely stop your application, let alone 100 users browsing your app at the same time.&lt;br /&gt;&lt;br /&gt;However, that's your typical database.  Amazon's SimpleDB has no such limitations.  All of the money on your credit card could not buy enough server power to make enough connections to SimpleDB to even phase it.  It will simply plug along at the same speed no matter what you do.  So when that media campaign hits you hard, the data side of your app keeps chugging along at the same speed it always did.  Oh and SimpleDB is super redundant.  There is no single point of failure.  To get that with a typical database you have to cluster at least three of them together, and guess what happens then?  Your database performance drastically drops when performing joins.&lt;br /&gt;&lt;br /&gt;SimpleDB, as the above discussion indicates, does not have support for joins, so you must do N + 1 selects and compile your "joins" via concurrency.  However, on multi-core processors, this type of behavior is encouraged because you get the most bang for your buck when processing concurrently.&lt;br /&gt;&lt;br /&gt;This makes me wonder, "how many other things have I always held to be true, but were really just conditions of being carried out in serial?"  The next decade is going to be interesting.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5037358922032921839-1627357042121494842?l=dustinwhitney.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dustinwhitney.blogspot.com/feeds/1627357042121494842/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5037358922032921839&amp;postID=1627357042121494842' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5037358922032921839/posts/default/1627357042121494842'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5037358922032921839/posts/default/1627357042121494842'/><link rel='alternate' type='text/html' href='http://dustinwhitney.blogspot.com/2009/01/n-1-select-revisited.html' title='N + 1 Select Revisited'/><author><name>Dustin Ted Whitney</name><uri>http://www.blogger.com/profile/17414601526967838823</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03859596889852874212'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5037358922032921839.post-1371677453493049644</id><published>2009-01-06T18:55:00.000-08:00</published><updated>2009-05-14T14:13:56.972-07:00</updated><title type='text'>Amazon EC2 and Cloud Tools Saves the Day</title><content type='html'>I don't know if I've written about it here or not, but I have spent some time over the past couple of months contributing to an open source project started by &lt;a href="http://www.chrisrichardson.net"&gt;Chris Richardson&lt;/a&gt;, of "POJOs in Action" fame, called &lt;a href="http://code.google.com/p/cloudtools/"&gt;Cloud Tools.&lt;/a&gt;  It's a set of tools to launch Java based web applications onto &lt;a href="http://aws.amazon.com/ec2/"&gt;Amazon EC2&lt;/a&gt;.  I've been in charge of moving a lot of the functionality that exists in Maven commands over to Gant scripts for use with &lt;a href="http://www.grails.org"&gt;Grails&lt;/a&gt;.  It's pretty rad.&lt;br /&gt;&lt;br /&gt;You can launch your Grails application onto a server by simply typing: "grails cloud-tools-deploy".  It support all sorts of clustering and master/slave arrangements with DBs and so forth... totally rad.&lt;br /&gt;&lt;br /&gt;Anyway, back in October my company, -yoink-, got the go ahead from our client to run one of our web sites on EC2 -yoink-.  I elected to use Cloud Tools because it looked great, and I had read Chris's book in the past, so I knew it would be quality.  &lt;br /&gt;&lt;br /&gt;I can't tell you how much time it saves to be able to bootstrap a server from the command line with a simple "grails cloud-tools-deploy"  If you've built any web sites then you know what a pain in the ass deployment is, and you know what a pain in the ass server configuration is.  Cloud Tools and EC2 eliminate the need for both and allows you to focus on what you're good at: writing code.&lt;br /&gt;&lt;br /&gt;Continuing... today we had a massive email drop, which drove a ton of traffic to the site, that I had no idea was going to happen.  The only way I found out is an external monitoring service I had hooked up alerted me to the fact that my server was unable to serve pages.  The solution was as simple as opening my app, changing the config to run with 4 app servers, and running "grails cloud-tools-deploy." Once deployed, I switched the Elastic IP address of the old deployment to the load balancing server of my new deployment and voila!  My site was hauling ass again.&lt;br /&gt;&lt;br /&gt;Had we been using the traditional managed hosting services that we typically use, like those offered by Rackspace, we'd have been totally screwed.  It would have taken them at least a week to get another server up and running, which would have been way too long.  Using EC2 and Cloud Tools, I simply started servers as I needed them, and I'll shut them down tomorrow when the traffic dies down.  It will probably only cost our client about $20 at the most, and think of the time and money that would have been lost if the server configuration had not been able to handle the load being thrown at it.  &lt;br /&gt;&lt;br /&gt;EC2 is pretty rad.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5037358922032921839-1371677453493049644?l=dustinwhitney.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dustinwhitney.blogspot.com/feeds/1371677453493049644/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5037358922032921839&amp;postID=1371677453493049644' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5037358922032921839/posts/default/1371677453493049644'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5037358922032921839/posts/default/1371677453493049644'/><link rel='alternate' type='text/html' href='http://dustinwhitney.blogspot.com/2009/01/amazon-ec2-and-cloud-tools-saves-day.html' title='Amazon EC2 and Cloud Tools Saves the Day'/><author><name>Dustin Ted Whitney</name><uri>http://www.blogger.com/profile/17414601526967838823</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03859596889852874212'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5037358922032921839.post-1162444769604124211</id><published>2008-12-31T08:55:00.000-08:00</published><updated>2008-12-31T08:56:15.607-08:00</updated><title type='text'>I donated and so should you</title><content type='html'>&lt;a href="http://wikimediafoundation.org/wiki/Donate/en"&gt;&lt;img border="0" alt="Wikipedia Affiliate Button" src="http://upload.wikimedia.org/wikipedia/foundation/3/36/2008_fundraiser_square_button-en.png" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5037358922032921839-1162444769604124211?l=dustinwhitney.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dustinwhitney.blogspot.com/feeds/1162444769604124211/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5037358922032921839&amp;postID=1162444769604124211' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5037358922032921839/posts/default/1162444769604124211'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5037358922032921839/posts/default/1162444769604124211'/><link rel='alternate' type='text/html' href='http://dustinwhitney.blogspot.com/2008/12/i-donated-and-so-should-you.html' title='I donated and so should you'/><author><name>Dustin Ted Whitney</name><uri>http://www.blogger.com/profile/17414601526967838823</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03859596889852874212'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5037358922032921839.post-6901871503998832951</id><published>2008-11-06T07:42:00.000-08:00</published><updated>2008-11-06T09:00:58.216-08:00</updated><title type='text'>US CTO: Bill Joy</title><content type='html'>I saw this &lt;a href="http://bits.blogs.nytimes.com/2008/11/05/john-doerrs-advice-for-barack-obama-hire-bill-joy/"&gt;entry&lt;/a&gt; on the NYTimes technology blog.  Apparently Barack Obama wants to appoint a US CTO, and &lt;a href=""&gt;Bill Joy&lt;/a&gt; has been brought to his attention.&lt;br /&gt;&lt;br /&gt;Bill Joy has always been a personal technology-hero of mine.  He co-founded Sun Microsystems, played a major part in the creation of the SPARC microprocessor, and played a major part in the creation of Java.  If you run a mac, it's kernel is built from his branchild, BSD, and if you use unix and edit files, it's likely you use vi, also created by Bill Joy.&lt;br /&gt;&lt;br /&gt;Bill Joy is awesome.  He retired from Sun in 2003, and now works for a venture capital firm focusing on green energy.&lt;br /&gt;&lt;br /&gt;Here is a &lt;a href="http://www.pbs.org/cringely/nerdtv/player/?show=003&amp;ext=mp4"&gt;cool interview&lt;/a&gt; on Nerd TV.&lt;br /&gt;&lt;br /&gt;&lt;h3 style="color:red; text-decoration:underline"&gt;However&lt;/h3&gt;&lt;br /&gt;Bill Joy has been leading this so called &lt;a href="http://en.wikipedia.org/wiki/Neo-Luddite"&gt;neo-luddite&lt;/a&gt; movement, which opposes genetic and nanotechnology research  for fear that we'll run into a Terminator-like scenario.  I agree there are risks with those types of research, but if we don't do the research, someone else will --  and there are HUGE upsides to this type of research.&lt;br /&gt;&lt;br /&gt;I believe that free market capitalism works (for the most part), and I don't want to see regulations put on genetic and nanotech research.  I support Barack Obama, and I believe government intervention and minor regulations are necessary to fix our current economic crisis, but that intervention and regulation should be focused on our financial sector and should not extend to our technology sector, or other sectors for that matter.&lt;br /&gt;&lt;br /&gt;I greatly respect and admire Bill Joy, but his appointment will somewhat worry me.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5037358922032921839-6901871503998832951?l=dustinwhitney.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dustinwhitney.blogspot.com/feeds/6901871503998832951/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5037358922032921839&amp;postID=6901871503998832951' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5037358922032921839/posts/default/6901871503998832951'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5037358922032921839/posts/default/6901871503998832951'/><link rel='alternate' type='text/html' href='http://dustinwhitney.blogspot.com/2008/11/us-cto-bill-joy.html' title='US CTO: Bill Joy'/><author><name>Dustin Ted Whitney</name><uri>http://www.blogger.com/profile/17414601526967838823</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03859596889852874212'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5037358922032921839.post-4846120135097585851</id><published>2008-10-28T21:58:00.000-07:00</published><updated>2008-10-28T22:02:11.438-07:00</updated><title type='text'>ETags</title><content type='html'>I'm sure your all familiar with &lt;a href="http://en.wikipedia.org/wiki/HTTP_ETag"&gt;ETags&lt;/a&gt;, which can be used to determine if you've downloaded a file from a site or not.  This works great for images: if you've already downloaded an image, why bother downloading it again?  But have you ever thought of using ETags to determine if a user has downloaded your dynamic html?&lt;br /&gt;&lt;br /&gt;Let's say you've got a page that takes 15 database queries to generate.  I'd bet money on the fact that with just one or two of those queries you could determine, using ETags, whether or not the user has seen the page already.  If you can do that, you can return a response code of 304 (Unmodified), so the browser pulls everything from cache -- you'll cut database activity and bandwidth usage to a fraction of what they would be otherwise, which could cut the need for extra servers in your cluster.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.tbray.org/ongoing/When/200x/2008/08/14/Rails-ETags"&gt;Here&lt;/a&gt; is a cool blog entry using RoR as an example, but the same technique applies with Grails (and Java):&lt;br /&gt;&lt;br /&gt;and &lt;a href="http://www.infoq.com/articles/etags"&gt;here&lt;/a&gt; is another more long winded article with Spring/Hibernate&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-Dustin&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5037358922032921839-4846120135097585851?l=dustinwhitney.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dustinwhitney.blogspot.com/feeds/4846120135097585851/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5037358922032921839&amp;postID=4846120135097585851' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5037358922032921839/posts/default/4846120135097585851'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5037358922032921839/posts/default/4846120135097585851'/><link rel='alternate' type='text/html' href='http://dustinwhitney.blogspot.com/2008/10/etags.html' title='ETags'/><author><name>Dustin Ted Whitney</name><uri>http://www.blogger.com/profile/17414601526967838823</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03859596889852874212'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5037358922032921839.post-3476657380442298236</id><published>2008-09-29T22:03:00.001-07:00</published><updated>2008-09-29T22:09:37.587-07:00</updated><title type='text'>Quicksort in Scala</title><content type='html'>&lt;pre&gt;&lt;br /&gt;def sort(list: List[Int]): List[Int] = {&lt;br /&gt;        list match {&lt;br /&gt;                case List() =&gt; list&lt;br /&gt;                case List(_) =&gt; list&lt;br /&gt;                case List(_, _*) =&gt; {&lt;br /&gt;                        val pivot = list(list.length/2)&lt;br /&gt;                        sort(list.filter(x =&gt; x &lt; pivot)) ::: list.filter(x =&gt; x == pivot) ::: sort(list.filter(x =&gt; x &gt; pivot)) &lt;br /&gt;                }&lt;br /&gt;        }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5037358922032921839-3476657380442298236?l=dustinwhitney.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dustinwhitney.blogspot.com/feeds/3476657380442298236/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5037358922032921839&amp;postID=3476657380442298236' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5037358922032921839/posts/default/3476657380442298236'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5037358922032921839/posts/default/3476657380442298236'/><link rel='alternate' type='text/html' href='http://dustinwhitney.blogspot.com/2008/09/quicksort-in-scala.html' title='Quicksort in Scala'/><author><name>Dustin Ted Whitney</name><uri>http://www.blogger.com/profile/17414601526967838823</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03859596889852874212'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5037358922032921839.post-854734625582156239</id><published>2008-05-31T14:18:00.000-07:00</published><updated>2008-05-31T14:19:36.096-07:00</updated><title type='text'>Erlang is Rad</title><content type='html'>I don't know how many times I've brought it up, but Erlang is still rad.   Everyone in technology should watch at least the first 13 minutes of this presentation:&lt;br /&gt;&lt;br /&gt;http://www.infoq.com/presentations/erlang-software-for-a-concurrent-world&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5037358922032921839-854734625582156239?l=dustinwhitney.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dustinwhitney.blogspot.com/feeds/854734625582156239/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5037358922032921839&amp;postID=854734625582156239' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5037358922032921839/posts/default/854734625582156239'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5037358922032921839/posts/default/854734625582156239'/><link rel='alternate' type='text/html' href='http://dustinwhitney.blogspot.com/2008/05/erlang-is-rad.html' title='Erlang is Rad'/><author><name>Dustin Ted Whitney</name><uri>http://www.blogger.com/profile/17414601526967838823</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03859596889852874212'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5037358922032921839.post-6784168769071237969</id><published>2008-05-06T12:07:00.001-07:00</published><updated>2008-05-06T12:07:34.325-07:00</updated><title type='text'>SearchMonkey</title><content type='html'>I'm pretty excited about &lt;a href="http://developer.yahoo.com/searchmonkey/preview.html"&gt;SearchMonkey&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5037358922032921839-6784168769071237969?l=dustinwhitney.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dustinwhitney.blogspot.com/feeds/6784168769071237969/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5037358922032921839&amp;postID=6784168769071237969' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5037358922032921839/posts/default/6784168769071237969'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5037358922032921839/posts/default/6784168769071237969'/><link rel='alternate' type='text/html' href='http://dustinwhitney.blogspot.com/2008/05/searchmonkey.html' title='SearchMonkey'/><author><name>Dustin Ted Whitney</name><uri>http://www.blogger.com/profile/17414601526967838823</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03859596889852874212'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5037358922032921839.post-6088981130875052030</id><published>2008-05-03T10:46:00.000-07:00</published><updated>2008-05-03T10:54:04.192-07:00</updated><title type='text'>Marchitecture</title><content type='html'>&lt;a href="http://www.infoq.com/interviews/dave-thomas-programming-languages-soa-and-the-web"&gt;This&lt;/a&gt; is one of the most insightful interviews I've seen in a long time.  I don't know if the term "marchitecture" (&lt;a href="http://en.wikipedia.org/wiki/Marchitecture"&gt;guess so&lt;/a&gt;) existed before, but whomever coined it was a genius!  I have worked for places that were sold TONS of middleware that simply put a halt on productivity, and made life hell.  Too bad I'm the only geek I know that watches stuff like this :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5037358922032921839-6088981130875052030?l=dustinwhitney.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dustinwhitney.blogspot.com/feeds/6088981130875052030/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5037358922032921839&amp;postID=6088981130875052030' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5037358922032921839/posts/default/6088981130875052030'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5037358922032921839/posts/default/6088981130875052030'/><link rel='alternate' type='text/html' href='http://dustinwhitney.blogspot.com/2008/05/marchitecture.html' title='Marchitecture'/><author><name>Dustin Ted Whitney</name><uri>http://www.blogger.com/profile/17414601526967838823</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03859596889852874212'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5037358922032921839.post-8354432797231214629</id><published>2008-03-31T20:57:00.000-07:00</published><updated>2008-03-31T20:59:23.528-07:00</updated><title type='text'>Groovy Threads</title><content type='html'>I don't know why I think this is so cool, because it's such a no-brainer, but I really like the way Groovy added closures to the Thread class:&lt;br /&gt;&lt;br /&gt;tmp.groovy:&lt;br /&gt;&lt;br /&gt;def stringOne = 'Hello, ';&lt;br /&gt;def stringTwo = 'World!';&lt;br /&gt;Thread.start{sleep(1000); println stringTwo}&lt;br /&gt;Thread.start{sleep(999); print stringOne}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5037358922032921839-8354432797231214629?l=dustinwhitney.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dustinwhitney.blogspot.com/feeds/8354432797231214629/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5037358922032921839&amp;postID=8354432797231214629' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5037358922032921839/posts/default/8354432797231214629'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5037358922032921839/posts/default/8354432797231214629'/><link rel='alternate' type='text/html' href='http://dustinwhitney.blogspot.com/2008/03/groovy-threads.html' title='Groovy Threads'/><author><name>Dustin Ted Whitney</name><uri>http://www.blogger.com/profile/17414601526967838823</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03859596889852874212'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5037358922032921839.post-3019575118344714298</id><published>2008-03-11T09:49:00.000-07:00</published><updated>2008-03-11T09:51:04.597-07:00</updated><title type='text'>Groovy Classpath</title><content type='html'>I always forget this, so it's getting added to my blog for further reference:&lt;br /&gt;&lt;br /&gt;You can place jars in your ${user.home}/.groovy/lib directory to have them automatically loaded into your classpath.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5037358922032921839-3019575118344714298?l=dustinwhitney.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dustinwhitney.blogspot.com/feeds/3019575118344714298/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5037358922032921839&amp;postID=3019575118344714298' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5037358922032921839/posts/default/3019575118344714298'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5037358922032921839/posts/default/3019575118344714298'/><link rel='alternate' type='text/html' href='http://dustinwhitney.blogspot.com/2008/03/groovy-classpath.html' title='Groovy Classpath'/><author><name>Dustin Ted Whitney</name><uri>http://www.blogger.com/profile/17414601526967838823</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03859596889852874212'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5037358922032921839.post-3187133319133776531</id><published>2008-03-09T22:37:00.000-07:00</published><updated>2008-03-09T22:41:54.835-07:00</updated><title type='text'>Hello World!</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_tA0uZNIYTSc/R9TKHVWl9BI/AAAAAAAAAAU/SiltOdKJ4mY/s1600-h/Picture+1.png"&gt;&lt;img style="cursor:pointer; cursor:hand;" src="http://1.bp.blogspot.com/_tA0uZNIYTSc/R9TKHVWl9BI/AAAAAAAAAAU/SiltOdKJ4mY/s320/Picture+1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5175984099095344146" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5037358922032921839-3187133319133776531?l=dustinwhitney.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dustinwhitney.blogspot.com/feeds/3187133319133776531/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5037358922032921839&amp;postID=3187133319133776531' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5037358922032921839/posts/default/3187133319133776531'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5037358922032921839/posts/default/3187133319133776531'/><link rel='alternate' type='text/html' href='http://dustinwhitney.blogspot.com/2008/03/blog-post.html' title='Hello World!'/><author><name>Dustin Ted Whitney</name><uri>http://www.blogger.com/profile/17414601526967838823</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03859596889852874212'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_tA0uZNIYTSc/R9TKHVWl9BI/AAAAAAAAAAU/SiltOdKJ4mY/s72-c/Picture+1.png' height='72' width='72'/><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5037358922032921839.post-7078420533212630738</id><published>2008-02-16T20:39:00.000-08:00</published><updated>2008-02-16T20:46:11.430-08:00</updated><title type='text'>B-Trees</title><content type='html'>I've been thinking about Erlang nodes as B-Tree nodes today (a natural application for the language).  I did some reading up on &lt;a href="http://en.wikipedia.org/wiki/B-tree"&gt;B-Trees on wikipedia&lt;/a&gt; and found a video worth the entire number of characters in the article -- the music is awesome.  I imagine it being shown to a bunch of CS students in an Indian university by a dorky professor who thinks he can get his students excited if he injects a little Bollywood into his class. Haha!&lt;br /&gt;&lt;object width="425" height="355"&gt;&lt;param name="movie" value="http://www.youtube.com/v/coRJrcIYbF4&amp;rel=1"&gt;&lt;/param&gt;&lt;param name="wmode" value="transparent"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/coRJrcIYbF4&amp;rel=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5037358922032921839-7078420533212630738?l=dustinwhitney.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dustinwhitney.blogspot.com/feeds/7078420533212630738/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5037358922032921839&amp;postID=7078420533212630738' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5037358922032921839/posts/default/7078420533212630738'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5037358922032921839/posts/default/7078420533212630738'/><link rel='alternate' type='text/html' href='http://dustinwhitney.blogspot.com/2008/02/b-trees.html' title='B-Trees'/><author><name>Dustin Ted Whitney</name><uri>http://www.blogger.com/profile/17414601526967838823</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03859596889852874212'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5037358922032921839.post-2897763049192834641</id><published>2008-01-29T20:56:00.001-08:00</published><updated>2008-01-29T21:43:06.637-08:00</updated><title type='text'>Erlang fast :)</title><content type='html'>I want to write about this right now cause it gets kind of lost on me, so I want to be able to refer back to it.  Why is Erlang so fast?  Imagine you write a Java program that spawns two threads, and you run said program on a multi-core machine.  Pretend both threads have a reference to the same Integer (of the proper Object sort), and at every moment of each thread's existence they are going to increase the value of that Integer by one over and over.  Each time each thread attempts to increase the value of the Integer it must perform a check/lock/update/unlock to make sure it can access and update the memory that the Integer refers to.  That check/lock/update/unlock slows your program down.  On a single core system, the check/lock/update/unlock isn't necessary since only one thread is running at a time, but on multi-core machines threads run concurrently, so the check is necessary.  In Erlang you can't update variables.  Variables can be given a value once and only once, and since you can't change the value, that check isn't necessary, and that's why Erlang is faster.&lt;br /&gt;&lt;br /&gt;I guess this begs the question: how would you write the same program in Erlang?  Well in my &lt;a href="http://www.pragprog.com/titles/jaerlang"&gt;Programming Erlang&lt;/a&gt; book they are very careful to explain that Erlang doesn't have threads, it has processes, and the difference is that threads share information (the Integer in the example given), and processes don't (well, you can pass processes the same variable, but they can't update it, so I guess that's the same thing).  So, I guess you'd go about solving the problem in an entirely different manner.  I am new to Erlang, so I don't feel comfortable giving a definitive answer, but it seems to me, that you'd simply have to solve problems with a different approach than you would in Java... not drastically different, but different, nonetheless... maybe, one process spawns two processes that return the message "1" every moment which is added to the parent processes' message queue (all processes in Erlang have message queues), which it iterates through to accumulate values.  That sounds good to me :) Maybe I'll write both programs this weekend and see which one can get to Integer.MAX_VALUE the fastest.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5037358922032921839-2897763049192834641?l=dustinwhitney.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dustinwhitney.blogspot.com/feeds/2897763049192834641/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5037358922032921839&amp;postID=2897763049192834641' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5037358922032921839/posts/default/2897763049192834641'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5037358922032921839/posts/default/2897763049192834641'/><link rel='alternate' type='text/html' href='http://dustinwhitney.blogspot.com/2008/01/erlang-fast.html' title='Erlang fast :)'/><author><name>Dustin Ted Whitney</name><uri>http://www.blogger.com/profile/17414601526967838823</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03859596889852874212'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5037358922032921839.post-6422409617040037090</id><published>2008-01-27T14:16:00.003-08:00</published><updated>2008-01-27T14:18:05.891-08:00</updated><title type='text'>Keynesian beauty contest</title><content type='html'>I had not hear of &lt;a href="http://en.wikipedia.org/wiki/Keynesian_beauty_contest"&gt;this&lt;/a&gt; before.  I like it :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5037358922032921839-6422409617040037090?l=dustinwhitney.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dustinwhitney.blogspot.com/feeds/6422409617040037090/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5037358922032921839&amp;postID=6422409617040037090' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5037358922032921839/posts/default/6422409617040037090'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5037358922032921839/posts/default/6422409617040037090'/><link rel='alternate' type='text/html' href='http://dustinwhitney.blogspot.com/2008/01/kenysian-beauty-contest.html' title='Keynesian beauty contest'/><author><name>Dustin Ted Whitney</name><uri>http://www.blogger.com/profile/17414601526967838823</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03859596889852874212'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5037358922032921839.post-6823268096015557222</id><published>2008-01-27T11:35:00.001-08:00</published><updated>2008-01-27T11:38:27.906-08:00</updated><title type='text'>iTunes :(</title><content type='html'>I have an album at work that I bought on iTunes that I really want to listen to at home.  I want to listen to it so badly that I actually bought the album again from home.  iTunes really ought to let us download music we've already purchased.  I understand that bandwidth isn't free, so I'd be totally willing to spend 99 cents to download it again, but I shouldn't have to pay $9.99 to buy the whole album.  Yeah maybe I should be more patient and save myself ten bucks, but I don't wanna!&lt;br /&gt;&lt;br /&gt;keeping music collections synchronized is a pain in the ass :(&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5037358922032921839-6823268096015557222?l=dustinwhitney.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dustinwhitney.blogspot.com/feeds/6823268096015557222/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5037358922032921839&amp;postID=6823268096015557222' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5037358922032921839/posts/default/6823268096015557222'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5037358922032921839/posts/default/6823268096015557222'/><link rel='alternate' type='text/html' href='http://dustinwhitney.blogspot.com/2008/01/itunes.html' title='iTunes :('/><author><name>Dustin Ted Whitney</name><uri>http://www.blogger.com/profile/17414601526967838823</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03859596889852874212'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5037358922032921839.post-7907395462678514980</id><published>2008-01-23T19:52:00.000-08:00</published><updated>2008-01-23T20:15:41.786-08:00</updated><title type='text'>Web Frameworks</title><content type='html'>Yesterday it was overcast and I was in a bad mood.  I wanted to write an angry rant about how one MUST justify their use of anything but Ruby on Rails or Grails (or, I'm told, Django) when building websites, but I held off, and I'm glad, because when one gets up on a soapbox, they usually end up looking like a fool.  However, today I'm in a good mood, and I still feel the same way.  I read &lt;a href="http://www.davidcramer.net/other/43/rapid-development-serving-500000-pageshour.html"&gt;this&lt;/a&gt; today.  I haven't used Django, but I've heard great things.&lt;br /&gt;&lt;br /&gt;Why do I feel one MUST justify their use of anything but RoR, Grails (or, I'm told, Django)?  The reason why is just plain ol'experience.  I am currently knee deep in a straight up Java project, using Spring MVC.  I think Spring MVC is great (Grails is built on it after all), but every time we encounter a problem, right there in the back of my head is a little voice saying, "why oh why didn't we use Grails (or Rails, or, I'm told, Django)?" At work when I bring up RoR, people are always quick to say, "RoR has problems scaling."  Our Java project doesn't scale very well, and it won't ever scale well.  We spend so much of our time coding around oddities that are inadvertently brought about by the lack of structure in our project that we don't have time to focus on scaling.   Go ahead! Criticize our team for lacking structure, a structure common to the really "good" developers out there.  Bah!  Lack of structure is status quo, and that's why things like Grails and Rails (or, I'm told, Django) came about.  They enforce structure by default.  They enforce rich domain models by default (I've been through my share of &lt;a href="http://martinfowler.com/bliki/AnemicDomainModel.html"&gt;anemic domain models&lt;/a&gt; to know why they are valuable).  They enforce separation of concerns, and they are really FUN to use!  &lt;br /&gt;&lt;br /&gt;So if you aren't going to use one of these hip, new frameworks, that's fine, but you'd better have a good justification for it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5037358922032921839-7907395462678514980?l=dustinwhitney.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dustinwhitney.blogspot.com/feeds/7907395462678514980/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5037358922032921839&amp;postID=7907395462678514980' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5037358922032921839/posts/default/7907395462678514980'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5037358922032921839/posts/default/7907395462678514980'/><link rel='alternate' type='text/html' href='http://dustinwhitney.blogspot.com/2008/01/web-frameworks.html' title='Web Frameworks'/><author><name>Dustin Ted Whitney</name><uri>http://www.blogger.com/profile/17414601526967838823</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03859596889852874212'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5037358922032921839.post-921391817812606090</id><published>2008-01-22T18:54:00.000-08:00</published><updated>2008-01-22T19:23:15.677-08:00</updated><title type='text'>Rate Cuts and the Dollar</title><content type='html'>Today the Federal Reserve Bank cut the federal funds rate by 75 basis points.  In all the time I've been paying attention (since college) I have never seen a cut this big.  Cutting the fed rate is supposed to increase the money supply by encouraging people to borrow.  On the down side it can carry inflation along with it, and the dollar did in fact trade down today.  What's crazy is that even with a cut like this the DJI and S&amp;P 500 closed down!  If a cut like that can't increase investor confidence, then maybe a cut like that won't bring inflation along with it.  And if there is an ominous global recession on the horizon, maybe we won't see the dollar decrease much because other central banks will cut their rates too.  It'll be interesting to see, so let's start documenting it!  Here is a list of exchange rates:&lt;br /&gt;&lt;br /&gt;GBP: 1.9577&lt;br /&gt;CAD: 0.9758&lt;br /&gt;EUR: 1.46089&lt;br /&gt;AUD: 0.868402&lt;br /&gt;JPY: 0.009409&lt;br /&gt;&lt;br /&gt;I'll keep track over the next while to see what happens.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5037358922032921839-921391817812606090?l=dustinwhitney.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dustinwhitney.blogspot.com/feeds/921391817812606090/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5037358922032921839&amp;postID=921391817812606090' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5037358922032921839/posts/default/921391817812606090'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5037358922032921839/posts/default/921391817812606090'/><link rel='alternate' type='text/html' href='http://dustinwhitney.blogspot.com/2008/01/rate-cuts-and-dollar.html' title='Rate Cuts and the Dollar'/><author><name>Dustin Ted Whitney</name><uri>http://www.blogger.com/profile/17414601526967838823</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03859596889852874212'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5037358922032921839.post-6684681384467573635</id><published>2008-01-13T20:24:00.001-08:00</published><updated>2008-01-14T09:13:54.514-08:00</updated><title type='text'>speling</title><content type='html'>A client at work keeps insisting that we improve the search results on one of my current projects, and one of the things they want is the nifty Google "spell check"... you know, the thing that asks if you meant to search for something else when you misspell a word?  I once read an article on how it works, and it does some comparisons behind the scenes to see if searching by another similar word will result in a significant amount more of results.  The difficulty is in finding those "other words".  I found two ways around this.  The first is that Google actually makes the spell check available through a REST interface, and you don't even need an API key to use it.  Here is some code that will make it work:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;import java.net.*;&lt;br /&gt;import java.io.*;&lt;br /&gt;&lt;br /&gt;public class Post{&lt;br /&gt;&lt;br /&gt; public static void main(String args[]) throws Exception{&lt;br /&gt;  String data = "&amp;lt;?xml version=\"1.0\" encoding=\"utf-8\" ?&amp;gt;&amp;lt;spellrequest textalreadyclipped=\"0\" ignoredups=\"0\" ignoredigits=\"1\" ignoreallcaps=\"1\"&amp;gt;&amp;lt;text&amp;gt;I lik pzza&amp;lt;/text&amp;gt;&amp;lt;/spellrequest&amp;gt;";&lt;br /&gt;  URL url = new URL("https://www.google.com/tbproxy/spell?lang=en&amp;hl=en");&lt;br /&gt;  URLConnection connection = url.openConnection();&lt;br /&gt;  connection.setDoOutput(true);&lt;br /&gt;  OutputStreamWriter writer = new OutputStreamWriter(connection.getOutputStream());&lt;br /&gt;  writer.write(data);&lt;br /&gt;  writer.flush();&lt;br /&gt;&lt;br /&gt;  BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));&lt;br /&gt;  String line;&lt;br /&gt;  while((line = reader.readLine()) != null){&lt;br /&gt;   System.out.println(line);&lt;br /&gt;  }&lt;br /&gt;   writer.close();&lt;br /&gt;   reader.close();&lt;br /&gt; }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;My worry with using Google is that they'd decide they didn't like me querying that service every time a user does a search, and it's very likely against their terms and services agreement.  But lo, dear reader, I found another method of generating those "other words"  It's in this &lt;a href="http://norvig.com/spell-correct.html"&gt;great article&lt;/a&gt; by &lt;a href="http://norvig.com/"&gt;Peter Norvig&lt;/a&gt; who happens to be a director of research at Google.  So Thanks Peter, I never could have done it without you.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5037358922032921839-6684681384467573635?l=dustinwhitney.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dustinwhitney.blogspot.com/feeds/6684681384467573635/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5037358922032921839&amp;postID=6684681384467573635' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5037358922032921839/posts/default/6684681384467573635'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5037358922032921839/posts/default/6684681384467573635'/><link rel='alternate' type='text/html' href='http://dustinwhitney.blogspot.com/2008/01/speling.html' title='speling'/><author><name>Dustin Ted Whitney</name><uri>http://www.blogger.com/profile/17414601526967838823</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03859596889852874212'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5037358922032921839.post-5005354024468074242</id><published>2007-12-15T13:31:00.000-08:00</published><updated>2007-12-15T13:43:50.541-08:00</updated><title type='text'>Hello World!</title><content type='html'>I put up &lt;a href="http://ec2-67-202-18-240.compute-1.amazonaws.com/"&gt;my first Amazon EC2 instance&lt;/a&gt; today, and though the link will probably either be broken or open up someone else's instance by the time you click on it, this marks a huge milestone in computing, and I'm happy to be a part of it!  And hey, look! &lt;a href="http://www.tikaro.com/2007/12/march-of-the-unstoppable-amazo.html"&gt;John Young&lt;/a&gt; is doing it too!&lt;br /&gt;&lt;br /&gt;  The fact that this service is SOOO DIRT CHEAP means the doors are open to anyone who has any grand ideas.   Server costs used to be a barrier, and now they simply aren't.  Oh, and look!  An &lt;a href="http://developer.amazonwebservices.com/connect/entry.jspa?externalID=873&amp;amp;categoryID=100"&gt;article&lt;/a&gt; on how to get &lt;a href="http://lucene.apache.org/hadoop/"&gt;Hadoop&lt;/a&gt; running on &lt;a href="http://www.amazon.com/gp/browse.html?node=201590011"&gt;EC2&lt;/a&gt;!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5037358922032921839-5005354024468074242?l=dustinwhitney.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dustinwhitney.blogspot.com/feeds/5005354024468074242/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5037358922032921839&amp;postID=5005354024468074242' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5037358922032921839/posts/default/5005354024468074242'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5037358922032921839/posts/default/5005354024468074242'/><link rel='alternate' type='text/html' href='http://dustinwhitney.blogspot.com/2007/12/hello-world.html' title='Hello World!'/><author><name>Dustin Ted Whitney</name><uri>http://www.blogger.com/profile/17414601526967838823</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03859596889852874212'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5037358922032921839.post-8318302568270399411</id><published>2007-10-30T13:33:00.000-07:00</published><updated>2007-10-30T13:43:52.696-07:00</updated><title type='text'>Good Ol'Capitalism</title><content type='html'>NBC &lt;a href="http://www.ft.com/cms/s/0/8f799be2-865a-11dc-b00e-0000779fd2ac.html?nclick_check=1"&gt;claims &lt;/a&gt;Apple has destroyed the music industry in terms of pricing.  That's capitalism at its finest -- execs acting like cry-babies when innovation ruins their business by making it more competitive.   Large media companies could definitely be on the decline, but it's at the benefit of consumers, so overall, it's a good thing.  The same thing needs to happen in the real-estate world, cause they are a bunch of price fixers that are directly impacting me!  Maybe I should be the one to do it :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5037358922032921839-8318302568270399411?l=dustinwhitney.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dustinwhitney.blogspot.com/feeds/8318302568270399411/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5037358922032921839&amp;postID=8318302568270399411' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5037358922032921839/posts/default/8318302568270399411'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5037358922032921839/posts/default/8318302568270399411'/><link rel='alternate' type='text/html' href='http://dustinwhitney.blogspot.com/2007/10/good-olcapitalism.html' title='Good Ol&apos;Capitalism'/><author><name>Dustin Ted Whitney</name><uri>http://www.blogger.com/profile/17414601526967838823</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03859596889852874212'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5037358922032921839.post-7508707651501184176</id><published>2007-10-23T19:33:00.000-07:00</published><updated>2007-10-23T19:54:54.119-07:00</updated><title type='text'>First Post!</title><content type='html'>I've been telling myself that I'd build my own blog for the last couple of years.  It hasn't happened, so thank you Google for doing what I didn't, or at least purchasing a company that did what I didn't and then linking it to my existing account.&lt;br /&gt;&lt;br /&gt;Hmm.... there is a part of me that kinda sorta likes the Windows Live Journal thing.  I mean, I'm writing this from a mac, so right there Windows Live Journal sucks, but it natively supports &lt;a href="http://en.wikipedia.org/wiki/Atom_%28standard%29"&gt;APP&lt;/a&gt;, which I find cool.  I don't know if blogger supports &lt;a href="http://en.wikipedia.org/wiki/Atom_%28standard%29"&gt;APP&lt;/a&gt;.  If &lt;a href="http://en.wikipedia.org/wiki/Atom_%28standard%29"&gt;APP&lt;/a&gt; gets popular enough it will.&lt;br /&gt;&lt;br /&gt;Well there you go, Dustin Ted Whitney's first post.  Geeky and critical -- quintessential Dustin Ted Whitney.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5037358922032921839-7508707651501184176?l=dustinwhitney.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dustinwhitney.blogspot.com/feeds/7508707651501184176/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5037358922032921839&amp;postID=7508707651501184176' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5037358922032921839/posts/default/7508707651501184176'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5037358922032921839/posts/default/7508707651501184176'/><link rel='alternate' type='text/html' href='http://dustinwhitney.blogspot.com/2007/10/first-post.html' title='First Post!'/><author><name>Dustin Ted Whitney</name><uri>http://www.blogger.com/profile/17414601526967838823</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03859596889852874212'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry></feed>