<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" gd:etag="W/&quot;CEMMRXkyeyp7ImA9WxBSEkU.&quot;"><id>tag:blogger.com,1999:blog-616578738157248728</id><updated>2009-12-20T14:14:44.793+10:00</updated><title>just some Java guy</title><subtitle type="html">I could not fail to disagree with you less!</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://justsomejavaguy.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://justsomejavaguy.blogspot.com/" /><link rel="hub" href="http://pubsubhubbub.appspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/616578738157248728/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Daniel Alexiuc</name><uri>http://www.blogger.com/profile/00317061160046734390</uri><email>noreply@blogger.com</email></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>52</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/JustSomeJavaGuy" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><entry gd:etag="W/&quot;AkMHRHk6eip7ImA9WxBTF0k.&quot;"><id>tag:blogger.com,1999:blog-616578738157248728.post-8701511140867599499</id><published>2009-12-14T08:31:00.005+10:00</published><updated>2009-12-14T09:53:55.712+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-14T09:53:55.712+10:00</app:edited><title>Project estimates are hilarious...</title><content type="html">Taken from a publicly available &lt;a href="http://www.emergency.qld.gov.au/publications/emergency/2005_aug/pdf/Emergency_Aug_05_p26.pdf"&gt;August 2005 newsletter&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;In early 2005, the QFRS undertook the development and implementation of the Operations Management System (OMS)...&lt;br /&gt;&lt;br /&gt;The implementation of OMS is being staged over three phases with a scheduled completion date of mid 2006.&lt;/blockquote&gt;&lt;br /&gt;Despite being in full active development since that newsletter, OMS is currently scheduled for an initial deployment with a cut-down number of features to a small subset of users in March 2010.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/616578738157248728-8701511140867599499?l=justsomejavaguy.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JustSomeJavaGuy/~4/po3krxYJaHI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://justsomejavaguy.blogspot.com/feeds/8701511140867599499/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=616578738157248728&amp;postID=8701511140867599499" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/616578738157248728/posts/default/8701511140867599499?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/616578738157248728/posts/default/8701511140867599499?v=2" /><link rel="alternate" type="text/html" href="http://justsomejavaguy.blogspot.com/2009/12/project-estimates-are-hilarious.html" title="Project estimates are hilarious..." /><author><name>Daniel Alexiuc</name><uri>http://www.blogger.com/profile/00317061160046734390</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="14472508167692382477" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry><entry gd:etag="W/&quot;D0AMRn0zfyp7ImA9WxBTE0Q.&quot;"><id>tag:blogger.com,1999:blog-616578738157248728.post-4498220436463628231</id><published>2009-12-10T07:50:00.003+10:00</published><updated>2009-12-10T07:56:27.387+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-10T07:56:27.387+10:00</app:edited><title>Toolin' around with web applications (Part 2)</title><content type="html">The site below describes the technique that I think makes more sense than our current crop of server side web frameworks (at least for building a reasonably-sized modern web application):&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.thinserverarchitecture.com/"&gt;Thin Server Architecture&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Also google "SOFEA" if this appeals to you.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/616578738157248728-4498220436463628231?l=justsomejavaguy.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JustSomeJavaGuy/~4/g8k_k0ZuY9Q" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://justsomejavaguy.blogspot.com/feeds/4498220436463628231/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=616578738157248728&amp;postID=4498220436463628231" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/616578738157248728/posts/default/4498220436463628231?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/616578738157248728/posts/default/4498220436463628231?v=2" /><link rel="alternate" type="text/html" href="http://justsomejavaguy.blogspot.com/2009/12/toolin-around-with-web-applications.html" title="Toolin' around with web applications (Part 2)" /><author><name>Daniel Alexiuc</name><uri>http://www.blogger.com/profile/00317061160046734390</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="14472508167692382477" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry><entry gd:etag="W/&quot;Ck4AQnw6fCp7ImA9WxBTEUg.&quot;"><id>tag:blogger.com,1999:blog-616578738157248728.post-4529152046799843091</id><published>2009-12-07T11:46:00.003+10:00</published><updated>2009-12-07T11:55:43.214+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-07T11:55:43.214+10:00</app:edited><title>Australia Post requires the www?</title><content type="html">It has been like this as long as I can remember:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://post.com.au"&gt;post.com.au&lt;/a&gt; &lt;- doesn't resolve&lt;a href="http://www.post.com.au"&gt;&lt;br /&gt;www.post.com.au&lt;/a&gt; &lt;- resolves&lt;br /&gt;&lt;br /&gt;How could this go unnoticed for so long by such a huge company with such a good (short) domain name?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/616578738157248728-4529152046799843091?l=justsomejavaguy.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JustSomeJavaGuy/~4/ZAKdERgpa2c" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://justsomejavaguy.blogspot.com/feeds/4529152046799843091/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=616578738157248728&amp;postID=4529152046799843091" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/616578738157248728/posts/default/4529152046799843091?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/616578738157248728/posts/default/4529152046799843091?v=2" /><link rel="alternate" type="text/html" href="http://justsomejavaguy.blogspot.com/2009/12/australia-post-requires-www.html" title="Australia Post requires the www?" /><author><name>Daniel Alexiuc</name><uri>http://www.blogger.com/profile/00317061160046734390</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="14472508167692382477" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total></entry><entry gd:etag="W/&quot;Ak4EQHk_fSp7ImA9WxNaEEQ.&quot;"><id>tag:blogger.com,1999:blog-616578738157248728.post-3169858476876439792</id><published>2009-11-25T06:37:00.004+10:00</published><updated>2009-11-25T07:41:41.745+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-25T07:41:41.745+10:00</app:edited><title>Toolin' around with web applications</title><content type="html">I'm currently on holidays. My job around the house for yesterday was to replace the hinges on the pool fence that had rusted. According to Laurie Lawrence, pool fences should be auto closing - Kids alive do the five!&lt;br /&gt;&lt;br /&gt;Anyway I spent almost two hours on this task over two separate days trying to install the hinges. The problem was, I was trying to use the screws that came with the hinges which were clearly not designed for use with a metal gate. &lt;br /&gt;&lt;br /&gt;My toolkit looked like this:&lt;br /&gt;- Wood screws&lt;br /&gt;- Cordless drill&lt;br /&gt;- Drill bits&lt;br /&gt;- Screwdrivers&lt;br /&gt;&lt;br /&gt;But I still had a lot of trouble getting these darned screws to go in. So instead I tracked down an extension cord and pulled out a corded drill, thinking that the underpowered cordless drill wasn't do me any favours.&lt;br /&gt;&lt;br /&gt;The added power of the corded drill certainly made things faster, but ultimately didn't help me succeed. I would either destroy the threads on the screws or end up drilling a hole that was too big for the screws. &lt;br /&gt;&lt;br /&gt;Finally I got hold of some screws designed for metal, and the whole job was done properly in literally less than five minutes.&lt;br /&gt;&lt;br /&gt;The lesson that was reinforced to me is that using a whole bunch of good tools doesn't come anywhere near the efficiency of choosing the one correct tool for the job.&lt;br /&gt;&lt;br /&gt;I get this feeling when writing web applications too. For a basic Java Enterprise Web App, I typically choose a set of technologies like this:&lt;br /&gt;&lt;br /&gt;- A templating language (e.g. Freemarker, Velocity)&lt;br /&gt;- Javascript&lt;br /&gt;- HTML&lt;br /&gt;- A Javascript framework (e.g. jQuery, Prototype)&lt;br /&gt;- Some sort of Widget Library (e.g. jQueryUI, Scriptaculous)&lt;br /&gt;- CSS&lt;br /&gt;- Spring MVC&lt;br /&gt;&lt;br /&gt;This list is extremely abbreviated of course, as anyone involved with Java Web Development will know. The entire list of technologies is probably triple or quadruple that length.&lt;br /&gt;&lt;br /&gt;But these are the core technologies used to display a web page. What bothers me is that the first FIVE of these end up in one file! I end up using 5 tools to accomplish the single goal of displaying the web page.&lt;br /&gt;&lt;br /&gt;This is incredibly difficult to read and understand, especially considering that the technologies are fundamentally different. Some of the code is evaluated on the server side, and some on the client side, some before the page loads and some after the page loads, and yet the code is all mashed up together. Code generating code that generates code that generates code for multiple browsera to interpret.&lt;br /&gt;&lt;br /&gt;Even though this approach works, it still feels like I'm trying to use woodscrews in a metal gate.&lt;br /&gt;&lt;br /&gt;Server side templating seems like the wrong way to do things. I think we need to focus more on client side development toolkits - RESTful services and some better Javascript and Ajax Tools could completely replace our current web frameworks, but I just don't think the tools exist yet. Maybe the entire MVC model could be pushed down into javascript on the client side. Or maybe we could have some better abstractions or DSLs for browser control beyond HTML and javascript.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/616578738157248728-3169858476876439792?l=justsomejavaguy.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JustSomeJavaGuy/~4/_hdmNytUuRE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://justsomejavaguy.blogspot.com/feeds/3169858476876439792/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=616578738157248728&amp;postID=3169858476876439792" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/616578738157248728/posts/default/3169858476876439792?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/616578738157248728/posts/default/3169858476876439792?v=2" /><link rel="alternate" type="text/html" href="http://justsomejavaguy.blogspot.com/2009/11/toolin-around-with-web-applications.html" title="Toolin' around with web applications" /><author><name>Daniel Alexiuc</name><uri>http://www.blogger.com/profile/00317061160046734390</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="14472508167692382477" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry><entry gd:etag="W/&quot;D0EGSXk_fCp7ImA9WxNbFE8.&quot;"><id>tag:blogger.com,1999:blog-616578738157248728.post-5726643272826465349</id><published>2009-11-17T12:33:00.002+10:00</published><updated>2009-11-17T12:40:28.744+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-17T12:40:28.744+10:00</app:edited><title>Dumb analogies in the news</title><content type="html">This just in:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;IBM has created the world's largest business computing "cloud" capable of holding the equivalent of 250 billion iTunes songs. &lt;br /&gt;...&lt;br /&gt;If that amount of information were in the form of text stuffed into four-drawer file cabinets, there would be enough of them to ring the planet, according to IBM.&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Are those analogies really useful? Does IBM really think we are impressed by such a nonsensical comparison?&lt;br /&gt;&lt;br /&gt;I enjoyed &lt;a href="http://www.physorg.com/profile/user/x646d63"&gt;x646d63&lt;/a&gt;'s take on it:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;Storage capacity: 250 billion iTunes songs&lt;br /&gt;Computing capacity: 800M Chimp-Mensa Candidates&lt;br /&gt;Physical size of network: 300,000 slightly above average elephant toes&lt;br /&gt;Electric consumption: 3.6M 60Hz gerbil wheels&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/616578738157248728-5726643272826465349?l=justsomejavaguy.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JustSomeJavaGuy/~4/spBz80IHYcw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://justsomejavaguy.blogspot.com/feeds/5726643272826465349/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=616578738157248728&amp;postID=5726643272826465349" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/616578738157248728/posts/default/5726643272826465349?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/616578738157248728/posts/default/5726643272826465349?v=2" /><link rel="alternate" type="text/html" href="http://justsomejavaguy.blogspot.com/2009/11/dumb-analogies-in-news.html" title="Dumb analogies in the news" /><author><name>Daniel Alexiuc</name><uri>http://www.blogger.com/profile/00317061160046734390</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="14472508167692382477" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry><entry gd:etag="W/&quot;D0EESXc_fCp7ImA9WxNUEUk.&quot;"><id>tag:blogger.com,1999:blog-616578738157248728.post-1913550428410819420</id><published>2009-11-02T17:05:00.002+10:00</published><updated>2009-11-02T17:06:48.944+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-02T17:06:48.944+10:00</app:edited><title>It's funny cause it's true</title><content type="html">“The problem with object-oriented languages is they’ve got all this implicit environment that they carry around with them. You wanted a banana but what you got was a gorilla holding the banana and the entire jungle.”—Joe Armstrong&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/616578738157248728-1913550428410819420?l=justsomejavaguy.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JustSomeJavaGuy/~4/jkCWNwg-vXg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://justsomejavaguy.blogspot.com/feeds/1913550428410819420/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=616578738157248728&amp;postID=1913550428410819420" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/616578738157248728/posts/default/1913550428410819420?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/616578738157248728/posts/default/1913550428410819420?v=2" /><link rel="alternate" type="text/html" href="http://justsomejavaguy.blogspot.com/2009/11/its-funny-cause-its-true.html" title="It's funny cause it's true" /><author><name>Daniel Alexiuc</name><uri>http://www.blogger.com/profile/00317061160046734390</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="14472508167692382477" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry><entry gd:etag="W/&quot;CkcCQXw_eip7ImA9WxNVFU8.&quot;"><id>tag:blogger.com,1999:blog-616578738157248728.post-6666955079799021666</id><published>2009-10-26T11:18:00.001+10:00</published><updated>2009-10-26T11:21:00.242+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-26T11:21:00.242+10:00</app:edited><title>Dependency Injection Makes Your Code Worse</title><content type="html">Read my article which explains why, and feel free to comment: &lt;br /&gt;&lt;br /&gt;&lt;a href="http://java.dzone.com/articles/dependency-injection-makes"&gt;http://java.dzone.com/articles/dependency-injection-makes&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/616578738157248728-6666955079799021666?l=justsomejavaguy.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JustSomeJavaGuy/~4/ph4uri95nC8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://justsomejavaguy.blogspot.com/feeds/6666955079799021666/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=616578738157248728&amp;postID=6666955079799021666" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/616578738157248728/posts/default/6666955079799021666?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/616578738157248728/posts/default/6666955079799021666?v=2" /><link rel="alternate" type="text/html" href="http://justsomejavaguy.blogspot.com/2009/10/dependency-injection-makes-your-code.html" title="Dependency Injection Makes Your Code Worse" /><author><name>Daniel Alexiuc</name><uri>http://www.blogger.com/profile/00317061160046734390</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="14472508167692382477" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry><entry gd:etag="W/&quot;D0YDRXo8eCp7ImA9WxNWEk4.&quot;"><id>tag:blogger.com,1999:blog-616578738157248728.post-9135907561954637825</id><published>2009-10-11T14:08:00.005+10:00</published><updated>2009-10-11T14:26:14.470+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-11T14:26:14.470+10:00</app:edited><title>understanding monads - thanks to jQuery</title><content type="html">In my previous post I wrote about jQuery: &lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;...if you simply wrap the "this" keyword with $(), it magically somehow becomes a jQuery object...&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;I was taking a short break from watching Bathurst and googling monads again... when I came across &lt;a href="http://importantshock.wordpress.com/2009/01/18/jquery-is-a-monad/"&gt;this great blog post&lt;/a&gt;. It turns out that the magical things I love about jQuery are a monad!&lt;br /&gt;&lt;br /&gt;I feel like I'm a little bit closer to understanding monads now, and I'm happy to have a name to describe the magic I was using without knowing what it was.&lt;br /&gt;&lt;br /&gt;Go Lowndesy!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/616578738157248728-9135907561954637825?l=justsomejavaguy.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JustSomeJavaGuy/~4/uY1R9lZIszo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://justsomejavaguy.blogspot.com/feeds/9135907561954637825/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=616578738157248728&amp;postID=9135907561954637825" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/616578738157248728/posts/default/9135907561954637825?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/616578738157248728/posts/default/9135907561954637825?v=2" /><link rel="alternate" type="text/html" href="http://justsomejavaguy.blogspot.com/2009/10/understanding-monads-thanks-to-jquery.html" title="understanding monads - thanks to jQuery" /><author><name>Daniel Alexiuc</name><uri>http://www.blogger.com/profile/00317061160046734390</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="14472508167692382477" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry><entry gd:etag="W/&quot;CUUFR3wzeyp7ImA9WxNXGU0.&quot;"><id>tag:blogger.com,1999:blog-616578738157248728.post-8108260486512737577</id><published>2009-10-07T18:11:00.002+10:00</published><updated>2009-10-07T18:13:36.283+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-07T18:13:36.283+10:00</app:edited><title>jQuery - using "this" in a .each() function</title><content type="html">The "this" keyword can be used in two ways inside a jQuery callback function. If you use "this" in the callback below without putting the $() around it, you will get a reference to the HTML element selected by the $(".currency") class selector.&lt;br /&gt;&lt;br /&gt;However, if you simply wrap the "this" keyword with $(), it magically somehow becomes a jQuery object, and you can use all the regular jQuery functions on it like .text() and .val()&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;$(&amp;quot;.currency&amp;quot;).each(function() {&lt;br /&gt;   $(this).text(formatCurrency($(this).text()));&lt;br /&gt;});&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/616578738157248728-8108260486512737577?l=justsomejavaguy.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JustSomeJavaGuy/~4/jPQEo1djGIg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://justsomejavaguy.blogspot.com/feeds/8108260486512737577/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=616578738157248728&amp;postID=8108260486512737577" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/616578738157248728/posts/default/8108260486512737577?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/616578738157248728/posts/default/8108260486512737577?v=2" /><link rel="alternate" type="text/html" href="http://justsomejavaguy.blogspot.com/2009/10/jquery-using-this-in-each-function.html" title="jQuery - using &quot;this&quot; in a .each() function" /><author><name>Daniel Alexiuc</name><uri>http://www.blogger.com/profile/00317061160046734390</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="14472508167692382477" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry><entry gd:etag="W/&quot;D0EERHk5fip7ImA9WxNQGEs.&quot;"><id>tag:blogger.com,1999:blog-616578738157248728.post-1330432742732222767</id><published>2009-09-25T18:00:00.000+10:00</published><updated>2009-09-25T18:00:05.726+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-25T18:00:05.726+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="javascript" /><category scheme="http://www.blogger.com/atom/ns#" term="jQuery" /><title>How to copy a field value from a jQuery UI Dialog into a form</title><content type="html">If you have a form on your page, and would like to display a jQuery dialog which prompts for some extra data to add to the form before you submit it, here's how you can do it:&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;&amp;lt;SCRIPT language=JavaScript&amp;gt;&lt;br /&gt;    function copyValueAndSubmit() {&lt;br /&gt;        $('#popupDiv').dialog(&amp;quot;destroy&amp;quot;).appendTo(&amp;quot;#myForm&amp;quot;);&lt;br /&gt;        $(&amp;quot;#myForm&amp;quot;).submit();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    $(function() {$('#popupDiv').dialog({autoOpen: false});});&lt;br /&gt;&amp;lt;/SCRIPT&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;form id=&amp;quot;myForm&amp;quot; name=&amp;quot;myForm&amp;quot;&amp;gt;&lt;br /&gt;    &amp;lt;input id=&amp;quot;field1&amp;quot;/&amp;gt;&lt;br /&gt;    &amp;lt;input id=&amp;quot;field2&amp;quot;/&amp;gt;&lt;br /&gt;    &amp;lt;button type=&amp;quot;button&amp;quot; onclick=&amp;quot;$('#popupDiv').dialog('open');&amp;quot;&amp;gt;Save&amp;lt;/button&amp;gt;&lt;br /&gt;&amp;lt;/form&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;div style=&amp;quot;visibility:hidden;&amp;quot;&amp;gt;&lt;br /&gt;    &amp;lt;div id=&amp;quot;popupDiv&amp;quot;&amp;gt;&lt;br /&gt;        &amp;lt;input id=&amp;quot;field3&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;button type=&amp;quot;button&amp;quot; onclick=&amp;quot;copyValueAndSubmit();&amp;quot;&amp;gt;Submit&amp;lt;/button&amp;gt;&lt;br /&gt;    &amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Basically, the &lt;pre&gt;.dialog("destroy").appendTo("#myForm")&lt;/pre&gt; call allows you to grab whatever was in the popup dialog and append it to the form on your page before it gets submitted.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/616578738157248728-1330432742732222767?l=justsomejavaguy.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JustSomeJavaGuy/~4/7FnsZi_Vd6w" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://justsomejavaguy.blogspot.com/feeds/1330432742732222767/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=616578738157248728&amp;postID=1330432742732222767" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/616578738157248728/posts/default/1330432742732222767?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/616578738157248728/posts/default/1330432742732222767?v=2" /><link rel="alternate" type="text/html" href="http://justsomejavaguy.blogspot.com/2009/09/how-to-copy-field-value-from-jquery-ui.html" title="How to copy a field value from a jQuery UI Dialog into a form" /><author><name>Daniel Alexiuc</name><uri>http://www.blogger.com/profile/00317061160046734390</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="14472508167692382477" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry><entry gd:etag="W/&quot;D0UGQnc5fip7ImA9WxNQGEk.&quot;"><id>tag:blogger.com,1999:blog-616578738157248728.post-663464464668689138</id><published>2009-09-25T12:18:00.001+10:00</published><updated>2009-09-25T12:20:23.926+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-25T12:20:23.926+10:00</app:edited><title>No wonder Apple is concerned about Google's iPhone apps</title><content type="html">I just got my &lt;a href="http://justsomejavaguy.blogspot.com/2009/09/will-it-float-iphone-3gs-edition.html"&gt;replacement&lt;/a&gt; iPhone and it seemed to vibrate randomly. I thought maybe there was a problem with it - but it turns out Google has just enabled push email!&lt;br /&gt;&lt;br /&gt;I am extremely impressed with Google. Push Gmail is free and awesome, their calendar support and integration with the iPhone is awesome (including multiple calendars), and it all works with Google Apps for your own Domain as well.&lt;br /&gt;&lt;br /&gt;I think Google just killed MobileMe.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/616578738157248728-663464464668689138?l=justsomejavaguy.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JustSomeJavaGuy/~4/NIsZJwGlg1Q" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://justsomejavaguy.blogspot.com/feeds/663464464668689138/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=616578738157248728&amp;postID=663464464668689138" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/616578738157248728/posts/default/663464464668689138?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/616578738157248728/posts/default/663464464668689138?v=2" /><link rel="alternate" type="text/html" href="http://justsomejavaguy.blogspot.com/2009/09/no-wonder-apple-is-concerned-about.html" title="No wonder Apple is concerned about Google's iPhone apps" /><author><name>Daniel Alexiuc</name><uri>http://www.blogger.com/profile/00317061160046734390</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="14472508167692382477" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry><entry gd:etag="W/&quot;DkMER34yfCp7ImA9WxNQEUo.&quot;"><id>tag:blogger.com,1999:blog-616578738157248728.post-1128007913067653096</id><published>2009-09-17T17:54:00.004+10:00</published><updated>2009-09-17T18:00:06.094+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-17T18:00:06.094+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="java" /><category scheme="http://www.blogger.com/atom/ns#" term="mvc" /><category scheme="http://www.blogger.com/atom/ns#" term="spring" /><category scheme="http://www.blogger.com/atom/ns#" term="annotations" /><title>How to determine the type of Request with Spring MVC's @InitBinder</title><content type="html">If you want to determine the request method of a request (i.e."POST", "GET" etc) in Spring MVC, using a SimpleFormController you could just call  isFormSubmission(). When using annotations, the @RequestMapping annotation gives you that functionality for free in the annotation parameters.&lt;br /&gt;&lt;br /&gt;If you want to achieve the same thing on a method annotated with @InitBinder, the same does not apply. However, you can simply do this:&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;&lt;br /&gt;@InitBinder&lt;br /&gt;public void initBinder(HttpServletRequest request) {&lt;br /&gt;    if (&amp;quot;POST&amp;quot;.equals(request.getMethod()){&lt;br /&gt;        //Do something&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Why would you want to know the type of request in an @InitBinder method? Stay tuned to find out one pretty cool application.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/616578738157248728-1128007913067653096?l=justsomejavaguy.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JustSomeJavaGuy/~4/Oin14-REvyI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://justsomejavaguy.blogspot.com/feeds/1128007913067653096/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=616578738157248728&amp;postID=1128007913067653096" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/616578738157248728/posts/default/1128007913067653096?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/616578738157248728/posts/default/1128007913067653096?v=2" /><link rel="alternate" type="text/html" href="http://justsomejavaguy.blogspot.com/2009/09/how-to-determine-type-of-request-with.html" title="How to determine the type of Request with Spring MVC's @InitBinder" /><author><name>Daniel Alexiuc</name><uri>http://www.blogger.com/profile/00317061160046734390</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="14472508167692382477" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry><entry gd:etag="W/&quot;A0EDR30_fip7ImA9WxNQEEU.&quot;"><id>tag:blogger.com,1999:blog-616578738157248728.post-9055748973850696621</id><published>2009-09-16T18:13:00.003+10:00</published><updated>2009-09-16T18:27:56.346+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-16T18:27:56.346+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="java" /><category scheme="http://www.blogger.com/atom/ns#" term="hibernate" /><category scheme="http://www.blogger.com/atom/ns#" term="jpa" /><category scheme="http://www.blogger.com/atom/ns#" term="oracle" /><title>Hibernate's "DELETE_ORPHAN" and a DataIntegrityViolationException</title><content type="html">Suppose you have DELETE_ORPHAN set on a parent child relationship like this:&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;class Parent {&lt;br /&gt;    private List&amp;lt;Child&amp;gt; children = new ArrayList&amp;lt;Child&amp;gt;();&lt;br /&gt;&lt;br /&gt;    @OneToMany(cascade = CascadeType.ALL)&lt;br /&gt;    @Cascade({org.hibernate.annotations.CascadeType.DELETE_ORPHAN})&lt;br /&gt;    @JoinColumn(name = &amp;quot;ID&amp;quot;, nullable = false)&lt;br /&gt;    @IndexColumn(name = &amp;quot;INDEX&amp;quot;)&lt;br /&gt;    public List&amp;lt;BulkAmendmentCashflow&amp;gt; getBulkAmendmentCashflows() {&lt;br /&gt;        return bulkAmendmentCashflows;&lt;br /&gt;    }&lt;br /&gt;    ...&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;If your friendly Database Administrator (DBA) has set a unique database constraint on the "ID" and "INDEX" columns of your Oracle database, then under certain conditions you will get this sort of error:&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;org.springframework.dao.DataIntegrityViolationException:&lt;br /&gt;...&lt;br /&gt;Caused by: java.sql.BatchUpdateException: ORA-00001: unique constraint (DB_NAME.UNIQUE_CONSTRAINT_NAME) violated&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;It usually occurs when you are both adding a new child and deleting an old child in the same transaction. &lt;br /&gt;&lt;br /&gt;I haven't fully investigated the cause of this in detail, but it seems likely to me that Hibernate is adding the new row before it deletes the old row. The new row gets the same INDEX as the row being deleted, so that the INDEX is kept in numeric order. Even though the transaction hasn't been completed, Oracle registers this as a violation of the constraint. &lt;br /&gt;&lt;br /&gt;There is an easy fix which keeps everyone happy (and the DBA can still keep their precious constraint!).&lt;br /&gt;&lt;br /&gt;The DBA needs to enable deferred constraints in Oracle on the constraint like this:&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;&lt;br /&gt;alter table TABLE_NAME drop constraint CONSTRAINT_NAME;&lt;br /&gt;alter table TABLE_NAME add constraint CONSTRAINT_NAME UNIQUE (ID, INDEX) DEFERRABLE INITIALLY DEFERRED;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/616578738157248728-9055748973850696621?l=justsomejavaguy.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JustSomeJavaGuy/~4/rsbhx-3iL3I" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://justsomejavaguy.blogspot.com/feeds/9055748973850696621/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=616578738157248728&amp;postID=9055748973850696621" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/616578738157248728/posts/default/9055748973850696621?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/616578738157248728/posts/default/9055748973850696621?v=2" /><link rel="alternate" type="text/html" href="http://justsomejavaguy.blogspot.com/2009/09/hibernates-deleteorphan-and.html" title="Hibernate's &quot;DELETE_ORPHAN&quot; and a DataIntegrityViolationException" /><author><name>Daniel Alexiuc</name><uri>http://www.blogger.com/profile/00317061160046734390</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="14472508167692382477" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry><entry gd:etag="W/&quot;A0ABQ387cCp7ImA9WxNQEEU.&quot;"><id>tag:blogger.com,1999:blog-616578738157248728.post-8846017684943237588</id><published>2009-09-14T18:26:00.003+10:00</published><updated>2009-09-16T18:29:12.108+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-16T18:29:12.108+10:00</app:edited><title>Will it float? (iPhone 3GS edition)</title><content type="html">The Hi-Ho girls say: No.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_H9tXH4aTj8g/Sq4Bw7MNJVI/AAAAAAAAAGs/zX4SD4bGQKk/s1600-h/lettermanhdxpp5.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 223px;" src="http://1.bp.blogspot.com/_H9tXH4aTj8g/Sq4Bw7MNJVI/AAAAAAAAAGs/zX4SD4bGQKk/s400/lettermanhdxpp5.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5381240544788555090" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;If your iPhone ends up in a swimming pool somehow like mine did, I recommend getting a vacuum cleaner onto it immediately. Pop out the sim card and suck from both ends - this is the best way to get the water out quickly.&lt;br /&gt;&lt;br /&gt;Do not use a hair dryer, it will simply push the water into places it shouldn't go, and evaporate the water, leaving behind all kinds of nasty residue.&lt;br /&gt;&lt;br /&gt;After you have vacuumed for about 15 minutes, get some silica gel packets (or kitty litter that contains silica) and put the phone in a zip-lock bag with them for two days. You can recharge silica gel packets by putting them into the oven for 30 minutes at 105 degrees Celsius.&lt;br /&gt;&lt;br /&gt;If it still doesn't work, don't call your home and contents insurer yet. Water damage is not covered under warranty, but Apple offers something called an "Out of warranty service" for $268.95 which might be a better option. &lt;br /&gt;&lt;br /&gt;As long as your phone hasn't been smashed into a million pieces or jailbroken into oblivion, they will fix it or replace it, even if your phone has been in the water.&lt;br /&gt;&lt;br /&gt;To summarise the most important point - if your phone goes in the water, use a Vacuum Cleaner!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/616578738157248728-8846017684943237588?l=justsomejavaguy.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JustSomeJavaGuy/~4/mFaEVAnnlMU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://justsomejavaguy.blogspot.com/feeds/8846017684943237588/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=616578738157248728&amp;postID=8846017684943237588" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/616578738157248728/posts/default/8846017684943237588?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/616578738157248728/posts/default/8846017684943237588?v=2" /><link rel="alternate" type="text/html" href="http://justsomejavaguy.blogspot.com/2009/09/will-it-float-iphone-3gs-edition.html" title="Will it float? (iPhone 3GS edition)" /><author><name>Daniel Alexiuc</name><uri>http://www.blogger.com/profile/00317061160046734390</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="14472508167692382477" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_H9tXH4aTj8g/Sq4Bw7MNJVI/AAAAAAAAAGs/zX4SD4bGQKk/s72-c/lettermanhdxpp5.jpg" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry><entry gd:etag="W/&quot;Dk8NQHs7cCp7ImA9WxNSEk4.&quot;"><id>tag:blogger.com,1999:blog-616578738157248728.post-3331741303658377331</id><published>2009-08-25T18:26:00.003+10:00</published><updated>2009-08-26T07:14:51.508+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-08-26T07:14:51.508+10:00</app:edited><title>Should I use BigDecimal or Double?</title><content type="html">Here's something to keep in mind using doubles and BigDecimals. When you do this:&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;System.out.println(new BigDecimal(0.1));&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;You get this:&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;0.1000000000000000055511151231257827021181583404541015625&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Pretty weird hey!&lt;br /&gt;&lt;br /&gt;The &lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/java/math/BigDecimal.html#BigDecimal(double)"&gt;javadoc&lt;/a&gt; explains what is going on, but I'll attempt to summarise it.&lt;br /&gt;&lt;br /&gt;Basically, The weirdness is not with BigDecimal, it is with double. Doubles &lt;span style="font-style:italic;"&gt;cannot&lt;/span&gt; accurately represent most decimal fractions. &lt;br /&gt;&lt;br /&gt;Why? Because a double by definition is a representation of a number that can be stored in 64 bits of data. If we want to store a number, the only way the computer can remember it is by setting 64 individual bits to either 1 or 0. This is fine for most whole numbers.&lt;br /&gt;&lt;br /&gt;However if we want to store a &lt;span style="font-style:italic;"&gt;decimal&lt;/span&gt; fraction like 0.1 - it simply cannot be done in 64 &lt;span style="font-style:italic;"&gt;binary&lt;/span&gt; bits of data.  &lt;span style="font-style:italic;"&gt;Binary&lt;/span&gt; land doesn't really know anything about &lt;span style="font-style:italic;"&gt;decimal&lt;/span&gt; land. It's like an inhabitant of Lineland trying to understand the world of &lt;a href="http://www.ibiblio.org/eldritch/eaa/F01.HTM"&gt;Flatland&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;So to save our requested 0.1 double, the computer frantically flips those 64 ones and zeros until it gets something that is as close as possible to 0.1 - which as it turns out is 0.1000000000000000055511151231257827021181583404541015625.&lt;br /&gt;&lt;br /&gt;Then, when we use that double in BigDecimal's constructor - BigDecimal does an "exact conversion", and uses the number that is literally represented by those 64 bits.&lt;br /&gt;&lt;br /&gt;To summarise, if you care about the precision of your decimal fractions (eg. for storing currency), you should definitely be using BigDecimal. You should only be looking to use double if you know exactly why you need it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/616578738157248728-3331741303658377331?l=justsomejavaguy.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JustSomeJavaGuy/~4/OEANpDwLHxE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://justsomejavaguy.blogspot.com/feeds/3331741303658377331/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=616578738157248728&amp;postID=3331741303658377331" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/616578738157248728/posts/default/3331741303658377331?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/616578738157248728/posts/default/3331741303658377331?v=2" /><link rel="alternate" type="text/html" href="http://justsomejavaguy.blogspot.com/2009/08/should-i-use-bigdecimal-or-double.html" title="Should I use BigDecimal or Double?" /><author><name>Daniel Alexiuc</name><uri>http://www.blogger.com/profile/00317061160046734390</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="14472508167692382477" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry><entry gd:etag="W/&quot;AkAAQnc5eCp7ImA9WxNSEUU.&quot;"><id>tag:blogger.com,1999:blog-616578738157248728.post-6005592818644323231</id><published>2009-08-25T18:23:00.003+10:00</published><updated>2009-08-25T18:25:43.920+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-08-25T18:25:43.920+10:00</app:edited><title>How to automatically reload the page every 5 minutes</title><content type="html">There are a few ways to ensure that a page gets automatically refreshed - this one seems to work the best across multiple browsers.&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;&amp;lt;SCRIPT language=JavaScript&amp;gt;&lt;br /&gt;    //Refresh screen every 5 minutes.&lt;br /&gt;    setInterval('location.reload();', &amp;quot;300000&amp;quot;);&lt;br /&gt;&amp;lt;/SCRIPT&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/616578738157248728-6005592818644323231?l=justsomejavaguy.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JustSomeJavaGuy/~4/bNVCCkRp7Gc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://justsomejavaguy.blogspot.com/feeds/6005592818644323231/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=616578738157248728&amp;postID=6005592818644323231" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/616578738157248728/posts/default/6005592818644323231?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/616578738157248728/posts/default/6005592818644323231?v=2" /><link rel="alternate" type="text/html" href="http://justsomejavaguy.blogspot.com/2009/08/how-to-automatically-reload-page-every.html" title="How to automatically reload the page every 5 minutes" /><author><name>Daniel Alexiuc</name><uri>http://www.blogger.com/profile/00317061160046734390</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="14472508167692382477" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry><entry gd:etag="W/&quot;CEcEQHk5eip7ImA9WxNTFUk.&quot;"><id>tag:blogger.com,1999:blog-616578738157248728.post-1319473428363788921</id><published>2009-08-18T06:43:00.002+10:00</published><updated>2009-08-18T06:46:41.722+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-08-18T06:46:41.722+10:00</app:edited><title>Formatting source code on Blogger</title><content type="html">One would think that being owned by Google now, Blogger would have made SOME improvements. I haven't seen anything yet - and one thing that is sorely missing is the ability to easily format source code.&lt;br /&gt;&lt;br /&gt;Here is what I use for now:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://formatmysourcecode.blogspot.com/ "&gt;http://formatmysourcecode.blogspot.com/ &lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/616578738157248728-1319473428363788921?l=justsomejavaguy.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JustSomeJavaGuy/~4/vvBAvrbNDko" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://justsomejavaguy.blogspot.com/feeds/1319473428363788921/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=616578738157248728&amp;postID=1319473428363788921" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/616578738157248728/posts/default/1319473428363788921?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/616578738157248728/posts/default/1319473428363788921?v=2" /><link rel="alternate" type="text/html" href="http://justsomejavaguy.blogspot.com/2009/08/formatting-source-code-on-blogger.html" title="Formatting source code on Blogger" /><author><name>Daniel Alexiuc</name><uri>http://www.blogger.com/profile/00317061160046734390</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="14472508167692382477" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total></entry><entry gd:etag="W/&quot;AkIFRno7fyp7ImA9WxNTFEQ.&quot;"><id>tag:blogger.com,1999:blog-616578738157248728.post-7103314878409084849</id><published>2009-08-17T18:38:00.004+10:00</published><updated>2009-08-17T18:41:57.407+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-08-17T18:41:57.407+10:00</app:edited><title>A single form checkbox macro for Freemarker and Spring</title><content type="html">If you want to use Freemarker in your SpringMVC project, Spring comes with a limited amount of macros in the file spring.ftl.&lt;br /&gt;&lt;br /&gt;One macro noteworthy for its absence is a macro to display a single checkbox. I've seen various snippets of example code around the web on how to do this, but all of them seemed to be deficient in either error handling or binding. Here's a macro that works!&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;&amp;lt;#macro formCheckbox path attributes=&amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;    &amp;lt;@spring.bind path /&amp;gt;&lt;br /&gt;    &amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;_${spring.status.expression}&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;    &amp;lt;input type=&amp;quot;checkbox&amp;quot; id=&amp;quot;${spring.status.expression}&amp;quot; name=&amp;quot;${spring.status.expression}&amp;quot;&lt;br /&gt;           &amp;lt;#if spring.status.value?? &amp;amp;&amp;amp; spring.status.value?string==&amp;quot;true&amp;quot;&amp;gt;checked=&amp;quot;true&amp;quot;&amp;lt;/#if&amp;gt;&lt;br /&gt;    ${attributes}&lt;br /&gt;    &amp;lt;@spring.closeTag/&amp;gt;&lt;br /&gt;&amp;lt;/#macro&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/616578738157248728-7103314878409084849?l=justsomejavaguy.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JustSomeJavaGuy/~4/-T2VgZR5Zlg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://justsomejavaguy.blogspot.com/feeds/7103314878409084849/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=616578738157248728&amp;postID=7103314878409084849" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/616578738157248728/posts/default/7103314878409084849?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/616578738157248728/posts/default/7103314878409084849?v=2" /><link rel="alternate" type="text/html" href="http://justsomejavaguy.blogspot.com/2009/08/single-form-checkbox-macro-for.html" title="A single form checkbox macro for Freemarker and Spring" /><author><name>Daniel Alexiuc</name><uri>http://www.blogger.com/profile/00317061160046734390</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="14472508167692382477" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry><entry gd:etag="W/&quot;DkYBSH4-fSp7ImA9WxJUE08.&quot;"><id>tag:blogger.com,1999:blog-616578738157248728.post-7296827497289366514</id><published>2009-07-12T00:50:00.002+10:00</published><updated>2009-07-12T00:55:59.055+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-07-12T00:55:59.055+10:00</app:edited><title>How to modify http headers in Internet Explorer</title><content type="html">When developing for the web, you may want to simulate various HTTP Header values for your application. This is easy in Firefox - there are a number of plugins that allow you to do this like &lt;a href="https://addons.mozilla.org/en-US/firefox/addon/967"&gt;Modify Headers&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;However for IE6 it is more difficult. The best solution I have found is this one:&lt;br /&gt;&lt;br /&gt;- Download &lt;a href="http://www.fiddler2.com/Fiddler2/version.asp"&gt;Fiddler&lt;/a&gt;.&lt;br /&gt;- Open the 'Customize Rules' window (Rules-&gt;Customize Rules...)&lt;br /&gt;- find this function: static function OnBeforeRequest(oSession: Session)&lt;br /&gt;- inside this function, add the header values that you would like to add, in this format:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;oSession.oRequest["headerName"] = "headerValue";&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;-save&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Voilà! Internet Explorer will now accept your custom header values. You will probably need to clear your browser cookies before it takes effect.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/616578738157248728-7296827497289366514?l=justsomejavaguy.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JustSomeJavaGuy/~4/bSVoFq7_fBs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://justsomejavaguy.blogspot.com/feeds/7296827497289366514/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=616578738157248728&amp;postID=7296827497289366514" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/616578738157248728/posts/default/7296827497289366514?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/616578738157248728/posts/default/7296827497289366514?v=2" /><link rel="alternate" type="text/html" href="http://justsomejavaguy.blogspot.com/2009/07/how-to-modify-http-headers-in-internet.html" title="How to modify http headers in Internet Explorer" /><author><name>Daniel Alexiuc</name><uri>http://www.blogger.com/profile/00317061160046734390</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="14472508167692382477" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">4</thr:total></entry><entry gd:etag="W/&quot;A0EBQHs7fyp7ImA9WxJVE00.&quot;"><id>tag:blogger.com,1999:blog-616578738157248728.post-3369770800372030282</id><published>2009-06-30T07:05:00.003+10:00</published><updated>2009-06-30T07:07:31.507+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-06-30T07:07:31.507+10:00</app:edited><title>How to enable internet tethering (phone as modem) for iPhone 3GS on Australia's Three network</title><content type="html">Go Here:&lt;br /&gt;&lt;br /&gt;http://andrew.harrison.org/notes/3-tethering-and-mms/using-your-iphone-on-3/&lt;br /&gt;&lt;br /&gt;Follow the instructions in section 3 - "Enable tethering and MMS".&lt;br /&gt;&lt;br /&gt;I've done this and it works beautifully on a Windows machine.&lt;br /&gt;&lt;br /&gt;Then:&lt;br /&gt;&lt;br /&gt;Pair your iphone with windows in:&lt;br /&gt;Start -&gt; Control Panel -&gt; Bluetooth devices.&lt;br /&gt;&lt;br /&gt;Once it has been paired, you can connect to the internet simply by going to:&lt;br /&gt;Start -&gt; Connect to -&gt; Bluetooth network connection&lt;br /&gt;&lt;br /&gt;The iphone will appear in here as an access point.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/616578738157248728-3369770800372030282?l=justsomejavaguy.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JustSomeJavaGuy/~4/aPE3K8OXmHc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://justsomejavaguy.blogspot.com/feeds/3369770800372030282/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=616578738157248728&amp;postID=3369770800372030282" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/616578738157248728/posts/default/3369770800372030282?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/616578738157248728/posts/default/3369770800372030282?v=2" /><link rel="alternate" type="text/html" href="http://justsomejavaguy.blogspot.com/2009/06/how-to-enable-internet-tethering-phone.html" title="How to enable internet tethering (phone as modem) for iPhone 3GS on Australia's Three network" /><author><name>Daniel Alexiuc</name><uri>http://www.blogger.com/profile/00317061160046734390</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="14472508167692382477" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry><entry gd:etag="W/&quot;A0MDQnYyfSp7ImA9WxJVE00.&quot;"><id>tag:blogger.com,1999:blog-616578738157248728.post-3219172537782479099</id><published>2009-06-30T06:58:00.003+10:00</published><updated>2009-06-30T07:04:33.895+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-06-30T07:04:33.895+10:00</app:edited><title>How to update page text using javascript (and prototype)</title><content type="html">&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;$('blah').innerHTML = '${valueToSet}';&lt;br /&gt;&amp;lt;label id=&amp;quot;blah&amp;quot;/&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Note: .innerText only works in IE.&lt;br /&gt;&lt;br /&gt;And if you want to display end-of-line characters correctly, for example, if the data has been entered using a textfield (using Freemarker and prototype)&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;$('commentsView').innerHTML = '${closeout.comments!&amp;quot;&amp;quot;?js_string}'; &lt;br /&gt;&amp;lt;label id=&amp;quot;commentsView&amp;quot;/&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/616578738157248728-3219172537782479099?l=justsomejavaguy.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JustSomeJavaGuy/~4/ITNZ4lkwQ2k" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://justsomejavaguy.blogspot.com/feeds/3219172537782479099/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=616578738157248728&amp;postID=3219172537782479099" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/616578738157248728/posts/default/3219172537782479099?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/616578738157248728/posts/default/3219172537782479099?v=2" /><link rel="alternate" type="text/html" href="http://justsomejavaguy.blogspot.com/2009/06/how-to-update-page-text-using.html" title="How to update page text using javascript (and prototype)" /><author><name>Daniel Alexiuc</name><uri>http://www.blogger.com/profile/00317061160046734390</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="14472508167692382477" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry><entry gd:etag="W/&quot;DE8EQnY-fCp7ImA9WxJWEUU.&quot;"><id>tag:blogger.com,1999:blog-616578738157248728.post-8784920799059175018</id><published>2009-06-17T06:46:00.004+10:00</published><updated>2009-06-17T07:13:23.854+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-06-17T07:13:23.854+10:00</app:edited><title>13" Macbook Pro vs Vaio : Initial Hardware Impressions</title><content type="html">I just took delivery of a 13" Macbook Pro, after being a long time 13" Vaio user. Here are my initial impressions of the hardware, divided into WIN and FAIL Categories. I'll start with fail, because that is the most fun.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;FAILZ&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;High Gloss Screen == FAIL&lt;br /&gt;There's no question - it is too glossy. UQ has issued a &lt;a href="http://www.hrd.qut.edu.au/healthsafety/worksafely/highGloss.jsp"&gt;health and safety warning&lt;/a&gt; for it.&lt;br /&gt;&lt;br /&gt;Missing keys == FAIL&lt;br /&gt;No Home, End, Page Up, Page Down and Delete keys? What were they thinking? There's plenty of room to put them in, I guess I'll have to adjust my habits somehow - anyone know what mac users do to make up for these keys?&lt;br /&gt;&lt;br /&gt;Sharp wrist rest == FAIL&lt;br /&gt;The front lip of the macbook (when open) is a machined 90 degree angle, and is about as sharp a 90 degree angle as I have ever seen. When I'm lounging on my couch, this is where the heel of my hands rests (and rubs against). Painful! Yeah apple it makes the laptop look cool when it is closed, but this is one sacrifice of form over function that you shouldn't have taken.&lt;br /&gt;&lt;br /&gt;Click anywhere trackpad == FAIL&lt;br /&gt;I'm pretty sure I read somewhere that you can click anywhere on the oversized trackpad. Well you can't - you can click in about the bottom third of the trackpad, any higher than that the clicking action progressively diminishes into no click at all. &lt;br /&gt;&lt;br /&gt;Glowing Apple Logo == FAIL&lt;br /&gt;This is something I'd like to turn off. I don't consider myself an apple fanboy, and having that glowing apple log on the bus is embarrassing,&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;WINZ&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Backlit Keyboard == WIN&lt;br /&gt;It is very well designed, has nice keys and the backlighting is great at night. I still think they could have made the keys bigger though - my old Vaio managed to have full size keys with the same overall width.&lt;br /&gt;&lt;br /&gt;Stylish == WIN&lt;br /&gt;It's a beautiful machine, the aluminium and glass just looks superb. What amazed me is that when you turn it over - the bottom is just flat aluminium. They've managed to hide all the ugly bits very well.&lt;br /&gt;&lt;br /&gt;External Buttons, Lights, Plugs == WIN&lt;br /&gt;Superbly designed - hidden notification lights, a built in battery indicator on the side and the thing feels REALLY solid. It makes a precision 'thunk' when you close it like nothing I've ever heard.&lt;br /&gt;&lt;br /&gt;Oversize trackpad == WIN&lt;br /&gt;Nice and sensitive - almost as good as a Vaio. My tap to click occasionally doesn't register, but perhaps I just need to adjust my tap a little bit. The large size of the trackpad is brilliant too - why doesn't everyone make them this size?&lt;br /&gt;&lt;br /&gt;Low Weight == WIN&lt;br /&gt;It feels a LOT lighter than my Vaio - especially when in my back pack.&lt;br /&gt;&lt;br /&gt;Sound == WIN&lt;br /&gt;The speakers are hidden somewhere - (in front of the keyboard I think?) and they are excellent.  The sound is stereo, it goes loud, and it is directed towards me, which the Vaio was notoriously lacking in.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/616578738157248728-8784920799059175018?l=justsomejavaguy.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JustSomeJavaGuy/~4/nqtcKMnYqlE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://justsomejavaguy.blogspot.com/feeds/8784920799059175018/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=616578738157248728&amp;postID=8784920799059175018" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/616578738157248728/posts/default/8784920799059175018?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/616578738157248728/posts/default/8784920799059175018?v=2" /><link rel="alternate" type="text/html" href="http://justsomejavaguy.blogspot.com/2009/06/13-macbook-pro-vs-vaio-initial-hardware.html" title="13&quot; Macbook Pro vs Vaio : Initial Hardware Impressions" /><author><name>Daniel Alexiuc</name><uri>http://www.blogger.com/profile/00317061160046734390</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="14472508167692382477" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total></entry><entry gd:etag="W/&quot;CEEHQXk5eyp7ImA9WxJXEUQ.&quot;"><id>tag:blogger.com,1999:blog-616578738157248728.post-2590905173753309718</id><published>2009-06-05T19:01:00.001+10:00</published><updated>2009-06-05T19:03:50.723+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-06-05T19:03:50.723+10:00</app:edited><title>Maven jetty plugin can't find applicationContext.xml?</title><content type="html">If you get this error, in your web.xml you need to be explicit about the location of your applicationContext.xml (even if you have a Spring ContextLoaderListener defined).&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;&amp;lt;context-param&amp;gt;&lt;br /&gt;        &amp;lt;param-name&amp;gt;contextConfigLocation&amp;lt;/param-name&amp;gt;&lt;br /&gt;        &amp;lt;param-value&amp;gt;classpath:applicationContext.xml&amp;lt;/param-value&amp;gt;&lt;br /&gt; &amp;lt;/context-param&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;I would have thought that being a maven-jetty-plugin it would know where to look, but apparently it is too stoopid.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/616578738157248728-2590905173753309718?l=justsomejavaguy.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JustSomeJavaGuy/~4/bQ5Bd_wA4A8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://justsomejavaguy.blogspot.com/feeds/2590905173753309718/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=616578738157248728&amp;postID=2590905173753309718" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/616578738157248728/posts/default/2590905173753309718?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/616578738157248728/posts/default/2590905173753309718?v=2" /><link rel="alternate" type="text/html" href="http://justsomejavaguy.blogspot.com/2009/06/maven-jetty-plugin-cant-find.html" title="Maven jetty plugin can't find applicationContext.xml?" /><author><name>Daniel Alexiuc</name><uri>http://www.blogger.com/profile/00317061160046734390</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="14472508167692382477" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry><entry gd:etag="W/&quot;C04AQHo_cSp7ImA9WxJQFUU.&quot;"><id>tag:blogger.com,1999:blog-616578738157248728.post-3987752174872689289</id><published>2009-05-29T17:23:00.001+10:00</published><updated>2009-05-29T17:25:41.449+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-29T17:25:41.449+10:00</app:edited><title>How not to inspire your team to achieve greatness</title><content type="html">Today the data team leader sent out an email to the entire IT team that was only two paragraphs long, and yet managed to cram in all of the following phrases:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;"governance imperative"&lt;/li&gt;&lt;li&gt;"business initiative"&lt;/li&gt;&lt;li&gt;"management-driven"&lt;/li&gt;&lt;li&gt;"critical success factor"&lt;/li&gt;&lt;li&gt;"proactively"&lt;/li&gt;&lt;li&gt;"process and control"&lt;/li&gt;&lt;li&gt;"integrated, consolidated, improved"&lt;/li&gt;&lt;li&gt;"cross functional"&lt;/li&gt;&lt;li&gt;"fuels that power the modern corporation"&lt;/li&gt;&lt;li&gt;"mired in the prenatal lifecycle"&lt;/li&gt;&lt;li&gt;"need for effective collaboration"&lt;/li&gt;&lt;li&gt;"support mechanism for initiatives"&lt;/li&gt;&lt;li&gt;"effective collaborative structure for data-intense business initiatives"&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;In the words of Lisa Simpson: "Excuse me, but aren't these just buzzwords that dumb people use to sound smart?"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/616578738157248728-3987752174872689289?l=justsomejavaguy.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JustSomeJavaGuy/~4/vg4tWVr64Ms" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://justsomejavaguy.blogspot.com/feeds/3987752174872689289/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=616578738157248728&amp;postID=3987752174872689289" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/616578738157248728/posts/default/3987752174872689289?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/616578738157248728/posts/default/3987752174872689289?v=2" /><link rel="alternate" type="text/html" href="http://justsomejavaguy.blogspot.com/2009/05/how-not-to-inspire-your-team-to-achieve.html" title="How not to inspire your team to achieve greatness" /><author><name>Daniel Alexiuc</name><uri>http://www.blogger.com/profile/00317061160046734390</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="14472508167692382477" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry><entry gd:etag="W/&quot;CEUNRngzfSp7ImA9WxJQFEw.&quot;"><id>tag:blogger.com,1999:blog-616578738157248728.post-707241894812326281</id><published>2009-05-27T18:13:00.002+10:00</published><updated>2009-05-27T18:18:17.685+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-27T18:18:17.685+10:00</app:edited><title>Maven, Quartz and Spring 2.x</title><content type="html">If you have tried to use &lt;a href="http://static.springframework.org/spring/docs/2.5.x/reference/scheduling.html"&gt;scheduling&lt;/a&gt; in Spring 2.x and you are using Maven - you will probably be having trouble.&lt;br /&gt;&lt;br /&gt;In your stacktrace, you might be seeing this:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;Caused by: java.lang.NoClassDefFoundError: org/quartz/ObjectAlreadyExistsException&lt;br /&gt;    at java.lang.Class.getDeclaredConstructors0(Native Method)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;or this:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;Caused by: java.lang.NoSuchMethodError: org.apache.commons.collections.SetUtils.orderedSet(Ljava/util/Set;)Ljava/util/Set;&lt;br /&gt;    at org.quartz.JobDetail.&lt;init&gt;(JobDetail.java:85)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;It seems that the good folks over at &lt;a href="http://www.opensymphony.com"&gt;OpenSymphony&lt;/a&gt; (makers of &lt;a href="http://www.opensymphony.com/quartz/"&gt;Quartz&lt;/a&gt;) couldn't care less about Maven (I don't blame them) and making sure their pom.xml is correct (which it isn't).&lt;br /&gt;&lt;br /&gt;And Spring, which uses Quartz for scheduling, doesn't seem too concerned either about making sure that their pom.xml has the correct dependencies for Quartz (which it doesn't).&lt;br /&gt;&lt;br /&gt;The short of it is, if you want everything to just work, you'll need to explicitly include these two dependencies in your pom.xml:&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;        &amp;lt;dependency&amp;gt;&lt;br /&gt;            &amp;lt;groupid&amp;gt;opensymphony&amp;lt;/groupid&amp;gt;&lt;br /&gt;            &amp;lt;artifactid&amp;gt;quartz-all&amp;lt;/artifactid&amp;gt;&lt;br /&gt;            &amp;lt;version&amp;gt;1.6.1&amp;lt;/version&amp;gt;&lt;br /&gt;        &amp;lt;/dependency&amp;gt;&lt;br /&gt;        &amp;lt;dependency&amp;gt;&lt;br /&gt;            &amp;lt;groupid&amp;gt;commons-collections&amp;lt;/groupid&amp;gt;&lt;br /&gt;            &amp;lt;artifactid&amp;gt;commons-collections&amp;lt;/artifactid&amp;gt;&lt;br /&gt;            &amp;lt;version&amp;gt;3.2&amp;lt;/version&amp;gt;&lt;br /&gt;        &amp;lt;/dependency&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;And so, if you are in the unfortunate position of having to use Maven, I empathise. Let us weep together.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/616578738157248728-707241894812326281?l=justsomejavaguy.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JustSomeJavaGuy/~4/SkRk3yBNvBk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://justsomejavaguy.blogspot.com/feeds/707241894812326281/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=616578738157248728&amp;postID=707241894812326281" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/616578738157248728/posts/default/707241894812326281?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/616578738157248728/posts/default/707241894812326281?v=2" /><link rel="alternate" type="text/html" href="http://justsomejavaguy.blogspot.com/2009/05/maven-quartz-and-spring-2x.html" title="Maven, Quartz and Spring 2.x" /><author><name>Daniel Alexiuc</name><uri>http://www.blogger.com/profile/00317061160046734390</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="14472508167692382477" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total></entry></feed>
