<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6288641086087262491</id><updated>2012-01-01T14:05:28.010-06:00</updated><category term='mobile'/><category term='translate'/><category term='books'/><category term='kitchensink'/><category term='progressbar'/><category term='singleton'/><category term='perl'/><category term='dallas'/><category term='imaging'/><category term='droidworks'/><category term='library'/><category term='lazy'/><category term='location'/><category term='agile'/><category term='maxim'/><category term='youth'/><category term='tunewiki'/><category term='sweater'/><category term='android 2.2'/><category term='tdd'/><category term='xhtml'/><category term='brain unit testing'/><category term='i18n'/><category term='interent'/><category term='election'/><category term='java'/><category term='mysql'/><category term='personal'/><category term='php'/><category term='cpan'/><category term='politics'/><category term='programming'/><category term='tutorial'/><category term='example'/><category term='startup'/><category term='economy'/><category term='home improvement'/><category term='android AsyncTask'/><category term='IO2008'/><category term='context'/><category term='fios'/><category term='thread'/><category term='employment'/><category term='hacker'/><category term='httpclient'/><category term='gps'/><category term='webservice'/><category term='android'/><category term='restlet'/><category term='jobs'/><category term='software'/><category term='dayton'/><category term='google io fail'/><category term='angle grinder'/><category term='hackjob'/><category term='jboss'/><category term='blogging'/><category term='google'/><title type='text'>a blog called foo</title><subtitle type='html'>write code, have fun, change the world</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://foo.jasonhudgins.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6288641086087262491/posts/default/-/java'/><link rel='alternate' type='text/html' href='http://foo.jasonhudgins.com/search/label/java'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Jason</name><uri>http://www.blogger.com/profile/11854459261926460313</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/-McVhm2Wqthw/TwC8geDVEyI/AAAAAAAAAnU/z0GNbE8FdZ8/s220/standard_avatar.JPG'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>19</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6288641086087262491.post-8308885429778239051</id><published>2009-07-25T18:19:00.005-05:00</published><updated>2009-07-25T18:25:43.204-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='lazy'/><category scheme='http://www.blogger.com/atom/ns#' term='android'/><title type='text'>Blogging Again</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_sC8pULSl4lQ/SmuUDk558DI/AAAAAAAAATM/d4D2HKfdpwY/s1600-h/lazybear.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 200px; height: 150px;" src="http://1.bp.blogspot.com/_sC8pULSl4lQ/SmuUDk558DI/AAAAAAAAATM/d4D2HKfdpwY/s200/lazybear.jpg" alt="" id="BLOGGER_PHOTO_ID_5362542570481774642" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;I've been neglecting this blog for far too long, so it's time for me to get off my lazy butt and write some posts.  To kick things off I've revamped the TrivialGPS tutorial I did back in Xmas 2007.  I thought it looked trivial then, now it's really trivial, but here's a link to that old post entitled '&lt;a href="http://jasonhudgins.blogspot.com/2007/12/cruising-around-with-android.html"&gt;Crusing around with android&lt;/a&gt;'&lt;br /&gt;&lt;br /&gt;I'm also promising myself that I'll write up a new blog post every weekend.  I don't know if I'll actually be motivated enough to pull this off with all the other stuff I've got going on, but feel free to send me a scolding email if you think I'm getting too much like the above pictured bear... Rawr..&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6288641086087262491-8308885429778239051?l=foo.jasonhudgins.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6288641086087262491/posts/default/8308885429778239051'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6288641086087262491/posts/default/8308885429778239051'/><link rel='alternate' type='text/html' href='http://foo.jasonhudgins.com/2009/07/blogging-again.html' title='Blogging Again'/><author><name>Jason</name><uri>http://www.blogger.com/profile/11854459261926460313</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/-McVhm2Wqthw/TwC8geDVEyI/AAAAAAAAAnU/z0GNbE8FdZ8/s220/standard_avatar.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_sC8pULSl4lQ/SmuUDk558DI/AAAAAAAAATM/d4D2HKfdpwY/s72-c/lazybear.jpg' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-6288641086087262491.post-7376019358405904467</id><published>2008-07-26T20:06:00.004-05:00</published><updated>2010-04-03T14:59:33.799-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='agile'/><category scheme='http://www.blogger.com/atom/ns#' term='tdd'/><title type='text'>Agile Java by Jeff Langr</title><content type='html'>&lt;iframe align="left" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="http://rcm.amazon.com/e/cm?t=ablogcallefoo-20&amp;amp;o=1&amp;amp;p=8&amp;amp;l=bpl&amp;amp;asins=0131482394&amp;amp;fc1=000000&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=0000FF&amp;amp;bc1=000000&amp;amp;bg1=FFFFFF&amp;amp;f=ifr" style="height: 245px; padding-right: 10px; padding-top: 5px; width: 131px;"&gt;&lt;/iframe&gt;I finished reading &lt;a href="http://www.amazon.com/Agile-Java-TM-Test-Driven-Development/dp/0131482394/ref=pd_bbs_sr_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1217120885&amp;amp;sr=8-1"&gt;Agile Java&lt;/a&gt; by Jeff Langr several nights ago, so it's time for another book review.&lt;br /&gt;&lt;br /&gt;The aim of this book is to teach the art of java programming using &lt;a href="http://en.wikipedia.org/wiki/Test-driven_development"&gt;TDD&lt;/a&gt; (Test Driven Development), and it does so wonderfully.  I would not, however, recommend this book to a first time programmer.  If you have &lt;span style="font-weight: bold;"&gt;some&lt;/span&gt; programming experience, and would like to learn Java, then this book wouldn't be bad choice.&lt;br /&gt;&lt;br /&gt;Writing good unit tests is a skill like any other, and that's the primary reason I picked up this text.  Besides from the obvious, Jeff offers great practical advice on coding style and even naming things (the hardest thing in programming!).  The book reads like sagely advice from a battle hardened coder, he's been there, done it, and this is the distillation of what works.&lt;br /&gt;&lt;br /&gt;I'm not going to lie and say I'm disciplined enough to always use TDD, but this book helped me recognize the value of it.  Now I'm actively trying to avoid falling into my old TAD (Test After Development) habits.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6288641086087262491-7376019358405904467?l=foo.jasonhudgins.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6288641086087262491/posts/default/7376019358405904467'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6288641086087262491/posts/default/7376019358405904467'/><link rel='alternate' type='text/html' href='http://foo.jasonhudgins.com/2008/07/agile-java-by-jeff-langr.html' title='Agile Java by Jeff Langr'/><author><name>Jason</name><uri>http://www.blogger.com/profile/11854459261926460313</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/-McVhm2Wqthw/TwC8geDVEyI/AAAAAAAAAnU/z0GNbE8FdZ8/s220/standard_avatar.JPG'/></author></entry><entry><id>tag:blogger.com,1999:blog-6288641086087262491.post-4679156793730573230</id><published>2008-02-13T09:30:00.007-06:00</published><updated>2008-07-02T14:13:58.110-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='employment'/><category scheme='http://www.blogger.com/atom/ns#' term='jobs'/><title type='text'>7 years required!!!</title><content type='html'>Recently one of my favorite bloggers, Jeff Atwood, posted a piece called &lt;a href="http://www.codinghorror.com/blog/archives/001054.html"&gt;"The Years of Experience Myth"&lt;/a&gt;.  His analysis is dead on. I previously &lt;a href="http://jasonhudgins.blogspot.com/2007/07/dumb-it-hiring-managers.html"&gt;blogged&lt;/a&gt; about my aggravation when I received a recruitment email for a position that required 10 years of J2EE experience (even thought at the time, J2EE was only 8 years old).&lt;br /&gt;&lt;br /&gt;Java has evolved quite a bit since it's early releases, unlike languages such as C which has stayed pretty much the same for the last 15 years (perhaps longer, but I didn't get my first glimpse of C until 1993).   I was reminded of this recently when I  started looking at some old java code replete with vectors, hand made enumerations, and nary a Collection to be found.  That's just how it was done when this code was written.  My point is, if today you were writing the same application using Java 1.5/6 it would be done quite a bit differently.&lt;br /&gt;&lt;br /&gt;I've worked with &lt;span style="font-weight: bold;"&gt;many&lt;/span&gt; java developers that can easily claim five years of J2EE/java experience.  Frightfully, a huge chunk of them still don't understand generics, don't do any unit testing, don't know about some of Java 1.5's other features such as foreach constructs, C-style variable argument lists, annotations, etc, I could go on and on.  They  don't read about software design, they dont' code on their own time for fun, and when they are working they pound out 700+  line methods that are hellishly complicated and break quite often. What happens when Java 1.7 gets here and gives us goodies like &lt;a href="http://en.wikipedia.org/wiki/Monkey_patch"&gt; monkey patching&lt;/a&gt; and &lt;a href="http://www.javac.info/"&gt;closures&lt;/a&gt;?&lt;br /&gt;&lt;br /&gt;Despite this, if you ask any technical recruiter in the DFW metroplex, these guys are going to be regarded as "senior" java developers.  For a guy like me, that can be quite aggravating if your seeking employment.&lt;br /&gt;&lt;br /&gt;I don't claim to be the greatest developer ever, quite the contrary, I know I have a lot to learn, or as Jeff once wrote, &lt;a href="http://www.codinghorror.com/blog/archives/000530.html"&gt;try to suck less every year&lt;/a&gt;.  But one thing I can say is that I care about my craft. I decided that that if I was going to be a software engineer, that I was going to be good at it.&lt;br /&gt;&lt;br /&gt;Perhaps I'm being overly harsh, or maybe this type of thinking is just more pervasive in DFW than in other places.  I've heard on many occasions that the bay area is a much saner place for IT professionals.  Whatever may be the case, for now I've learned that the best way to find a satisfying job is to widen your social network and to become friends with as many people in your industry as possible.  Talking to recruiters and using  job boards is fine if you have to, but it's just a lot harder.  There are companies, even in DFW, where there are some pretty smart people working, but they still use shabby recruiting firms. If they would just adjust their candidate screening processes, our industry would be a lot better off.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6288641086087262491-4679156793730573230?l=foo.jasonhudgins.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://foo.jasonhudgins.com/feeds/4679156793730573230/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6288641086087262491&amp;postID=4679156793730573230' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6288641086087262491/posts/default/4679156793730573230'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6288641086087262491/posts/default/4679156793730573230'/><link rel='alternate' type='text/html' href='http://foo.jasonhudgins.com/2008/02/7-years-required.html' title='7 years required!!!'/><author><name>Jason</name><uri>http://www.blogger.com/profile/11854459261926460313</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/-McVhm2Wqthw/TwC8geDVEyI/AAAAAAAAAnU/z0GNbE8FdZ8/s220/standard_avatar.JPG'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6288641086087262491.post-7459745232674269637</id><published>2008-01-27T11:07:00.001-06:00</published><updated>2008-11-15T02:02:57.178-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='google'/><category scheme='http://www.blogger.com/atom/ns#' term='android'/><title type='text'>Android Campfire</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_sC8pULSl4lQ/R5y6brmiLsI/AAAAAAAAAKY/qgN9P3tLUAM/s1600-h/android_pic_small.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://3.bp.blogspot.com/_sC8pULSl4lQ/R5y6brmiLsI/AAAAAAAAAKY/qgN9P3tLUAM/s320/android_pic_small.jpg" alt="" id="BLOGGER_PHOTO_ID_5160204257783328450" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;The &lt;a href="http://android-developers.blogspot.com/2008/01/who-wants-cocoa-smores.html"&gt;android campfire&lt;/a&gt; was definitely worth going to. It was much more intimate than I anticipated. There couldn't have been more than 75 people there.&lt;br /&gt;&lt;br /&gt;Google takes the campfire term seriously. They had a simulated campfire, and served hot cocoa and smores from inside a tent.&lt;br /&gt;&lt;br /&gt;The first hour was a QA session. Developer advocate Dan Morrill fielded the questions.  There was a common theme throughout.  People don't want to pour resources into the platform, only to see carriers gut out parts of android that might threaten their bottom line.  Google hasn't made any such promises.  Dan stressed that distributing a crippled platform was very contrary to the spirit of the &lt;a href="http://www.openhandsetalliance.com/"&gt;OHA&lt;/a&gt;, and isn't likely to be an issue.&lt;br /&gt;&lt;br /&gt;If I ran a big shop and was paying out large gobs of cash, then I would probably be worried too.  But as a lonely independent pounding out my applications in my spare time, it costs less to make a leap of faith.&lt;br /&gt;&lt;br /&gt;After the QA we broke up and mingled for a couple hours.  Developers are natural introverts, so starting up a conversation with a random person is scary.  It is well worth it to come out of your shell though.  Everyone is very friendly once you break the ice, and you can get  valuable feedback about your ideas. That, in my mind, is the whole point of a meeting like this.&lt;br /&gt;&lt;br /&gt;A few people were secretive about their &lt;a href="http://code.google.com/android/adc.html"&gt;android challenge&lt;/a&gt; entries, but I took some good advice from &lt;a href="http://www.texasstartupblog.com/"&gt;Alex Muse&lt;/a&gt;, and was completely open.  I received a lot of great feedback, and it was very interesting to see what others were working on.  Ironically, the people who were the most secretive usually had the worst ideas.&lt;br /&gt;&lt;br /&gt;So now I'm looking forward to the code day in Boston, coming up on February 23rd.  That will be a good idea to meet even more developers, learn some stuff in a couple workshops, and of course grab more android swag.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6288641086087262491-7459745232674269637?l=foo.jasonhudgins.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://foo.jasonhudgins.com/feeds/7459745232674269637/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6288641086087262491&amp;postID=7459745232674269637' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6288641086087262491/posts/default/7459745232674269637'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6288641086087262491/posts/default/7459745232674269637'/><link rel='alternate' type='text/html' href='http://foo.jasonhudgins.com/2008/01/android-campfire.html' title='Android Campfire'/><author><name>Jason</name><uri>http://www.blogger.com/profile/11854459261926460313</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/-McVhm2Wqthw/TwC8geDVEyI/AAAAAAAAAnU/z0GNbE8FdZ8/s220/standard_avatar.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_sC8pULSl4lQ/R5y6brmiLsI/AAAAAAAAAKY/qgN9P3tLUAM/s72-c/android_pic_small.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6288641086087262491.post-2642755944218926880</id><published>2008-01-16T10:28:00.000-06:00</published><updated>2008-01-17T08:25:43.964-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='google'/><category scheme='http://www.blogger.com/atom/ns#' term='android'/><title type='text'>Have laptop, will travel...</title><content type='html'>I've been hard at work on a project for the &lt;a href="http://code.google.com/android/adc.html"&gt;android developer challenge&lt;/a&gt; since December.  I hope to submit two entries, but that all depends on how much I can get done in the next month and a half.&lt;br /&gt;&lt;br /&gt;A couple days ago, Dan Morrill announced an &lt;a href="http://android-developers.blogspot.com/2008/01/who-wants-cocoa-smores.html"&gt;Android campfire&lt;/a&gt;, on the 23rd.  I've been looking for an excuse to get my &lt;a href="http://www.amazon.com/Ogio-711109-280-Metroid-Pack-Indigo/dp/B000NDN2RM/ref=pd_bbs_1?ie=UTF8&amp;amp;s=sporting-goods&amp;amp;qid=1200503800&amp;amp;sr=8-1"&gt;new ogio backpack&lt;/a&gt; out of the closet and jump on a plane.  It will be fun to visit the googleplex again, chat about my new favorite hobby and see what kinds of cool applications everyone else is working on.&lt;br /&gt;&lt;br /&gt;I hang out on #android (freenode) and try to keep up with the developer lists, but I've yet to meet many android developers in my area (DFW).  If you are in my area and are doing anything with android, feel free to contact me.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6288641086087262491-2642755944218926880?l=foo.jasonhudgins.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://foo.jasonhudgins.com/feeds/2642755944218926880/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6288641086087262491&amp;postID=2642755944218926880' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6288641086087262491/posts/default/2642755944218926880'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6288641086087262491/posts/default/2642755944218926880'/><link rel='alternate' type='text/html' href='http://foo.jasonhudgins.com/2008/01/have-laptop-will-travel.html' title='Have laptop, will travel...'/><author><name>Jason</name><uri>http://www.blogger.com/profile/11854459261926460313</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/-McVhm2Wqthw/TwC8geDVEyI/AAAAAAAAAnU/z0GNbE8FdZ8/s220/standard_avatar.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6288641086087262491.post-9193339858780159003</id><published>2007-12-25T22:05:00.028-06:00</published><updated>2010-07-12T09:57:15.808-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='tutorial'/><category scheme='http://www.blogger.com/atom/ns#' term='android'/><title type='text'>Cruising around with Android</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.droidworks.com/images/trivial-gps.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 334px; height: 624px;" src="http://www.droidworks.com/images/trivial-gps.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Happy holidays, my fellow code slingers! For the past three weeks, I've plunged myself into the world of &lt;a href="http://developer.android.com/index.html"&gt;Android&lt;/a&gt;, the new mobile-platform SDK from our friends at Google.  I'm really excited about the possibilities of this platform.  The telephony API will be broken wide open for our fun and amusement.&lt;br /&gt;&lt;br /&gt;Do you want to sync your phone contacts to a remote data source?  No problem, use the bundled HttpClient and write a service.  Do you have a buddy that likes to drunk dial you at 3:00 a.m.? Why not have a service that can filter his calls out during certain hours.  Things like this would be hard or downright impossible in the past. Now we have Android!&lt;br /&gt;&lt;br /&gt;I thought I'd do a little tutorial showcasing the Location API that ships with android. This is definitely a fun API to play with, so allow me to introduce the TrivialGPS application.&lt;br /&gt;&lt;br /&gt;The aptly named TrivialGPS application will display a &lt;a href="http://code.google.com/android/add-ons/google-apis/reference/com/google/android/maps/MapView.html"&gt;MapView&lt;/a&gt;, and center it on our current location as we move through the bay in "real-time".  We use the observer pattern with the &lt;a href="http://code.google.com/android/reference/android/location/LocationManager.html"&gt;LocationManager&lt;/a&gt;, so our application can receive updates about changes in our current position and update the MapView accordingly.&lt;br /&gt;&lt;br /&gt;At this point, I'm going to assume that you have either looked at the Android tutorials and have at least a rudimentary understanding of the framework, or that you're so damn intelligent that you don't need to.&lt;br /&gt;&lt;br /&gt;First off, your manifest file must declare a couple of permissions for this application to work.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;INTERNET&lt;/li&gt;&lt;li&gt;ACCESS_FINE_LOCATION&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;The TrivialGPS is a single activity that displays a map, so to do this our activity must extend MapActivity.&lt;br /&gt;&lt;br /&gt;We need three member fields: The MapView which we will be displaying, a &lt;a href="http://code.google.com/android/add-ons/google-apis/reference/com/google/android/maps/MapController.html"&gt;MapController&lt;/a&gt; which can center the map, and a &lt;a href="http://code.google.com/android/reference/android/location/LocationManager.html"&gt;LocationManager&lt;/a&gt; which we can query for providers and request geo information from.&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;public class TrivialGPS extends MapActivity {&lt;br /&gt;&lt;br /&gt;private MapController mapController;&lt;br /&gt;private MapView mapView;&lt;br /&gt;private LocationManager locationManager;&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Our onCreate method starts out very simple.  We create a new MapView, set the zoom level to 22 (pretty close up, so we can see the streets), store a reference to the MapController, and then tell Android to display the map. We'll be revisiting this method a little bit later.&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;@Override&lt;br /&gt;public void onCreate(Bundle icicle) {&lt;br /&gt;super.onCreate(icicle);&lt;br /&gt;&lt;br /&gt;mapView = new MapView(this);&lt;br /&gt;mapController = mapView.getController();&lt;br /&gt;mapController.zoomTo(22);&lt;br /&gt;setContentView(mapView);&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;In order to receive notifications about location updates, we need a LocationListener&lt;a href="http://code.google.com/android/reference/android/content/IntentReceiver.html"&gt;.&lt;/a&gt;  A LocationListener is basically a callback that will be executed whenever there's a location change event.  The simplest way to do this is with an inner class. The class must implement several methods, but the onLocationChanged method is the only one that will actually do any work. Will receive the coordinates, convert them to microdegrees, int a GeoPoint instance from these, and then uses the MapController to center the view on the new point.&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;public class LocationUpdateHandler implements LocationListener {&lt;br /&gt;&lt;br /&gt;@Override&lt;br /&gt;public void onLocationChanged(Location loc) {&lt;br /&gt;int lat = (int) (loc.getLatitude()*1E6);&lt;br /&gt;int lng = (int) (loc.getLongitude()*1E6);&lt;br /&gt;GeoPoint point = new GeoPoint(lat, lng);&lt;br /&gt;mapController.setCenter(point);&lt;br /&gt;setContentView(mapView);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;@Override&lt;br /&gt;public void onProviderDisabled(String provider) {}&lt;br /&gt;&lt;br /&gt;@Override&lt;br /&gt;public void onProviderEnabled(String provider) {}&lt;br /&gt;&lt;br /&gt;@Override&lt;br /&gt;public void onStatusChanged(String provider, int status, &lt;br /&gt;Bundle extras) {}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;As promised, we now return to onCreate method.&lt;br /&gt;&lt;br /&gt;The first thing we've added is a call to initialize the LocationManager.  We do this with a simple getSystemService call.  After this we just tell the locationManager that we wish to receive continous updates (the 0,0 parameters), from the hardware GPS and pass it a reference to our LocationListener.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;public void onCreate(Bundle icicle) {&lt;br /&gt;super.onCreate(icicle);&lt;br /&gt;&lt;br /&gt;// create a map view&lt;br /&gt;mapView = new MapView(this);&lt;br /&gt;mapController = mapView.getController();&lt;br /&gt;mapController.zoomTo(22);&lt;br /&gt;setContentView(mapView);&lt;br /&gt;&lt;br /&gt;// get a hangle on the location manager&lt;br /&gt;locationManager =&lt;br /&gt;(LocationManager) getSystemService(Context.LOCATION_SERVICE);&lt;br /&gt;&lt;br /&gt;locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0,&lt;br /&gt;new LocationUpdateHandler());&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;I hope some of you can find this useful. It took me several hours to figure this stuff out and get it working in my own application, so perhaps this tutorial will be a nice time saver for some of you out there, that way you can get back to your eggnog and Xmas toys.&lt;br /&gt;&lt;br /&gt;The complete source for this tutorial is available here :&lt;br /&gt;&lt;a href="http://code.google.com/p/trivial-gps/"&gt;http://code.google.com/p/trivial-gps/&lt;/a&gt;&lt;br /&gt;or on github if you prefer:&lt;br /&gt;&lt;a href="http://github.com/jasonhudgins/TrivialGPS/tree/master"&gt;http://github.com/jasonhudgins/TrivialGPS/tree/master&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6288641086087262491-9193339858780159003?l=foo.jasonhudgins.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://foo.jasonhudgins.com/feeds/9193339858780159003/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6288641086087262491&amp;postID=9193339858780159003' title='20 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6288641086087262491/posts/default/9193339858780159003'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6288641086087262491/posts/default/9193339858780159003'/><link rel='alternate' type='text/html' href='http://foo.jasonhudgins.com/2007/12/cruising-around-with-android.html' title='Cruising around with Android'/><author><name>Jason</name><uri>http://www.blogger.com/profile/11854459261926460313</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/-McVhm2Wqthw/TwC8geDVEyI/AAAAAAAAAnU/z0GNbE8FdZ8/s220/standard_avatar.JPG'/></author><thr:total>20</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6288641086087262491.post-3457707538161959382</id><published>2007-10-30T16:10:00.000-05:00</published><updated>2007-12-25T23:22:46.125-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='google'/><category scheme='http://www.blogger.com/atom/ns#' term='translate'/><title type='text'>A Google Translate API?</title><content type='html'>I got all excited today when my favorite podcasters, the &lt;a href="http://javaposse.com/" _fcksavedurl="http://javaposse.com/"&gt;Java Posse&lt;/a&gt; announced in episode #148 that Google had released an API for their translate service.&lt;br /&gt;&lt;br /&gt;I've had my own implementation going on for several months now, and I was all ready to post that I was going to discontinue my  Google Translate Scraper.  Who wants to use a scraper when you've got a real robust interface, right?&lt;br /&gt;&lt;br /&gt;Then I looked at the code, and there is no way this is an official Google API, because it's nothing more than a &lt;a href="http://google-api-translate-java.googlecode.com/svn/trunk/src/com/google/api/translate/" _fcksavedurl="http://google-api-translate-java.googlecode.com/svn/trunk/src/com/google/api/translate/"&gt;two class scraper&lt;/a&gt; that's far more immature than &lt;a href="http://www.incantations.net/%7Ejason/software/" _fcksavedurl="http://www.incantations.net/~jason/software/"&gt;my own implementation.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;A couple of key differences between this one and mine.  MIne has some basic test coverage, this one doesn't.  My implementation will throw a TranslationException if you try to send more data than Google will process (you can't just send them an arbitrary amount of text).  My implementation includes a real XML parser so if Google radically changes their HTML structure I can can still parse it cleanly.&lt;br /&gt;&lt;br /&gt;So for now I'll keep my project going, hopefully one day Google really will release an API for their translate service.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6288641086087262491-3457707538161959382?l=foo.jasonhudgins.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://foo.jasonhudgins.com/feeds/3457707538161959382/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6288641086087262491&amp;postID=3457707538161959382' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6288641086087262491/posts/default/3457707538161959382'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6288641086087262491/posts/default/3457707538161959382'/><link rel='alternate' type='text/html' href='http://foo.jasonhudgins.com/2007/10/google-translate-api.html' title='A Google Translate API?'/><author><name>Jason</name><uri>http://www.blogger.com/profile/11854459261926460313</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/-McVhm2Wqthw/TwC8geDVEyI/AAAAAAAAAnU/z0GNbE8FdZ8/s220/standard_avatar.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6288641086087262491.post-5985867411680310184</id><published>2007-10-11T16:07:00.000-05:00</published><updated>2007-12-25T23:28:17.031-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='maxim'/><title type='text'>Return of the Coder</title><content type='html'>It feels good to get some coding done, even if it isn't a whole lot.  I've had a long hiatus for the last two months and now I'm trying to pick things up where I left off.  The reason for my absence?&lt;br /&gt;&lt;br /&gt;&lt;img alt="Maxim Alexander Hudgins" src="http://farm3.static.flickr.com/2254/1544718358_b2bf5e478d.jpg?v=0" _fcksavedurl="http://farm3.static.flickr.com/2254/1544718358_b2bf5e478d.jpg?v=0" height="500" width="333" /&gt;&lt;br /&gt;&lt;br /&gt;Maxim Alexander Hudgins (7 lbs  10 oz) was born in Aug 20th, he's my first and I'm quite proud.  In fact I hear him cooing in the background as I write this.  I know what your thinking, but no, we did not name him after a men's magazine. His name is a very old Russian name and it's pronounced "mak seam".&lt;br /&gt;&lt;br /&gt;Plenty of photos here :  &lt;a href="http://www.flickr.com/photos/jasonhudgins/tags/maxim/" _fcksavedurl="http://www.flickr.com/photos/jasonhudgins/tags/maxim/"&gt;www.flickr.com/photos/jasonhudgins/tags/maxim/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Changing the subject, almost every java developer that I know uses &lt;a href="http://www.eclipse.org/" _fcksavedurl="http://www.eclipse.org/"&gt;Eclipse&lt;/a&gt; as their primary IDE.  I listen to the &lt;a href="http://javaposse.com/" _fcksavedurl="http://javaposse.com/"&gt;javaposse&lt;/a&gt; podcast pretty religiously, and they have always said good things about &lt;a href="http://www.netbeans.org/" _fcksavedurl="http://www.netbeans.org/"&gt;NetBeans.&lt;/a&gt;  So I decided to take a serious look at it.&lt;br /&gt;&lt;br /&gt;The big thing for me is support for &lt;a href="http://maven.apache.org/" _fcksavedurl="http://maven.apache.org/"&gt;maven&lt;/a&gt;, I love it and I can't imagine not using it.  With eclipse you have two options, you can either use the internal maven plugin (mvn eclipse:* commands), to generate the project files for eclipse or you can use the &lt;a href="http://m2eclipse.codehaus.org/" _fcksavedurl="http://m2eclipse.codehaus.org/"&gt;maven eclipse plugin&lt;/a&gt;.  Bad things tend to happen if you try to use both at the same time.  Of the two I prefer the maven internal plugin, I've only experienced grief with the eclipse plugin.&lt;br /&gt;&lt;br /&gt;Getting maven to integrate cleanly with WTP in eclipse for developing web apps was a painful experience for me.  For one thing, you can't use the newest version of eclipse, europa,  because the maven internal plugin doesn't yet support WTP 2.0 yet  Even using 3.2.2 it seems like I was always having to much around .classpath and try to get things to work.&lt;br /&gt;&lt;br /&gt;There is also a maven plugin for NetBeans, it's called &lt;a href="http://mevenide.codehaus.org/m2-site/index.html" _fcksavedurl="http://mevenide.codehaus.org/m2-site/index.html"&gt;mavenide&lt;/a&gt;.  It also comes from CodeHaus, the makers of the eclipse plugin.  After installing the plugin and opening one of my maven projects, I was immediately aware that mavenide has a very tight integration with the NetBeans platform.  It's features are very well organized, and I have yet to do any mucking with config files, everything is just working, and I'm very happy.  The webapp support is really great.  NetBeans 6 is looking good too, but the maven support wasn't quite up to par, so I'm still using 5.5 at the moment.  I'm ready to say goodbye to eclipse for the time being, but I expect both apps to continue to improve so swearing fealty to either would be short sighted.&lt;br /&gt;&lt;br /&gt;And the final bit of news, I've released version 0.9.8 of the GoogleTranslateScraper, it's available on my &lt;a href="http://www.incantations.net/%7Ejason/software/" _fcksavedurl="http://www.incantations.net/~jason/software/"&gt;software page&lt;/a&gt;.  I've cleaned up the unit tests and put a cap on the amount of text you can submit for a translation job (30000 characters max).&lt;br /&gt;&lt;br /&gt;Somewhere around this point google stops translating.  My first idea was to just split up the input into smaller chunks and submit multiple jobs concurrently.  Sounds easy, but you can't just arbitrarily split the data, you have to try and do it on a sensible boundary, like the end of a sentence, otherwise your translation won't work very smoothly across the transitions.  A character followed by some punctuation would do it for English, but I don't know how to do it with non-western languages, Chinese, etc. So I took the easy way out and just punted the problem up to the next layer in the application.  So if your using my library and want to translate large globs of text, then it's your job to split the data into chunks in whatever way you feel is appropriate.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6288641086087262491-5985867411680310184?l=foo.jasonhudgins.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://foo.jasonhudgins.com/feeds/5985867411680310184/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6288641086087262491&amp;postID=5985867411680310184' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6288641086087262491/posts/default/5985867411680310184'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6288641086087262491/posts/default/5985867411680310184'/><link rel='alternate' type='text/html' href='http://foo.jasonhudgins.com/2007/10/return-of-coder.html' title='Return of the Coder'/><author><name>Jason</name><uri>http://www.blogger.com/profile/11854459261926460313</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/-McVhm2Wqthw/TwC8geDVEyI/AAAAAAAAAnU/z0GNbE8FdZ8/s220/standard_avatar.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6288641086087262491.post-7439646238402774052</id><published>2007-07-25T16:03:00.000-05:00</published><updated>2007-12-25T23:28:02.479-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='translate'/><title type='text'>Google Translator Restlet published</title><content type='html'>You can find it &lt;a href="http://www.incantations.net:8080/translator/instructions" _fcksavedurl="http://www.incantations.net:8080/translator/instructions"&gt;here&lt;/a&gt;, including a complete tutorial for consuming the service using the &lt;a href="http://www.restlet.org/" _fcksavedurl="http://www.restlet.org"&gt;restlet&lt;/a&gt; framework.  Even if your language of choice is not java, it shouldn't be very difficult for you to write your own consumer using the the documentation I've provided.&lt;br /&gt;&lt;br /&gt;In brief, it's an asynchronous &lt;a href="http://en.wikipedia.org/wiki/RESTful" _fcksavedurl="http://en.wikipedia.org/wiki/RESTful"&gt;RESTful&lt;/a&gt; service that allows you to create a translation job by posting to a specific URL, and if the job is accepted it returns you a 201 Created status and a Location header telling you where you can pick up the results when processing has completed.  Then it's just a simple task of polling the result URL (a job resource).  The job resouce  will return an HTTP 102 Processing status until it completes, at which point you'll then get a 200 Okay, and your results in UTF-8 encoded text/plain.&lt;br /&gt;&lt;br /&gt;I posted about my service on the &lt;a href="http://news.gmane.org/gmane.comp.java.restlet" _fcksavedurl="http://news.gmane.org/gmane.comp.java.restlet"&gt;restlet list&lt;/a&gt; several days ago, in an effort to get some feedback on what I might have done better.  The biggest point of contention has been the jobs resource url that you post to when you create a job.  I chose the first option following the guidelines in the &lt;a href="http://www.oreilly.com/catalog/9780596529260/index.html" _fcksavedurl="http://www.oreilly.com/catalog/9780596529260/index.html"&gt;RWS book&lt;/a&gt;.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;/jobs/en,fr&lt;/li&gt;&lt;li&gt;/jobs/en/fr&lt;/li&gt;&lt;/ul&gt; The idea here is that if you have have two pieces of scoping information that are ordered but not hierarchical (the from and to languages respectively), then you should seperate them with commas.  Several people, however, have presented a &lt;a href="http://article.gmane.org/gmane.comp.java.restlet/2576" _fcksavedurl="http://article.gmane.org/gmane.comp.java.restlet/2576"&gt;good case&lt;/a&gt; for looking at it at as a hierarchical set of folders.  I haven't completely made up my mind yet, so comments are welcome.&lt;br /&gt;&lt;br /&gt;The other minor point of contention is my choice to use a 102 status to indicate that a job is still being processed.  At least one person felt that a 202 Accepted would be more appropriate.  Personally I think that a 102 Processing status is a clearer way to express the resource state, if your not opposed to using the  WEBDAV extended status codes.&lt;br /&gt;&lt;br /&gt;Beyond stress testing this service, I don't intend to become a major service provider so I'll publish the source code to my translate restlet backend eventually.  The last two restlet framework releases, 1.0.2 and 1.0.3, both have problems with the &lt;a href="http://www.restlet.org/documentation/1.0/ext/com/noelios/restlet/ext/servlet/ServerServlet.html" _fcksavedurl="http://www.restlet.org/documentation/1.0/ext/com/noelios/restlet/ext/servlet/ServerServlet.html"&gt;servlet adapter&lt;/a&gt;. This piece of the framework allows you to run a restlet within any web container.   Because of this I've had to code in some workarounds that I'd rather not publish.  Hopefully these issues will be cleared up in the 1.0.4 release.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6288641086087262491-7439646238402774052?l=foo.jasonhudgins.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://foo.jasonhudgins.com/feeds/7439646238402774052/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6288641086087262491&amp;postID=7439646238402774052' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6288641086087262491/posts/default/7439646238402774052'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6288641086087262491/posts/default/7439646238402774052'/><link rel='alternate' type='text/html' href='http://foo.jasonhudgins.com/2007/07/google-translator-restlet-published.html' title='Google Translator Restlet published'/><author><name>Jason</name><uri>http://www.blogger.com/profile/11854459261926460313</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/-McVhm2Wqthw/TwC8geDVEyI/AAAAAAAAAnU/z0GNbE8FdZ8/s220/standard_avatar.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6288641086087262491.post-5225400283260685856</id><published>2007-07-17T16:04:00.000-05:00</published><updated>2007-12-25T23:27:50.242-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='restlet'/><title type='text'>Google Translate Scraper 0.9.6 released</title><content type='html'>Available for download from my &lt;a href="http://www.incantations.net/%7Ejason/software/" _fcksavedurl="http://www.incantations.net/~jason/software/"&gt;software page&lt;/a&gt; and from my &lt;a href="http://repo.incantations.net/" _fcksavedurl="http://repo.incantations.net/"&gt;maven 2 repository&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;This is a minor release that improves the exception handling and a few other tweaks.  Probably the biggest change is the name, I felt that Google Translate Engine was not a good description.  This new title, while a bit less glamorous sounding, is more accurate.&lt;br /&gt;&lt;br /&gt;Very soon I'll publish a RESTful service that's build on top of the scraper.  Hopefully in the next day or so.&lt;br /&gt;&lt;br /&gt;In other news, I recently switched from jboss-4.0.2 to the &lt;a href="https://glassfish.dev.java.net/public/downloadsindex.html" _fcksavedurl="https://glassfish.dev.java.net/public/downloadsindex.html"&gt;Glassfish Application Server&lt;/a&gt;.  So far I'm really pleased with glassfish.  I've been running it under a 1.6 JVM with no problems.  The web based administration console is really slick.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6288641086087262491-5225400283260685856?l=foo.jasonhudgins.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://foo.jasonhudgins.com/feeds/5225400283260685856/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6288641086087262491&amp;postID=5225400283260685856' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6288641086087262491/posts/default/5225400283260685856'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6288641086087262491/posts/default/5225400283260685856'/><link rel='alternate' type='text/html' href='http://foo.jasonhudgins.com/2007/07/google-translate-scraper-096-released.html' title='Google Translate Scraper 0.9.6 released'/><author><name>Jason</name><uri>http://www.blogger.com/profile/11854459261926460313</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/-McVhm2Wqthw/TwC8geDVEyI/AAAAAAAAAnU/z0GNbE8FdZ8/s220/standard_avatar.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6288641086087262491.post-6175635341914026498</id><published>2007-07-13T16:05:00.001-05:00</published><updated>2010-04-03T15:01:30.772-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='restlet'/><title type='text'>RESTful Web Services</title><content type='html'>&lt;iframe align="left" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="http://rcm.amazon.com/e/cm?t=ablogcallefoo-20&amp;amp;o=1&amp;amp;p=8&amp;amp;l=bpl&amp;amp;asins=0596529260&amp;amp;fc1=000000&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=0000FF&amp;amp;bc1=000000&amp;amp;bg1=FFFFFF&amp;amp;f=ifr" style="height: 245px; padding-right: 10px; padding-top: 5px; width: 131px;"&gt;&lt;/iframe&gt;As promised, here's my quick book review for &lt;a _fcksavedurl="http://www.amazon.com/RESTful-Web-Services-Leonard-Richardson/dp/0596529260/ref=pd_bbs_sr_1/002-0365060-1493601?ie=UTF8&amp;amp;s=books&amp;amp;qid=1184335122&amp;amp;sr=8-1" href="http://www.amazon.com/RESTful-Web-Services-Leonard-Richardson/dp/0596529260/ref=pd_bbs_sr_1/002-0365060-1493601?ie=UTF8&amp;amp;s=books&amp;amp;qid=1184335122&amp;amp;sr=8-1"&gt;&lt;u&gt;RESTtful Web Services&lt;/u&gt;&lt;/a&gt; by Leonard Richardson and Sam Ruby.&lt;br /&gt;&lt;br /&gt;This book has a wealth of conceptual information for what the authors have dubbed "Resource Oriented Architecture".  They identify three different categories of web services, "Big" web services (those that use WSDL and SOAP stacks), REST-RPC hybrid services, and strictly RESTful web services.  They describe the pro's and cons of each, and present a good case for RESTful services.&lt;br /&gt;&lt;br /&gt;I set out to create my own RESTful service, and this book really helped me to clarify and design it correctly. For java developers, unless you know ruby or have a strong desire to learn it, feel free to skip Chapter 7, where the authors implement a RESTful service using &lt;a _fcksavedurl="http://www.rubyonrails.org/" href="http://www.rubyonrails.org/"&gt;RoR.&lt;/a&gt; The implentation details of this book aren't what makes it great, it's the concepts it describes, so don't get bogged down in the details if you don't need to.  In fact the restlet.org website has restlet implementations &lt;a _fcksavedurl="http://www.restlet.org/documentation/1.0/examples/" href="http://www.restlet.org/documentation/1.0/examples/"&gt;of all the examples in the book&lt;/a&gt;.  That's going to help a java guy much more than the ruby examples.  The section on &lt;a _fcksavedurl="http://www.restlet.org" href="http://www.restlet.org/"&gt;restlets&lt;/a&gt; is brief but useful for getting started,  I read this section at least three times.&lt;br /&gt;&lt;br /&gt;The restlet framework has been a joy to work with so far, and I'll probably be releasing the source to my restlet implementation very soon.&lt;br /&gt;&lt;br /&gt;If your interested in learning REST, and want to understand it in more developer-friendly language than Fielding's now famous &lt;a _fcksavedurl="http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm" href="http://www.ics.uci.edu/%7Efielding/pubs/dissertation/top.htm"&gt;dissertation&lt;/a&gt;, then I highly recommend reading this book.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6288641086087262491-6175635341914026498?l=foo.jasonhudgins.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://foo.jasonhudgins.com/feeds/6175635341914026498/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6288641086087262491&amp;postID=6175635341914026498' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6288641086087262491/posts/default/6175635341914026498'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6288641086087262491/posts/default/6175635341914026498'/><link rel='alternate' type='text/html' href='http://foo.jasonhudgins.com/2007/07/restful-web-services.html' title='RESTful Web Services'/><author><name>Jason</name><uri>http://www.blogger.com/profile/11854459261926460313</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/-McVhm2Wqthw/TwC8geDVEyI/AAAAAAAAAnU/z0GNbE8FdZ8/s220/standard_avatar.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6288641086087262491.post-4980004973838139116</id><published>2007-07-10T16:01:00.000-05:00</published><updated>2007-12-25T23:27:11.184-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='jobs'/><title type='text'>Dumb IT Hiring Managers</title><content type='html'>I've had a big pet peeve about IT hiring practices for several years now. I'll be perusing the IT job listings on a  board, and typically I always find at least one position with an absurd set of requirements.&lt;br /&gt;&lt;br /&gt;Today, I received an email from an unknown IT recruiter about a java position in Plano.  One of their &lt;b&gt;core&lt;/b&gt; requirements for the position was &lt;i&gt;9/10 years of J2EE experience&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;The J2EE 1.0 specification and reference implementation was released sometime in 1999, and as far as I know, the first full implementations weren't shipping from vendors until 2000. Wikipedia has a J2EE timeline &lt;a href="http://en.wikipedia.org/wiki/Java_EE_version_history" _fcksavedurl="http://en.wikipedia.org/wiki/Java_EE_version_history"&gt;here&lt;/a&gt;.  If you started working with J2EE the very moment the 1.0 specification was released, you could at most have about 8 years experience.&lt;br /&gt;&lt;br /&gt;I also think that requiring X number of years with a particular technology is a dumb way to look for competent people.  I've seen plenty of developers  who've been doing java  for three or four years and still haven't figured out that the Collection interface has a built in iterator.&lt;br /&gt;&lt;br /&gt;What hiring managers should be looking for is scope and breadth of experience.  How many technologies have you worked with, and how many years have you been a developer overall?  Do you write code on your own time, or do you just reluctantly churn out enough lines to keep your manager from frowning at you? I wouldn't ever hire someone who doesn't enjoy programming, but then again, nobody's asking me.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6288641086087262491-4980004973838139116?l=foo.jasonhudgins.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://foo.jasonhudgins.com/feeds/4980004973838139116/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6288641086087262491&amp;postID=4980004973838139116' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6288641086087262491/posts/default/4980004973838139116'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6288641086087262491/posts/default/4980004973838139116'/><link rel='alternate' type='text/html' href='http://foo.jasonhudgins.com/2007/07/dumb-it-hiring-managers.html' title='Dumb IT Hiring Managers'/><author><name>Jason</name><uri>http://www.blogger.com/profile/11854459261926460313</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/-McVhm2Wqthw/TwC8geDVEyI/AAAAAAAAAnU/z0GNbE8FdZ8/s220/standard_avatar.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6288641086087262491.post-3030210926693307030</id><published>2007-06-27T15:59:00.000-05:00</published><updated>2007-12-25T23:26:53.429-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='restlet'/><category scheme='http://www.blogger.com/atom/ns#' term='google'/><category scheme='http://www.blogger.com/atom/ns#' term='translate'/><title type='text'>GoogleTranslateEngine 0.9.3  released</title><content type='html'>GoogleTranslateEngine 0.9.3 can be obtained from my &lt;a href="http://www.incantations.net/%7Ejason/software/" _fcksavedurl="http://www.incantations.net/~jason/software/"&gt;software page&lt;/a&gt;.  This is a minor release that in no way alters the functionality of the library.  Google is apparently tweaking their translation engine for better accuracy, and their tweaks broke a few of my unit tests.  I also fixed a null pointer exception that I was getting on occasion.&lt;br /&gt;&lt;br /&gt;I've been focusing on studying REST design for over a month now with brief excursions into ruby on rails.  I'll soon compose a review of the excellent book &lt;a href="http://www.amazon.com/RESTful-Web-Services-Leonard-Richardson/dp/0596529260/ref=pd_bbs_sr_1/002-0365060-1493601?ie=UTF8&amp;amp;s=books&amp;amp;qid=1182978230&amp;amp;sr=8-1" _fcksavedurl="http://www.amazon.com/RESTful-Web-Services-Leonard-Richardson/dp/0596529260/ref=pd_bbs_sr_1/002-0365060-1493601?ie=UTF8&amp;amp;s=books&amp;amp;qid=1182978230&amp;amp;sr=8-1"&gt;&lt;u&gt;RESTful Web Services&lt;/u&gt;&lt;/a&gt;, by Leonard Richardson and Sam Ruby, well, just as soon as I finish reading it.&lt;br /&gt;&lt;br /&gt;I initially attempted to craft my own &lt;a href="http://www.restlet.org/" _fcksavedurl="http://www.restlet.org"&gt;restlet&lt;/a&gt; interface for the GoogleTranslateEngine, however I quickly realized that I didn't understand HTTP and RESTful design as well as I thought I did.  This book has gone a long way towards correcting that.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6288641086087262491-3030210926693307030?l=foo.jasonhudgins.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://foo.jasonhudgins.com/feeds/3030210926693307030/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6288641086087262491&amp;postID=3030210926693307030' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6288641086087262491/posts/default/3030210926693307030'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6288641086087262491/posts/default/3030210926693307030'/><link rel='alternate' type='text/html' href='http://foo.jasonhudgins.com/2007/12/googletranslateengine-093-released.html' title='GoogleTranslateEngine 0.9.3  released'/><author><name>Jason</name><uri>http://www.blogger.com/profile/11854459261926460313</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/-McVhm2Wqthw/TwC8geDVEyI/AAAAAAAAAnU/z0GNbE8FdZ8/s220/standard_avatar.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6288641086087262491.post-4181523443960340264</id><published>2007-05-06T15:57:00.000-05:00</published><updated>2007-12-25T23:26:33.183-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='webservice'/><title type='text'>Translate Webservice 100% functional</title><content type='html'>My mission to complete and deploy a SOAP webservice for my GoogleTranslateEngine is finally complete.  I had it partially working a month ago, but for several weeks I've been trying to understand why the jBossWS stack insisted on sending me garbage for non-latin encodings.&lt;br /&gt;&lt;br /&gt;My friend &lt;a href="http://rockstarprogrammer.org/" _fcksavedurl="http://rockstarprogrammer.org"&gt;Dustin &lt;/a&gt;had insisted that I write some unit tests, and that ended up being a very good thing.  I have been doing all my development with eclipse on a windows XP machine, and the unit tests were all passing perfectly.  The webservice is running under jBoss on a fedora core 6 box.   Because I'm using maven as my build system, it's trivial to do builds/tests on any other system, but I never though to run my unit tests on my linux box, I simply assumed they would work like they did on windows.&lt;br /&gt;&lt;br /&gt;When I finally got around to doing it, one of my unit tests was failing.  As it turns out I wasn't setting my encoding parameters properly when passing my InputStream into the tagSoup parser.  For some reason that I still don't understand, this was working just fine on windows, but not at all on linux.&lt;br /&gt;&lt;br /&gt;So, the point of this story is, don't be shy with unit tests.  They can be very helpful!&lt;br /&gt;&lt;br /&gt;I just released version 0.9.2 of the Google Translate Engine which can be found on my &lt;a href="http://incantations.net/%7Ejason/software" _fcksavedurl="http://incantations.net/~jason/software"&gt;software pag&lt;/a&gt;e.  This, of course, includes the bug fix that I mentioned.&lt;br /&gt;&lt;br /&gt;The glorious SOAP webservice that I've been working on is published &lt;a href="http://incantations.net:8080/GoogleTranslateRemoteJAXRPC/Translate?wsdl" _fcksavedurl="http://incantations.net:8080/GoogleTranslateRemoteJAXRPC/Translate?wsdl"&gt;here&lt;/a&gt;.  I'm keeping it open for now, unless a deluge of people start using it, but I don't think I have much to worry about.&lt;br /&gt;&lt;br /&gt;So my next project will to be a &lt;a href="http://www.restlet.org/" _fcksavedurl="http://www.restlet.org"&gt;restlet&lt;/a&gt; implementation.  This looks like the way of the future, so until next time...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6288641086087262491-4181523443960340264?l=foo.jasonhudgins.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://foo.jasonhudgins.com/feeds/4181523443960340264/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6288641086087262491&amp;postID=4181523443960340264' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6288641086087262491/posts/default/4181523443960340264'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6288641086087262491/posts/default/4181523443960340264'/><link rel='alternate' type='text/html' href='http://foo.jasonhudgins.com/2007/05/translate-webservice-100-functional.html' title='Translate Webservice 100% functional'/><author><name>Jason</name><uri>http://www.blogger.com/profile/11854459261926460313</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/-McVhm2Wqthw/TwC8geDVEyI/AAAAAAAAAnU/z0GNbE8FdZ8/s220/standard_avatar.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6288641086087262491.post-4541964628761365004</id><published>2007-04-30T15:55:00.000-05:00</published><updated>2007-12-25T23:26:08.669-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='webservice'/><category scheme='http://www.blogger.com/atom/ns#' term='jboss'/><title type='text'>webservice pain</title><content type='html'>I wish I could proudly announce that I have a slick new webservice for my Google Translator ready for public consumption.  It's been almost a month since I started working on the thing in my free time.  This should have been a relatively straight-forward project to implement, but alas, it's been hell every step of the way. SOAP is hard and ugly, and plenty of people warned me about it before I even started.  "Use REST!!", they proclaimed, and now I can see why.&lt;br /&gt;&lt;br /&gt;I started off on my journey with the intention of making a nice &lt;a href="http://en.wikipedia.org/wiki/POJO" _fcksavedurl="http://en.wikipedia.org/wiki/POJO"&gt;POJO&lt;/a&gt; backed &lt;a href="http://jcp.org/en/jsr/detail?id=109" _fcksavedurl="http://jcp.org/en/jsr/detail?id=109"&gt;JSR-109&lt;/a&gt; style webservice. The &lt;a href="http://en.wikipedia.org/wiki/Service_endpoint_interface" _fcksavedurl="http://en.wikipedia.org/wiki/Service_endpoint_interface"&gt;SEI &lt;/a&gt;was fairly trivial, and it works much like the &lt;a href="http://en.wikipedia.org/wiki/Java_remote_method_invocation" _fcksavedurl="http://en.wikipedia.org/wiki/Java_remote_method_invocation"&gt;RMI&lt;/a&gt; version that I did earlier.  Once you have your interface done, there isn't any more coding to do, it's all xml wiring, mapping, and magic. Which is far nastier than it should be.&lt;br /&gt;&lt;br /&gt;My first mistake was trying to attack the problem in a generic way.  Before you get started on a webservice, know what your target platform is and read the container specific documentation/examples.  My target platform is &lt;a href="http://labs.jboss.com/" _fcksavedurl="http://labs.jboss.com/"&gt;jBoss 4.0.5&lt;/a&gt;.  I would have saved myself a great deal of time and pain if I had started off on with the &lt;a href="http://labs.jboss.com/jbossws/user-guide/en/html/index.html" _fcksavedurl="http://labs.jboss.com/jbossws/user-guide/en/html/index.html"&gt;jBossWS&lt;/a&gt; examples.&lt;br /&gt;&lt;br /&gt;The reason your platform choice is so important is because of the tooling. Your platform will most likely provide some set of tools for generating all the nasty XML files that JSR-109 demands (jax-rpc mapping, WSDL, etc).  jBossWS comes with a little tool called wstool which takes a pretty simple xml config file and then spits out all the ugly XML files that you need for your webservice.  Having to generate these files by hand would give you nightmares, so good tooling is essential.  I also had to download and use the now out of date &lt;a href="https://jwsdp.dev.java.net/" _fcksavedurl="https://jwsdp.dev.java.net/"&gt;JWSDP-2.0&lt;/a&gt; for several things, including wscompile (more tooling).&lt;br /&gt;&lt;br /&gt;Once all that was done, everything worked, well almost.  As long as no non-latin character encodings were involved, everything was just peachy.  If, however, I want to translate English to Russian, and get UTF-8 Cyrillic returned to me, things don't work so well.  Somewhere inside the jBossWS code, it's mangling up my result string, and that's going to take some poking around. Hopefully I'll figure everything out and get the thing to behave correctly.&lt;br /&gt;&lt;br /&gt;So, maybe next month?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6288641086087262491-4541964628761365004?l=foo.jasonhudgins.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://foo.jasonhudgins.com/feeds/4541964628761365004/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6288641086087262491&amp;postID=4541964628761365004' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6288641086087262491/posts/default/4541964628761365004'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6288641086087262491/posts/default/4541964628761365004'/><link rel='alternate' type='text/html' href='http://foo.jasonhudgins.com/2007/12/webservice-pain.html' title='webservice pain'/><author><name>Jason</name><uri>http://www.blogger.com/profile/11854459261926460313</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/-McVhm2Wqthw/TwC8geDVEyI/AAAAAAAAAnU/z0GNbE8FdZ8/s220/standard_avatar.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6288641086087262491.post-1577053239867035484</id><published>2007-03-23T15:53:00.000-05:00</published><updated>2007-12-25T23:25:16.100-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='translate'/><title type='text'>Google Translate Engine 0.8.0 released</title><content type='html'>For some of my upcoming projects, I was hoping to find some publicly available translation web service.  I managed to find one, but it seemed to be under fairly heavy load and unavailable at times.&lt;br /&gt;&lt;br /&gt;Google has a very nice, simple web interface for performing &lt;a href="http://www.google.com/translate_t" _fcksavedurl="http://www.google.com/translate_t"&gt;text translations&lt;/a&gt;.  Unfortunately they don't offer an API for it.  Since I couldn't find a suitable web service, it made sense to do my own implementation by scraping google's site. Besides, I could always use more experience with web services.&lt;br /&gt;&lt;br /&gt;Before I could do any of that, I had to write  the core library.  It's not a web service, but it's completely usable in a java application.  I haven't had an opportunity to test it out very much, but I decided to share it anyway.  You can find the Google Translate Engine v 0.8,  &lt;a href="http://www.incantations.net/%7Ejason/software/" _fcksavedurl="http://www.incantations.net/~jason/software/"&gt;here on my software page&lt;/a&gt;.  It appears to work fine, but I've had a real hard time getting my workstation to properly output unicode on the console, so it definitly requires more testing.&lt;br /&gt;&lt;br /&gt;I  played with lots of new stuff while making this: maven, javadoc, SAX, unit testing to name a few.  I'm using John Cowan's nice &lt;a href="http://home.ccil.org/%7Ecowan/XML/tagsoup/" _fcksavedurl="http://home.ccil.org/~cowan/XML/tagsoup/"&gt;tagSoup&lt;/a&gt; library to web scrape.  It allows me to use a SAX handler even on badly formed html.&lt;br /&gt;&lt;br /&gt;Now I'm in the process of trying to figure out how to best implement an old school JSR-109 servlet driven JAX-RPC web service.  My target platform at the moment is Jboss.  As a pre-requisite exercise I'll probably make a tiny RMI service that hooks into the translate engine.  Hopefully I can get that done in the next couple of days.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6288641086087262491-1577053239867035484?l=foo.jasonhudgins.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://foo.jasonhudgins.com/feeds/1577053239867035484/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6288641086087262491&amp;postID=1577053239867035484' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6288641086087262491/posts/default/1577053239867035484'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6288641086087262491/posts/default/1577053239867035484'/><link rel='alternate' type='text/html' href='http://foo.jasonhudgins.com/2007/03/google-translate-engine-080-released.html' title='Google Translate Engine 0.8.0 released'/><author><name>Jason</name><uri>http://www.blogger.com/profile/11854459261926460313</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/-McVhm2Wqthw/TwC8geDVEyI/AAAAAAAAAnU/z0GNbE8FdZ8/s220/standard_avatar.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6288641086087262491.post-7140987563970395350</id><published>2007-03-05T15:30:00.000-06:00</published><updated>2007-12-25T23:25:00.089-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='i18n'/><title type='text'>i18n'ing it up!</title><content type='html'>I plan on working on some multi-lingual websites, so what better encoding to use, than UTF8, right?  You get dozens of languages and character sets all supported by a single encoding, like on &lt;a href="http://www.columbia.edu/kermit/utf8.html" _fcksavedurl="http://www.columbia.edu/kermit/utf8.html"&gt;this site&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;So what's it take to get all this set up?  Let's start with the most obvious thing you can do, like sticking this into your html header.&lt;br /&gt;&lt;pre&gt;&amp;lt;meta equiv="Content-Type" content="text/html; charset=utf-8"&amp;gt;&lt;br /&gt;&lt;/pre&gt;That's not nearly enough however, because most browsers will also check your &lt;i&gt;&lt;b&gt;http&lt;/b&gt;&lt;/i&gt; header, and if it doesn't agree with your meta tag, then the http header value takes precedence.   This is fairly easy to correct.  In JSP I can do it with a page directive :&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;%@ page contentType="text/html; charset=utf-8" %&gt;&lt;br /&gt;&lt;/pre&gt;What about sending/recieving form data?&lt;br /&gt;&lt;br /&gt;Most browsers will send in the same encoding that the page is in, but for an added guarantee you can specify an encoding type in your form tag :&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&amp;lt;form charset="utf-8" method="post" action="postArticle.do"&amp;gt;&lt;br /&gt;  ...&lt;br /&gt;&amp;lt;/form&amp;gt;&lt;br /&gt;&lt;/pre&gt;Things can get a little more tricky on the receiving end however.  A servlet will check the character encoding, with request.getCharacterEncoding(), and if it's null, you won't get what your expecting.  I'm not enough of a container expert to understand what's going on behind the scenes, but in my case it was necessary to tweak things to tell java  to use utf8 encoding.  I did this with a simple modification to my ActionForm bean.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;public void setContent(String content) throws Exception {&lt;br /&gt;  this.content = new String(content.getBytes("8859_1"),"UTF8");&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;Granted, there are probably much better ways to do this (request filters, etc) and I'd be more than willing to listen to anyone else's expertise on the subject.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6288641086087262491-7140987563970395350?l=foo.jasonhudgins.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://foo.jasonhudgins.com/feeds/7140987563970395350/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6288641086087262491&amp;postID=7140987563970395350' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6288641086087262491/posts/default/7140987563970395350'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6288641086087262491/posts/default/7140987563970395350'/><link rel='alternate' type='text/html' href='http://foo.jasonhudgins.com/2007/03/i18ning-it-up.html' title='i18n&apos;ing it up!'/><author><name>Jason</name><uri>http://www.blogger.com/profile/11854459261926460313</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/-McVhm2Wqthw/TwC8geDVEyI/AAAAAAAAAnU/z0GNbE8FdZ8/s220/standard_avatar.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6288641086087262491.post-2068664948732776527</id><published>2007-03-02T15:28:00.000-06:00</published><updated>2007-12-25T23:24:40.318-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xhtml'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><category scheme='http://www.blogger.com/atom/ns#' term='books'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>Good books, bad books</title><content type='html'>I thought I'd share my thoughts on 4 books I've read lately.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;a href="http://www.amazon.com/Head-First-HTML-CSS-XHTML/dp/059610197X/ref=pd_bbs_sr_5/002-1192688-6868805?ie=UTF8&amp;amp;s=books&amp;amp;qid=1172856233&amp;amp;sr=8-5" _fcksavedurl="http://www.amazon.com/Head-First-HTML-CSS-XHTML/dp/059610197X/ref=pd_bbs_sr_5/002-1192688-6868805?ie=UTF8&amp;amp;s=books&amp;amp;qid=1172856233&amp;amp;sr=8-5"&gt;&lt;span class="srTitle"&gt;Head First HTML with CSS &amp;amp; XHTML&lt;/span&gt;&lt;/a&gt; - &lt;/b&gt;I wanted to teach my wife XHTML/CSS and this book was fantastic.  Thorough and well organized, and funny.  It's as about as interesting as you could make the subject.  I highly recommend it.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;a href="http://www.amazon.com/PHP-MySQL-Programming-Absolute-Beginner/dp/1931841322/ref=sr_1_1/002-1192688-6868805?ie=UTF8&amp;amp;s=books&amp;amp;qid=1172856164&amp;amp;sr=8-1" _fcksavedurl="http://www.amazon.com/PHP-MySQL-Programming-Absolute-Beginner/dp/1931841322/ref=sr_1_1/002-1192688-6868805?ie=UTF8&amp;amp;s=books&amp;amp;qid=1172856164&amp;amp;sr=8-1"&gt;&lt;span class="srTitle"&gt;PHP/MySQL Programming for the Absolute Beginner&lt;/span&gt;&lt;/a&gt; - &lt;/b&gt;Now I'm trying to teach my wife PHP development.  From the title of this book, and several decent reviews, it seemed like a good choice.  Boy was I wrong!  I think most of the reviews written at amazon.com were by amateur coders who don't know any better.  The author makes niave assumptions about your development environment, writes bad html, and doesn't use best practices.  Some of the examples are so nasty that they made my head hurt trying to explain them to my wife.  Avoid this book!&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.amazon.com/PHP-MySQL-Dynamic-Web-Sites/dp/0321336577/ref=pd_bbs_sr_1/002-1192688-6868805?ie=UTF8&amp;amp;s=books&amp;amp;qid=1172855495&amp;amp;sr=8-1" _fcksavedurl="http://www.amazon.com/PHP-MySQL-Dynamic-Web-Sites/dp/0321336577/ref=pd_bbs_sr_1/002-1192688-6868805?ie=UTF8&amp;amp;s=books&amp;amp;qid=1172855495&amp;amp;sr=8-1"&gt;&lt;b class="sans"&gt;PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide&lt;/b&gt;&lt;/a&gt; - So back to amazon I went and this time I did a lot more research.  This book is very highly recommended and quite a few of the book reviewers know what they are talking about.   We've just started into it, but the examples use proper XHTML, are fairly concise and well organized.  He doesn't just assume that your environment has auto register globals enabled (yuck) and covers important topics like magic quotes early on, that tend to confuse people.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;a href="http://www.amazon.com/Head-First-Servlets-JSP-Certified/dp/0596005407/ref=pd_bbs_sr_3/002-1192688-6868805?ie=UTF8&amp;amp;s=books&amp;amp;qid=1172856233&amp;amp;sr=8-3" _fcksavedurl="http://www.amazon.com/Head-First-Servlets-JSP-Certified/dp/0596005407/ref=pd_bbs_sr_3/002-1192688-6868805?ie=UTF8&amp;amp;s=books&amp;amp;qid=1172856233&amp;amp;sr=8-3"&gt;&lt;span class="srTitle"&gt;Head First Servlets and JSP&lt;/span&gt;&lt;/a&gt; - &lt;/b&gt;I just finished this book myself and I'm quite pleased by it.  It's narrative is along the same style as the other books in the series.  It's funny (sometimes cynical) and informative.  The Kung-fu movie captions are awesome.  This is one of the few IT books that I've ever read in it's entirety.  I highly recommend!&lt;br /&gt;&lt;br /&gt;I've just ordered &lt;b&gt;&lt;a href="http://www.amazon.com/Maven-Developers-Notebook-Timothy-OBrien/dp/0596007507/ref=pd_bbs_sr_1/002-1192688-6868805?ie=UTF8&amp;amp;s=books&amp;amp;qid=1172857083&amp;amp;sr=8-1" _fcksavedurl="http://www.amazon.com/Maven-Developers-Notebook-Timothy-OBrien/dp/0596007507/ref=pd_bbs_sr_1/002-1192688-6868805?ie=UTF8&amp;amp;s=books&amp;amp;qid=1172857083&amp;amp;sr=8-1"&gt;&lt;span class="srTitle"&gt;Maven: A Developer's Notebook&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;. That will be my next book to tackle.  Now that I'm doing J2EE development, I'm looking for tools that will take the sting out of packaging and deployment.  Maven seems to handle a lot of those issues for you.  I'm looking foward to learning more about it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6288641086087262491-2068664948732776527?l=foo.jasonhudgins.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://foo.jasonhudgins.com/feeds/2068664948732776527/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6288641086087262491&amp;postID=2068664948732776527' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6288641086087262491/posts/default/2068664948732776527'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6288641086087262491/posts/default/2068664948732776527'/><link rel='alternate' type='text/html' href='http://foo.jasonhudgins.com/2007/03/good-books-bad-books.html' title='Good books, bad books'/><author><name>Jason</name><uri>http://www.blogger.com/profile/11854459261926460313</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/-McVhm2Wqthw/TwC8geDVEyI/AAAAAAAAAnU/z0GNbE8FdZ8/s220/standard_avatar.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6288641086087262491.post-1968414607762051644</id><published>2007-02-27T23:13:00.000-06:00</published><updated>2007-12-25T23:23:37.475-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='software'/><category scheme='http://www.blogger.com/atom/ns#' term='blogging'/><title type='text'>Here we go...</title><content type='html'>Being the masochist I am, when I finally got around to startup up a blog, I decided to host and install the blogger system myself.  I have a basic jboss server up and running.  All I had to do is chose which java blogging app to use, preferably the one that causes me the least amount of headache.&lt;br /&gt;&lt;br /&gt;I looked at three different java based, blogging webapps tonight :&lt;br /&gt;&lt;div align="left"&gt; &lt;ul&gt;&lt;li&gt;&lt;a href="http://pebble.sourceforge.net/" _fcksavedurl="http://pebble.sourceforge.net/"&gt;Pebble&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://rollerweblogger.org/project/" _fcksavedurl="http://rollerweblogger.org/project/"&gt;Roller&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://wiki.blojsom.com/wiki/display/blojsom3/About+blojsom" _fcksavedurl="http://wiki.blojsom.com/wiki/display/blojsom3/About+blojsom"&gt;Blojsom&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt; I ultimately chose Pebble, because it's the lightest weight, and the least painful to setup.  I had to nuke the log4j.jar from the pebble jar, as it didn't get along to well with jboss,  so the install wasn't completely painless. Of the three, however, pebble was definitly the easiest.  Not requiring a database is nice, this isn't a high-traffic, multi-user blog.  So why worry with the overhead?&lt;br /&gt;&lt;br /&gt;Pebble is working well so far, it will be interesting to see how far along I can get with it.  I wonder how easily I could extend it.  I'm also a notriously bad speller, and as I'm entering this, I don't see any type of spell check, that's something I could add.  Of course it might be in here somewhere, I've only been using pebble for about 10 minutes now.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6288641086087262491-1968414607762051644?l=foo.jasonhudgins.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://foo.jasonhudgins.com/feeds/1968414607762051644/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6288641086087262491&amp;postID=1968414607762051644' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6288641086087262491/posts/default/1968414607762051644'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6288641086087262491/posts/default/1968414607762051644'/><link rel='alternate' type='text/html' href='http://foo.jasonhudgins.com/2007/02/here-we-go.html' title='Here we go...'/><author><name>Jason</name><uri>http://www.blogger.com/profile/11854459261926460313</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/-McVhm2Wqthw/TwC8geDVEyI/AAAAAAAAAnU/z0GNbE8FdZ8/s220/standard_avatar.JPG'/></author><thr:total>0</thr:total></entry></feed>
