<?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-4091058576188372264</id><updated>2011-07-29T02:36:30.316-07:00</updated><category term='malapropisms'/><category term='ubuntu'/><category term='python introspection'/><category term='python'/><category term='python appengine'/><category term='pedantry'/><title type='text'>Aleaxity</title><subtitle type='html'>Alex Martelli's musings on Python, Design Patterns, technical management, agile software development, &amp;c</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://aleaxit.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4091058576188372264/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://aleaxit.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Alex</name><uri>http://www.blogger.com/profile/05338312873524129257</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://www.aleax.it/alex.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>20</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4091058576188372264.post-8376975293878522410</id><published>2010-08-05T09:45:00.000-07:00</published><updated>2010-08-05T09:54:04.265-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>ubuntu.stackexchange.com now public!</title><content type='html'>&lt;span class="Apple-style-span" &gt;To be more specific...: &lt;a href="http://ubuntu.stackexchange.com"&gt;http://ubuntu.stackexchange.com&lt;/a&gt; is now in public beta.  Don't worry about the "beta" thingy -- it's &lt;b&gt;public&lt;/b&gt;, which means everybody can read and write there. Great place to ask all of your ubuntu questions -- give it a try!&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4091058576188372264-8376975293878522410?l=aleaxit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aleaxit.blogspot.com/feeds/8376975293878522410/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4091058576188372264&amp;postID=8376975293878522410' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4091058576188372264/posts/default/8376975293878522410'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4091058576188372264/posts/default/8376975293878522410'/><link rel='alternate' type='text/html' href='http://aleaxit.blogspot.com/2010/08/ubuntustackexchangecom-now-public.html' title='ubuntu.stackexchange.com now public!'/><author><name>Alex</name><uri>http://www.blogger.com/profile/05338312873524129257</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://www.aleax.it/alex.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4091058576188372264.post-7530829685580024201</id><published>2010-07-15T08:54:00.000-07:00</published><updated>2010-07-15T09:01:11.498-07:00</updated><title type='text'>Ubuntu's worth a new stack exchange site!</title><content type='html'>...and one has been duly proposed, see it &lt;a href="http://area51.stackexchange.com/proposals/7716/ubuntu?referrer=8BApHxTDNrma9ulpRNYX7g2"&gt;here&lt;/a&gt;.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you use any of the other stack exchange sites (stackoverflow for programming, superuser for general computing questions, serverfault for system administration, etc), and use ubuntu, you'll appreciate the "cross-section" of arguments, where ubuntu-specific questions can be asked without agonizing on whether one is really programming, system administration, or "general";-).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you don't already use stack exchange sites, why not?!-)  Get with the program...!-)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Anyway, you can sign up for the ubuntu site whether you're a seasoned stack exchange user, or a raw newbie -- and, if you &lt;i&gt;are &lt;/i&gt;interested in ubuntu, it's well worth doing do, IMHO.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4091058576188372264-7530829685580024201?l=aleaxit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aleaxit.blogspot.com/feeds/7530829685580024201/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4091058576188372264&amp;postID=7530829685580024201' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4091058576188372264/posts/default/7530829685580024201'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4091058576188372264/posts/default/7530829685580024201'/><link rel='alternate' type='text/html' href='http://aleaxit.blogspot.com/2010/07/ubuntus-worth-new-stack-exchange-site.html' title='Ubuntu&apos;s worth a new stack exchange site!'/><author><name>Alex</name><uri>http://www.blogger.com/profile/05338312873524129257</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://www.aleax.it/alex.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4091058576188372264.post-6091290525954191564</id><published>2010-04-10T14:49:00.001-07:00</published><updated>2010-04-10T14:49:45.800-07:00</updated><title type='text'>Budget Hero</title><content type='html'>&lt;div&gt;Cool game - limited, of course, but infstructive!&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;script type="text/javascript" src="http://widgets.clearspring.com/o/48c6ac61cc951ea7/4bc0f2792dabeef7/48c6ac61cc951ea7/b7ebdfdb/widget.js"&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4091058576188372264-6091290525954191564?l=aleaxit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aleaxit.blogspot.com/feeds/6091290525954191564/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4091058576188372264&amp;postID=6091290525954191564' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4091058576188372264/posts/default/6091290525954191564'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4091058576188372264/posts/default/6091290525954191564'/><link rel='alternate' type='text/html' href='http://aleaxit.blogspot.com/2010/04/budget-hero.html' title='Budget Hero'/><author><name>Alex</name><uri>http://www.blogger.com/profile/05338312873524129257</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://www.aleax.it/alex.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4091058576188372264.post-9134164567749884012</id><published>2010-02-14T11:58:00.001-08:00</published><updated>2010-02-14T12:33:25.813-08:00</updated><title type='text'>In a PIGS' I</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://farm1.static.flickr.com/1/72824_10b087bac3.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 400px; height: 397px;" src="http://farm1.static.flickr.com/1/72824_10b087bac3.jpg" border="0" alt="" /&gt;&lt;/a&gt;"The &lt;a href="http://en.wikipedia.org/wiki/PIGS_(economics)"&gt;PIGS&lt;/a&gt;" is a funny term that's been used for at least a decade to refer to the Mediterranean countries in the EU -- Portugal, Italy, Greece, Spain -- often with a less-than-positive "spin".  Late last year I spotted a change in popular usage -- the "I" often switched to stand for Ireland instead of Italy (thus losing the peculiar Mediterranean connotation and going directly for the meaning of "Euro-economies in trouble") -- occasionally you now see PIIGS (so that both I-countries can be there, but losing the funny-acronym play of course), but when having to choose (to keep the single-I'd PIGS) I see why one might pick Ireland over Italy (it's not as if Italy's doing &lt;i&gt;well&lt;/i&gt;, mind you, but with nominal GDP 2009 vs 2008 Y/Y per &lt;a href="http://en.wikipedia.org/wiki/List_of_European_countries_by_GDP_(nominal)"&gt;IMF data&lt;/a&gt; at -9.7%, vs -10.2% for Portugal and Spain and -15.3% for Ireland, you can kinda see the logic here -- BTW, Greece's theoretical -4.2% looks pretty dubious... as the &lt;a href="http://www.nytimes.com/2010/02/14/world/europe/14greek.html"&gt;NYT&lt;/a&gt; recently wrote, "there are lies, damned lies and Greek statistics";-). I can only find &lt;a href="http://www.allcountries.org/uscensus/1370_per_capita_consumption_of_meat_and.html"&gt;old data&lt;/a&gt; on pork consumption per capita by country, but it looks like, at least 10 years ago, Spain was the highest in the group (64 kg -- way higher than EU average), then Ireland (40.5), Italy (36.3), Portugal (31.1), Greece (22.5)... so maybe this criterion isn't exactly the most useful for the PIGS-classification debate...;-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4091058576188372264-9134164567749884012?l=aleaxit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aleaxit.blogspot.com/feeds/9134164567749884012/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4091058576188372264&amp;postID=9134164567749884012' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4091058576188372264/posts/default/9134164567749884012'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4091058576188372264/posts/default/9134164567749884012'/><link rel='alternate' type='text/html' href='http://aleaxit.blogspot.com/2010/02/in-pigs-i.html' title='In a PIGS&apos; I'/><author><name>Alex</name><uri>http://www.blogger.com/profile/05338312873524129257</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://www.aleax.it/alex.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://farm1.static.flickr.com/1/72824_10b087bac3_t.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4091058576188372264.post-4933682871300130782</id><published>2009-07-18T21:35:00.001-07:00</published><updated>2009-07-18T21:35:05.214-07:00</updated><title type='text'>My Review of GEEK CLOCK</title><content type='html'>&lt;div class="hreview"&gt;&lt;div class="item"&gt;&lt;p&gt;&lt;a href="http://www.uncommongoods.com/item/item.jsp?itemId=18145"&gt; UncommonGoods&lt;/a&gt;&lt;/p&gt;&lt;div&gt;&lt;img src="http://images.powerreviews.com/images_products/04/21/4498917_100.jpg" class="photo" align="left" style="margin: 0 0.5em 0 0"&gt;&lt;p style="margin-top:0"&gt;While everyone else was watching the clock, you were paying attention during math class, storing away square roots and factorials for a day where you could prove your mathematical prowess. Well, my geeky friend, that day has come. Pictured before you is a clock, where all the numerals have been rep...                            &lt;/p&gt;&lt;/div&gt;&lt;a href="http://www.uncommongoods.com/item/item.jsp?itemId=18145" style="display: none;" class="url fn"&gt;&lt;span class="fn"&gt;GEEK CLOCK&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;br clear="left"&gt;&lt;p&gt;&lt;strong class="summary"&gt;Cool way to show off math geekiness!&lt;/strong&gt;&lt;/p&gt;&lt;div&gt; &lt;strong&gt;Alex&lt;/strong&gt;  &lt;strong&gt;Palo Alto, CA&lt;/strong&gt;  &lt;strong&gt;&lt;abbr title="2009718T1200-0800" class="dtreviewed" style="border: none; text-decoration: none;"&gt;7/18/2009&lt;/abbr&gt;&lt;/strong&gt;&lt;/div&gt;&lt;p&gt;&lt;div style="margin: 0.5em 0; height: 15px; width: 83px; background-image: url(http://images.powerreviews.com/images/stars_small.gif); background-position: 0px -144px;" class="prStars prStarsSmall"&gt;&amp;nbsp;&lt;/div&gt;&lt;/p&gt;&lt;div style="display: none"&gt;&lt;span class="rating"&gt;4&lt;/span&gt; 5&lt;/div&gt;&lt;p&gt;&lt;strong&gt;Gift: &lt;/strong&gt;Yes&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Pros: &lt;/strong&gt;Attractive Design, Striking original&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Best Uses: &lt;/strong&gt;Living room, Decoration, Kitchen&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Describe Yourself: &lt;/strong&gt;Budget Shopper&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Primary use: &lt;/strong&gt;Personal&lt;/p&gt;&lt;p style="margin-top:1em" class="description"&gt;I've hanged it up in the living room and just love the way friends and acquaintances do a double take the first time they see it (even if they are serious math geeks themselves). I'm seriously thinking of taking it to the office (or maybe buy another one to keep there -- this one was technically a gift to my wife, an even geekier geek than myself, so I guess I can't just take it to the office;-).&lt;/p&gt;&lt;p style="margin-top:0.5em"&gt;(&lt;a href="http://www.powerreviews.com/legal/terms_of_use.html" rel="license"&gt;&lt;/a&gt;)&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4091058576188372264-4933682871300130782?l=aleaxit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aleaxit.blogspot.com/feeds/4933682871300130782/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4091058576188372264&amp;postID=4933682871300130782' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4091058576188372264/posts/default/4933682871300130782'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4091058576188372264/posts/default/4933682871300130782'/><link rel='alternate' type='text/html' href='http://aleaxit.blogspot.com/2009/07/my-review-of-geek-clock.html' title='My Review of GEEK CLOCK'/><author><name>Alex</name><uri>http://www.blogger.com/profile/05338312873524129257</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://www.aleax.it/alex.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4091058576188372264.post-7838311534011493432</id><published>2009-02-02T07:26:00.001-08:00</published><updated>2009-02-02T07:26:14.878-08:00</updated><title type='text'>priceless...</title><content type='html'>&lt;div style="float: right; margin-left: 10px; margin-bottom: 10px;"&gt;&lt;a href="http://www.flickr.com/photos/dratz/1045336659/" title="photo sharing"&gt;&lt;img src="http://farm2.static.flickr.com/1197/1045336659_e2c01251c6_m.jpg" alt="" style="border: solid 2px #000000;" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-size: 0.9em; margin-top: 0px;"&gt;&lt;a href="http://www.flickr.com/photos/dratz/1045336659/"&gt;feature&lt;/a&gt;&lt;br /&gt;Originally uploaded by &lt;a href="http://www.flickr.com/people/dratz/"&gt;dratz&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;The web is full of cute and/or funny pictures, but once in a while, one really stands out...&lt;br clear="all" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4091058576188372264-7838311534011493432?l=aleaxit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aleaxit.blogspot.com/feeds/7838311534011493432/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4091058576188372264&amp;postID=7838311534011493432' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4091058576188372264/posts/default/7838311534011493432'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4091058576188372264/posts/default/7838311534011493432'/><link rel='alternate' type='text/html' href='http://aleaxit.blogspot.com/2009/02/priceless.html' title='priceless...'/><author><name>Alex</name><uri>http://www.blogger.com/profile/05338312873524129257</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://www.aleax.it/alex.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://farm2.static.flickr.com/1197/1045336659_e2c01251c6_t.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4091058576188372264.post-8146618598408424298</id><published>2008-12-20T09:38:00.001-08:00</published><updated>2008-12-20T09:54:35.054-08:00</updated><title type='text'>Software development is not yellow</title><content type='html'>Best blog post I've read in a long time (and I read a lot!): Chris Dillow's &lt;a href="http://stumblingandmumbling.typepad.com/stumbling_and_mumbling/2008/12/experts-the-demand-for-certainty.html"&gt;Experts and the Demand for Certainty&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;It's a sharp, spot-on, well-reasoned, well-written analysis, &lt;span style="font-weight: bold;"&gt;and&lt;/span&gt; -- it finally explains to me why I've always gotten so much push-back when, as an expert in my field (software development, and the management thereof), I offer "customers" my forecasts in the &lt;span style="font-style: italic;"&gt;right&lt;/span&gt; form.&lt;br /&gt;&lt;br /&gt;By "customers", here, I mean stakeholders of any stripe, including most product managers, top managers, etc -- even other developers, when they look up to me as a manager, mentor, or "senior advisor" figure rather than sensibly interacting with me as a peer!&lt;br /&gt;&lt;br /&gt;And, the &lt;span style="font-weight: bold;"&gt;right&lt;/span&gt; form of forecast is always going to be expressed something like "X plus or minus Y" (or equivalently "between Z and T", where Z=X-Y and T=X+Y), accurately and explicitly expressing the margin of error that &lt;span style="font-style: italic;"&gt;always &lt;/span&gt;accompanies &lt;span style="font-style: italic;"&gt;any&lt;/span&gt; prediction (you can take the "with 95% probability" proviso as implied in any such quantitative expression).&lt;br /&gt;&lt;br /&gt;Here's why I invariably get vehement push-back against expressing forecasts in the only sensible ways: the "customers" don't want from me, the expert, my &lt;span style="font-weight: bold;"&gt;knowledge&lt;/span&gt;; rather, what they want is &lt;span style="font-weight: bold;"&gt;certainty&lt;/span&gt; -- fake, bogus, fraudulent certainty is &lt;span style="font-style: italic;"&gt;so&lt;/span&gt; much better than the messy, error-margin-involving business that's inevitable when you reach towards knowledge of reality:-(.&lt;br /&gt;&lt;br /&gt;Now, this important realization doesn't teach me how to force stakeholders to face reality, but it does help me frame and understand their mindset, and thus helps me predict (&lt;span style="font-style: italic;"&gt;with&lt;/span&gt; some margin of error, to be sure;-) how well or badly various communication strategies will work...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4091058576188372264-8146618598408424298?l=aleaxit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aleaxit.blogspot.com/feeds/8146618598408424298/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4091058576188372264&amp;postID=8146618598408424298' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4091058576188372264/posts/default/8146618598408424298'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4091058576188372264/posts/default/8146618598408424298'/><link rel='alternate' type='text/html' href='http://aleaxit.blogspot.com/2008/12/software-development-is-not-yellow.html' title='Software development is not yellow'/><author><name>Alex</name><uri>http://www.blogger.com/profile/05338312873524129257</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://www.aleax.it/alex.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4091058576188372264.post-1695896701335483874</id><published>2008-11-20T08:20:00.000-08:00</published><updated>2008-11-20T08:29:31.313-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>Strong types, weakly bound</title><content type='html'>Reading &lt;a href="http://blog.asmartbear.com/blog/strong-opinions-somewhat-weakly-held.html"&gt;Strong opinions, somewhat weakly held&lt;/a&gt; on &lt;a href="http://blog.asmartbear.com/jason-cohen/"&gt;Jason Cohen&lt;/a&gt;'s excellent &lt;a href="http://blog.asmartbear.com/blog/"&gt;A Smart Bear&lt;/a&gt; blog this morning, I was quoting this excellent soundbite (you really need to simplify it down to "strong opinions, weakly held" to make it work as a soundbite) out loud to Anna and musing about it -- and exactly at the same time she and I chorused about the analogy this has with Python's approach to typing... objects with strong, precise types, but "weakly held" (i.e., weakly bound) via names or slots in containers that might just as well hold objects of other (also strong) types.&lt;br /&gt;&lt;br /&gt;This analogy may actually be the least "obvious" thing she and I found ourselves "chorusing" about, though such "choruses" happen more and more often and so it's becoming hard to tell;-).  Anyway, I'll be sure to use this next time I need to present Python's typing approach -- now if I can only find a way to work ducks into it, too...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4091058576188372264-1695896701335483874?l=aleaxit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aleaxit.blogspot.com/feeds/1695896701335483874/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4091058576188372264&amp;postID=1695896701335483874' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4091058576188372264/posts/default/1695896701335483874'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4091058576188372264/posts/default/1695896701335483874'/><link rel='alternate' type='text/html' href='http://aleaxit.blogspot.com/2008/11/strong-types-weakly-bound.html' title='Strong types, weakly bound'/><author><name>Alex</name><uri>http://www.blogger.com/profile/05338312873524129257</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://www.aleax.it/alex.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4091058576188372264.post-4860866643624147580</id><published>2008-11-19T07:53:00.000-08:00</published><updated>2008-11-19T08:07:48.127-08:00</updated><title type='text'>Get your blog typealyzed!</title><content type='html'>&lt;div&gt;Fun URL to try: &lt;a href="http://www.typealyzer.com/"&gt;Typealizer&lt;/a&gt; (HT &lt;a href="http://gregmankiw.blogspot.com/2008/11/this-is-your-brain-blogging.html"&gt;Greg Mankiw&lt;/a&gt;).&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;What Typealizer has to say about Aleaxity (quoted verbatim, including punctuation/grammar errors and typoes)...:&lt;/div&gt;&lt;div&gt;"""&lt;/div&gt;The analysis indicates that the author of http://aleaxit.blogspot.com is of the type:&lt;br /&gt;ISTP - The Mechanics&lt;br /&gt;[ISTP]&lt;br /&gt;The independent and problem-solving type. They are especially attuned to the demands of the moment are masters of responding to challenges that arise spontaneously. They generelly prefer to think things out for themselves and often avoid inter-personal conflicts.&lt;br /&gt;&lt;br /&gt;The Mechanics enjoy working together with other independent and highly skilled people and often like seek fun and action both in their work and personal life. They enjoy adventure and risk such as in driving race cars or working as policemen and firefighters.&lt;br /&gt;"""&lt;div&gt;The "enjoy adventure and risk" is as off-base as it could possibly be (if anything, I enjoy &lt;span class="Apple-style-span" style="font-style: italic;"&gt;reducing and controlling&lt;/span&gt; risks and adventures by carefully and prudently balancing solid architectures, sound methodologies, best practices, ...), but other bits do appear rather spot-on;-).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4091058576188372264-4860866643624147580?l=aleaxit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aleaxit.blogspot.com/feeds/4860866643624147580/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4091058576188372264&amp;postID=4860866643624147580' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4091058576188372264/posts/default/4860866643624147580'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4091058576188372264/posts/default/4860866643624147580'/><link rel='alternate' type='text/html' href='http://aleaxit.blogspot.com/2008/11/get-your-blog-typealyzed.html' title='Get your blog typealyzed!'/><author><name>Alex</name><uri>http://www.blogger.com/profile/05338312873524129257</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://www.aleax.it/alex.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4091058576188372264.post-4680413604548856624</id><published>2008-11-14T18:41:00.000-08:00</published><updated>2008-11-16T17:05:27.442-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>Python tips: pickling it right</title><content type='html'>Here's an often-seen Python snippet...:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;pickle.dump(stuff, open('foo.pik', 'w'))&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;What's wrong with this?  Well, &lt;span style="font-weight: bold;"&gt;several&lt;/span&gt; things, as it turns out...!&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Use &lt;tt&gt;cPickle&lt;/tt&gt;, not &lt;tt&gt;pickle&lt;/tt&gt;: that will speed things up by 5 or 6 times, effortlessly.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;The common, sloppy use of &lt;tt&gt;open&lt;/tt&gt; without a corresponding &lt;tt&gt;close&lt;/tt&gt; is theoretically OK in today's cPython, but there's really no good reason to support it.  Be neat instead, and write (after a &lt;tt&gt;from __future__ import with_statement&lt;/tt&gt; if you're still using Python 2.5):&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;with open('foo.pik', 'w') as f:&lt;br /&gt; cPickle.dump(stuff, f)&lt;br /&gt;&lt;/pre&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Unless there's a very special reason to make you want the pickle dump to be in ASCII (and I've hardly ever seen a good one), &lt;span style="font-weight: bold;"&gt;don't&lt;/span&gt; just use pickle's default, legacy protocol!  Rather, explicitly request protocol 2, or better still, unless you need pickle files loadable by older releases of Python, request "the best protocol available".&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;So, the best equivalent of that little sloppy but alas-too-common idiom is:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;with open('foo.pik', 'wb') as f:&lt;br /&gt; cPickle.dump(stuff, f, cPickle.HIGHEST_PROTOCOL)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Don't forget the little &lt;tt&gt;b&lt;/tt&gt; in &lt;tt&gt;'wb'&lt;/tt&gt;, by the way — it won't matter under Linux, OSX, or Solaris, but it &lt;b&gt;will&lt;/b&gt; matter in Windows... and, anyway, as we all know, &lt;span style="font-style: italic;"&gt;explicit is better than implicit&lt;/span&gt;!-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4091058576188372264-4680413604548856624?l=aleaxit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aleaxit.blogspot.com/feeds/4680413604548856624/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4091058576188372264&amp;postID=4680413604548856624' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4091058576188372264/posts/default/4680413604548856624'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4091058576188372264/posts/default/4680413604548856624'/><link rel='alternate' type='text/html' href='http://aleaxit.blogspot.com/2008/11/python-tips-pickling-it-right.html' title='Python tips: pickling it right'/><author><name>Alex</name><uri>http://www.blogger.com/profile/05338312873524129257</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://www.aleax.it/alex.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4091058576188372264.post-552675852511895214</id><published>2008-11-14T14:48:00.000-08:00</published><updated>2008-11-14T16:05:08.871-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python introspection'/><title type='text'>Python: introspecting for generator vs function</title><content type='html'>At Baypiggies yesterday evening, Fernando Perez asked how to tell by introspection whether you're dealing with a "plain old Pythjon-coded function", like, say,&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;def f(): return 1&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;or rather a generator function, like, say,&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;def y(): yield 1&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Apparently, he needs that info to perfect some decorator they're using as part of a nose-based test framework for scipy.&lt;br /&gt;&lt;p&gt;I don't think there's any other way except by looking at the bytecode for Yield vs Return opcodes; so, I jotted down on the spot the quick-and-dirty approach based on that idea:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;import dis, sys&lt;br /&gt;def is_generator(f):&lt;br /&gt;   save_stdout = sys.stdout&lt;br /&gt;   fake_stdout = cStringIO.StringIO()&lt;br /&gt;   try:&lt;br /&gt;       sys.stdout = fake_stdout&lt;br /&gt;       dis.dis(f)&lt;br /&gt;   finally:&lt;br /&gt;       sys.stdout = save_stdout&lt;br /&gt;   return ' YIELD_VALUE ' in fake_stdout.getvalue()&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Of course, this does much more work than necessary (AND can be fooled by a function containing a peculiar string literal... like itself!-) .  So, early this morning, I prepped a somewhat better performing and more solid version:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;import opcode&lt;br /&gt;YIELD_OP = opcode.opmap['YIELD_VALUE']&lt;br /&gt;RETURN_OP = opcode.opmap['RETURN_VALUE']&lt;br /&gt;HAVE_ARG = opcode.HAVE_ARGUMENT&lt;br /&gt;&lt;br /&gt;def isgen(f):&lt;br /&gt;    code = f.func_code.co_code&lt;br /&gt;    n = len(code)&lt;br /&gt;    i = 0&lt;br /&gt;    while i &lt; n:&lt;br /&gt;        op = ord(code[i])&lt;br /&gt;        i += 1&lt;br /&gt;        if op &gt;= HAVE_ARG:&lt;br /&gt;            i += 2&lt;br /&gt;        elif op == YIELD_OP:&lt;br /&gt;            return True&lt;br /&gt;        elif op == RETURN_OP:&lt;br /&gt;            return False&lt;br /&gt;    return False&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Hope this can prove useful to someone else!-)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Alex&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4091058576188372264-552675852511895214?l=aleaxit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aleaxit.blogspot.com/feeds/552675852511895214/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4091058576188372264&amp;postID=552675852511895214' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4091058576188372264/posts/default/552675852511895214'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4091058576188372264/posts/default/552675852511895214'/><link rel='alternate' type='text/html' href='http://aleaxit.blogspot.com/2008/11/python-introspecting-for-generator-vs.html' title='Python: introspecting for generator vs function'/><author><name>Alex</name><uri>http://www.blogger.com/profile/05338312873524129257</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://www.aleax.it/alex.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4091058576188372264.post-5758630703645904137</id><published>2008-11-12T18:32:00.000-08:00</published><updated>2008-11-12T18:42:25.656-08:00</updated><title type='text'></title><content type='html'>Meme spotted on &lt;a href="http://holdenweb.blogspot.com/2008/11/phrase-from-nearest-book.html"&gt;Steve Holden's blog&lt;/a&gt;:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Grab the nearest book.&lt;/li&gt;&lt;li&gt;Open it to page 56.&lt;/li&gt;&lt;li&gt;Find the fifth sentence.&lt;/li&gt;&lt;li&gt;Post the text of the sentence in your journal along with these instructions.&lt;/li&gt;&lt;li&gt;Don’t dig for your favorite book, the cool book, or the intellectual one: pick the CLOSEST.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Closest to me on the couch is Barry Cunliffe's &lt;a href="http://www.amazon.co.uk/Europe-Between-Oceans-9000-1000/dp/0300119232"&gt;Europe Between the Oceans: 9000 BC to AD 1000&lt;/a&gt;, which I just bought and haven't gotten around to reading yet.  5th sentence on p. 56 is: "The fame of early Troy owed much to its command of this favoured location.".  (I got lucky: other sentences around this one, explaining in detail about the bay that is the location in question, and its importance, are way longer;-).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4091058576188372264-5758630703645904137?l=aleaxit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aleaxit.blogspot.com/feeds/5758630703645904137/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4091058576188372264&amp;postID=5758630703645904137' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4091058576188372264/posts/default/5758630703645904137'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4091058576188372264/posts/default/5758630703645904137'/><link rel='alternate' type='text/html' href='http://aleaxit.blogspot.com/2008/11/meme-spotted-on-steve-holdens-blog-grab.html' title=''/><author><name>Alex</name><uri>http://www.blogger.com/profile/05338312873524129257</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://www.aleax.it/alex.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4091058576188372264.post-6947065636883739583</id><published>2008-10-19T17:29:00.000-07:00</published><updated>2008-10-19T18:02:52.700-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='pedantry'/><title type='text'>Carmen: great music, lousy geography</title><content type='html'>My Pedant self can't believe nobody else appears to have noticed this somewhere on the Web, but... I'm just back from an excellent Carmen at West Bay Opera, but, throughout it (except when Bizet's wondrous music, so well played and sung, just swept my pedantry away for a while!), I couldn't help being troubled by its plot's obvious imprecision regarding the geography of Spain.&lt;br /&gt;&lt;br /&gt;Consider: Carmen takes place in Sevilla -- Micaela is coming to meet Don José there (presumably on foot? but, even if she was riding, or on a carriage, that wouldn't change much...) from their native village in Navarra, and claim it's a day trip ("demain je verrai votre mère", "I'll see your mother tomorrow", she tells José -- and said mother is back in said village).  Sevilla is in &lt;span style="font-weight:bold;"&gt;Southern&lt;/span&gt; Spain, Navarra in the &lt;span style="font-weight:bold;"&gt;far North&lt;/span&gt; thereof... 912 km by road between Sevilla and Pamplona (the latter being the largest town in Navarra), according to Google Maps. &lt;br /&gt;&lt;br /&gt;I also suspect that the mountains on which the smugglers are in the 3rd act are meant to be the Pyrenees, &lt;span style="font-weight:bold;"&gt;not&lt;/span&gt; the Sierra Morena which &lt;span style="font-style:italic;"&gt;is&lt;/span&gt; reasonably close to Sevilla, simply because it's not clear where you'd be smuggling to and from over the Sierra Morena -- Andalucía to Extremadura?  I doubt there were customs officers patroling that administrative border, given that both regions were and are part of the same country, Spain; however, I am not certain about that... it would just go well with the misconception that Sevilla and Navarra are very close to each other (Navarra, of course, &lt;span style="font-style:italic;"&gt;is&lt;/span&gt; in fact on the Pyrenees).&lt;br /&gt;&lt;br /&gt;So I'm disappointed with Meilhac and Halévy, the librettistas -- even though I absolutely adore them for their authorship of so many of Offenbach's best librettos.  I revere Halévy and Meilhac when they play fast and loose with geography &lt;span style="font-weight:bold;"&gt;for good reason&lt;/span&gt; -- as in Offenbach's "Les Brigands", ``at the border between Spain and Italy'' (;-)... but in Carmen, they seem to have simply been sloppy and careless -- really unforgivable for two stalwart of the Académie Française!!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4091058576188372264-6947065636883739583?l=aleaxit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aleaxit.blogspot.com/feeds/6947065636883739583/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4091058576188372264&amp;postID=6947065636883739583' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4091058576188372264/posts/default/6947065636883739583'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4091058576188372264/posts/default/6947065636883739583'/><link rel='alternate' type='text/html' href='http://aleaxit.blogspot.com/2008/10/carmen-great-music-lousy-geography.html' title='Carmen: great music, lousy geography'/><author><name>Alex</name><uri>http://www.blogger.com/profile/05338312873524129257</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://www.aleax.it/alex.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4091058576188372264.post-223252696715041994</id><published>2008-10-13T21:17:00.000-07:00</published><updated>2008-10-13T21:24:20.127-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='pedantry'/><title type='text'>Pedantry: assure, ensure, insure</title><content type='html'>My (beloved) local (print!) newspaper publishes today (10/13) an article (also available online at http://www.mercurynews.com/ci_10711901?IADID=Search-www.mercurynews.com-www.mercurynews.com) claiming that (my emphasis) "To &lt;span style="font-style:italic;"&gt;assure&lt;/span&gt; continued fiscal security, Kane thinks local officials need to build stronger relationships with state representatives.".  Isn't the added value of print newspapers vs blogs supposed to be &lt;span style="font-weight:bold;"&gt;good copy-editing&lt;/span&gt;?!  And yet, here they are &lt;span style="font-weight:bold;"&gt;at least as bad&lt;/span&gt; as any unedited blog could possibly be.  I'm crying.&lt;br /&gt;&lt;br /&gt;A concise explanation can be found e.g. at http://www.wsu.edu/~brians/errors/assure.html : "To “assure” a person of something is to make him or her confident of it. According to Associated Press style, to “ensure” that something happens is to make certain that it does, and to “insure” is to issue an insurance policy.".  I can understand hesitation between "ensure" and "insure" (AP has it right, but not everybody agrees on that), but to misuse "assure" as if it meant "ensure", as the quoted newspaper article just did, is simply unforgivable.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4091058576188372264-223252696715041994?l=aleaxit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aleaxit.blogspot.com/feeds/223252696715041994/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4091058576188372264&amp;postID=223252696715041994' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4091058576188372264/posts/default/223252696715041994'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4091058576188372264/posts/default/223252696715041994'/><link rel='alternate' type='text/html' href='http://aleaxit.blogspot.com/2008/10/pedantry-assure-ensure-insure.html' title='Pedantry: assure, ensure, insure'/><author><name>Alex</name><uri>http://www.blogger.com/profile/05338312873524129257</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://www.aleax.it/alex.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4091058576188372264.post-8522219974273691083</id><published>2008-09-20T19:57:00.000-07:00</published><updated>2008-09-20T20:07:31.460-07:00</updated><title type='text'>Scientists and Engineers</title><content type='html'>I've been described, on occasion, as a &lt;span style="font-style:italic;"&gt;computer scientist&lt;/span&gt;.  This is incorrect: I'm not a &lt;span style="font-style:italic;"&gt;scientist&lt;/span&gt;, I'm an &lt;span style="font-style:italic;"&gt;engineer&lt;/span&gt;.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Not only is my &lt;span style="font-weight:bold;"&gt;degree&lt;/span&gt; in Engineering, not Science: I'm an engineer &lt;span style="font-weight:bold;"&gt;to the core&lt;/span&gt;, because I am thrilled by &lt;span style="font-style:italic;"&gt;making things that are useful&lt;/span&gt; far more than I am about &lt;span style="font-style:italic;"&gt;discovering truths about Nature&lt;/span&gt; -- the latter is fine, don't get me wrong!, a wonderful pursuit, and indispensable to keep pushing our civilization forwards in the long run, but -- as my own personal pursuit, it doesn't get my heart pulsing faster, make me sit upright, make my eyes shine, anywhere as much as the making of useful things does.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I would say I'm kind of a &lt;span style="font-style:italic;"&gt;typical&lt;/span&gt; engineer: just like, say, Leonardo da Vinci, Ludwig Wittgenstein, Antoine de Saint-Exupery (he couldn't actually get his engineering degree, but, he tried!), Rowan Atkinson (of "Mr Bean"'s fame), ...&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4091058576188372264-8522219974273691083?l=aleaxit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aleaxit.blogspot.com/feeds/8522219974273691083/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4091058576188372264&amp;postID=8522219974273691083' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4091058576188372264/posts/default/8522219974273691083'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4091058576188372264/posts/default/8522219974273691083'/><link rel='alternate' type='text/html' href='http://aleaxit.blogspot.com/2008/09/scientist-and-engineers.html' title='Scientists and Engineers'/><author><name>Alex</name><uri>http://www.blogger.com/profile/05338312873524129257</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://www.aleax.it/alex.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4091058576188372264.post-1226078629345362005</id><published>2008-09-09T17:04:00.000-07:00</published><updated>2008-11-16T17:04:51.907-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>Python tips: the right way to show errors</title><content type='html'>I've lost count of how many times I've seen Python code like this...:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;logging.error("Unknown user '%s' for '%s'"&lt;br /&gt;             % (username, resourcename))&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This error-showing code has &lt;span style="font-weight:bold;"&gt;two&lt;/span&gt; problems:&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;&lt;tt&gt;logging.error&lt;/tt&gt; and other such functions &lt;span style="font-style:italic;"&gt;do the formatting &lt;span style="font-weight:bold;"&gt;for&lt;/span&gt; you&lt;/span&gt; -- so &lt;span style="font-weight:bold;"&gt;don't&lt;/span&gt; duplicate their work! So, the first level of fixing is to change the call into:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;logging.error("Unknown user '%s' for '%s'",&lt;br /&gt;              username, resourcename)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;any time you're displaying a string that's somehow "in error" (not just in calls to &lt;tt&gt;logging&lt;/tt&gt; functions, but also when instantiating an exception, etc), use &lt;tt&gt;%r&lt;/tt&gt;, &lt;span style="font-weight:bold;"&gt;not&lt;/span&gt; &lt;tt&gt;%s&lt;/tt&gt;! This way, if the problem is that the string contains "invisible" characters, you'll see them clearly displayed as escape sequences, while &lt;tt&gt;%s&lt;/tt&gt; might hide those characters, making debugging much harder. So, the second (and final;-) level of fixing is to further change the call into:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;logging.error("Unknown user %r for %r",&lt;br /&gt;              username, resourcename)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4091058576188372264-1226078629345362005?l=aleaxit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aleaxit.blogspot.com/feeds/1226078629345362005/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4091058576188372264&amp;postID=1226078629345362005' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4091058576188372264/posts/default/1226078629345362005'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4091058576188372264/posts/default/1226078629345362005'/><link rel='alternate' type='text/html' href='http://aleaxit.blogspot.com/2008/09/python-tips-right-way-to-show-errors.html' title='Python tips: the right way to show errors'/><author><name>Alex</name><uri>http://www.blogger.com/profile/05338312873524129257</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://www.aleax.it/alex.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4091058576188372264.post-3453826372412744156</id><published>2008-09-08T22:04:00.000-07:00</published><updated>2008-09-08T22:34:51.076-07:00</updated><title type='text'>Upper-class vs Lower/Middle-class English</title><content type='html'>I'm watching Branagh's "Henry V" with my wife, and (after I expressed my absolute awe at Emma Thomson's acting skill... all actors in that movie are good, Thomson upstages them all - she's AWESOME!) we stopped midway through (getting too late) and briefly discussed the play's famous structure.  After the obvious notice of the alternation between "upper class" scenes (featuring kings, princes and dukes) and the "lower/middle class" ones (with corporals and, at best, lieutenants), I idly remarked how much easier it was for me (a foreigner who studied English as a second or third language -- it's debatable whether I studied more English, or French!) to follow the dialogue in the "upper-class" parts, than the others...&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Well, guess what: Anna's exactly the other way 'round -- SHE follows the "lower or middle class" dialogue much better than the higher-class one!  She, of course, is Minnesota (heart of the Midwest) born and bred... MY English comes mostly through Milton, Swift, Sterne, Smith, Franklin, Poe, Melville, Hardy, Shaw, Conrad, &amp;c... HERS, though she IS uncommonly well-read for an American, comes mostly through the organic, word-of-mouth, generation-to-generation "normal" process of language transmission...&lt;br /&gt;&lt;p&gt;&lt;br /&gt;...and, it appears, the subset of English best transmitted by highbrow "culture" (e.g. to foreign-born students like me) is QUITE different from that which best survives through "natural" means (to native-born speakers) -- and the "class distinction" is just what one would expect!  Reminds me of the way Latin came into Italian through two similarly separate channels: the spoken-word natural one (which e.g. made gold into "oro", laurel into "alloro", &amp;c) AND the "high culture" mostly-written one (which gives us such words as "aureo", golden, and "laurea", the university degree traditionally celebrated with laurel crowns).&lt;br /&gt;&lt;p&gt;&lt;br /&gt;The change of classic high-class diphthong "AU" into common-speech "O" is well attested even in late-Republic Rome -- e.g. the member of the ancient Claudius family who went for unstinting populism signaled that by changing his name to Clodius!-) -- so that's a particularly good example;-).  However, this general kind of distinction (between high-culture, mostly-written transmission of language, and normal-people, mostly-spoken one) is VERY common in all languages, and English, this most wonderful and most mongrel of languages, is no exception;-).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4091058576188372264-3453826372412744156?l=aleaxit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aleaxit.blogspot.com/feeds/3453826372412744156/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4091058576188372264&amp;postID=3453826372412744156' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4091058576188372264/posts/default/3453826372412744156'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4091058576188372264/posts/default/3453826372412744156'/><link rel='alternate' type='text/html' href='http://aleaxit.blogspot.com/2008/09/upper-class-vs-lowermiddle-class.html' title='Upper-class vs Lower/Middle-class English'/><author><name>Alex</name><uri>http://www.blogger.com/profile/05338312873524129257</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://www.aleax.it/alex.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4091058576188372264.post-7657968010326885714</id><published>2008-09-07T19:55:00.000-07:00</published><updated>2008-11-16T17:04:18.032-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='pedantry'/><title type='text'>The Pedant Reigns</title><content type='html'>Robert Reich is always worth reading, content-wise... but I'd have to unsubscribe from his blog if I couldn't lower my blood pressure by venting when he slaughters the beautiful English language!  In his &lt;a href="http://robertreich.blogspot.com/2008/09/fannie-and-freddie-as-predicted.html"&gt;latest post&lt;/a&gt;, he (rightly, content-wise) reminds the reader how the GSEs "blocked any attempt to reign in the risks".  Robert, it's REIN IN, &lt;span style="font-weight:bold;"&gt;not&lt;/span&gt; REIGN IN.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Reins (no G in it) are what you control a horse with, and by analogy they're used to indicate such control (as in the idiom you mis-used); it comes from Vulgar Latin "RETINA", constraint, from "RETINERE", to constrain (from "re-tinere", literally "to hold again"); close cognates in English include "retain" and "retinue".&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;A reign (with a G) is the period during which a certain monarch is on the throne, that monarch's authority and dominion, his or her rule; it comes from Latin "REGNUM", kingdom or reign, related to "REGULARE", ``to rule''; deep down, it coms from Proto-Indo-European root *reg-, just like your own surname, and a wide variety of words such as "right", "rich", "Raja", "rector", "erect", "royal", "realm", "rule", ... which got into English through many different routes.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;It IS unfortunate that these unrelated words, rein and reign, ended up in English with the same pronunciation, very similar spelling, and even vaguely cognate meanings...!-).  But PLEASE think of their differences, and let your readers focus on the very important and relevant messages you're sending (in this latest blog, about the horrors of the GSEs, Fanny and Freddie, based on private profits but socialized losses), rather than risk apoplexy over your usage of English... THANKS!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4091058576188372264-7657968010326885714?l=aleaxit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aleaxit.blogspot.com/feeds/7657968010326885714/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4091058576188372264&amp;postID=7657968010326885714' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4091058576188372264/posts/default/7657968010326885714'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4091058576188372264/posts/default/7657968010326885714'/><link rel='alternate' type='text/html' href='http://aleaxit.blogspot.com/2008/09/pedant-reigns.html' title='The Pedant Reigns'/><author><name>Alex</name><uri>http://www.blogger.com/profile/05338312873524129257</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://www.aleax.it/alex.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4091058576188372264.post-1776023220535873851</id><published>2008-09-06T17:25:00.000-07:00</published><updated>2009-01-11T17:17:05.049-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python appengine'/><title type='text'>PIL on Mac OS X 10.5 with Google App Engine</title><content type='html'>&lt;style type="text/css"&gt;&lt;br /&gt;body {&lt;br /&gt;overflow:auto;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I have recently opened a couple of issues on the Google App Engine tracker: &lt;a href="http://code.google.com/p/googleappengine/issues/detail?id=685"&gt;685&lt;/a&gt; about installing PIL on Mac OS X 10.5, which is harder than GAE's docs make it out to be, and &lt;a href="http://code.google.com/p/googleappengine/issues/detail?id=695"&gt;695&lt;/a&gt; about actually getting it to work with the wonderful GoogleAppEngineLauncher (so you can run locally GAE apps that use the images API), which requires some trick. So I just thought it might be useful to somebody else who uses Mac OS 10.5 and GAE if I summarized the necessary steps and workarounds.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;a href="http://code.google.com/appengine/docs/images/installingPIL.html"&gt;GAE docs&lt;/a&gt; claim that "Installing PIL on Mac OS X 10.4 and 10.5 can be completed in a few simple steps", but if you just follow the steps they suggest, on 10.5, the PIL installer will refuse to install -- the installer was written for 10.4 and it does not recognize the "stock" Python that comes with the OS for 10.5.  As &lt;a href="http://www.p16blog.com/p16/2008/05/appengine-installing-pil-on-os-x-1053.html"&gt;Matt Kangas&lt;/a&gt; has posted, before you run the PIL installer, you need to make a symlink:&lt;br /&gt;&lt;/p&gt;&lt;pre&gt;&lt;br /&gt;cd /Library/Frameworks&lt;br /&gt;sudo ln -s /System/Library/Frameworks/Python.framework/ Python.framework&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;He also suggests placing in your .bashrc&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;export PYTHONPATH=/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The latter environment variable (I placed it in .profile) is indeed sufficient to let you use PIL from a Terminal session, including one in which you run dev_appserver.py from the symlink that GAE installation places (if you allow it to) in /usr/local/bin. &lt;span style="font-weight:bold;"&gt;However&lt;/span&gt;...&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Once you've done all of this, the GoogleAppEngineLauncher still won't let you use PIL (and, therefore, it will disable the images API in the GAE apps it runs locally), because it doesn't know about your .bashrc or .profile!  You need to find another way to extend Python sys.path's appropriately.  The simplest way is to make a file named PIL.pth with a single-line content:&lt;br /&gt;&lt;/p&gt;&lt;pre&gt;&lt;br /&gt;/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;and place that PIL.pth in any of the directories that &lt;span style="font-weight:bold;"&gt;all&lt;/span&gt; Python processes see; in my case, I used /Library/Python/2.5/site-packages/ -- but that directory is not available in a pristine installation of Mac OS X 10.5 so you may have to use some other directory.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;This post is (I hope!) only of temporary usefulness, as it will be superseded when the PIL installer is rebuilt to properly support Mac OS X 10.5 (or, if that installer is never rebuilt, this post can still be made obsolete by the tiniest fix to GAE and its docs to close the issues I've mentioned above!), but, in the meantime, HTH!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4091058576188372264-1776023220535873851?l=aleaxit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aleaxit.blogspot.com/feeds/1776023220535873851/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4091058576188372264&amp;postID=1776023220535873851' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4091058576188372264/posts/default/1776023220535873851'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4091058576188372264/posts/default/1776023220535873851'/><link rel='alternate' type='text/html' href='http://aleaxit.blogspot.com/2008/09/pil-on-mac-os-x-105-with-google-app.html' title='PIL on Mac OS X 10.5 with Google App Engine'/><author><name>Alex</name><uri>http://www.blogger.com/profile/05338312873524129257</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://www.aleax.it/alex.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4091058576188372264.post-6383247758995417176</id><published>2008-09-02T20:49:00.000-07:00</published><updated>2008-09-03T09:54:54.303-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='pedantry'/><category scheme='http://www.blogger.com/atom/ns#' term='malapropisms'/><title type='text'>The Pedant Awakes</title><content type='html'>Some are born pedants, some achieve pedantry, and some have pedantry thrust upon 'em.&lt;br /&gt;&lt;br /&gt;I'm in the first category.  I can't help it: malapropisms LEAP to my eyes, raise my blood pressure, make me feel PAIN.  I've long mused that I should start a blog to vent about these painful attacks against my sanity -- the it's/its'/its horrors, the there/they're ones, "reign in" to mean "rein in", "baited breath" for "bated breath".... and so on, and so forth... venting would lessen the pain a little bit, maybe lower the ol' blood pressure a tad, too.  But, round tuits tend to be in short supply.&lt;br /&gt;&lt;br /&gt;Today's the day the Pedant awakes from his slumbers and SHOUTS -- "I'M MAD AS HELL, AND I'M NOT GOING TO TAKE IT ANY MORE".  Watch out -- the Pedant awakes, the Pedant is coming!&lt;br /&gt;&lt;br /&gt;Google Reader "share with friends" is a delightful little touch... and today my wife "shared" a generally excellent post by Garr at &lt;a href="http://www.presentationzen.com/presentationzen/2008/09/obama-delivers-his-speech-like-a-symphony.html"&gt;Presentation Zen&lt;/a&gt;, so of course I read that... I enjoy Garr's blog and his excellent book, and anything my wife thinks is worth sharing deserves attention.&lt;br /&gt;&lt;br /&gt;Midway through... "Fast/slow, loud/quite" -- OUCH.  I take a deep breath or three -- come on, that's no malapropism, it's a perfectly normal typo, swapping the final E and T... they can happen to anybody, they happen to me, too.  Calm down.  Resume reading.  But, towards the end... "his son Michael Reagan eluded to today".  AAAARGH!!!  I stormed upstairs to my wife, shouting, DEMANDING to know WHY, OH WHY, she would ever share a post using "eluded" to mean "alluded" -- it's not as if my life insurance was juicy enough to make her WANT to cause me to have a heart attack, after all... so what WAS her motivation?!&lt;br /&gt;&lt;br /&gt;Turns out... she didn't even notice.  When the general disrespect and spite for proper usage has become SO bad to numb even Anna -- whom I love, among innumerable other reasons, for being quite a match for me as a pedant and copy-writer supreme -- when SHE fails to notice something as horrible as THAT, well... then it's HIGH TIME for the Pedant to Awake, and Stride the Blogosphere ranting and venting and whining.&lt;br /&gt;&lt;br /&gt;So *WATCH OUT* from now on, especially if you write generally interesting and worthwhile prose, whether you actually MEAN "insure" or "ensure" (or maybe "assure"...?!), whether you're REALLY trying to speak about the "File Transfer Protocol protocol" ("FTP protocol" occurs hundreds of thousands of times on the web...) or the "North-Atlantic Treaty Organization organization" ("NATO organization" has over ten thousands hits), whether you mean "except" or "expect", and so forth... if you slip, the horrible price to pay just MIGHT be... *a mention on this blog*!!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4091058576188372264-6383247758995417176?l=aleaxit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aleaxit.blogspot.com/feeds/6383247758995417176/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4091058576188372264&amp;postID=6383247758995417176' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4091058576188372264/posts/default/6383247758995417176'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4091058576188372264/posts/default/6383247758995417176'/><link rel='alternate' type='text/html' href='http://aleaxit.blogspot.com/2008/09/pedant-awakes.html' title='The Pedant Awakes'/><author><name>Alex</name><uri>http://www.blogger.com/profile/05338312873524129257</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://www.aleax.it/alex.jpg'/></author><thr:total>5</thr:total></entry></feed>
