<?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-4637631607249418081</id><updated>2012-01-10T18:40:43.601-08:00</updated><category term='GIS'/><category term='RFCs'/><category term='SCTP'/><category term='podcast'/><category term='javascript'/><category term='bugs'/><category term='C'/><category term='perl'/><category term='SIP'/><category term='web development'/><category term='benchmarks'/><category term='ramblings'/><category term='baypiggies'/><category term='objective-c'/><category term='RSS'/><category term='circusware'/><category term='python'/><category term='windows'/><category term='unicode'/><category term='archery'/><category term='linux'/><category term='shell script'/><category term='business'/><category term='Internet'/><category term='reviews'/><category term='APNS'/><category term='java'/><category term='mysql'/><category term='translation'/><category term='paste'/><category term='xscreensaver'/><category term='security'/><category term='rants'/><category term='music'/><category term='robots'/><category term='inequity'/><category term='django'/><category term='life'/><category term='patents'/><category term='meta'/><category term='phishing'/><category term='housing'/><category term='economics'/><category term='jobs'/><category term='XML-RPC'/><category term='unix'/><category term='mac'/><category term='python pitfalls'/><category term='marketing'/><category term='japan'/><category term='fun'/><category term='testing'/><category term='subversion'/><title type='text'>The Other Kelly Yancey</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default?start-index=101&amp;max-results=100'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>139</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-7976346404000485367</id><published>2012-01-10T18:40:00.002-08:00</published><updated>2012-01-10T18:40:43.610-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rants'/><title type='text'>Yes We Could've</title><content type='html'>&lt;br /&gt;&lt;br /&gt;&lt;center&gt;&lt;iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/UQXZoM__vU0" width="420"&gt;&lt;/iframe&gt;&lt;/center&gt;&lt;br /&gt;&lt;br /&gt;It has been a sad ten years for the American people and it is shaping up to be a sad ten more.&lt;br /&gt;&lt;br /&gt;Tomorrow is the &lt;a href="http://mediagallery.usatoday.com/Guantanamo+10+years+later/G3197?csp=ftsmpg"&gt;10th anniversary of the arrival of the first prisoners&lt;/a&gt; detained at Guantanamo Bay. &amp;nbsp;As despicable as it is that the United States government ever operated the facility, the fact that it is &lt;a href="http://news.bostonherald.com/news/us_politics/view/2012011010_years_later_guantanamo_represents_obamas_failed_promise/srvc=home&amp;amp;position=recent"&gt;still open with 171 prisoners held without trial&lt;/a&gt; is a sad testament to the morality (or impotence) of our leaders, our politicians, and our people.&lt;br /&gt;&lt;br /&gt;This isn't a simple matter of inheriting a bad legacy from the previous administration. &amp;nbsp;By passing the &lt;a href="http://en.wikipedia.org/wiki/National_Defense_Authorization_Act_for_Fiscal_Year_2012#Indefinite_detention_without_trial:_Section_1031"&gt;National Defense Authorization Act for Fiscal Year 2012&lt;/a&gt;, authorizing the arrest and imprisonment without charge or trial of terrorism suspects,&amp;nbsp;Congress recently demonstrated a renewed commitment to the policies that led to the creation of the&amp;nbsp;Guantanamo Bay prison in the first place.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-7976346404000485367?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/7976346404000485367/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=7976346404000485367' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/7976346404000485367'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/7976346404000485367'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2012/01/yes-we-couldve.html' title='Yes We Could&apos;ve'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/UQXZoM__vU0/default.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-7941847416454737193</id><published>2012-01-01T02:35:00.005-08:00</published><updated>2012-01-02T23:32:56.304-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='life'/><category scheme='http://www.blogger.com/atom/ns#' term='japan'/><title type='text'>Bon Nouvel An</title><content type='html'>12 years ago, almost to the day, my wife and I started learning Japanese.&amp;nbsp; It began when my wife gave me &lt;a href="http://www.amazon.com/Japanese-Comprehensive-Understand-Pimsleur-Language/dp/0743523539"&gt;Pimsleur's Japanese 1&lt;/a&gt; for Christmas 2000.&amp;nbsp; We studied together for the following 8 years, driving to San Francisco almost every Saturday to take lessons at &lt;a href="http://sokogakuen.org/"&gt;Soko Gakuen&lt;/a&gt;, spending every Saturday and Sunday evening watching Japanese programming on KTSF, and most other evenings practicing Kanji and vocabulary flashcards.&amp;nbsp; It was a lot of work, but I really enjoyed it.&amp;nbsp; For the first time in my life, I felt like I was capable of learning another language (as a point of reference: I studied Spanish for 5 years in High School &amp;amp; College and can't say I ever felt competent in Spanish).&lt;br /&gt;&lt;br /&gt;Finally, &lt;a href="http://kbyanc.blogspot.com/2007/09/moving-to-tokyo.html"&gt;we moved to Japan&lt;/a&gt; in October 2007 where we lived for the following 2 and a half years.&amp;nbsp; That also marked the end of our studies.&amp;nbsp; During our time in Japan, I spent pretty much all day every day conversing and corresponding in Japanese, so I feel that my reading, speaking, and understanding skills continued to improve, but I stopped learning new vocabulary and stopped hand writing Kanji so I feel like I left Japan in some ways worse off than I had arrived.&lt;br /&gt;&lt;br /&gt;Since returning to the U.S., I have been on the fence about resuming my Japanese studies.&amp;nbsp; While I really enjoyed learning the language and met a number of kind and interesting people through my studies, it just isn't practical for me to continue.&amp;nbsp; I have &lt;a href="http://kbyanc.blogspot.com/2009/10/two-years-of-tokyo.html"&gt;no intention of going back to Japan to work&lt;/a&gt;, my current work doesn't require Japanese skills, I've never been very keen on anime, and while being able to play Japanese video games in their native language is a neat trick, it really isn't worth spending years of your life for.&lt;br /&gt;&lt;br /&gt;So it is with some sadness that I've finally decided that I won't be resuming my Japanese studies for the foreseeable future.&lt;br /&gt;&lt;br /&gt;As a sort of final trip down memory lane (and possible reminder list should I decide later to study Japanese again), here is are some of the reference books that I found invaluable in learning Japanese:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Japanese for Busy People &lt;a href="http://www.amazon.com/Japanese-Busy-People-Kana-Version/dp/4770030096/ref=pd_sim_b_3"&gt;Volume 1&lt;/a&gt;, &lt;a href="http://www.amazon.com/Japanese-Busy-People-Kana-version/dp/4770020511"&gt;2&lt;/a&gt;, and &lt;a href="http://www.amazon.com/Japanese-Busy-People-III-Kana/dp/477002052X"&gt;3&lt;/a&gt;.&amp;nbsp; Kana versions, of course.&amp;nbsp; If you aren't willing to learn the &lt;a href="http://en.wikipedia.org/wiki/Kana"&gt;Kana&lt;/a&gt;, then you might as well stop pretending you are going to learn Japanese.&amp;nbsp; These are a great place to start learning grammar, vocabulary, and &lt;a href="http://en.wikipedia.org/wiki/Kanji"&gt;kanji&lt;/a&gt;.&amp;nbsp; Once you finish all 3 volumes, you are probably ready to take level 3 of the &lt;a href="http://www.jlpt.jp/e/"&gt;Japanese Language Proficiency Test&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;After you pass the level 3 test, it is time to start studying for the level 2 and level 1 tests.&amp;nbsp; Really, the JLPT tests can be thought of as two sets of tests: level 4 and level 3 are for beginners; level 2 and level 1 are intermediate/advanced.&amp;nbsp; The grammar covered in the level 4 &amp;amp; 3 tests is very similar, but level 3 is harder due to including more vocabulary and Kanji.&amp;nbsp; Likewise, level 2 and level 1 cover almost the same grammer, but level 1 requires almost twice as much kanji and level 2.&amp;nbsp; Anyway, when you get to studying for the level 2 and level 1 tests, you have to pick up a copy of &lt;a href="http://www.amazon.com/500-Essential-Japanese-Expressions-Sentence/dp/4872345894/ref=sr_1_1?ie=UTF8&amp;amp;qid=1325409634&amp;amp;sr=8-1"&gt;どんな時どう使う日本語表現文型５００&lt;/a&gt; from ALC Press.&amp;nbsp; I found this book to be absolutely invaluable; my copy is well-worn with lots of notes in the margins.&lt;/li&gt;&lt;li&gt;Now, to actually prepare for the level 2 and level 1 tests, I recommend the following study guides:&lt;/li&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://www.amazon.co.jp/exec/obidos/ASIN/4893585665/ref=nosim/booksbyisbn-22"&gt;日本語能力試験1・2級試験問題と正解&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.amazon.com/exec/obidos/ASIN/4872341155/ref=nosim/schildnet0c"&gt;日本語能力試験２級受験問題集&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.amazon.com/Japanese-Language-Proficiency-Grammar-masutaa/dp/4883190889/ref=pd_sim_b_1"&gt;完全マスター２級：日本語能力試験文法問題対策&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.amazon.com/exec/obidos/ASIN/4883192407/ref=nosim/schildnet0c"&gt;完全マスター：日本語能力試験１・２レブル：語彙&lt;/a&gt;&amp;nbsp;&lt;/li&gt;&lt;/ol&gt;&lt;li&gt;Finally, if you are thinking of living and working in Japan, I highly recommend getting a copy of &lt;a href="http://www.amazon.co.jp/%E6%95%AC%E8%AA%9E%E3%81%93%E3%82%8C%E3%81%A0%E3%81%91BOOK-%E5%94%90%E6%B2%A2-%E6%98%8E/dp/4880861715/ref=pd_bxgy_b_img_b/376-8095239-8536904"&gt;敬語これだけBOOK&lt;/a&gt;.&amp;nbsp; I picked this up on a whim while waiting in line at a bookstore and simply cannot recommend it enough.&amp;nbsp; People will tell you that you don't need to know &lt;a href="http://en.wikipedia.org/wiki/Honorific_speech_in_Japanese"&gt;敬語&lt;/a&gt;(&lt;i&gt;keigo&lt;/i&gt;)...they are lying.&amp;nbsp; Unless you have a significant other who can take care of your housing arrangements you will need &lt;i&gt;keigo&lt;/i&gt;.&amp;nbsp; Unless you work for a foreign company (where you can speak English) or you have no intention of working or researching in a professional office environment, you will need &lt;i&gt;keigo&lt;/i&gt;.&amp;nbsp; This book is extremely easy to understand; it consists of a series of situations where &lt;i&gt;keigo&lt;/i&gt; would be appropriate and tells you 3 acceptable phrases -- ranked "good", "better", and "best" -- for each scenario along with a brief explanation why one phrase might be better than another.&amp;nbsp; This books was written for young people in Japan, who also have trouble with honorific speech, so the opposing page consists of 3 common mistakes with explanations of why the phrases are wrong.&amp;nbsp; As a non-native speaker, you can reasonably skip reading the mistake page -- if nothing else, skipping it will make sure that you don't have the wrong words floating around in your head ready to slip out when it matters most.&amp;nbsp; Seriously, get this book.&lt;/li&gt;&lt;/ol&gt;Other than that, I highly recommend the full 3-course Pimsleur Japanese language program to anyone getting started with learning Japanese.&amp;nbsp; I'd go so far as to suggest that you complete the entire first course -- 30 lessons -- before you even start with the Japanese for Busy People books.&amp;nbsp; Buying the series new is pricey, so check with your local library, E-bay, or Craigslist for a used copy.&lt;br /&gt;&lt;br /&gt;Finally, if you are in the San Francisco Bay Area, you have a great local resource in &lt;a href="http://sokogakuen.org/"&gt;Soko Gakuen&lt;/a&gt;.&amp;nbsp; It is a non-profit language school associated with the Buddhist church in San Francisco's Japantown.&amp;nbsp; The classes are reasonably-priced, have small class sizes, and are taught by great teachers.&amp;nbsp; My wife and I took classes there every quarter for over 6 years.&lt;br /&gt;&lt;br /&gt;So, what now?&lt;br /&gt;&lt;br /&gt;Next up, we are trying our hands at learning French (hence the title of this post).&amp;nbsp; We started the same way we had success with learning Japanese: with the Pimsleur Language Program.&amp;nbsp; We're still on the first course, but so far, so good.&amp;nbsp; Here's hoping that our studies will, again, lead to something rewarding.&lt;br /&gt;&lt;br /&gt;Happy New Year!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-7941847416454737193?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/7941847416454737193/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=7941847416454737193' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/7941847416454737193'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/7941847416454737193'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2012/01/bon-nouvel.html' title='Bon Nouvel An'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-5186536277143762900</id><published>2011-12-12T10:57:00.000-08:00</published><updated>2011-12-12T11:04:42.957-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='economics'/><category scheme='http://www.blogger.com/atom/ns#' term='inequity'/><category scheme='http://www.blogger.com/atom/ns#' term='fun'/><title type='text'>That's a lot of dough</title><content type='html'>As we prepare to celebrate another &lt;a href="http://www.dailykos.com/story/2011/12/07/1043036/-Jon-Stewart-declares-a-War-on-Christmas!"&gt;happy end of the fiscal fourth quarter&lt;/a&gt;, the good folks over at &lt;a href="http://xkcd.com/"&gt;xkcd.com&lt;/a&gt; have prepared an &lt;a href="http://xkcd.com/980/"&gt;awesome infographic&lt;/a&gt; reminding us what a dollar is worth. &amp;nbsp;Click to see an intelligibly-sized image:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://xkcd.com/980/huge/"&gt;&lt;img border="0" height="265" src="http://imgs.xkcd.com/comics/money.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-5186536277143762900?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/5186536277143762900/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=5186536277143762900' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/5186536277143762900'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/5186536277143762900'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2011/12/thats-lot-of-dough.html' title='That&apos;s a lot of dough'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-625090134198303458</id><published>2011-11-30T22:15:00.003-08:00</published><updated>2011-11-30T22:30:30.495-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='life'/><category scheme='http://www.blogger.com/atom/ns#' term='Internet'/><title type='text'>Wither posi.net</title><content type='html'>I first registered the domain name posi.net back in 1995 during the great domain name gold rush.  OK, so I was a little late to the party and all the good names were taken, but I was pretty happy to get a short domain name.  I also kept the e-mail address kbyanc@posi.net until last year, when the volume of spam overwhelmed the little 233Mhz &lt;a href="http://soekris.com/products/net4801.html"&gt;Soekris box&lt;/a&gt; I've been using as my firewall, mail, web, and home file server.&lt;br /&gt;&lt;br /&gt;Earlier this year, I stopped renewing my Dynamic DNS service, effectively taking posi.net offline.  And this month, after 16 years, I decided not to renew my domain registration.&lt;br /&gt;&lt;br /&gt;I never really did much with the posi.net domain -- I mostly just used it to host my open source code repositories and a few toy web sites.  I've been slowly working on converting the toy web sites to run on &lt;a href="http://code.google.com/appengine/"&gt;Google App Engine&lt;/a&gt; and am thinking of uploading the open source repositories to &lt;a href="https://github.com/"&gt;github&lt;/a&gt;.  I'm not sure where I'm going to host my resume, but I'm not in any hurry to figure that one out.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-625090134198303458?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/625090134198303458/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=625090134198303458' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/625090134198303458'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/625090134198303458'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2011/11/wither-posinet.html' title='Wither posi.net'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-13956757028031413</id><published>2011-11-20T22:26:00.007-08:00</published><updated>2011-11-20T23:26:52.787-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rants'/><title type='text'>We the people</title><content type='html'>...apparently flunked our high school government classes.&lt;br /&gt;&lt;br /&gt;As you probably know, the Obama administration has set up a &lt;a href="https://wwws.whitehouse.gov/petitions#%21/how-why/introduction"&gt;"We the people" section&lt;/a&gt; on the White House web site so as to solicit petitions from the American people.  While there are a few well thought-out petitions, the majority just serve to demonstrate that many Americans have no idea how our federal government is designed to work nor what the function of the Executive branch is.  For example:&lt;ul&gt;&lt;li&gt;&lt;a href="https://wwws.whitehouse.gov/petitions#%21/petition/amend-constitution-making-internet-unalienable-right/YJ3fXQcm"&gt;Amend the Constitution, making the Internet an unalienable right.&lt;/a&gt;  Newsflash: the president does not have the power to add amendments to the constitution.  &lt;a href="http://usgovinfo.about.com/od/usconstitution/a/constamend.htm"&gt;Not even close&lt;/a&gt;. Petition for it all you want, he can't make this happen.&lt;/li&gt;&lt;li&gt;&lt;a href="https://wwws.whitehouse.gov/petitions#%21/petition/void-voting-results-took-place-nicaragua-past-sunday-06-november-due-fraud-fsln/l77zCGHH"&gt;Void the voting results that took place in Nicaragua this past Sunday 06 of November due to fraud by the FSLN&lt;/a&gt;.  Seriously? He's the President of the &lt;span style="font-style: italic;"&gt;United States&lt;/span&gt;.  When did Nicaragua become a state?&lt;/li&gt;&lt;li&gt;&lt;a href="https://wwws.whitehouse.gov/petitions#%21/petition/legalize-mixed-martial-arts-new-york/rV1fMfZ7"&gt;Legalize Mixed Martial Arts in New York&lt;/a&gt;.  The President doesn't pass laws, much less state laws.  You too are barking up the wrong tree.&lt;/li&gt;&lt;li&gt;&lt;a href="https://wwws.whitehouse.gov/petitions/%21/petition/re-establish-and-maintain-separation-between-investment-banks-and-commercial-banks/ywCMKDfn"&gt;Re-establish and maintain the separation between investment banks and commercial banks&lt;/a&gt;.  I'm 100% for the restoration of the &lt;a href="http://en.wikipedia.org/wiki/Glass-Steagall_Act"&gt;Glass-Steagall Act&lt;/a&gt;...but the President doesn't pass laws.  You need to petition your Congress-critters to get this done, not the Obama administration.&lt;/li&gt;&lt;li&gt;&lt;a href="https://wwws.whitehouse.gov/petitions#%21/petition/bar-courts-and-lawmakers-creating-second-class-religion-status-minority-religions-wicca-neopaganism/SKGx6wJV"&gt;Bar courts and lawmakers from a "second-class religion" status for minority religions like &lt;/a&gt;&lt;a href="https://wwws.whitehouse.gov/petitions#%21/petition/bar-courts-and-lawmakers-creating-second-class-religion-status-minority-religions-wicca-neopaganism/SKGx6wJV"&gt;Wicca and NeoPaganism&lt;/a&gt;.  He's the President, not Dictator; he can neither tell courts nor lawmakers what to do.  Have you not heard of the &lt;a href="http://en.wikipedia.org/wiki/Separation_of_powers#United_States:_three_branches"&gt;separation of powers&lt;/a&gt;?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="https://wwws.whitehouse.gov/petitions#%21/petition/actually-take-these-petitions-seriously-instead-just-using-them-excuse-pretend-you-are-listening/grQ9mNkN"&gt;Actually take these petitions seriously instead of just using them as an excuse to pretend you are listening&lt;/a&gt;.  See above.  I imagine it is hard to respond to petitions demanding the President to do things he has no legal power to do.  Well, respond with something other than "/facepalm", that is.&lt;/li&gt;&lt;/ul&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/-XpcbQTCyB60/Tsn8cjXz97I/AAAAAAAAAI4/HPSewvmDOMw/s1600/obama-facepalm.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 222px;" src="http://1.bp.blogspot.com/-XpcbQTCyB60/Tsn8cjXz97I/AAAAAAAAAI4/HPSewvmDOMw/s320/obama-facepalm.jpg" alt="" id="BLOGGER_PHOTO_ID_5677346372738873266" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;I'm sure some of the authors of the above petitions would try and defend their misdirected efforts at government participation by pointing out that neither the Senate nor the House of Representatives offers a similar venue for soliciting petitions.  That is true, and it is unfortunate.  But that doesn't change the fact that the White House cannot act on many of the petitions.  And, when some staffer writes &lt;a href="https://wwws.whitehouse.gov/petitions#%21/response/promoting-innovation-and-competitive-markets-through-quality-patents"&gt;a lengthy explanation&lt;/a&gt; of what the Executive branch has been doing to try and support your cause, it is doubly unfortunate that you don't seem to comprehend that it is all that he &lt;span style="font-style: italic;"&gt;can&lt;/span&gt; do to support your cause.&lt;br /&gt;&lt;br /&gt;If you want to change the laws, you need to write your Congressman.  It isn't the President's job to get your Congressman to vote the way you want.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-13956757028031413?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/13956757028031413/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=13956757028031413' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/13956757028031413'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/13956757028031413'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2011/11/we-people.html' title='We the people'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-XpcbQTCyB60/Tsn8cjXz97I/AAAAAAAAAI4/HPSewvmDOMw/s72-c/obama-facepalm.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-3211580458545158375</id><published>2011-11-05T17:24:00.004-07:00</published><updated>2011-11-05T19:12:48.438-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='reviews'/><category scheme='http://www.blogger.com/atom/ns#' term='life'/><title type='text'>Ken Burns: The National Parks</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/-ep6H13dAjPI/TrXs6TZTG8I/AAAAAAAAAIg/WqCd9rr_ux8/s1600/wallpaper_olympic_240x320.jpg"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 240px; height: 320px;" src="http://4.bp.blogspot.com/-ep6H13dAjPI/TrXs6TZTG8I/AAAAAAAAAIg/WqCd9rr_ux8/s320/wallpaper_olympic_240x320.jpg" alt="" id="BLOGGER_PHOTO_ID_5671699792125959106" border="0" /&gt;&lt;/a&gt;We finished watching six of the most inspirational movies I've ever seen: the six part series that is &lt;a href="http://www.pbs.org/nationalparks/"&gt;Ken Burns' The National Parks: America's Best Idea&lt;/a&gt;.  Each part runs at a little over 2 hours long, full of American history set to the most beautiful scenery in the country.&lt;br /&gt;&lt;br /&gt;Starting with the founding of the first national parks, with Yosemite and Yellowstone, and continuing through to the present, the series chronicles the American values that led to the creation of the national park system.  And, rather than just painting the picture in broad stokes, the series follows the individuals who fought to establish the parks for the common good as well as those who wanted to exploit the land for private gain.&lt;br /&gt;&lt;br /&gt;I can't recommend the series enough.  Of course, &lt;a href="http://www.pbs.org/nationalparks/tv-schedules/"&gt;PBS airs them&lt;/a&gt; from time to time, but you can also watch them on &lt;a href="http://www.netflix.com/Movie/Ken-Burns-The-National-Parks-America-s-Best-Idea/70119960?strkid=1387143234_0_0&amp;amp;lnkctr=srchrd-sr&amp;amp;strackid=14f53949afaec559_0_srl&amp;amp;trkid=222336"&gt;Netflix&lt;/a&gt; (which is what we did).  The visuals are breathtaking, the history illuminating, and the issues as topical today as they were 150 years ago.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-3211580458545158375?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/3211580458545158375/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=3211580458545158375' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/3211580458545158375'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/3211580458545158375'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2011/11/ken-burns-national-parks.html' title='Ken Burns: The National Parks'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-ep6H13dAjPI/TrXs6TZTG8I/AAAAAAAAAIg/WqCd9rr_ux8/s72-c/wallpaper_olympic_240x320.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-5666899610339888337</id><published>2011-09-07T14:30:00.006-07:00</published><updated>2011-09-07T14:56:27.996-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='phishing'/><category scheme='http://www.blogger.com/atom/ns#' term='business'/><title type='text'>Ingenious fraud</title><content type='html'>I just got a SMS from 503-929-3160 with the text&lt;blockquote&gt;WELLS FARGO ALERT: Your ATM CARD has been DEACTIVATED.  Please contact us at: 650-550-9255.&lt;/blockquote&gt;&lt;br /&gt;There were 2 tip-offs that this was a fraud: first, the stereotypical use of unnecessary capitalization and, second, the fact that I don't have an account with Wells Fargo.&lt;br /&gt;&lt;br /&gt;Out of curiosity, I called the number to be greeted with an automated voice claiming to be the Wells Fargo card activation line and asking me to enter my 16 digit card number.  I entered a bogus card number (sixteens ones) and was promptly cut off.  &lt;a href="http://www.google.com/webhp?hl=en#hl=en&amp;site=webhp&amp;sa=X&amp;ei=YOhnTvLUOKrkiAKkheWtDQ&amp;ved=0CBUQvwUoAQ&amp;q=wells+fargo+sms+activation+fraud&amp;spell=1&amp;bav=on.2,or.r_gc.r_pw.&amp;fp=67cca108e1ea2034&amp;biw=1236&amp;bih=892"&gt;Rumor has it that&lt;/a&gt; if you enter something with a valid check digit that the automated service will then prompt for your PIN number and then proceed to drain your account empty.&lt;br /&gt;&lt;br /&gt;The ingenious part of this scam is that it relies on the fact that there is no way to authenticate who sent a SMS.  With online phishing attacks you can look at the URL to confirm that you are dealing with the entity that you expect.  In addition, banks and other high-profile web sites get &lt;a href="http://en.wikipedia.org/wiki/Extended_Validation_Certificate"&gt;Extended Verification Certificates&lt;/a&gt; for their websites to help make it more clear when you are interacting with the real thing.  But there is no such thing for text messages: you just see a phone number.  How many people know the phone number of their bank and/or have entered it into their phone's address book?&lt;br /&gt;&lt;br /&gt;With services like &lt;a href="http://www.twilio.com/api/"&gt;Twilio&lt;/a&gt; making it trivial for ne'er-do-wells to extend their phishing attacks out of cyberspace into telephony, I suspect we'll be seeing more of these types of fraud attempts in the future.  Of course, savvy people will never trust random text messages, but that still leaves a huge potential target for increasingly sophisticated fraud.  God knows I hope my mother doesn't get one of these texts.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-5666899610339888337?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/5666899610339888337/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=5666899610339888337' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/5666899610339888337'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/5666899610339888337'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2011/09/ingenious-fraud.html' title='Ingenious fraud'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-3016148276860987486</id><published>2011-08-18T20:21:00.004-07:00</published><updated>2011-08-18T20:26:23.186-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='life'/><title type='text'>Introducing Jamie</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/-w3Qr7n8GXCU/Tk3XepwsDSI/AAAAAAAAAII/V-FhstOylQQ/s1600/Jamie-and-Cristin.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 299px; height: 400px;" src="http://2.bp.blogspot.com/-w3Qr7n8GXCU/Tk3XepwsDSI/AAAAAAAAAII/V-FhstOylQQ/s400/Jamie-and-Cristin.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5642402829771214114" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Born 4:30am this morning at 20 inches long and 9 pounds.  Both he and Mom are doing fine.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-3016148276860987486?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/3016148276860987486/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=3016148276860987486' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/3016148276860987486'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/3016148276860987486'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2011/08/introducing-jamie.html' title='Introducing Jamie'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-w3Qr7n8GXCU/Tk3XepwsDSI/AAAAAAAAAII/V-FhstOylQQ/s72-c/Jamie-and-Cristin.jpg' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-4840554008002218572</id><published>2011-07-04T17:26:00.004-07:00</published><updated>2011-07-04T18:22:57.962-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='economics'/><category scheme='http://www.blogger.com/atom/ns#' term='housing'/><category scheme='http://www.blogger.com/atom/ns#' term='rants'/><title type='text'>The "Keep Houses Unaffordable" Initiative</title><content type='html'>In a misguided attempt to prop up the "values" of homes, the Federal Government is &lt;a href="http://finance.yahoo.com/loans/article/113040/more-money-for-struggling-homeowners-smartmoney?mod=loans-home"&gt;giving free money to people who bought houses they couldn't afford&lt;/a&gt; by extending low- or zero-interest loans with an option to not repay the loan.  There are two separate programs: the &lt;a href="http://portal.hud.gov/hudportal/HUD?src=/program_offices/housing/sfh/hcc/ehlp/how"&gt;HUD Emergency Homeowners' Loan Program&lt;/a&gt; and the Treasury's &lt;a href="http://www.treasury.gov/initiatives/financial-stability/housing-programs/hhf/Pages/default.aspx"&gt;Hardest Hit Fund&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;As a responsible family that did not overextend ourselves to by a house that we couldn't afford, this is just a slap in the face.  I don't begrudge people who bought homes and have now fallen on hard times...although the possibility of job-loss is supposed to factor into the calculation of how much house you can afford.  No, I'm irritated because these programs are feel-good attempts to prop up the still-overpriced housing market so that banks don't have to recognize the true value of their mortgage-backed assets.  You see, as a lender, banks should care about the borrowers ability to repay.  So long as the government is willing to step in and pay when borrowers can't, it just reinforces bad lending practices.&lt;br /&gt;&lt;br /&gt;Meanwhile, keeping home prices high is in no way good for us little people.  It doesn't help people to have the burden of a home they can't afford hanging like an albatross around their necks.  It doesn't help young families (such as my own) buy their first home...in fact, it actively obstructs that.  Unless income rises to the point that homes are no longer ridiculously overpriced, which -- &lt;a href="http://www.workinglife.org/wiki/Wages+and+Benefits%3A+Real+Wages+%281964-2004%29"&gt;with real wages falling for 40 years&lt;/a&gt; -- doesn't seem likely, it does nothing to make homes more affordable.  And affordability is the real problem with the housing market.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-4840554008002218572?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/4840554008002218572/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=4840554008002218572' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/4840554008002218572'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/4840554008002218572'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2011/07/keep-houses-unaffordable-initiative.html' title='The &quot;Keep Houses Unaffordable&quot; Initiative'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-8932341507721383703</id><published>2011-06-20T20:19:00.006-07:00</published><updated>2011-07-04T18:22:01.246-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='economics'/><category scheme='http://www.blogger.com/atom/ns#' term='rants'/><title type='text'>The Robber Barons of the 21st Century</title><content type='html'>I guess this is old news for subscribers of Rolling Stone, but I just ran across &lt;a href="http://www.rollingstone.com/politics/news/the-great-american-bubble-machine-20100405"&gt;this excellent article&lt;/a&gt; they published in 2009 regarding the role the Goldman Sachs plays in the U.S. economy.  In contrast to the random sound bites that fill so much of our media, it is well-researched article that it well worth the long read.  Here is &lt;a href="http://www.rollingstone.com/politics/news/the-great-american-bubble-machine-20100405?print=true"&gt;a link directly to the print version&lt;/a&gt; so you don't have to click through the 8 pages.&lt;br /&gt;&lt;br /&gt;If, after reading that article, you are left with any doubt regarding Goldman Sachs' rigging of the U.S. economy in favor of themselves (not even their investors...just the bankers!), &lt;a href="http://online.wsj.com/article/SB10001424052702304186404576389680225394642.html"&gt;here is a current article&lt;/a&gt; from the Wall Street Journal chronicling their manipulation of the aluminum commodities market.&lt;br /&gt;&lt;br /&gt;Folks, deregulation has gone too far.  Over the last 25 years, Goldman Sachs has spearheaded the dismantling of the protections put in place in the wake of the Great Depression and look where it has gotten us.&lt;br /&gt;&lt;dl&gt;&lt;dt&gt;&lt;b&gt;Update 2011/07/04&lt;/b&gt;:&lt;/dt&gt;&lt;dd&gt;The Wall Street Journal has replaced their article with a partial snippet.  Here are a &lt;a href="http://www.nasdaq.com/aspx/stock-market-news-story.aspx?storyid=201106161444dowjonesdjonline000635&amp;title=2nd-updategoldman-under-fire-from-aluminum-users-over-warehouse-delays"&gt;few&lt;/a&gt; &lt;a href="http://www.dailykos.com/story/2011/06/19/986854/-Goldman-uses-Artificial-Aluminum-Bottleneck-to-Squeeze-Coca-Cola"&gt;more&lt;/a&gt; &lt;a href="http://agmetalminer.com/2011/06/29/are-glencore-jp-morgan-and-goldman-sachs-scamming-the-lme-warehouse-system/"&gt;articles&lt;/a&gt; on Goldman Sachs' manipulation of the aluminum commodities market.&lt;/dd&gt;&lt;/dl&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-8932341507721383703?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/8932341507721383703/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=8932341507721383703' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/8932341507721383703'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/8932341507721383703'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2011/06/robber-barrons-of-21st-century.html' title='The Robber Barons of the 21st Century'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-2999015235127968408</id><published>2011-06-16T20:16:00.004-07:00</published><updated>2011-06-16T20:26:38.991-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rants'/><title type='text'>I can haz free house?</title><content type='html'>In case anyone was wondering, &lt;a href="http://money.cnn.com/2011/06/09/real_estate/foreclosure_squatter/index.htm"&gt;I'd like a free house&lt;/a&gt;.  Shoot, I'm not greedy, I'd settle for just not paying rent for a couple of years.  Oh, and some &lt;a href="http://www.nytimes.com/packages/html/national/200904_CREDITCRISIS/recipients.html"&gt;free money&lt;/a&gt; too.  Thanks!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-2999015235127968408?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/2999015235127968408/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=2999015235127968408' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/2999015235127968408'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/2999015235127968408'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2011/06/i-can-haz-free-house.html' title='I can haz free house?'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-4767054194329984323</id><published>2011-04-05T22:17:00.005-07:00</published><updated>2011-04-05T23:18:31.767-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='economics'/><category scheme='http://www.blogger.com/atom/ns#' term='housing'/><category scheme='http://www.blogger.com/atom/ns#' term='inequity'/><title type='text'>Personal Exemption</title><content type='html'>As part of my research while implementing &lt;a href="http://mortgage-estimator.appspot.com/"&gt;my mortgage estimator&lt;/a&gt; I discovered that, in addition to the standard deduction, the federal income tax code includes a &lt;a href="http://en.wikipedia.org/wiki/Personal_exemption_%28United_States%29"&gt;personal exemption&lt;/a&gt;.  Together, these two are intended to prevent subsistence-level income from being taxed.  In other words, Congress intended to shelter the lowest rungs of society from taxation.&lt;br /&gt;&lt;br /&gt;Now, obviously, the richer you get the less you need the personal exemption...when you make $200,000/year there is no risk of not being able to afford to eat.  Accordingly, the IRS phased-out the amount of the personal exemption one could claim on their federal taxes as their income increased.  For example, in 2009, the personal exemption was $3,650 but, for couples filing jointly whose adjusted gross income exceeded $372,700 the personal exemption was reduced to $2,433.&lt;br /&gt;&lt;br /&gt;It is only a $1,217 difference, which at the maximum marginal tax rate would only amount to a little over $400 per person.  Hardly a drop in the bucket for a couple making $372,700/year.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/-09NLwGK0mMQ/TZwDyFSd4QI/AAAAAAAAAH8/xZWAGdsN-nU/s1600/monopoly2.jpg"&gt;&lt;img style="float: right; margin: 0pt 0pt 10px 10px; cursor: pointer; width: 210px; height: 194px;" src="http://4.bp.blogspot.com/-09NLwGK0mMQ/TZwDyFSd4QI/AAAAAAAAAH8/xZWAGdsN-nU/s320/monopoly2.jpg" alt="" id="BLOGGER_PHOTO_ID_5592348996235288834" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;But the &lt;a href="http://www.taxpolicycenter.org/press/press-resources-pep.cfm"&gt;personal exemption phaseout&lt;/a&gt; was eliminated under President Bush's 2001 tax reforms...effective 2010.  Besides ignoring the intent of the personal exemption, were the richest 1% of Americans really hurting for $400?&lt;br /&gt;&lt;br /&gt;Fortunately, this is one tax cut for the rich that won't be sticking around: the budget proposals for 2011 &lt;a href="http://www.taxfoundation.org/news/show/26118.html"&gt;restore the personal exemption phaseout&lt;/a&gt;.  I hope they spent their one-time $400 windfall wisely.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-4767054194329984323?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/4767054194329984323/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=4767054194329984323' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/4767054194329984323'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/4767054194329984323'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2011/04/personal-exemption.html' title='Personal Exemption'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-09NLwGK0mMQ/TZwDyFSd4QI/AAAAAAAAAH8/xZWAGdsN-nU/s72-c/monopoly2.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-770459287861997129</id><published>2011-04-01T09:49:00.005-07:00</published><updated>2011-04-01T10:22:41.523-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='inequity'/><category scheme='http://www.blogger.com/atom/ns#' term='rants'/><title type='text'>It is hard being rich</title><content type='html'>As Republican Representative Sean Duffy reminds us, it is hard to live on almost 200 grand a year:&lt;br /&gt;&lt;iframe title="YouTube video player" width="480" height="390" src="http://www.youtube.com/embed/cAAtSVQyXZU" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;I guess that is &lt;a href="http://www.washingtonpost.com/wp-dyn/content/article/2007/06/27/AR2007062700097.html"&gt;why the ultra-rich need to pay a lower tax rate than the rest of us&lt;/a&gt;...it must be tough at the top.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-770459287861997129?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/770459287861997129/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=770459287861997129' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/770459287861997129'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/770459287861997129'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2011/04/it-is-hard-being-rich.html' title='It is hard being rich'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/cAAtSVQyXZU/default.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-2339989129368749805</id><published>2011-03-16T22:48:00.005-07:00</published><updated>2011-03-20T12:15:15.660-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='economics'/><category scheme='http://www.blogger.com/atom/ns#' term='housing'/><title type='text'>Yet Another Mortgage Estimator</title><content type='html'>The New York Times has &lt;a href="http://www.nytimes.com/interactive/business/buy-rent-calculator.html"&gt;a really slick rent-versus-buy calculator&lt;/a&gt;; that site has everything you need to compare renting versus taking on a mortgage.  I can't recommend it it highly enough.&lt;br /&gt;&lt;br /&gt;One thing that the New York Times' calculator confirms is that renting is always better than buying in Silicon Valley.  You would need to stay in the same house for about 40 years before it became cheaper than renting for the same period of time.&lt;br /&gt;&lt;br /&gt;But "wait!", you say, " you are just throwing your money away when you rent."  That is true.  But it turns out that housing prices are so high in Silicon Valley, that you actually throw away &lt;i&gt;more&lt;/i&gt; money in interest when you take on a mortgage to buy a house (or condo even).&lt;br /&gt;&lt;br /&gt;It is at this point someone helpfully adds, "but you can deduct interest from your taxes".&lt;br /&gt;&lt;br /&gt;So the questions are:&lt;ol&gt;&lt;li&gt;How much money do you "throw away" paying mortgage?&lt;/li&gt;&lt;li&gt;And, how much of that do you "get back" from Uncle Sam via the federal mortgage interest deduction tax break?&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;The first is pretty easy to answer; any loan amortization table will tell you how much interest you pay given a loan amount, interest rate, and number of years you'll be borrowing the money.  The second is a little more complicated.  Let me explain:&lt;br /&gt;&lt;br /&gt;The federal mortgage interest deduction is just that: it allows you to deduct the amount of money you paid in mortgage interest from your income for that year.  In other words, it is as if you never made that money.  So, if you earn $60,000 in gross income and pay $12,000 in mortgage interest, Uncle Sam will pretend you only earned $48,000 for the sake of calculating your federal income tax.&lt;br /&gt;&lt;br /&gt;That wouldn't mean that you get $12,000 off your federal income tax, though; it just reduces the amount of income you have to pay tax on.  Meanwhile, you only get to deduct the mortgage interest if you itemize your deductions.  This means more work for you in preparing your taxes, but more importantly, it means that you have to give up the "standard deduction".  The standard deduction is the amount that everyone is entitled to deduct from their gross income; but you can't take both the standard deduction &lt;b&gt;and&lt;/b&gt; an itemized deduction at the same time.  So you only want to take an itemized deduction if it would be greater than your standard deduction.  For a married couple filing jointly the &lt;a href="http://www.irs.gov/pub/irs-drop/rp-11-12.pdf"&gt;standard deduction in 2011&lt;/a&gt; will be $11,600.&lt;br /&gt;&lt;br /&gt;Going back to the previous example, if you paid $12,000 in mortgage interest you could itemize your deductions and reduce your taxable income by $12,000 or you could not itemize and take the standard deduction of $11,600.  With a hypothetical $60,000 of gross income, itemizing would bring your taxable income down to just $48,000 versus $48,400 without itemizing.  Obviously, in this case, the itemized deduction leaves less of your money subject to federal tax, so you would want to take that.  But it should also be clear that the benefit of the federal mortgage interest deduction is not really $12,000 since, if you didn't have a mortgage, you could still deduct $11,600.  So the tax break is really worth the difference between an itemized deduction and the standard deduction...or just $400.  But it isn't worth $400 either because it just means that $400 less of your money is taxed; at $60,000 your marginal tax rate would be 15% so the difference in tax is just $400 x 15%, or $60.&lt;br /&gt;&lt;br /&gt;That's right, the federal income tax break on $12,000 of mortgage interest is a whopping $60.&lt;br /&gt;&lt;br /&gt;The value of the deduction depends on your taxable income and the amount of mortgage interest you pay each year.  The amount of mortgage interest you pay goes down as you pay back principle so the value of the tax break also goes down each year.&lt;br /&gt;&lt;br /&gt;Anyway, I think you get the idea...calculating the value of the federal mortgage interest deduction isn't trivial.  Basically, you have to do your taxes twice, once itemizing to take the mortgage interest deduction and again with the standard deduction, each year, in order to calculate the total value of the tax break.&lt;br /&gt;&lt;br /&gt;So I made my own mortgage estimator that approximates the value of the mortgage interest deduction and, factoring that number in, tells you how much money you actually "throw away" on mortgage interest.  It also amortizes the after-tax-break interest over the number of months you plan to live in the house, which yields a number comparable to the amount you would "throw away" on rent.&lt;br /&gt;&lt;br /&gt;My calculator is here: &lt;a href="http://mortgage-estimator.appspot.com/"&gt;http://mortgage-estimator.appspot.com/&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The &lt;kbd&gt;Loan Amount&lt;/kbd&gt;, &lt;code&gt;Interest Rate&lt;/code&gt;, and &lt;code&gt;Term&lt;/code&gt; fields are used to calculate the amortization table for the mortgage and hopefully are self-explanatory.  You can also input the loan amount by entering the &lt;code&gt;Home Price&lt;/code&gt; and &lt;code&gt;Down Payment&lt;/code&gt;; in which case, how much equity you are putting down is displayed next to the &lt;code&gt;Down Payment&lt;/code&gt; as a percentage.&lt;br /&gt;&lt;br /&gt;The &lt;code&gt;Gross Income&lt;/code&gt;, &lt;code&gt;Filing Status&lt;/code&gt;, and &lt;code&gt;Children&lt;/code&gt; (actually, dependents) fields are used to estimate your federal tax obligations.  The tax estimator is pretty simple; it doesn't know anything about the more obscure deductions nor does it handle investment income, but I believe it is sufficient for its purpose in comparing your hypothetical tax obligation with and without the mortgage deduction.&lt;br /&gt;&lt;br /&gt;Finally, the &lt;code&gt;Expected Residency&lt;/code&gt; field is an acknowledgement that none of us are likely to live in the same house for the rest of our lives; here you can enter the number of years you expect to live in the home.  This is important in the "how much money am I throwing away in interest" calculation because mortgage interest -- like all loan interest -- is front-end loaded.  You pay more interest at the beginning of your loan and more principle towards the end.  So the fewer years you live in the house before you sell it, the higher your paid interest-to-principle ratio will be.&lt;br /&gt;&lt;br /&gt;And now for the minutia:&lt;ul&gt;&lt;li&gt;All numbers are rounded when they are displayed.  So $31.586 will be displayed as $31.59 and $16.134 will be displayed as $16.13; their difference is $15.452 so will be displayed as $15.45 not $15.46.  Not that you should expect this &lt;i&gt;estimator&lt;/i&gt; to be accurate to the penny anyway.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;The estimator does not currently take into account &lt;a href="http://en.wikipedia.org/wiki/Lenders_mortgage_insurance"&gt;private mortgage insurance&lt;/a&gt; nor &lt;a href="http://hud.gov/buying/loans.cfm"&gt;FHA loan assistance programs&lt;/a&gt;.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;The estimator does not currently take into account state taxes and any possible state-specific home ownership incentives.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-2339989129368749805?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/2339989129368749805/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=2339989129368749805' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/2339989129368749805'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/2339989129368749805'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2011/03/yet-another-mortgage-estimator.html' title='Yet Another Mortgage Estimator'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-8446177729320409084</id><published>2011-03-14T14:26:00.002-07:00</published><updated>2011-03-14T15:00:02.688-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rants'/><title type='text'>More TSA lunacy</title><content type='html'>As if the TSA's gratuitous strip-searches at the airport weren't enough, they've branched out into train travel too.  You know, in case someone gets the bright idea of highjacking a train and running it into a skyscraper.  But seriously, &lt;a href="http://m.gizmodo.com/5768805/tsa-harasses-9+yo-boy-and-other-train-passengers-after-their-trip"&gt;groping people as they get off the train&lt;/a&gt;?  What could the logic possibly be?  Certainly not safety: the trip had already concluded incident-free.&lt;br /&gt;&lt;br /&gt;We are paying perverts to do nothing of value.&lt;br /&gt;&lt;br /&gt;So this is what it has come to?  The American taxpayer shells out &lt;a href="http://travel.usatoday.com/alliance/flights/boardingarea/post/2011/03/Flying-With-Fish---TSA8217s-Budget-8230-can-they-justify-it/147071/1"&gt;8.1 billion dollars a year&lt;/a&gt; to get felt up by strangers while &lt;a href="http://www.deseretnews.com/article/700113903/PBS-faces-new-threat-in-federal-budget.html"&gt;our lawmakers fight to kill Big Bird to save 451 million dollars&lt;/a&gt;.  I'd like to actually meet the people who think paying perverts to feel up law-abiding people &lt;b&gt;after&lt;/b&gt; they demonstratively proved they are no threat is a better use of our tax dollars than, well, anything.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-8446177729320409084?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/8446177729320409084/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=8446177729320409084' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/8446177729320409084'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/8446177729320409084'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2011/03/more-tsa-lunacy.html' title='More TSA lunacy'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-801528130220566830</id><published>2011-02-03T12:15:00.006-08:00</published><updated>2011-03-13T20:45:26.926-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rants'/><title type='text'>Dear Amtrak</title><content type='html'>Dear Amtrak,&lt;br /&gt;&lt;br /&gt;  A bus is not a train.  If I wanted to take a bus, I'd go to &lt;a href="http://www.greyhound.com/"&gt;greyhound.com&lt;/a&gt; and plan my trip.  But I didn't; I went to &lt;a href="http://www.amtrak.com/"&gt;amtrak.com&lt;/a&gt; because I wanted to plan a &lt;i&gt;train&lt;/i&gt; trip.  To that end, I want:&lt;ol&gt;&lt;li&gt;A list of actual train stations, not bus terminals&lt;/li&gt;&lt;li&gt;A map of train routes and their transfer points&lt;/li&gt;&lt;li&gt;An option on your trip planner to &lt;b&gt;not&lt;/b&gt; include bus routes&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;  Look, I'm not stupid; I realize you can't stop in every city.  But I don't expect you to.  If I'm planning a cruise, I can go to &lt;a href="http://www.carnival.com"&gt;carnival.com&lt;/a&gt;, and they provide me a list of departure ports to choose from. They don't claim to service Omaha, Nebraska and, when I choose Omaha, offer a trip that includes a bus to New Orleans.  But that is exactly what your retarded web site does when I try to plan a train trip.&lt;br /&gt;&lt;br /&gt;  So, please Amtrak, don't make it so damn hard to use your service.  With the TSA intent on ogling and fondling our wives and children, you've got a great chance to win the business of &lt;a href="http://wewontfly.com/"&gt;concerned middle-class citizens&lt;/a&gt;.  President Obama even threw you a bone in his &lt;a href="http://www.npr.org/2011/01/26/133224933/transcript-obamas-state-of-union-address"&gt;State of the Union address&lt;/a&gt;.  But here's a newsflash: while train travel can compensate for being slow by being nostalgic, bus travel is slow, uncomfortable, and generally un-cool.&lt;br /&gt;&lt;br /&gt;  So quit hiding behind the transport of last resort, the bus, and take a page from the cruise lines: some of us are as interested in the trip as we are in the destination.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-801528130220566830?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/801528130220566830/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=801528130220566830' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/801528130220566830'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/801528130220566830'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2011/02/dear-amtrak.html' title='Dear Amtrak'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-7101738487214374768</id><published>2010-12-02T19:11:00.008-08:00</published><updated>2010-12-02T21:42:33.885-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='economics'/><title type='text'>Personal income taxes and job creation</title><content type='html'>With elections over, the issue of whether to extend the Bush-era personal income tax cuts to families earning over $250,000 a year is back in the news.  Currently, there is a 33% tax bracket that affects income in excess of $209,250 and a 35% tax bracket for income in excess of $372,950 (for joint filers).  So, in effect, under the Democratic proposal, a new tax bracket will be created between the two existing brackets like so:&lt;br /&gt;&lt;br /&gt;&lt;table border="1" cellspacing="1"&gt;&lt;tr&gt;&lt;td&gt;33%&lt;/td&gt;&lt;td&gt;$209,250-$250,000&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;36%&lt;/td&gt;&lt;td&gt;$250,000-$373,650&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;39.6%&lt;/td&gt;&lt;td&gt;$373,650+&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;The exact numbers may still change as the details are worked out, but bear with me.&lt;br /&gt;&lt;br /&gt;The Republicans are currently pushing to extend the Bush-era personal income tax cuts to families earning over $1,000,000 a year or extend them to everyone.  If this were to come to pass, again an extra tax bracket would be created, but it would look something like:&lt;br /&gt;&lt;br /&gt;&lt;table border="1" cellspacing="1"&gt;&lt;tr&gt;&lt;td&gt;33%&lt;/td&gt;&lt;td&gt;$209,250-$373,650&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;35%&lt;/td&gt;&lt;td&gt;$373,650-$1,000,000&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;39.6%&lt;/td&gt;&lt;td&gt;$1,000,000+&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Again, the exact numbers aren't all that important.  For the sake of example, though, let's look at a scenario of a family making a cool half-a-million dollars a year in personal income.  Currently, this family would be paying approximately $141,563 in federal income tax (assuming the standard deduction of $10,700 for 2010). &lt;br /&gt;&lt;br /&gt;&lt;table border="1" cellspacing="1"&gt;&lt;tr&gt;&lt;th&gt;Bracket&lt;/th&gt;&lt;th&gt;Range&lt;/th&gt;&lt;th&gt;Dollars Taxed&lt;br&gt;in this Bracket&lt;/th&gt;&lt;th&gt;Tax Amount&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;10%&lt;/td&gt;&lt;td&gt;$0 – $16,750&lt;/td&gt;&lt;td align="right"&gt;$16,750&lt;/td&gt;&lt;td align="right"&gt;$1,675.00&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;15%&lt;/td&gt;&lt;td&gt;$16,751 – $68,000&lt;/td&gt;&lt;td align="right"&gt;$51,250&lt;/td&gt;&lt;td align="right"&gt;$7,687.50&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;25%&lt;/td&gt;&lt;td&gt;$68,001 – $137,300&lt;/td&gt;&lt;td align="right"&gt;$69,300&lt;/td&gt;&lt;td align="right"&gt;$17,325.00&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;28%&lt;/td&gt;&lt;td&gt;$137,301 – $209,250&lt;/td&gt;&lt;td align="right"&gt;$71,950&lt;/td&gt;&lt;td align="right"&gt;$20,146.00&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;33%&lt;/td&gt;&lt;td&gt;$209,251 – $373,650&lt;/td&gt;&lt;td align="right"&gt;$164,400&lt;/td&gt;&lt;td align="right"&gt;$54,252.00&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;35%&lt;/td&gt;&lt;td&gt;$373,651 +&lt;/td&gt;&lt;td align="right"&gt;$115,650&lt;/td&gt;&lt;td align="right"&gt;$40,477.50&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan="2" align="right"&gt;Total:&lt;/td&gt;&lt;td align="right"&gt;$489,300&lt;/td&gt;&lt;td align="right"&gt;$141,563.00&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br /&gt;Wow, that's a big number.  It is funny to think we're having all this argument over people earning so much money that their taxes are triple what the average American grosses in a year.&lt;br /&gt;&lt;br /&gt;Anyway, our poor put-out example family is paying $141,563 out of their $500,000 annual income in federal income tax.  That is an effective tax rate of 28.3%.&lt;br /&gt;&lt;br /&gt;Under the Republicans' proposed plan, there would be no change in the amount of federal income tax paid by our hypothetical family since they earn less than 1 million dollars a year.&lt;br /&gt;&lt;br /&gt;Under the Democrats' proposed plan, our hypothetical family would have to pay $150,592 in tax, which is 30.1% of their income.&lt;br /&gt;&lt;br /&gt;&lt;table border="1" cellspacing="1"&gt;&lt;tr&gt;&lt;th&gt;Bracket&lt;/th&gt;&lt;th&gt;Range&lt;/th&gt;&lt;th&gt;Dollars Taxed&lt;br&gt;in this Bracket&lt;/th&gt;&lt;th&gt;Tax Amount&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;10%&lt;/td&gt;&lt;td&gt;$0 – $16,750&lt;/td&gt;&lt;td align="right"&gt;$16,750&lt;/td&gt;&lt;td align="right"&gt;$1,675.00&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;15%&lt;/td&gt;&lt;td&gt;$16,751 – $68,000&lt;/td&gt;&lt;td align="right"&gt;$51,250&lt;/td&gt;&lt;td align="right"&gt;$7,687.50&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;25%&lt;/td&gt;&lt;td&gt;$68,001 – $137,300&lt;/td&gt;&lt;td align="right"&gt;$69,300&lt;/td&gt;&lt;td align="right"&gt;$17,325.00&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;28%&lt;/td&gt;&lt;td&gt;$137,301 – $209,250&lt;/td&gt;&lt;td align="right"&gt;$71,950&lt;/td&gt;&lt;td align="right"&gt;$20,146.00&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;33%&lt;/td&gt;&lt;td&gt;$209,251 – $250,000&lt;/td&gt;&lt;td align="right"&gt;$40,750&lt;/td&gt;&lt;td align="right"&gt;$13,447.50&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;36%&lt;/td&gt;&lt;td&gt;$250,001 – $373,650&lt;/td&gt;&lt;td align="right"&gt;$123,650&lt;/td&gt;&lt;td align="right"&gt;$44,514.00&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;39.6%&lt;/td&gt;&lt;td&gt;$373,651 +&lt;/td&gt;&lt;td align="right"&gt;$115,650&lt;/td&gt;&lt;td align="right"&gt;$45,797.40&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan="2" align="right"&gt;Total:&lt;/td&gt;&lt;td align="right"&gt;$489,300&lt;/td&gt;&lt;td align="right"&gt;$150,592.40&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;So the difference between the two proposals amounts to a 1.8% tax increase in this example.  With a little hand-waving, let's just say the argument is over a 2% tax increase affecting families earning between $250,000 and $1,000,000 a year.&lt;br /&gt;&lt;br /&gt;The Republicans &lt;a href="http://www.foxnews.com/politics/2010/12/02/lawmakers-negotiate-tax-cuts-house-plans-vote/"&gt;claim that this tax will curb job creation&lt;/a&gt;. In response to the vote in the House of Representatives approving of the Democrat's proposal, Republican representative Gary Miller of California issued a statement saying&lt;blockquote&gt;During these difficult economic times, raising taxes on any American family or small business will not help our economy recover nor foster the private-sector job growth needed to achieve economic recovery.  The only thing that Democrats have accomplished by today's vote is yet more uncertainty for our nation's job creators.&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Certainly, no one will argue that the U.S. could use more jobs.  But is a 2% personal income tax increase going to materially affect job creation?  Returning to the example above, a small business owner making $500,000 a year would see a difference of about $9000 in their take-home pay.  That isn't enough to create even one job.&lt;br /&gt;&lt;br /&gt;In any event, this ignores the elephant in the room: the issue being debated is a tax rate on &lt;i&gt;personal&lt;/i&gt; income tax, not corporate tax.  Why would a business owner pay out income from their business to themselves, incurring personal income tax, only to reinvest that money into their business?  Wouldn't it make more sense to create those jobs using *before* tax dollars?  And that is what any business owner can do -- and is doing -- right now, under the current tax law.  And what they'll be able to continue doing no matter what happens with regards to &lt;i&gt;personal&lt;/i&gt; income tax.&lt;br /&gt;&lt;br /&gt;So it is patently silly to think that a decrease of any kind in the personal income tax is going to affect job creation.  The money that creates jobs isn't taxed.  You don't get lower than a zero percent tax rate.  Businesses are not directly affected by the personal income tax rate.&lt;br /&gt;&lt;br /&gt;No, the Republicans' cherished 2% tax cut on families making more than $250,000 a year only helps wealthy people put more money in their pockets.  At best, businesses may benefit indirectly by virtue of the fact that wealthy people have more disposable income.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-7101738487214374768?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/7101738487214374768/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=7101738487214374768' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/7101738487214374768'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/7101738487214374768'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2010/12/personal-income-taxes-and-job-creation.html' title='Personal income taxes and job creation'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-2464575628012442722</id><published>2010-11-21T00:00:00.005-08:00</published><updated>2010-11-24T20:46:13.722-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rants'/><title type='text'>Where are the protesters?</title><content type='html'>I'm waiting with baited breath to see whether there will be any protests over the &lt;a href="http://en.wikipedia.org/wiki/Millimeter_wave_scanner"&gt;airport nudey scanners&lt;/a&gt; and &lt;a href="http://www.freedom-won.net/tsa-scanners-furious-woman-accuses-tsa-of-touching-her-vagina/"&gt;TSA groping&lt;/a&gt; this Thanksgiving holiday.  I mean, we all remember the &lt;a href="http://www.google.com/images?hl=en&amp;amp;q=health+care+protests&amp;amp;um=1&amp;amp;ie=UTF-8&amp;amp;source=univ&amp;amp;ei=XtHoTMfGMISusAP428CxCw&amp;amp;sa=X&amp;amp;oi=image_result_group&amp;amp;ct=title&amp;amp;resnum=5&amp;amp;ved=0CEYQsAQwBA&amp;amp;biw=1144&amp;amp;bih=805"&gt;riots over universal health care&lt;/a&gt;, right?&lt;br /&gt;&lt;br /&gt;If the government putting their nose in our personal business rankled people, surely the government putting their hands in our privates will unleash true rage.&lt;br /&gt;&lt;br /&gt;Surely people will be up-in-arms over the TSA taking &lt;a href="http://www.google.com/search?hl=en&amp;amp;biw=1144&amp;amp;bih=805&amp;amp;q=airport+scanner+pictures&amp;amp;aq=f&amp;amp;aqi=g-z1g-m1&amp;amp;aql=&amp;amp;oq=&amp;amp;gs_rfai="&gt;naked pictures of them&lt;/a&gt; and &lt;a href="http://info-wars.org/2010/02/09/exposed-naked-body-scanner-images-of-film-star-printed-circulated-by-airport-staff/"&gt;keeping the good ones for fun&lt;/a&gt;.  Surely people will be angry that their wives and daughters are being felt up by &lt;a href="http://www.airsafenews.com/2010/11/is-tsa-allowing-convicted-rapists-to.html"&gt;convicted sex offenders&lt;/a&gt;.  Surely people will be rabid over the loss of their &lt;a href="http://en.wikipedia.org/wiki/Fourth_Amendment_to_the_United_States_Constitution"&gt;4th amendment rights&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Given the public shows of anger and disgust -- the public backlash -- in town hall meetings regarding something as mundane as health care, I expect the protests against the government's full assault of our privacy and dignity to be something to see.  I can't wait.&lt;br /&gt;&lt;dl&gt;&lt;dt&gt;&lt;b&gt;Update 2010/11/24&lt;/b&gt;:&lt;/dt&gt;&lt;dd&gt;Well, the busiest travel day of the year has passed &lt;a href="http://www.mercurynews.com/bay-area-news/ci_16703330?source=rss&amp;nclick_check=1"&gt;without any notable protests&lt;/a&gt;.  I'm not quite sure what to make of that.&lt;/dd&gt;&lt;/dl&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-2464575628012442722?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/2464575628012442722/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=2464575628012442722' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/2464575628012442722'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/2464575628012442722'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2010/11/where-are-protesters.html' title='Where are the protesters?'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-7267344064721702468</id><published>2010-11-14T23:03:00.004-08:00</published><updated>2010-11-14T23:25:33.550-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='life'/><category scheme='http://www.blogger.com/atom/ns#' term='meta'/><title type='text'>New Chapter</title><content type='html'>Well, tomorrow is a big day for me: I'll be starting a new job.  I'll be working for a super-secretive company in Cupertino which means that I won't be writing any more tech-related posts.  I'm sure the next few weeks will be hectic, so I doubt I'll be up to writing much anyway.  But I've got some ideas of what I'd like to write about once things settle down.&lt;br /&gt;&lt;br /&gt;I'd say "stay tuned" but I'm pretty sure no one is tuned in to my blog as it is. :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-7267344064721702468?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/7267344064721702468/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=7267344064721702468' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/7267344064721702468'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/7267344064721702468'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2010/11/new-chapter.html' title='New Chapter'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-3233577747245087423</id><published>2010-11-12T18:45:00.004-08:00</published><updated>2010-11-12T18:53:34.242-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><title type='text'>Python: Enumerating IP Addresses on FreeBSD</title><content type='html'>As promised in &lt;a href="http://kbyanc.blogspot.com/2010/10/python-enumerating-ip-addresses-on.html"&gt;my earlier post&lt;/a&gt; on enumerating local interfaces and their IP addresses on MacOS X, this time I'll cover how to do the same on FreeBSD and other operating systems that implement the &lt;a href="http://www.freebsd.org/cgi/man.cgi?query=getifaddrs"&gt;getifaddrs&lt;/a&gt; API.  Basically, this is just a python wrapper around the getifaddrs interface using ctypes.&lt;br /&gt;&lt;br /&gt;The code is a bit longer than I typically like to include in a blog post, but here it goes:&lt;pre class="prettyprint" style="overflow:scroll;"&gt;"""&lt;br /&gt;Wrapper for getifaddrs(3).&lt;br /&gt;"""&lt;br /&gt;&lt;br /&gt;import socket&lt;br /&gt;import sys&lt;br /&gt;&lt;br /&gt;from collections import namedtuple&lt;br /&gt;from ctypes import *&lt;br /&gt;&lt;br /&gt;class sockaddr_in(Structure):&lt;br /&gt;    _fields_ = [&lt;br /&gt;        ('sin_len',     c_uint8),&lt;br /&gt;        ('sin_family',  c_uint8),&lt;br /&gt;        ('sin_port',    c_uint16),&lt;br /&gt;        ('sin_addr',    c_uint8 * 4),&lt;br /&gt;        ('sin_zero',    c_uint8 * 8)&lt;br /&gt;    ]&lt;br /&gt;&lt;br /&gt;    def __str__(self):&lt;br /&gt;        assert self.sin_len &gt;= sizeof(sockaddr_in)&lt;br /&gt;        data = ''.join(map(chr, self.sin_addr))&lt;br /&gt;        return socket.inet_ntop(socket.AF_INET, data)&lt;br /&gt;&lt;br /&gt;class sockaddr_in6(Structure):&lt;br /&gt;    _fields_ = [&lt;br /&gt;        ('sin6_len',        c_uint8),&lt;br /&gt;        ('sin6_family',     c_uint8),&lt;br /&gt;        ('sin6_port',       c_uint16),&lt;br /&gt;        ('sin6_flowinfo',   c_uint32),&lt;br /&gt;        ('sin6_addr',       c_uint8 * 16),&lt;br /&gt;        ('sin6_scope_id',   c_uint32)&lt;br /&gt;    ]&lt;br /&gt;&lt;br /&gt;    def __str__(self):&lt;br /&gt;        assert self.sin6_len &gt;= sizeof(sockaddr_in6)&lt;br /&gt;        data = ''.join(map(chr, self.sin6_addr))&lt;br /&gt;        return socket.inet_ntop(socket.AF_INET6, data)&lt;br /&gt;        &lt;br /&gt;class sockaddr_dl(Structure):&lt;br /&gt;    _fields_ = [&lt;br /&gt;        ('sdl_len',         c_uint8),&lt;br /&gt;        ('sdl_family',      c_uint8),&lt;br /&gt;        ('sdl_index',       c_short),&lt;br /&gt;        ('sdl_type',        c_uint8),&lt;br /&gt;        ('sdl_nlen',        c_uint8),&lt;br /&gt;        ('sdl_alen',        c_uint8),&lt;br /&gt;        ('sdl_slen',        c_uint8),&lt;br /&gt;        ('sdl_data',        c_uint8 * 12)&lt;br /&gt;    ]&lt;br /&gt;    &lt;br /&gt;    def __str__(self):&lt;br /&gt;        assert self.sdl_len &gt;= sizeof(sockaddr_dl)&lt;br /&gt;        addrdata = self.sdl_data[self.sdl_nlen:self.sdl_nlen+self.sdl_alen]&lt;br /&gt;        return ':'.join('%02x' % x for x in addrdata)&lt;br /&gt;&lt;br /&gt;class sockaddr_storage(Structure):&lt;br /&gt;    _fields_ = [&lt;br /&gt;        ('sa_len',      c_uint8),&lt;br /&gt;        ('sa_family',   c_uint8),&lt;br /&gt;        ('sa_data',     c_uint8 * 254)&lt;br /&gt;    ]&lt;br /&gt;&lt;br /&gt;class sockaddr(Union):&lt;br /&gt;    _anonymous_ = ('sa_storage', )&lt;br /&gt;    _fields_ = [&lt;br /&gt;        ('sa_storage', sockaddr_storage),&lt;br /&gt;        ('sa_sin', sockaddr_in),&lt;br /&gt;        ('sa_sin6', sockaddr_in6),&lt;br /&gt;        ('sa_sdl', sockaddr_dl),&lt;br /&gt;    ]&lt;br /&gt;&lt;br /&gt;    def family(self):&lt;br /&gt;        return self.sa_storage.sa_family&lt;br /&gt;&lt;br /&gt;    def __str__(self):&lt;br /&gt;        family = self.family()&lt;br /&gt;        if family == socket.AF_INET:&lt;br /&gt;            return str(self.sa_sin)&lt;br /&gt;        elif family == socket.AF_INET6:&lt;br /&gt;            return str(self.sa_sin6)&lt;br /&gt;        elif family == 18:  # AF_LINK&lt;br /&gt;            return str(self.sa_sdl)&lt;br /&gt;        else:&lt;br /&gt;            print family&lt;br /&gt;            raise NotImplementedError, "address family %d not supported" % family&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;class ifaddrs(Structure):&lt;br /&gt;    pass&lt;br /&gt;ifaddrs._fields_ = [&lt;br /&gt;    ('ifa_next',        POINTER(ifaddrs)),&lt;br /&gt;    ('ifa_name',        c_char_p),&lt;br /&gt;    ('ifa_flags',       c_uint),&lt;br /&gt;    ('ifa_addr',        POINTER(sockaddr)),&lt;br /&gt;    ('ifa_netmask',     POINTER(sockaddr)),&lt;br /&gt;    ('ifa_dstaddr',     POINTER(sockaddr)),&lt;br /&gt;    ('ifa_data',        c_void_p)&lt;br /&gt;]&lt;br /&gt;&lt;br /&gt;# Define constants for the most useful interface flags (from if.h).&lt;br /&gt;IFF_UP            = 0x0001&lt;br /&gt;IFF_BROADCAST     = 0x0002&lt;br /&gt;IFF_LOOPBACK      = 0x0008&lt;br /&gt;IFF_POINTTOPOINT  = 0x0010&lt;br /&gt;IFF_RUNNING       = 0x0040&lt;br /&gt;if sys.platform == 'darwin' or 'bsd' in sys.platform:&lt;br /&gt;    IFF_MULTICAST = 0x8000&lt;br /&gt;elif sys.platform == 'linux':&lt;br /&gt;    IFF_MULTICAST = 0x1000&lt;br /&gt;&lt;br /&gt;# Load library implementing getifaddrs and freeifaddrs.&lt;br /&gt;if sys.platform == 'darwin':&lt;br /&gt;    libc = cdll.LoadLibrary('libc.dylib')&lt;br /&gt;else:&lt;br /&gt;    libc = cdll.LoadLibrary('libc.so')&lt;br /&gt;&lt;br /&gt;# Tell ctypes the argument and return types for the getifaddrs and&lt;br /&gt;# freeifaddrs functions so it can do marshalling for us.&lt;br /&gt;libc.getifaddrs.argtypes = [POINTER(POINTER(ifaddrs))]&lt;br /&gt;libc.getifaddrs.restype = c_int&lt;br /&gt;libc.freeifaddrs.argtypes = [POINTER(ifaddrs)]&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;def getifaddrs():&lt;br /&gt;    """&lt;br /&gt;    Get local interface addresses.&lt;br /&gt;&lt;br /&gt;    Returns generator of tuples consisting of interface name, interface flags,&lt;br /&gt;    address family (e.g. socket.AF_INET, socket.AF_INET6), address, and netmask.&lt;br /&gt;    The tuple members can also be accessed via the names 'name', 'flags',&lt;br /&gt;    'family', 'address', and 'netmask', respectively.&lt;br /&gt;    """&lt;br /&gt;    # Get address information for each interface.&lt;br /&gt;    addrlist = POINTER(ifaddrs)()&lt;br /&gt;    if libc.getifaddrs(pointer(addrlist)) &lt; 0:&lt;br /&gt;        raise OSError&lt;br /&gt;&lt;br /&gt;    X = namedtuple('ifaddrs', 'name flags family address netmask')&lt;br /&gt;&lt;br /&gt;    # Iterate through the address information.&lt;br /&gt;    ifaddr = addrlist&lt;br /&gt;    while ifaddr and ifaddr.contents:&lt;br /&gt;        # The following is a hack to workaround a bug in FreeBSD&lt;br /&gt;        # (PR kern/152036) and MacOSX wherein the netmask's sockaddr may be&lt;br /&gt;        # truncated.  Specifically, AF_INET netmasks may have their sin_addr&lt;br /&gt;        # member truncated to the minimum number of bytes necessary to&lt;br /&gt;        # represent the netmask.  For example, a sockaddr_in with the netmask&lt;br /&gt;        # 255.255.254.0 may be truncated to 7 bytes (rather than the normal&lt;br /&gt;        # 16) such that the sin_addr field only contains 0xff, 0xff, 0xfe.&lt;br /&gt;        # All bytes beyond sa_len bytes are assumed to be zero.  Here we work&lt;br /&gt;        # around this truncation by copying the netmask's sockaddr into a&lt;br /&gt;        # zero-filled buffer.&lt;br /&gt;        if ifaddr.contents.ifa_netmask:&lt;br /&gt;            netmask = sockaddr()&lt;br /&gt;            memmove(byref(netmask), ifaddr.contents.ifa_netmask,&lt;br /&gt;                    ifaddr.contents.ifa_netmask.contents.sa_len)&lt;br /&gt;            if netmask.sa_family == socket.AF_INET and netmask.sa_len &lt; sizeof(sockaddr_in):&lt;br /&gt;                netmask.sa_len = sizeof(sockaddr_in)&lt;br /&gt;        else:&lt;br /&gt;            netmask = None&lt;br /&gt;            &lt;br /&gt;        try:&lt;br /&gt;            yield X(ifaddr.contents.ifa_name,&lt;br /&gt;                    ifaddr.contents.ifa_flags,&lt;br /&gt;                    ifaddr.contents.ifa_addr.contents.family(),&lt;br /&gt;                    str(ifaddr.contents.ifa_addr.contents),&lt;br /&gt;                    str(netmask) if netmask else None)&lt;br /&gt;        except NotImplementedError:&lt;br /&gt;            # Unsupported address family.&lt;br /&gt;            yield X(ifaddr.contents.ifa_name,&lt;br /&gt;                    ifaddr.contents.ifa_flags,&lt;br /&gt;                    None,&lt;br /&gt;                    None,&lt;br /&gt;                    None)&lt;br /&gt;        ifaddr = ifaddr.contents.ifa_next&lt;br /&gt;&lt;br /&gt;    # When we are done with the address list, ask libc to free whatever memory&lt;br /&gt;    # it allocated for the list.&lt;br /&gt;    libc.freeifaddrs(addrlist)&lt;br /&gt;&lt;br /&gt;__all__ = ['getifaddrs'] + [n for n in dir() if n.startswith('IFF_')]&lt;br /&gt;&lt;/pre&gt;As always, this code is released under a &lt;a href="http://kbyanc.blogspot.com/2007/08/license-for-code-posted-on-my-blog.html"&gt;BSD-style license&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-3233577747245087423?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/3233577747245087423/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=3233577747245087423' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/3233577747245087423'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/3233577747245087423'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2010/11/python-enumerating-ip-addresses-on.html' title='Python: Enumerating IP Addresses on FreeBSD'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-5063749880412326084</id><published>2010-10-22T11:36:00.002-07:00</published><updated>2010-10-22T11:39:03.708-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><title type='text'>Euklas</title><content type='html'>Carnegie Mellon University has produced a tool called &lt;a href="http://www.cs.cmu.edu/~euklas/"&gt;Euklas&lt;/a&gt; (Eclipse Users' Keystrokes Lessened by Attaching from Samples).  From the description:&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;Euklas enhances Eclipse's JavaScript editor to help users to more successfully employ copy-and-paste strategies for reuse.&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;I think I'm going to cry.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-5063749880412326084?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/5063749880412326084/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=5063749880412326084' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/5063749880412326084'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/5063749880412326084'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2010/10/euklas.html' title='Euklas'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-6960805495217747371</id><published>2010-10-20T22:24:00.003-07:00</published><updated>2010-10-20T22:34:58.088-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='mac'/><title type='text'>Python: Enumerating IP Addresses on MacOS X</title><content type='html'>How do you enumerate the host's local IP addresses from python?  This turns out to be a surprisingly common question.  Unfortunately, there is no pretty answer; it depends on the host operating system.  On Windows, you can wrap the &lt;a href="http://msdn.microsoft.com/en-us/library/aa366072%28v=VS.85%29.aspx"&gt;IP Helper&lt;/a&gt; &lt;a href="http://msdn.microsoft.com/en-us/library/aa365949%28v=VS.85%29.aspx"&gt;GetIpAddrTable&lt;/a&gt; using ctypes.  On modern Linux, *BSD, or MacOS X systems, you can wrap &lt;a href="http://developer.apple.com/library/ios/#documentation/system/conceptual/manpages_iphoneos/man3/getifaddrs.3.html"&gt;&lt;code&gt;getifaddrs()&lt;/code&gt;&lt;/a&gt;.  Neither is trivial, though, so I'll save those for a future post.&lt;br /&gt;&lt;br /&gt;Luckily, MacOS X provides a simpler way to get the local IP addresses: the &lt;a href="http://developer.apple.com/library/mac/#documentation/Networking/Reference/SCDynamicStore/Reference/reference.html#//apple_ref/doc/uid/TP40008287"&gt;system configuration dynamic store&lt;/a&gt;.  Using pyObjC, which comes pre-installed on every Mac, we can write a straight port of Apple's example in &lt;a href="http://developer.apple.com/library/mac/technotes/tn/tn1145.html#CallingAllIPs"&gt;Technical Note TN1145&lt;/a&gt; for retrieving a list of all IPv4 addresses assigned to local interfaces:&lt;br /&gt;&lt;pre class="prettyprint" style="overflow: scroll;"&gt;&lt;br /&gt;from SystemConfiguration import *    # from pyObjC&lt;br /&gt;import socket&lt;br /&gt;&lt;br /&gt;def GetIPv4Addresses():&lt;br /&gt;    """&lt;br /&gt;    Get all IPv4 addresses assigned to local interfaces.&lt;br /&gt;    Returns a generator object that produces information&lt;br /&gt;    about each IPv4 address present at the time that the&lt;br /&gt;    function was called.&lt;br /&gt;&lt;br /&gt;    For each IPv4 address, the returned generator yields&lt;br /&gt;    a tuple consisting of the interface name, address&lt;br /&gt;    family (always socket.AF_INET), the IP address, and&lt;br /&gt;    the netmask.  The tuple elements may also be accessed&lt;br /&gt;    by the names: "ifname", "family", "address", and&lt;br /&gt;    "netmask".&lt;br /&gt;    """&lt;br /&gt;    ds = SCDynamicStoreCreate(None, 'GetIPv4Addresses', None, None)&lt;br /&gt;    # Get all keys matching pattern State:/Network/Service/[^/]+/IPv4&lt;br /&gt;    pattern = SCDynamicStoreKeyCreateNetworkServiceEntity(None,&lt;br /&gt;                                                          kSCDynamicStoreDomainState,&lt;br /&gt;                                                          kSCCompAnyRegex,&lt;br /&gt;                                                          kSCEntNetIPv4)&lt;br /&gt;    patterns = CFArrayCreate(None, (pattern, ), 1, kCFTypeArrayCallBacks)&lt;br /&gt;    valueDict = SCDynamicStoreCopyMultiple(ds, None, patterns)&lt;br /&gt;&lt;br /&gt;    ipv4info = namedtuple('ipv4info', 'ifname family address netmask')&lt;br /&gt;&lt;br /&gt;    for serviceDict in valueDict.values():&lt;br /&gt;        ifname = serviceDict[u'InterfaceName']&lt;br /&gt;        for address, netmask in zip(serviceDict[u'Addresses'], serviceDict[u'SubnetMasks']):&lt;br /&gt;            yield ipv4info(ifname, socket.AF_INET, address, netmask)&lt;/pre&gt;&lt;br /&gt;One interesting point regarding this code is that it doesn't actually inspect interface information in the system configuration dynamic store.  The interface-related keys are stored under &lt;kbd&gt;State:/Network/Interface/&lt;/kbd&gt;, but this code (and Apple's example on which it is based) inspect keys under &lt;kbd&gt;State:/Network/Service/&lt;/kbd&gt; instead.  However, if you want to get IPv6 addresses then you do have to inspect the system configuration's interface information:&lt;br /&gt;&lt;pre class="prettyprint" style="overflow: scroll;"&gt;&lt;br /&gt;from SystemConfiguration import *    # from pyObjC&lt;br /&gt;import socket&lt;br /&gt;import re&lt;br /&gt;ifnameExtractor = re.compile(r'/Interface/([^/]+)/')&lt;br /&gt;&lt;br /&gt;def GetIPv6Addresses():&lt;br /&gt;    """&lt;br /&gt;    Get all IPv6 addresses assigned to local interfaces.&lt;br /&gt;    Returns a generator object that produces information&lt;br /&gt;    about each IPv6 address present at the time that the&lt;br /&gt;    function was called.&lt;br /&gt;    &lt;br /&gt;    For each IPv6 address, the returned generator yields&lt;br /&gt;    a tuple consisting of the interface name, address&lt;br /&gt;    family (always socket.AF_INET6), the IP address, and&lt;br /&gt;    the prefix length.  The tuple elements may also be&lt;br /&gt;    accessed by the names: "ifname", "family", "address",&lt;br /&gt;    and "prefixlen".&lt;br /&gt;    """&lt;br /&gt;    ds = SCDynamicStoreCreate(None, 'GetIPv6Addresses', None, None)&lt;br /&gt;    # Get all keys matching pattern State:/Network/Interface/[^/]+/IPv6&lt;br /&gt;    pattern = SCDynamicStoreKeyCreateNetworkInterfaceEntity(None,&lt;br /&gt;                                                          kSCDynamicStoreDomainState,&lt;br /&gt;                                                          kSCCompAnyRegex,&lt;br /&gt;                                                          kSCEntNetIPv6)&lt;br /&gt;    patterns = CFArrayCreate(None, (pattern, ), 1, kCFTypeArrayCallBacks)&lt;br /&gt;    valueDict = SCDynamicStoreCopyMultiple(ds, None, patterns)&lt;br /&gt;&lt;br /&gt;    ipv6info = namedtuple('ipv6info', 'ifname family address prefixlen')&lt;br /&gt;&lt;br /&gt;    for key, ifDict in valueDict.items():&lt;br /&gt;        ifname = ifnameExtractor.search(key).group(1)&lt;br /&gt;        for address, prefixlen in zip(ifDict[u'Addresses'], ifDict[u'PrefixLength']):&lt;br /&gt;            yield ipv6info(ifname, socket.AF_INET6, address, prefixlen)&lt;/pre&gt;&lt;br /&gt;In fact, you could easily adapt the above function to be able to fetch IPv4 addresses from the interface configuration.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-6960805495217747371?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/6960805495217747371/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=6960805495217747371' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/6960805495217747371'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/6960805495217747371'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2010/10/python-enumerating-ip-addresses-on.html' title='Python: Enumerating IP Addresses on MacOS X'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-289312114995487839</id><published>2010-10-01T14:03:00.009-07:00</published><updated>2010-10-01T14:58:06.126-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ramblings'/><category scheme='http://www.blogger.com/atom/ns#' term='life'/><title type='text'>Caffeine Deficiency</title><content type='html'>My wife has been complaining that she always feels nauseous after taking her daily vitamin.  On the theory that it was perhaps a result of taking them first thing in the morning on an empty stomach, she tried taking them at night with dinner.  I saw with my own eyes what she was talking about: she almost vomited.&lt;br /&gt;&lt;br /&gt;So, I told her to start taking mine instead and I'd finish her vitamins off.  Well, I'm not doing that again.  I don't know what it is about &lt;a href="http://oneaday.com/womens_active_metabolism.html"&gt;One A Day Women's Active Metabolism&lt;/a&gt; vitamins, but they made me sick too.  While we hate wasting the money, we just chucked the rest of the bottle because there was no way either of us were ever taking those again.  Before we tossed the bottle in the trash, though, we were examining the label for differences between her &lt;a href="http://oneaday.com/womens_active_metabolism.html"&gt;One A Day Women's Active Metabolism&lt;/a&gt; and my &lt;a href="http://oneaday.com/mens.html"&gt;One A Day Men's&lt;/a&gt; vitamins that might account for the nausea.  In particular, we were looking for ingredients that were in higher concentration in the women's vitamins.&lt;br /&gt;&lt;br /&gt;There are a few: vitamins D, K, B1, B2, B6, Calcium, and Iron to be exact.  But I couldn't find any hard evidence that any of these vitamins could cause the sort of nausea we experienced (at least not in quantities we are likely to be exposed to).  But that is when we noticed what makes the women's vitamins earn the "active metabolism" moniker:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_eEUZxnkOyLo/TKZTtHwdOjI/AAAAAAAAAHk/kzH1NaG0-Pg/s1600/mens.png"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 298px;" src="http://2.bp.blogspot.com/_eEUZxnkOyLo/TKZTtHwdOjI/AAAAAAAAAHk/kzH1NaG0-Pg/s400/mens.png" alt="" id="BLOGGER_PHOTO_ID_5523194027658000946" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Caffeine, and lots of it. Guarana seed is just another source of caffeine, so it is possible that its 50mg is included in the total of 120mg of caffeine in each "vitamin" pill.  But if not, that means that 1 One A Day Women's Active Metabolism pill has more caffeine (~170mg) than a cup of coffee (100-150mg) and approaching that of a single &lt;a href="http://www.essentialsforlivingwell.com/products/vivarin/default.aspx?redirectfrom=www.vivarin.com"&gt;Vivarin&lt;/a&gt; pill (200mg).&lt;br /&gt;&lt;br /&gt;While neither of us drinks much coffee and we try to avoid caffeinated drinks, I doubt that 170mg of coffee in the morning would be enough to induce nausea.  After all, millions of people have a cup of coffee in the morning and that is approximately the same amount of caffeine.&lt;br /&gt;&lt;br /&gt;But, we never expected to have caffeine added to vitamin pills.  I guess that is what we get for not having looked at the label before buying them.  We certainly won't be making that mistake again.&lt;br /&gt;&lt;br /&gt;All that background out of the way, this experience got me thinking: just how much caffeine do people consume everyday now?  Here my wife was getting a base 170mg a day without even knowing it.  The marketing for caffeinated products tends to emphasize that it helps you stay "mentally aware"; how long before being constantly-caffeinated is considered the norm and the symptoms of caffeine deficiency are "mentally sluggish"?&lt;br /&gt;&lt;br /&gt;&lt;b&gt;At what point does caffeine go from "booster" to baseline?&lt;/b&gt;  Is there a point in our future wherein caffeine belongs in vitamins and even has a FDA-recommended daily allowance?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-289312114995487839?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/289312114995487839/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=289312114995487839' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/289312114995487839'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/289312114995487839'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2010/10/caffeine-deficiency.html' title='Caffeine Deficiency'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_eEUZxnkOyLo/TKZTtHwdOjI/AAAAAAAAAHk/kzH1NaG0-Pg/s72-c/mens.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-3465569178537956325</id><published>2010-09-27T19:20:00.004-07:00</published><updated>2010-09-27T19:50:15.562-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='APNS'/><category scheme='http://www.blogger.com/atom/ns#' term='objective-c'/><title type='text'>Getting the APNS device token</title><content type='html'>As alluded to in &lt;a href="http://kbyanc.blogspot.com/2010/09/using-pyapns-with-django.html"&gt;my previous post&lt;/a&gt;, this time I'm covering how to get the APNS device token for a given iOS client.  Actually, it is pretty straightforward.  First, call &lt;a href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIApplication_Class/Reference/Reference.html#//apple_ref/occ/instm/UIApplication/registerForRemoteNotificationTypes:"&gt;&lt;code&gt;registerForRemoteNotificationTypes&lt;/code&gt;&lt;/a&gt; from your application's &lt;code&gt;didFinishLaunchingWithOptions&lt;/code&gt; &lt;a href="http://developer.apple.com/library/ios/#documentation/uikit/reference/UIApplicationDelegate_Protocol/Reference/Reference.html"&gt;&lt;code&gt;UIApplicationDelegate&lt;/code&gt;&lt;/a&gt; callback.  You need to specify which type of notifications your application will accept.  Here is an example:&lt;pre class="prettyprint" style="overflow: scroll;"&gt;- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions&lt;br /&gt;{    &lt;br /&gt;    ...&lt;br /&gt;&lt;br /&gt;    // Register with the Apple Push Notification Service&lt;br /&gt;    // so we can receive notifications from our server&lt;br /&gt;    // application.  Upon successful registration, our &lt;br /&gt;    // didRegisterForRemoteNotificationsWithDeviceToken:&lt;br /&gt;    // delegate callback will be invoked with our unique&lt;br /&gt;    // device token.&lt;br /&gt;    UIRemoteNotificationType allowedNotifications = UIRemoteNotificationTypeAlert&lt;br /&gt;                                                  | UIRemoteNotificationTypeSound&lt;br /&gt;                                                  | UIRemoteNotificationTypeBadge;&lt;br /&gt;    [[UIApplication sharedApplication] registerForRemoteNotificationTypes:allowedNotifications];&lt;br /&gt;&lt;br /&gt;    ...&lt;br /&gt;    &lt;br /&gt;    return YES;&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;As mentioned in the code comments, the application will then talk to Apple's Push Notification Service in the background and, when the device's unique token has been issued, your application delegate's &lt;a href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIApplicationDelegate_Protocol/Reference/Reference.html#//apple_ref/occ/intfm/UIApplicationDelegate/application:didRegisterForRemoteNotificationsWithDeviceToken:"&gt;&lt;code&gt;didRegisterForRemoteNotificationsWithDeviceToken&lt;/code&gt;&lt;/a&gt; callback is invoked.  This is where you actually get the device token.&lt;br /&gt;&lt;pre class="prettyprint" style="overflow: scroll;"&gt;- (void)application:(UIApplication *)application&lt;br /&gt;        didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken&lt;br /&gt;{&lt;br /&gt;    NSLog(@"didRegisterForRemoteNotificationsWithDeviceToken: %@", deviceToken);&lt;br /&gt;    // Stash the deviceToken data somewhere to send it to&lt;br /&gt;    // your application server.&lt;br /&gt;    ...&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;Once your iOS client application knows its own device token, it needs to send it to your application server so that the application server can push notifications back to the client later.  How you do this depends on the architecture of your client-server communication.&lt;br /&gt;&lt;br /&gt;At this point, I should add the device tokens can change.  So, I recommend repeating the above logic every time your iOS client application starts so your application server always gets the latest device token for the user's terminal.&lt;br /&gt;&lt;br /&gt;I would be remiss to not mention error handling.  It is possible that the &lt;a href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIApplication_Class/Reference/Reference.html#//apple_ref/occ/instm/UIApplication/registerForRemoteNotificationTypes:"&gt;&lt;code&gt;registerForRemoteNotificationTypes&lt;/code&gt;&lt;/a&gt; call will fail.  The most obvious way it could fail is if the user does not have access to the 3G or WiFi networks and, as a result, cannot communicate with Apple's Push Notification Service; for example, when the device is in Airplane Mode with the wireless signals turned off.&lt;br /&gt;&lt;br /&gt;In this case, the &lt;a href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIApplicationDelegate_Protocol/Reference/Reference.html#//apple_ref/occ/intfm/UIApplicationDelegate/application:didFailToRegisterForRemoteNotificationsWithError:"&gt;&lt;code&gt;didFailToRegisterForRemoteNotificationsWithError&lt;/code&gt;&lt;/a&gt; delegate callback is invoked instead of &lt;a href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIApplicationDelegate_Protocol/Reference/Reference.html#//apple_ref/occ/intfm/UIApplicationDelegate/application:didRegisterForRemoteNotificationsWithDeviceToken:"&gt;&lt;code&gt;didRegisterForRemoteNotificationsWithDeviceToken&lt;/code&gt;&lt;/a&gt;.  In which case, you probably want to retry the registration later when network connectivity is restored.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-3465569178537956325?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/3465569178537956325/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=3465569178537956325' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/3465569178537956325'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/3465569178537956325'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2010/09/getting-apns-device-token.html' title='Getting the APNS device token'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-1940983807417647301</id><published>2010-09-20T14:37:00.008-07:00</published><updated>2010-09-20T16:33:23.601-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='django'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='APNS'/><title type='text'>Using pyapns with django</title><content type='html'>There is a handy daemon for sending push notifications to iOS-based mobile clients via &lt;a href="http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Introduction/Introduction.html/"&gt;Apple's Push Notification Service&lt;/a&gt;; it is called &lt;a href="http://pyapns.org/"&gt;pyapns&lt;/a&gt;.  It is implemented in python but, since it runs as a standalone XML-RPC server process, that fact is largely irrelevant.  The important facts are that:&lt;ul&gt;&lt;li&gt;It properly and fully implements the client interface to APNs, including the requirement for maintaining a persistent connection with Apple's servers rather than repeatedly setting-up and tearing-down SSL connections.&lt;br&gt;&lt;br /&gt;&lt;li&gt;It includes client libraries for communicating with the pyapns daemon from python and ruby, although any language that can speak XML-RPC (including C) will work too.&lt;br /&gt;&lt;/ul&gt;The way it works is: you first start the pyapns daemon process.  This process acts as a XML-RPC server handling requests from your application(s), packing them into Apple's binary APNS protocol, and sending them to Apple to deliver to the iPhone, iPad, or iPod.&lt;br /&gt;&lt;br /&gt;In order for your applications to send a push notification request, though, they must first tell pyapns which client certificate it should use to authenticate with the APNS servers.  &lt;a href="http://www.developers-life.com/apple-push-notification.html"&gt;Here is a decent guide on how to obtain a client certificate.&lt;/a&gt;  Once you have a certificate, you have to use the pyapns client library's &lt;code&gt;configure&lt;/code&gt; and &lt;code&gt;provision&lt;/code&gt; APIs to tell the pyapns daemon process to use your certificate.&lt;br /&gt;&lt;br /&gt;If you are implementing your application in django, you can accomplish the configuration and provisioning directly from your django &lt;kbd&gt;settings.py&lt;/kbd&gt; file like so:&lt;pre class="prettyprint" style="overflow:scroll;"&gt;# Configuration for connecting to the local pyapns daemon,&lt;br /&gt;# including our certificate for pushing notifications to&lt;br /&gt;# mobile terminals via APNS.&lt;br /&gt;PYAPNS_CONFIG = {&lt;br /&gt;    'HOST': 'http://localhost:7077/',&lt;br /&gt;    'TIMEOUT': 15,&lt;br /&gt;    'INITIAL': [&lt;br /&gt;        ('MyAppName', 'path/to/cert/apns_sandbox.pem', 'sandbox'),&lt;br /&gt;    ]&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;The pyapns python client library will automatically configure and provision itself from these settings.  So, assuming you know the APNS device token of the mobile device you want to send a notification to, all you need to do to send a push notification is to call the &lt;code&gt;pyapns.client.notify()&lt;/code&gt; function.&lt;br /&gt;&lt;br /&gt;If only it were so easy.  One complication arises in that the pyapns provisioning and configuration state is split between the client library and the pyapns daemon process.  As a result, there are two scenarios to be wary of:&lt;ol&gt;&lt;br /&gt;&lt;li&gt;The django application is restarted.  In this case, the client library, which is part of your django application, loses its state and tries to re-configure and re-provision itself from your django settings.  Luckily, since the client library will re-read the configuration and provisioning settings from &lt;kbd&gt;settings.py&lt;/kbd&gt; and seamlessly resume communication with the pyapns daemon.&lt;br /&gt;&lt;br /&gt;However, as noted in the pyapns documentation, "attempts to provision the same application id multiple times are ignored."  As a result, if you change pyapns configuration in the &lt;kbd&gt;settings.py&lt;/kbd&gt; file and restart django, you need to restart the pyapns daemon too for the new settings to take effect.  Otherwise, if the settings are unchanged, the client library will seamlessly resume communication with the pyapns daemon.&lt;br&gt;&lt;br /&gt;&lt;li&gt;The pyapns daemon is restarted.  In this case, the client library thinks it has already configured and provisioned the daemon, but the daemon has lost this configuration due to restart.  As a result, any attempt to send a push notification will fail as the daemon does not know how to establish the connection with Apple's Push Notification service.&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;As I mentioned above, the first scenario isn't a big deal.  If you have to restart your web application or the web server for some reason, the connection between the pyapns client library and the daemon process will automatically resume right where it left off.  In the rare case that you changed the pyapns settings in your django &lt;kbd&gt;settings.py&lt;/kbd&gt; file, you need to restart both the django application and the pyapns daemon process for the new settings to take effect.&lt;br /&gt;&lt;br /&gt;The latter scenario, though, is a bigger problem because it is impossible to detect until it is too late: that is, it doesn't manifest itself until you try to send a push notification and fail.  Luckily, however, we can catch the failure condition and resolve the problem automatically.  Specifically, if the pyapns client library fails to send a push notification to the daemon process due to the daemon process not being configured or provisioned, we can force the client library to re-configure and re-provision and retry.&lt;br /&gt;&lt;br /&gt;So here you go, a wrapper around the pyapns client library to automatically recover when the backend pyapns daemon has been restarted:&lt;pre class="prettyprint" style="overflow:scroll;"&gt;"""&lt;br /&gt;Wrappers for the pyapns client to simplify sending APNS&lt;br /&gt;notifications, including support for re-configuring the&lt;br /&gt;pyapns daemon after a restart.&lt;br /&gt;"""&lt;br /&gt;&lt;br /&gt;import pyapns.client&lt;br /&gt;import time&lt;br /&gt;import logging&lt;br /&gt;&lt;br /&gt;log = logging.getLogger('APNS')&lt;br /&gt;&lt;br /&gt;def notify(apns_token, message, badge=None, sound=None):&lt;br /&gt;    """Push notification to device with the given message&lt;br /&gt;&lt;br /&gt;    @param apns_token - The device's APNS-issued unique token&lt;br /&gt;    @param message - The message to display in the&lt;br /&gt;                     notification window&lt;br /&gt;    """&lt;br /&gt;    notification = {'aps': {'alert': message}}&lt;br /&gt;    if badge is not None:&lt;br /&gt;        notification['aps']['badge'] = int(badge)&lt;br /&gt;    if sound is not None:&lt;br /&gt;        notification['aps']['sound'] = str(sound)&lt;br /&gt;    for attempt in range(4):&lt;br /&gt;        try:&lt;br /&gt;            pyapns.client.notify('MyAppId', apns_token,&lt;br /&gt;                                 notification)&lt;br /&gt;            break&lt;br /&gt;        except (pyapns.client.UnknownAppID,&lt;br /&gt;                pyapns.client.APNSNotConfigured):&lt;br /&gt;            # This can happen if the pyapns server has been&lt;br /&gt;            # restarted since django started running.  In&lt;br /&gt;            # that case, we need to clear the client's&lt;br /&gt;            # configured flag so we can reconfigure it from&lt;br /&gt;            # our settings.py PYAPNS_CONFIG settings.&lt;br /&gt;            if attempt == 3:&lt;br /&gt;                log.exception()&lt;br /&gt;            pyapns.client.OPTIONS['CONFIGURED'] = False&lt;br /&gt;            pyapns.client.configure({})&lt;br /&gt;            time.sleep(0.5)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Since I glossed over it in this post, I'll cover how to get the APNS device token for a mobile device in my next post.  The device token acts as an address, telling Apple's Push Notification service which mobile device it should deliver your notification message to.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-1940983807417647301?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/1940983807417647301/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=1940983807417647301' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/1940983807417647301'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/1940983807417647301'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2010/09/using-pyapns-with-django.html' title='Using pyapns with django'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-352827223104979801</id><published>2010-09-07T19:34:00.010-07:00</published><updated>2010-09-07T20:51:39.264-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='GIS'/><category scheme='http://www.blogger.com/atom/ns#' term='objective-c'/><title type='text'>Calculating degree deltas for distances on the surface of the Earth</title><content type='html'>Here is the scenario: you've got your GPS coordinates (latitude &amp; longitude in degrees) of your current position and you want to find the number of degrees north/south and east/west needed to contain an area of some size around you.  I know, this sounds contrived, but it comes up if you use the iPhone's &lt;a href="http://developer.apple.com/iphone/library/documentation/MapKit/Reference/MapKit_Framework_Reference/index.html"&gt;MapKit&lt;/a&gt; framework and want to zoom a &lt;a href="http://developer.apple.com/iphone/library/documentation/MapKit/Reference/MKMapView_Class/MKMapView/MKMapView.html#//apple_ref/doc/uid/TP40008205"&gt;MKMapView&lt;/a&gt; to a level where only a certain distance around a location is displayed.  In that case, you need a &lt;a href="http://developer.apple.com/iphone/library/documentation/MapKit/Reference/MapKitDataTypesReference/Reference/reference.html#//apple_ref/doc/uid/TP40009734-CH1-SW30"&gt;MKCoordinateRegion&lt;/a&gt; to pass to the &lt;a href="http://developer.apple.com/iphone/library/documentation/MapKit/Reference/MKMapView_Class/MKMapView/MKMapView.html#//apple_ref/occ/instm/MKMapView/setRegion:animated:"&gt;setRegion:animated:&lt;/a&gt; method.&lt;br /&gt;&lt;br /&gt;One might think that if you know the rate of conversion between meters (or if you prefer, miles) and degrees, this would be a straightforward conversion.  The problem is that it isn't so simple.  Since the earth is a sphere, the number of meters in one degree of longitude depends on your latitude.  For example, at the equator, there are 111.32 kilometers per degree of longitude; at the poles, however, there are 0 meters per degree.&lt;br /&gt;&lt;br /&gt;A MKCoordinateRegion is comprised of two components: the coordinates of the center of the region and a span of latitudinal and longitudinal deltas.  Let's assume the center is known; for example, it could be your user's current location.  To calculate the span, here is a simple function that takes into account the curvature of the earth:&lt;pre class="prettyprint" style="overflow:scroll;"&gt;/*!&lt;br /&gt; * Calculate longitudinal and latitudinal deltas in&lt;br /&gt; * degrees for the given linear horizontal and vertical&lt;br /&gt; * distances in kilometers.  Longitudinal degrees per&lt;br /&gt; * kilometer vary with latitude, so a coordinate is&lt;br /&gt; * needed as a frame of reference.&lt;br /&gt; *&lt;br /&gt; * @param coord - point of reference.&lt;br /&gt; * @param xDistance - east-west distance in kilometers.&lt;br /&gt; * @param yDistance - north-south distance in kilometers.&lt;br /&gt; * @return MKCoordinateSpan representing the distances&lt;br /&gt; *         in degrees at the given coordinate.&lt;br /&gt; */&lt;br /&gt;static&lt;br /&gt;MKCoordinateSpan&lt;br /&gt;spanForDistancesAtCoordinate(CLLocationCoordinate2D coord,&lt;br /&gt;                             double xDistance,&lt;br /&gt;                             double yDistance)&lt;br /&gt;{&lt;br /&gt;    const double kilometersPerDegree = 111.0;&lt;br /&gt;&lt;br /&gt;    MKCoordinateSpan span;&lt;br /&gt;    &lt;br /&gt;    // Calculate the latitude and longitude deltas that&lt;br /&gt;    // correspond to the distance (in kilometers) at&lt;br /&gt;    // the given coordinate.  Note that the longitude&lt;br /&gt;    // degrees calculation is complicated by virtue of&lt;br /&gt;    // the fact that the number of meters per degree&lt;br /&gt;    // varies depending on the coordinate's latitude.&lt;br /&gt;    span.latitudeDelta = xDistance / kilometersPerDegree;&lt;br /&gt;    span.longitudeDelta = yDistance / (kilometersPerDegree * cos(coord.latitude * M_PI / 180.0));&lt;br /&gt;    return span;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The user's current location, which will become the center of the MKCoordinateRegion, should be passed as the point-of-reference &lt;kbd&gt;coord&lt;/kbd&gt; argument.  This is used to calculate the number of meters per degree at the user's current latitude.&lt;br /&gt;&lt;br /&gt;The &lt;kbd&gt;xDistance&lt;/kbd&gt; and &lt;kbd&gt;yDistance&lt;/kbd&gt; parameters are the number of kilometers east-west and north-south, respectively, that define the region.&lt;br /&gt;&lt;br /&gt;Note that the constant &lt;kbd&gt;kilometersPerDegree&lt;/kbd&gt; represents the number of kilometers per degree of latitude or the number of kilometers per degree of longitude at the equator; it is only an estimate.  Since the Earth isn't a perfect sphere, the actual number varies, but for the sake of most iPhone apps, the estimate of 111.0 kilometers/degree should be sufficient.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-352827223104979801?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/352827223104979801/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=352827223104979801' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/352827223104979801'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/352827223104979801'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2010/09/calculating-degree-deltas-for-distances.html' title='Calculating degree deltas for distances on the surface of the Earth'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-8950809182838721762</id><published>2010-08-17T16:32:00.005-07:00</published><updated>2010-08-17T17:02:47.335-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='RFCs'/><category scheme='http://www.blogger.com/atom/ns#' term='objective-c'/><title type='text'>RFC 3339-compliant Unicode date format pattern</title><content type='html'>Here is a quick note just to say that if you need to generate &lt;a href="http://www.ietf.org/rfc/rfc3339.txt"&gt;RFC 3339&lt;/a&gt; timestamps or &lt;a href="http://en.wikipedia.org/wiki/ISO_8601"&gt;ISO 8601&lt;/a&gt;-compliant combined date/time representations, here is the &lt;a href="http://unicode.org/reports/tr35/tr35-6.html#Date_Format_Patterns"&gt;Unicode date format pattern&lt;/a&gt; to do so:&lt;br /&gt;&lt;pre&gt;yyyy-MM-dd'T'HH:mm:ss.SSSSZ&lt;/pre&gt;&lt;br /&gt;This could come in handy if, for example, you are using Apple's &lt;a href="http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSDateFormatter_Class/Reference/Reference.html"&gt;NSDateFormatter&lt;/a&gt; class. NSDateFormatter has no predefined style corresponding to RFC 3339 / ISO 8601 format so you'll need to use a &lt;a href="http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/DataFormatting/Articles/dfDateFormatting10_4.html#//apple_ref/doc/uid/TP40002369-SW1"&gt;format specifier string&lt;/a&gt; instead; NSDateFormatter format strings comply with the Unicode date format patterns.  So you can use the format pattern above to parse or output strings that can be exchanged with other RFC 3339 / ISO 8601 compliant systems.&lt;br /&gt;&lt;br /&gt;For example, the following Objective-C code will print out the current timestamp as an RFC 3339 / ISO 8601 compliant combined date/time string:&lt;pre class="prettyprint"&gt;NSDateFormatter *rfc3339 = [[NSDateFormatter alloc] init];&lt;br /&gt;[rfc3339 setDateFormat:@"yyyy-MM-dd'T'HH:mm:ss.SSSSZ"];&lt;br /&gt;&lt;br /&gt;NSDate *now = [NSDate date];&lt;br /&gt;NSLog(@"%@", [rfc3339 stringFromDate:now]);&lt;br /&gt;[rfc3339 release];&lt;/pre&gt;&lt;br /&gt;At the time of this writing, the output looked like "&lt;kbd&gt;2010-08-17T16:38:21.9640-0700&lt;/kbd&gt;".&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-8950809182838721762?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/8950809182838721762/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=8950809182838721762' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/8950809182838721762'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/8950809182838721762'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2010/08/rfc-3339-compliant-unicode-date-format.html' title='RFC 3339-compliant Unicode date format pattern'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-8719992446759610491</id><published>2010-07-16T16:32:00.008-07:00</published><updated>2010-07-16T17:30:49.326-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='web development'/><title type='text'>HTML encoding of form inputs</title><content type='html'>I suppose this is common knowledge amongst professional web developers but I just discovered myself that if a user enters characters into a HTML form input that is not representable in the character set of the page the form is in, browsers will HTML-encode the non-representable characters when the form is submitted.  I just spent over an hour assisting a coworker to track down a bug in one of our web applications that was due to this poorly-documented -- but reasonable -- behavior.&lt;br /&gt;&lt;br /&gt;I say "reasonable" because, as obscure as it is, this is really the best thing I think a browser can do given the situation.&lt;br /&gt;&lt;br /&gt;To recap, here is the scenario:&lt;ul&gt;&lt;li&gt;You have a web page with a form in it that is served using some locale-specific encoding.  In our case it was &lt;a href="http://en.wikipedia.org/wiki/Shift_JIS"&gt;Shift-JIS&lt;/a&gt;, but the default &lt;a href="http://en.wikipedia.org/wiki/ISO8859-1"&gt;ISO8859-1&lt;/a&gt; encoding leads to the same problem.&lt;br /&gt;&lt;li&gt;The user enters text into a form input field that is not representable in the displayed page's character set or encoding.  For example, entering Cyrillic characters into a form displayed on an ISO8859-1 page.&lt;br /&gt;&lt;li&gt;When the user submits the form, the browser tries to convert the inputs to the encoding of the page.  Any character not representable in that page's character set or encoding has its Unicode character code point encoded as an HTML numeric character reference (e.g. &amp;amp;#0452;).&lt;br /&gt;&lt;li&gt;The web application or CGI receiving this input needs to a) know the character encoding of the page that was used to submit the form data so it knows how to interpret the data as characters and b) be prepared to convert any embedded &lt;a href="http://www.w3.org/TR/2004/REC-xml-20040204/#dt-charref"&gt;HTML numeric character references&lt;/a&gt; back to their corresponding characters. &lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;I like that last part where web applications (or CGIs) have to know the encoding of an HTML page served &lt;i&gt;to&lt;/i&gt; the client in order to be able to properly parse input &lt;i&gt;from&lt;/i&gt; that client.  This fact shatters any remaining fantasies I had of HTTP being stateless.&lt;br /&gt;&lt;br /&gt;Anyway, the real surprise is that a web application or CGI needs to be prepared to unencode HTML entities in form input.  I quick check of perl's CGI.pm and python's cgi module indicates that neither of them do entity decoding of inputs automatically.  And considering that information on the web regarding this behavior is sparse , I suspect that most web developers are unaware of it.  At the time of writing, I can only find two references [&lt;a href="http://intertwingly.net/blog/1761.html"&gt;1&lt;/a&gt;][&lt;a href="http://htmlpurifier.org/docs/enduser-utf8.html#whyutf8-forms"&gt;2&lt;/a&gt;] that document HTML character reference encoding in the scenario described above.&lt;br /&gt;&lt;br /&gt;Luckily, there is a really simple solution: &lt;a href="http://htmlpurifier.org/docs/enduser-utf8.html#whyutf8"&gt;always serve pages in UTF8 encoding&lt;/a&gt; and always expect form input to be in UTF8 encoding.  One of the many great things about UTF8 encoding is that all characters are representable, so you never have to worry about the browser resorting to HTML character reference encoding.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-8719992446759610491?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/8719992446759610491/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=8719992446759610491' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/8719992446759610491'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/8719992446759610491'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2010/07/html-encoding-of-form-inputs.html' title='HTML encoding of form inputs'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-3963982243413359714</id><published>2010-07-12T18:10:00.003-07:00</published><updated>2010-07-13T11:10:19.002-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='fun'/><category scheme='http://www.blogger.com/atom/ns#' term='life'/><category scheme='http://www.blogger.com/atom/ns#' term='archery'/><title type='text'>Sharp pointy sticks</title><content type='html'>This past Saturday my wife and I bought &lt;a href="http://en.wikipedia.org/wiki/Bow_shape#Recurve_bow"&gt;recurve bows&lt;/a&gt; with the intent to make a hobby out of archery.  It turns out there are a number of parks with free-to-the-public archery ranges in the Bay Area.  A couple of the ranges we have found are:&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.kingsmountainarchers.org/about/range.html"&gt;Huddart County Park&lt;/a&gt; in San Mateo county near Woodside.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.sccgov.org/portal/site/parks/parksarticle?path=%252Fv7%252FParks%2520and%2520Recreation%252C%2520Department%2520of%2520%2528DEP%2529&amp;contentId=c0e18a77d9784010VgnVCMP230004adc4a92____"&gt;Stevens Creek Park&lt;/a&gt; near Cupertino&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;We actually got started a couple of weeks ago when we went for a free lesson from the &lt;a href="http://www.kingsmountainarchers.org/"&gt;Kings Mountain Archery Club&lt;/a&gt;.  That was a lot of fun and our instructors were very friendly, helpful, and patient.  They give free two-hour introductory lessons about once a month; information about how to signup is available on their &lt;a href="http://www.kingsmountainarchers.org/"&gt;web site&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;We picked up our bows and arrows at a shop intimidatingly called &lt;a href="http://www.predatorsarcheryshop.com/index.php"&gt;Predator's Archery&lt;/a&gt; down in Gilroy.  Much like our experience with Kings Mountain Archery, the staff at Predator's Archery were pretty friendly and helpful and they offer a great "starter package" which includes everything you need as well as 5 lessons.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-3963982243413359714?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/3963982243413359714/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=3963982243413359714' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/3963982243413359714'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/3963982243413359714'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2010/07/sharp-pointy-sticks.html' title='Sharp pointy sticks'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-5014133011580406261</id><published>2010-07-02T18:08:00.004-07:00</published><updated>2010-07-02T18:23:49.264-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='subversion'/><category scheme='http://www.blogger.com/atom/ns#' term='rants'/><title type='text'>In other news: Subversion still sucks</title><content type='html'>OK, I've had 4 months to get used to Subversion now.  And it is growing on me.  Or perhaps it is Stockholm Syndrome.  But there are still a lot of annoyances.&lt;br /&gt;&lt;br /&gt;After being bashed as a "troll" by one of Subversion's authors after daring to suggest it wasn't all ponies and rainbows, I thought I would check to see if others where sharing my pain transitioning from CVS to Subversion.&lt;br /&gt;&lt;br /&gt;Not surprisingly, I did.  &lt;a href="http://wiki.freebsd.org/SubversionMissing"&gt;I found a wonderful summary&lt;/a&gt; of all the frustrations I've been experiencing, thoughtfully compiled by no less than David O'Brien of the FreeBSD community.&lt;br /&gt;&lt;br /&gt;I would add to his list, as my friend John pointed out in comments to &lt;a href="http://kbyanc.blogspot.com/2010/04/subversion-sucks.html"&gt;my previous post&lt;/a&gt;, that it is really annoying to have to depend on external tools (ironically, CVS) to see commits across branches.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-5014133011580406261?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/5014133011580406261/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=5014133011580406261' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/5014133011580406261'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/5014133011580406261'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2010/07/in-other-news-subversion-still-sucks.html' title='In other news: Subversion still sucks'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-5612731893196059842</id><published>2010-07-01T11:31:00.008-07:00</published><updated>2010-07-29T13:10:38.702-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='web development'/><category scheme='http://www.blogger.com/atom/ns#' term='RFCs'/><title type='text'>Serving file downloads with non-ASCII filenames</title><content type='html'>Recently, while helping out one of my coworkers, it came to my attention that there is no universally-agreed on way to download a file to a web browser while suggesting a filename that contains non-ASCII characters.&lt;br /&gt;&lt;br /&gt;The common way to tell a browser to download a file (rather than try to display it in-browser) is to include a Content-Disposition header in the HTTP response; the header's value should be "attachment".  Additionally, the server can include a filename parameter in the Content-Disposition header as a suggestion to the browser for what filename to save the file as.&lt;br /&gt;&lt;br /&gt;As a bit of history, the Content-Disposition header was originally defined in &lt;a href="http://www.ietf.org/rfc/rfc1806.txt"&gt;RFC 1806&lt;/a&gt; which was obsoleted and replaced by &lt;a href="http://www.ietf.org/rfc/rfc2183.txt"&gt;RFC 2183&lt;/a&gt;.  However, the Content-Disposition header was originally defined for use in MIME messages and, while &lt;a href="http://www.ietf.org/rfc/rfc2616.txt"&gt;RFC 2616 (HTTP 1.1)&lt;/a&gt; makes reference to the Content-Disposition header, it does so only to note that:&lt;blockquote&gt;Content-Disposition is not part of the HTTP standard, but since it is widely implemented, we are documenting its use and risks for implementors.&lt;/blockquote&gt;&lt;br /&gt;Luckily, while not officially standardized for use in HTTP, the Content-Disposition header is "widely implemented" indeed; it seems that all modern browsers implement the header.  If the web server responds to a request with application/octet-stream data and a Content-Disposition header of "attachment", your browser will display the familiar "Save As..." dialog.  If the server included a filename parameter in that Content-Disposition header, your browser will likely pre-fill the filename input field of the "Save As..." dialog with the specified filename.&lt;br /&gt;&lt;br /&gt;But here is where things start getting murky.&lt;br /&gt;&lt;br /&gt;RFC 2183, skirts the issue of international filenames by disclaiming responsibility:&lt;blockquote&gt;Current [RFC 2045] grammar restricts parameter values (and hence Content-Disposition filenames) to US-ASCII.  We recognize the great desirability of allowing arbitrary character sets in filenames, but it is beyond the scope of this document to define the necessary mechanisms.&lt;/blockquote&gt;&lt;br /&gt;So, as long as the downloaded files' names are always representable in the ASCII charactet set, any browser should properly display the filename (although I've seen rumors that some browsers, such as IE, do enforce a limit on the length of the filename).  However, I work at a Japanese company, making products largely for the Japanese market, so we don't have the privilege of assuming the whole world is ASCII.&lt;br /&gt;&lt;br /&gt;By the way, in case you are curious, even iso-8869-1 (latin1) isn't consistently supported across browsers so Europeans are left high-and-dry too.&lt;br /&gt;&lt;br /&gt;You are probably thinking, like I was, that surely this is a solved problem.  And actually, it is.  Kind of.  The Content-Disposition header originates with the MIME protocol which, since the publication of &lt;a href="http://www.ietf.org/rfc/rfc2231.txt"&gt;RFC 2231&lt;/a&gt; in 1997, now supports non-ASCII character encodings for header values.  So, for example, the filename "foo-ä.html" can be represented in the Content-Disposition header like so:&lt;pre style="overflow:scroll;"&gt;Content-Disposition: attachment; filename*=UTF-8''foo-%c3%a4.html&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The problem is that few browsers actually implement this RFC 2231 syntax.  For example, Firefox 3.6 and Opera 10 appear to support the RFC 2231 syntax.  On the other hand, for Internet Explorer, Microsoft's developers choose to simply perform URL-style percent-decoding and then interpret the result as bytes of UTF8-encoded characters.  So a server would need to send the Content-Disposition header as &lt;pre style="overflow:scroll;"&gt;Content-Disposition: attachment; filename="foo-%c3%a4.html"&lt;/pre&gt; for an MSIE user to see "foo-ä.html" in the "Save As..." dialog.&lt;br /&gt;&lt;br /&gt;Despite &lt;a href="http://code.google.com/p/chromium/issues/detail?id=118"&gt;requests for IETF working group members to fix it&lt;/a&gt;, Google's Chrome browser also does not comply with RFC 2231, preferring to follow Microsoft's lead and use simple URL-style percent decoding.&lt;br /&gt;&lt;br /&gt;As a result, there is no consistent cross-browser way to suggest a non-ASCII filename for a file download.  I'm sure it doesn't help that the Content-Disposition header has never formally been part of the HTTP specification, but yet it is used by all major browsers to implement file download functionality.&lt;br /&gt;&lt;br /&gt;Julian Reschke has compiled a test suite and &lt;a href="http://greenbytes.de/tech/tc2231/"&gt;publishes a nifty page&lt;/a&gt; illustrating all of incompatibilities between browsers regarding handling of the Content-Disposition header.  In addition, as part of the IETF Network Working Group, he is working on an &lt;a href="http://greenbytes.de/tech/webdav/draft-reschke-rfc2231-in-http-latest.html"&gt;RFC to formally define the interpretation of the Content-Disposition header in the HTTP context&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Unfortunately, because the ambiguity has been left unresolved for so long, some web servers have adopted the MSIE/Chrome encoding technique for their non-ASCII filenames.  Actually, my gut feeling is that probably most have, although I don't have any hard numbers to back up that claim.  The good news is that since the MSIE/Chrome encoding is only used for parameters in the form &lt;kbd&gt;filename="..."&lt;/kbd&gt; while the RFC 2231-style encoding used by Firefox, Opera, and Julian's proposal uses &lt;kbd&gt;filename*=...&lt;/kbd&gt; it is possible for the two to coexist in the same Content-Disposition header (note the presence of the &lt;kbd&gt;*&lt;/kbd&gt; in the RFC 2231 format to differentiate it).&lt;br /&gt;&lt;br /&gt;In fact, probably the most important section of Julian's proposal is section 4.2 where defines the HTTP client's behavior when the server responds with both &lt;kbd&gt;filename=...&lt;/kbd&gt; and &lt;kbd&gt;filename*=...&lt;/kbd&gt;, allowing for an easy upgrade path for MSIE and Chrome.&lt;br /&gt;&lt;br /&gt;For now, however, &lt;a href="http://greenbytes.de/tech/tc2231/#attfnboth"&gt;Julian's test results&lt;/a&gt; show that when presented both traditional and extended formats, only Firefox and Opera will select the extended &lt;kbd&gt;filename*=...&lt;/kbd&gt; format.  &lt;br /&gt;&lt;br /&gt;This opens an opportunity for those of us that need to serve file downloads containing non-ASCII filenames: we can include the filename in non-standard encoding supported by MSIE and Chrome first in the Content-Disposition header, followed by the filename in extended RFC 2231 encoding.  According to Julian's tests, MSIE and Chrome will always take the first parameter while Firefox and Opera will properly selecte the extended-syntax parameter, no matter what order it appears in.&lt;br /&gt;&lt;br /&gt;For example, if the server includes the header: &lt;pre style="overflow:scroll;"&gt;Content-Disposition: attachment; filename="foo-%c3%a4.html" filename*=UTF-8''foo-%c3%a4.html&lt;/pre&gt; all four major browsers should properly display the filename "foo-ä.html" in the "Save As..." dialog.  Unfortunately, WebKit-based browsers, like Apple's Safari browser, would display the raw percent-encoded value "foo-%c3%a4.html" as the filename.  At least for now, though, I'm afraid this is the best we can do.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-5612731893196059842?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/5612731893196059842/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=5612731893196059842' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/5612731893196059842'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/5612731893196059842'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2010/07/serving-file-downloads-with-non-ascii.html' title='Serving file downloads with non-ASCII filenames'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-466085500739266733</id><published>2010-06-28T09:37:00.006-07:00</published><updated>2010-06-28T10:13:52.998-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='life'/><category scheme='http://www.blogger.com/atom/ns#' term='music'/><title type='text'>Sharon Jones and the Dap Kings</title><content type='html'>This past Friday we had the chance to see &lt;a href="http://www.sharonjonesandthedapkings.com/"&gt;Sharon Jones and the Dap Kings&lt;/a&gt; at the Warfield in San Francisco.  The music was fun and Sharon was an amazing performer and entertainer.  In addition to her own high-energy dancing around the stage, she invited a few of the audience onto the stage to dance with her.  This was sort-of a crap-shoot as at least one person's dance skills ranked somewhere between &lt;a href="http://www.youtube.com/watch?v=5xi4O1yi6b0"&gt;Elaine from Seinfeld&lt;/a&gt; and epileptic seizure victim.  However, one guy who referred to himself as merely "The Gator" got up on stage in full 70's era leisure suit and that boy could dance.  Sharon even turned the spotlight over to him and let him go to town.&lt;br /&gt;&lt;br /&gt;I'll be damned if someone didn't manage to get a video of it and has already uploaded it to Youtube:&lt;br /&gt;&lt;br /&gt;&lt;object width="560" height="340"&gt;&lt;param name="movie" value="http://www.youtube.com/v/yMnPu0B__Hw&amp;hl=en_US&amp;fs=1&amp;"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/yMnPu0B__Hw&amp;hl=en_US&amp;fs=1&amp;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="460" height="280"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;The opening act was &lt;a href="http://www.theheavy.co.uk/"&gt;The Heavy&lt;/a&gt;, whose is perhaps best known for their song "&lt;a href="http://www.youtube.com/watch?v=sVzvRsl4rEM"&gt;How Do You Like Me Now?&lt;/a&gt;" that Kia uses in car ads featuring &lt;a href="http://www.youtube.com/watch?v=UJqs3D2vv4I&amp;feature=related"&gt;bad-ass stuffed animals&lt;/a&gt;.  Except for the horns, I wouldn't have thought that they would have been a good match for Sharon Jones and the Dap Kings.  But they were another high-energy act that really got the crowd riled up for the main act.&lt;br /&gt;&lt;br /&gt;Overall it was a great show.  We had some punk kids causing trouble in front of us, but eventually security took care of them and we were able to enjoy the rest of the show.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-466085500739266733?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/466085500739266733/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=466085500739266733' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/466085500739266733'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/466085500739266733'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2010/06/sharon-jones-and-dap-kings.html' title='Sharon Jones and the Dap Kings'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-7270505865776665774</id><published>2010-06-22T11:16:00.004-07:00</published><updated>2010-06-22T12:12:37.242-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rants'/><title type='text'>Experiences with Clipper</title><content type='html'>While I was away in Japan, Caltrain and the other Bay-Area transit agencies teamed up to introduce the &lt;strike&gt;Translink&lt;/strike&gt; &lt;a href="http://en.wikipedia.org/wiki/Clipper_%28San_Francisco_Bay_Area_transit_card%29"&gt;Clipper&lt;/a&gt; payment system.  I was excited at the prospect of an easy-to-use IC-card payment system like the &lt;a href="http://en.wikipedia.org/wiki/Suica"&gt;Suica system I enjoyed using in Tokyo&lt;/a&gt;, and I was tired of having to buy new 8-ride tickets every few days, so I got a Clipper card and tried it out.&lt;br /&gt;&lt;br /&gt;The card is easy enough to use, but the experience refilling my balance on the card has been less than stellar.  I'm not about to tie my Clipper card to my credit card account, effectively turning it into a backdoor for a thief to clean me out (the "autoload" feature they push on their website).  I was hoping to be able to refill it manually using an automated machine, just like I always did with my Suica card.&lt;br /&gt;&lt;br /&gt;It turns out that there are a whopping 7 "Add Value" machines in the entire Bay Area: two in San Rafael, one in Sausalito, one in Oakland, two in downtown San Francisco, and one on the freaking Golden Gate Bridge (I guess for the toll-booth workers?).  Fortunately, for those of us whose commute doesn't include one of those 7 locations, you can also add to your Clipper card balance at most Walgreens locations.&lt;br /&gt;&lt;br /&gt;And here is where my experience with Clipper takes a nose-dive.  First, not all Walgreens locations are equipped to add money to your Clipper card balance.  There is, however, a &lt;a href="http://www.clippercard.com/ClipperWeb/map.do"&gt;map of the locations on the Clipper website&lt;/a&gt;.  Unfortunately for me, the Walgreens one block from my office in San Mateo is not on the list and, when asked in person, I received the same look one would expect had I asked them if sold live Jabberwockies.&lt;br /&gt;&lt;br /&gt;So, each time I need to refill the balance on my card, I hop in the car and drive two miles to the Walgreens nearest my home.  Two miles isn't particularly far, but it does feel a little odd to have to drive somewhere so I can pay for public transportation.  Anyway, I only have to do it once every couple of weeks, so it isn't a big deal; just a minor annoyance.&lt;br /&gt;&lt;br /&gt;What is more annoying about the experience is that apparently only managers have the specialized training necessary to work the Clipper card "add value" device they keep behind the counter.  So the poor checkout clerk has to page for the manager who, after finishing his dooby, mosies up to the front counter and fumbles with the machine until (hopefully) it actually has the balance on it I paid for.  This past time, my wife and I had to repeatedly tell other customers that they might want to get in the other line because we were going to be a while.  Ten minutes in fact.&lt;br /&gt;&lt;br /&gt;The good news is that, with the name change from Translink to Clipper, it looks like they have added an option to refill your card balance online.  I'm planning on trying that the next time I need to update my balance.  I might miss the biweekly visit to the bloodshot-eyed Walgreens manager, though.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-7270505865776665774?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/7270505865776665774/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=7270505865776665774' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/7270505865776665774'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/7270505865776665774'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2010/06/experiences-with-clipper.html' title='Experiences with Clipper'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-1645723518175915746</id><published>2010-05-03T18:30:00.004-07:00</published><updated>2010-05-03T18:58:46.559-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><category scheme='http://www.blogger.com/atom/ns#' term='rants'/><title type='text'>Crappy Code Hopscotch</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://farm2.static.flickr.com/1104/1374710888_a5ddca9961.jpg"&gt;&lt;img style="float: right; margin: 0pt 0pt 10px 10px; cursor: pointer; width: 156px; height: 236px;" src="http://farm2.static.flickr.com/1104/1374710888_a5ddca9961.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;I'm officially coining the term "crappy code hopscotch" to refer to the stupid games you have to play to workaround crappy code.  I guess it could equally well refer to that feeling of being surprised by the effects of crappy code in any otherwise simple task, which might not be altogether unlike the feeling of unpleasant surprise you would get if someone were to throw a pile of dog poo in your hopscotch square.&lt;br /&gt;&lt;br /&gt;The term popped into my head today while doing some MySQL wrangling; I was testing a stored function that called &lt;a href="http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_lower"&gt;LOWER()&lt;/a&gt; on the results of &lt;a href="http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_concat-ws"&gt;CONCAT_WS()&lt;/a&gt;.  Sounds simple enough: lower-case the result of concatenating strings with a separator.  Check this output from MySQL 5.1:&lt;pre&gt;&lt;br /&gt;mysql&gt; SELECT LOWER(CONCAT_WS(' ', 'MySQL', 'scores', 'a', 0));&lt;br /&gt;+--------------------------------------------------+&lt;br /&gt;| LOWER(CONCAT_WS(' ', 'MySQL', 'scores', 'a', 0)) |&lt;br /&gt;+--------------------------------------------------+&lt;br /&gt;| MySQL scores a 0                                 |&lt;br /&gt;+--------------------------------------------------+&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Silent lower-case fail.&lt;br /&gt;&lt;br /&gt;The problem, it seems, is that CONCAT_WS() doesn't convert the numeric argument to a string, but rather decides to convert *all* of the parameters to BINARY types and, as a result, returns a BINARY value.  To it's credit, at least LOWER() is documented as being a no-op on BINARY values, hence the useless output shown above.  What amazed me is that not just the undocumented, unintuitive behavior of CONCAT_WS() but that MySQL did not emit a single warning when LOWER() returned a value without, you know, lower-casing it.&lt;br /&gt;&lt;br /&gt;So out of nowhere, I find myself playing crappy code hopscotch.  I can explicitly either cast the numeric argument to CONCAT_WS() to a string or else let CONCAT_WS() return a BINARY value and explicitly convert that back to a string before passing it to LOWER().&lt;br /&gt;&lt;br /&gt;Two crappy boxes to pick from and I got to put my foot in one of them.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-1645723518175915746?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/1645723518175915746/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=1645723518175915746' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/1645723518175915746'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/1645723518175915746'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2010/05/crappy-code-hopscotch.html' title='Crappy Code Hopscotch'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://farm2.static.flickr.com/1104/1374710888_a5ddca9961_t.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-3822162531551704764</id><published>2010-04-22T21:13:00.005-07:00</published><updated>2010-04-22T22:08:33.853-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='baypiggies'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>Invent with Python</title><content type='html'>Al Sweigart gave a presentation of his book, &lt;a href="http://inventwithpython.com/"&gt;Invent Your Own Computer Games with Python&lt;/a&gt;, to Baypiggies tonight.  His book is aimed at kids that are interested in learning how to program.  He said he didn't have a particular age range in mind, but I would say from experience it would probably be fine for anyone age 8 to 15 with an interest in computers.&lt;br /&gt;&lt;br /&gt;I was impressed with the overall tone and layout of his book.  And his choice of teaching programming via writing simple computer games is right on the money.  He mentioned that what got him hooked on programming was tinkering around creating simple games when he was kid; I'd venture that was what got a great many of the best engineers I've met started.  In addition, he choose to teach programming concepts via &lt;a href="http://www.python.org/"&gt;Python&lt;/a&gt;, which I also agree is a great language for learning because it is expressive, easy to understand, and yet powerful to build professional applications.&lt;br /&gt;&lt;br /&gt;In his presentation, Al accurately pointed out that there is a trend to try and simplify programming for kids until it resembles building with &lt;a href="http://en.wikipedia.org/wiki/Lego_Duplo"&gt;duplo blocks&lt;/a&gt; and that really isn't helpful for kids nor interesting for them.  I concur enthusiastically.  Projects like &lt;a href="http://scratch.mit.edu/"&gt;Scratch&lt;/a&gt; are neat, but seem patronizing to me.  I learned on BASIC and Pascal and I don't doubt kids today are just as capable.  That said, BASIC and Pascal are dated now; python is just as easy to learn yet more powerful and modern so it is a great choice.&lt;br /&gt;&lt;br /&gt;Another difference between Al's book and many intro books is that his programs are short, fun, and mostly text.  Of course, every kid dreams of writing graphical games like the video games they play but that is, frankly, not realistic.  Again, Al doesn't lie to his audience; he presents fun text-based games that kids can tinker with.  He starts with a simple guessing game, then hangman, tic-tac-toe, and othello.  Towards the end of the book, he does introduce &lt;a href="http://www.pygame.org/"&gt;pygame&lt;/a&gt; and shows how to use it to make simple graphical games, but the vast majority of the book focuses on teaching fundamental concepts via text-based games.&lt;br /&gt;&lt;br /&gt;I actually taught introductory computer programming to high school students, age 14 and 15, a number of years ago.  Back then we used C, but I was surprised to find that Al presents software concepts in the same order I did and even uses the same games to drive those concepts home.  If I could teach the same class today in python, Al Sweigart's &lt;u&gt;Invent Your Own Computer Games with Python&lt;/u&gt; is the book I'd want to use.&lt;br /&gt;&lt;br /&gt;Overall I was quite impressed with the great job Al did with the book and appreciate him taking the time to talk about it, and the process of writing it, to us at Baypiggies tonight.&lt;br /&gt;&lt;br /&gt;P.S. I should mention that he has published the book under the Creative Commons license so it is free to read; you can even download the latest edition off &lt;a href="http://inventwithpython.com/"&gt;his website&lt;/a&gt;.  &lt;a href="http://www.amazon.com/Invent-Your-Computer-Games-Python/dp/1441413030/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1271998958&amp;sr=8-1"&gt;Amazon sells it in dead-tree format&lt;/a&gt; too, but you should hold off because the second edition will be going to print soon.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-3822162531551704764?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/3822162531551704764/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=3822162531551704764' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/3822162531551704764'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/3822162531551704764'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2010/04/invent-with-python.html' title='Invent with Python'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-8720947224591406293</id><published>2010-04-19T12:29:00.002-07:00</published><updated>2010-04-19T12:37:08.223-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='life'/><category scheme='http://www.blogger.com/atom/ns#' term='mac'/><title type='text'>Good Day</title><content type='html'>All of our sea mail from Japan arrived and was just delivered.  In addition, my new MacBook Pro I ordered last week (right after the revision bump) arrived today too.  Looks like I'm going to be busy this week.  I just hope I can find time to make it to &lt;a href="http://www.baypiggies.net/"&gt;BayPiggies&lt;/a&gt; this Thursday.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-8720947224591406293?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/8720947224591406293/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=8720947224591406293' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/8720947224591406293'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/8720947224591406293'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2010/04/good-day.html' title='Good Day'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-987291829792437278</id><published>2010-04-16T16:14:00.003-07:00</published><updated>2010-07-02T18:21:14.015-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='subversion'/><category scheme='http://www.blogger.com/atom/ns#' term='rants'/><title type='text'>Subversion sucks</title><content type='html'>While I was away in Tokyo, NTTMCL switched from CVS to Subversion for their version control system.  Perhaps it is just that I'm too accustomed to CVS's eccentricities, but so far I have to say the Subversion sucks.  While I'm sitting here waiting for the checkout of one of our heavily-branched repositories to complete (45 minutes and counting!), I took the opportunity to read a little about how much more wonderful Subversion is than CVS.&lt;br /&gt;&lt;br /&gt;So far, the best I've come up with is that Subversion is newer, therefore it is better.  Yay.  With subversion, I just get the delight of knowing I'm playing with a fresh(er) turd.&lt;br /&gt;&lt;br /&gt;Sure, CVS sucks too.  What bothers me about Subversion is that it sucks at least as much as CVS without giving anything in return.  At least with CVS, I can tag a release or create a branch without having to make a whole other copy of the repository (on each developer's machine, no less!).  At least with CVS, I can diff and merge files between branches or tags without developing a Repetitive Strain Injury.  At least with CVS, the repo files are text so I can recover when it screws up.  At least with CVS, I don't have to run a friggin' web server just to do revision control.&lt;br /&gt;&lt;br /&gt;So, yeah, maybe I'm just an old fogey.  Or maybe Subversion sucks so much, it actually makes me long for CVS.  Wouldn't that be sad.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-987291829792437278?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/987291829792437278/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=987291829792437278' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/987291829792437278'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/987291829792437278'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2010/04/subversion-sucks.html' title='Subversion sucks'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-1276718522890216255</id><published>2010-04-15T16:41:00.008-07:00</published><updated>2010-04-15T17:26:35.660-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><title type='text'>Help me, I'm in RPM Hell</title><content type='html'>Dear Internet,&lt;br /&gt;&lt;br /&gt;Surely there must be a better way to install packages on linux.  For better or worse I've been locked in the FreeBSD ivory tower for the better part of 10 years.  But now I am assigned to a project that is using linux and I find myself yearning for BSD-style package management.  Specifically, I am looking for:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;A way to find a package for my OS (in this case, Red Hat Enterprise Linux 5, 64-bit).&lt;br /&gt;&lt;li&gt;Download that package and the packages for all of its dependencies.&lt;br /&gt;&lt;li&gt;Install a package and all of its dependencies onto a host that is not connected to the Internet.&lt;br /&gt;&lt;li&gt;Is command-line based.&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;In FreeBSD, you can use the FreeBSD packages database to locate the desired package and download it to your system in a format that you can install offline.  Getting all of the dependencies it a little trickier, but I wrote &lt;a href="http://www.posi.net/cgi-bin/cvsweb.cgi/portdeps/portdeps"&gt;a simple perl script&lt;/a&gt; some years ago that does that using the &lt;a href="http://en.wikipedia.org/wiki/FreeBSD_Ports"&gt;FreeBSD ports collection&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Obviously linux has the rpm format for its packages but I'm finding that searching for rpms and identifying all of their dependencies is just as manual of a process as it was 10 years ago.  For example, the &lt;a href="http://en.wikipedia.org/wiki/Yellowdog_Updater,_Modified"&gt;yum&lt;/a&gt; command can install a package and its dependencies, but does not seem to support downloading the rpms for those packages to reproduce the process on an offline machine.  Surely there must be a way.&lt;br /&gt;&lt;br /&gt;If anyone could point me to a tool for linux that satisfies the 4 goals above, I would be grateful.&lt;br /&gt;&lt;br /&gt;P.S. In a case of "it's a small world after all", I went to elementary school through high school with the author of yum, &lt;a href="http://skvidal.wordpress.com/"&gt;Seth Vidal&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-1276718522890216255?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/1276718522890216255/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=1276718522890216255' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/1276718522890216255'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/1276718522890216255'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2010/04/help-me-im-in-rpm-hell.html' title='Help me, I&apos;m in RPM Hell'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-7821132082041819220</id><published>2010-03-29T17:07:00.004-07:00</published><updated>2010-03-29T17:49:54.295-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='music'/><title type='text'>Soil and "Pimp" Sessions</title><content type='html'>Soil and "Pimp" Sessions is a Japanese jazz band that I've taken quite a liking to.  I first learned about them when they released a single with Shina Ringo called "カリソメ乙女" (&lt;a href="http://en.wikipedia.org/wiki/Karisome_Otome"&gt;Karisome Otome&lt;/a&gt;) back in 2006.  They have had &lt;a href="http://www.youtube.com/results?search_query=soil+and+pimp+sessions&amp;search_type=&amp;aq=f"&gt;a number of videos on YouTube&lt;/a&gt; which I enjoyed, but I just couldn't get my hands on one of their albums.  It doesn't look like they have a distributor in the U.S. and none of the record stores I visited in Japan stocked them either.&lt;br /&gt;&lt;br /&gt;&lt;center&gt;&lt;br /&gt;&lt;object width="480" height="385"&gt;&lt;param name="movie" value="http://www.youtube.com/v/axzOcH9KhN0&amp;hl=en_US&amp;fs=1&amp;"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/axzOcH9KhN0&amp;hl=en_US&amp;fs=1&amp;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;/center&gt;&lt;br /&gt;&lt;br /&gt;So you can imagine my surprise and delight when &lt;a href="http://itunes.apple.com/us/artist/soil-pimp-sessions/id259015472?uo=6" target="itunes_store"&gt;iTunes started carrying their albums&lt;/a&gt; around November of last year.  The U.S. iTunes store even.  I've since stocked up bought 20 or so songs of theirs and have yet to be disappointed.  The best I can tell, the U.S. iTunes store is selling all of their albums.&lt;br /&gt;&lt;br /&gt;To top it all off, Shina Ringo's latest album, 三文ゴシップ (sanmon gossip) not only includes the 2006 Karisome Otome single, but includes another awesome collaboration　with Soil and Pimp Sessions: マヤカシ優男 (Mayakashi Yasaotoko).  There isn't a video for it, but you can &lt;a href="http://www.youtube.com/watch?v=l1VRLvpDR0o"&gt;preview the song on YouTube&lt;/a&gt;.  Don't worry, the &lt;a href="http://music.goo.ne.jp/lyric/LYRUTND79837/index.html"&gt;lyrics for this song&lt;/a&gt; are all in English.&lt;br /&gt;&lt;br /&gt;Even though they are a Japanese band, since it is jazz, most of the songs have no lyrics.  That said, What few words there are do tend to be English.  Which makes them a very approachable band to international audiences.  In fact, right now they are in the middle of a European Tour.  They have a live show schedule on &lt;a href="http://www.jvcmusic.co.jp/soilpimp/"&gt;their web site&lt;/a&gt;; I know I'll be watching to see when they come to San Francisco.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-7821132082041819220?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/7821132082041819220/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=7821132082041819220' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/7821132082041819220'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/7821132082041819220'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2010/03/soil-and-pimp-sessions.html' title='Soil and &quot;Pimp&quot; Sessions'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-2032325195414236057</id><published>2010-03-29T17:00:00.003-07:00</published><updated>2010-03-29T17:04:16.626-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='life'/><title type='text'>Back in California</title><content type='html'>Well, we're back in California and getting settled in.  I had a month off to get moved out of our place in Tokyo and moved into our new place in Mountain View.  It has been a hectic month but the last few days have been relaxing.  That said, I'm ready to get back to work.&lt;br /&gt;&lt;br /&gt;Anyway, I've got a whole backlog of things I've been meaning to blog about so hopefully I'll be a little more frequent with the updates for a while.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-2032325195414236057?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/2032325195414236057/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=2032325195414236057' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/2032325195414236057'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/2032325195414236057'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2010/03/back-in-california.html' title='Back in California'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-5246336937189671659</id><published>2010-03-04T05:12:00.003-08:00</published><updated>2010-03-04T06:03:40.424-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='life'/><category scheme='http://www.blogger.com/atom/ns#' term='japan'/><title type='text'>No place like home</title><content type='html'>Well, I've wrapped up my time here in Tokyo and preparing to move back to California.  Barring a few small obstacles -- like just noticing that our passports had expired and frantically visiting the U.S. Embassy to get new ones -- we should be back in the U.S. by this time next week.&lt;br /&gt;&lt;br /&gt;My coworkers gave me a nice farewell party which was quite fun.  I'm not sure why, but I got pretty choked up on my last day at the office.  I'm sure part of it was the relief of finally going home, but a lot of it was that I really liked my coworkers.  They were the best part of working in Japan.&lt;br /&gt;&lt;br /&gt;This past week I've had more time and finally gotten a chance to see more of the neighborhood where we have been living.  It is actually a pretty nice area.  It is a shame that it took over 2 years before I could actually enjoy it.  Nonetheless I'm really looking forward to going home.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-5246336937189671659?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/5246336937189671659/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=5246336937189671659' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/5246336937189671659'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/5246336937189671659'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2010/03/no-place-like-home.html' title='No place like home'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-5372998282969695601</id><published>2010-02-09T02:30:00.007-08:00</published><updated>2010-07-29T13:16:05.180-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='translation'/><category scheme='http://www.blogger.com/atom/ns#' term='japan'/><title type='text'>Yattsuke Shigoto</title><content type='html'>My friend Matt introduced me to a Japanese singer/songwriter named &lt;a href="http://en.wikipedia.org/wiki/Ringo_Shiina"&gt;Shiina Ringo&lt;/a&gt; a few years back.  I've taken quite a liking to her music, but one of her songs has really grown on me since I've been in Tokyo.  It is a song called 「やっつけ仕事」(Yattsuke Shigoto), which means a job done half-assed.  For me, the lyrics reflect the general feeling of apathy and soullessness that Tokyo seems to emanate.  I guess it may be different for natives, but this song speaks to me.  It speaks to me every time I get on the train and stair blankly off into the distance or pretend to sleep like everyone around me.&lt;br /&gt;&lt;br /&gt;Feeling down today, I thought I would check to see if there were any English translations of the lyrics.  All I could find was one terrible almost-literal translation that killed the voice of the song.  So I whipped up a translation of my own (below).&lt;br /&gt;&lt;br /&gt;I'm pretty confident that this translation captures the spirit of the song, even if I did stray from the literal translation by a wide margin on a couple of lines.  The only line I'm not happy with is the one about the high-speed traffic jam.  In Japan, if there is a traffic jam on a highway (which is literally called a "high-speed road"), they just say high-speed (road) traffic-jam, omitting the word "road".  Hence producing the contradictory, "high-speed" traffic jam.&lt;br /&gt;&lt;br /&gt;The only other part I'm not satisfied with at the pronouns.  Japanese doesn't have pronouns and it isn't clear who is saying what in the song.  I just assumed that everything was being said from a first-person perspective, since that is normally the case in most songs.&lt;br /&gt;&lt;br /&gt;In case you are interested, the original Japanese lyrics are &lt;a href="http://music.goo.ne.jp/lyric/LYRUTND12504/index.html"&gt;here&lt;/a&gt;.  There are a couple versions of the song on iTunes also.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;b&gt;Yattsuke Shigoto - Shiina Ringo&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Every day I'm assaulted by the ring of phones&lt;br /&gt;I just want some peace and quiet&lt;br /&gt;&lt;br /&gt;You call it a "high-speed" traffic jam, but isn't it slow?&lt;br /&gt;I'm indifferent to reasoning contrary to reality&lt;br /&gt;&lt;br /&gt;I can't think of anything good&lt;br /&gt;But I'm not indignant about anything either&lt;br /&gt;What day was it today?&lt;br /&gt;I guess it doesn't much matter&lt;br /&gt;Ah, all I want is something memorable&lt;br /&gt;&lt;br /&gt;This consistency wears down my individuality&lt;br /&gt;Maybe I'll just get an arranged marriage&lt;br /&gt;&lt;br /&gt;Please control me&lt;br /&gt;I hate boredom&lt;br /&gt;When's the last Ginza-line train?&lt;br /&gt;I guess it's not a big deal&lt;br /&gt;Ah, I wish I could be a machine&lt;br /&gt;&lt;br /&gt;Hey, what was "love" again?&lt;br /&gt;I can't remember&lt;br /&gt;I can't remember&lt;br /&gt;&lt;br /&gt;I can't think of anything good&lt;br /&gt;But I'm not indignant about anything either&lt;br /&gt;What day was it today?&lt;br /&gt;I guess it doesn't much matter&lt;br /&gt;Ah, all I want is something memorable&lt;br /&gt;&lt;br /&gt;Please control me&lt;br /&gt;I hate boredom&lt;br /&gt;When's the last Ginza-line train?&lt;br /&gt;I guess it's not a big deal&lt;br /&gt;&lt;br /&gt;I can't think of anything good&lt;br /&gt;I can't think of anything good&lt;br /&gt;I can't think of anything good&lt;br /&gt;&lt;br /&gt;Hey, what was "love" again?&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-5372998282969695601?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/5372998282969695601/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=5372998282969695601' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/5372998282969695601'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/5372998282969695601'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2010/02/my-friend-matt-introduced-me-to.html' title='Yattsuke Shigoto'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-5858129361811327198</id><published>2010-02-07T17:46:00.004-08:00</published><updated>2010-02-07T22:18:57.042-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bugs'/><category scheme='http://www.blogger.com/atom/ns#' term='testing'/><title type='text'>When Standards Collide</title><content type='html'>I can't help but shake my head in disappointment every time I run across some specification that is blatantly in violation of the standards it is built on.  When I encounter a specification published by an ostensibly-reputable professional organization that contradicts my understanding of the underlying protocols, at first I'm confused.  Is my understanding faulty?  My memory bad (hint: it is)?  Is there a new RFC that updated the protocol when I wasn't looking?&lt;br /&gt;&lt;br /&gt;As a recent example, I finally got my hands on the WRIX Interconnect 1.03 specification from the &lt;a href="http://en.wikipedia.org/wiki/Wireless_Broadband_Alliance"&gt;Wireless Broadband Alliance&lt;/a&gt;.  In which, they specify that partner ISPs must support "passwords up to 253 characters which contain a mixture of alphabetic, numeric, and special characters"; this is written in the comments for the the User-Password attribute in a RADIUS Access-Request packet.&lt;br /&gt;&lt;br /&gt;There are two problems with this text that I'm amazed industry professionals did not correct (assuming they noticed):&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;RFC 2865 section 5.2 clearly states that the maximum length of the User-Password attribute is 130 octets, including the 2-byte attribute header.  In other words, the encrypted password text cannot be longer than 128 octets.  If this were the only issue, I'd be inclined to believe that the 128 octet limit has been relaxed in a later RFC.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Which leads to the second issue: RFC 2865 says the *encrypted* password text cannot be longer than 128 octets.  Section 5.2 also lays out the encryption algorithm, which is a 16-byte block cipher.  Being a block cipher, the password plaintext is padded out to a multiple of 16 bytes before the encryption is applied.  Which means that a 7 octet password will encrypt to 16 octets of encrypted text.  The 253 character password specified by WRIX would encrypt to 256 octets of encrypted text.  RADIUS allocates 8 bits per attribute to represent the length of that attribute in octets, including the attribute's 2-byte header.  So, if you have 256 octets of encrypted text, the total length of the attribute would be 258 octets.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;So, in order to comply with the WRIX Interconnect 1.03 specification, it would appear you are required to violate both RFC 2865 and physics (to get 258 values represented with just 8 bits).  &lt;br /&gt;&lt;br /&gt;What baffles me is that I would have expected the difficulty of implementing the specification as written would have become obvious in compatibility testing.  Surely someone has written unit tests based on the spec to test their implementation.  At least once.  Right?  Right?&lt;br /&gt;&lt;br /&gt;Anyway, I imagine the intent of the specification's authors was only to violate RFC 2865 and leave the violation of physics to the hardware guys.  It looks like they wanted partner ISPs to allow the longest password representable by the User-Password attribute, ignoring the 128-octet stated limit.  Since the encryption algorithm always produces encrypted text that is a multiple of 16-bytes in length and the longest encrypted text that can be stored in the User-Password attribute is 255 - 2 = 253 octets, the question is what is the largest multiple of 16 less than or equal to 253?&lt;br /&gt;&lt;br /&gt;240.  240 octets.&lt;br /&gt;&lt;br /&gt;Any plaintext 241 octets long or longer will encrypt to 256 bytes of encrypted data, which is not representable by a RADIUS User-Password attribute.  So, a more reasonable specification would require implementers to support "passwords up to &lt;b&gt;240&lt;/b&gt; characters which contain a mixture of alphabetic, numeric, and special characters."&lt;br /&gt;&lt;br /&gt;Maybe in revision 1.04.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-5858129361811327198?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/5858129361811327198/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=5858129361811327198' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/5858129361811327198'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/5858129361811327198'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2010/02/when-standards-collide.html' title='When Standards Collide'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-408030132085267529</id><published>2010-01-21T22:52:00.006-08:00</published><updated>2010-01-21T23:35:53.409-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='economics'/><category scheme='http://www.blogger.com/atom/ns#' term='rants'/><category scheme='http://www.blogger.com/atom/ns#' term='japan'/><category scheme='http://www.blogger.com/atom/ns#' term='business'/><title type='text'>The Value of a Comfortable Office</title><content type='html'>As I sat at my desk sweating in the dead of winter, I got to thinking about how people's comfortable working temperature must be cultural.  Offices are hot in Japan.  In the summer, their CoolBiz campaign has businesses setting the thermostats to 28 degrees Celsius (82.4 degrees Fahrenheit).  I just checked, it is winter and the thermostat in my office is reading 30 degrees (86 degrees Fahrenheit).  In contrast, offices in the U.S. have traditionally been regulated to 72 degrees Fahrenheit.&lt;br /&gt;&lt;br /&gt;I know my productivity suffers when I'm uncomfortable.  It suffers doubly when I can only type with one hand because I'm fanning myself with the other.  But is this just because of differences in cultural sensitivity to heat?&lt;br /&gt;&lt;br /&gt;Out of curiosity, I did a quick search and found this &lt;a href="http://www.yomiuri.co.jp/adv/wol/dy/opinion/society_090810.htm"&gt;interesting opinion piece&lt;/a&gt; written by Professor Shin-ichi Tanabe of Waseda University.  Some of the interesting points in his opinion piece are:&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&lt;blockquote&gt;A guidebook recently published by the Federation of European Heating, Ventilating and Air Conditioning Associations (REHVA) reports that 21.8°C is the optimal room temperature to foster intellectual productivity.&lt;/blockquote&gt;&lt;br&gt;21.8°C is a little over 71 degrees Fahrenheit...almost exactly what offices in the U.S. set their temperatures too.  Perhaps we have a hint why &lt;a href="http://news.bbc.co.uk/2/hi/business/6976084.stm"&gt;U.S. and European workers are the most productive in the world&lt;/a&gt;?&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;blockquote&gt;...28°C seems a little too high for a room temperature setting in summer.  The most comfortable temperature when sleeping naked is 29°C. People burn more calories in the workplace than at home where they are more relaxed, and however casually they may dress, they are still not naked in the workplace.&lt;/blockquote&gt;&lt;br&gt;While there are studies showing some variance in comfortable working temperatures depending on culture and gender, it would seem that 28°C can't be comfortable for anyone.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;blockquote&gt;Raising the cooling temperature of a standard building in Tokyo from 25°C to 28°C could increase energy efficiency by 15%, which is equivalent to saving ¥72 per square meter of office space during the COOLBIZ campaign. On the other hand, the resulting decrease in working efficiency could cause a loss of 13,000 yen per square meter of office space.&lt;/blockquote&gt;&lt;br&gt;What kind of company loses 13,000 yen to save 72 yen?  A Japanese company, apparently.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-408030132085267529?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/408030132085267529/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=408030132085267529' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/408030132085267529'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/408030132085267529'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2010/01/value-of-comfortable-office.html' title='The Value of a Comfortable Office'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-5724737355814706829</id><published>2010-01-21T20:12:00.003-08:00</published><updated>2010-01-21T20:36:39.932-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Internet'/><title type='text'>1.1.1.1</title><content type='html'>A number of &lt;a href="http://en.wikipedia.org/wiki/Captive_portal"&gt;captive portal&lt;/a&gt; implementations, including products from &lt;a href="http://www.cisco.com/en/US/docs/wireless/controller/4.1/configuration/guide/c41users.html#wp1049258"&gt;Cisco&lt;/a&gt; and &lt;a href="http://www.nomadix.com/Files/Downloads/Extranet/Support/docs_x5/Readme_X.5.pdf"&gt;Nomadix&lt;/a&gt;, use 1.1.1.1 as a virtual IP address, HTTP requests to which are redirected to the access control server's logout page.  A quick &lt;a href="http://www.google.co.jp/search?hl=en&amp;q=1.1.1.1+logout+internet+-free&amp;btnG=Search&amp;aq=f&amp;oq="&gt;google search&lt;/a&gt; turns up numerous network service providers, mostly wireless ISPs, that use 1.1.1.1 to access their logout pages.&lt;br /&gt;&lt;br /&gt;This trick has worked because the 1.1.1.1 IP address resided in an IP block that was reserved by the IANA, so there could be no server that actually used that IP address.&lt;br /&gt;&lt;br /&gt;However, this month the &lt;a href="http://seclists.org/nanog/2010/Jan/776"&gt;IANA assigned the 1.0.0.0/8 IP block&lt;/a&gt; to the &lt;a href="http://www.apnic.net/"&gt;Asia-Pacific NIC&lt;/a&gt;.  As its name implies, APNIC is responsible for the allocation of IP addresses in Asia and the Pacific, meaning that there may come a day when a company in China, Australia, or elsewhere is allocated a subnet containing the 1.1.1.1 IP address.&lt;br /&gt;&lt;br /&gt;In short, the 1.1.1.1 IP address no longer resides in reserved IP space.  Network access servers should stop using it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-5724737355814706829?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/5724737355814706829/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=5724737355814706829' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/5724737355814706829'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/5724737355814706829'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2010/01/1111.html' title='1.1.1.1'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-4063584668175476893</id><published>2010-01-07T21:47:00.011-08:00</published><updated>2010-01-08T00:53:46.328-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ramblings'/><title type='text'>The Public Option</title><content type='html'>Every time I have to take off my shoes at the airport, I'm grateful that &lt;a href="http://en.wikipedia.org/wiki/Richard_Reid_%28shoe_bomber%29"&gt;Richard Reid&lt;/a&gt; stuck explosives in his shoes rather than his ass.  Waiting in line while people take off their loafers and flip-flops is silly, but waiting in line while people get full cavity searches might make me think twice about flying.&lt;br /&gt;&lt;br /&gt;Anyway, as everyone has surely heard by now, an idiot on a flight to Detroit &lt;a href="http://abcnews.go.com/Blotter/northwest-airlines-bomb-photos/story?id=9436297"&gt;lit his nuts on fire for Christmas&lt;/a&gt;.  So now the &lt;a href="http://en.wikipedia.org/wiki/Transportation_Security_Administration"&gt;TSA&lt;/a&gt; will be installing new full-body scanners to see if we have anything stuffed in our trousers.  I haven't heard the details, but I suppose you are privy to a more intimate inspection if something in your pants draws attention.&lt;br /&gt;&lt;br /&gt;And then today I received an e-mail from my friend Matt alerting me that, sure enough, &lt;a href="http://homelandsecuritynewswire.com/saudi-suicide-bomber-hid-ied-his-anal-cavity"&gt;suicide bombers are now stuffing explosives in their rectums&lt;/a&gt;.  Unless these new airport scanners can see clear into my bowels and distinguish between a Taco Bell lunch and IED, I wonder how far off we are from getting free colon exams whenever we fly.&lt;br /&gt;&lt;br /&gt;Actually, I think I may have stumbled upon health care reform that everyone can get behind.  The TSA can be our delivery method for socialized health care.  If the TSA is going to be probing every orifice looking for explosives anyway, with a modicum of medical training, they could alert us to any potential medical conditions we might not have been aware of while they are in there.  Everybody wins: planes are safer, people are healthier, and we save money on colon exams, prostate checks, and gynecologist visits.&lt;br /&gt;&lt;br /&gt;It might cost a little money to implement, but who would object?  Only terrorists could be against making our skies safer.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-4063584668175476893?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/4063584668175476893/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=4063584668175476893' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/4063584668175476893'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/4063584668175476893'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2010/01/public-option.html' title='The Public Option'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-482284395301322429</id><published>2009-12-14T19:56:00.004-08:00</published><updated>2009-12-14T20:32:39.663-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><title type='text'>Debugging Python Windows Services</title><content type='html'>Mark Hammond has a simple example of writing Windows Services in Python using the &lt;code&gt;win32serviceutil.ServiceFramework&lt;/code&gt; class in his book &lt;a href="http://book.opensourceproject.org.cn/lamp/python/pythonwin/index.html?page=opensource/pythonwin32_snode143.html"&gt;Python Programming on Win32&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The problem is, that if you use a breakpoint in your service code and try to debug it, you'll find that it never stops at your breakpoint.  The reason is that the &lt;code&gt;win32serviceutil&lt;/code&gt; module will actually run PythonService.exe and have that program run your python script.  Since PythonService.exe is its own process that has no knowledge of your IDE's breakpoints, it just runs without breaking.&lt;br /&gt;&lt;br /&gt;Here is a simple trick for the small intersection of people who:&lt;ol style="list-style-type:lower-alpha"&gt;&lt;li&gt;Write Windows Services&lt;br /&gt;&lt;li&gt;in Python&lt;br /&gt;&lt;li&gt;using an IDE (I use &lt;a href="http://pydev.org/"&gt;pyDev&lt;/a&gt;)&lt;br /&gt;&lt;li&gt;and need to step through their code to debug.&lt;/ol&gt;&lt;br /&gt;It turns out that &lt;code&gt;win32serviceutil&lt;/code&gt; has a reimplementation of the logic in PythonService.exe that it uses to emulate PythonService.exe's debug mode when you convert your python script you an executable (e.g. via &lt;a href="http://www.py2exe.org/"&gt;py2exe&lt;/a&gt;).  The implementation is in &lt;code&gt;win32serviceutil&lt;/code&gt;'s &lt;code&gt;DebugService()&lt;/code&gt; function.  The trick to being able to set breakpoints and debug your python service is to convince &lt;code&gt;win32serviceutil&lt;/code&gt; into calling &lt;code&gt;DebugService&lt;/code&gt; rather than spawning PythonService.exe.&lt;br /&gt;&lt;br /&gt;Luckily, this is trivially easy: just add the line&lt;br /&gt;&lt;quote&gt;&lt;code&gt;sys.frozen = 'windows_exe'  # Fake py2exe so we can debug&lt;/code&gt;&lt;/quote&gt;&lt;br /&gt;before you call&lt;br /&gt;&lt;code&gt;win32serviceutil.HandleCommandLine(...)&lt;/code&gt;.&lt;br /&gt;&lt;br /&gt;Then, you just need to pass the '-debug' command-line argument when you run your service to force it into debugging mode.  Your debugger should then control the process so you can debug it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-482284395301322429?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/482284395301322429/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=482284395301322429' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/482284395301322429'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/482284395301322429'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2009/12/debugging-python-windows-services.html' title='Debugging Python Windows Services'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-2443588604722827586</id><published>2009-11-09T01:21:00.003-08:00</published><updated>2009-12-14T20:39:06.767-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ramblings'/><title type='text'>Government isn't all bad</title><content type='html'>The big news today is that the U.S. House of Representatives &lt;a href="http://www.reuters.com/article/bondsNews/idUSN0819509420091108"&gt;passed a health care reform bill&lt;/a&gt;.  I'm not particularly impressed with the details of the bill passed nor am I particularly concerned with them...they will most certainly change when reconciling differences with whatever the Senate passes (assuming they pass something).&lt;br /&gt;&lt;br /&gt;But, I'll use this is setup to post a link to an interesting &lt;a href="http://nick.quaran.to/post/162402309/this-morning-i-was-awoken-by-my-alarm-clock"&gt;counter to nay-sayers scared of government intervention&lt;/a&gt; in the health insurance industry.&lt;br /&gt;&lt;br /&gt;&lt;dl&gt;&lt;dt&gt;&lt;b&gt;Update 2009/12/15:&lt;/b&gt;&lt;/dt&gt;&lt;dd&gt;It seems the blog I linked to is no more so I'll go ahead and post the entirety of the message here...&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;This morning I was awoken by my alarm clock powered by electricity generated by the public power monopoly regulated by the U.S. Department of Energy.&lt;br /&gt;&lt;br /&gt;I then took a shower in the clean water provided by a municipal water utility.&lt;br /&gt;&lt;br /&gt;After that, I turned on the TV to one of the FCC-regulated channels to see what the National Weather Service of the National Oceanographic and Atmospheric Administration determined the weather was going to be like, using satellites designed, built, and launched by the National Aeronautics and Space Administration.&lt;br /&gt;&lt;br /&gt;I watched this while eating my breakfast of U.S. Department of Agriculture-inspected food and taking the drugs which have been determined as safe by the U.S. Food and Drug Administration.&lt;br /&gt;&lt;br /&gt;At the appropriate time, as regulated by the U.S. Congress and kept accurate by the National Institute of Standards and Technology and the U.S. Naval Observatory, I get into my National Highway Traffic Safety Administration-approved automobile and set out to work on the roads build by the local, state, and federal Departments of Transportation, possibly stopping to purchase additional fuel of a quality level determined by the Environmental Protection Agency, using legal tender issued by the Federal Reserve Bank.&lt;br /&gt;&lt;br /&gt;On the way out the door I deposit any mail I have to be sent out via the U.S. Postal Service and drop the kids off at the public school.&lt;br /&gt;&lt;br /&gt;After spending another day not being maimed or killed at work thanks to the workplace regulations imposed by the Department of Labor and the Occupational Safety and Health administration, enjoying another two meals which again do not kill me because of the USDA, I drive my NHTSA car back home on the DOT roads, to my house which has not burned down in my absence because of the state and local building codes and Fire Marshal's inspection, and which has not been plundered of all its valuables thanks to the local police department.&lt;br /&gt;&lt;br /&gt;And then I log on to the internet -- which was developed by the Defense Advanced Research Projects Administration -- and post on Freerepublic.com and Fox News forums about how SOCIALISM in medicine is BAD because the government can't do anything right. &lt;br /&gt;&lt;/blockquote&gt;&lt;/dd&gt;&lt;/dl&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-2443588604722827586?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/2443588604722827586/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=2443588604722827586' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/2443588604722827586'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/2443588604722827586'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2009/11/government-isnt-all-bad.html' title='Government isn&apos;t all bad'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-1357131799733062161</id><published>2009-10-18T20:23:00.005-07:00</published><updated>2010-01-07T22:52:52.845-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='life'/><category scheme='http://www.blogger.com/atom/ns#' term='japan'/><title type='text'>Two Years of Tokyo</title><content type='html'>Well, we've now officially been in Tokyo two years now.&lt;br /&gt;The end of this month will represent two years since I started work here.  Originally, I was only scheduled to work here for two years with an option to renew for an additional year.&lt;br /&gt;&lt;br /&gt;To be honest, these two years have probably been the two most difficult years of my adult life.  I'm just glad my wife is here with me; she should probably be sainted for going along with this crazy idea.&lt;br /&gt;&lt;br /&gt;Japan is a perfectly fine place to visit.  The idiosyncrasies are cute, even fun, when you only have to deal with them for week or two.  What visitor to Tokyo can't remember the first time they were &lt;a href="http://www.youtube.com/watch?v=Fk2R_mqV4ts"&gt;packed into a train car&lt;/a&gt;?  It's pretty memorable and gives you a funny story to tell when you get back home.  Now trying doing it everyday for two years -- not so much fun anymore.&lt;br /&gt;&lt;br /&gt;When we came, we had intended to travel and see more of the countryside on the weekends.  But I've found I just don't have the energy.  The &lt;a href="http://southofreality.wordpress.com/2007/07/10/slave-to-the-grind-a-salarymans-life/"&gt;daily grind&lt;/a&gt; just wears me down.  So, with my contract coming to a close, we were looking forward to using the last few months before my wife's contract ended to finally make up for some lost time and see Japan.&lt;br /&gt;&lt;br /&gt;Back in July I gave my 3-months notice that I didn't intend to renew my contract come this November.  But my employer would have nothing to hear of that.  Apparently, they need me to stay on through March.  I find it flattering that they value my labor enough to want to keep me on for 4 more months, but it shattered our plans of finally getting out of this soul-sucking city and seeing more of Japan.&lt;br /&gt;&lt;br /&gt;Probably the average American would have told them to shove it.  We're familiar with a system based on &lt;a href="http://en.wikipedia.org/wiki/At-will_employment"&gt;at-will employment&lt;/a&gt; and autonomy.  It would be unthinkable for an employer to tell you cannot quit.  They may ask you to stay, even make offers to entice you to stay.  But, at the end of the day, you are free to leave.&lt;br /&gt;&lt;br /&gt;However, I am a guest in this country.  Like a &lt;a href="http://en.wikipedia.org/wiki/H-1B_visa"&gt;H1B Visa&lt;/a&gt;-holder in the U.S., I would have had to leave the country if I lost my employer sponsorship.  Luckily, my wife is still employed, so I could have just changed my status to her dependent and stayed.  The problem is that landlords in Japan require a &lt;a href="http://www.city.narita.chiba.jp/english/information/c3_02.html"&gt;guarantor&lt;/a&gt; before they will rent you an apartment -- and my employer has been kindly acting as our guarantor.&lt;br /&gt;&lt;br /&gt;Which leads to two complications: a) if I left my job I would lose my guarantor; even if we stayed in the country, we would have to move into the housing provided by my wife's employer and b) I feel an obligation to my employer for having been my guarantor for these 2 (now 2.5) years.  Add in the fact that I take pride in my work so, if my employer says they need me to stay for 4 more months, I am inclined to see it through.  Result: I'll be working for 4 months longer than originally planned.&lt;br /&gt;&lt;br /&gt;So we'll be here a bit longer.&lt;br /&gt;&lt;br /&gt;I doubt we'll be seeing too much more of Japan, outside of Tokyo, then.  Which is really a shame because, based on our limited experience, life in the country is completely different than life in Tokyo.  Even Kyoto felt laid back.  But Tokyo, Tokyo will never have a warm place in my heart.&lt;br /&gt;&lt;br /&gt;There is an old &lt;a href="http://en.wikipedia.org/wiki/Soul_Coughing"&gt;Soul Coughing&lt;/a&gt; song that I never really liked called "&lt;a href="http://new.music.yahoo.com/soul-coughing/tracks/incumbent--1446460"&gt;The Incumbent&lt;/a&gt;".  But with a little modification, the refrain has really started to speak to me:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;Tokyo, Tokyo, I won't go back&lt;br /&gt;Indelible reminder of a steel I lack&lt;br /&gt;I gave you two years, what did you give me back?&lt;br /&gt;A jaw-grind disposition to a panic attack&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Anyway, it has been an experience.  I'm glad I had the opportunity to live and work in a foreign country; perhaps aiming for the biggest city in the world was a little too high for me.  The pressure of big-city life and the hassles of living in an unfamiliar land have just added up to a less-than-wonderful experience.  Work has been fine, but I'm looking forward to getting home.&lt;br /&gt;&lt;br /&gt;Just four more months.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-1357131799733062161?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/1357131799733062161/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=1357131799733062161' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/1357131799733062161'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/1357131799733062161'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2009/10/two-years-of-tokyo.html' title='Two Years of Tokyo'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-375949732402721382</id><published>2009-10-16T00:33:00.004-07:00</published><updated>2009-10-16T01:21:12.279-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rants'/><title type='text'>Moral Majority</title><content type='html'>Here I was wishing that more of my fellow Americans would step up and agree that a reasonable baseline of health care should be guaranteed for all of our fellow citizens.&lt;br /&gt;&lt;br /&gt;And then I learned about the case of &lt;a href="http://en.wikipedia.org/wiki/Jamie_Leigh_Jones"&gt;Jamie Leigh Jones&lt;/a&gt;.  Go ahead, click the link and read about what happened to this poor lady while she worked in Iraq.  I'm not going to repeat it here because it makes me sick.&lt;br /&gt;&lt;br /&gt;In response, Senator Al Franken &lt;a href="http://minnesotaindependent.com/46483/franken-amendment-to-protect-victims-of-sexual-assault-passes"&gt;offered an amendment to a defense appropriations bill&lt;/a&gt; that would ban federal funds to companies that forbid employees from suing for rape.&lt;br /&gt;&lt;br /&gt;Not surprisingly, the amendment was added, but it is a sad day that such an amendment is even necessary.&lt;br /&gt;&lt;br /&gt;If that was all there was to the story, it would merely be depressing.  No, to make things truly sickening you would need to know that 30 Senators voted &lt;i&gt;against&lt;/i&gt; the amendment.  30 Senators voted to prevent gang-rape victims from suing their coworkers.&lt;br /&gt;&lt;br /&gt;If you would like to know your Senators' stance on defending rape, you can find a list of the &lt;a href="http://www.republicansforrape.org/legislators/"&gt;30 pro-rape Senators along with their contact information here&lt;/a&gt;.  I suppose it shouldn't be surprising that that they are all men.&lt;br /&gt;&lt;br /&gt;So now I feel pretty foolish.  Here I was hoping my fellow Americans would be &lt;a href="http://en.wikipedia.org/wiki/Good_samaritan"&gt;Good Samaritans&lt;/a&gt; and agree universal health care is a good thing, but apparently we can't even agree rape is wrong.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-375949732402721382?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/375949732402721382/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=375949732402721382' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/375949732402721382'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/375949732402721382'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2009/10/moral-majority.html' title='Moral Majority'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-3347102270722546096</id><published>2009-10-13T20:00:00.004-07:00</published><updated>2009-10-13T22:34:56.783-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rants'/><title type='text'>Who Would Jesus Insure?</title><content type='html'>I'm not a religious man, but I do believe in &lt;a href="http://www.ncccusa.org/news/090707healthcarestatement.html"&gt;doing the right thing&lt;/a&gt;.&lt;br /&gt;Any way you look at it, I cannot see how anyone could argue that offering health care to every man, woman, and child in the U.S. is morally wrong.  So why would someone &lt;a href="http://www.nydailynews.com/news/politics/2009/08/12/2009-08-12_meanwhile_other_pols_didnt_fare_as_well_at_confabs_in_pa_and_mo_rage_boils_over_.html"&gt;be opposed&lt;/a&gt; to such a proposal?&lt;br /&gt;&lt;br /&gt;Two of the more common arguments are:&lt;br /&gt;1) The government would run a public health care option incompetently, squandering money and providing sub-par health care coverage.&lt;br /&gt;2) The government would run a public health care program so well that it would put commercial health care companies out of business.&lt;br /&gt;&lt;br /&gt;Proponents suggest a third option:&lt;br /&gt;3) The government program would compliment and co-exist with existing commercial offerings.&lt;br /&gt;&lt;br /&gt;I'll contend that argument #1 is obviously false.  The "public option" being proposed is intended to provide a baseline level of coverage.  In other words, it is intended to cap the lower-bound of coverage options.  It does not preclude anyone choosing a private health care option.  It does not restrict the maximum level of coverage.  As such, it can only raise the level of coverage for those currently most poorly served.  One would be a fool to choose the public option if a better private option were available; if no better option is available, the public option cannot be inferior to something that does not exist.&lt;br /&gt;&lt;br /&gt;Which only leaves the cost component of argument #1.  I would like to see the government run the public option in an efficient way, but if it takes an inefficient organization to provide a baseline level of health care to people who have no better option, than that is simply the cost of doing the right thing.  There is no moral high ground in putting money before the health of another human being.&lt;br /&gt;&lt;br /&gt;As for argument #2, I cannot see the future so I have no way of guessing whether this is true or false.  My gut instinct is that it is false.  But, if the government were to be capable of running a program so efficiently that we all received better service at lower cost for all possible treatments, I fail to see the problem.  Opposing a public option for fear that it will do a better job that corporate options is analogous to corporate welfare for the less-efficient companies.  I do not see the moral high ground is putting the health of companies before the health of citizens.&lt;br /&gt;&lt;br /&gt;So our possible outcomes are:&lt;br /&gt;  #2 is true - we all get better coverage, albeit from a government-run program.&lt;br /&gt;  #3 is true - the public option provides a baseline level of coverage but people/companies can still buy health insurance from private providers for a superior level of coverage. &lt;br /&gt;&lt;br /&gt;A number of people seem afraid of a single-payer system, as would result if argument #2 were true.  However, I emphasize that the only way for #2 to yield a single-payer system is if that single-payer were superior in the marketplace than all other options.  If the government were outlawing the competition, that might be a legitimate concern, but there is currently no proposal to do any such thing.  As such, gloomy talk of a single-payer system forcing us to endure inferior service to our current corporate plans is nonsense.  The only single-payer system on the table is one so superior (and unlikely to happen) that complaining about it seems neurotic.&lt;br /&gt;&lt;br /&gt;In summary, there is small but unlikely possibility that everyone in America gets such superior health care that corporate insurers cannot compete.  The expected outcome is that every American is guaranteed a minimum level of health care and those of us fortunate enough to be able to afford better health care can still purchase it just as we do today.&lt;br /&gt;&lt;br /&gt;Personally, I do not care what happens to my individual health care package.  But I firmly believe that ensuring every man, woman, and child in America has access to at least basic health care is &lt;a href="http://en.wikipedia.org/wiki/Parable_of_the_Good_Samaritan"&gt;the right thing to do&lt;/a&gt;.  And I am deeply ashamed that &lt;a href="http://edition.cnn.com/2009/POLITICS/08/07/health.care.scuffles/index.html"&gt;a small but vocal contingent&lt;/a&gt; of my fellow Americans so despises their fellow man that they want no part in it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-3347102270722546096?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/3347102270722546096/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=3347102270722546096' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/3347102270722546096'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/3347102270722546096'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2009/10/who-would-jesus-insure.html' title='Who Would Jesus Insure?'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-8864137479820456811</id><published>2009-10-12T19:49:00.009-07:00</published><updated>2009-10-12T21:44:19.646-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='life'/><category scheme='http://www.blogger.com/atom/ns#' term='rants'/><category scheme='http://www.blogger.com/atom/ns#' term='japan'/><title type='text'>Sniffle Season</title><content type='html'>It's fall and the sound of snot is already filling my workplace.&lt;br /&gt;&lt;br /&gt;Living in a city the size of Tokyo, you encounter a lot of people on a daily basis.  And frankly, people are pretty dirty.  It probably doesn't help that there is no custom to cover one's mouth when they cough or sneeze here.  I've seen people pick their nose on the train and then immediately re-grab a pole or strap too.  As a result, I make it policy to not touch anything.&lt;br /&gt;&lt;br /&gt;I'm not ragging on Tokyo here.  Frankly, I was appalled at how dirty San Francisco was when I first moved there.  I later came to understand it was an "enlightened dirty", something you have to develop an appreciation for.  Tokyo, being a far larger city than San Francisco, is correspondingly more enlightened.&lt;br /&gt;&lt;br /&gt;So, with the H1N1 virus looming large in the headlines, my workplace has instituted policies including putting hand sanitizers at all of the entrances to "prevent carrying the virus in".  We have also been instructed to stay at home if we are running a fever or otherwise suspect we may have contracted swine flu.&lt;br /&gt;&lt;br /&gt;Now there is something that has always puzzled me: if you are feeling sick, why would you go into work to get all of your coworkers sick too?  This was a complaint I've been harboring for years.  Some fool thinks their work is so important that they come into the office and get 5 other people sick.  If those five people have any sense, they'll stay at home to prevent further spreading illness, thereby reducing productivity 500% more than if the first person had just stayed home in the first place!  But people don't think that way.  They think just about their own deadlines or how to make themselves look better to their boss.  It is the &lt;a href="http://en.wikipedia.org/wiki/Tragedy_of_the_commons"&gt;tragedy of the commons&lt;/a&gt;: in trying to sustain their own productivity, the productivity of the company as a whole -- or even the economy as a whole -- takes a hit.  In their effort to wring half of their usual productivity in between bouts of coughing or sneezing, they risk spreading their funk to five, ten, a hundred others.&lt;br /&gt;&lt;br /&gt;Please stop.&lt;br /&gt;&lt;br /&gt;That said, the life of a Japanese salary man is pretty competitive.  It is my experience that paid sick days are unheard of -- if you take a day off work, that comes out of your vacation time.  Worse, if you take a day off, you "fall behind" your peers.  You lose brownie points with your boss.  When it comes times for promotion, it is Brownie Point Redemption Day and no one wants to be denied entrance to the pearly gates of management for another year of salary man purgatory.&lt;br /&gt;&lt;br /&gt;Which explains why there are so many sick people on the train during the morning commute and why there are so many sick people in my office.  &lt;br /&gt;&lt;br /&gt;I had one coworker not come in today because H1N1 has been spreading around his daughter's elementary school and apparently made it back to his house.  But in my giant &lt;a href="http://www.news.qut.edu.au/cgi-bin/WebObjects/News.woa/wa/goNewsPage?newsEventID=23175"&gt;open-plan office&lt;/a&gt; of 150+ people, there are at least ten more here and sniffling today.  And fall is just starting.&lt;br /&gt;&lt;br /&gt;I'm actually pretty concerned about coming down with H1N1 myself before the winter is over.  It isn't that I'm so much worried about the illness itself -- like the SARS scare of a few years ago, it sounds like H1N1 is more bark than bite.  What I'm concerned about is all of the bureaucracy that I would need to deal with.  You see, my company has actually instituted a special policy just for H1N1 allowing us to stay home without consuming vacation days if we get a letter from the doctor proving we have H1N1.  However, we can only come back to work once we have another letter from the doctor saying we're cured.&lt;br /&gt;&lt;br /&gt;I never liked going to the doctor in the U.S., I really don't like doing it in a foreign country.  Twice.  For a disease they can't cure, no less.&lt;br /&gt;&lt;br /&gt;That said, this seems like a nice safe policy to protect the company from H1N1-infected workers thinking they are so important that they need to come in anyway.  They are telling us to stay home; even allowing us a special paid leave to do so.&lt;br /&gt;&lt;br /&gt;I don't think it'll work, though, for all the same reasons workers always come in to spread their virus-infested cough spew.  They should always stay home when the alternative is to risk getting everyone else sick too.  But they need the brownie points.  It is much easier to put on a mask and just pretend it is a cold than it is to deal with the doctor visits and company bureaucracy.  And if they come in, they get the face time and bonus "perseverance" points that managers remember.&lt;br /&gt;&lt;br /&gt;My forecast: &lt;a href="http://www.youtube.com/watch?v=b0A9-oUoMug"&gt;a train-full of H1N1-carriers&lt;/a&gt; dutifully trudging into work, snorting and sniffling all the way.  Shoot, come to think of it, even if they were clinic-bound, they'd be on the train sharing their germs.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-8864137479820456811?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/8864137479820456811/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=8864137479820456811' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/8864137479820456811'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/8864137479820456811'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2009/10/sniffle-season.html' title='Sniffle Season'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-7120315933565059734</id><published>2009-09-10T19:50:00.008-07:00</published><updated>2009-09-11T01:57:20.240-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='life'/><category scheme='http://www.blogger.com/atom/ns#' term='japan'/><title type='text'>Monjayaki</title><content type='html'>&lt;a href="http://3.bp.blogspot.com/_eEUZxnkOyLo/SqnPmWza5mI/AAAAAAAAAFg/eK8fJsK6jbE/s1600-h/spicy-manja.PNG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5380059487733999202" style="margin: 0px 0px 10px 10px; float: right; width: 250px; height: 168px;" alt="" src="http://3.bp.blogspot.com/_eEUZxnkOyLo/SqnPmWza5mI/AAAAAAAAAFg/eK8fJsK6jbE/s320/spicy-manja.PNG" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;Last night I went out with some coworkers to have some &lt;a href="http://en.wikipedia.org/wiki/Monjayaki"&gt;monjayaki&lt;/a&gt; in &lt;a href="http://en.wikipedia.org/wiki/Tsukishima"&gt;Tsukijima&lt;/a&gt;. The Tsukijima business association apparently decided some time back to draw people to their town by making it the center for monjayaki restaurants in Tokyo. There are currently &lt;a href="http://www.monja.gr.jp/map.html"&gt;over 60 monjayaki restaurants&lt;/a&gt; within walking distance of the Tsukijima station. The one we went too was called &lt;a href="http://www.monja.gr.jp/monja/oshio2/oshio2.htm"&gt;Oshio&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;We ended up ordering 5 different dishes:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/Mentaiko"&gt;mentaiko&lt;/a&gt;-&lt;a href="http://en.wikipedia.org/wiki/Mochi"&gt;mochi&lt;/a&gt; monja - Fish eggs and chewy rice.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/Mapo_doufu"&gt;mapo tofu&lt;/a&gt; monja - Spicy chinese-style beef and tofu.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;curry seafood monja - Indian dry curry with shrimp and shellfish.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;super-spicy monja - Not sure, but had a pretty strong &lt;a href="http://en.wikipedia.org/wiki/Kimchi"&gt;kimchi&lt;/a&gt; flavor.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;"apache" monja - Butter, potato, and a big slab of fatty beef.&lt;/li&gt;&lt;/ol&gt;The picture at the top is the super-spicy monja.&lt;br /&gt;&lt;br /&gt;This was the first time I had ever had monjayaki. The consistency is fairy liquid with chunks of whatever the main ingredients are. It solidifies just enough on the grill that you can scoop up with a little spatula-like metal utensil.&lt;br /&gt;&lt;br /&gt;Yeah, it has the look and consistency of barf.&lt;br /&gt;&lt;br /&gt;But surprisingly, it tasted pretty good. The super-spicy monja, was hands-down my favorite of the bunch. The mentaiko wasn't really to my liking, but at least it tasted better than it looked.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-7120315933565059734?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/7120315933565059734/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=7120315933565059734' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/7120315933565059734'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/7120315933565059734'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2009/09/monjayaki.html' title='Monjayaki'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_eEUZxnkOyLo/SqnPmWza5mI/AAAAAAAAAFg/eK8fJsK6jbE/s72-c/spicy-manja.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-746106788374769321</id><published>2009-07-28T18:41:00.006-07:00</published><updated>2009-07-28T21:34:50.696-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ramblings'/><title type='text'>Politics as Usual</title><content type='html'>Everyone has their own perspective on the world and their own circumstances influencing their beliefs.    What seems right and just to me can seem horrible and unfair to someone else.  The founding fathers of the United States of America recognized this truth; in Federalist #10, James Madison wrote that the various competing regional, religious, and economic interests, factions, and parties would be the guarantor of American freedom and justice.&lt;br /&gt;&lt;br /&gt;Everyone in America is entitled to their own opinion, representing their own interests.  People can try to drum up support for their own ideas by sharing them with others and these ideas compete for mind share with the ideas of others among the American populace.&lt;br /&gt;&lt;br /&gt;This is how politics in America works; it is like capitalism applied to the ephemeral world of ideas.  And just like capitalism in the market, it should not be surprising that purveyors of ideas often have their own profit motives.&lt;br /&gt;&lt;br /&gt;I suppose that statement is somewhat redundant because I believe, to most, the word "politics" is assumed to be the marketing of ideas with underlying profit motives.  In which case, to be American is to be constantly embroiled in politics -- to be constantly inundated with ideas, sometimes of dubious motive.&lt;br /&gt;&lt;br /&gt;Which is why it is imperative that we each form our own ideas, reflecting our own self-interests.  I would dare say that each and every American has their own circumstances, their own obstacles, their own concerns, as well as their own hopes and dreams.  And sometimes people's interests conflict.&lt;br /&gt;&lt;br /&gt;So ask yourself: if you could change America in a way that would make &lt;span style="font-style: italic;"&gt;your&lt;/span&gt; life better, what would you do?  If you could improve absolutely anything, what would you do?  How would you convince others to help you out?  If people don't support your idea, what would you do?&lt;br /&gt;&lt;br /&gt;Now ask yourself: what are others doing to try to influence you?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-746106788374769321?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/746106788374769321/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=746106788374769321' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/746106788374769321'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/746106788374769321'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2009/07/politics-as-usual.html' title='Politics as Usual'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-5431778960226412151</id><published>2009-07-27T18:52:00.002-07:00</published><updated>2009-07-27T19:18:59.731-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SIP'/><category scheme='http://www.blogger.com/atom/ns#' term='bugs'/><category scheme='http://www.blogger.com/atom/ns#' term='RFCs'/><title type='text'>Subtle error in RFC 3665 "SIP Basic Call Flow Examples"</title><content type='html'>&lt;a href="http://www.ietf.org/rfc/rfc3665.txt"&gt;RFC 3665&lt;/a&gt; is simply a collection of SIP call flow examples for reference to implementers.  However, I noticed what appears to be a small error in section 3.2 "Session Establishment Through Two Proxies" with the digest values.&lt;br /&gt;&lt;br /&gt;In step F2 "407 Proxy Authorization Required Proxy 1 -&gt; Alice", the proxy responds with a Proxy-Authenticate header containing the nonce value "f84f1cec41e6cbe5aea9c8e88d359".  However, in F4 "INVITE Alice -&gt; Proxy 1", where the user agent should send back the same nonce value to the proxy server along with the calculated digest, it instead sends the nonce "wf84f1ceczx41ae6cbe5aea9c8e88d359".  Clearly, this is a typographical error as the nonces are identical except for the leading "w".&lt;br /&gt;&lt;br /&gt;A cursory scan of the rest of the examples in RFC 3665 did not turn up any more mismatched nonce values.  The "wf84f1ceczx41ae6cbe5aea9c8e88d359" value appears in other call sequences involving proxy authentication while the "f84f1cec41e6cbe5aea9c8e88d359" value never appears again, implying the nonce value with the "w" character prefixed should be the "correct" value.&lt;br /&gt;&lt;br /&gt;Interestingly, while the other nonce values used in examples appear to be 32-character hexadecimal representations of 128-bit values, the "wf84f1ceczx41ae6cbe5aea9c8e88d359" value does not fit this pattern as it is both 33-characters long and "w" is not a valid hexadecimal digit.  Which leads me to believe that the "f84f1cec41e6cbe5aea9c8e88d359" value is actually the correct nonce value in the "407 Proxy Authorization Required Proxy 1 -&gt; Alice" call flow and that the other instances where the "w"-prefixed value appears are just the same typographical error replicated via copy-and-paste.&lt;br /&gt;&lt;br /&gt;What I don't know, and would be interested in finding out, is whether the calculated digest result value examples were calculated with the "f84f1cec41e6cbe5aea9c8e88d359" nonce or with the "w"-prefixed version.  Unfortunately, the RFC does not tell us what password values they used to calculate the digests, so I cannot answer that question myself.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-5431778960226412151?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/5431778960226412151/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=5431778960226412151' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/5431778960226412151'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/5431778960226412151'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2009/07/subtle-error-in-rfc-3665-sip-basic-call.html' title='Subtle error in RFC 3665 &quot;SIP Basic Call Flow Examples&quot;'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-3307923502853436770</id><published>2009-07-27T00:24:00.003-07:00</published><updated>2009-07-27T00:45:21.717-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><category scheme='http://www.blogger.com/atom/ns#' term='shell script'/><title type='text'>Calculating MD5 of binaries without debug symbols</title><content type='html'>If you compile a binary with gcc with debugging information enabled (-g), the MD5 of the resulting binary will change depending on the name of the directory you compile it in.  Which means that if two developers compile the same source code with the same options on the same machine, only they do it in their own home directories, the MD5 of the resulting binaries may differ.&lt;br /&gt;&lt;br /&gt;However, as soon as you strip the binaries, their MD5s will be the same.&lt;br /&gt;&lt;br /&gt;Which leads me to this little tool I whipped up to compare two binaries without stripping them:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;#!/bin/sh&lt;br /&gt;# Display the MD5 of a file, ignoring any debugging symbols in&lt;br /&gt;# binaries.&lt;br /&gt;&lt;br /&gt;# The strip(1)/objdump(1) commands for removing debugging&lt;br /&gt;# symbols do not support writing to stdout so we need to&lt;br /&gt;# allocate a temp file to write the stripped binary too.&lt;br /&gt;tempfoo=`basename $0`&lt;br /&gt;TMPFILE=`mktemp -q /tmp/${tempfoo}.XXXXXX`&lt;br /&gt;if [ $? -ne 0 ]; then&lt;br /&gt;    echo "$0: Can't create temp file, exiting..."&lt;br /&gt;    exit 1&lt;br /&gt;fi&lt;br /&gt;&lt;br /&gt;while [ "$1" != "" ]; do&lt;br /&gt;    # The following line is a cheezy way to accurately&lt;br /&gt;    # reproduce the same error messages as md5(1) when a&lt;br /&gt;    # specified file is unreadable.&lt;br /&gt;    md5 "$1" &gt; /dev/null&lt;br /&gt;    if [ $? -eq 0 ]; then&lt;br /&gt;&lt;br /&gt;        # Try to strip symbols from the file on the&lt;br /&gt;        # assumption it is a binary and, if successful,&lt;br /&gt;        # compute the md5 of the stripped file.  Note that&lt;br /&gt;        # objcopy is the same as the strip(1) command.  If&lt;br /&gt;        # objcopy failed to parse the file (i.e. because it&lt;br /&gt;        # is not in ELF format), simply compute the md5 of&lt;br /&gt;        # the whole file since there are no debugging symbols&lt;br /&gt;        # to strip.&lt;br /&gt;        m=`(objcopy -g "$1" $TMPFILE &gt;/dev/null 2&gt;&amp;1 &amp;&amp; \&lt;br /&gt;            md5 -q $TMPFILE;) || md5 -q "$1"`&lt;br /&gt;&lt;br /&gt;        # Output the result in a md5(1)-compatible format.&lt;br /&gt;        echo "MD5($1) = $m"&lt;br /&gt;    fi&lt;br /&gt;    shift&lt;br /&gt;done&lt;br /&gt;&lt;br /&gt;rm $TMPFILE&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-3307923502853436770?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/3307923502853436770/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=3307923502853436770' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/3307923502853436770'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/3307923502853436770'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2009/07/calculating-md5-of-binaries-without.html' title='Calculating MD5 of binaries without debug symbols'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-1703630137902584145</id><published>2009-07-02T23:42:00.004-07:00</published><updated>2009-07-03T01:17:33.906-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><title type='text'>su Forces Terminal Echo to On</title><content type='html'>I just discovered an interesting quirk of the &lt;kbd&gt;su&lt;/kbd&gt; command, at least on FreeBSD: it forces terminal echo to on and you cannot turn it back off.  Interestingly, &lt;kbd&gt;sudo&lt;/kbd&gt; does not have the same behavior.  Here is a sample terminal session showing the behavior (input that was not echoed is shown in red):&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;[14:54:35] myhost:~ $ stty&lt;br /&gt;speed 38400 baud;&lt;br /&gt;lflags: echoe echok echoke echoctl pendin&lt;br /&gt;iflags: -ixany -imaxbel&lt;br /&gt;oflags: -oxtabs&lt;br /&gt;cflags: cs8 -parenb&lt;br /&gt;[14:54:38] myhost:~ $ stty -echo&lt;br /&gt;[14:54:57] myhost:~ $ &lt;font color="red"&gt;stty[enter]&lt;/font&gt; speed 38400 baud;&lt;br /&gt;lflags: -echo echoe echok echoke echoctl pendin&lt;br /&gt;iflags: -ixany -imaxbel&lt;br /&gt;oflags: -oxtabs&lt;br /&gt;cflags: cs8 -parenb&lt;br /&gt;[14:55:00] myhost:~ $ &lt;font color="red"&gt;sudo -s[enter]&lt;/font&gt; Password: &lt;font color="red"&gt;mypassword[enter]&lt;/font&gt;&lt;br /&gt;[14:55:15] myhost:~ # &lt;font color="red"&gt;stty[enter]&lt;/font&gt; speed 38400 baud;&lt;br /&gt;lflags: -echo echoe echok echoke echoctl pendin&lt;br /&gt;iflags: -ixany -imaxbel&lt;br /&gt;oflags: -oxtabs&lt;br /&gt;cflags: cs8 -parenb&lt;br /&gt;[14:55:20] myhost:~ # exit&lt;br /&gt;[14:55:25] myhost:~ $ &lt;font color="red"&gt;su[enter]&lt;/font&gt; Password: &lt;font color="red"&gt;rootpassword[enter]&lt;/font&gt;&lt;br /&gt;myhost# stty&lt;br /&gt;speed 38400 baud;&lt;br /&gt;lflags: echoe echok echoke echoctl pendin&lt;br /&gt;iflags: -ixany -imaxbel&lt;br /&gt;oflags: -oxtabs&lt;br /&gt;cflags: cs8 -parenb&lt;br /&gt;myhost# stty -echo&lt;br /&gt;myhost# stty&lt;br /&gt;speed 38400 baud;&lt;br /&gt;lflags: echoe echok echoke echoctl pendin&lt;br /&gt;iflags: -ixany -imaxbel&lt;br /&gt;oflags: -oxtabs&lt;br /&gt;cflags: cs8 -parenb&lt;br /&gt;myhost#&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;As you can see, the -echo flag was preserved by the &lt;kbd&gt;sudo&lt;/kbd&gt; session, but not be the &lt;kbd&gt;su&lt;/kbd&gt; session.  Furthermore, it was not possible to re-disable terminal echo within the &lt;kbd&gt;su&lt;/kbd&gt; session -- it simply ignored the directive.&lt;br /&gt;&lt;br /&gt;I suspect the cause is somewhere in the PAM libraries that &lt;kbd&gt;su&lt;/kbd&gt; uses to authenticate the user.  However, I would have expected &lt;kbd&gt;sudo&lt;/kbd&gt; to use the same PAM libraries, so I cannot explain the difference in behavior.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-1703630137902584145?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/1703630137902584145/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=1703630137902584145' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/1703630137902584145'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/1703630137902584145'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2009/07/su-forces-terminal-echo-to-on.html' title='su Forces Terminal Echo to On'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-3416469469366690200</id><published>2009-06-28T23:58:00.006-07:00</published><updated>2009-06-29T00:53:49.001-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ramblings'/><category scheme='http://www.blogger.com/atom/ns#' term='life'/><category scheme='http://www.blogger.com/atom/ns#' term='japan'/><title type='text'>Not-so-Cool Biz</title><content type='html'>It is still the rainy season here in Japan but the temperature is slowly creeping up as we head towards summer.  Today's high is forecast to be 30 degrees (86 degrees Fahrenheit).&lt;br /&gt;&lt;br /&gt;Which wouldn't be too much different than the weather this time of year in my home town in Virginia except for two things:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;In Virginia we commute by car and cars have air-conditioning; in Japan most people commute by walking or riding a bike to the train station and taking a crowded train.&lt;/li&gt;&lt;li&gt;Cool Biz&lt;/li&gt;&lt;/ol&gt;Today I'm going to focus on #2.  If you aren't familiar with "Cool Biz", there is a &lt;a href="http://www.slate.com/id/2221405/"&gt;nice article over on Slate&lt;/a&gt; about this Japanese campaign to reign in energy usage by making everyone uncomfortable.&lt;br /&gt;&lt;br /&gt;The gist of Cool Biz is to crank up the temperature in offices to a balmy 28 degrees Celcius (82.4 degrees Fahrenheit) and allow people to "dress down" to compensate.  By "dress down", we're talking not having to wear a tie.&lt;br /&gt;&lt;br /&gt;I've heard the figure 4 degrees bantered around as the difference not wearing a tie can make.  But when I tried researching where that number came from, I cannot find any research measuring the relative apparent temperature with and without a tie.  The number (which I presume is in degrees Celsius) seems to appear only in articles about Cool Biz and only as a number the Japanese government cites.&lt;br /&gt;&lt;br /&gt;Not surprisingly, the large company I'm working at here in Tokyo is following the government's recommendation and has the thermostats set for 28 degrees.  And I can tell you first-hand that the heat is incapacitating.&lt;br /&gt;&lt;br /&gt;I was doing some research on how to deal with the heat and ran across some tips for &lt;a href="http://pecuniarities.com/the-benefits-of-deprivation-10-days-without-air-conditioning-and-counting-plus-tips-for-staying-cool/1158"&gt;living without air conditioning&lt;/a&gt;.  For a wussy American such as myself who has been spoiled by comfortable working conditions for my whole life, 82.4 degrees might as well be no air conditioning.  The tips:&lt;br /&gt;&lt;ul&gt;&lt;li style="color: rgb(0, 0, 153);"&gt;Turn on fans to keep the air circulating.&lt;/li&gt;&lt;/ul&gt;We have 2 fans in a room with over 100 people in it.&lt;br /&gt;&lt;ul&gt;&lt;li style="color: rgb(0, 0, 153);"&gt;Set ceiling fans to turn clockwise (counter-clockwise looking toward it).&lt;/li&gt;&lt;/ul&gt;Not really applicable in an office environment.&lt;br /&gt;&lt;ul&gt;&lt;li style="color: rgb(0, 0, 153);"&gt;Keep curtains or blinds closed during the day.&lt;/li&gt;&lt;/ul&gt;Blinds are kept open all day.&lt;br /&gt;&lt;ul&gt;&lt;li style="color: rgb(0, 0, 153);"&gt;Use light colored curtains to deflect heat.&lt;/li&gt;&lt;/ul&gt;The blinds are white.  So if we were allowed to close them, it might help.&lt;br /&gt;&lt;ul&gt;&lt;li style="color: rgb(0, 0, 153);"&gt;Keep windows and doors closed tightly to keep the house cool.&lt;/li&gt;&lt;/ul&gt;Check.&lt;br /&gt;&lt;ul&gt;&lt;li style="color: rgb(0, 0, 153);"&gt;If there is a breeze or if outside air feels cooler than inside, open the window bringing in the cooler.&lt;/li&gt;&lt;li style="color: rgb(0, 0, 153);"&gt;Keep sunny windows closed if there is no breeze.&lt;/li&gt;&lt;li style="color: rgb(0, 0, 153);"&gt;In late afternoon, as soon as outside temperatures feel lower than inside temperatures, open all windows and doors.&lt;/li&gt;&lt;li style="color: rgb(0, 0, 153);"&gt;In the evening, when it’s cool outdoors but still hot indoors, place fans in front of open windows to draw in the cool air.&lt;/li&gt;&lt;/ul&gt;I work in a fairly old office building that still has windows you can actually open.  However, we are forbidden from opening them.  Rumor has it that a couple years back someone snapped and try to jump out a window.  Since then, we've been strictly forbidden from opening the windows.  I suspect it was the heat that drove him to it. &lt;br /&gt;&lt;ul&gt;&lt;li style="color: rgb(0, 0, 153);"&gt;Keep as many windows as possible open during night to take advantage of the cool night air to lower inside temperatures.&lt;/li&gt;&lt;li style="color: rgb(0, 0, 153);"&gt;In the morning, close windows as soon as the outside air begins feeling warmer than inside air.&lt;/li&gt;&lt;/ul&gt;Besides not being feasible in an office environment, see the notes regarding the previous tips.&lt;br /&gt;&lt;ul&gt;&lt;li style="color: rgb(0, 0, 153);"&gt;Limit strenuous physical activity until evening.&lt;/li&gt;&lt;/ul&gt;Check.&lt;br /&gt;&lt;ul&gt;&lt;li style="color: rgb(0, 0, 153);"&gt;Drink lots of cold water.&lt;/li&gt;&lt;/ul&gt;And check.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;When hot, use a water spritzer to spray yourself. The evaporating water will make you feel cool. (For fun, you can also spritz the water upwards and feel it fall down on you. The coldness can be quite shocking.)&lt;/li&gt;&lt;/ul&gt;I work in an open office floor plan with people sitting 2 feet from me in each direction and no walls.  This might work if they are amicable to the idea too.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;Tie a wet bandanna around your neck (this is something I do for my dog to prevent overheating and heatstroke during the summer).&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;I think we have a winner.  I think I may have to try this one when the summer heat really sets in.  Maybe I can start a fashion trend of white buttoned-up dress shirt, dress slacks, and a wet bandana.  If I combining it with spritzing water, I can call it "wet biz".&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-3416469469366690200?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/3416469469366690200/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=3416469469366690200' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/3416469469366690200'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/3416469469366690200'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2009/06/not-so-cool-biz.html' title='Not-so-Cool Biz'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-370272138801372820</id><published>2009-06-08T00:13:00.004-07:00</published><updated>2009-06-08T00:54:07.707-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ramblings'/><title type='text'>Whats and Whys</title><content type='html'>I just realized something about myself today: when someone is talking to me, I'm not only listening to what they are saying, but also trying to deduce why they are saying it.  Not consciously, of course, or else I would have realized that I'm doing it long before now. :)&lt;br /&gt;&lt;br /&gt;In hindsight, I think this has been mostly a good thing.  As a software engineer, when a request comes in for feature "X", rather than just understanding that the customer wants feature "X" and immediately starting to work on solving that problem, somewhere in the back of my brain I'm thinking about why the user asked or "X".  What are they probably trying to accomplish?  Is there perhaps a simpler way to achieve the same result that we can present as a counter-proposal?  Is this something other customers might need too?  If they are asking for feature "X" now, then they'll probably need feature "Y" at some point in the future too.&lt;br /&gt;&lt;br /&gt;Which is to say that I think this has made me a better software engineer.  However, sometimes it takes me a night or two of "sleeping on it" before I start being aware of the implications of the request.  I've gotten into the habit of splitting my project to-do list into "things needed to do what the customer specifically asked for" and "things needed to do what the customer probably wants" categories.  Obviously, the items in the list needed to satisfy the customer's explicit requirements always take priority.  But I'll freely add items to the "customer will probably want" list as they occur to me, to be implemented in down time between projects or assigned as introductory tasks to junior engineers to get them familiar with the code base.  From experience, I've found that this process results in more generic solutions to problems that make the product more resilient to changing requirements and adaptable to new customers.&lt;br /&gt;&lt;br /&gt;On the flip side, I've gotten myself in trouble a few times by reading to much into my wife's words.  I don't think I'm unique in that regards either. :)&lt;br /&gt;&lt;br /&gt;Today I realized that I am sometimes perplexed by requests/statements from my Japanese co-workers.  Of course there is the language barrier which means that it takes a lot more effort on my part to understand what is being said.  But sometimes I know I comprehend what they are saying, but I still have an uneasy, discontent feeling.  That is when I realized that my brain is subconsciously trying discern the "why" behind the statement and failing, causing the uncomfortable feeling.&lt;br /&gt;&lt;br /&gt;As for why it is failing, I'm still unsure.  But now that I think I know what is going on, I can work to address it.  I suspect it may have nothing to do with the fact that the statements are in Japanese, but rather be a symptom of &lt;a href="http://papers.ssrn.com/sol3/papers.cfm?abstract_id=969774"&gt;information asymmetry&lt;/a&gt; inherent in working in a large company.  In which case, it would explain why I always seem to flourish in small company environments where information is more evenly distributed, hence making it easier to deduce the "why" behind new tasks.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-370272138801372820?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/370272138801372820/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=370272138801372820' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/370272138801372820'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/370272138801372820'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2009/06/whats-and-whys.html' title='Whats and Whys'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-5947462806334208305</id><published>2009-05-29T00:09:00.004-07:00</published><updated>2009-05-29T01:26:03.365-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='life'/><category scheme='http://www.blogger.com/atom/ns#' term='japan'/><title type='text'>A Score I'm Not Proud Of</title><content type='html'>I was doing a little research to write a post comparing incentives in the Japanese and U.S. workplace.  In the process, I ran across the &lt;a href="http://en.wikipedia.org/wiki/Zung_Self-Rating_Depression_Scale"&gt;Zung Self-Rating Depression Scale&lt;/a&gt;.  I know I'm not happy here in Japan, but I thought I would take &lt;a href="http://www.depressiontreatmentnow.com/depression_test.html"&gt;the online test&lt;/a&gt; just to see how bad it was.&lt;br /&gt;&lt;br /&gt;I got a 75 out of 100.  That would be "severely depressed"...which is quite an eye opener for me.&lt;br /&gt;&lt;br /&gt;The funny thing is that, compared to the people I see on my commute, I think I seem pretty well-adjusted.  I mean, Japan has some of the highest incidence rates of &lt;a href="http://www.medicalnewstoday.com/articles/112244.php"&gt;suicide&lt;/a&gt; and &lt;a href="http://pn.psychiatryonline.org/cgi/content/full/38/23/12"&gt;alcoholism&lt;/a&gt; amongst industrial countries.  I guess I can see why.  At least I have something to look forward to: I can go home and get back to a normal life.  But I feel for the poor Japanese salarymen I see slumped over on the train platform nursing a beer and staring blankly off into the distance...this is as good as it gets; there is nowhere else to go.&lt;br /&gt;&lt;br /&gt;Anyway, I'll try to get back to writing my observations on incentive systems for a future post.  For now, I'll leave with the same comment I give everyone who asks about Japan: it is a nice place to visit, but I wouldn't want to live here.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-5947462806334208305?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/5947462806334208305/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=5947462806334208305' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/5947462806334208305'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/5947462806334208305'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2009/05/score-im-not-proud-of.html' title='A Score I&apos;m Not Proud Of'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-6209119924765353883</id><published>2009-05-10T22:55:00.005-07:00</published><updated>2009-05-10T23:24:34.165-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='life'/><category scheme='http://www.blogger.com/atom/ns#' term='japan'/><title type='text'>See Me at Interop Tokyo 2009</title><content type='html'>In an effort to put a face behind its technology, NTT Communications will be showcasing portraits of some of their engineers at their booth at &lt;a href="http://www.interop.jp/en/index.html"&gt;Interop Tokyo&lt;/a&gt; this year.  And unless I had spinach in my teeth, there is a good chance my portrait will be there this year....even if I'm not.  Six members of the team that runs the servers behind the &lt;a href="http://www.hotspot.ne.jp/en/index.html"&gt;HOTSPOT service&lt;/a&gt;, myself included, were gathered after lunch today to have our pictures taken.  It wasn't anything fancy: first, they each of us pose for individual pictures, then did a few pictures of us in groups of three, and finally one big group photo of us at a conference table.&lt;br /&gt;&lt;br /&gt;So if you find yourself at Interop Tokyo 2009 this upcoming June, swing by the NTT Communications booth.  Above the booth you should see a number of portaits of engineers.  I'll be the stupid-looking one.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-6209119924765353883?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/6209119924765353883/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=6209119924765353883' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/6209119924765353883'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/6209119924765353883'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2009/05/see-me-at-interop-tokyo-2009.html' title='See Me at Interop Tokyo 2009'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-2869821986496793929</id><published>2009-03-11T23:25:00.005-07:00</published><updated>2010-01-07T23:04:48.141-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='life'/><category scheme='http://www.blogger.com/atom/ns#' term='rants'/><category scheme='http://www.blogger.com/atom/ns#' term='japan'/><title type='text'>Racism in Japan</title><content type='html'>I generally try to keep myself upbeat and try to maintain a positive outlook, but the racism in Japan really wears me down.  The "帰れ(go home)", "死ね(die)", and host of other comments muttered in passing or said behind my back have really dampened my excitement about living in Japan.  While less blatant, the rampant tendency for strangers to clear their throats or spit when they become aware of my presence suggests the racism runs pretty deep. &lt;br /&gt;&lt;br /&gt;In hindsight, learning Japanese may have been a mistake; if you can't understand the language, you don't know when people are making rude comments.&lt;br /&gt;&lt;br /&gt;Even as a white male, I do my best to not draw attention to myself.  I've seen the looks of distrust and fear my fellow commuters give to foreigners of middle-eastern or African decent on the train.   I can only imagine the &lt;a href="http://www.usingenglish.com/reference/idioms/death+of+a+thousand+cuts.html"&gt;death by the thousand cuts&lt;/a&gt; that everyday life in Japan must be for them.&lt;br /&gt;&lt;br /&gt;My poor 5'2" wife isn't immune either.  She's fed up with the way little old ladies stare at her and awkwardly avoid her like she was some sort of circus freak.&lt;br /&gt;&lt;br /&gt;My coworkers often ask me why my wife and I don't go out and see more of Japan on the weekend.  Frankly, at the end of a grueling work week, I don't have any urge to stand on the train some more.  But more important, the last thing either of us wants is our weekend spoiled by bigots.  Just going to the store can be emotionally draining.  Trying to rent a room in the country can be &lt;a href="http://search.japantimes.co.jp/cgi-bin/nn20081010a9.html"&gt;outright impossible&lt;/a&gt; (70% x 37.8% = ~26.5% of hotels surveyed illegally refuse to serve foreigners; they cite "language barriers" -- apparently confusing nationality with language ability).&lt;br /&gt;&lt;br /&gt;The almost-daily little hints, most of which seems trivially minor in isolation, add up to a roar of "you're not welcome here".&lt;br /&gt;&lt;br /&gt;Before we came to Japan, we were familiar with the complaints many foreigners living in Japan have.  The comment sections of many popular news sites aimed for expatiates living in Japan are filled with disillusionment.  I always figured it was because the people hadn't taken the effort to learn the language, or had unreasonable expectations, or were being obnoxious in public...it had to be something they were doing wrong.  Maybe it was; maybe I've made the same mistakes.&lt;br /&gt;&lt;br /&gt;Since coming to Japan, I have come to appreciate Dave Aldwinckle's complaints and the hard work he has been doing to try and bring the injustices in Japan into the forefront.  Whenever I get worked up enough about something that I want to bitch about it on my own blog, I just need to go hit his &lt;a href="http://www.debito.org/"&gt;debito.org&lt;/a&gt; to commiserate.&lt;br /&gt;&lt;br /&gt;When I was sitting in the comfort of the U.S.A., Debito's stories seem farfetched and, frankly, unbelievable.  More than once I thought he was making a mountain out of a molehill.  However, I now realize that he doesn't have to go digging to find examples of &lt;a href="http://www.debito.org/roguesgallery.html"&gt;racism&lt;/a&gt;, &lt;a href="http://www.debito.org/?p=1940"&gt;discrimination&lt;/a&gt;, &lt;a href="http://www.debito.org/?p=2060"&gt;injustice&lt;/a&gt;, and &lt;a href="http://www.debito.org/?p=2186"&gt;hypocracy&lt;/a&gt;...it turns out there is just a lot of material to pull from here in Japan.&lt;br /&gt;&lt;br /&gt;Unfortunately, while brave individuals like Debito are trying to recitify the situation, apologists still abound.  Guides for foreigners coming to Japan are filled with such insightful advice as:&lt;br /&gt;&lt;blockquote&gt;&lt;b&gt;NOTE:&lt;/b&gt; At certain points through this and other articles we note that in some cases foreigners may be refused entry to particular hotels or rental of accommodation. This is not intended to imply any form of prejudice; it is merely a statement of the facts. Almost exclusively this is due to the very low number of foreigners in Japan, and general ignorance among the Japanese regarding foreigners. Smile, persevere, and try to be a good ambassador not just for your own country but for all non-Japanese in general. &lt;/blockquote&gt;(taken from &lt;a href="http://educationjapan.org/jguide/accommodation.html"&gt;http://educationjapan.org/jguide/accommodation.html&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;That's right, denying you access to shops just because you are a foreigner isn't any form for prejudice.  Nope.  People may be ignorant and racist, but if there is one they are not: they are not prejudiced.  So just suck it up and deal.&lt;br /&gt;&lt;br /&gt;The implicit message: "no one wants you here and if you don't like it, well go home."&lt;br /&gt;&lt;br /&gt;Anyway, I don't want to give the wrong impression: I've met a lot of nice people in Japan (and Japanese living overseas).  If it weren't for the great folks I have (and have had) the pleasure to work with, I probably wouldn't still be here.  That said, I am looking forward to going home.  Honestly, many people I have met seem to have no comprehension of how intolerant their countrymen are or, as the quote above demonstrates, don't even recognize actions as being discriminatory in the first place.&lt;br /&gt;&lt;br /&gt;So until I can go home, I guess I'll have to continue to find solice on &lt;a href="http://www.debito.org/"&gt;Debito's blog&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-2869821986496793929?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/2869821986496793929/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=2869821986496793929' title='25 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/2869821986496793929'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/2869821986496793929'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2009/03/racism-in-japan.html' title='Racism in Japan'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>25</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-5772848566656290270</id><published>2009-03-05T20:04:00.007-08:00</published><updated>2009-03-06T01:05:42.899-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='fun'/><title type='text'>Happy Nerdigras</title><content type='html'>I won't go into the origins since I didn't come up with them, but March 5th has been identified as the &lt;a href="http://twopoint718.blogspot.com/2009/03/march-5-is-square-root-of-christmas.html"&gt;Square Root of Christmas&lt;/a&gt; and March 14th is &lt;a href="http://www.piday.org/"&gt;Pi day&lt;/a&gt;.  The discoverer of the Square Root of Christmas has expanded on his work to further dub the week between the two geeky dates as Nerdigras.&lt;br /&gt;&lt;br /&gt;I guess this may become only an &lt;a href="http://en.wikipedia.org/wiki/Calendar_date#mm.2Fdd.2Fyy_or_mm.2Fdd.2Fyyyy_.28month.2C_day.2C_year.29"&gt;American&lt;/a&gt; holiday, as our nerd brethren in the rest of the world insist on silly dd/mm/yyyy or yyyy/mm/dd orderings for representing their dates.&lt;br /&gt;&lt;br /&gt;In any event, in celebration, the commenters over on &lt;a href="http://nedbatchelder.com/blog/200903/square_root_of_christmas.html"&gt;Ned Batchelder's blog&lt;/a&gt; are composing an official Nerdigras carol.  Here, I reproduce in its entirety, the &lt;a href="http://en.wikipedia.org/wiki/Octal"&gt;012&lt;/a&gt;-days of Nerdigras (sung to the tune of the 12-days of Christmas):&lt;br /&gt;&lt;br /&gt;&lt;i&gt;On the oh-first day of Nerdigras, my imaginary girlfriend gave to me,&lt;br /&gt;A &lt;a href="http://en.wikipedia.org/wiki/Hash_table"&gt;hash map&lt;/a&gt; in a &lt;a href="http://en.wikipedia.org/wiki/B_Tree"&gt;B-Tree&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;On the oh-second day of Nerdigras, my imaginary girlfriend gave to me,&lt;br /&gt;Two &lt;a rel="nofollow" href="http://en.wikipedia.org/wiki/Turtle_graphics"&gt;Turtle functions,&lt;/a&gt;&lt;a&gt;&lt;br /&gt;And  a hash map in a B-Tree.&lt;br /&gt;&lt;br /&gt;On the &lt;/a&gt;&lt;/i&gt;&lt;a&gt;&lt;i&gt;oh-&lt;/i&gt;&lt;/a&gt;&lt;i&gt;&lt;a&gt;third day of Nerdigras, my imaginary girlfriend gave to me,&lt;br /&gt;Three unmatched parens,&lt;br /&gt;&lt;/a&gt;&lt;a&gt;Two Turtle Functions,&lt;br /&gt;And a hash map in a B-Tree.&lt;br /&gt;&lt;br /&gt;On the &lt;/a&gt;&lt;/i&gt;&lt;a&gt;&lt;i&gt;oh-&lt;/i&gt;&lt;/a&gt;&lt;i&gt;&lt;a&gt;fourth day of Nerdigras, my imaginary girlfriend gave to me,&lt;br /&gt;Four calling stacks,&lt;br /&gt;Three unmatched parens,&lt;br /&gt;&lt;/a&gt;&lt;/i&gt;&lt;a&gt;&lt;i&gt;&lt;/i&gt;&lt;/a&gt;&lt;i&gt;&lt;a&gt;Two Turtle Functions,&lt;/a&gt;&lt;/i&gt;&lt;i&gt;&lt;a&gt;&lt;br /&gt;And a hash map in a B-Tree.&lt;br /&gt;&lt;/a&gt;&lt;/i&gt; &lt;a&gt;&lt;br /&gt;&lt;i&gt;On the &lt;/i&gt;&lt;i&gt;oh-&lt;/i&gt;&lt;i&gt;fifth day of Nerdigras, my imaginary girlfriend gave to me,&lt;br /&gt;Five &lt;/i&gt;&lt;/a&gt;&lt;i&gt;&lt;a href="http://en.wikipedia.org/wiki/Golden_ratio"&gt;golden ratios&lt;/a&gt;!&lt;br /&gt;Four calling stacks,&lt;br /&gt;Three unmatched parens,&lt;br /&gt;Two turtle functions,&lt;br /&gt;And a hash map in a B-tree.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;On the &lt;/i&gt;&lt;i&gt;oh-&lt;/i&gt;&lt;i&gt;sixth day of Nerdigras, my imaginary girlfriend gave to me,&lt;br /&gt;Six trees &lt;a rel="nofollow" href="http://en.wikipedia.org/wiki/Splay_tree"&gt;sp-laying&lt;/a&gt;,&lt;br /&gt;Five golden ratios!&lt;br /&gt;Four calling stacks,&lt;br /&gt;Three unmatched parens,&lt;br /&gt;Two turtle functions,&lt;br /&gt;And a hash map in a B-tree.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;On the &lt;/span&gt;&lt;i&gt;oh-&lt;/i&gt;&lt;span style="font-style: italic;"&gt;seventh day of Nerdigras, my girlfriend gave to me,&lt;br /&gt;Seven pointers dangling,&lt;br /&gt;Six trees sp-laying,&lt;br /&gt;Five golden ratios!&lt;br /&gt;Four calling stacks,&lt;br /&gt;Three unmatched parens,&lt;br /&gt;Two turtle functions,&lt;br /&gt;And a hash map in a B-tree. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;On the &lt;/span&gt;&lt;i&gt;oh-tenth&lt;/i&gt;&lt;span style="font-style: italic;"&gt; day of Nerdigras, my &lt;/span&gt;&lt;span style="font-style: italic;"&gt;imaginary girlfriend &lt;/span&gt;&lt;span style="font-style: italic;"&gt; gave to me,&lt;br /&gt;Eight bits a-zeroed,&lt;br /&gt;Seven pointers dangling,&lt;br /&gt;Six trees a-splaying,&lt;br /&gt;Five golden ratios,&lt;br /&gt;Four calling stacks,&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;Three unmatched parens,&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;Two turtle functions,&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;And a hash map in a B-tree. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;On the oh-eleventh day of Nerdigras, my imaginary girlfriend gave to me,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;A printout of &lt;a href="http://en.wikipedia.org/wiki/Graham%27s_number"&gt;Graham's Number&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;One corrupted byte&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Seven pointers dangling&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Six trees sp-laying&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Five golden ratios!&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Four calling stacks&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Three unmatched parens&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Two turtle functions&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;And a hash map in a B-tree. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;On the oh-twelfth day of Nerdigras, my imaginary girlfriend gave to me,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;[insert lyric here]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;A printout of Graham's Number&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;One &lt;/span&gt;&lt;span style="font-style: italic;"&gt;cornipted byke&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Seven pointers dangling&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Six trees sp-laying&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Five golden ratios!&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Four calling stacks&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Three unmatched parens&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Two turtle functions&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;And a hash map in a B-tree. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;(Song by &lt;span class="who"&gt;Jonathon Duerig&lt;b&gt;,&lt;/b&gt;&lt;/span&gt; &lt;a href="http://www.broofa.com/"&gt;Robert K&lt;/a&gt;.,  et al)&lt;br /&gt;&lt;span class="who"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-5772848566656290270?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/5772848566656290270/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=5772848566656290270' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/5772848566656290270'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/5772848566656290270'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2009/03/happy-nerdigras.html' title='Happy Nerdigras'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-6063734679406538646</id><published>2009-02-15T17:28:00.003-08:00</published><updated>2009-02-15T19:06:25.661-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ramblings'/><category scheme='http://www.blogger.com/atom/ns#' term='japan'/><title type='text'>Procreation Propaganda</title><content type='html'>The current fashion in Japan is babies.&lt;br /&gt;&lt;br /&gt;For the past 2 or 3 years, there has been a concerted effort on the part of the Japanese government to fight Japan's shrinking population by encouraging more women to have kids.  At first, they tried the obligation and duty angle: news was that the Japanese people needed to produce more children to maintain Japan's status as the second wealthiest country in the world.  Then, the government started providing more services to ease child rearing; some of these were long overdue, such as maternity care programs and day-care centers for working parents.&lt;br /&gt;&lt;br /&gt;Let be reiterate that because the concept may be unbelievable to readers from modern nations: until just recently, day-care centers were few and far between in Japan; what few there are were very expensive and, until deregulation in 2000, &lt;a href="http://www.jetro.go.jp/en/reports/market/pdf/2005_69_p.pdf"&gt;run by the government&lt;/a&gt;.  The concept of a babysitter is still foreign here.  Of course, things are changing, but Japan has gotten an awfully late start.&lt;br /&gt;&lt;br /&gt;I wish I had taken a picture of it, but I recall a poster on the train a few months back that sent the clear, if not implicit, message that if you have kids then people will be nice to you.  In a country in which people rarely acknowledge your existence, that's a pretty bold statement.  We're going to skip the courteous stage and jump right from the treating-you-as-an-obstacle stage to the being-kind-to-you stage...all you need is a kid.&lt;br /&gt;&lt;br /&gt;There has been much internal discourse in Japan about the ramifications of a shrinking population.  By and the large, the message is "have more children" because "shrinking is bad".  I  have not read the multitude of books on the subject, but the message sent by the in-train posters, celebrity magazines, and "talent"-riddled Japanese television shows is "kids are cool".&lt;br /&gt;&lt;br /&gt;Don't get me wrong: kids are cool.  What is uncomfortable to me is the idea of the government intervening in my personal life to support an official policy to counter the shrinking population.*&lt;br /&gt;&lt;br /&gt;The pretext to all this commotion is that a shrinking population is bad.  However, &lt;span class="texto1"&gt;Professor Akiko Matsutani disagrees and in 2007 wrote a book titled &lt;/span&gt;&lt;span class="texto1"&gt;"Shrinking Population Economics" in which he claims the shrinking isn't bad, but rather provides &lt;a href="http://ipsnews.net/news.asp?idnews=33922"&gt;an opportunity for Japan to improve the quality of life&lt;/a&gt; for its smaller population.  In his book, he argues &lt;/span&gt;that Japan should not focus on producing a new army of alcohol-numbed workaholics, but rather let workers enjoy more time with their family, take up hobbies, and unwind on holidays.&lt;br /&gt;&lt;br /&gt;Which actually brings the argument around full circle.  Perhaps the 12-hour+ work days, 3+ hour commutes, semi-regimented drinking parties, etc. with little or no time left to spend at home are as much to blame for the current "baby crisis" as anything.  You can't be a family if you are never home.  If the only time you see your spouse is for a few minutes as your drag your groggy butt back home after a long day at the office, is it really any surprise you don't have more kids.&lt;br /&gt;&lt;br /&gt;&lt;span class="texto1"&gt;The government solution: use propaganda to encourage people produce another generation of workaholics with no time or energy to have children themselves.&lt;/span&gt;  Professor &lt;span class="texto1"&gt;Matsutani's solution: make life enjoyable, kids or not.  Life is to be enjoyed, not frittered away in some Orwellian dystopia.  And the irony is, happier couples are more likely to have children.  &lt;/span&gt;&lt;span class="texto1"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="texto1"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;* I use the phrase "my personal life" empathetically with the Japanese people.  As a foreigner in Japan, the government couldn't care less whether I have kids or not.&lt;br /&gt;&lt;br /&gt;&lt;span class="texto1"&gt;~~~&lt;br /&gt;&lt;br /&gt;As a timely addendum to my ramblings:&lt;br /&gt;Canon has taken the initiative to send its workers home at 5:30pm (only twice a week, mind you).  But it &lt;a href="http://edition.cnn.com/2009/WORLD/asiapcf/01/26/canon.babies/index.html?section=cnn_latest"&gt;sends them home with homework: to make babies&lt;/a&gt;.  &lt;/span&gt;I wonder if they get performance reviews.&lt;br /&gt;&lt;span class="texto1"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-6063734679406538646?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/6063734679406538646/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=6063734679406538646' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/6063734679406538646'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/6063734679406538646'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2009/02/procreation-propaganda.html' title='Procreation Propaganda'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-122487789675254980</id><published>2009-02-11T17:55:00.003-08:00</published><updated>2009-02-11T18:48:19.464-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='life'/><category scheme='http://www.blogger.com/atom/ns#' term='mac'/><title type='text'>In Love with iTunes Movie Rentals</title><content type='html'>I've been meaning to try it for a while, but for the first time, on Tuesday night, we &lt;a href="http://www.apple.com/itunes/whatson/movies.html"&gt;rented a movie from iTunes&lt;/a&gt;.  Yet again, it was another impressively easy-to-use product from Apple.&lt;br /&gt;&lt;br /&gt;Living in Japan, we often don't get movies for months after they come out in the states.  And when they do finally come out here, they usually either dubbed into Japanese or have subtitles added.  Frankly, dubbing sucks in more ways than I care to list.  The subtitles aren't so bad, but they do detract from the movie a little.  The most important selling point to us, though, is that we don't have to get dressed and walk 30+ minutes to the video rental store (and another 30+ minutes to return it when we're done).&lt;br /&gt;&lt;br /&gt;So Tuesday night we basked in the warm glow of my wife's 24-inch iMac and watched WALL-E.  Yes, not a new release, but I had only seen it on the airplane and my wife hadn't seen it all yet.  It took all of 30 seconds to rent through the iTunes Store and the download began immediately.&lt;br /&gt;&lt;br /&gt;On the downside, it took 2 hours to download the movie.  While we could have started watching it immediately (while it continued to download in the background), since the movie was only about an hour and 20 minutes long, we didn't want to risk playback catching up to the download and ruining our movie-watching experience with "buffering" breaks.  So, we watched a couple of episodes of &lt;a href="http://www.thedailyshow.com/video/index.jhtml"&gt;The Daily Show&lt;/a&gt; online to let the download get a little over an hour head start.&lt;br /&gt;&lt;br /&gt;With an hour left to finish downloading the movie, we started watching WALL-E full screen on the computer.  The image quality was fabulous; there were no visible encoding artifacts at all.  The sound was similarly superb.  Even with the download continuing in the background, the movie played smooth with no hiccups.  It was exactly what I would have expected from renting a title on physical HD-DVD or Blu-ray media.&lt;br /&gt;&lt;br /&gt;Overall, the 1 hour lead time before we could start watching the movie was a little disappointing.  But being able to sit comfortably at home and not hoof it down to the video store more than made up for that little setback.  Next time, we'll probably either download the movie a day or two ahead of time or my wife will start the download when I leave the office so it is ready to play when I get home.  Other than that, we were extremely pleased with the convenience, the quality, and the ease-of-purchase.&lt;br /&gt;&lt;br /&gt;Apple nailed the user experience aspect again; there wasn't a single moment where I felt like we had to sacrifice something in order to gain convenience by purchasing online.  The rental fee was commensurate&lt;em&gt;&lt;/em&gt;: $4 to rent a recent release.  I seem to recall Blockbuster charging $4-$5 to rent recent releases.  So for roughly the same price as an old-school movie rental, I gained convenience but lost nothing.  Even without our unusual circumstances, that looks like a decent deal to me.&lt;br /&gt;&lt;br /&gt;So Apple iTunes' movie rental feature gets 4 thumbs up.  As expatriates, we'll throw in 4 big-toes too, for a total of 8 digits up.&lt;br /&gt;&lt;br /&gt;In case you are curious, there are &lt;a href="http://alexclau.livejournal.com/43241.html"&gt;services vaguely similar to NetFlix&lt;/a&gt; here, but they all require a) a Japanese credit card and b) postal delivery.  I'll save my rant regarding trying to get a credit card in Japan for another day, but suffice to say we don't have one and aren't likely to get one during the remainder of our stay here.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-122487789675254980?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/122487789675254980/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=122487789675254980' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/122487789675254980'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/122487789675254980'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2009/02/in-love-with-itunes-movie-rentals.html' title='In Love with iTunes Movie Rentals'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-5461158741391857895</id><published>2009-02-02T21:21:00.001-08:00</published><updated>2009-02-02T21:23:46.116-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='meta'/><title type='text'>Damn spammers</title><content type='html'>As much as I don't like it, spammers have forced me to disallow comments from anonymous posters.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-5461158741391857895?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/5461158741391857895/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=5461158741391857895' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/5461158741391857895'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/5461158741391857895'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2009/02/damn-spammers.html' title='Damn spammers'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-987298306576292684</id><published>2009-01-22T16:53:00.002-08:00</published><updated>2009-01-22T17:15:51.187-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ramblings'/><title type='text'>It's the End of the World as We Know It</title><content type='html'>And I Feel Fine.&lt;br /&gt;&lt;br /&gt;Living in Japan for the past year, I largely missed out on the 24-hour coverage of the presidential election.  In fact, even though I registered to vote absentee, I never did get my ballot.  In any event, I never got that caught up in the presidential election.  To be honest, though, while I was impressed with Obama's message of optimism after 8 years of fear, I didn't have a whole lot of faith he would follow through with his promise of change.&lt;br /&gt;&lt;br /&gt;So while I was happy the Obama won the election, more for what it said about my fellow Americans than what it said about Obama, I was hesitant to believe in "change" until I saw it.  In particular, I wanted to see Obama make his first act as president be to close the Guantanamo Bay prison.  That, more than anything to me, would signal the Obama is serious about restoring American ideals.&lt;br /&gt;&lt;br /&gt;Well, it wasn't his first act, but my eyes teared up this morning when I read the news: &lt;a href="http://news.yahoo.com/s/ap/20090123/ap_on_go_pr_wh/obama_rdp"&gt;Obama orders Gitmo to close&lt;/a&gt;.  3 days into his presidency and he's committed to shutting down that black-eye of injustice and putting America back on the high road of morality.&lt;br /&gt;&lt;br /&gt;In the words of the 2nd century philosopher Hierocles,&lt;br /&gt;&lt;blockquote&gt;We ought always to deal justly, not only with those who are just to us, but likewise to those who endeavor to injure us; and this, for fear lest by rendering them evil for evil, we should fall into the same vice.&lt;/blockquote&gt;As an American, today is truly a proud day.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-987298306576292684?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/987298306576292684/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=987298306576292684' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/987298306576292684'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/987298306576292684'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2009/01/its-end-of-world-as-we-know-it.html' title='It&apos;s the End of the World as We Know It'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-2699360653891328292</id><published>2009-01-19T01:00:00.003-08:00</published><updated>2009-01-19T02:23:23.725-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ramblings'/><category scheme='http://www.blogger.com/atom/ns#' term='life'/><category scheme='http://www.blogger.com/atom/ns#' term='japan'/><category scheme='http://www.blogger.com/atom/ns#' term='business'/><title type='text'>Open Plan Offices</title><content type='html'>The office that I work at, like many other offices in Japan, is what they call an "open plan office".  If you search google images for "&lt;a href="http://images.google.com/images?hl=en&amp;amp;q=open+plan+office&amp;amp;btnG=Search+Images&amp;amp;gbv=2"&gt;open plan office&lt;/a&gt;", you'll see page after page of images of hip-looking, airy spaces with lots of natural lighting and no walls.  Japanese open plan offices are similar, but without the hipness, airy spaces, or natural lighting.  Just long tables full of people sitting at computers under row-after-row of fluorescent lighting.  My office consists of over 100 people sitting in 1 giant room.  Cozy might be a good word to describe it.&lt;br /&gt;&lt;br /&gt;And let me tell you, when the air conditioners shut down at 6pm, it gets mighty toasty -- even in the dead of winter.&lt;br /&gt;&lt;br /&gt;I searched google images for some representative samples of Japanese open plan offices.  You don't have to look hard, a simple search for "&lt;a href="http://images.google.co.jp/images?hl=en&amp;amp;q=%E3%82%AA%E3%83%95%E3%82%A3%E3%82%B9&amp;amp;btnG=Search+Images&amp;amp;gbv=2"&gt;オフィス&lt;/a&gt;" ("office" in Japanese) yields almost nothing but open plan office pictures.  Oddly, the pictures have tiny 1-foot tall dividers separating facing people for some semblance of personal space; I don't have that luxury at my office.&lt;br /&gt;&lt;br /&gt;Anyway, having worked in this environment for over a year now, I took special interest in a &lt;a href="http://www.news.com.au/business/story/0,27753,24906913-5017672,00.html"&gt;recent study&lt;/a&gt; from Australia's Queensland University of Technology.  In that study, they found that:&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;In 90 per cent of the research, the outcome of working in an open-plan office was seen as negative, with open-plan offices causing high levels of stress, conflict, high blood pressure, and a high staff turnover.&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;The high level of noise causes employees to lose concentration, leading to low productivity, there are privacy issues because everyone can see what you are doing on the computer or hear what you are saying on the phone, and there is a feeling of insecurity.&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;Now that is something I can relate to.  I have found it impossible to concentrate on anything in this environment and my productivity has plummeted compared to the comfortable offices (or even cubes) I was used to in the U.S.&lt;br /&gt;&lt;br /&gt;I can only hope that the real research and development institutions in Japan have the good sense to give their staff decent working conditions.  Otherwise, I cannot fathom how Japan can hope to compete in knowledge industries.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-2699360653891328292?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/2699360653891328292/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=2699360653891328292' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/2699360653891328292'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/2699360653891328292'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2009/01/open-plan-offices.html' title='Open Plan Offices'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-1736234050319729889</id><published>2008-12-25T17:55:00.003-08:00</published><updated>2008-12-25T19:33:18.792-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ramblings'/><category scheme='http://www.blogger.com/atom/ns#' term='life'/><category scheme='http://www.blogger.com/atom/ns#' term='japan'/><title type='text'>Merry Christmas</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_eEUZxnkOyLo/SVQ6yIIHAkI/AAAAAAAAADc/s-PT9EVltcY/s1600-h/train.PNG"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 258px; height: 193px;" src="http://2.bp.blogspot.com/_eEUZxnkOyLo/SVQ6yIIHAkI/AAAAAAAAADc/s-PT9EVltcY/s320/train.PNG" alt="" id="BLOGGER_PHOTO_ID_5283912895661802050" border="0" /&gt;&lt;/a&gt;While there are tons of decorations in Tokyo, Christmas isn't actually a holiday in Japan.  As such, I had to work on Christmas.  While I wasn't able to spend Christmas with my real family, I did spend some quality time with the people who, over the course of the past year, I've come to be pretty close to.&lt;br /&gt;&lt;br /&gt;Yep, I'm hijacking a light-hearted Christmas post to talk about  trains in Tokyo.&lt;br /&gt;&lt;br /&gt;I didn't actually take this picture, but it is pretty representative of how I spend 2 and half hours of my day, five days a week (Christmas included).  Occasionally, especially in the evenings, it is so crowded I can't move or, worse, can't even stand over my own center-of-balance (meaning I'm just propped up by the surrounding crowd).&lt;br /&gt;&lt;br /&gt;While I'm getting used to it, this was quite the contrast to the comfort of CalTrain, where I could almost always get a seat even &lt;a href="http://upload.wikimedia.org/wikipedia/commons/6/69/Inside_Caltrain.JPG"&gt;when it was crowded&lt;/a&gt;.  I've always been a big proponent of mass transit, but I now have I new appreciation for the comfort of one's own car.  Even if you are stuck in traffic, at least you still have some personal space to call your own.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-1736234050319729889?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/1736234050319729889/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=1736234050319729889' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/1736234050319729889'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/1736234050319729889'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2008/12/merry-christmas.html' title='Merry Christmas'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_eEUZxnkOyLo/SVQ6yIIHAkI/AAAAAAAAADc/s-PT9EVltcY/s72-c/train.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-7976042174834315949</id><published>2008-12-01T21:04:00.004-08:00</published><updated>2008-12-01T22:20:38.639-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='life'/><category scheme='http://www.blogger.com/atom/ns#' term='rants'/><category scheme='http://www.blogger.com/atom/ns#' term='japan'/><title type='text'>The Gay Chikan</title><content type='html'>Japan has a particular problem with gropers on trains.  So bad, in fact, that 2/3 of all women in their 20s and 30s &lt;a href="http://www.timesonline.co.uk/tol/news/world/article394630.ece"&gt;report having been molested or groped&lt;/a&gt; on the train.  Considering that most women pass through their 20s and 30s at some point in their life, I imagine it is safe to assume that almost every women has been groped at one point or another.&lt;br /&gt;&lt;br /&gt;To alleviate the problem of gropers, or &lt;a href="http://en.wikipedia.org/wiki/Chikan_%28body_contact%29"&gt;&lt;span style="font-style: italic;"&gt;chikan&lt;/span&gt;&lt;/a&gt; as they are known in Japanese, many train operators in Japan have implemented &lt;a href="http://en.wikipedia.org/wiki/Women-only_passenger_car"&gt;women-only cars&lt;/a&gt; to segregate the perpetrators from their potential victims.  The &lt;span style="font-style: italic;"&gt;chikan&lt;/span&gt; are still there, but now they have no choice but to keep their hands to themselves.  In theory.  In practice, the women-only cars are overcrowded (perhaps a further testament to how pervasive the groping problem is) and the pervert-to-woman ratio in the normal cars is inflated.&lt;br /&gt;&lt;br /&gt;I don't know what the solution is, but I can sympathize with the plight of Japanese women.&lt;br /&gt;&lt;br /&gt;'Cause I'll be damned if I haven't been felt-up by the same (male) &lt;span style="font-style: italic;"&gt;chikan&lt;/span&gt; three times now.  This morning was the third incident and he was about to receive the brunt of a year of pent-up stress in the form of all the beating this scraggly nerd could muster.  But reason got the better of me and a gruff throat-clear and repositioning of my bag was enough to get him to back off.  You see, the reality of the situation is:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;I've never fought anyone in my life.  I'm a wuss.  At 5'10 and 140lbs I've probably got 6 inches of height and 30lbs in my favor, but still, I've never kicked anyone's ass in my life. Frankly, I don't really know where to start.  I'd be flailing there in my nerd rage kicking and screaming like an idiot.&lt;/li&gt;&lt;li&gt;He has good plausible deniability.  The trains are crowded; he was reading a book with one hand while feeling around for my package with the other.  Now I know there was enough room that he didn't need to stand awkwardly close to me and position himself so his free arm was a close as possible, and I know that his free hand was not simply resting by his side but rather working its way my direction.  But once I confront him, all that goes out the window.  The train moves on and there I am, in my broken Japanese, trying to explain that this sicko was purposefully grabbing my crotch.  It is just his word against mine.  Gay &lt;span style="font-style: italic;"&gt;chikan&lt;/span&gt;s don't seem to get much coverage here...surely I'll just be seen as a confused foreigner.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Had I beaten the shi*t out of him, I'd be the criminal.  Honestly, this is probably true in the U.S. too.  After all, feeling a guy up on a train may be a crime, but so is assaulting someone.  It doesn't help that the popular image going around Japan the &lt;a href="http://brandonpittman.wordpress.com/2007/03/28/foreigner-crime-in-japan/"&gt;past&lt;/a&gt; &lt;a href="http://gaijinlore.blogspot.com/2005/02/foreign-crime-wave-in-japan-fraudulent.html"&gt;few&lt;/a&gt; &lt;a href="http://www.debito.org/japantimes100402.html"&gt;years&lt;/a&gt; is that most &lt;a href="http://www.debito.org/TheCommunity/communityissues.html#police"&gt;criminals are foreigners&lt;/a&gt;.  Let's play pretend and say that I somehow managed to inflict severe injury on that pervert.  If you are the police officer confronted with a bloodied and beaten Japanese man and an incomprehensible foreigner, who would you handcuff and haul off to jail?  Yeah.  I don't want to go to &lt;a href="http://www.nichibenren.or.jp/en/activities/statements/data/daiyo_kangoku.pdf"&gt;prison in Japan&lt;/a&gt;.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;So all I could do was try to deter the guy.  Luckily, he got the message but I don't really know what I can do if the pervert persists.&lt;br /&gt;&lt;br /&gt;As a bit of history, I mentioned this was the 3rd time this guy has groped me.  The first time, the train was really pretty full and, frankly, I was in denial at the time.  It is pretty common for your hands to get pinned in awkward positions on a full train and he was being just subtle enough that it took me a while to figure out that it wasn't accidental.  I was pissed, but thoroughly at a loss of what to do about it.  That was almost a year ago.&lt;br /&gt;&lt;br /&gt;The 2nd time, it was really obvious what he was up to.  The train wasn't particularly crowded, but when he got on he positioned himself awkwardly close to me and turned such that his hand was next to my crotch.  Within seconds he was feeling around while feigning reading a book.  I turned to avoid him but he kept at it until I gave him a stern look and a gruff grunt.  At which point he actually walked away and stood somewhere else in the train.  That was about 8 months ago.&lt;br /&gt;&lt;br /&gt;And then there was today.  I had actually forgotten about this creep, but as soon as I saw him positioned awkwardly in front of me I knew what he was up to.  I was channelling all of my pent-up frustration and anger to serve him up the best beating I could, but I knew I shouldn't.  Luckily, clearing my throat was enough to tell him to go away and, like the previous time, he walked away and rode the rest of the way to Shinjuku at a safe distance from me.  But god damn I was pissed.  Pissed at this guy for repeatedly targeting me and pissed at the system for making it so hard to stop this jerk once and for all.&lt;br /&gt;&lt;br /&gt;And this is exactly what almost every woman in Japan is forced to put up with.&lt;br /&gt;&lt;br /&gt;At least a woman can grab his hand and call out "&lt;span style="font-style: italic;"&gt;chikan&lt;/span&gt;" and&lt;a href="http://www.herroflomjapan.com/2006/10/05/this-is-what-a-chican-looks-like/"&gt;&lt;/a&gt; &lt;a href="http://tokyo.metblogs.com/2007/06/09/chikan-molesting-school-girls-on-the-train/"&gt;have people believe her&lt;/a&gt; (at least in theory, this &lt;a href="http://leo.stcloudstate.edu/kaleidoscope/volume3/chican.html"&gt;translation of a guide for woman on how to deal with &lt;span style="font-style: italic;"&gt;chikan&lt;/span&gt;s&lt;/a&gt; speaks volumes on the Japanese attitude toward the problem).  But, seriously, I don't think I'm going to get the same support when I try to drag that gay chikan off the train.  And, for some reason, I don't foresee the women-only car concept being extended to solve the gay chikan problem too.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-7976042174834315949?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/7976042174834315949/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=7976042174834315949' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/7976042174834315949'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/7976042174834315949'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2008/12/gay-chikan.html' title='The Gay Chikan'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-8268002134299298672</id><published>2008-11-18T01:10:00.004-08:00</published><updated>2010-11-12T18:56:28.320-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><title type='text'>RFC868 UDP Time Protocol Client</title><content type='html'>Here is an &lt;a href="http://www.faqs.org/rfcs/rfc868.html"&gt;RFC 868&lt;/a&gt; UDP Time Protocol Client implementation in less than 30 lines of python.&lt;br /&gt;I know...just what you always wanted.  It is a long story, but I needed a time protocol client (that would run on Windows) for testing a service we're developing at work.  There are tons of implementations of the TCP version of the protocol, but I couldn't find a UDP implementation for Windows to save my life.  Python to the rescue.&lt;br /&gt;&lt;pre class="prettyprint" style="overflow:scroll;"&gt;from socket import *&lt;br /&gt;from struct import unpack&lt;br /&gt;from time import ctime, sleep&lt;br /&gt;from sys import argv&lt;br /&gt;&lt;br /&gt;argv = argv[1:]&lt;br /&gt;if len(argv) == 0:&lt;br /&gt;   argv = [ 'time-nw.nist.gov' ]&lt;br /&gt;&lt;br /&gt;s = socket(AF_INET, SOCK_DGRAM)&lt;br /&gt;s.settimeout(5.0)&lt;br /&gt;&lt;br /&gt;for server in argv:&lt;br /&gt;   print server, ":",&lt;br /&gt;   try:&lt;br /&gt;       s.sendto('', 0, (server, 37))&lt;br /&gt;       t = long(unpack('!L', s.recv(16)[:4])[0])&lt;br /&gt;       # Convert from 1900/01/01 epoch to 1970/01/01 epoch&lt;br /&gt;       t -= 2208988800&lt;br /&gt;       print ctime(t)&lt;br /&gt;   except timeout:&lt;br /&gt;       print "TIMEOUT"&lt;br /&gt;   except:&lt;br /&gt;       print "ERROR"&lt;br /&gt;&lt;br /&gt;s.close()&lt;br /&gt;sleep(2)&lt;br /&gt;&lt;/pre&gt;In case you are curious, the sleep(2) at the end is there so our testers can simply click the icon on their desktop and have time to actually see the results before Windows closes the console window.&lt;br /&gt;&lt;br /&gt;By default, it queries the &lt;a href="http://tf.nist.gov/tf-cgi/servers.cgi"&gt;time-nw.nist.gov&lt;/a&gt; server, but you can specify any number of servers to query on the command-line.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-8268002134299298672?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/8268002134299298672/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=8268002134299298672' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/8268002134299298672'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/8268002134299298672'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2008/11/rfc868-udp-time-protocol-client.html' title='RFC868 UDP Time Protocol Client'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-3399251964951473035</id><published>2008-11-16T20:03:00.007-08:00</published><updated>2008-11-17T01:06:08.376-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ramblings'/><title type='text'>A Calculus Lesson</title><content type='html'>I don't know what triggered it, but this morning I recalled a lesson I learned in high school Calculus class.  You see, I was in one of those "advanced" AP Calculus classes, one that was supposed to prepare you for the Calculus AB AP Exam (i.e. the hard one).  I don't know if that means anything more these days, but at the time, it was the class all the good students took.&lt;br /&gt;&lt;br /&gt;But here is the rub: I was a terrible student.  Seriously.  This was senior year; while my classmates were keeping tabs on their class ranking to see who was in which position for the top 10, I just kind of floated along and daydreamed about computer programming.  I think I had something of a C average in that class; I wasn't even in the top 25% of by graduating class, much less worried about being in the top 10.&lt;br /&gt;&lt;br /&gt;Anyway, I never really bought the whole school competition thing.  Don't get me wrong: I like learning stuff, but grades were always an afterthought.&lt;br /&gt;&lt;br /&gt;The particular incident I remembered this morning, however, was a "challenge" assignment in my Advanced Calculus class.  The teacher gave us an assortment of problems that he claimed he also used in his college classes.  These problems were supposed to be difficult.  We had a week or two to work on them, at the end of which we would turn them in and go over them.  I don't recall whether they were to be graded or not, but I latched onto the challenge.&lt;br /&gt;&lt;br /&gt;I think there were about 12 or so problems, a few of which weren't anything particularly challenging and everyone got those figured out pretty quick.  A few more took a couple of days of trying to arrive at a solution.  But the last few I recall being really hard.  Each day, before class, my classmates would compare solutions to see if we all arrived at the same answers (we had no answer key).&lt;br /&gt;&lt;br /&gt;To tell the truth, I rarely participated in these exchanges.  The problem was that some students figured out they could be remoras to the ambitious students' sharks.  While a few students compared their solutions and competed to be the first to solve each problem, others would take notes and write the solutions on their own papers.&lt;br /&gt;&lt;br /&gt;Now, to me this seemed like cheating at the time.  I thought the "smart kids" were getting taken advantage of.  I suspect they knew others were copying their answers; maybe they liked the attention, I don't know.  Nonetheless, I didn't want to be part of it.  I tried solving each problem the best I could.  If I was wrong, no big deal...I'd learn the proper solution when the challenge was over.  The grade didn't matter, it was the challenge that was exciting.  And I didn't want the accomplishment of solving a problem to be sullied by the doubt of having copied it from one of the good students.&lt;br /&gt;&lt;br /&gt;Anyway, so things went for most of the assignment.  It got down to just one problem that I didn't have a solution for.  Again, I don't remember the details, but it had something to do with finding the area of a sphere inscribed in a cone inscribed in a cylinder with the dimensions of the cylinder given in some form.  It turns out, that I was not the only one stuck on this problem.  No one in my class had solved it.&lt;br /&gt;&lt;br /&gt;Well I'll be darned if one morning the solution didn't come to me while I was in the shower.   I think we only had a day or two left on the challenge assignment and I was thrilled that I might actually be able to solve all the problems.  I think it was in Spanish class that I frantically jotted down my solution and solved to arrive at an answer.   I used my intermediate results for the dimensions of the outer cylinder and the inscribed cone to calculate their respective volumes and confirmed that the volume I calculated for the inner sphere was less than the cone it was inscribed in and that the volume of the cone was less than the cylinder.  In other words, if nothing else I knew my answer at least made sense.&lt;br /&gt;&lt;br /&gt;So I kept my mouth shut in Calculus class that day.  If anyone else had managed to solve it, they were apparently doing the same.  I started getting excited at the thought that me, the lowest-ranked student in my class, may have actually done something no one there could do.&lt;br /&gt;&lt;br /&gt;But the excitement didn't last.   You see, the last day before the deadline I blabbed.  No one had figured it out, the star students were getting frantic.  And someone came over to my desk and asked me if I had figured it out.  I hesitated for a second.  With only one day left, the odds were I was going to be the only person to solve this particular problem.&lt;br /&gt;&lt;br /&gt;And that is when it occurred to me: life isn't a contest.  I could keep my solution to myself and be #1 for a day (which is saying something since I graduated 112th out of a class of 420 or so) or I could share the wealth so-to-speak.  I didn't show them my answer, though.  I spent the 10 minutes or so we had before class to explain how to solve the problem: what things you needed to calculate and how to obtain the parameters needed to calculate them.  With that, I knew they could solve it and could still have a clear conscious knowing I didn't just give someone the answer.&lt;br /&gt;&lt;br /&gt;Sure enough, by the end of class they had a solution and came back over to compare their answer with mine.  Sure enough, they matched.  They were happy to have it solved; I felt good having helped someone.&lt;br /&gt;&lt;br /&gt;I won't say it wasn't a little disappointing to see them them immediately go back and share the answer with all of the other star students.  I suspect almost everyone in the class ended up the answer for that very difficult problem.  I'd be surprised if most of them were aware that I had solved it for them, but that was actually kind of fun in and of itself.  More importantly, I knew at least one person solved the problem themselves, though, and I knew that they did it based on what I had told them.  That felt really good.&lt;br /&gt;&lt;br /&gt;Fast-forward 10 years and I found myself working at a Bay Area startup called Backplane with a bright guy named Matt Dillon.  Not the &lt;a href="http://en.wikipedia.org/wiki/Matt_Dillon"&gt;actor&lt;/a&gt;, the &lt;a href="http://en.wikipedia.org/wiki/Matt_Dillon_%28computer_scientist%29"&gt;software engineer&lt;/a&gt;.  I remember a story that the CFO related to me about Matt's previous company, an Internet Service Provider named Best Internet.  According to the story, Matt had found Best Internet with a few others and was largely responsible for the technical infrastructure.  The servers and whatnot were all hosted in a data center and apparently Matt would, without hesitation, explain the details of how everything worked to any passerby who took an interest.  This CFO, who was a childhood friend of Matt's, warned Matt that he shouldn't be giving away company secrets like that.&lt;br /&gt;&lt;br /&gt;To which, Matt responded: &lt;span style="font-weight: bold;"&gt;if they know enough to understand what it is I'm telling them, then they already know enough to build it themselves anyway&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;I think that is more-or-less the same thing I realized in my Calculus class so many years before, but he actually put it into words that have stuck with me ever since.&lt;br /&gt;&lt;br /&gt;The insight, I think, is not that all information should be free, but rather that there are some truths that there is no benefit in hiding.  While some processes, facts, or figures may hold special strategic value, an environment in which all information, no matter what its worth, is horded can be stifling to innovation.&lt;br /&gt;&lt;br /&gt;In other words, you can assign a value to all information and a threshold on what you are comfortable sharing.  The best engineers I have ever met tend to have pretty low information-sharing thresholds while management tends to err on the high side.  The motivations are obvious.  Matt, for example, is clearly an engineer while Backplane's CFO was coming from a management perspective.&lt;br /&gt;&lt;br /&gt;What I discovered for myself, many moons ago in Calculus class, is that valuing information is a challenging thing.  In my case, the information I possessed -- the solution to that problem -- was of questionable value to begin with (I didn't even know whether it was right) and the information would have zero value the following day.  Furthermore, my threshold for sharing that information was unjustifiably high -- I didn't stand to gain or lose much if anything by sharing it.  To make an unbiased assessment, the only obstacle I had to overcome was my own ego.&lt;br /&gt;&lt;br /&gt;And that is the only thing I remember to this day about my high school Calculus class.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-3399251964951473035?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/3399251964951473035/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=3399251964951473035' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/3399251964951473035'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/3399251964951473035'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2008/11/calculus-lesson.html' title='A Calculus Lesson'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-9126950113203952428</id><published>2008-10-23T03:24:00.003-07:00</published><updated>2008-10-23T03:28:45.636-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='life'/><category scheme='http://www.blogger.com/atom/ns#' term='rants'/><title type='text'>We call those meeting rooms</title><content type='html'>If you regularly hold meetings in the office "break room", it isn't much of a break room.  That is all I have to say.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-9126950113203952428?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/9126950113203952428/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=9126950113203952428' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/9126950113203952428'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/9126950113203952428'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2008/10/we-call-those-meeting-rooms.html' title='We call those meeting rooms'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-1945822750769984492</id><published>2008-06-17T09:29:00.003-07:00</published><updated>2008-06-17T17:49:41.952-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='marketing'/><category scheme='http://www.blogger.com/atom/ns#' term='life'/><title type='text'>Firefox advertising</title><content type='html'>I couldn't believe my eyes, but this morning I saw this ad for &lt;a href="http://getfirefox.com/"&gt;firefox&lt;/a&gt; on the train during my commute:&lt;br /&gt;&lt;br /&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/Hlj6u2plNf4&amp;hl=ja"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/Hlj6u2plNf4&amp;hl=ja" type="application/x-shockwave-flash" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;It is being shown on the in-train televisions on the JR Chuo-sen line during rush hour.&lt;br /&gt;&lt;br /&gt;Translated, the text is roughly:&lt;br /&gt;&lt;quote&gt;&lt;br /&gt;If you are using the Internet, use Firefox.&lt;br /&gt;It's very very fast&lt;br /&gt;I'm already hooked&lt;br /&gt;The fox is crazy fast&lt;br /&gt;&lt;/quote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-1945822750769984492?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/1945822750769984492/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=1945822750769984492' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/1945822750769984492'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/1945822750769984492'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2008/06/firefox-advertising.html' title='Firefox advertising'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-7821048816552790670</id><published>2008-05-28T00:48:00.007-07:00</published><updated>2008-05-28T22:01:21.750-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='fun'/><category scheme='http://www.blogger.com/atom/ns#' term='life'/><title type='text'>Oktoberfest</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_eEUZxnkOyLo/SD0Rb6zAQAI/AAAAAAAAACQ/MYcdshXwPKI/s1600-h/%E7%94%BB%E5%83%8F0010+%28WinCE%29.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://3.bp.blogspot.com/_eEUZxnkOyLo/SD0Rb6zAQAI/AAAAAAAAACQ/MYcdshXwPKI/s320/%E7%94%BB%E5%83%8F0010+%28WinCE%29.jpg" alt="" id="BLOGGER_PHOTO_ID_5205335915647483906" border="0" /&gt;&lt;/a&gt;I don't drink much, but I couldn't help but notice that the 2008 Hibya &lt;a href="http://www.nihon-oktoberfest.com/"&gt;Oktoberfest&lt;/a&gt; is under way across the street from my office.&lt;br /&gt;&lt;br /&gt;That's right: they have Oktoberfest in Japan.&lt;br /&gt;In May, no less.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-7821048816552790670?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/7821048816552790670/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=7821048816552790670' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/7821048816552790670'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/7821048816552790670'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2008/05/octoberfest.html' title='Oktoberfest'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_eEUZxnkOyLo/SD0Rb6zAQAI/AAAAAAAAACQ/MYcdshXwPKI/s72-c/%E7%94%BB%E5%83%8F0010+%28WinCE%29.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-1945584422132533052</id><published>2008-05-25T21:48:00.005-07:00</published><updated>2008-05-26T00:12:15.738-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='web development'/><category scheme='http://www.blogger.com/atom/ns#' term='rants'/><title type='text'>The Perfect Web Interaction Language</title><content type='html'>I just noticed that my good friend JJ recently posted a rant regarding &lt;a href="http://jjinux.blogspot.com/2008/05/rant-unix-vs-web.html"&gt;the mess that web application development has become&lt;/a&gt;.  I've ranted about the same thing a &lt;a href="http://kbyanc.blogspot.com/2007/05/crayons-and-coloring-books.html"&gt;couple&lt;/a&gt; of &lt;a href="http://kbyanc.blogspot.com/2007/03/libraries-not-frameworks.html"&gt;times&lt;/a&gt; in the past, but JJ's words carry more weight since he is a web developer by profession.&lt;br /&gt;&lt;br /&gt;Most of this mess stems from the fact that user interaction via the web is defined by at least 5 different standards: &lt;a href="http://www.faqs.org/rfcs/rfc2616.html"&gt;HTTP&lt;/a&gt;, &lt;a href="http://www.w3.org/TR/REC-html40/"&gt;HTML&lt;/a&gt;, &lt;a href="http://www.w3.org/Style/CSS/"&gt;CSS&lt;/a&gt;, &lt;a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm"&gt;&lt;strike&gt;Java&lt;/strike&gt;ECMAScript&lt;/a&gt;, and &lt;a href="http://www.w3.org/DOM/"&gt;DOM&lt;/a&gt;. HTTP is a protocol; all of the rest are languages, each of which having completely different syntax from all of the rest.  On top of that, each standard has multiple different versions.  More importantly, each implementation of these standards has varying levels of compliance, effectively creating an ever-changing target to develop for.&lt;br /&gt;&lt;br /&gt;Take HTML for example.  It is a mess: each web browser has historically rendered the same HTML content slightly differently, supported different tags, and been accommodating of syntax errors to varying degrees.  To move the web to a single, consistent, language for describing the content of web pages, the W3C wrote a new specification: &lt;a href="http://www.w3.org/TR/xhtml1/"&gt;XHTML&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Now, good web developers ensure that they always output conforming XHTML, but not everyone does.  But then, not every browser accepts conforming XHTML, so there is good reason not to use it (and, as JJ notes in his rant, browser developers have &lt;a href="http://www.mozilla.org/docs/web-developer/faq.html"&gt;recommended sticking with HTML 4.01&lt;/a&gt; to "ensure the widest browser and search engine support").&lt;br /&gt;&lt;br /&gt;This lesson of XHTML is important: it doesn't do any good to make a new standard because you cannot force all browser implementations to support it.  In fact, it only makes the problem worse because it simply adds one more possible input a browser may be reasonable expected to accept, hence lengthening the already-too-long list of standards browsers must support (and developers will be expected to know).&lt;br /&gt;&lt;br /&gt;CSS, ECMAScript, and DOM are all similar: each browser implements a different set of features that partially overlap each other and partially overlap the standards themselves.  An experienced developer is expected to know (and keep up with) what subset of features are safe to use on all targeted browsers and which have equivalent functions and what hacks are necessary to trigger those functions on the implementing browsers.  The fact the people even talk about targeting browsers shows just how far we are from having any consistent standard we can depend on to work no matter what browser the document is viewed in.&lt;br /&gt;&lt;br /&gt;Now add to this the fact that the HTTP protocol itself, the protocol that is intrinsically linked to HTML, is 176 pages long and (from my experience) poorly understood by most web application developers.  Or consider for a moment the fact that you even need to be fluent the mechanics of &lt;span style="font-style: italic;"&gt;how&lt;/span&gt; the content is delivered to the user (and &lt;span style="font-style: italic;"&gt;how&lt;/span&gt; input is delivered from the user) in order to write even a simple application.  This is Joel's &lt;a href="http://www.joelonsoftware.com/articles/LeakyAbstractions.html"&gt;Law of Leaky Abstractions&lt;/a&gt; writ large.&lt;br /&gt;&lt;br /&gt;Now, let's take a cue from John Lennon and imagine we could start from scratch -- what would the "perfect" environment for web application development look like?&lt;br /&gt;&lt;br /&gt;At this point, the problems with the current model are pretty well understood.  What if we pretend there is no baggage and we could just start over, developing a perfect language for describing user interaction.  Imagine we could develop and deploy a new "browser" that understood this new language and implemented it perfectly to our specifications.  Think about it.  Seriously.&lt;br /&gt;&lt;br /&gt;Not a re-implementation of HTML or XHTML.  Not a better JavaScript.  Not a better CSS.  Those are all thinking too small.  How about a single language the describes all aspects of user interaction with a single syntax?&lt;br /&gt;&lt;br /&gt;You may say I'm a dreamer, but I'm not the only one.&lt;br /&gt;&lt;br /&gt;In fact, as I mentioned above, the W3C has been making motions in this general direction for years.  They proposed XHTML and CSS as  replacements for the mess that is HTML.  But if XHTML and CSS are still not properly implemented by all browsers almost 10 years after their introduction, why should we expect anyone to implement our "ideal" all-encompassing interaction specification language?&lt;br /&gt;&lt;br /&gt;My suggestion: we don't.&lt;br /&gt;&lt;br /&gt;May I suggest instead, a translator.  One that takes a document written in our web interaction language as input and outputs all the hairy HTML, CSS, ECMAScript, etc. that is necessary to get the predominant browsers to behave the way specified by that document.  That is, admit defeat and relegate the current web development paradigms to mere implementation details.&lt;br /&gt;&lt;br /&gt;In fact, this may not be as crazy as it sounds.  There are a number of XHTML templating toolkits for python that can be configured to convert generated XHTML documents into plain old HTML 4.01 documents that all browsers support.  Consider extending this concept beyond just output generation, but to the whole of web application interaction.&lt;br /&gt;&lt;br /&gt;Think of it as writing a compiler in which the output "machine code" is HTML, CSS, ECMAScript, and the server-side logic.&lt;br /&gt;&lt;br /&gt;Is this pie-in-the-sky dreaming?  Sure.  Is it a hard problem?  Sure.  Does it risk running afoul of the Law of Leaky Abstractions?  You betcha.&lt;br /&gt;&lt;br /&gt;But codifying web best practices and cross-browser support behind a consistent high-level language and compiler is priceless.  Just imagine the beauty, the joy, that web application development could be.  Imagine how much more productive you could be if you weren't coding CSS hacks and having to test on 5 different browsers after each change.&lt;br /&gt;&lt;br /&gt;Yeah, it's crazy.  But what is the alternative?  Convincing every browser vendor in the world to (finally!) implement standards correctly, convincing every person in the world to upgrade to the standards-implementing browsers and ensuring they stay up-to-date as bug-fixes are released for those browsers?  Now who is talking crazy?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-1945584422132533052?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/1945584422132533052/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=1945584422132533052' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/1945584422132533052'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/1945584422132533052'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2008/05/perfect-web-interaction-language.html' title='The Perfect Web Interaction Language'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-1705646896093815044</id><published>2008-04-11T02:17:00.003-07:00</published><updated>2008-04-11T02:27:41.712-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='life'/><title type='text'>Turned 0x20</title><content type='html'>Wow, I just noticed that it has been months since my last blog update.  Turns out that with the long commute, I don't have nearly the amount of free time I used to have.  It probably doesn't help that I have to stand/walk for the entire 3-hour round-trip commute; I'm just exhausted at the end of the day.&lt;br /&gt;&lt;br /&gt;Anyway, I'm just writing a post to say I turned 0x20 today.  At least that is what I told my wife to say when she had her birthday back in February...she's having more trouble with getting old(er) than I am.  She didn't like 0x20 because it looked "too young" so we compromised on 26 (duodecimal).  She thought that felt more like it.&lt;br /&gt;&lt;br /&gt;I'd just assume to tell people I'm 100000, but I don't think too many people would find that funny.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-1705646896093815044?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/1705646896093815044/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=1705646896093815044' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/1705646896093815044'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/1705646896093815044'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2008/04/turned-0x20.html' title='Turned 0x20'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-7211933950966896460</id><published>2007-12-20T20:39:00.000-08:00</published><updated>2007-12-20T22:56:04.727-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='rants'/><title type='text'>Less code</title><content type='html'>I was just reading Steve Yegge's &lt;a href="http://steve-yegge.blogspot.com/2007/12/codes-worst-enemy.html"&gt;rant against code size&lt;/a&gt; and realized that he managed to put into words exactly the feelings that have been drawing me to python in recent years.  In particular, I managed to mostly skip the Java step in my journey from Pascal, through assembler, up to C, and then the leap to high-level languages including perl, and more recently python.  I don't really know why, but Java never felt "right" -- for anything.  To this day, I can't think of too many applications that I would say Java was the best tool for the job.  For which, I think Steve hit the nail on the head when he writes:&lt;br /&gt;&lt;blockquote&gt;Java is like a variant of the game of Tetris in which none of the pieces can fill gaps created by the other pieces, so all you can do is pile them up endlessly.&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;Hallelujah, brother.&lt;br /&gt;&lt;br /&gt;Anyway, I strongly agree with Steve's general points about the merits of small code bases, but I won't go so far to say that smaller is necessarily always better.  Python hits a sweet spot for me (at least for now) between compactness and comprehensiveness.  Certainly a good number of problems could be expressed more succinctly in a functional language such as Erlang or Haskell, but you lose readability.  In fact, as elegantly as many problems can be expressed in a functional language, they quickly start to look like line noise when the problems exceed textbook examples.&lt;br /&gt;&lt;br /&gt;Programming language preferences aside, what I agree with most from Steve's blog post was not so much that more succinct languages are better, but that less code is better.  His post is written so as to suggest that Java itself is a problem -- which may certainly be true -- but he doesn't clarify whether he thinks it is &lt;span style="font-style: italic;"&gt;Java the language&lt;/span&gt;, or &lt;span style="font-style: italic;"&gt;Java the set of libraries&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Python, for example, combines a great set of standard libraries with a language syntax that makes it easy to use those libraries.  All the lines of code hidden away in libraries are effectively "free" code.  You don't have to manage their complexity.  Give me a language that makes leveraging as many libraries as possible painless, then I can glue them together to make great programs with low apparent complexity.  In reality, the lines of code might be astronomical, but I don't have to manage the complexity of all of it -- just the part I wrote -- so it doesn't matter.&lt;br /&gt;Python does a great job here, whereas Java (and C++'s STL) largely get it wrong.&lt;br /&gt;&lt;br /&gt;In particular, I would argue that, in addition to python's straightforward syntax, the fact that so many of python's libraries are written in C is a large factor in why they are so easy to use.  There may be a huge amount of complexity, and a huge number of lines of code, in the C implementation of a library.  However, the API boundary between python and C acts a sort of line of demarcation -- no complexity inherent in the implementation of the library can leak out into the python API without the programmer explicitly allowing it.  That is, the complexity of libraries written in C and callable from python is necessarily encapsulated.&lt;br /&gt;&lt;br /&gt;As a personal anecdote, in one project I work on, we use ctypes to make foreign function calls to a number of Windows APIs.  One thing that really bothers me about this technique is that I find myself re-implementing a number of data structures in ctypes that are already defined in C header files.  If I make a mistake, then I introduce a bug.  Ironically, since I could leverage more existing code, often times there would be fewer lines of code and less complexity had I just used C to call the APIs.   Of course, other parts of the program would become hugely unwieldy, but the point of this anecdote is that libraries (more specifically, being able to leverage known-good code) can be much more effective in reducing code than the implementation language.&lt;br /&gt;&lt;br /&gt;So long as the implementation language isn't Java.  Java just sucks. :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-7211933950966896460?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/7211933950966896460/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=7211933950966896460' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/7211933950966896460'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/7211933950966896460'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2007/12/less-code.html' title='Less code'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-4234105875555570676</id><published>2007-12-11T23:42:00.000-08:00</published><updated>2007-12-12T00:01:38.202-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='economics'/><title type='text'>Lies, Damn Lies, and ... Economics?</title><content type='html'>Today I'm going to venture out of any field that I have the slightest expertise in and flounder about in the field of basic macro-economics.&lt;br /&gt;&lt;br /&gt;But before I demonstrate my utter lack of knowledge, I'm going to touch on a subject that I at least have some familiarity with -- mathematics.  I'm going to share with you a math problem that I cannot solve.  It looks something like this:&lt;br /&gt;&lt;br /&gt;Given:&lt;pre&gt;&lt;br /&gt;     A           A'&lt;br /&gt;    --- = 111 = ----&lt;br /&gt;     B           B'&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;and&lt;pre&gt;&lt;br /&gt;    B = B' * 1.41&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;What is the ratio between &lt;kbd&gt;A&lt;/kbd&gt; and &lt;kbd&gt;A'&lt;/kbd&gt;?&lt;br /&gt;Elementary algebra would seem to imply the answer should be 1.41:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;     A     A'&lt;br /&gt;    --- = ----&lt;br /&gt;     B     B'&lt;br /&gt;&lt;br /&gt;    A * B' = A' * B&lt;br /&gt;&lt;br /&gt;    A * B' = A' * B' * 1.41  ==&gt;  A = A' * 1.41&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;By itself, I would have expected this problem would be trivial.&lt;br /&gt;However, what perplexes me is that the observed value for the ratio between &lt;kbd&gt;A&lt;/kbd&gt; and &lt;kbd&gt;A'&lt;/kbd&gt; is nowhere near 1.41, but rather approximately 1.0.&lt;br /&gt;&lt;br /&gt;And here is where I demonstrate my lack of understanding in the field of economics...&lt;br /&gt;&lt;br /&gt;The thing that has been puzzling me for years (even before the recent foreign exchange craze) is that the U.S. dollar has experienced fairly consistent inflation for these 13 years while the Japanese Yen has experienced almost none, yet the exchange rate remains the same.&lt;br /&gt;&lt;br /&gt;You see, &lt;kbd&gt;A' / B'&lt;/kbd&gt; is the average value of the Japanese Yen in U.S. dollars for November 2007.  And &lt;kbd&gt;A / B&lt;/kbd&gt; is the average value of the Japanese Yen in U.S. dollars for April 1994.  Both ratios just happen to be approximately 111.  (Source: &lt;a href="http://research.stlouisfed.org/fred2/data/EXJPUS.txt"&gt;Board of Governors of the Federal Reserve System&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;The ratio &lt;kbd&gt;B' / B&lt;/kbd&gt; is the purchasing power of the U.S. dollar in 2007 relative to dollars in 1994.  That is, one 1994 dollar (B) is worth 1.41 2007 dollars (B').  (Source: &lt;a href="http://data.bls.gov/cgi-bin/cpicalc.pl"&gt;Bureau of Labor Statistics&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;The ratio &lt;kbd&gt;A' / A&lt;/kbd&gt; is the purchasing power of the Japanese Yen in 2007 relative to yen in 1994.  It so happens that one Japanese yen buys the same amount in 2007 that it did in 1994. (Source: Japanese &lt;a href="http://www.stat.go.jp/english/data/cpi/"&gt;Ministry of Internal Affairs and Communications&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;How can this be?&lt;br /&gt;How can two currencies can have different inflation rates, but yet maintain the same conversion rate?&lt;br /&gt;&lt;br /&gt;I'm no economist, but I cannot help but wonder if the answer lies outside of math and in the realm of human irrationality.  Or that the CPI values uses to calculate the purchasing power of a currency are inconsistent and/or flawed.  Actually, I know that CPI calculation methods differ amongst countries, but for some reason I expected Japan to have used to the calculation method that U.S. does.  I admit I haven't investigated that explanation yet.&lt;br /&gt;&lt;br /&gt;Does anyone have a better explanation (preferably one that does not violate basic math principles)?  I would love to put this puzzle to rest.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-4234105875555570676?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/4234105875555570676/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=4234105875555570676' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/4234105875555570676'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/4234105875555570676'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2007/12/lies-damn-lies-and-economics.html' title='Lies, Damn Lies, and ... Economics?'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-4344306776171319981</id><published>2007-12-03T18:38:00.000-08:00</published><updated>2007-12-03T20:28:47.986-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='baypiggies'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>Python: asserting code runs in specific thread</title><content type='html'>My buddy &lt;a href="http://www.nabble.com/Re%3A-Synchronized-in-Python-p14127220.html"&gt;JJ's post to the BayPiggies mailing list&lt;/a&gt; reminded me of a little snippet I wrote a while back that others might find useful as well.  Personally, I avoid threads like the plague, but if you are forced to use them it is generally handy to keep accurate tabs on how you use them.  In particular, as JJ suggested in his post, it is a good idea to assert that code is called in the thread context you expect it to be called in.  This can go a long way toward avoiding one of many classes of hard-to-find logic bugs multi-threading invites.  Anyway, on to the code...&lt;br /&gt;&lt;pre&gt;def assertThread(*threads):&lt;br /&gt;    """Decorator that asserts the wrapped function is only&lt;br /&gt;       run in a given thread&lt;br /&gt;    """&lt;br /&gt;    # If no thread list was supplied, assume the wrapped&lt;br /&gt;    # function should be run in the current thread.&lt;br /&gt;    if not threads:&lt;br /&gt;        threads = (threading.currentThread(), )&lt;br /&gt;&lt;br /&gt;    def decorator(func):&lt;br /&gt;        def wrapper(*args, **kw):&lt;br /&gt;            currentThread = threading.currentThread()&lt;br /&gt;            name = currentThread.getName()&lt;br /&gt;            assert currentThread in threads or name in threads, \&lt;br /&gt;                   "%s erroniously called in %s thread " \&lt;br /&gt;                   context" % (func.__name__, name)&lt;br /&gt;            return func(*args, **kw)&lt;br /&gt;&lt;br /&gt;        if __debug__:&lt;br /&gt;            return wrapper&lt;br /&gt;        else:&lt;br /&gt;            return func&lt;br /&gt;    return decorator&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;You can restrict execution to one or more threads, each specified by either the thread object or thread name.&lt;br /&gt;&lt;br /&gt;Note the trick at the end to make the decorator effectively a no-op in production.  Using this decorator around your functions and methods helps you spot logic errors during development without impacting the performance of your production code.  Of course, if you are of the school that assertions should never be disabled, feel free to replace the final &lt;code&gt;if __debug__:&lt;/code&gt;/&lt;code&gt;else&lt;/code&gt; block with an unconditional return of &lt;code&gt;wrapper&lt;/code&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-4344306776171319981?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/4344306776171319981/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=4344306776171319981' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/4344306776171319981'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/4344306776171319981'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2007/12/python-asserting-code-runs-in-specific.html' title='Python: asserting code runs in specific thread'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-1671913780861050897</id><published>2007-11-22T03:05:00.000-08:00</published><updated>2007-11-22T03:27:36.156-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='web development'/><category scheme='http://www.blogger.com/atom/ns#' term='fun'/><title type='text'>My first OpenSearch plugin</title><content type='html'>Well, yesterday I crawed out of my cave and discovered &lt;a href="http://www.opensearch.org/"&gt;OpenSearch&lt;/a&gt;, the XML-based description format for search engines. Both Firefox 2 and IE 7 can import search engine settings from OpenSearch description files and add the search engine to their respective search bars. In fact, there are already description &lt;a href="http://mycroft.mozdev.org/"&gt;files for just about every search engine&lt;/a&gt; you can think of.&lt;br /&gt;&lt;br /&gt;There is a &lt;a href="http://developer.mozilla.org/en/docs/Creating_OpenSearch_plugins_for_Firefox"&gt;great guide&lt;/a&gt; to writing your own OpenSearch description and how to link to the description file such that Firefox or IE automatically discover it. The specification is relatively straightforward so, excited, I decided to whip up an OpenSearch plugin for &lt;a href="http://www.posi.net/wine-review/"&gt;Kelly &amp;amp; Cristin's Wine Reviews&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I only encountered two obstacles:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Getting an icon for my search plugin. I didn't already have a shortcut icon for my site that I could simply re-use, so I had to first make an icon.&lt;/li&gt;&lt;li&gt;I typed the XML document by hand; I left out the final slash in the OpenSearch XML namespace declaration. Firefox will not recognize the file as an OpenSearch document unless the namespace is &lt;em&gt;exactly&lt;/em&gt; right. This should have been quick to diagnose except that Firefox gives you no error message to aid in debugging - it simply refuses to load the file.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;The text of my OpenSearch description is &lt;a href="http://www.posi.net/wine-review/search.xml"&gt;here&lt;/a&gt;. But if you &lt;a href="http://www.posi.net/wine-review/"&gt;visit the web site&lt;/a&gt; using Firefox 2.0 or later, you'll notice that icon next to your search bar gets a blue highlight; if you click on the icon, you'll see an option to add my Wine Review search to your search bar.&lt;/p&gt;&lt;p&gt;Anyway, without the half hour it took to figure out why Firefox wouldn't recognize my OpenSearch plugin, it would have only taken a few minutes to add a search plugin and plugin auto-detection code (one &lt;span style="font-family:courier new;"&gt;link&lt;/span&gt; tag in the HTML &lt;span style="font-family:courier new;"&gt;head&lt;/span&gt;) to my web site. I don't seriously expect anyone to want to be able to search my silly wine review site from their browser search bar, but certainly was neat to be able to add it.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-1671913780861050897?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/1671913780861050897/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=1671913780861050897' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/1671913780861050897'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/1671913780861050897'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2007/11/my-first-opensearch-plugin.html' title='My first OpenSearch plugin'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-1448330741362334441</id><published>2007-11-20T17:12:00.000-08:00</published><updated>2007-11-20T17:15:39.339-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='life'/><title type='text'>Back on-line</title><content type='html'>This is just a quick note to mention that I finally got my Internet access hooked up this past weekend.  After picking up a 100V power supply in Akihabara, my little &lt;a href="http://www.soekris.com/net4801.htm"&gt;Soekris 4801&lt;/a&gt; is back up and serving the &lt;a href="http://www.posi.net/"&gt;posi.net&lt;/a&gt; domain again.&lt;br /&gt;&lt;br /&gt;I'm still getting settled into my new routine at work, but I hope to have time to start regularly writing posts again soon...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-1448330741362334441?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/1448330741362334441/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=1448330741362334441' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/1448330741362334441'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/1448330741362334441'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2007/11/back-on-line.html' title='Back on-line'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-3618217896961385555</id><published>2007-11-07T05:21:00.000-08:00</published><updated>2007-11-07T05:38:54.768-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='fun'/><category scheme='http://www.blogger.com/atom/ns#' term='life'/><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><title type='text'>Unix storage solution</title><content type='html'>I've been lax in updating my blog lately, mainly due to lack of Internet access at my apartment since we've moved to Tokyo.  It is nice and all that I have a variety of high-speed Internet service providers to choose from, but it would be really great if any of them could actually hook up my service is less than a month. :(&lt;br /&gt;&lt;br /&gt;Anyway, until I get my own Internet service, I've been "borrowing" access via an open AP with a signal just strong enough that I can associate if I stand right next to my window.  Sitting is no good; I have to have the laptop pretty high in the air to get a signal.  As you can imagine, I've been reluctant to get on the Internet any more than I have to.&lt;br /&gt;&lt;br /&gt;That said, I couldn't pass up the opportunity to share a surprising Unix storage solution I discovered today.  Actually, my wife picked it up unintentionally while shopping at the &lt;a href="http://www.donki.com/"&gt;Don Quixote&lt;/a&gt; across the street...&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_eEUZxnkOyLo/RzG-fvoE8aI/AAAAAAAAABg/oxAegNwk6FE/s1600-h/20071024-Tokyo-Stuff+007.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_eEUZxnkOyLo/RzG-fvoE8aI/AAAAAAAAABg/oxAegNwk6FE/s400/20071024-Tokyo-Stuff+007.jpg" alt="" id="BLOGGER_PHOTO_ID_5130090903121490338" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;I kid you not, these are cheap little plastic refrigerator storage boxes.  I couldn't believe my eyes when she showed them to me.   Now if I could only find ones that said "FreeBSD" and "Linux" I'd be set on souvenirs the next time I go back to the U.S.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-3618217896961385555?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/3618217896961385555/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=3618217896961385555' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/3618217896961385555'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/3618217896961385555'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2007/11/unix-storage-solution.html' title='Unix storage solution'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_eEUZxnkOyLo/RzG-fvoE8aI/AAAAAAAAABg/oxAegNwk6FE/s72-c/20071024-Tokyo-Stuff+007.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-4635368554204552888</id><published>2007-10-15T15:15:00.000-07:00</published><updated>2007-10-15T15:21:33.705-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='life'/><category scheme='http://www.blogger.com/atom/ns#' term='meta'/><title type='text'>posi.net going offline</title><content type='html'>My personal domain, posi.net, will be going offline for the next few days while I move.  This means that any mail sent to the domain will bounce (I'm not setting up a backup MX on purpose, since 99.99% of my mail is spam).   It also means the Cristin and Kelly's absolutely fabulous &lt;a href="http://www.posi.net/wine-review/"&gt;wine reviews&lt;/a&gt;, my &lt;a href="http://www.posi.net/chikyuu/"&gt;地球ラジオ archive&lt;/a&gt;, and other miscellaneous amusements will be temporarily offline too.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-4635368554204552888?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/4635368554204552888/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=4635368554204552888' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/4635368554204552888'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/4635368554204552888'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2007/10/posinet-going-offline.html' title='posi.net going offline'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-184842098897233721</id><published>2007-10-12T09:52:00.000-07:00</published><updated>2007-10-12T10:22:38.067-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='web development'/><category scheme='http://www.blogger.com/atom/ns#' term='baypiggies'/><category scheme='http://www.blogger.com/atom/ns#' term='testing'/><title type='text'>My last BayPiggies</title><content type='html'>Well, last night was my last &lt;a href="http://baypiggies.net/"&gt;BayPiggies&lt;/a&gt; meeting for a few years.  The speakers were Mikeal Rogers &amp;amp; Adam Christian from the &lt;a href="http://www.osafoundation.org/"&gt;Open Source Applications Foundation&lt;/a&gt;, presenting their new automated web U.I. testing framework, &lt;a href="http://windmill.osafoundation.org/"&gt;Windmill&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;It was a pretty neat demo; if I actually did any serious web development, I would consider using it (or the preexisting &lt;a href="http://www.openqa.org/selenium/"&gt;Selenium&lt;/a&gt; tool) for testing.  Being that it was a python user's group rather than a product show-and-tell, I would have liked more details about how Windmill worked, especially from the python side, but I am assured it is "really really really really cool". ;)  I guess I'll have to find time to read the code myself.&lt;br /&gt;&lt;br /&gt;Anyway, afterwards I got to hang out with my buddies &lt;a href="http://jjinux.blogspot.com/"&gt;JJ&lt;/a&gt; and &lt;a href="http://turingpup.blogspot.com/"&gt;Zach&lt;/a&gt; for a while and chat over a burger.  I'm afraid mine was not particularly stimulating conversation, but I'm really looking forward to finding out what exactly it is JJ has been coding up over at MultiCosmic.  He assures me it will go live in a few days, and that I'll have to wait to learn what it is when everyone else does. :)  I just know it involves FaceBook.&lt;br /&gt;&lt;br /&gt;I've only been going to BayPiggies for the past couple of months, but I'm going to miss the monthly chance to learn about some new tool or technology utilizing python.  More importantly, I'm going to miss the opportunity to hang out and hear the state-of-web-development address from JJ (he admitted he loves &lt;a href="http://www.rubyonrails.org/"&gt;Rails&lt;/a&gt;, by the way :) ).  Hopefully, I'll still see Zach from time to time in Tokyo.&lt;br /&gt;&lt;br /&gt;Speaking of which, I have yet to find a web page for a Python user's group in Tokyo; &lt;a href="http://www.python.jp/Zope/"&gt;pyJug&lt;/a&gt; doesn't appear to actually hold casual group meetings just weekend retreats and workshop-style meetings.  That sounds like fun, but not quite the casual get-together I've gotten used to with &lt;a href="http://www.bafug.org/"&gt;BAFUG&lt;/a&gt; and BayPiggies meetings.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-184842098897233721?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/184842098897233721/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=184842098897233721' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/184842098897233721'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/184842098897233721'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2007/10/my-last-baypiggies.html' title='My last BayPiggies'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-5215646532533051487</id><published>2007-10-09T20:53:00.000-07:00</published><updated>2007-10-09T21:15:04.304-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>Python: A better wx.ListCtrl</title><content type='html'>I'm not going to repeat the entire post here, but I would like to direct your attention to my friend and former coworker &lt;a href="http://www.nttmcl.com/blog/?q=node/10"&gt;Zach's recent blog post&lt;/a&gt; regarding implementing a better ListCtrl via wxWidgets' virtual ListCtrl.&lt;br /&gt;&lt;br /&gt;For those familiar with wxPython, what Zach has done is combine wx.ListCtrl and wx.lib.mixins.listctrl.ColumnSorterMixin into a single easy-to-use class.  Except, rather than implement it as an entirely new class, he implements a function that transmutes a generic ListCtrl into his new &amp;amp; improved ListCtrl.  That advantage here, as he points out, is that you don't need to modify any XRC files to gain the new functionality.&lt;br /&gt;&lt;br /&gt;The post is on NTT MCL's recently-introduced &lt;a href="http://www.nttmcl.com/blog/"&gt;company blog&lt;/a&gt; which, unfortunately, doesn't appear to accept comments (and says "Japan Window" for some strange reason).  As such, I'll point out that Zach also occasionally posts to his own &lt;a href="http://turingpup.blogspot.com/"&gt;personal blog&lt;/a&gt;, which is also worth checking out.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-5215646532533051487?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/5215646532533051487/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=5215646532533051487' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/5215646532533051487'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/5215646532533051487'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2007/10/python-better-wxlistctrl.html' title='Python: A better wx.ListCtrl'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-7055326368736370979</id><published>2007-10-09T20:01:00.001-07:00</published><updated>2007-10-10T13:46:10.555-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='life'/><title type='text'>Sold my car</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_eEUZxnkOyLo/RwxAuIjl4TI/AAAAAAAAABQ/b9y_T24sXbY/s1600-h/DSC00187.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://4.bp.blogspot.com/_eEUZxnkOyLo/RwxAuIjl4TI/AAAAAAAAABQ/b9y_T24sXbY/s320/DSC00187.jpg" alt="" id="BLOGGER_PHOTO_ID_5119538037728338226" border="0" /&gt;&lt;/a&gt;We sold my car today.  It was a 1996 Ford Escort.&lt;br /&gt;&lt;br /&gt;I realize this isn't particularly interesting to anyone else, but since it was the first car I ever bought on my own -- heck, I even moved it with me from Virginia -- it is kind of significant to me.&lt;br /&gt;&lt;br /&gt;Anyway, I bought it for $9800 back in 1995 and it is still running well at 154,000 miles.  I sold it today for $700 (thanks to &lt;a href="http://www.craigslist.org/"&gt;craigslist&lt;/a&gt;!).  That means, excepting gas and maintenance costs, the depreciation  was $9100 over 12 years or approximately $760/year.  Given that the car got 32 miles to the gallon new and has lately been averaging around 29, it even got good gas mileage (by today's low standards, anyways).&lt;br /&gt;&lt;br /&gt;In fact, if I assume an average of 30 MPG over the life of the car, and an average of $2.00/gallon, that comes to about $10,300 in fuel costs.  You may think $2.00 a gallon seems low, but a good number of those miles were driven in Virginia, where the price of gas fluctuated between $0.85 and $1.35 before we moved to California.  The price of gas has certainly been higher here in California, but I've been riding &lt;a href="http://www.caltrain.org/"&gt;CalTrain&lt;/a&gt; and/or walking to work since long before the recent surge in gas prices, so I think $2.00 a gallon may be pretty close to our average per-gallon price.&lt;br /&gt;&lt;br /&gt;Ignoring maintenance costs, which weren't extraordinary, that is $19,500 to own and fuel my Ford Escort for just over 12 years.  I'd say it was all around a good purchase.  I certainly won't badmouth Ford cars anymore.  A hybrid will cost you more than that just to own, not to mention fuel costs.&lt;br /&gt;&lt;br /&gt;It certainly didn't turn any heads, but then again, I never once worried about anyone stealing it, dinging it, or hitting it.  In fact, I would say that having a dumpy car has its own value -- in peace of mind.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-7055326368736370979?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/7055326368736370979/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=7055326368736370979' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/7055326368736370979'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/7055326368736370979'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2007/10/sold-my-car.html' title='Sold my car'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_eEUZxnkOyLo/RwxAuIjl4TI/AAAAAAAAABQ/b9y_T24sXbY/s72-c/DSC00187.jpg' height='72' width='72'/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-2783355910607671318</id><published>2007-10-02T11:53:00.000-07:00</published><updated>2007-10-02T23:53:14.968-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rants'/><title type='text'>The price of spam</title><content type='html'>Like anyone, I get lots of spam.  Having kept the same e-mail address since 1995 and having that e-mail address posted all over the web may contribute to absolutely inordinate amount of spam I receive.  I get over 1000 pieces of spam mail a day.&lt;br /&gt;&lt;br /&gt;To make matters worse, I run my own mail server on a &lt;a href="http://www.soekris.com/net4801.htm"&gt;Soekris 4801&lt;/a&gt; at home.  I use &lt;a href="http://www.postfix.org/"&gt;postfix&lt;/a&gt; running on &lt;a href="http://www.freebsd.org/"&gt;FreeBSD&lt;/a&gt; 6.2 with &lt;a href="http://spamassassin.apache.org/"&gt;SpamAssassin&lt;/a&gt; to identify spam.  My spam situation is desperate, so anything that looks remotely like spam gets immediately sent to the bit bucket.  Still, over 50 spam mail a day make it to my Inbox.&lt;br /&gt;&lt;br /&gt;My Soekris box is my mail server, file server, firewall, and PPPoE tunnel end-point (for my DSL connection).  I also run a low-traffic &lt;a href="http://www.posi.net/"&gt;web site&lt;/a&gt; off the box.  That said, between pppd, the postfix and spamd processes, receiving and processing spam consumes almost 100% of the CPU all day, every day.  My load average rarely dips below 1.0 and, at the heaviest times, the inbound mail queue grows to a few hundred messages.&lt;br /&gt;&lt;br /&gt;Now, this isn't the fastest machine in the world.  But when I started my first ISP back in 1995, we ran dozens of web sites (admittedly, mostly static content) off a single 100Mhz Pentium server with 128MB of RAM.  Our entire 27000+ newgroup Usenet feed was hosted on another 100MHz Pentium server, also with 128MB of RAM.  But in 2007, I'm here to tell you that it takes a 266Mhz Pentium-class machine (with the same 128MB of RAM) running 24/7 just to deliver mail for two e-mail accounts.&lt;br /&gt;&lt;br /&gt;So I can tell you personally that the price of spam in 2007 is roughly one &lt;a href="http://www.soekris.com/net4801.htm"&gt;Soekris 4801&lt;/a&gt; plus disk space.  It may not seem like much in comparison to today's top-of-the-line computers, but it is enough to make me sick just thinking about.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-2783355910607671318?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/2783355910607671318/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=2783355910607671318' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/2783355910607671318'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/2783355910607671318'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2007/10/price-of-spam.html' title='The price of spam'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-2541648116375966841</id><published>2007-09-21T18:46:00.000-07:00</published><updated>2007-09-21T19:02:44.682-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='life'/><title type='text'>Moving to Tokyo</title><content type='html'>If anyone reads my blog, they would have noticed that I haven't posted any good programming tidbits here in a while.  The reason is that I've been busy making arrangements for my move to Japan.&lt;br /&gt;&lt;br /&gt;Next month (October 16th to be exact), my wife and I are moving to Tokyo where I will start my new job at &lt;a href="http://www.ntt.com/"&gt;NTT Communications&lt;/a&gt;' &lt;a href="http://maps.google.co.jp/maps?f=q&amp;amp;hl=ja&amp;amp;geocode=&amp;amp;time=&amp;amp;date=&amp;amp;ttype=&amp;amp;q=%E3%82%A8%E3%83%8C%E3%83%BB%E3%83%86%E3%82%A3%E3%83%BB%E3%83%86%E3%82%A3%E3%83%BB%E3%82%B3%E3%83%9F%E3%83%A5%E3%83%8B%E3%82%B1%E3%83%BC%E3%82%B7%E3%83%A7%E3%83%B3%E3%82%BA%E3%80%80%E6%97%A5%E6%AF%94%E8%B0%B7&amp;amp;ie=UTF8&amp;amp;z=15&amp;amp;iwloc=A&amp;amp;om=1"&gt;headquarters in Hibiya&lt;/a&gt;.  My last day here at &lt;a href="http://www.nttmcl.com/"&gt;NTT MCL&lt;/a&gt; will be October 5th.&lt;br /&gt;&lt;br /&gt;I've worked at NTT MCL for over 5 and half years, making it the longest I have ever worked at a single company.  I've really enjoyed working at NTT MCL, so I'm a bit sad to leave.  Luckily, my job at NTT Communications will entail further development and maintenance of the servers we developed at NTT MCL for the &lt;a href="http://www.hotspot.ne.jp/"&gt;HOTSPOT&lt;/a&gt; wireless network, so it looks like I'll keep in regular contact with my current co-workers.  By the way, if you find yourself in Tokyo, or just about any major city in Japan, you should purchase a &lt;a href="http://www.hotspot.ne.jp/en/servicemenu/serviceplan.html"&gt;1-day pass for HOTSPOT&lt;/a&gt;.  You get wireless Internet access at &lt;a href="http://www.hotspot.ne.jp/en/servicearea/servicearea.html"&gt;a huge number of locations&lt;/a&gt; for just 500 yen (about 4 dollars).  Having worked on HOTSPOT for over 5 years, I was shocked when I discovered T-Mobile charges $10/day for a similar service in the U.S.&lt;br /&gt;&lt;br /&gt;Also, I can't stress enough how nice of a place NTT MCL is to work at.  There are &lt;a href="http://www.nttmcl.com/careers_opps.php"&gt;lots of positions open&lt;/a&gt;, the work environment is relaxed and relatively low-stress, and you'll get to work on a variety of different projects.  I know I am going to miss working here, but I simply cannot pass up this opportunity to work abroad for a few years.  Hopefully, they'll take me back when I return to the U.S.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-2541648116375966841?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/2541648116375966841/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=2541648116375966841' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/2541648116375966841'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/2541648116375966841'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2007/09/moving-to-tokyo.html' title='Moving to Tokyo'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-7617058750904129962</id><published>2007-09-17T14:00:00.000-07:00</published><updated>2007-09-17T18:27:34.774-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='business'/><title type='text'>Sony getting out of Cell production</title><content type='html'>&lt;a href="http://www.asahi.com/business/update/0915/TKY200709150062.html"&gt;According to Asahi Shinbun&lt;/a&gt;, Sony will be selling their semiconductor production facilities, including those for the production of their &lt;a href="http://en.wikipedia.org/wiki/Cell_microprocessor"&gt;Cell processor&lt;/a&gt;, to Toshiba for approximately 100 billion yen (~870 million dollars).  The sale is expected to happen next spring.  There is speculation that Sony does not foresee new applications for their Cell processor and is seeking to reclaim a large amount of their investment capital.&lt;br /&gt;&lt;br /&gt;Sony's semiconductor subsidiary, Sony Semiconductor, is selling the LSI (Large Scale Integration) facilities in their Nagasaki Technology Center on the island of Kyushu.  Besides being the production facilities for the Cell processor, the plant also makes image processing chips for game devices.&lt;br /&gt;&lt;br /&gt;Sony will continue to develop the Cell processor, but they are reconsidering producing the chips themselves.  Instead, the will be putting their effort into next generation audio/video devices.  In particularly, they intend to put emphasis on the production of CMOS sensors like those used to record images in digital cameras.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-7617058750904129962?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/7617058750904129962/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=7617058750904129962' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/7617058750904129962'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/7617058750904129962'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2007/09/sony-getting-out-of-cell-production.html' title='Sony getting out of Cell production'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-6699612257045028652</id><published>2007-09-03T02:39:00.000-07:00</published><updated>2007-09-03T09:32:34.798-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='fun'/><category scheme='http://www.blogger.com/atom/ns#' term='robots'/><title type='text'>Keepon</title><content type='html'>I saw this last night on a Japanese TV show.  Apparently, a U.S. and Japanese researcher have been working on a little robot called "keepon", experimenting with human interaction.  Here is a short movie demonstrating some basic emotive interaction:&lt;br /&gt;&lt;object height="350" width="425"&gt;&lt;param name="movie" value="http://www.youtube.com/v/ewGk7aKjk7k"&gt;&lt;param name="wmode" value="transparent"&gt;&lt;embed src="http://www.youtube.com/v/ewGk7aKjk7k" type="application/x-shockwave-flash" wmode="transparent" height="350" width="425"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;The American researcher filmed a demo video of the little robot responding to a song by a L.A. band called "Spoon" and uploaded it to YouTube:&lt;br /&gt;&lt;object height="350" width="425"&gt;&lt;param name="movie" value="http://www.youtube.com/v/3g-yrjh58ms"&gt;&lt;param name="wmode" value="transparent"&gt;&lt;embed src="http://www.youtube.com/v/3g-yrjh58ms" type="application/x-shockwave-flash" wmode="transparent" height="350" width="425"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;Apparently, the video was so popular that the band caught notice and contacted the researchers about using the robot in one of their official music videos.  The Japanese researcher appears in the video with the robot (the video was filmed in Tokyo):&lt;br /&gt;&lt;object height="350" width="425"&gt;&lt;param name="movie" value="http://www.youtube.com/v/nPdP1jBfxzo"&gt;&lt;param name="wmode" value="transparent"&gt;&lt;embed src="http://www.youtube.com/v/nPdP1jBfxzo" type="application/x-shockwave-flash" wmode="transparent" height="350" width="425"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;Like probably just about everyone else who has seen the video, I checked to see if I could buy one.  You can't.&lt;br /&gt;&lt;br /&gt;&lt;dl&gt;&lt;dt&gt;&lt;b&gt;Update 2007/09/04 1:30am (JST)&lt;/b&gt;:&lt;/dt&gt;&lt;dd&gt;As with everything else you can think of, Wikipedia already has an &lt;a href="http://en.wikipedia.org/wiki/Keepon"&gt;entry about Keepon&lt;/a&gt;.  Sometimes I wonder why I bother writing anything.  You could replace my entire blog with nothing but links to Wikipedia articles. :)&lt;/dd&gt;&lt;br /&gt;&lt;/dl&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-6699612257045028652?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/6699612257045028652/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=6699612257045028652' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/6699612257045028652'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/6699612257045028652'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2007/09/keepon.html' title='Keepon'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-2378610872048458979</id><published>2007-09-02T18:52:00.000-07:00</published><updated>2007-09-02T22:42:01.897-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>Python: Reconstructing datetimes from strings</title><content type='html'>Previously, I posted a small snippet for &lt;a href="http://kbyanc.blogspot.com/2007/08/python-reconstructing-timedeltas-from.html"&gt;converting the &lt;code&gt;str()&lt;/code&gt; representation of a python &lt;kbd&gt;timedelta&lt;/kbd&gt; object&lt;/a&gt; back to its equivalent object.  This time I'm going to address doing the same for &lt;kbd&gt;datetime&lt;/kbd&gt; objects:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;def parseDateTime(s):&lt;br /&gt;    """Create datetime object representing date/time&lt;br /&gt;       expressed in a string&lt;br /&gt;    &lt;br /&gt;    Takes a string in the format produced by calling str()&lt;br /&gt;    on a python datetime object and returns a datetime&lt;br /&gt;    instance that would produce that string.&lt;br /&gt;&lt;br /&gt;    Acceptable formats are: "YYYY-MM-DD HH:MM:SS.ssssss+HH:MM",&lt;br /&gt;                            "YYYY-MM-DD HH:MM:SS.ssssss",&lt;br /&gt;                            "YYYY-MM-DD HH:MM:SS+HH:MM",&lt;br /&gt;                            "YYYY-MM-DD HH:MM:SS"&lt;br /&gt;    Where ssssss represents fractional seconds.  The timezone&lt;br /&gt;    is optional and may be either positive or negative&lt;br /&gt;    hours/minutes east of UTC.&lt;br /&gt;    """&lt;br /&gt;    if s is None:&lt;br /&gt;        return None&lt;br /&gt;    # Split string in the form 2007-06-18 19:39:25.3300-07:00&lt;br /&gt;    # into its constituent date/time, microseconds, and&lt;br /&gt;    # timezone fields where microseconds and timezone are&lt;br /&gt;    # optional.&lt;br /&gt;    m = re.match(r'(.*?)(?:\.(\d+))?(([-+]\d{1,2}):(\d{2}))?$',&lt;br /&gt;                 str(s))&lt;br /&gt;    datestr, fractional, tzname, tzhour, tzmin = m.groups()&lt;br /&gt;&lt;br /&gt;    # Create tzinfo object representing the timezone&lt;br /&gt;    # expressed in the input string.  The names we give&lt;br /&gt;    # for the timezones are lame: they are just the offset&lt;br /&gt;    # from UTC (as it appeared in the input string).  We&lt;br /&gt;    # handle UTC specially since it is a very common case&lt;br /&gt;    # and we know its name.&lt;br /&gt;    if tzname is None:&lt;br /&gt;        tz = None&lt;br /&gt;    else:&lt;br /&gt;        tzhour, tzmin = int(tzhour), int(tzmin)&lt;br /&gt;        if tzhour == tzmin == 0:&lt;br /&gt;            tzname = 'UTC'&lt;br /&gt;        tz = FixedOffset(timedelta(hours=tzhour,&lt;br /&gt;                                   minutes=tzmin), tzname)&lt;br /&gt;&lt;br /&gt;    # Convert the date/time field into a python datetime&lt;br /&gt;    # object.&lt;br /&gt;    x = datetime.strptime(datestr, "%Y-%m-%d %H:%M:%S")&lt;br /&gt;&lt;br /&gt;    # Convert the fractional second portion into a count&lt;br /&gt;    # of microseconds.&lt;br /&gt;    if fractional is None:&lt;br /&gt;        fractional = '0'&lt;br /&gt;    fracpower = 6 - len(fractional)&lt;br /&gt;    fractional = float(fractional) * (10 ** fracpower)&lt;br /&gt;&lt;br /&gt;    # Return updated datetime object with microseconds and&lt;br /&gt;    # timezone information.&lt;br /&gt;    return x.replace(microsecond=int(fractional), tzinfo=tz)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Last time &lt;a href="http://www.oluyede.org/"&gt;Lawrence Oluyede&lt;/a&gt; was kind enough to point out that the &lt;a href="http://labix.org/python-dateutil"&gt;dateutil&lt;/a&gt; module can likely do this and a lot more.  However, I'm trying to stick to modules in the base library.  Of course, it wouldn't be a bad thing if &lt;kbd&gt;dateutil&lt;/kbd&gt; were to make it into the base library....&lt;br /&gt;&lt;br /&gt;Speaking of which, the snipped above relies on the &lt;kbd&gt;FixedOffset&lt;/kbd&gt; &lt;kbd&gt;tzinfo&lt;/kbd&gt; object described in the &lt;a href="http://docs.python.org/lib/datetime-tzinfo.html"&gt;documentation for the &lt;kbd&gt;datetime.tzinfo&lt;/kbd&gt; module&lt;/a&gt;.  Being that the documentation is part of the standard python distribution, I guess you could call that code part of the base library, even if you can't import it. :|&lt;br /&gt;&lt;dl&gt;&lt;br /&gt;&lt;dt&gt;&lt;b&gt;Update 2007/09/03 1:39pm (JST)&lt;/b&gt;:&lt;/dt&gt;&lt;dd&gt;Fix example format examples in doc-string per comment from David Goodger.&lt;/dd&gt;&lt;br /&gt;&lt;/dl&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-2378610872048458979?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/2378610872048458979/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=2378610872048458979' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/2378610872048458979'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/2378610872048458979'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2007/09/python-reconstructing-datetimes-from.html' title='Python: Reconstructing datetimes from strings'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-3878543151467797795</id><published>2007-08-17T18:49:00.000-07:00</published><updated>2007-09-02T19:16:14.600-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='life'/><category scheme='http://www.blogger.com/atom/ns#' term='mac'/><title type='text'>Bought a Mac</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_eEUZxnkOyLo/RsZdYRj5-gI/AAAAAAAAABI/HgZZO9a1Uk0/s1600-h/iMac+010.JPG"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://3.bp.blogspot.com/_eEUZxnkOyLo/RsZdYRj5-gI/AAAAAAAAABI/HgZZO9a1Uk0/s320/iMac+010.JPG" alt="" id="BLOGGER_PHOTO_ID_5099866299655911938" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;My wife and I have been considering buying a new computer for a couple of months now; yesterday we bought a new 24" iMac.  The odd thing is, even though my wife was comfortable on a Mac and I was drawn to the BSD underpinnings, we had decided against getting a Mac largely on the grounds of the expense (and the &lt;a href="http://kbyanc.blogspot.com/2007/04/how-i-didnt-buy-mac.html"&gt;inability to easily uninstall software&lt;/a&gt;).  Instead, we had settled on a small form-factor Dell.  That is, until we visited the Apple Store on University Ave. Sunday afternoon.&lt;br /&gt;&lt;br /&gt;We were in the neighborhood to pick up some prints at Wolf Camera and I wanted to stick my head in the Apple Store to check out the new Aluminum iMacs.  They are gorgeous.  I've never seen a screen quite like it.  But the kicker was when my wife asked whether the $1799 price on the card next to the computer was for the computer we were looking at.&lt;br /&gt;&lt;br /&gt;It wasn't.  We were gawking at the 20" iMac; the placard was for the 24" iMac next to us.  Now that was an impressive machine.   And what was more amazing was that the $1799 price tag was on-par, if not cheaper, than the equivalent Dell desktop we had been considering!  That's right, we could get the gorgeous iMac for the same price as the bland Dell we were planning to buy.&lt;br /&gt;&lt;br /&gt;I have read claims in the past the recent-model Macs were cheaper than equivalent PCs, but there it was staring me in the face.  Just to prove I'm not making this up, I just re-spec'ed the Dell machine we were going to buy to compare it to the Apple machine we did buy.  As of 2007/08/17:&lt;br /&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;th style="vertical-align: top; text-align: left;"&gt;Component&lt;/th&gt;&lt;th style="vertical-align: top; text-align: left;"&gt;Dell Optiplex 745 Small Form Factor&lt;/th&gt;&lt;th style="vertical-align: top; text-align: left;"&gt;Apple iMac 24"&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="vertical-align: top;"&gt;CPU&lt;/td&gt;&lt;td style="vertical-align: top;"&gt;Intel Core 2 Duo Processor E6600 (2.40GHz, 4M, 1066MHz FSB)&lt;/td&gt;&lt;td style="vertical-align: top;"&gt;Intel Core 2 Duo Processor T7700 (2.40GHz, 4M, 800MHz FSB)&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td style="vertical-align: top;"&gt;OS&lt;/td&gt;&lt;td style="vertical-align: top;"&gt;Windows Vista Ultimate, with media, 32 Edition, English&lt;/td&gt;&lt;td style="vertical-align: top;"&gt;Mac OS X v10.4.10 Tiger&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="vertical-align: top;"&gt;Memory&lt;/td&gt;&lt;td style="vertical-align: top;"&gt;1.0GB DDR2 Non-ECC SDRAM, 667MHz, (1DIMM)&lt;/td&gt;&lt;td style="vertical-align: top;"&gt;1.0GB DDR2 Non-ECC PC2-5300 SDRAM, 667MHz, (1SO-DIMM)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="vertical-align: top;"&gt;Hard Disk&lt;/td&gt;&lt;td style="vertical-align: top;"&gt;250GB SATA 3.0Gb/s&lt;/td&gt;&lt;td style="vertical-align: top;"&gt;320GB SATA 7200-rpm&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="vertical-align: top;"&gt;Removable Disc&lt;/td&gt;&lt;td style="vertical-align: top;"&gt;8X Slimline DVD+/-RW&lt;/td&gt;&lt;td style="vertical-align: top;"&gt;Slot-loading 8x SuperDrive (DVD±R DL/DVD±RW/CD-RW)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="vertical-align: top;"&gt;Video Card&lt;/td&gt;&lt;td style="vertical-align: top;"&gt;256MB ATI Radeon X1300PRO&lt;/td&gt;&lt;td style="vertical-align: top;"&gt;256MB (GDDR3) ATI Radeon HD 2600 PRO&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="vertical-align: top;"&gt;Speakers&lt;/td&gt;&lt;td&gt;Dell™ A225 Speakers&lt;/td&gt;&lt;td style="vertical-align: top;"&gt;Built-in stereo speakers&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="vertical-align: top;"&gt;WiFi&lt;/td&gt;&lt;td style="vertical-align: top;"&gt;Linksys WUSB54GC Wireless-G USB Adapter&lt;/td&gt;&lt;td style="vertical-align: top;"&gt;AirPort Extreme wireless networking (802.11n)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="vertical-align: top;"&gt;&lt;b&gt;Price w/o Monitor&lt;/b&gt;&lt;/td&gt;&lt;td style="vertical-align: top;"&gt;$1,198&lt;/td&gt;&lt;td style="vertical-align: top;"&gt;N/A&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="vertical-align: top;"&gt;&lt;b&gt;Display&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;a href="http://accessories.us.dell.com/sna/productdetail.aspx?c=us&amp;l=en&amp;amp;s=dhs&amp;cs=19&amp;amp;sku=320-5647"&gt;UltraSharp 2407WFP-HC 24-inch Widescreen Flat Panel LCD&lt;/a&gt;&lt;br /&gt;$569&lt;/td&gt;&lt;td style="vertical-align: top;"&gt;24-inch widescreen TFT active-matrix LCD&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="vertical-align: top;"&gt;&lt;b&gt;Total&lt;/b&gt;&lt;/td&gt;&lt;td style="vertical-align: top;"&gt;&lt;b&gt;$1,767&lt;/b&gt;&lt;/td&gt;&lt;td style="vertical-align: top;"&gt;&lt;b&gt;$1,799&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Anyway, we left the Apple Store to head over to Fry's to do some shopping.  But while we were at Fry's, my wife looked over at me and "we should get the Mac".  She didn't have to say that twice.  In my 15 years or so in the computer industry, I have never before seen a machine that I really wanted to buy.  So we bought of copy of &lt;a href="http://www.parallels.com/en/products/desktop/"&gt;Parallels Desktop&lt;/a&gt; at Fry's and headed back over to the Apple Store.&lt;br /&gt;&lt;br /&gt;Unfortunately, we were too late.  They close at 6:00pm on Sundays.  We tried again Monday night but both the University Ave. and Stanford Shopping Center stores were sold out of the 24" iMacs.  We went ahead and ordered on on-line, but we were going to have to wait two weeks for it to even be shipped.  So yesterday morning we made it up to the University Ave. store at 10:15am (they open at 10:00am) and bought the last 24" model in that day's shipment.  That's right: sold out in 15 minutes.  Needless to say, we cancelled our on-line order.&lt;br /&gt;&lt;br /&gt;I was up to 4:00am last night setting up Parallels to run Win2k for some of our old software (namely, Microsoft Money and our favorite game: &lt;a href="http://www.settlers3.com/gindex.htm"&gt;Settlers 3&lt;/a&gt;), installing Firefox and Thunderbird, importing our photos into iPhoto, etc.  That screen is simply awesome.  I don't think I've had this much fun since I was a kid.  Certainly not with a computer.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-3878543151467797795?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/3878543151467797795/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=3878543151467797795' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/3878543151467797795'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/3878543151467797795'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2007/08/bought-mac.html' title='Bought a Mac'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_eEUZxnkOyLo/RsZdYRj5-gI/AAAAAAAAABI/HgZZO9a1Uk0/s72-c/iMac+010.JPG' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-8939466678830967447</id><published>2007-08-16T14:56:00.000-07:00</published><updated>2007-10-02T23:59:45.659-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='meta'/><title type='text'>License for code posted on my blog</title><content type='html'>It occurred to me that while many people post code on their blogs, they seldom grant anyone else license to use their code.  Google encourages their BlogSpot users to mark their posts with the Creative Commons License, but does not enforce users to do so nor do many blogs I've seen follow this recommendation.  Now, the poster may know they have no intent to sue anyone over the use of their snippet, but how can the reader be sure?&lt;br /&gt;&lt;br /&gt;To address the problem, I'm hereby declaring that all code posted on my blog (kbyanc.blogspot.com) is covered by the license below unless otherwise indicated in the body of the post itself:&lt;br /&gt;&lt;pre&gt;&lt;small&gt;Copyright (c) 2007, Kelly Yancey&lt;br /&gt;&lt;br /&gt;Permission is hereby granted, free of charge, to any person obtaining a copy&lt;br /&gt;of this software and associated documentation files (the "Software"), to deal&lt;br /&gt;in the Software without restriction, including without limitation the rights&lt;br /&gt;to use, copy, modify, merge, publish, distribute, sublicense, and/or sell&lt;br /&gt;copies of the Software, and to permit persons to whom the Software is&lt;br /&gt;furnished to do so, subject to the following conditions:&lt;br /&gt;&lt;br /&gt;The above copyright notice and this permission notice shall be included in&lt;br /&gt;all copies or substantial portions of the Software.&lt;br /&gt;&lt;br /&gt;THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR&lt;br /&gt;IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,&lt;br /&gt;FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE&lt;br /&gt;AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER&lt;br /&gt;LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,&lt;br /&gt;OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN&lt;br /&gt;THE SOFTWARE.&lt;br /&gt;&lt;/small&gt;&lt;/pre&gt;&lt;br /&gt;I hope that others will follow suite and clarify the license terms of use for content posted on their blogs too.  Use a different license if you like (it is your code after all), but don't be fooled into thinking that simply posting code on your blog makes it open source.&lt;br /&gt;&lt;br /&gt;And before someone writes that I should just declare the code to be public domain, I should point out that &lt;a href="http://linuxmafia.com/faq/Licensing_and_Law/public-domain.html"&gt;you can't do that&lt;/a&gt; (at least it probably won't become public domain until I'm so long dead that the idea of using the code I posted at the turn of the century seems quaint).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-8939466678830967447?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/8939466678830967447/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=8939466678830967447' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/8939466678830967447'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/8939466678830967447'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2007/08/license-for-code-posted-on-my-blog.html' title='License for code posted on my blog'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-2480498717362215810</id><published>2007-08-15T12:14:00.000-07:00</published><updated>2007-08-15T13:38:06.660-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>Python: Reconstructing timedeltas from strings</title><content type='html'>For some reason, the date/time objects implemented by the &lt;a href="http://docs.python.org/lib/module-datetime.html"&gt;&lt;kbd&gt;datetime&lt;/kbd&gt; module&lt;/a&gt; have no methods to construct them from their own string representations (as returned by calling &lt;code&gt;str()&lt;/code&gt; or &lt;code&gt;unicode()&lt;/code&gt; on the objects).  It so happens that reconstructing a &lt;a href="http://docs.python.org/lib/datetime-timedelta.html"&gt;&lt;kbd&gt;timedelta&lt;/kbd&gt;&lt;/a&gt; from its string representation can be implemented using a relatively simple regular expression:&lt;br /&gt;&lt;pre&gt;import re&lt;br /&gt;from datetime import timedelta&lt;br /&gt;&lt;br /&gt;def parseTimeDelta(s):&lt;br /&gt;    """Create timedelta object representing time delta&lt;br /&gt;       expressed in a string&lt;br /&gt;   &lt;br /&gt;    Takes a string in the format produced by calling str() on&lt;br /&gt;    a python timedelta object and returns a timedelta instance&lt;br /&gt;    that would produce that string.&lt;br /&gt;   &lt;br /&gt;    Acceptable formats are: "X days, HH:MM:SS" or "HH:MM:SS".&lt;br /&gt;    """&lt;br /&gt;    if s is None:&lt;br /&gt;        return None&lt;br /&gt;    d = re.match(&lt;br /&gt;            r'((?P&amp;lt;days&amp;gt;\d+) days, )?(?P&amp;lt;hours&amp;gt;\d+):'&lt;br /&gt;            r'(?P&amp;lt;minutes&amp;gt;\d+):(?P&amp;lt;seconds&amp;gt;\d+)',&lt;br /&gt;            str(s)).groupdict(0)&lt;br /&gt;    return timedelta(**dict(( (key, int(value))&lt;br /&gt;                              for key, value in d.items() )))&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;But the other types are not quite so easy.  Next time, I'll post my implementation for reconstructing datetime objects from their string representation.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-2480498717362215810?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/2480498717362215810/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=2480498717362215810' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/2480498717362215810'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/2480498717362215810'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2007/08/python-reconstructing-timedeltas-from.html' title='Python: Reconstructing timedeltas from strings'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-4302322532584380898</id><published>2007-08-07T00:04:00.000-07:00</published><updated>2007-08-16T19:11:06.411-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jobs'/><title type='text'>NTTMCL hiring again</title><content type='html'>I guess it comes as no surprise since it seems like everyone is hiring these days, but &lt;a href="http://www.nttmcl.com/careers_opps.php"&gt;NTTMCL is hiring again&lt;/a&gt;.  Of particular interest (to me at least, since it is replacing my position) is the Unix Kernel Developer.  I know, you wouldn't know it from my blog posts, but originally I was hired as a&lt;a href="http://www.freebsd.org/cgi/search.cgi?words=kbyanc&amp;max=500&amp;amp;sort=date&amp;index=all&amp;amp;source=cvs-all"&gt; FreeBSD kernel developer&lt;/a&gt;.  Since I am being transferred to Tokyo in a couple of months, and they don't really have the infrastructure in the office over there for kernel development, NTTMCL is hiring a kernel developer to replace me here in the Bay Area.&lt;br /&gt;&lt;br /&gt;I don't know who wrote the job description, but there appear to be some typographical errors in it.  For example, "enhanced 3 switch" should probably read "enhanced layer 3 switch" and "stabilize the developed wireless network system" should probably be "stabilize the existing wireless network system".  Did I mention that &lt;a href="http://www.nttmcl.com/about.php"&gt;NTTMCL is a subsidiary of a Japanese company&lt;/a&gt;? We have lots of non-native speakers.&lt;br /&gt;&lt;br /&gt;Anyway, besides the kernel developer position, we also have &lt;a href="http://www.nttmcl.com/careers_opps_details.php?jobNumber=3SEC07"&gt;a position open&lt;/a&gt; in our &lt;a href="http://www.nttmcl.com/sol_security.php"&gt;security research group&lt;/a&gt;, and two positions in our IP technologies group (formerly the IPv6 group) [&lt;a href="http://www.nttmcl.com/careers_opps_details.php?jobNumber=2SOF07"&gt;1&lt;/a&gt;, &lt;a href="http://www.nttmcl.com/careers_opps_details.php?jobNumber=3SOF07"&gt;2&lt;/a&gt;].  If you are really into researching and playing with the latest hardware, we have &lt;a href="http://www.nttmcl.com/careers_opps_details.php?jobNumber=7ITS07"&gt;a position&lt;/a&gt; in our Business Development group that will get to check out all of the latest gear that &lt;a href="http://www.ntt.com/"&gt;NTT Communications&lt;/a&gt; might be interested in.&lt;br /&gt;&lt;br /&gt;We're a relatively small research and development subsidiary of NTT; currently we have about 35 people, the majority of which are software engineers of some sort.  We have offices in both San Mateo, CA and San Jose, CA.  The work environment is kind of a mix of big-company and startup: we're small and work with many cutting-edge technologies, but our income is stable being that we are a wholly-owned subsidiary of one of the largest ISPs in the world.  There are no stock options, but there are also no 18-hour work days.&lt;br /&gt;&lt;br /&gt;Anyway, I really like it here.  In my 5 and half years here, I've worked on everything from FreeBSD kernel programming low-level networking, and implementing high-performance Un*x daemons (all in C, of course), to perl and embedded perl interpreters, to web application development (both with and without AJAX), to developing GUI-based applications on Windows using python.  If you really like learning and applying new technologies, this is a great place to do so without having to worry about where your next paycheck is coming from.&lt;br /&gt;&lt;br /&gt;If that sounds good to you too, send a copy of your resume to jobs@nttmcl.com.&lt;br /&gt;&lt;dl&gt;&lt;dt&gt;&lt;b&gt;Update 2007/08/16 07:07pm&lt;/b&gt;:&lt;/dt&gt;&lt;dd&gt;I got most of the errors in the job description for the kernel programmer corrected with H.R.; I haven't checked the others, though.  Speaking of which, we're up to seven open positions now.  Bring some friends! :)&lt;/dd&gt;&lt;/dl&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-4302322532584380898?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/4302322532584380898/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=4302322532584380898' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/4302322532584380898'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/4302322532584380898'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2007/08/nttmcl-hiring-again.html' title='NTTMCL hiring again'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-6618503292218046147</id><published>2007-08-06T13:44:00.000-07:00</published><updated>2007-08-07T13:19:48.134-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='web development'/><category scheme='http://www.blogger.com/atom/ns#' term='bugs'/><title type='text'>One-liner to crash IE6</title><content type='html'>A Japanese fellow going by the name &lt;a href="http://d.hatena.ne.jp/Hamachiya2/20070804/browser_crasher"&gt;Hamachiya2&lt;/a&gt; has stumbled upon one line of HTML/CSS code that crashes IE6.  The magic line is:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&amp;lt;style&amp;gt;*{position:relative}&amp;lt;/style&amp;gt;&amp;lt;table&amp;gt;&amp;lt;input&amp;gt;&amp;lt;/table&amp;gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;You can try it yourself at: &lt;a href="http://hamachiya.com/junk/ie_crash.html"&gt;http://hamachiya.com/junk/ie_crash.html&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Of course, if you are running IE6 or anything that embeds IE6 as a component, you can expect it to crash.  All other browsers appear to render the code just fine.&lt;br /&gt;&lt;br /&gt;I think I may have just found a new signature. :)&lt;br /&gt;&lt;br /&gt;&lt;dl&gt;&lt;dt&gt;&lt;b&gt;Update 2007/08/07 01:16pm&lt;/b&gt;:&lt;/dt&gt;&lt;dd&gt;&lt;a href="http://commandline.org.uk/"&gt;Zeth&lt;/a&gt; wrote in that he noticed that &lt;a href="http://commandline.org.uk/2007/how-to-bring-down-internet-explorer-with-six-words/"&gt;IE7 pukes on the same line of HTML&lt;/a&gt;; it just waits until you try to visit a different page before it crashes.&lt;/dd&gt;&lt;br /&gt;&lt;/dl&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-6618503292218046147?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/6618503292218046147/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=6618503292218046147' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/6618503292218046147'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/6618503292218046147'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2007/08/one-liner-to-crash-ie6.html' title='One-liner to crash IE6'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-4622029421918408004</id><published>2007-08-02T23:08:00.000-07:00</published><updated>2007-08-02T23:41:40.490-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>Python: Typed attributes using descriptors</title><content type='html'>A few weeks a saw a post by &lt;a href="http://www.traceback.org/"&gt;David Stanek&lt;/a&gt; on &lt;a href="http://www.planetpython.org/"&gt;Planet Python&lt;/a&gt; regarding &lt;a href="http://www.traceback.org/2007/07/16/experiment-replace-__setattr__-with-a-descriptor/"&gt; using python descriptors to implement typed attributes&lt;/a&gt;.  At the time, I needed something very similar and I've been trying to find something descriptors were good for (besides re-implementing the &lt;code&gt;property&lt;/code&gt; builtin) so I decided to give his trick a try.  The only problem was, I was coding on CalTrain at the time so I couldn't access his blog to reference the code in his post.  The worst part was that I struggled with problems that, as it turns out, were pointed out in the comments to his posting (specifically, attributes implemented via descriptors would erroneously share state between instances of the classes the attributes were assigned to).  By the time I got to the office and could consult David's blog post, this is the implementation I had working:&lt;br /&gt;&lt;pre&gt;from collections import defaultdict&lt;br /&gt;&lt;br /&gt;class TypedAttr(object):&lt;br /&gt;    """Descriptor implementing typed attributes, converting&lt;br /&gt;       assigned values to the given type if necessary&lt;br /&gt;&lt;br /&gt;    Constructed with three parameters: the type of the attribute,&lt;br /&gt;    an initial value for the attribute, and an (optional)&lt;br /&gt;    function for converting values of other types to the desired&lt;br /&gt;    type.&lt;br /&gt;    &lt;br /&gt;    If the converter function is not specified, then the type&lt;br /&gt;    factory is called to perform the conversion.&lt;br /&gt;    """&lt;br /&gt;    __slots__ = ('__type', '__converter', '__value')&lt;br /&gt;    def __init__(self, type, initvalue=None, converter=None):&lt;br /&gt;        if converter is None:&lt;br /&gt;            converter = type&lt;br /&gt;        self.__type = type&lt;br /&gt;        self.__converter = converter&lt;br /&gt;        initvalue = self.convert(initvalue)&lt;br /&gt;        self.__value = defaultdict(lambda: initvalue)&lt;br /&gt;&lt;br /&gt;    def convert(self, value):&lt;br /&gt;        if not isinstance(value, self.__type) \&lt;br /&gt;           and value is not None:&lt;br /&gt;            value = self.__converter(value)&lt;br /&gt;            assert isinstance(value, self.__type) \&lt;br /&gt;                   or value is None&lt;br /&gt;        return value&lt;br /&gt;&lt;br /&gt;    def __get__(self, instance, owner):&lt;br /&gt;        if instance is None:&lt;br /&gt;            return self&lt;br /&gt;        return self.__value[instance]&lt;br /&gt;&lt;br /&gt;    def __set__(self, instance, value):&lt;br /&gt;        self.__value[instance] = self.convert(value)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;With this, I could write my classes like so:&lt;br /&gt;&lt;pre&gt;class Example(object):&lt;br /&gt;    Name = TypedAttr(str)&lt;br /&gt;    Type = TypedAttr(str, "cheezy example")&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Mainly I'm using the typed attributes for data validation in objects populated from values supplied by an untrusted source.  It would be really nice if I could compose descriptors to build more complex managed attributes (sort of like you can with validators in &lt;a href="http://ianbicking.org/"&gt;Ian Bicking&lt;/a&gt;'s &lt;a href="http://formencode.org/"&gt;FormEncode&lt;/a&gt; package).  Then I could make a descriptor, for example, &lt;code&gt;Unsigned&lt;/code&gt; or &lt;code&gt;NotNone&lt;/code&gt; and compose them with &lt;code&gt;TypedAttr&lt;/code&gt; like so:&lt;br /&gt;&lt;pre&gt;class CompositionExample(object):&lt;br /&gt;    Name = TypedAttr(NotNone(str))&lt;br /&gt;    Age = Unsigned(TypedAttr(int))&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;I'll admit I haven't put a whole lot of thought into it yet, but at first glance it appears that it would be impossible to compose descriptors in python.  I would love to be proven wrong.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-4622029421918408004?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/4622029421918408004/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=4622029421918408004' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/4622029421918408004'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/4622029421918408004'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2007/08/python-typed-attributes-using.html' title='Python: Typed attributes using descriptors'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-3965975858508952585</id><published>2007-07-23T00:41:00.000-07:00</published><updated>2007-07-27T15:36:16.854-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='benchmarks'/><title type='text'>Python: Serializer benchmarks</title><content type='html'>I am working on a project in which clients will be submitting more data than my current server implementation knows what to do with.  The reason the current implementation doesn't use all of the submitted data is that I don't yet know what the quality of the data will be until the client is deployed in the wild.  I want to record all of the submitted data, though, in the expectation that a future implementation will be able to use it.  So I was considering formats for logging the submitted data such that it would be easy to parse in the future.&lt;br /&gt;&lt;br /&gt;Since I'm already storing a subset of the submitted data in a database, the most obvious solution is to make a table of submissions which has a column for each submitted data element.  However, it turns out that this is quite slow and given that I'm not sure how much of the extra data I'll ever need or when I may update the server implementation to use it, I hate to pay a hefty price to store it now.  For now, I can consider the data write-only.  If and when I need to use that data, then I can write an import script that updates the server database using the saved data.&lt;br /&gt;&lt;br /&gt;So I've been considering simply logging the submissions to a file.  It is considerably faster to append to a flat file than it is to write to a database -- which makes sense since the database supports read/write access, whereas I only need write-only access for now.&lt;br /&gt;&lt;br /&gt;The next question is what format to write the data to the log file.  I have a python dictionary of the submitted data; at first I considered writing the dictionary to the log file in JSON format.  The JSON format is relatively easy to convert to/from python data structures and python has quality implementations to do it.  Furthermore, unlike the pickle text format, it is trivial to visually interpret the serialized data.  This latter point is also important to me since I need to be able to judge the quality of the data in order to discern what portions I can use in the future.&lt;br /&gt;&lt;br /&gt;However, to my chagrin, it turns out that the JSON module I have been using, &lt;a href="http://undefined.org/python/#simplejson"&gt;simplejson&lt;/a&gt;, is slower than I had imagined.  Profiling of my server implementation found that, after the database update logic, serializing the submitted data into JSON format was my second largest consumer of CPU cyles.  I hate the thought of wasting so much time logging the data when it is an operation that is essentially pure overhead.&lt;br /&gt;&lt;br /&gt;Hence I started considering other serialization formats, benchmarking them as I went.  Here are the results of my benchmarks:&lt;br /&gt;&lt;br /&gt;&lt;table border="0"&gt;&lt;br /&gt;&lt;tbody&gt;&lt;tr&gt;&lt;th style="text-align: left"&gt;Serializer&lt;/th&gt;&lt;th style="text-align: right"&gt;Run 1 (secs)&lt;/th&gt;&lt;th style="text-align: right"&gt;Run 2 (secs)&lt;/th&gt;&lt;th style="text-align: right"&gt;Mean (secs)&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;pyYAML 3.05&lt;/td&gt;&lt;td style="text-align: right"&gt;21953.18&lt;/td&gt;&lt;td style="text-align: right"&gt;25482.61&lt;/td&gt;&lt;td style="text-align: right"&gt;23717.89&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;pySyck 0.61.2&lt;/td&gt;&lt;td style="text-align: right"&gt;3107.06&lt;/td&gt;&lt;td style="text-align: right"&gt;2805.38&lt;/td&gt;&lt;td style="text-align: right"&gt;2956.22&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;pprint&lt;/td&gt;&lt;td style="text-align: right"&gt;2364.91&lt;/td&gt;&lt;td style="text-align: right"&gt;2368.42&lt;/td&gt;&lt;td style="text-align: right"&gt;2366.67&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;pickle&lt;/td&gt;&lt;td style="text-align: right"&gt;1509.31&lt;/td&gt;&lt;td style="text-align: right"&gt;1665.16&lt;/td&gt;&lt;td style="text-align: right"&gt;1587.23&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;pickle/protocol=2&lt;/td&gt;&lt;td style="text-align: right"&gt;1359.40&lt;/td&gt;&lt;td style="text-align: right"&gt;1330.71&lt;/td&gt;&lt;td style="text-align: right"&gt;1345.05&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;simplejson 1.7.1&lt;/td&gt;&lt;td style="text-align: right"&gt;710.78&lt;/td&gt;&lt;td style="text-align: right"&gt;604.13&lt;/td&gt;&lt;td style="text-align: right"&gt;657.46&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;cPickle&lt;/td&gt;&lt;td style="text-align: right"&gt;159.27&lt;/td&gt;&lt;td style="text-align: right"&gt;172.26&lt;/td&gt;&lt;td style="text-align: right"&gt;165.77&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;repr&lt;/td&gt;&lt;td style="text-align: right"&gt;73.50&lt;/td&gt;&lt;td style="text-align: right"&gt;77.24&lt;/td&gt;&lt;td style="text-align: right"&gt;75.37&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;cjson 1.0.3&lt;/td&gt;&lt;td style="text-align: right"&gt;63.94&lt;/td&gt;&lt;td style="text-align: right"&gt;74.28&lt;/td&gt;&lt;td style="text-align: right"&gt;69.11&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;cPickle/protocol=2&lt;/td&gt;&lt;td style="text-align: right"&gt;50.97&lt;/td&gt;&lt;td style="text-align: right"&gt;57.72&lt;/td&gt;&lt;td style="text-align: right"&gt;54.34&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;marshal&lt;/td&gt;&lt;td style="text-align: right"&gt;12.52&lt;/td&gt;&lt;td style="text-align: right"&gt;13.32&lt;/td&gt;&lt;td style="text-align: right"&gt;12.92&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;All numbers were obtained using the &lt;a href="http://docs.python.org/lib/module-timeit.html"&gt;timeit&lt;/a&gt; module to serialize the dictionary created by the expression "&lt;code&gt;dict([ (str(n), n) for n in range(100) ])&lt;/code&gt;".&lt;br /&gt;The tests were run under Python 2.5 (r25:51908, Mar  3 2007, 15:40:46) built using [GCC 3.4.6 [FreeBSD] 20060305] on freebsd6.  The &lt;a href="http://undefined.org/python/#simplejson"&gt;simplejson&lt;/a&gt;, &lt;a href="http://python.cx.hu/python-cjson/"&gt;cjson&lt;/a&gt;, &lt;a href="http://www.pyyaml.org/wiki/PyYAML"&gt;pyYAML&lt;/a&gt;, and &lt;a href="http://www.pyyaml.org/wiki/PySyck"&gt;pySyck&lt;/a&gt; modules were installed from their respective FreeBSD ports (I had to update the FreeBSD pySyck port to install 0.61.2 since it otherwise installs 0.55).&lt;br /&gt;&lt;br /&gt;I guess I should not have been surprised, but it turns out that simply calling &lt;code&gt;repr()&lt;/code&gt; on the dictionary is almost 9 times faster than calling &lt;code&gt;simplejson.dumps()&lt;/code&gt;.  In fact, taking &lt;code&gt;repr()&lt;/code&gt; as a baseline (100%), I calculated how long each of the other serializers took relative to &lt;code&gt;repr()&lt;/code&gt;:&lt;br /&gt;&lt;br /&gt;&lt;table border="0"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;th style="text-align: left"&gt;Serializer&lt;/th&gt;&lt;th style="text-align: right"&gt;Mean (secs)&lt;/th&gt;&lt;th  style="text-align: right"&gt;Relative to Baseline&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;pyYAML 3.05&lt;/td&gt;&lt;td style="text-align: right"&gt;23717.89&lt;/td&gt;&lt;td style="text-align: right"&gt;31469%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;pySyck 0.61.2&lt;/td&gt;&lt;td style="text-align: right"&gt;2956.22&lt;/td&gt;&lt;td style="text-align: right"&gt;3922%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;pprint&lt;/td&gt;&lt;td style="text-align: right"&gt;2366.67&lt;/td&gt;&lt;td style="text-align: right"&gt;3140%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;pickle&lt;/td&gt;&lt;td style="text-align: right"&gt;1587.23&lt;/td&gt;&lt;td style="text-align: right"&gt;2106%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;pickle/protocol=2&lt;/td&gt;&lt;td style="text-align: right"&gt;1345.05&lt;/td&gt;&lt;td style="text-align: right"&gt;1785%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;simplejson 1.7.1&lt;/td&gt;&lt;td style="text-align: right"&gt;657.46&lt;/td&gt;&lt;td style="text-align: right"&gt;872%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;cPickle&lt;/td&gt;&lt;td style="text-align: right"&gt;165.77&lt;/td&gt;&lt;td style="text-align: right"&gt;220%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;repr&lt;/td&gt;&lt;td style="text-align: right"&gt;75.37&lt;/td&gt;&lt;td style="text-align: right"&gt;100%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;cjson 1.0.3&lt;/td&gt;&lt;td style="text-align: right"&gt;69.11&lt;/td&gt;&lt;td style="text-align: right"&gt;91.7%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;cPickle/protocol=2&lt;/td&gt;&lt;td style="text-align: right"&gt;54.34&lt;/td&gt;&lt;td style="text-align: right"&gt;72.1%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;marshal&lt;/td&gt;&lt;td style="text-align: right"&gt;12.92&lt;/td&gt;&lt;td style="text-align: right"&gt;17.1%&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;The numbers in the last column are how much longer it took to serialize the test dictionary using the given serializer than it was using &lt;code&gt;repr()&lt;/code&gt;.&lt;br /&gt;&lt;br /&gt;So now I'm thinking of sticking with JSON as my log format, but using the &lt;a href="http://python.cx.hu/python-cjson/"&gt;cjson&lt;/a&gt; module rather than simplejson.  cPickle's latest binary format (protocol=2) is even faster, but I would lose the ability to visually scan the log file to get a feel for the quality of the data I'm not currently using.&lt;br /&gt;&lt;br /&gt;Now, before I get a horde of comments I should point out that I am aware that simplejson has an optional C speedups module.  Unfortunately, it does not appear to be installed by default on either FreeBSD (my server) or on Windows (my current client).  I wouldn't be the least bit surprised if the C version of simplejson is just as fast as the cjson module, but it doesn't matter if it isn't installed.  As such, it looks like I'll be switching to &lt;a href="http://python.cx.hu/python-cjson/"&gt;cjson&lt;/a&gt; for my JSON serialization needs from now on.&lt;br /&gt;&lt;br /&gt;&lt;dl&gt;&lt;dt&gt;&lt;b&gt;Update 2007/07/25 07:07pm&lt;/b&gt;:&lt;/dt&gt;&lt;dd&gt;In response to &lt;a href="http://www.blogger.com/profile/06899509753521482267"&gt;paddy3118&lt;/a&gt;'s comment, I added benchmarks for the python &lt;kbd&gt;pprint&lt;/kbd&gt; module to the tables above.&lt;/dd&gt;&lt;br /&gt;&lt;dt&gt;&lt;b&gt;Update 2007/07/27 12:26pm&lt;/b&gt;:&lt;/dt&gt;&lt;dd&gt;In response to David Niergarth's comment, I added benchmarks for &lt;a href="http://www.pyyaml.org/wiki/PyYAML"&gt;pyYAML 3.05&lt;/a&gt; and &lt;a href="http://www.pyyaml.org/wiki/PySyck"&gt;pySyck 0.61.2&lt;/a&gt;.&lt;br /&gt;&lt;/dl&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-3965975858508952585?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/3965975858508952585/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=3965975858508952585' title='12 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/3965975858508952585'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/3965975858508952585'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2007/07/python-serializer-benchmarks.html' title='Python: Serializer benchmarks'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>12</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4637631607249418081.post-7759556881363599590</id><published>2007-07-22T16:51:00.000-07:00</published><updated>2007-07-22T17:02:44.510-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>Python: Mapping arguments to their default values</title><content type='html'>Using &lt;code&gt;inspect.getargspec&lt;/code&gt; or the &lt;a href="http://kbyanc.blogspot.com/2007/07/python-more-generic-getargspec.html"&gt;&lt;code&gt;getargspec&lt;/code&gt;&lt;/a&gt; implemention in my previous post, we can build a dictionary mapping a callable's argument names to their default values:&lt;br /&gt;&lt;pre&gt;def getargmap(obj, default=None):&lt;br /&gt;    """Get dictionary mapping callable's arguments to their&lt;br /&gt;       default values&lt;br /&gt;&lt;br /&gt;    Arguments without default values in the callable's argument&lt;br /&gt;    specification are mapped to the value given by the default&lt;br /&gt;    argument.&lt;br /&gt;    """&lt;br /&gt;    spec = getargspec(obj)&lt;br /&gt;    argmap = dict.fromkeys(spec[0], default)&lt;br /&gt;    argmap.update(zip(spec[0][-len(spec[3]):], spec[3]))&lt;br /&gt;    return argmap&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4637631607249418081-7759556881363599590?l=kbyanc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbyanc.blogspot.com/feeds/7759556881363599590/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4637631607249418081&amp;postID=7759556881363599590' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/7759556881363599590'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4637631607249418081/posts/default/7759556881363599590'/><link rel='alternate' type='text/html' href='http://kbyanc.blogspot.com/2007/07/python-mapping-arguments-to-their.html' title='Python: Mapping arguments to their default values'/><author><name>Kelly Yancey</name><uri>http://www.blogger.com/profile/08648597728708472240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_eEUZxnkOyLo/TFHhBpaOPqI/AAAAAAAAAGk/ausuuO_vnYs/S220/aaa128.jpg'/></author><thr:total>0</thr:total></entry></feed>
