<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>All things Seth Mason</title><link href="https://sethmason.com/" rel="alternate"/><link href="http://feeds.feedburner.com/atom.xml" rel="self"/><id>https://sethmason.com/</id><updated>2026-01-01T00:00:00-08:00</updated><entry><title>Books I Read in 2025</title><link href="https://sethmason.com/2026/01/01/books-i-read-in-2025.html" rel="alternate"/><published>2026-01-01T00:00:00-08:00</published><updated>2026-01-01T00:00:00-08:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2026-01-01:/2026/01/01/books-i-read-in-2025.html</id><summary type="html">&lt;p&gt;Well, it's been over two years since I last generated a post so I had to do some
sleuthing to figure out how to do this. So that was fun.&lt;/p&gt;
&lt;p&gt;I'm so glad that I wrote docs about how I did this. &amp;lt;/sarcasm&amp;gt;&lt;/p&gt;
&lt;p&gt;But anyways, here's the paltry list of …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Well, it's been over two years since I last generated a post so I had to do some
sleuthing to figure out how to do this. So that was fun.&lt;/p&gt;
&lt;p&gt;I'm so glad that I wrote docs about how I did this. &amp;lt;/sarcasm&amp;gt;&lt;/p&gt;
&lt;p&gt;But anyways, here's the paltry list of books that I read this year.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://openlibrary.org/isbn/1101870613"&gt;The Memory Police&lt;/a&gt; by Yōko Ogawa (5 stars).&lt;/li&gt;
&lt;li&gt;&lt;a href="https://openlibrary.org/works/OL15933234W/Blue_nights?edition=key%3A/books/OL24839327M"&gt;Blue Nights&lt;/a&gt; by Joan Didion (4 stars).&lt;/li&gt;
&lt;li&gt;&lt;a href="https://openlibrary.org/isbn/1250219612"&gt;Elsewhere&lt;/a&gt; by Alexis Schaitkin (3 stars).&lt;/li&gt;
&lt;li&gt;&lt;a href="https://openlibrary.org/works/OL1820659W/My_life_in_France?edition=key%3A/books/OL23274915M"&gt;My Life in France&lt;/a&gt; by Julia Child (4 stars).&lt;/li&gt;
&lt;li&gt;&lt;a href="https://openlibrary.org/works/OL37622476W/Memory_Piece?edition=key%3A/books/OL51042138M"&gt;Memory Piece&lt;/a&gt; by Lisa Ko (3 stars).&lt;/li&gt;
&lt;li&gt;&lt;a href="https://openlibrary.org/isbn/1984855123"&gt;Our Country Friends&lt;/a&gt; by Gary Shteyngart (4 stars).&lt;/li&gt;
&lt;li&gt;&lt;a href="https://openlibrary.org/isbn/0593537610"&gt;Martyr!&lt;/a&gt; by Kaveh Akbar (4 stars).&lt;/li&gt;
&lt;li&gt;&lt;a href="https://openlibrary.org/works/OL37587905W/Maurice_and_Maralyn?edition=key%3A/books/OL57763527M"&gt;A Marriage at Sea: A True Story of Love, Obsession, and Shipwreck&lt;/a&gt; by Sophie Elmhirst (4 stars).&lt;/li&gt;
&lt;li&gt;&lt;a href="https://openlibrary.org/books/OL28955096M/Russian_Debutante's_Handbook"&gt;The Russian Debutante's Handbook&lt;/a&gt; by Gary Shteyngart (3 stars).&lt;/li&gt;
&lt;li&gt;&lt;a href="https://openlibrary.org/works/OL17914663W/All_Systems_Red?edition=key%3A/books/OL26500848M"&gt;All Systems Red (The Murderbot Diaries, #1)&lt;/a&gt; by Martha Wells (4 stars).&lt;/li&gt;
&lt;li&gt;&lt;a href="https://openlibrary.org/isbn/0385550375"&gt;James&lt;/a&gt; by Percival Everett (5 stars).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For the record (and by record I mean myself), here's how I generated this list (this year):&lt;/p&gt;
&lt;h4&gt;Export&lt;/h4&gt;
&lt;p&gt;First export books out of GoodReads using their &lt;a href="https://www.goodreads.com/import/review"&gt;export functionaltiy&lt;/a&gt; to a csv.&lt;/p&gt;
&lt;h3&gt;Duckdb to the rescue&lt;/h3&gt;
&lt;p&gt;Then I used the most excellet &lt;a href="https://duckdb.org"&gt;duckdb&lt;/a&gt; to export the data to markdown format:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;duckdb&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;lt;&amp;lt;&amp;#39;SQL&amp;#39; | pbcopy&lt;/span&gt;
&lt;span class="s"&gt;.mode list&lt;/span&gt;
&lt;span class="s"&gt;.headers off&lt;/span&gt;

&lt;span class="s"&gt;WITH cleaned AS (&lt;/span&gt;
&lt;span class="s"&gt;  SELECT&lt;/span&gt;
&lt;span class="s"&gt;    Title,&lt;/span&gt;
&lt;span class="s"&gt;    Author,&lt;/span&gt;
&lt;span class="s"&gt;    &amp;quot;My Rating&amp;quot;,&lt;/span&gt;
&lt;span class="s"&gt;    trim(&lt;/span&gt;
&lt;span class="s"&gt;      replace(&lt;/span&gt;
&lt;span class="s"&gt;        replace(ISBN, &amp;#39;=&amp;quot;&amp;#39;, &amp;#39;&amp;#39;),&lt;/span&gt;
&lt;span class="s"&gt;        &amp;#39;&amp;quot;&amp;#39;,&lt;/span&gt;
&lt;span class="s"&gt;        &amp;#39;&amp;#39;&lt;/span&gt;
&lt;span class="s"&gt;      )&lt;/span&gt;
&lt;span class="s"&gt;    ) AS clean_isbn,&lt;/span&gt;
&lt;span class="s"&gt;    &amp;quot;Date Read&amp;quot;&lt;/span&gt;
&lt;span class="s"&gt;  FROM &amp;#39;~/Downloads/goodreads_library_export.csv&amp;#39;&lt;/span&gt;
&lt;span class="s"&gt;)&lt;/span&gt;
&lt;span class="s"&gt;SELECT&lt;/span&gt;
&lt;span class="s"&gt;  &amp;#39;* [&amp;#39; || Title || &amp;#39;](&amp;#39; ||&lt;/span&gt;
&lt;span class="s"&gt;  CASE&lt;/span&gt;
&lt;span class="s"&gt;    WHEN clean_isbn IS NOT NULL AND clean_isbn &amp;lt;&amp;gt; &amp;#39;&amp;#39; THEN&lt;/span&gt;
&lt;span class="s"&gt;      &amp;#39;https://openlibrary.org/isbn/&amp;#39; || clean_isbn&lt;/span&gt;
&lt;span class="s"&gt;    ELSE&lt;/span&gt;
&lt;span class="s"&gt;      &amp;#39;https://openlibrary.org/search?q=&amp;#39; ||&lt;/span&gt;
&lt;span class="s"&gt;      replace(trim(Title || &amp;#39; &amp;#39; || Author), &amp;#39; &amp;#39;, &amp;#39;+&amp;#39;)&lt;/span&gt;
&lt;span class="s"&gt;  END&lt;/span&gt;
&lt;span class="s"&gt;  || &amp;#39;) by &amp;#39; || Author || &amp;#39; (&amp;#39; || &amp;quot;My Rating&amp;quot; || &amp;#39; stars).&amp;#39;&lt;/span&gt;
&lt;span class="s"&gt;FROM cleaned&lt;/span&gt;
&lt;span class="s"&gt;WHERE &amp;quot;Date Read&amp;quot; &amp;gt;= &amp;#39;2025-01-01&amp;#39;&lt;/span&gt;
&lt;span class="s"&gt;  AND &amp;quot;Date Read&amp;quot; &amp;lt; &amp;#39;2026-01-01&amp;#39;&lt;/span&gt;
&lt;span class="s"&gt;ORDER BY &amp;quot;Date Read&amp;quot; ASC;&lt;/span&gt;
&lt;span class="s"&gt;SQL&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The damn robots helped me with some formatting issues because the data coming
out of GoodReads is utter crap.&lt;/p&gt;
&lt;p&gt;You can see the other years &lt;a href="https://sethmason.com/tag/books.html"&gt;here&lt;/a&gt; in case you missed them.&lt;/p&gt;</content><category term="reading"/><category term="books"/></entry><entry><title>Books I Read in 2024</title><link href="https://sethmason.com/2025/01/01/books-i-read-in-2024.html" rel="alternate"/><published>2025-01-01T00:00:00-08:00</published><updated>2025-01-01T00:00:00-08:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2025-01-01:/2025/01/01/books-i-read-in-2024.html</id><summary type="html">&lt;p&gt;&lt;strike&gt;Well I never did this. I'll have to do it at some point.&lt;/strike&gt;&lt;/p&gt;
&lt;p&gt;Here's the list 1 year late:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://openlibrary.org/search?q=Memorial+Bryan+Washington"&gt;Memorial&lt;/a&gt; by Bryan Washington (4 stars).&lt;/li&gt;
&lt;li&gt;&lt;a href="https://openlibrary.org/isbn/0804137390"&gt;Essentialism: The Disciplined Pursuit of Less&lt;/a&gt; by Greg McKeown (3 stars).&lt;/li&gt;
&lt;li&gt;&lt;a href="https://openlibrary.org/search?q=Killing+Floor+(Jack+Reacher+#1)+Lee+Child"&gt;Killing Floor (Jack Reacher #1)&lt;/a&gt; by Lee Child (3 stars).&lt;/li&gt;
&lt;li&gt;&lt;a href="https://openlibrary.org/search?q=A+Prayer+for+the+Crown-Shy+(Monk+&amp;amp;+Robot,+#2)+Becky+Chambers"&gt;A Prayer for the …&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;</summary><content type="html">&lt;p&gt;&lt;strike&gt;Well I never did this. I'll have to do it at some point.&lt;/strike&gt;&lt;/p&gt;
&lt;p&gt;Here's the list 1 year late:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://openlibrary.org/search?q=Memorial+Bryan+Washington"&gt;Memorial&lt;/a&gt; by Bryan Washington (4 stars).&lt;/li&gt;
&lt;li&gt;&lt;a href="https://openlibrary.org/isbn/0804137390"&gt;Essentialism: The Disciplined Pursuit of Less&lt;/a&gt; by Greg McKeown (3 stars).&lt;/li&gt;
&lt;li&gt;&lt;a href="https://openlibrary.org/search?q=Killing+Floor+(Jack+Reacher+#1)+Lee+Child"&gt;Killing Floor (Jack Reacher #1)&lt;/a&gt; by Lee Child (3 stars).&lt;/li&gt;
&lt;li&gt;&lt;a href="https://openlibrary.org/search?q=A+Prayer+for+the+Crown-Shy+(Monk+&amp;amp;+Robot,+#2)+Becky+Chambers"&gt;A Prayer for the Crown-Shy (Monk &amp;amp; Robot, #2)&lt;/a&gt; by Becky Chambers (4 stars).&lt;/li&gt;
&lt;li&gt;&lt;a href="https://openlibrary.org/isbn/0374717117"&gt;Severance&lt;/a&gt; by Ling  Ma (4 stars).&lt;/li&gt;
&lt;li&gt;&lt;a href="https://openlibrary.org/isbn/0374600317"&gt;The Bee Sting&lt;/a&gt; by Paul Murray (4 stars).&lt;/li&gt;
&lt;li&gt;&lt;a href="https://openlibrary.org/search?q=Blood+Meridian:+Or+the+Evening+Redness+in+the+West+Cormac+McCarthy"&gt;Blood Meridian: Or the Evening Redness in the West&lt;/a&gt; by Cormac McCarthy (4 stars).&lt;/li&gt;
&lt;li&gt;&lt;a href="https://openlibrary.org/search?q=Slow+Horses+(Slough+House,+#1)+Mick+Herron"&gt;Slow Horses (Slough House, #1)&lt;/a&gt; by Mick Herron (4 stars).&lt;/li&gt;
&lt;li&gt;&lt;a href="https://openlibrary.org/isbn/0593536614"&gt;Ilium&lt;/a&gt; by Lea Carpenter (3 stars).&lt;/li&gt;
&lt;li&gt;&lt;a href="https://openlibrary.org/isbn/1101146419"&gt;Pattern Recognition (Blue Ant, #1)&lt;/a&gt; by William Gibson (4 stars).&lt;/li&gt;
&lt;li&gt;&lt;a href="https://openlibrary.org/isbn/0385521316"&gt;Say Nothing: A True Story of Murder and Memory in Northern Ireland&lt;/a&gt; by Patrick Radden Keefe (4 stars).&lt;/li&gt;
&lt;li&gt;&lt;a href="https://openlibrary.org/search?q=Every+Anxious+Wave+Mo+Daviau"&gt;Every Anxious Wave&lt;/a&gt; by Mo Daviau (3 stars).&lt;/li&gt;
&lt;li&gt;&lt;a href="https://openlibrary.org/search?q=Dead+Lions+(Slough+House,+#2)+Mick+Herron"&gt;Dead Lions (Slough House, #2)&lt;/a&gt; by Mick Herron (4 stars).&lt;/li&gt;
&lt;li&gt;&lt;a href="https://openlibrary.org/isbn/1982196750"&gt;Last Acts: A Novel&lt;/a&gt; by Alexander Sammartino (4 stars).&lt;/li&gt;
&lt;li&gt;&lt;a href="https://openlibrary.org/search?q=Real+Tigers+(Slough+House,+#3)+Mick+Herron"&gt;Real Tigers (Slough House, #3)&lt;/a&gt; by Mick Herron (4 stars).&lt;/li&gt;
&lt;li&gt;&lt;a href="https://openlibrary.org/search?q=Spook+Street+(Slough+House,+#4)+Mick+Herron"&gt;Spook Street (Slough House, #4)&lt;/a&gt; by Mick Herron (4 stars).&lt;/li&gt;
&lt;li&gt;&lt;a href="https://openlibrary.org/isbn/1439177740"&gt;I Am Pilgrim&lt;/a&gt; by Terry Hayes (3 stars).&lt;/li&gt;
&lt;li&gt;&lt;a href="https://openlibrary.org/search?q=Joe+Country+(Slough+House,+#6)+Mick+Herron"&gt;Joe Country (Slough House, #6)&lt;/a&gt; by Mick Herron (4 stars).&lt;/li&gt;
&lt;li&gt;&lt;a href="https://openlibrary.org/search?q=Slough+House+(Slough+House+#7)+Mick+Herron"&gt;Slough House (Slough House #7)&lt;/a&gt; by Mick Herron (4 stars).&lt;/li&gt;
&lt;li&gt;&lt;a href="https://openlibrary.org/search?q=Bad+Actors+(Slough+House,+#8)+Mick+Herron"&gt;Bad Actors (Slough House, #8)&lt;/a&gt; by Mick Herron (4 stars).&lt;/li&gt;
&lt;li&gt;&lt;a href="https://openlibrary.org/isbn/1476716781"&gt;The Candy House&lt;/a&gt; by Jennifer Egan (4 stars).&lt;/li&gt;
&lt;li&gt;&lt;a href="https://openlibrary.org/search?q=Railsea+China+Miéville"&gt;Railsea&lt;/a&gt; by China Miéville (4 stars).&lt;/li&gt;
&lt;li&gt;&lt;a href="https://openlibrary.org/search?q=Dark+Matter+Blake+Crouch"&gt;Dark Matter&lt;/a&gt; by Blake Crouch (3 stars).&lt;/li&gt;
&lt;li&gt;&lt;a href="https://openlibrary.org/isbn/0525533699"&gt;Lot&lt;/a&gt; by Bryan Washington (3 stars).&lt;/li&gt;
&lt;li&gt;&lt;a href="https://openlibrary.org/isbn/1984878883"&gt;Agent Running in the Field&lt;/a&gt; by John le Carré (4 stars).&lt;/li&gt;
&lt;li&gt;&lt;a href="https://openlibrary.org/isbn/0802158749"&gt;Small Things Like These&lt;/a&gt; by Claire Keegan (5 stars).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Wow, I &lt;em&gt;really&lt;/em&gt; got into Slow Horses in 2024.&lt;/p&gt;
&lt;p&gt;You can see the other years &lt;a href="https://sethmason.com/tag/books.html"&gt;here&lt;/a&gt; in case you missed them.&lt;/p&gt;</content><category term="reading"/><category term="books"/></entry><entry><title>Books I Read in 2023</title><link href="https://sethmason.com/2024/01/01/books-i-read-in-2023.html" rel="alternate"/><published>2024-01-01T00:00:00-08:00</published><updated>2024-01-01T00:00:00-08:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2024-01-01:/2024/01/01/books-i-read-in-2023.html</id><summary type="html">&lt;p&gt;Well, here's my annual list of books I read. I hope you enjoy my occasional blogging.&lt;/p&gt;
&lt;p&gt;Again with 19 books read in a year. At least I'm &lt;a href="https://sethmason.com/2022/12/31/books-i-read-in-2022.html"&gt;consistent&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;No promises I'll ever increase my blogging frequency any time soon, what with
all the &lt;a href="https://www.strava.com/athletes/16584859"&gt;bicylce riding&lt;/a&gt; and &lt;a href="https://www.instagram.com/slackorama/"&gt;Instagramming&lt;/a&gt;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/61056594-the-union"&gt;The Union&lt;/a&gt; by …&lt;/li&gt;&lt;/ul&gt;</summary><content type="html">&lt;p&gt;Well, here's my annual list of books I read. I hope you enjoy my occasional blogging.&lt;/p&gt;
&lt;p&gt;Again with 19 books read in a year. At least I'm &lt;a href="https://sethmason.com/2022/12/31/books-i-read-in-2022.html"&gt;consistent&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;No promises I'll ever increase my blogging frequency any time soon, what with
all the &lt;a href="https://www.strava.com/athletes/16584859"&gt;bicylce riding&lt;/a&gt; and &lt;a href="https://www.instagram.com/slackorama/"&gt;Instagramming&lt;/a&gt;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/61056594-the-union"&gt;The Union&lt;/a&gt; by Leah Vernon (3 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/17607.All_About_Love"&gt;All About Love: New Visions&lt;/a&gt; by bell hooks (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/26570525-the-association-of-small-bombs"&gt;The Association of Small Bombs&lt;/a&gt; by Karan Mahajan (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/13013972-continental-drift"&gt;Continental Drift&lt;/a&gt; by Russell Banks (5 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/6088007-neuromancer"&gt;Neuromancer&lt;/a&gt; by William Gibson (5 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/35394313-all-creatures-great-and-small"&gt;All Creatures Great and Small&lt;/a&gt; by James Herriot (5 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/60234192-critical-mass"&gt;Critical Mass&lt;/a&gt; by Daniel Suarez (3 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/61545074-users"&gt;Users&lt;/a&gt; by Colin Winnette (3 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/32905343-meddling-kids"&gt;Meddling Kids&lt;/a&gt; by Edgar Cantero (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/58256450-the-school-for-good-mothers"&gt;The School for Good Mothers&lt;/a&gt; by Jessamine Chan (5 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/1199688.Babel_17"&gt;Babel-17&lt;/a&gt; by Samuel R. Delany (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/74871176-a-line-in-the-sand"&gt;A Line in the Sand: A Novel&lt;/a&gt; by Kevin Powers (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/62193738-all-the-sinners-bleed"&gt;All the Sinners Bleed&lt;/a&gt; by S.A. Cosby (3 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/49199195-little-eyes"&gt;Little Eyes&lt;/a&gt; by Samanta Schweblin (3 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/56048747-the-plot"&gt;The Plot&lt;/a&gt; by Jean Hanff Korelitz (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/58975864-what-moves-the-dead"&gt;What Moves the Dead&lt;/a&gt; by T. Kingfisher (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/40864002-a-psalm-for-the-wild-built"&gt;A Psalm for the Wild-Built&lt;/a&gt; by Becky  Chambers (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/61288242-mobility"&gt;Mobility&lt;/a&gt; by Lydia Kiesling (3 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/18619647-black-moon"&gt;Black Moon&lt;/a&gt; by Kenneth Calhoun (4 stars)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Despite reports of its death, the Goodereads API still seems to be up and
running. While it could use some love (as could the site itself), I won't
complain as I can still pull this list pretty easily.&lt;/p&gt;
&lt;p&gt;You can see the other years &lt;a href="https://sethmason.com/tag/books.html"&gt;here&lt;/a&gt; in case you missed them.&lt;/p&gt;</content><category term="reading"/><category term="books"/></entry><entry><title>Books I Read in 2022</title><link href="https://sethmason.com/2022/12/31/books-i-read-in-2022.html" rel="alternate"/><published>2022-12-31T00:00:00-08:00</published><updated>2022-12-31T00:00:00-08:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2022-12-31:/2022/12/31/books-i-read-in-2022.html</id><summary type="html">&lt;p&gt;Well, this annual reading list is about 12 months too late. I'm back dating it
so it at least publishes in the correct year.&lt;/p&gt;
&lt;p&gt;19 books. My goal of 50 in a year is still a dream.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/44767458-dune"&gt;Dune&lt;/a&gt; by Frank Herbert (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/56339679-harlem-shuffle"&gt;Harlem Shuffle&lt;/a&gt; by Colson Whitehead (4 stars …&lt;/li&gt;&lt;/ul&gt;</summary><content type="html">&lt;p&gt;Well, this annual reading list is about 12 months too late. I'm back dating it
so it at least publishes in the correct year.&lt;/p&gt;
&lt;p&gt;19 books. My goal of 50 in a year is still a dream.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/44767458-dune"&gt;Dune&lt;/a&gt; by Frank Herbert (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/56339679-harlem-shuffle"&gt;Harlem Shuffle&lt;/a&gt; by Colson Whitehead (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/54250259-klara-and-the-sun"&gt;Klara and the Sun&lt;/a&gt; by Kazuo Ishiguro (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/36885304-flights"&gt;Flights&lt;/a&gt; by Olga Tokarczuk (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/41840162-the-man-who-fell-to-earth"&gt;The Man Who Fell to Earth&lt;/a&gt; by Walter Tevis (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/5853237-a-lesson-before-dying"&gt;A Lesson Before Dying&lt;/a&gt; by Ernest J. Gaines (5 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/52702097-piranesi"&gt;Piranesi&lt;/a&gt; by Susanna Clarke (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/53867504-leave-the-world-behind"&gt;Leave the World Behind&lt;/a&gt; by Rumaan Alam (5 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/59337761-the-old-man"&gt;The Old Man&lt;/a&gt; by Thomas Perry (3 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/57150885-the-book-of-form-and-emptiness"&gt;The Book of Form and Emptiness&lt;/a&gt; by Ruth Ozeki (5 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/38217645-dopesick"&gt;Dopesick: Dealers, Doctors, and the Drug Company that Addicted America&lt;/a&gt; by Beth Macy (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/60204782-radical"&gt;Radical: My Year with a Socialist Senator&lt;/a&gt; by Sofia Warren (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/35133922-educated"&gt;Educated&lt;/a&gt; by Tara Westover (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/55577529-the-new-wilderness"&gt;The New Wilderness&lt;/a&gt; by Diane  Cook (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/29632790-algorithms-to-live-by"&gt;Algorithms to Live By: The Computer Science of Human Decisions&lt;/a&gt; by Brian Christian () stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/55656269-build-your-house-around-my-body"&gt;Build Your House Around My Body&lt;/a&gt; by Violet Kupersmith (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/49856101-hamnet"&gt;Hamnet&lt;/a&gt; by Maggie O'Farrell (5 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/51529945-the-violence"&gt;The Violence&lt;/a&gt; by Delilah S. Dawson (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/60931.Kindred"&gt;Kindred&lt;/a&gt; by Octavia E. Butler (5 stars)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can see the other years &lt;a href="https://sethmason.com/tag/books.html"&gt;here&lt;/a&gt; in case you missed them.&lt;/p&gt;</content><category term="reading"/><category term="books"/></entry><entry><title>Books I Read in 2021</title><link href="https://sethmason.com/2021/12/31/books-i-read-in-2021.html" rel="alternate"/><published>2021-12-31T00:00:00-08:00</published><updated>2021-12-31T00:00:00-08:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2021-12-31:/2021/12/31/books-i-read-in-2021.html</id><summary type="html">&lt;p&gt;Well, this annual reading list is about 2 years late. Whoopsie.&lt;/p&gt;
&lt;p&gt;Stupid pandemic killed my reading momentum. You'd think with all the time at
home, I'd be reading more but that certainly hasn't happened. Well, that and &lt;a href="https://www.goodreads.com/book/show/26760209-the-universe-in-your-hand"&gt;The Universe in Your Hand&lt;/a&gt; took forever to read. Book is &lt;em&gt;dense&lt;/em&gt;. But …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Well, this annual reading list is about 2 years late. Whoopsie.&lt;/p&gt;
&lt;p&gt;Stupid pandemic killed my reading momentum. You'd think with all the time at
home, I'd be reading more but that certainly hasn't happened. Well, that and &lt;a href="https://www.goodreads.com/book/show/26760209-the-universe-in-your-hand"&gt;The Universe in Your Hand&lt;/a&gt; took forever to read. Book is &lt;em&gt;dense&lt;/em&gt;. But only 13 books this year.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/34507927-how-to-take-smart-notes"&gt;How to Take Smart Notes: One Simple Technique to Boost Writing, Learning and Thinking – for Students, Academics and Nonfiction Book Writers&lt;/a&gt; by Sönke Ahrens (3 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/38457091-my-brilliant-friend"&gt;My Brilliant Friend&lt;/a&gt; by Elena Ferrante (3 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/53487334-the-best-of-me"&gt;The Best of Me&lt;/a&gt; by David Sedaris (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/51796259-the-loneliness-of-the-long-distance-cartoonist"&gt;The Loneliness of the Long-Distance Cartoonist&lt;/a&gt; by Adrian Tomine (5 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/40164365-the-friend"&gt;The Friend&lt;/a&gt; by Sigrid Nunez (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/36254365-we-were-yahoo"&gt;We Were Yahoo!: From Internet Pioneer to the Trillion Dollar Loss of Google and Facebook&lt;/a&gt; by Jeremy Ring (1 star)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/56922673-the-surrogate"&gt;The Surrogate&lt;/a&gt; by Toni Halleen (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/26760209-the-universe-in-your-hand"&gt;The Universe in Your Hand: A Journey Through Space, Time, and Beyond&lt;/a&gt; by Christophe Galfard (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/50358133-homeland-elegies"&gt;Homeland Elegies&lt;/a&gt; by Ayad Akhtar (5 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/29354916-the-whistler"&gt;The Whistler&lt;/a&gt; by John Grisham (3 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/6396997-the-old-man-and-the-sea"&gt;The Old Man and the Sea&lt;/a&gt; by Ernest Hemingway (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/32075671-the-hate-u-give"&gt;The Hate U Give&lt;/a&gt; by Angie Thomas (5 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/52883804-jack-kirby"&gt;Jack Kirby: The Epic Life of the King of Comics&lt;/a&gt; by Tom Scioli (5 stars)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can see the other years &lt;a href="https://sethmason.com/tag/books.html"&gt;here&lt;/a&gt; in case you missed them.&lt;/p&gt;</content><category term="reading"/><category term="books"/></entry><entry><title>Books I Read in 2020</title><link href="https://sethmason.com/2021/01/01/books-i-read-in-2020.html" rel="alternate"/><published>2021-01-01T00:00:00-08:00</published><updated>2021-01-01T00:00:00-08:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2021-01-01:/2021/01/01/books-i-read-in-2020.html</id><summary type="html">&lt;p&gt;Adios 2020! You won't soon be forgotten, that's for sure. &lt;/p&gt;
&lt;p&gt;Aloha 2021! In the spirit of getting things off on the right foot, I'm posting the books I read right on time!&lt;/p&gt;
&lt;p&gt;Only 17 books this year. Gonna blame too much binge watching of TV shows and a
lot of …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Adios 2020! You won't soon be forgotten, that's for sure. &lt;/p&gt;
&lt;p&gt;Aloha 2021! In the spirit of getting things off on the right foot, I'm posting the books I read right on time!&lt;/p&gt;
&lt;p&gt;Only 17 books this year. Gonna blame too much binge watching of TV shows and a
lot of time &lt;a href="https://www.strava.com/athletes/16584859"&gt;riding my bike&lt;/a&gt;. I seem
to be rapidly falling away from my goal of reading 50 books a year.&lt;/p&gt;
&lt;p&gt;Particular highlights were &lt;a href="https://www.amazon.com/gp/product/B07NKMZT7T" title="The Water Dancer"&gt;The Water Dancer by Ta-Nehisi Coates&lt;/a&gt;,
&lt;a href="https://www.amazon.com/Nothing-See-Here-Kevin-Wilson-ebook/dp/B07NVPLW2P/" title="Nothing to See Here"&gt;Nothing to See Here by Kevin Wilson&lt;/a&gt; and &lt;a href="https://www.amazon.com/Plot-Against-America-Novel-ebook/dp/B003WJQ6RC/" title="The Plot Against America"&gt;The Plot Against America by
Philip Roth&lt;/a&gt;. The Roth book was pretty frightening given current
cirumstances.&lt;/p&gt;
&lt;p&gt;But let's not end on a bad note. Here's to a new year!&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Aurora by Kim Stanley Robinson (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.amazon.com/Nickel-Boys-Novel-Colson-Whitehead-ebook/dp/B07J489X7H" title="The Nickel Boys"&gt;The Nickel Boys&lt;/a&gt; by Colson Whitehead (5 stars)&lt;/li&gt;
&lt;li&gt;The Space Between Worlds by Micaiah Johnson (4 stars)&lt;/li&gt;
&lt;li&gt;Of Love and Dust by Ernest J. Gaines (5 stars)&lt;/li&gt;
&lt;li&gt;Interior Chinatown by Charles Yu (5 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=b'9780525563488'&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Wow, No Thank You.&amp;lt;/ Samantha Irby (5 stars)&lt;/li&gt;&lt;/li&gt;
&lt;li&gt;The Mirage by Matt Ruff (3 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.amazon.com/Plot-Against-America-Novel-ebook/dp/B003WJQ6RC/" title="The Plot Against America"&gt;The Plot Against America&lt;/a&gt; by Philip Roth (5 stars)&lt;/li&gt;
&lt;li&gt;Our Souls at Night by Kent Haruf (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.amazon.com/gp/product/B07NKMZT7T" title="The Water Dancer"&gt;The Water Dancer&lt;/a&gt; by Ta-Nehisi Coates (5 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=b'9780525520610'&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Lost Children Archive&lt;/a&gt; by - Valeria Luiselli (5 stars)&lt;/li&gt;
&lt;li&gt;The Outsider by Stephen King (4 stars)&lt;/li&gt;
&lt;li&gt;Stranger in a Strange Land by Robert A. Heinlein (3 stars)&lt;/li&gt;
&lt;li&gt;The Ten Thousand Things by Maria Dermoût (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.amazon.com/Nothing-See-Here-Kevin-Wilson-ebook/dp/B07NVPLW2P/" title="Nothing to See Here"&gt;Nothing to See Here&lt;/a&gt; by Kevin    Wilson (5 stars)&lt;/li&gt;
&lt;li&gt;Just Mercy: A Story of Justice and Redemption by Bryan Stevenson (5 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=b'9780765377067'&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The Three-Body Problem (Remembrance of Earth’s Past #1)&lt;/a&gt; by Liu Cixin (3 stars)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can see the other years &lt;a href="https://sethmason.com/tag/books.html"&gt;here&lt;/a&gt; in case you missed them.&lt;/p&gt;</content><category term="reading"/><category term="books"/></entry><entry><title>Books I Read in 2019</title><link href="https://sethmason.com/2020/01/01/books-i-read-in-2019.html" rel="alternate"/><published>2020-01-01T00:00:00-08:00</published><updated>2020-01-01T00:00:00-08:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2020-01-01:/2020/01/01/books-i-read-in-2019.html</id><summary type="html">&lt;p&gt;OK, only 11 months late on getting this up. Going to blame 2020 for this. All
I'll say is I took a big John Scalzi trip this past year.&lt;/p&gt;
&lt;p&gt;34 books. &lt;/p&gt;
&lt;li&gt;A Perfect Spy by John le Carré (4 stars)&lt;/li&gt;
&lt;li&gt;Random Family: Love, Drugs, Trouble, and Coming of Age in …&lt;/li&gt;</summary><content type="html">&lt;p&gt;OK, only 11 months late on getting this up. Going to blame 2020 for this. All
I'll say is I took a big John Scalzi trip this past year.&lt;/p&gt;
&lt;p&gt;34 books. &lt;/p&gt;
&lt;li&gt;A Perfect Spy by John le Carré (4 stars)&lt;/li&gt;
&lt;li&gt;Random Family: Love, Drugs, Trouble, and Coming of Age in the Bronx by Adrian Nicole LeBlanc (4 stars)&lt;/li&gt;
&lt;li&gt;Little Bee by Chris Cleave (4 stars)&lt;/li&gt;
&lt;li&gt;The Last Colony (Old Man's War, #3) by John Scalzi (3 stars)&lt;/li&gt;
&lt;li&gt;The Ghost Brigades (Old Man's War, #2) by John Scalzi (4 stars)&lt;/li&gt;
&lt;li&gt;Old Man's War (Old Man's War, #1) by John Scalzi (4 stars)&lt;/li&gt;
&lt;li&gt;To Shake the Sleeping Self: A Journey from Oregon to Patagonia, and a Quest for a Life with No Regret by Jedidiah Jenkins (3 stars)&lt;/li&gt;
&lt;li&gt;The Consuming Fire (The Interdependency, #2) by John Scalzi (4 stars)&lt;/li&gt;
&lt;li&gt;The Collapsing Empire (The Interdependency, #1) by John Scalzi (5 stars)&lt;/li&gt;
&lt;li&gt;Bad Blood: Secrets and Lies in a Silicon Valley Startup by John Carreyrou (4 stars)&lt;/li&gt;
&lt;li&gt;Homegoing by Yaa Gyasi (5 stars)&lt;/li&gt;
&lt;li&gt;Everything Under by Daisy Johnson (4 stars)&lt;/li&gt;
&lt;li&gt;Stories of Your Life and Others by Ted Chiang (5 stars)&lt;/li&gt;
&lt;li&gt;The Dinner by Herman Koch (4 stars)&lt;/li&gt;
&lt;li&gt;The Day the Sun Died by Yan Lianke (3 stars)&lt;/li&gt;
&lt;li&gt;Down City: A Daughter's Story of Love, Memory, and Murder by Leah Carroll (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=b'9781984295293'&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Howards End&lt;/a&gt; by E.M. Forster (5 stars)&lt;/li&gt;
&lt;li&gt;Delta-v by Daniel Suarez (4 stars)&lt;/li&gt;
&lt;li&gt;A Philosophy of Walking by Frédéric Gros (0 stars)&lt;/li&gt;
&lt;li&gt;Murder on the Orient Express (Hercule Poirot, #10) by Agatha Christie (4 stars)&lt;/li&gt;
&lt;li&gt;There There by Tommy Orange (4 stars)&lt;/li&gt;
&lt;li&gt;City of Miracles (The Divine Cities, #3) by Robert Jackson Bennett (5 stars)&lt;/li&gt;
&lt;li&gt;Manhood for Amateurs by Michael Chabon (4 Stars)&lt;/li&gt;
&lt;li&gt;City of Blades (The Divine Cities, #2) by Robert Jackson Bennett (4 stars)&lt;/li&gt;
&lt;li&gt;Eileen by Ottessa Moshfegh (4 stars)&lt;/li&gt;
&lt;li&gt;Friday Black by Nana Kwame Adjei-Brenyah (4 stars)&lt;/li&gt;
&lt;li&gt;Frederick Douglass: Prophet of Freedom by David W. Blight (4 stars)&lt;/li&gt;
&lt;li&gt;Washington Black by Esi Edugyan (4 stars)&lt;/li&gt;
&lt;li&gt;Things Fall Apart (The African Trilogy, #1) by Chinua Achebe (0 stars)&lt;/li&gt;
&lt;li&gt;The City of Mirrors (The Passage, #3) by Justin Cronin (4 stars)&lt;/li&gt;
&lt;li&gt;Calypso by David Sedaris (4 stars)&lt;/li&gt;
&lt;li&gt;City of Stairs (The Divine Cities, #1) by Robert Jackson Bennett (4 stars)&lt;/li&gt;
&lt;li&gt;Americanah by Chimamanda Ngozi Adichie (5 stars)&lt;/li&gt;
&lt;li&gt;Wild: From Lost to Found on the Pacific Crest Trail by Cheryl Strayed (5 stars)&lt;/li&gt;
&lt;li&gt;American Pastoral (The American Trilogy, #1) by Philip Roth (4 stars)&lt;/li&gt;

&lt;p&gt;You can see the other years &lt;a href="https://sethmason.com/tag/books.html"&gt;here&lt;/a&gt; in case you missed them.&lt;/p&gt;</content><category term="reading"/><category term="books"/></entry><entry><title>Books I Read in 2018</title><link href="https://sethmason.com/2019/01/06/books-i-read-in-2018.html" rel="alternate"/><published>2019-01-06T00:00:00-08:00</published><updated>2019-01-06T00:00:00-08:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2019-01-06:/2019/01/06/books-i-read-in-2018.html</id><summary type="html">&lt;p&gt;Going on nine years, here's my annual list of books I read. Like all the other
years, I didn't meet my goal of 53 books. I only managed 33 in 2018. So, it's
basically a repeat of 2017.&lt;/p&gt;
&lt;p&gt;In my defense, I did ride my bike &lt;a href="https://2018.strava.com/en-us/video/4669fef90a5e01bb8f09c7941527d517933e7ff8"&gt;quite a few
miles …&lt;/a&gt;&lt;/p&gt;</summary><content type="html">&lt;p&gt;Going on nine years, here's my annual list of books I read. Like all the other
years, I didn't meet my goal of 53 books. I only managed 33 in 2018. So, it's
basically a repeat of 2017.&lt;/p&gt;
&lt;p&gt;In my defense, I did ride my bike &lt;a href="https://2018.strava.com/en-us/video/4669fef90a5e01bb8f09c7941527d517933e7ff8"&gt;quite a few
miles&lt;/a&gt;.
Even more than 2017 so it's not déjà vu all over again.&lt;/p&gt;
&lt;p&gt;Anyways, here is the list. Once again, I read a whole bunch of Harry Bosch. And
also a whole bunch of Stephen King.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/38309643-lands-of-lost-borders"&gt;Lands of Lost Borders: A Journey on the Silk Road&lt;/a&gt; by Kate  Harris (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/20328492-hill-william"&gt;Hill William&lt;/a&gt; by Scott McClanahan (3 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/39911748-cherry"&gt;Cherry&lt;/a&gt; by Nico Walker (3 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/8521957-nine-dragons"&gt;Nine Dragons (Harry Bosch, #15; Harry Bosch Universe, #20)&lt;/a&gt; by Michael Connelly (5 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/6322798-the-overlook"&gt;The Overlook (Harry Bosch, #13; Harry Bosch Universe, #17)&lt;/a&gt; by Michael Connelly (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/6279832-echo-park"&gt;Echo Park (Harry Bosch, #12; Harry Bosch Universe, #16)&lt;/a&gt; by Michael Connelly (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/6465036-the-closers"&gt;The Closers (Harry Bosch, #11; Harry Bosch Universe, #14)&lt;/a&gt; by Michael Connelly (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/36561652-trenton-makes"&gt;Trenton Makes&lt;/a&gt; by Tadzio Koelb (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/6465037-the-narrows"&gt;The Narrows (Harry Bosch, #10; Harry Bosch Universe, #13)&lt;/a&gt; by Michael Connelly (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/6480608-lost-light"&gt;Lost Light (Harry Bosch, #9)&lt;/a&gt; by Michael Connelly (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/36289213-pym"&gt;Pym&lt;/a&gt; by Mat Johnson (5 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/40122571-city-of-bones"&gt;City Of Bones (Harry Bosch, #8)&lt;/a&gt; by Michael Connelly (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/1848873.Shakespeare"&gt;Shakespeare: The World as a Stage&lt;/a&gt; by Bill Bryson (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/50696.The_Ghost_Writer"&gt;The Ghost Writer&lt;/a&gt; by Philip Roth (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/19861308-little-failure"&gt;Little Failure&lt;/a&gt; by Gary Shteyngart (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/35014821-the-time-crunched-cyclist"&gt;The Time-Crunched Cyclist: Race-Winning Fitness in 6 Hours a Week, 3rd Ed.&lt;/a&gt; by Carmichael Chris (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/33224155-who-is-rich"&gt;Who Is Rich?&lt;/a&gt; by Matthew Klam (2 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/13538873-mr-penumbra-s-24-hour-bookstore"&gt;Mr. Penumbra's 24-Hour Bookstore (Mr. Penumbra's 24-Hour Bookstore, #1)&lt;/a&gt; by Robin Sloan (3 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/25142942-lovecraft-country"&gt;Lovecraft Country&lt;/a&gt; by Matt Ruff (5 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/30298108-killers-of-the-flower-moon"&gt;Killers of the Flower Moon: The Osage Murders and the Birth of the FBI&lt;/a&gt; by David Grann (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/6931246-kraken"&gt;Kraken&lt;/a&gt; by China Miéville (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/19276004-satantango"&gt;Satantango&lt;/a&gt; by László Krasznahorkai (3 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/22010718-the-peripheral"&gt;The Peripheral&lt;/a&gt; by William Gibson (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/6277040-the-dark-tower"&gt;The Dark Tower (The Dark Tower, #7)&lt;/a&gt; by Stephen King (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/19972658-song-of-susannah"&gt;Song of Susannah (The Dark Tower, #6)&lt;/a&gt; by Stephen King (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/8539144-apex-hides-the-hurt"&gt;Apex Hides the Hurt&lt;/a&gt; by Colson Whitehead (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/4978.Wolves_of_the_Calla"&gt;Wolves of the Calla (The Dark Tower, #5)&lt;/a&gt; by Stephen King (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/31429678-the-leavers"&gt;The Leavers&lt;/a&gt; by Lisa Ko (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/9106457-bike-snob"&gt;Bike Snob&lt;/a&gt; by BikeSnobNYC (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/34731740-manhattan-beach"&gt;Manhattan Beach&lt;/a&gt; by Jennifer Egan (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/19887474-the-fifth-season"&gt;The Fifth Season (The Broken Earth, #1)&lt;/a&gt; by N.K. Jemisin (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/36949233-american-gods"&gt;American Gods&lt;/a&gt; by Neil Gaiman (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/30955863-heroine-worship"&gt;Heroine Worship (Heroine Complex, #2)&lt;/a&gt; by Sarah Kuhn (4 stars)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can see the other years &lt;a href="https://sethmason.com/tag/books.html"&gt;here&lt;/a&gt; in case you missed them.&lt;/p&gt;</content><category term="reading"/><category term="books"/></entry><entry><title>Books I Read in 2017</title><link href="https://sethmason.com/2017/01/08/books-i-read-in-2017.html" rel="alternate"/><published>2017-01-08T00:00:00-08:00</published><updated>2017-01-08T00:00:00-08:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2017-01-08:/2017/01/08/books-i-read-in-2017.html</id><summary type="html">&lt;p&gt;So I got tired of waiting around for Donald Trump to post his reading list of 2017 and decided to preempt him and post mine. I have a feeling his was just the outside of Happy Meals and gum wrappers anyways. Plus, this is the only post I make these …&lt;/p&gt;</summary><content type="html">&lt;p&gt;So I got tired of waiting around for Donald Trump to post his reading list of 2017 and decided to preempt him and post mine. I have a feeling his was just the outside of Happy Meals and gum wrappers anyways. Plus, this is the only post I make these days so I want to make sure and get it out of the way early in the year.&lt;/p&gt;
&lt;p&gt;My goal was to read 52 books this year but probably spent too much time &lt;a href="https://2017.strava.com/en-us/videos/4669fef90a5e01bb8f09c7941527d517933e7ff8/"&gt;riding my bike&lt;/a&gt;. Maybe I'll do better next year.&lt;/p&gt;
&lt;p&gt;Anyhow, highlights from this year were &lt;a href="http://a.co/cIdhpJY"&gt;American War&lt;/a&gt;. Not sure if it was a documentary or a sci-fi novel.&lt;/p&gt;
&lt;p&gt;And &lt;a href="http://a.co/4HdgiKF"&gt;The Nix&lt;/a&gt; was a really funny surreal satire on modern life. I enjoyed it a whole bunch.&lt;/p&gt;
&lt;p&gt;If you want to be absolutely terrified, feel free to dive into &lt;a href="http://a.co/6a8mqHy"&gt;The Sixth Extinction&lt;/a&gt;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The Ultimate Bicycle Owner's Manual: The Universal Guide to Bikes, Riding, and Everything for Beginner and Seasoned Cyclists by Eben Weiss (4 stars)&lt;/li&gt;
&lt;li&gt;Home (Binti, #2) by Nnedi Okorafor (4 stars)&lt;/li&gt;
&lt;li&gt;The Secret Race: Inside the Hidden World of the Tour de France by Tyler Hamilton (3 stars)&lt;/li&gt;
&lt;li&gt;Pro Cycling on $10 a Day: From Fat Kid to Euro Pro by Phil Gaimon (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780340829783&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Wizard and Glass (The Dark Tower, #4)&lt;/a&gt; by Stephen King (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780143131243&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Draft Animals: Living the Pro Cycling Dream&lt;/a&gt; by Phil Gaimon (5 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://a.co/cIdhpJY"&gt;American War&lt;/a&gt; by Omar El Akkad (5 stars)&lt;/li&gt;
&lt;li&gt;Dark Tower: Wastelands by Stephen King (0 stars)&lt;/li&gt;
&lt;li&gt;The Sixth Extinction: An Unnatural History by Elizabeth Kolbert (5 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780451210852&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The Drawing of the Three (The Dark Tower, #2)&lt;/a&gt; by Stephen King (4 stars)&lt;/li&gt;
&lt;li&gt;The Nix by Nathan  Hill (5 stars)&lt;/li&gt;
&lt;li&gt;Loving Day by Mat Johnson (4 stars)&lt;/li&gt;
&lt;li&gt;Angels Flight (Harry Bosch, #6) by Michael Connelly (4 stars)&lt;/li&gt;
&lt;li&gt;The Gunslinger (The Dark Tower, #1) by Stephen King (4 stars)&lt;/li&gt;
&lt;li&gt;A Darkness More Than Night (Harry Bosch, #7; Terry McCaleb, #2; Harry Bosch Universe, #9) by Michael Connelly (3 stars)&lt;/li&gt;
&lt;li&gt;Trunk Music (Harry Bosch, #5; Harry Bosch Universe, #6) by Michael Connelly (3 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780670891573&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;In the Heart of the Sea: The Tragedy of the Whaleship Essex&lt;/a&gt; by Nathaniel Philbrick (4 stars)&lt;/li&gt;
&lt;li&gt;Cities of the Plain by Cormac McCarthy (5 stars)&lt;/li&gt;
&lt;li&gt;Benediction by Kent Haruf (4 stars)&lt;/li&gt;
&lt;li&gt;Eventide by Kent Haruf (4 stars)&lt;/li&gt;
&lt;li&gt;The Handmaid's Tale by Margaret Atwood (5 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9788433914262&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Hollywood&lt;/a&gt; by Charles Bukowski (4 stars)&lt;/li&gt;
&lt;li&gt;Plainsong (Plainsong, #1) by Kent Haruf (4 stars)&lt;/li&gt;
&lt;li&gt;Seveneves by Neal Stephenson (4 stars)&lt;/li&gt;
&lt;li&gt;Last Man in Tower by Aravind Adiga (4 stars)&lt;/li&gt;
&lt;li&gt;Crosstalk by Connie Willis (4 stars)&lt;/li&gt;
&lt;li&gt;The Last Coyote (Harry Bosch, #4; Harry Bosch Universe, #4) by Michael Connelly (4 stars)&lt;/li&gt;
&lt;li&gt;Carry the One by Carol Anshaw (4 stars)&lt;/li&gt;
&lt;li&gt;The Concrete Blonde (Harry Bosch, #3; Harry Bosch Universe, #3) by Michael Connelly (4 stars)&lt;/li&gt;
&lt;li&gt;The Black Ice (Harry Bosch, #2; Harry Bosch Universe, #2) by Michael Connelly (4 stars)&lt;/li&gt;
&lt;li&gt;A Place of My Own: The Education of an Amateur Builder by Michael Pollan (3 stars)&lt;/li&gt;
&lt;li&gt;The Last Good Heist: The Inside Story of The Biggest Single Payday in the Criminal History of the Northeast by Tim    White (3 stars)&lt;/li&gt;
&lt;li&gt;The Black Echo (Harry Bosch, #1; Harry Bosch Universe, #1) by Michael Connelly (4 stars)&lt;/li&gt;
&lt;li&gt;Ancillary Sword (Imperial Radch, #2) by Ann Leckie (3 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9781616201326&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The Art Forger&lt;/a&gt; by B.A. Shapiro (3 stars)&lt;/li&gt;
&lt;li&gt;Apex (Nexus, #3) by Ramez Naam (3 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780857662965&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Crux (Nexus, #2)&lt;/a&gt; by Ramez Naam (4 stars)&lt;/li&gt;
&lt;li&gt;Nexus (Nexus, #1) by Ramez Naam (4 stars)&lt;/li&gt;
&lt;li&gt;Barbarian Days: A Surfing Life by William Finnegan (2 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9781455586691&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Deep Work: Rules for Focused Success in a Distracted World&lt;/a&gt; by Cal Newport (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9781449344214&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Getting Started with Raspberry Pi&lt;/a&gt; by Matt Richardson (4 stars)&lt;/li&gt;
&lt;li&gt;The North Water by Ian McGuire (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780061579035&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The Family Fang&lt;/a&gt; by Kevin    Wilson (4 stars)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you are curious, I use
&lt;a href="https://gist.github.com/d879bafad762d1c2b2c3"&gt;a python script&lt;/a&gt; to generate
the list of books. (You'll need your Goodreads key in order to use it.) Then I
just paste it into &lt;a href="https://www.gnu.org/software/emacs/"&gt;GNU Emacs&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You can see the other years &lt;a href="https://sethmason.com/tag/books.html"&gt;here&lt;/a&gt;. I've managed to do this for 8
years running. Hooray for narcissistic me!&lt;/p&gt;</content><category term="reading"/><category term="books"/></entry><entry><title>Books I Read in 2016</title><link href="https://sethmason.com/2017/01/04/books-i-read-in-2016.html" rel="alternate"/><published>2017-01-04T00:00:00-08:00</published><updated>2017-01-04T00:00:00-08:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2017-01-04:/2017/01/04/books-i-read-in-2016.html</id><summary type="html">&lt;p&gt;Ah nuts. It's been a whole year without a single post here. Anyways, at least
you get one post a year from me. That's more than some blogs I suppose.&lt;/p&gt;
&lt;p&gt;Only 21 books this year! That's a grave offense. I must do better this year. Go
2017!&lt;/p&gt;
&lt;p&gt;By far, the …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Ah nuts. It's been a whole year without a single post here. Anyways, at least
you get one post a year from me. That's more than some blogs I suppose.&lt;/p&gt;
&lt;p&gt;Only 21 books this year! That's a grave offense. I must do better this year. Go
2017!&lt;/p&gt;
&lt;p&gt;By far, the most terrifying (and timely) was "In the Garden of Beasts." Imagine
watching the rise of Hitler, screaming about it and no one does anything.
Imagine. It was much scarier than the Sarah Pinborough books.&lt;/p&gt;
&lt;p&gt;Colson
Whitehead's
&lt;a href="https://www.amazon.com/Underground-Railroad-National-Winner-Oprahs-ebook/dp/B01A4ATV0A/ref=sr_1_sc_1"&gt;book&lt;/a&gt; was
amazing. Heartbreaking and powerful all in one tiny book. Go read it now. I'll wait here until you get back.&lt;/p&gt;
&lt;p&gt;And I cannot recommend reading
"&lt;a href="https://www.amazon.com/Weapons-Math-Destruction-Increases-Inequality/dp/0553418815/ref=sr_1_1"&gt;Weapons of Math Destruction&lt;/a&gt;"
after watching "&lt;a href="https://en.wikipedia.org/wiki/Black_Mirror"&gt;Black Mirror&lt;/a&gt;."
That will drive you towards a life of digital minimalism where you'll be handing
pieces of paper to people to securely deliver messages.&lt;/p&gt;
&lt;p&gt;Without further ado, the books I read in 2016. See you next year (unless "Black
Mirror" sets you off):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;In the Garden of Beasts: Love, Terror, and an American Family in Hitler's Berlin by Erik Larson (5 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.amazon.com/Weapons-Math-Destruction-Increases-Inequality/dp/0553418815/ref=sr_1_1"&gt;Weapons of Math Destruction: How Big Data Increases Inequality and Threatens Democracy&lt;/a&gt; by Cathy O'Neil (4 stars)&lt;/li&gt;
&lt;li&gt;Binti (Binti, #1) by Nnedi Okorafor (4 stars)&lt;/li&gt;
&lt;li&gt;The Sellout by Paul Beatty (4 stars)&lt;/li&gt;
&lt;li&gt;Perfume: The Story of a Murderer by Patrick Süskind (2 stars)&lt;/li&gt;
&lt;li&gt;The Windup Girl by Paolo Bacigalupi (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.amazon.com/Underground-Railroad-National-Winner-Oprahs-ebook/dp/B01A4ATV0A/ref=sr_1_sc_1"&gt;The Underground Railroad&lt;/a&gt; by Colson Whitehead (5 stars)&lt;/li&gt;
&lt;li&gt;The Drowned Cities by Paolo Bacigalupi (5 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780385352871&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The Water Knife&lt;/a&gt; by Paolo Bacigalupi (3 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9781566894098&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The Story of My Teeth&lt;/a&gt; by Valeria Luiselli (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780756410841&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Heroine Complex (Heroine Complex, #1)&lt;/a&gt; by Sarah Kuhn (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9781250077004&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Furiously Happy: A Funny Book About Horrible Things&lt;/a&gt; by Jenny  Lawson (3 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780525951575&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Freedom™ (Daemon, #2)&lt;/a&gt; by Daniel Suarez (5 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780451228734&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Daemon&lt;/a&gt; by Daniel Suarez (3 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780575089532&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The Chosen Seed (The Dog-Faced Gods, #3)&lt;/a&gt; by Sarah Pinborough (3 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780812993547&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Between the World and Me&lt;/a&gt; by Ta-Nehisi Coates (5 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780575089495&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The Shadow of the Soul (The Dog-Faced Gods, #2)&lt;/a&gt; by Sarah Pinborough (3 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780575089464&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;A Matter of Blood (The Dog-Faced Gods, #1)&lt;/a&gt; by Sarah Pinborough (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780679740674&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The Man in the High Castle&lt;/a&gt; by Philip K. Dick (3 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780609809112&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Metal Cowboy: Tales from the Road Less Pedaled&lt;/a&gt; by Joe Kurmaskie (3 stars)&lt;/li&gt;
&lt;li&gt;Moonwalking with Einstein: The Art and Science of Remembering Everything by Joshua Foer (4 stars)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you are curious, I use
&lt;a href="https://gist.github.com/d879bafad762d1c2b2c3"&gt;a python script&lt;/a&gt; to generate
the list of books. (You'll need your Goodreads key in order to use it.) Then I
just paste it into &lt;a href="https://www.gnu.org/software/emacs/"&gt;GNU Emacs&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You can see the other years &lt;a href="https://sethmason.com/tag/books.html"&gt;here&lt;/a&gt;. I've managed to do this for 7
years running. Hooray for narcissistic me!&lt;/p&gt;</content><category term="reading"/><category term="books"/></entry><entry><title>Books I Read in 2015</title><link href="https://sethmason.com/2016/01/01/books-i-read-in-2015.html" rel="alternate"/><published>2016-01-01T00:00:00-08:00</published><updated>2016-01-01T00:00:00-08:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2016-01-01:/2016/01/01/books-i-read-in-2015.html</id><summary type="html">&lt;p&gt;Here it is! The annual post you have all been clamoring for.&lt;/p&gt;
&lt;p&gt;In review, &lt;a href="http://www.amazon.com/gp/search?keywords=9780807083697&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Kindred&lt;/a&gt;
was a great book. Hot damn! Go read it now! And the
&lt;a href="http://www.amazon.com/gp/product/030759243X/ref=as_li_tl?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=030759243X&amp;amp;linkCode=as2&amp;amp;tag=slackorama-20&amp;amp;linkId=HXYF7UBH6TUKUY3E"&gt;book that's a huge interview with DFW&lt;/a&gt;
was amazing. That reminds me, I need to see that movie.&lt;/p&gt;
&lt;p&gt;Looking over it, I can …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Here it is! The annual post you have all been clamoring for.&lt;/p&gt;
&lt;p&gt;In review, &lt;a href="http://www.amazon.com/gp/search?keywords=9780807083697&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Kindred&lt;/a&gt;
was a great book. Hot damn! Go read it now! And the
&lt;a href="http://www.amazon.com/gp/product/030759243X/ref=as_li_tl?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=030759243X&amp;amp;linkCode=as2&amp;amp;tag=slackorama-20&amp;amp;linkId=HXYF7UBH6TUKUY3E"&gt;book that's a huge interview with DFW&lt;/a&gt;
was amazing. That reminds me, I need to see that movie.&lt;/p&gt;
&lt;p&gt;Looking over it, I can see I spent a lot time reading books about productivity
and work. There are a few books on here from the same topic that I didn't even
finish. I guess 2015 was all about
&lt;a href="https://www.youtube.com/watch?v=fpIRBdUYBE0"&gt;business time&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Also, no idea why I read &lt;a href="http://www.amazon.com/gp/search?keywords=9780670031726&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Drop City&lt;/a&gt;
followed immediately by &lt;a href="http://www.amazon.com/gp/search?keywords=9781400068098&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Open City&lt;/a&gt;.
City time? Drop City was good by the way.&lt;/p&gt;
&lt;p&gt;So, here's the complete list:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9781936719112&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Anything You Want: 40 Lessons for a New Kind of Entrepreneur&lt;/a&gt; by Derek Sivers (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780374221812&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The New World: A Novel&lt;/a&gt; by Chris Adrian (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780802122940&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;An Unnecessary Woman&lt;/a&gt; by Rabih Alameddine (3 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780062041265&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The Sisters Brothers&lt;/a&gt; by Patrick deWitt (3 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780060976095&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Fiskadoro&lt;/a&gt; by Denis Johnson (3 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780804139021&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The Martian&lt;/a&gt; by Andy Weir (5 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780062295897&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Girl in a Band&lt;/a&gt; by Kim Gordon (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780743262132&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The Path Between the Seas: The Creation of the Panama Canal, 1870-1914&lt;/a&gt; by David McCullough (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9781612194349&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The Ghost Network&lt;/a&gt; by Catie Disabato (3 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780385351379&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The Son&lt;/a&gt; by Jo Nesbø (3 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780385353304&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Station Eleven&lt;/a&gt; by Emily St. John Mandel (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780452282827&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;We Were the Mulvaneys&lt;/a&gt; by Joyce Carol Oates (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780316242905&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The Three&lt;/a&gt; by Sarah Lotz (3 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9781594489990&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The Wordy Shipmates&lt;/a&gt; by Sarah Vowell (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780807083697&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Kindred&lt;/a&gt; by Octavia E. Butler (5 stars)&lt;/li&gt;
&lt;li&gt;&lt;a
href="http://www.amazon.com/gp/product/030759243X/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=030759243X&amp;linkCode=as2&amp;tag=slackorama-20&amp;linkId=HXYF7UBH6TUKUY3E"&gt;Although
Of Course You End Up Becoming Yourself: A Road Trip with David Foster
Wallace&lt;/a&gt; by David Lipsky (5 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9783425040844&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;In the Country of Last Things&lt;/a&gt; by Paul Auster (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780312358341&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The Leftovers&lt;/a&gt; by Tom Perrotta (3 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780865479432&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Skippy Dies&lt;/a&gt; by Paul Murray (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9781594487361&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;This Is How You Lose Her&lt;/a&gt; by Junot Díaz (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9781400068098&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Open City&lt;/a&gt; by Teju Cole (3 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780670031726&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Drop City&lt;/a&gt; by T.C. Boyle (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780316221177&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The Shambling Guide to New York City (The Shambling Guides, #1)&lt;/a&gt; by Mur Lafferty (3 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780061928123&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Beautiful Ruins&lt;/a&gt; by Jess Walter (5 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9781455509102&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;So Good They Can't Ignore You: Why Skills Trump Passion in the Quest for Work You Love&lt;/a&gt; by Cal Newport (4 stars)&lt;/li&gt;
&lt;li&gt;Safety Tips for Living Alone (Kindle Single) (Electric Literature's Recommended Reading Book 133) (3 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780393071955&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Naked Statistics: Stripping the Dread from the Data&lt;/a&gt; by Charles Wheelan (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9781118661468&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Data Smart: Using Data Science to Transform Information into Insight&lt;/a&gt; by John W. Foreman (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9781576754221&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Eat That Frog!: 21 Great Ways to Stop Procrastinating and Get More Done in Less Time&lt;/a&gt; by Brian Tracy (3 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780979368103&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Bit Literacy: Productivity in the Age of Information and E-mail Overload&lt;/a&gt; by Mark Hurst (3 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780316246620&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Ancillary Justice (Imperial Radch, #1)&lt;/a&gt; by Ann Leckie (4 stars)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9781591843160&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Linchpin: Are You Indispensable?&lt;/a&gt; by Seth Godin (3 stars)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you are curious, I use
&lt;a href="https://gist.github.com/d879bafad762d1c2b2c3"&gt;a python script&lt;/a&gt; to generate
the list of books. (You'll need your Goodreads key in order to use it.) Then I
just paste it into &lt;a href="https://www.gnu.org/software/emacs/"&gt;GNU Emacs&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You can see the other years &lt;a href="https://sethmason.com/tag/books.html"&gt;here&lt;/a&gt;. I've managed to do this for 5
years running. Hooray for narcissistic me!&lt;/p&gt;</content><category term="reading"/><category term="books"/></entry><entry><title>Org Exporting and Emailing</title><link href="https://sethmason.com/2015/06/22/org-exporting-and-emailing.html" rel="alternate"/><published>2015-06-22T00:00:00-07:00</published><updated>2015-06-22T00:00:00-07:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2015-06-22:/2015/06/22/org-exporting-and-emailing.html</id><summary type="html">&lt;p&gt;I use org-mode. I use Emacs. I send email using Emacs.&lt;/p&gt;
&lt;p&gt;Thus, I &lt;em&gt;really&lt;/em&gt; liked John Kitchin's post about
&lt;a href="http://kitchingroup.cheme.cmu.edu/blog/2014/06/08/Better-integration-of-org-mode-and-email/"&gt;sending email with org&lt;/a&gt;.
It was almost perfect (to me). The only thing it didn't do was format the
content before exporting. It just sent it out as plain org.&lt;/p&gt;
&lt;p&gt;Thanks …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I use org-mode. I use Emacs. I send email using Emacs.&lt;/p&gt;
&lt;p&gt;Thus, I &lt;em&gt;really&lt;/em&gt; liked John Kitchin's post about
&lt;a href="http://kitchingroup.cheme.cmu.edu/blog/2014/06/08/Better-integration-of-org-mode-and-email/"&gt;sending email with org&lt;/a&gt;.
It was almost perfect (to me). The only thing it didn't do was format the
content before exporting. It just sent it out as plain org.&lt;/p&gt;
&lt;p&gt;Thanks to his hard work, I just had to add a few bits to come up with this.
Now I can get the cool line blocks around my code and execute the org-babel blocks
in my headings before they get sent out. This is very helpful when sending out
snippets of code and random command line effluvia.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;defun&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;email-heading-after-export&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;backend&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kp"&gt;&amp;amp;optional&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;plist&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;Send the current org-mode heading as the body of an email, after converting&lt;/span&gt;
&lt;span class="s"&gt;it to the given backend.&lt;/span&gt;
&lt;span class="s"&gt;&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;interactive&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;setq&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="vg"&gt;*email-heading-point*&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;set-marker&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;make-marker&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;point&lt;/span&gt;&lt;span class="p"&gt;)))&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;save-excursion&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;org-mark-subtree&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;let&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nv"&gt;TO&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;org-entry-get&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;point&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;TO&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;t&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;SUBJECT&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;nth&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;org-heading-components&lt;/span&gt;&lt;span class="p"&gt;)))&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;continue&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;nil&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;switch-function&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;nil&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;yank-action&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;nil&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;send-actions&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nv"&gt;email-send-action&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;nil&lt;/span&gt;&lt;span class="p"&gt;)))&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;return-action&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;email-heading-return&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;plist&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;`&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;:with-toc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;nil&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;,@&lt;/span&gt;&lt;span class="nv"&gt;plist&lt;/span&gt;&lt;span class="p"&gt;)))&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="c1"&gt;;; we do not  want the mark to interfere with export&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;deactivate-mark&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;message&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;format&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;%s&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;plist&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;org-export-to-buffer&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;backend&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;*org-to-email*&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;nil&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;t&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;nil&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;t&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;plist&lt;/span&gt;
&lt;span class="w"&gt;                            &lt;/span&gt;&lt;span class="no"&gt;nil&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;switch-to-buffer&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;*org-to-email*&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;let&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nv"&gt;content&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;buffer-substring&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;point-min&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;point-max&lt;/span&gt;&lt;span class="p"&gt;))))&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;compose-mail&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;TO&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;SUBJECT&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;nil&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;continue&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;switch-function&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;yank-action&lt;/span&gt;
&lt;span class="w"&gt;                      &lt;/span&gt;&lt;span class="nv"&gt;send-actions&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;return-action&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;message-goto-body&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;insert&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;content&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;TO&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;message-goto-body&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;message-goto-to&lt;/span&gt;&lt;span class="p"&gt;))))))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Now, I can email a heading as ASCII&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;defun&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;email-heading-as-ascii&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;interactive&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;email-heading-after-export&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;&amp;#39;ascii&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Or UTF-8:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;defun&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;email-heading-as-utf8&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;interactive&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;message&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;wtf&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;email-heading-after-export&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;&amp;#39;ascii&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;:ascii-charset&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;utf-8&lt;/span&gt;&lt;span class="p"&gt;)))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Even Markdown:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;defun&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;email-heading-as-markdown&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;interactive&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;email-heading-after-export&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;&amp;#39;md&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;You could even send email as HTML but there's no way I'm giving out the tips
on how to do that.&lt;/p&gt;
&lt;p&gt;Let me know if you have any questions or comments about the above. And thanks
to John Kitchin! This code uses the same
&lt;a href="https://creativecommons.org/licenses/by-sa/4.0/deed.en_US"&gt;License&lt;/a&gt;.&lt;/p&gt;</content><category term="editor"/><category term="emacs"/><category term="org"/></entry><entry><title>I made a toolbox</title><link href="https://sethmason.com/2015/02/28/i-made-a-toolbox.html" rel="alternate"/><published>2015-02-28T00:00:00-08:00</published><updated>2015-02-28T00:00:00-08:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2015-02-28:/2015/02/28/i-made-a-toolbox.html</id><summary type="html">&lt;p&gt;&lt;img alt="A Carpenter's toolbox" class="center-block" src="https://sethmason.com/images/toolbox.jpg"&gt;&lt;/p&gt;
&lt;p&gt;So, I finally got around to making the toolbox from the 1940's from
&lt;a href="http://shopclass.popularwoodworking.com/p-877-the-woodwrights-shop-s21-ep03-toolbox-from-the-1940s.aspx"&gt;St. Roy Underhill&lt;/a&gt;.
Aside from making it a bit shorter (so it would fit in our storage), not
making the base of the tray out tomato cans and using metal corner bumpers,
I followed his directions to …&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;img alt="A Carpenter's toolbox" class="center-block" src="https://sethmason.com/images/toolbox.jpg"&gt;&lt;/p&gt;
&lt;p&gt;So, I finally got around to making the toolbox from the 1940's from
&lt;a href="http://shopclass.popularwoodworking.com/p-877-the-woodwrights-shop-s21-ep03-toolbox-from-the-1940s.aspx"&gt;St. Roy Underhill&lt;/a&gt;.
Aside from making it a bit shorter (so it would fit in our storage), not
making the base of the tray out tomato cans and using metal corner bumpers,
I followed his directions to the letter. It was a fun project that I made
entirely out of hand tools. No electrons were harmed in making this toolbox.&lt;/p&gt;
&lt;p&gt;I opted to use poplar that I picked up at the local big box store because all
the pine was knotty and crappy looking . All the hardware used on it, I got
from &lt;a href="http://www.leevalley.com"&gt;Lee Valley&lt;/a&gt;. Overall, I'm pretty happy with
the way it came out. And I got some nice compliements at
&lt;a href="http://www.offthesaw.com"&gt;Off the Saw&lt;/a&gt; last week.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Full toolbox" class="center-block" src="https://sethmason.com/images/toolbox_full.jpg"&gt;&lt;/p&gt;
&lt;p&gt;Learned a ton from this so that's good. For example, using a
&lt;a href="http://www.supertool.com/StanleyBG/stan10.htm#num78"&gt;Stanley #78 Rabbet plane&lt;/a&gt;
is not as easy as it looks. I kept going cockeyed with it. Also, resawing a
3/4" piece of poplar that is 30" long is not something you can do unless you
have an afternoon free. Note to self: make a new friend who owns a bandsaw.&lt;/p&gt;
&lt;p&gt;A corollary to this is that sharp tools are very important. The resawing
probably would have gone quicker if my rip saw was sharp. And I gouged the side
with my dull block plane.&lt;/p&gt;
&lt;p&gt;Finally, I learned I &lt;em&gt;really&lt;/em&gt; need to make a shooting board. All the cuts where I didn't use my
&lt;a href="https://sites.google.com/site/langdonmitreboxes/"&gt;Langdon mitre box&lt;/a&gt;, turned
out all squirrelly.&lt;/p&gt;
&lt;p&gt;But when all is said and done, now I have a nice little toolbox to carry my
tools around the house.&lt;/p&gt;</content><category term="woodworking"/><category term="woodworking toolbox"/></entry><entry><title>Books I Read in 2014</title><link href="https://sethmason.com/2015/01/01/books-i-read-in-2014.html" rel="alternate"/><published>2015-01-01T00:00:00-08:00</published><updated>2015-01-01T00:00:00-08:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2015-01-01:/2015/01/01/books-i-read-in-2014.html</id><summary type="html">&lt;p&gt;OK, here is the only blog post I seem to do these days: the books I read in
the past year. I still haven't 100% automated this. Maybe next year.&lt;/p&gt;
&lt;p&gt;The count was a tad lower this year, than &lt;a href="/2013/12/30/books-i-read-in-2013.html"&gt;years&lt;/a&gt; &lt;a href="/2012/12/31/books-i-read-in-2012.html"&gt;past&lt;/a&gt;. I spent a lot more time
drawing in my …&lt;/p&gt;</summary><content type="html">&lt;p&gt;OK, here is the only blog post I seem to do these days: the books I read in
the past year. I still haven't 100% automated this. Maybe next year.&lt;/p&gt;
&lt;p&gt;The count was a tad lower this year, than &lt;a href="/2013/12/30/books-i-read-in-2013.html"&gt;years&lt;/a&gt; &lt;a href="/2012/12/31/books-i-read-in-2012.html"&gt;past&lt;/a&gt;. I spent a lot more time
drawing in my sketchbooks this year than I did reading. I managed to do a
sketch a day all the way up until October but then lost steam.&lt;/p&gt;
&lt;p&gt;It's also late because I tried to finish
&lt;a href="http://www.amazon.com/Europe-Central-William-T-Vollmann-ebook/dp/B002IEUV3M/ref=sr_1_1?ie=UTF8&amp;amp;qid=1420173489&amp;amp;sr=8-1&amp;amp;keywords=europe+central"&gt;Europe Central&lt;/a&gt;
by William T. Vollman before the year ended. But my Kindle says I still had
about 10 hours left last night so that didn't happen. Maybe it'll the first
post in my next books I read post.&lt;/p&gt;
&lt;p&gt;So, here's the list:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9781426899072&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Elvis Sightings&lt;/a&gt; by Ricardo Sanchez &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9781400062089&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Olive Kitteridge&lt;/a&gt; by Elizabeth Strout &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780425200407&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Generation Kill&lt;/a&gt; by Evan Wright &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780316034012&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The Unnamed&lt;/a&gt; by Joshua Ferris &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9781439142004&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The Flamethrowers&lt;/a&gt; by Rachel Kushner &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9781594489501&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;A Thousand Splendid Suns&lt;/a&gt; by Khaled Hosseini &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9781585425402&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Catching the Big Fish: Meditation, Consciousness, and Creativity&lt;/a&gt; by David Lynch &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9781594631764&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;And the Mountains Echoed&lt;/a&gt; by Khaled Hosseini &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780385351393&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The Circle&lt;/a&gt; by Dave Eggers &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780385528788&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;MaddAddam (MaddAddam Trilogy, #3)&lt;/a&gt; by Margaret Atwood &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780545010221&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Harry Potter and the Deathly Hallows (Harry Potter, #7)&lt;/a&gt; by J.K. Rowling &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780439784542&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Harry Potter and the Half-Blood Prince (Harry Potter, #6)&lt;/a&gt; by J.K. Rowling &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780439358071&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Harry Potter and the Order of the Phoenix (Harry Potter, #5)&lt;/a&gt; by J.K. Rowling &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780439139595&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Harry Potter and the Goblet of Fire (Harry Potter #4)&lt;/a&gt; by J.K. Rowling &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780439136358&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Harry Potter and the Prisoner of Azkaban (Harry Potter #3)&lt;/a&gt; by J.K. Rowling &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780439064866&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Harry Potter and the Chamber of Secrets (Harry Potter, #2)&lt;/a&gt; by J.K. Rowling &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780590353403&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Harry Potter and the Sorcerer's Stone (Harry Potter #1)&lt;/a&gt; by J.K. Rowling &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780812993806&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Tenth of December&lt;/a&gt; by George Saunders &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780307907172&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Sorry Please Thank You: Stories&lt;/a&gt; by Charles Yu &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780385528771&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The Year of the Flood (MaddAddam Trilogy, #2)&lt;/a&gt; by Margaret Atwood &lt;/li&gt;
&lt;li&gt;&lt;a
href="http://www.amazon.com/gp/search?keywords=9780805091748&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The
Checklist Manifesto: How to Get Things Right&lt;/a&gt; by Atul Gawande &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I ended up reading parts of the Harry Potter series to my kid (the wife and I
alternate reading to him), so I just decided to re-read the whole damned
series again this year to get the full package. Good thing too, because it
turns out I forgot lots of things when I speed read it the first time through
all those yeaers ago. I'm betting that the page count for this year is close
to previous years because of those damned door stops masquerading as books.&lt;/p&gt;
&lt;p&gt;Highlights of this year were &lt;a
href="http://www.amazon.com/gp/search?keywords=9781594631764&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;And
the Mountains Echoed&lt;/a&gt; and &lt;a
href="http://www.amazon.com/gp/search?keywords=9780385528788&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;MaddAddam&lt;/a&gt;.
I enjoyed &lt;a
href="http://www.amazon.com/gp/search?keywords=9780385351393&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The
Circle&lt;/a&gt; while I was reading it but a week or so after I had finished, I
realized it just left too many things unanswered. Not too sure about
recommending that one. But you can't really go wrong with anything by Hosseini
or Atwood methinks.&lt;/p&gt;</content><category term="reading"/><category term="books"/></entry><entry><title>Yet another blogging engine</title><link href="https://sethmason.com/2014/10/06/yet-another-blogging-engine.html" rel="alternate"/><published>2014-10-06T00:00:00-07:00</published><updated>2014-10-06T00:00:00-07:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2014-10-06:/2014/10/06/yet-another-blogging-engine.html</id><summary type="html">&lt;p&gt;Since David Lynch can &lt;a href="http://variety.com/2014/tv/news/twin-peaks-revival-to-air-on-showtime-in-2016-1201322329/"&gt;revive Twin Peaks&lt;/a&gt;, I figure I can relaunch this
dormant blog. I've redone this site and ditched the old
&lt;a href="http://jekyllrb.com/"&gt;Jekyll&lt;/a&gt; static site generator and decided to try out a
different generator named &lt;a href="http://getpelican.com"&gt;Pelican&lt;/a&gt; that's written in
Python.&lt;/p&gt;
&lt;p&gt;I never bothered to learn Ruby so when I …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Since David Lynch can &lt;a href="http://variety.com/2014/tv/news/twin-peaks-revival-to-air-on-showtime-in-2016-1201322329/"&gt;revive Twin Peaks&lt;/a&gt;, I figure I can relaunch this
dormant blog. I've redone this site and ditched the old
&lt;a href="http://jekyllrb.com/"&gt;Jekyll&lt;/a&gt; static site generator and decided to try out a
different generator named &lt;a href="http://getpelican.com"&gt;Pelican&lt;/a&gt; that's written in
Python.&lt;/p&gt;
&lt;p&gt;I never bothered to learn Ruby so when I ran into trouble with Jekyll, getting
it fixed was painful (to me). To Ruby programmers, probably not so much. Since
I'm a Python programmer, hopefully I wont' have as much trouble when things go
off the rails. Har har...rails...ruby...get it?&lt;/p&gt;
&lt;p&gt;Frankly, porting it over was kind of a pain in the arse. I had to jump through
a whole bunch of hoops with custom scripts and
&lt;a href="http://johnmacfarlane.net/pandoc/"&gt;Pandoc&lt;/a&gt; (which is a pretty incredible
piece of software) but that's all for a different post.&lt;/p&gt;
&lt;p&gt;Welcome to the new site. Sorry if I spammed your feed reader with all
my new article ids. Hope you still love me!&lt;/p&gt;
&lt;p&gt;And I want some of that damn good pie.&lt;/p&gt;</content><category term="personal"/><category term="blog"/></entry><entry><title>Books I Read in 2013</title><link href="https://sethmason.com/2013/12/30/books-i-read-in-2013.html" rel="alternate"/><published>2013-12-30T00:00:00-08:00</published><updated>2013-12-30T00:00:00-08:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2013-12-30:/2013/12/30/books-i-read-in-2013.html</id><summary type="html">&lt;p&gt;It's that time of the year again where I finally stop blowing off blogging and
write something. I should really whip up a script to do this since it's using
the &lt;a href="http://www.goodreads.com"&gt;Goodreads API&lt;/a&gt;. Then I'd never touch my
blogging software again!&lt;/p&gt;
&lt;p&gt;So, withtout futher ado, in reverse chronological order, the …&lt;/p&gt;</summary><content type="html">&lt;p&gt;It's that time of the year again where I finally stop blowing off blogging and
write something. I should really whip up a script to do this since it's using
the &lt;a href="http://www.goodreads.com"&gt;Goodreads API&lt;/a&gt;. Then I'd never touch my
blogging software again!&lt;/p&gt;
&lt;p&gt;So, withtout futher ado, in reverse chronological order, the 29 books I read in 2013:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780297859383&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Gone Girl&lt;/a&gt; by Gillian Flynn &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780385721677&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Oryx and Crake (MaddAddam Trilogy, #1)&lt;/a&gt; by Margaret Atwood &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780671726522&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Kon-Tiki&lt;/a&gt; by Thor Heyerdahl &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9781594204234&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Bleeding Edge&lt;/a&gt; by Thomas Pynchon &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9781583226988&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Bloodchild and Other Stories&lt;/a&gt; by Octavia E. Butler &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780007149827&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The Yiddish Policemen's Union&lt;/a&gt; by Michael Chabon &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9781400043927&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The Keep&lt;/a&gt; by Jennifer Egan &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9781934356005&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Programming Erlang&lt;/a&gt; by Joe Armstrong &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9781439148501&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Under the Dome&lt;/a&gt; by Stephen King &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780385522267&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Where Men Win Glory: The Odyssey of Pat Tillman&lt;/a&gt; by Jon Krakauer &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9781400033416&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Beloved&lt;/a&gt; by Toni Morrison &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780547054841&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Indignation&lt;/a&gt; by Philip Roth &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780307596901&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The Woman Upstairs&lt;/a&gt; by Claire Messud &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780061692048&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Canada&lt;/a&gt; by Richard Ford &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780307277718&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Everyman&lt;/a&gt; by Philip Roth &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780434018420&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The Gone-Away World&lt;/a&gt; by Nick Harkaway &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780192833594&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Great Expectations&lt;/a&gt; by Charles Dickens &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9781400076734&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Augustus&lt;/a&gt; by John Edward Williams &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780553807677&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;All Clear&lt;/a&gt; by Connie Willis &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780615682310&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;John Carter and the Gods of Hollywood&lt;/a&gt; by Michael D. Sellers &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780553562736&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Doomsday Book (Oxford Time Travel, #1)&lt;/a&gt; by Connie Willis &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780061493348&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Telegraph Avenue&lt;/a&gt; by Michael Chabon &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780553803198&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Blackout&lt;/a&gt; by Connie Willis &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/Redshirts-A-Novel-Three-Codas/dp/0765334798"&gt;Red Shirts&lt;/a&gt; by John Scalzi&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9781439167854&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;You're Not Doing It Right: Tales of Marriage, Sex, Death, and Other Humiliations&lt;/a&gt; by Michael Ian Black &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780224097376&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Sweet Tooth&lt;/a&gt; by Ian McEwan &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780553575385&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;To Say Nothing of the Dog (Oxford Time Travel, #2)&lt;/a&gt; by Connie Willis &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9781576469231&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The Scarlet Pimpernel&lt;/a&gt; by Emmuska Orczy &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9781590171998&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Stoner&lt;/a&gt; by John Edward Williams &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Books I enjoyed this year were &lt;a
href="http://www.amazon.com/gp/search?keywords=9780385721677&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Oryx
and Crake &lt;/a&gt; by Margaret Atwood, &lt;a
href="http://www.amazon.com/gp/search?keywords=9780553575385&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;To
Say Nothing of the Dog&lt;/a&gt; by Connie Willis (you could say that 2013 was the
Year of Connie Willis for me...she's great!), &lt;a
href="http://www.amazon.com/gp/search?keywords=9780061493348&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Telegraph
Avenue&lt;/a&gt; by Michael Chabon and &lt;a
href="http://www.amazon.com/gp/search?keywords=9780434018420&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The
Gone-Away World&lt;/a&gt; by Nick Harkaway.&lt;/p&gt;
&lt;p&gt;Oh, and &lt;a
href="http://www.amazon.com/gp/search?keywords=9781400033416&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Beloved&lt;/a&gt;.
Jeez that book was crazy good. I might read it again in 2014.&lt;/p&gt;
&lt;p&gt;If you really want to stay abreast of what I'm reading, follow &lt;a href="http://www.goodreads.com/slackorama"&gt; me on Goodreads&lt;/a&gt;. Otherwise, see you next year!&lt;/p&gt;</content><category term="reading"/><category term="books"/></entry><entry><title>Books I Read in 2012</title><link href="https://sethmason.com/2012/12/31/books-i-read-in-2012.html" rel="alternate"/><published>2012-12-31T00:00:00-08:00</published><updated>2012-12-31T00:00:00-08:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2012-12-31:/2012/12/31/books-i-read-in-2012.html</id><summary type="html">&lt;p&gt;Oy vey. So, it seems like I only post here once a year and it's only to list
books that I read. Well, at least I'm consistent right?&lt;/p&gt;
&lt;p&gt;I kind of went undead crazy this year what with reading the two Justin Cronin
books as well as Colson Whitehead's foray …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Oy vey. So, it seems like I only post here once a year and it's only to list
books that I read. Well, at least I'm consistent right?&lt;/p&gt;
&lt;p&gt;I kind of went undead crazy this year what with reading the two Justin Cronin
books as well as Colson Whitehead's foray into post-apocalyptic zombie prose.&lt;/p&gt;
&lt;p&gt;Favorites from this year include (in no particular order) &lt;a
href="http://www.amazon.com/gp/search?keywords=9780679745068&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Et
Tu, Babe&lt;/a&gt;, &lt;a
href="http://www.amazon.com/gp/search?keywords=9780375726408&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Empire
Falls&lt;/a&gt;, &lt;a
href="http://www.amazon.com/gp/search?keywords=9780385343831&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The
Tiger's Wife&lt;/a&gt; and &lt;a
href="http://www.amazon.com/gp/search?keywords=9780345459404&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Perdido
Street Station&lt;/a&gt;. &lt;a
href="http://www.amazon.com/gp/search?keywords=9780316126694&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The
Art of Fielding&lt;/a&gt; was really entertaining too though the ending was very strange.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780316057554&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Winter's Bone&lt;/a&gt; by Daniel Woodrell &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780142437209&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Jane Eyre&lt;/a&gt; by Charlotte Brontë &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780679745068&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Et Tu, Babe&lt;/a&gt; by Mark Leyner &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9781936365746&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;A Hologram for the King&lt;/a&gt; by Dave Eggers &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780345504982&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The Twelve (The Passage, #2)&lt;/a&gt; by Justin Cronin &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780385528078&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Zone One&lt;/a&gt; by Colson Whitehead &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9781449319793&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Python for Data Analysis&lt;/a&gt; by Wes McKinney &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780345504968&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The Passage (The Passage, #1)&lt;/a&gt; by Justin Cronin &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780375507250&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Cloud Atlas&lt;/a&gt; by David Mitchell &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9781439138311&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Brooklyn&lt;/a&gt; by Colm Tóibín &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780316126694&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The Art of Fielding&lt;/a&gt; by Chad Harbach &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780307887894&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The Lean Startup: How Today's Entrepreneurs Use Continuous Innovation to Create Radically Successful Businesses&lt;/a&gt; by Eric Ries &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780374271565&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The Submission&lt;/a&gt; by Amy Waldman &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780307887436&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Ready Player One&lt;/a&gt; by Ernest Cline &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780345458421&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Iron Council (New Crobuzon, #3)&lt;/a&gt; by China Miéville &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9781935182979&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;RabbitMQ in Action: Distributed Messaging for Everyone&lt;/a&gt; by Alvaro Videla &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780345497512&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The City &amp;amp; the City&lt;/a&gt; by China Miéville &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780307263995&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Swamplandia!&lt;/a&gt; by Karen Russell &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780345460011&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The Scar (New Crobuzon, #2)&lt;/a&gt; by China Miéville &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780547576725&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;We the Animals&lt;/a&gt; by Justin Torres &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780345459404&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Perdido Street Station (New Crobuzon, #1)&lt;/a&gt; by China Miéville &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780385343664&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The Imperfectionists&lt;/a&gt; by Tom Rachman &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780307269645&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;You are Not a Gadget&lt;/a&gt; by Jaron Lanier &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780688161125&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Replay&lt;/a&gt; by Ken Grimwood &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9781408808870&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The Finkler Question&lt;/a&gt; by Howard Jacobson &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780061054884&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The Dispossessed&lt;/a&gt; by Ursula K. Le Guin &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780385343831&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The Tiger's Wife&lt;/a&gt; by Téa Obreht &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9781451627282&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;11/22/63&lt;/a&gt; by Stephen King &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780375726408&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Empire Falls&lt;/a&gt; by Richard Russo &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780385334174&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Deadeye Dick&lt;/a&gt; by Kurt Vonnegut &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780743431675&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Call for the Dead (George Smiley, #1)&lt;/a&gt; by John le Carré &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780192801692&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The Secret Agent&lt;/a&gt; by Joseph Conrad &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780140285604&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Cat's Cradle&lt;/a&gt; by Kurt Vonnegut &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9781840224023&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Uncle Tom's Cabin&lt;/a&gt; by Harriet Beecher Stowe &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780140287820&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Death in Summer&lt;/a&gt; by William Trevor &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Full disclosure: Most of the book links on this page are Amazon affiliate
links so I get to pay off my bookie that much quicker if you buy something.&lt;/p&gt;</content><category term="reading"/><category term="books"/></entry><entry><title>Using Pandas to stalk your neighbors</title><link href="https://sethmason.com/2012/11/17/using-pandas-to-stalk-your-neighbors.html" rel="alternate"/><published>2012-11-17T00:00:00-08:00</published><updated>2012-11-17T00:00:00-08:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2012-11-17:/2012/11/17/using-pandas-to-stalk-your-neighbors.html</id><summary type="html">&lt;p&gt;I picked up the book &lt;a href="http://www.amazon.com/gp/product/1449319793/ref=as_li_ss_tl?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=1449319793&amp;amp;linkCode=as2&amp;amp;tag=slackorama-20"&gt;Python for Data Analysis&lt;/a&gt; as I've been seeing it
mentioned in quite a few places. And so far, it's great. A very good high
level overview of using &lt;a href="http://pandas.pydata.org"&gt;Pandas&lt;/a&gt;. No, not the cute kind of pandas. I'm
talking about the Python library for data analysis …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I picked up the book &lt;a href="http://www.amazon.com/gp/product/1449319793/ref=as_li_ss_tl?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=1449319793&amp;amp;linkCode=as2&amp;amp;tag=slackorama-20"&gt;Python for Data Analysis&lt;/a&gt; as I've been seeing it
mentioned in quite a few places. And so far, it's great. A very good high
level overview of using &lt;a href="http://pandas.pydata.org"&gt;Pandas&lt;/a&gt;. No, not the cute kind of pandas. I'm
talking about the Python library for data analysis. Derp.&lt;/p&gt;
&lt;p&gt;Anyhow, I decided to dive in and see what I could find out about my neighbors.
Chapter 9 of &lt;a href="http://www.amazon.com/gp/product/1449319793/ref=as_li_ss_tl?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=1449319793&amp;amp;linkCode=as2&amp;amp;tag=slackorama-20"&gt;the book&lt;/a&gt; goes into analyzing the
&lt;a href="http://www.fec.gov/disclosurep/PDownload.do"&gt;2012 Federal Election Commission Database&lt;/a&gt; so I loaded it up:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="gp"&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;pandas&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nn"&gt;pd&lt;/span&gt;
&lt;span class="gp"&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class="n"&gt;fec&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;pd&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;read_csv&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;P00000001-ALL.csv&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Looking into the data, there is some garbage rows. I grabbed all the Culver
City zip codes (well, the zip codes I care about) at least:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="gp"&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class="n"&gt;zips&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;fec&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;contbr_zip&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;unique&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="gp"&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class="n"&gt;mask&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;array&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;startswith&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;90232&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;zips&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;span class="gp"&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class="n"&gt;fec&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;fec&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;contbr_zip&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;isin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;zips&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;mask&lt;/span&gt;&lt;span class="p"&gt;])]&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;contbr_city&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;value_counts&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="go"&gt;CULVER CITY     241&lt;/span&gt;
&lt;span class="go"&gt;CUILVER CITY      2&lt;/span&gt;
&lt;span class="go"&gt;SANTA MONICA      1&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;I don't know if these come from bad data from the contributor or from the FEC so I'm just
going to include everything based on zip code.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="gp"&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class="n"&gt;culver&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;fec&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;fec&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;contbr_zip&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;isin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;zips&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;mask&lt;/span&gt;&lt;span class="p"&gt;])]&lt;/span&gt;
&lt;span class="gp"&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class="n"&gt;culver&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;contb_receipt_amt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sum&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="go"&gt;58341.0&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Fifty-eight grand! Nice going Culver City!&lt;/p&gt;
&lt;p&gt;Now let's see who got the money:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="gp"&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class="n"&gt;culver&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;pivot_table&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;contb_receipt_amt&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;rows&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;cand_nm&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;aggfunc&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;sum&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="go"&gt;cand_nm&lt;/span&gt;
&lt;span class="go"&gt;Huntsman, Jon                      4500&lt;/span&gt;
&lt;span class="go"&gt;Obama, Barack                     50381&lt;/span&gt;
&lt;span class="go"&gt;Paul, Ron                           500&lt;/span&gt;
&lt;span class="go"&gt;Roemer, Charles E. &amp;#39;Buddy&amp;#39; III      110&lt;/span&gt;
&lt;span class="go"&gt;Romney, Mitt                       2850&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;That's kind of interesting...Huntsman got more money from the 90232 than
Romney.&lt;/p&gt;
&lt;p&gt;Now, let's check out the occupations that contributed the most:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="gp"&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class="n"&gt;culver&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;pivot_table&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;contb_receipt_amt&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;rows&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;contbr_occupation&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="gp"&gt;... &lt;/span&gt;&lt;span class="n"&gt;aggfunc&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;sum&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;order&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ascending&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;False&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;head&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="go"&gt;contbr_occupation&lt;/span&gt;
&lt;span class="go"&gt;RETIRED                               7272.0&lt;/span&gt;
&lt;span class="go"&gt;ACCOUNT MANAGER                       5000.0&lt;/span&gt;
&lt;span class="go"&gt;VICE PRESIDENT, INTERNET MARKETING    4000.0&lt;/span&gt;
&lt;span class="go"&gt;PROFESSOR                             2800.5&lt;/span&gt;
&lt;span class="go"&gt;PRESIDENT &amp;amp; C.E.O.                    2500.0&lt;/span&gt;
&lt;span class="go"&gt;GALLERY OWNER                         2500.0&lt;/span&gt;
&lt;span class="go"&gt;BOOKKEEPER                            2500.0&lt;/span&gt;
&lt;span class="go"&gt;HOMEMAKER                             1971.0&lt;/span&gt;
&lt;span class="go"&gt;INTERIOR DESIGNER                     1500.0&lt;/span&gt;
&lt;span class="go"&gt;WRITER                                1410.0&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Retirees going large.  That's kind of interesting. Let's look at that.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="gp"&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class="n"&gt;culver&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;culver&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;contbr_occupation&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;RETIRED&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;pivot_table&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="gp"&gt;... &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;contb_receipt_amt&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;rows&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;cand_nm&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;aggfunc&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;sum&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="go"&gt;cand_nm&lt;/span&gt;
&lt;span class="go"&gt;Obama, Barack                     7162&lt;/span&gt;
&lt;span class="go"&gt;Roemer, Charles E. &amp;#39;Buddy&amp;#39; III      10&lt;/span&gt;
&lt;span class="go"&gt;Romney, Mitt                       100&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Maybe I misunderstand our local retirees (at least the ones I've met) but this was
surprising to me. I really expected Romney to come out on top.&lt;/p&gt;
&lt;p&gt;I think that's enough peeking into my neighbors contributions habits for one
night. I have to say &lt;a href="http://pandas.pydata.org"&gt;Pandas&lt;/a&gt; makes this sort of thing really easy.
I've only scratched the surface here. There's lots more that one can do
(mathematically speaking) with Panads. &lt;a href="http://www.amazon.com/gp/product/1449319793/ref=as_li_ss_tl?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=1449319793&amp;amp;linkCode=as2&amp;amp;tag=slackorama-20"&gt;Python for Data Analysis&lt;/a&gt; gives
you a really good introduction to Pandas and then &lt;a href="http://pandas.pydata.org"&gt;the webiste&lt;/a&gt; fills
in the gaps.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.amazon.com/gp/product/1449319793/ref=as_li_ss_tl?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=1449319793&amp;amp;linkCode=as2&amp;amp;tag=slackorama-20"&gt;Python for Data Analysis&lt;/a&gt; and Panads get two thumbs up from me. Thanks
to &lt;a href="http://oreilly.com/"&gt;O'Reilly&lt;/a&gt; and &lt;a href="http://blog.wesmckinney.com/"&gt;Wes McKinney&lt;/a&gt;.&lt;/p&gt;</content><category term="programming"/><category term="python"/><category term="pandas"/></entry><entry><title>Python and Spotify Together At Last</title><link href="https://sethmason.com/2012/01/26/python-and-spotify-together-at-last.html" rel="alternate"/><published>2012-01-26T00:00:00-08:00</published><updated>2012-01-26T00:00:00-08:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2012-01-26:/2012/01/26/python-and-spotify-together-at-last.html</id><summary type="html">&lt;p&gt;Here's a simple script to show the currently playing song in Spotify. All you
have to do is put it on your &lt;code&gt;$PATH&lt;/code&gt; and run:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="go"&gt;&amp;gt; nowplaying&lt;/span&gt;
&lt;span class="go"&gt;The Unsinkable Fats Domino by Guided By Voices&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;While this is handy in and of itself (to some people), if you are running
&lt;a href="http://www.gnu.org/software/screen/"&gt;GNU …&lt;/a&gt;&lt;/p&gt;</summary><content type="html">&lt;p&gt;Here's a simple script to show the currently playing song in Spotify. All you
have to do is put it on your &lt;code&gt;$PATH&lt;/code&gt; and run:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="go"&gt;&amp;gt; nowplaying&lt;/span&gt;
&lt;span class="go"&gt;The Unsinkable Fats Domino by Guided By Voices&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;While this is handy in and of itself (to some people), if you are running
&lt;a href="http://www.gnu.org/software/screen/"&gt;GNU Screen&lt;/a&gt;, you can have it output the
currently playing song in your statusline. Just add the following to your &lt;code&gt;.screenrc&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="go"&gt;backtick 101 5 5 /home/YOURNAME/bin/nowplaying&lt;/span&gt;
&lt;span class="go"&gt;hardstatus string  &amp;#39;%101`&amp;#39;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;If you already have a &lt;code&gt;hardstatus&lt;/code&gt; (or &lt;code&gt;caption&lt;/code&gt;) line, you'll just need to
add &lt;code&gt;%101&lt;/code&gt; in there somewhere. Then, you'll have the currently playing song
easily available.&lt;/p&gt;
&lt;p&gt;For info about what the above does, see the &lt;a href="http://www.gnu.org/software/screen/manual/html_node/Backtick.html"&gt;GNU Screen manual about backtick&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Here's the entire script:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="ch"&gt;#!/usr/bin/env python&lt;/span&gt;
&lt;span class="sd"&gt;&amp;quot;&amp;quot;&amp;quot;Spit out the currently playing song.&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;dbus&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;sys&lt;/span&gt;

&lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;bus&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;dbus&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Bus&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;dbus&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Bus&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;TYPE_SESSION&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;spotify&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;bus&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;get_object&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;com.spotify.qt&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;/&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;info&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;spotify&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;GetMetadata&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="k"&gt;except&lt;/span&gt; &lt;span class="n"&gt;dbus&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;exceptions&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;DBusException&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;Spotify is not running&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;exit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;track&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;
&lt;span class="n"&gt;trackMap&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;artist&amp;#39;&lt;/span&gt;    &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;xesam:artist&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
             &lt;span class="s1"&gt;&amp;#39;album&amp;#39;&lt;/span&gt;     &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;xesam:album&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
             &lt;span class="s1"&gt;&amp;#39;title&amp;#39;&lt;/span&gt;     &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;xesam:title&amp;#39;&lt;/span&gt;
             &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;trackMap&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;items&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;info&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;continue&lt;/span&gt;
    &lt;span class="n"&gt;piece&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;info&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nb"&gt;isinstance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;piece&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;list&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;piece&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;, &amp;#39;&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;piece&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;track&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;piece&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;encode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;utf-8&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;track&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;has_key&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;title&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;track&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;has_key&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;artist&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;&lt;/span&gt;&lt;span class="si"&gt;%s&lt;/span&gt;&lt;span class="s1"&gt; by &lt;/span&gt;&lt;span class="si"&gt;%s&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;track&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;title&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="n"&gt;track&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;artist&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;]))&lt;/span&gt;
&lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;No song playing&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;If you want Spotify to use the built-in notifier in Ubuntu, then by all means
check out &lt;a href="http://code.google.com/p/spotify-notify/"&gt;Spotify-notify&lt;/a&gt;. It also
adds support for media keys.&lt;/p&gt;</content><category term="music"/><category term="python"/><category term="spotify"/></entry><entry><title>Books I Read in 2011</title><link href="https://sethmason.com/2011/12/21/books-i-read-in-2011.html" rel="alternate"/><published>2011-12-21T00:00:00-08:00</published><updated>2011-12-21T00:00:00-08:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2011-12-21:/2011/12/21/books-i-read-in-2011.html</id><summary type="html">&lt;p&gt;So, it's been over a year since &lt;a href="https://sethmason.com/2010/12/07/books-i-read-in-2010.html"&gt;my last "Books I Read"&lt;/a&gt; post so it's time
I suppose. Only 28 books this year but this includes the behemoths that make up the first
five books of the &lt;a href="http://en.wikipedia.org/wiki/A_song_of_ice_and_fire"&gt;A Song Ice and
Fire&lt;/a&gt; series so my page count is probably a …&lt;/p&gt;</summary><content type="html">&lt;p&gt;So, it's been over a year since &lt;a href="https://sethmason.com/2010/12/07/books-i-read-in-2010.html"&gt;my last "Books I Read"&lt;/a&gt; post so it's time
I suppose. Only 28 books this year but this includes the behemoths that make up the first
five books of the &lt;a href="http://en.wikipedia.org/wiki/A_song_of_ice_and_fire"&gt;A Song Ice and
Fire&lt;/a&gt; series so my page count is probably a bit higher this year.  Hrm, that
might be the job for a different script.&lt;/p&gt;
&lt;p&gt;Looking over the list, books that stand out for me  this year include &lt;a
href="http://www.amazon.com/gp/search?keywords=9780141439617&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The
Woman in White&lt;/a&gt;, &lt;a
href="http://www.amazon.com/gp/search?keywords=9780062049803&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;State
of Wonder&lt;/a&gt; and &lt;a href="http://www.amazon.com/gp/product/0307477479/ref=as_li_ss_tl?ie=UTF8&amp;amp;tag=slackorama-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=0307477479"&gt;A Visit from the Goon Squad&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you want up to the minute updates, I suggest you follow me on &lt;a href="http://www.goodreads.com/user/show/1519786-slackorama"&gt;Goodreads&lt;/a&gt;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780553801477&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;A Dance With Dragons (A Song of Ice and Fire, #5)&lt;/a&gt; by George R.R. Martin &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780553582024&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;A Feast for Crows (A Song of Ice and Fire, #4)&lt;/a&gt; by George R.R. Martin &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780553573428&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;A Storm of Swords (A Song of Ice and Fire, #3)&lt;/a&gt; by George R.R. Martin &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780553381696&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;A Clash of Kings (A Song of Ice and Fire, #2)&lt;/a&gt; by George R.R. Martin &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780062049803&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;State of Wonder&lt;/a&gt; by Ann Patchett &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780330419123&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Under the Banner of Heaven: A Story of Violent Faith&lt;/a&gt; by Jon Krakauer &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780307346605&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;World War Z: An Oral History of the Zombie War&lt;/a&gt; by Max Brooks &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780679603597&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Super Sad True Love Story&lt;/a&gt; by Gary Shteyngart &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9781400052172&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The Immortal Life of Henrietta Lacks&lt;/a&gt; by Rebecca Skloot &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780553588484&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;A Game of Thrones (A Song of Ice and Fire, #1)&lt;/a&gt; by George R.R. Martin &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9781594203046&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The Kid&lt;/a&gt; by Sapphire &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/product/0307477479/ref=as_li_ss_tl?ie=UTF8&amp;amp;tag=slackorama-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=0307477479"&gt;A Visit from the Goon Squad&lt;/a&gt; by Jennifer Egan&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780385341073&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Mister Pip&lt;/a&gt; by Lloyd Jones &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780066211312&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Just Kids&lt;/a&gt; by Patti Smith &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780393328622&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The History of Love&lt;/a&gt; by Nicole Krauss &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780375504945&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;A World on Fire: Britain's Crucial Role in the American Civil War&lt;/a&gt; by Amanda Foreman &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780375757853&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The Moonstone&lt;/a&gt; by Wilkie Collins &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780141439617&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The Woman in White&lt;/a&gt; by Wilkie Collins &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780192835086&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The Adventures of Sherlock Holmes&lt;/a&gt; by Arthur Conan Doyle &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780385523790&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Master of Shadows: The Secret Diplomatic Career of the Painter Peter Paul Rubens&lt;/a&gt; by Mark Lamster &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780375757327&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Robinson Crusoe&lt;/a&gt; by Daniel Defoe &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780321683915&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Test-Driven JavaScript Development&lt;/a&gt; by Christian Johansen &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9781934356500&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Pomodoro Technique Illustrated: Can You Focus - Really Focus - for 25 Minutes?&lt;/a&gt; by Noteberg  Staffan &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9781609419691&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Bossypants&lt;/a&gt; by Tina Fey &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9781156188743&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;At the Mountains of Madness&lt;/a&gt; by H.P. Lovecraft &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780976694021&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Behind Closed Doors: Secrets of Great Management&lt;/a&gt; by Johanna Rothman &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780230712591&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;City of Ruin (Legends of the Red Sun, #2)&lt;/a&gt; by Mark Charan Newton &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780679783268&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Pride and Prejudice&lt;/a&gt; by Jane Austen &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Full disclosure: Most of the book links on this page are Amazon affiliate
links so I get some coin when you buy something.&lt;/p&gt;</content><category term="reading"/><category term="books"/></entry><entry><title>The Big Easy 2011</title><link href="https://sethmason.com/2011/11/10/the-big-easy-2011.html" rel="alternate"/><published>2011-11-10T00:00:00-08:00</published><updated>2011-11-10T00:00:00-08:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2011-11-10:/2011/11/10/the-big-easy-2011.html</id><summary type="html">&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; &lt;em&gt;I use quite a bit of software.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;For no particular reason other than I need to post something to make up for
 all the times I didn't post (and because I love making lists), here's a list of the software that I use day to day.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.ubuntu.org"&gt;Ubuntu&lt;/a&gt;: My …&lt;/li&gt;&lt;/ul&gt;</summary><content type="html">&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; &lt;em&gt;I use quite a bit of software.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;For no particular reason other than I need to post something to make up for
 all the times I didn't post (and because I love making lists), here's a list of the software that I use day to day.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.ubuntu.org"&gt;Ubuntu&lt;/a&gt;: My main machine is running Ubuntu 11.04. I've got other
    boxes running older versions of Ubuntu (as well as OS X) but this is where
    my hat hangs for the time being. Speaking of hanging, Unity almost made me
    want to hang myself but I think I have it dialed into where I like
    it. Hidden inside the Compiz settings are some sweet keyboard shortcuts for
    windows management, which is the only reason I tried out &lt;a href="http://xmonad.org"&gt;xmonad&lt;/a&gt; for as
    long as I did.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://gnu.org/s/emacs"&gt;GNU Emacs&lt;/a&gt;: Emacs is probably where I spend about 90% of my
    day. I've got it to the point where I hardly touch the configuration files
    anymore. People complain that emacs users spend tons of time fiddling with
    settings but you have to average that over the lifespan of you using the
    software. So the time setting it up isn't that much really. Emacs probably
    demands its own post about all the packages that I use come to think of it.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.google.com/chrome"&gt;Google Chrome&lt;/a&gt;: Yep, I ditched &lt;a href="http://www.getfirefox.com"&gt;Firefox&lt;/a&gt;. Chrome just
    seems a lot faster and the developer tools are built in and rock
    solid. Seeing as how Firebug was staring to cause me to stab my eyes out,
    I'm quite happy now.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.dropbox.com"&gt;Dropbox&lt;/a&gt;: This is a service that I actually pay for. At my last
    job, dropbox was blocked and it made my life kind hellish. Without it, all
    my ebooks, projects and personal wiki are inaccessible.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.keepassx.org"&gt;KeePassX&lt;/a&gt;: The older the get, the more I forget. And when it
    comes to the bazillions of passwords I need to remember for various sites, I
    rely on KeePassX. Open source and available on multiple platforms, it's a
    keeper. Har har! Get it? Keeper. KeePassX. I should move over to marketing.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.spotify.com"&gt;Spotify&lt;/a&gt;: Another service that I pay for. The huge selection of
    songs and the integration with Facebook make it kind of hard to pass
    up. I mention Facebook because it's good fun to queue up &lt;a href="http://open.spotify.com/track/5Sa2OJjh3yX9fmkCdXTCeN"&gt;weird
    songs&lt;/a&gt; so they end up on your wall and your Mom gets to see it.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://git-scm.com"&gt;Git&lt;/a&gt;: Yeah, I spend way too much time in git but I use it and it
    suits my software development needs. So much so, that I use git to interact
    with our Subversion repository at work.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.rememberthemilk.com"&gt;Remeber the Milk&lt;/a&gt;: Another piece of software that I pay for. I know
    this is technically a web service but I have software installed for it on
       my phone and tablet so I'm lumping this into the software post.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://software.schmorp.de/pkg/rxvt-unicode.html"&gt;urxvt&lt;/a&gt;: I'm using this less and less now that I've been using
    &lt;a href="http://www.masteringemacs.org/articles/2010/11/01/running-shells-in-emacs-overview/"&gt;Emacs to run my shell&lt;/a&gt; but when I need to run complex
     commands, this is the termianal I turn to. My shell of choice is &lt;a href="http://www.zsh.org"&gt;Zsh&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://github.com/robbyrussell/oh-my-zsh"&gt;Oh My Zsh!&lt;/a&gt;: Speaking of Zsh, this is a great collection of very
    useful Zsh configurations and aliases which make working with Zsh very
    very nice.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://github.com/docwhat/homedir"&gt;homedir&lt;/a&gt;: I don't know how I exactly found homedir but it's very
    sweet. It's basically a small package manager for your home directory. I
    use to keep all configurations the same across machines. And where I need a
    machine specific configuration, homedir comes to the rescue. I don't
    really use this day to day but thought it was worth mentioning because
    it's saved my bacon a few times.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That about wraps up what I'm using day to day. I use other things on-and-off
(like LibreOffice -- &lt;em&gt;shudder&lt;/em&gt;) but didn't think they were worth putting in the post.&lt;/p&gt;</content><category term="personal"/><category term="software"/></entry><entry><title>Moustaches For Good!</title><link href="https://sethmason.com/2011/11/03/moustaches-for-good.html" rel="alternate"/><published>2011-11-03T00:00:00-07:00</published><updated>2011-11-03T00:00:00-07:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2011-11-03:/2011/11/03/moustaches-for-good.html</id><summary type="html">&lt;p&gt;Sooo...hey! How ya' doing? Long time no see. Hope you've been well. Aside from
being broken up over the breakdown of &lt;a href="http://decafbad.com/blog/2011/11/01/readerpocalypse"&gt;Google Reader&lt;/a&gt;, I've also been
busy growing a moustache for Movember.&lt;/p&gt;
&lt;p&gt;You can donate to my cause at &lt;a href="http://mobro.co/sethmason"&gt;http://mobro.co/sethmason&lt;/a&gt;.  Feel free to pass
it around …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Sooo...hey! How ya' doing? Long time no see. Hope you've been well. Aside from
being broken up over the breakdown of &lt;a href="http://decafbad.com/blog/2011/11/01/readerpocalypse"&gt;Google Reader&lt;/a&gt;, I've also been
busy growing a moustache for Movember.&lt;/p&gt;
&lt;p&gt;You can donate to my cause at &lt;a href="http://mobro.co/sethmason"&gt;http://mobro.co/sethmason&lt;/a&gt;.  Feel free to pass
it around!&lt;/p&gt;</content><category term="personal"/><category term="donate"/><category term="movember"/></entry><entry><title>JSLint and git blame for fun and profit</title><link href="https://sethmason.com/2011/05/04/jslint-and-git-blame-for-fun-and-profit.html" rel="alternate"/><published>2011-05-04T00:00:00-07:00</published><updated>2011-05-04T00:00:00-07:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2011-05-04:/2011/05/04/jslint-and-git-blame-for-fun-and-profit.html</id><summary type="html">&lt;p&gt;For some unknown reason, we have a problem with superfluous trailing commas at
work in our JavaScript. It's probably because we have a bunch of Perl
developers writing JavaScript. Unfortunately, this doesn't play well in a
world with Internet Explorer.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.jslint.com"&gt;JSLint&lt;/a&gt; makes this easy enough to track down. But I …&lt;/p&gt;</summary><content type="html">&lt;p&gt;For some unknown reason, we have a problem with superfluous trailing commas at
work in our JavaScript. It's probably because we have a bunch of Perl
developers writing JavaScript. Unfortunately, this doesn't play well in a
world with Internet Explorer.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.jslint.com"&gt;JSLint&lt;/a&gt; makes this easy enough to track down. But I
wanted something more. I wanted to know who the culprits were. Thus, I whipped
up this little script that'll take a list of files and tell you who committed
a file with a trailing comma in it. Besides, JSLint, You'll need
&lt;a href="https://www.mozilla.org/rhino/"&gt;Rhino&lt;/a&gt; and a script to execute commands
(named runtime.js). I'll try and post that later.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="c1"&gt;// blame_comma.js -- loop through the files passed in and see who has&lt;/span&gt;
&lt;span class="c1"&gt;// commas in them&lt;/span&gt;

&lt;span class="c1"&gt;// find ../htdocs/js/ECM -type f -name &amp;quot;*.js&amp;quot; -print | \&lt;/span&gt;
&lt;span class="c1"&gt;// xargs java -classpath \&lt;/span&gt;
&lt;span class="c1"&gt;//   /usr/share/yuicompressor-2.4.2/lib/rhino-1.6R7.jar \&lt;/span&gt;
&lt;span class="c1"&gt;//   org.mozilla.javascript.tools.shell.Main blame_comma.js&lt;/span&gt;

&lt;span class="nx"&gt;load&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;fulljslint.js&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;load&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;runtime.js&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;bad_files&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{};&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;file&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nx"&gt;js&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;readFile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;file&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;success&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;JSLINT&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;js&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nx"&gt;browser&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nx"&gt;undef&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nx"&gt;newcap&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nx"&gt;indent&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nx"&gt;predef&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Ext&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;ECM&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;ActiveXObject&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;window&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;                     &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;TestCase&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;document&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;assertTrue&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;sinon&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;gt&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;success&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;errors&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;JSLINT&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;errors&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;j&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="nx"&gt;j&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;errors&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="nx"&gt;j&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;                &lt;/span&gt;&lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;errors&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;j&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;span class="w"&gt;                &lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;reason&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;reason&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;match&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/Extra comma/&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;                    &lt;/span&gt;&lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;cmd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;git blame -L&amp;#39;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;line&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;, &amp;#39;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;
&lt;span class="w"&gt;                              &lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;line&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39; -- &amp;#39;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;file&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;                    &lt;/span&gt;&lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;output&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;runtime&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;exec&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;cmd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="w"&gt;                    &lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;bad_files&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;file&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;                        &lt;/span&gt;&lt;span class="nx"&gt;bad_files&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;file&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[];&lt;/span&gt;
&lt;span class="w"&gt;                    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="w"&gt;                    &lt;/span&gt;&lt;span class="nx"&gt;bad_files&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;file&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;push&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;output&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="w"&gt;                &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ow"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;bad_files&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;bad_files&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;hasOwnProperty&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nx"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;\n&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;errors&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;bad_files&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;errors&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;                &lt;/span&gt;&lt;span class="nx"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;errors&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;})(&lt;/span&gt;&lt;span class="nx"&gt;arguments&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Like most of the stuff I seem to do lately, this is available as a
&lt;a href="https://gist.github.com/947059"&gt;gist on GitHub&lt;/a&gt;. Let me know if you see
anything you like.&lt;/p&gt;</content><category term="programming"/><category term="git"/><category term="jslint"/><category term="tip"/></entry><entry><title>Beautify your JavaScript in Emacs</title><link href="https://sethmason.com/2011/04/28/beautify-your-javascript-in-emacs.html" rel="alternate"/><published>2011-04-28T00:00:00-07:00</published><updated>2011-04-28T00:00:00-07:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2011-04-28:/2011/04/28/beautify-your-javascript-in-emacs.html</id><summary type="html">&lt;p&gt;I know you'll find this hard to believe dear reader but I'm a big fan of
using Emacs to write  JavaScript. One thing that irked me in the past is
that none of the libraries got the indentation and other formatting how I
wanted. Luckily, I recently stumbled onto
&lt;a href="http://jsbeautifier.org/"&gt;js-beautify …&lt;/a&gt;&lt;/p&gt;</summary><content type="html">&lt;p&gt;I know you'll find this hard to believe dear reader but I'm a big fan of
using Emacs to write  JavaScript. One thing that irked me in the past is
that none of the libraries got the indentation and other formatting how I
wanted. Luckily, I recently stumbled onto
&lt;a href="http://jsbeautifier.org/"&gt;js-beautify&lt;/a&gt; (via the most excellent
&lt;a href="http://jsfiddle.net"&gt;jsFiddle&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Lo and behold, there is a command line interface to beautifying
JavaScript! Good thing Emacs can call shell commands on text so easily.  Thus,
we have:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="c1"&gt;;;; js-beautify.el -- beautify some js code&lt;/span&gt;

&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;defgroup&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;js-beautify&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;nil&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;Use jsbeautify to beautify some js&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nv"&gt;:group&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;&amp;#39;editing&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;defcustom&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;js-beautify-args&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;--jslint-happy --brace-style=end-expand&lt;/span&gt;
&lt;span class="s"&gt;--keep-array-indentation&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;Arguments to pass to jsbeautify script&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nv"&gt;:type&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;string&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nv"&gt;:group&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;&amp;#39;js-beautify&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;defcustom&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;js-beautify-path&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;~/projects/js-beautify/python/jsbeautifier.py&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;Path to jsbeautifier python file&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nv"&gt;:type&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;string&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nv"&gt;:group&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;&amp;#39;js-beautify&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;defun&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;js-beautify&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;Beautify a region of javascript using the code from jsbeautify.org&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;interactive&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;let&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nf"&gt;orig-point&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;point&lt;/span&gt;&lt;span class="p"&gt;)))&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;unless&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;mark&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;mark-defun&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;shell-command-on-region&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;point&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;                             &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;mark&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;                             &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;concat&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;python &amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;                                     &lt;/span&gt;&lt;span class="nv"&gt;js-beautify-path&lt;/span&gt;
&lt;span class="w"&gt;                                     &lt;/span&gt;&lt;span class="s"&gt;&amp;quot; --stdin &amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;                                     &lt;/span&gt;&lt;span class="nv"&gt;js-beautify-args&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;                             &lt;/span&gt;&lt;span class="nv"&gt;nil&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;t&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;goto-char&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;orig-point&lt;/span&gt;&lt;span class="p"&gt;)))&lt;/span&gt;

&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;provide&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;&amp;#39;js-beautify&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;;;; js-beautify.el ends here&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;I like it so much I have bound to M-t (for tidy) in a mode hook:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;local-set-key&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;&lt;/span&gt;&lt;span class="se"&gt;\M&lt;/span&gt;&lt;span class="s"&gt;-t&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;&amp;#39;js-beautify&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;If you want to follow any updates, I've put this snippet up as a &lt;a href="https://gist.github.com/712405"&gt;Gist on
GitHub&lt;/a&gt; so feel free to clone and send me any
pull requests.&lt;/p&gt;</content><category term="editor"/><category term="javascript"/><category term="emacs"/><category term="beautify"/></entry><entry><title>Toggler in Ext JS</title><link href="https://sethmason.com/2011/04/02/toggler-in-ext-js.html" rel="alternate"/><published>2011-04-02T00:00:00-07:00</published><updated>2011-04-02T00:00:00-07:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2011-04-02:/2011/04/02/toggler-in-ext-js.html</id><summary type="html">&lt;p&gt;Since it has been awhile since I last posted and we started using
&lt;a href="http://www.sencha.com/products/extjs/"&gt;Ext JS&lt;/a&gt; at
&lt;a href="http://www.cheetahmail.com"&gt;work&lt;/a&gt;, I thought I'd post a little snippet
JavaScript for setting up a link that toggles something. &lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="c1"&gt;// create a toggler link...is there a better way?&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;toggler&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ow"&gt;new&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Ext&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;BoxComponent&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nx"&gt;autoEl&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nx"&gt;tag&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;a …&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</summary><content type="html">&lt;p&gt;Since it has been awhile since I last posted and we started using
&lt;a href="http://www.sencha.com/products/extjs/"&gt;Ext JS&lt;/a&gt; at
&lt;a href="http://www.cheetahmail.com"&gt;work&lt;/a&gt;, I thought I'd post a little snippet
JavaScript for setting up a link that toggles something. &lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="c1"&gt;// create a toggler link...is there a better way?&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;toggler&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ow"&gt;new&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Ext&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;BoxComponent&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nx"&gt;autoEl&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nx"&gt;tag&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;a&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nx"&gt;href&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;#&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nx"&gt;html&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;All&amp;#39;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nx"&gt;listeners&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;render&amp;#39;&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;comp&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;el&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;comp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getEl&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nx"&gt;el&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;on&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
&lt;span class="w"&gt;                &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;click&amp;#39;&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;                    &lt;/span&gt;&lt;span class="nx"&gt;scope&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;comp&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;                    &lt;/span&gt;&lt;span class="nx"&gt;fn&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;element&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;                        &lt;/span&gt;&lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;stopEvent&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="w"&gt;                        &lt;/span&gt;&lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getEl&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;dom&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;innerHTML&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;                        &lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;toggle&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;All&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;None&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="w"&gt;                        &lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;update&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="w"&gt;                        &lt;/span&gt;&lt;span class="c1"&gt;// do your toggling here&lt;/span&gt;
&lt;span class="w"&gt;                    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="w"&gt;                &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Because it's an instance of
&lt;a href="http://dev.sencha.com/deploy/dev/docs/?class=Ext.Component"&gt;Ext.Component&lt;/a&gt; it
can easily be added to a
&lt;a href="http://dev.sencha.com/deploy/dev/docs/?class=Ext.Component"&gt;Ext.Container&lt;/a&gt; so
it's a tad more reusable than a straight up select.  At least I think so.&lt;/p&gt;
&lt;p&gt;Questions and comments welcome.&lt;/p&gt;</content><category term="programming"/><category term="javascript"/><category term="extjs"/></entry><entry><title>Books I Read in 2010</title><link href="https://sethmason.com/2010/12/07/books-i-read-in-2010.html" rel="alternate"/><published>2010-12-07T00:00:00-08:00</published><updated>2010-12-07T00:00:00-08:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2010-12-07:/2010/12/07/books-i-read-in-2010.html</id><summary type="html">&lt;p&gt;I was messing around with the &lt;a href="http://www.goodreads.com/api"&gt;Goodreads API&lt;/a&gt; and generated a list of
books I read in 2010.  Here they are in reverse order:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9781934356340&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The Passionate Programmer: Creating a Remarkable Career in Software Development&lt;/a&gt; by Chad Fowler &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780374158460&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Freedom&lt;/a&gt; by Jonathan Franzen &lt;/li&gt;
&lt;li&gt;Program or be Programmed: Ten Commands for a Digital …&lt;/li&gt;&lt;/ul&gt;</summary><content type="html">&lt;p&gt;I was messing around with the &lt;a href="http://www.goodreads.com/api"&gt;Goodreads API&lt;/a&gt; and generated a list of
books I read in 2010.  Here they are in reverse order:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9781934356340&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The Passionate Programmer: Creating a Remarkable Career in Software Development&lt;/a&gt; by Chad Fowler &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780374158460&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Freedom&lt;/a&gt; by Jonathan Franzen &lt;/li&gt;
&lt;li&gt;Program or be Programmed: Ten Commands for a Digital Age&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780307379207&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;How to Live Safely in a Science Fictional Universe&lt;/a&gt; by Charles Yu &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780759547636&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;How Would You Move Mount Fuji?&lt;/a&gt; by William Poundstone &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780743204804&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The First National Bank of Dad: The Best Way to Teach Kids About Money&lt;/a&gt; by David Owen &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780439023511&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Mockingjay (The Hunger Games, #3)&lt;/a&gt; by Suzanne Collins &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780439023498&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Catching Fire (The Hunger Games, #2)&lt;/a&gt; by Suzanne Collins &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780439023481&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The Hunger Games (The Hunger Games, #1)&lt;/a&gt; by Suzanne Collins &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780374299255&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Lush Life&lt;/a&gt; by Richard Price &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780446610384&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Parable of the Talents&lt;/a&gt; by Octavia E. Butler &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780230712584&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Nights of Villjamur (Legends of the Red Sun, #1)&lt;/a&gt; by Mark Charan Newton &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780765346124&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The Eye of the Heron&lt;/a&gt; by Ursula K. Le Guin &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780451526915&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Arrowsmith&lt;/a&gt; by Sinclair Lewis &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780452284845&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The Young Wan&lt;/a&gt; by Brendan O'Carroll &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780446675505&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Parable of the Sower&lt;/a&gt; by Octavia E. Butler &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780307269997&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The Girl Who Kicked the Hornet's Nest&lt;/a&gt; by Stieg Larsson &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780307269980&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The Girl Who Played with Fire&lt;/a&gt; by Stieg Larsson &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9781439127957&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Circles&lt;/a&gt; by James Burke &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780470156032&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Honey, I Wrecked the Kids: When Yelling, Screaming, Threats, Bribes, Time-outs, Sticker Charts and Removing Privileges All Don't Work&lt;/a&gt; by Alyson Schafer &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780671540661&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The Shadow of the Torturer (The Book of the New Sun, #1)&lt;/a&gt; by Gene Wolfe &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780446504126&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;NurtureShock: New Thinking About Children&lt;/a&gt; by Po Bronson &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780439227148&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The Call of the Wild&lt;/a&gt; by Jack London &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9781439152928&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Between the Assassinations&lt;/a&gt; by Aravind Adiga &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780385528177&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Getting Organized in the Google Era: How to Get Stuff out of Your Head, Find It When You Need It, and Get It Done Right&lt;/a&gt; by Douglas C. Merrill &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780140149869&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;The South&lt;/a&gt; by Colm Tóibín &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9781402179624&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Two Years Before the Mast: A Sailor's Life at Sea&lt;/a&gt; by Richard Henry Dana Jr. &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780071431187&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Statistics Demystified&lt;/a&gt; by Stan Gibilisco &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780393329407&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Another Bullshit Night in Suck City&lt;/a&gt; by Nick Flynn &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9781934356050&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Pragmatic Thinking and Learning: Refactor Your Wetware&lt;/a&gt; by Andy Hunt &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780345487452&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Storming Las Vegas: How a Cuban-Born, Soviet-Trained Commando Took Down the Strip to the Tune of Five World-Class Hotels, Three Armored Cars, and Millions of Dollars&lt;/a&gt; by John Huddy &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/gp/search?keywords=9780374520083&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Table of Contents&lt;/a&gt; by John McPhee &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Only 32 books in a year!  That's kind of low for me, even with my Kindle by my
side.  Such is life I suppose.   I really enjoyed &lt;a
href="http://www.amazon.com/gp/search?keywords=9780307379207&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;How
to Live Safely in a Science Fictional Universe&lt;/a&gt; by Charles Yu, the
Hunger Games series and
&lt;a
href="http://www.amazon.com/gp/search?keywords=9781934356050&amp;amp;index=books&amp;amp;linkCode=qs&amp;amp;tag=slackorama-20"&gt;Pragmatic
Thinking and Learning: Refactor Your Wetware&lt;/a&gt; by Andy Hunt if anyone is
looking for a &amp;quot;Best of.&amp;quot;&lt;/p&gt;
&lt;p&gt;Full disclosure:  These are Amazon affiliate links so if you happen to buy
one through a link, I'll get some shekels.&lt;/p&gt;</content><category term="reading"/><category term="books"/></entry><entry><title>Git script to update Bugzilla</title><link href="https://sethmason.com/2010/11/23/git-script-to-update-bugzilla.html" rel="alternate"/><published>2010-11-23T00:00:00-08:00</published><updated>2010-11-23T00:00:00-08:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2010-11-23:/2010/11/23/git-script-to-update-bugzilla.html</id><summary type="html">&lt;p&gt;At my work we use &lt;a href="http://git-scm.com" title="Git"&gt;git&lt;/a&gt; and
&lt;a href="http://www.bugzilla.org" title="Bugzilla"&gt;Bugzilla&lt;/a&gt; for source code control and bug
tracking respectively.  We have a process where bugfixes are commited to a
branch off of master with the name of &lt;code&gt;bugfix/bz1234&lt;/code&gt; where &lt;code&gt;1234&lt;/code&gt; is the id
of the issue in our bugzilla system.&lt;/p&gt;
&lt;p&gt;After a …&lt;/p&gt;</summary><content type="html">&lt;p&gt;At my work we use &lt;a href="http://git-scm.com" title="Git"&gt;git&lt;/a&gt; and
&lt;a href="http://www.bugzilla.org" title="Bugzilla"&gt;Bugzilla&lt;/a&gt; for source code control and bug
tracking respectively.  We have a process where bugfixes are commited to a
branch off of master with the name of &lt;code&gt;bugfix/bz1234&lt;/code&gt; where &lt;code&gt;1234&lt;/code&gt; is the id
of the issue in our bugzilla system.&lt;/p&gt;
&lt;p&gt;After a fix is completed, a merge request is filed in our bugzilla system to
merge this branch back into &lt;code&gt;master&lt;/code&gt; (developers don't have write privileges
to &lt;code&gt;master&lt;/code&gt;).  We are in the process of writing up a hook to parse commit
messages to automate all of this but it's taking some time.&lt;/p&gt;
&lt;p&gt;So, in the interest of making my life a bit easier until then, I took
advantage of Bugzilla's excellent
&lt;a href="http://www.bugzilla.org/docs/3.0/html/api/email_in.html"&gt;email_in.pl&lt;/a&gt; to
parse incoming emails to edit tickets and wrote up a command to file fix and
merge tickets for me.&lt;/p&gt;
&lt;p&gt;I simply put &lt;code&gt;git-bz&lt;/code&gt; on my &lt;code&gt;$PATH&lt;/code&gt; and call it thusly:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&amp;gt; git bz fix
&amp;gt; git fix 1.2.3 hotfix | sendmail -t
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Note: Our merge tickets require a milestone and a version for the merge ticket, thus
the extra arguments for the merge.&lt;/p&gt;
&lt;p&gt;Your system is probably radically different than ours but I thought it'd be
interesting to post something here showing how powerful git is.  Let me know
what you think.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="ch"&gt;#!/usr/bin/env perl&lt;/span&gt;
&lt;span class="c1"&gt;# git-bz -- given a version and target, print out a merge&lt;/span&gt;
&lt;span class="c1"&gt;#           email for sending to bz&lt;/span&gt;

&lt;span class="k"&gt;use&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;warnings&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;use&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;strict&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;use&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;Carp&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;use&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;Git&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;#============================================================================&lt;/span&gt;
&lt;span class="c1"&gt;# map a shorthand version to the one bz expects for merges&lt;/span&gt;
&lt;span class="c1"&gt;#============================================================================&lt;/span&gt;
&lt;span class="k"&gt;my&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;%versions&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="s"&gt;&amp;#39;mne&amp;#39;&lt;/span&gt;&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;#39;Merge (M&amp;amp;E/Patch)&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="s"&gt;&amp;#39;rc&amp;#39;&lt;/span&gt;&lt;span class="w"&gt;     &lt;/span&gt;&lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;#39;Merge (RC/Major)&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="s"&gt;&amp;#39;hotfix&amp;#39;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;#39;Merge (Hotfix)&amp;#39;&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;#============================================================================&lt;/span&gt;
&lt;span class="c1"&gt;# get the action and config info&lt;/span&gt;
&lt;span class="c1"&gt;#============================================================================&lt;/span&gt;
&lt;span class="k"&gt;my&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$action&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;shift&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;||&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;#39;&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;my&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$bz_email&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;Git::&lt;/span&gt;&lt;span class="n"&gt;config&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;bz.email&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$bz_email&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;croak&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;#39;No bugzilla email found&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;#============================================================================&lt;/span&gt;
&lt;span class="c1"&gt;# start doing the work&lt;/span&gt;
&lt;span class="c1"&gt;#============================================================================&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$action&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ow"&gt;eq&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;#39;fix&amp;#39;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;my&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$user_email&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;get_user_email&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;my&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$bz_info&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;get_bz_info&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;lt;&amp;lt;&amp;quot;&lt;/span&gt;&lt;span class="dl"&gt;MAIL&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;;&lt;/span&gt;
&lt;span class="s"&gt;To: $bz_email&lt;/span&gt;
&lt;span class="s"&gt;From: $user_email&lt;/span&gt;
&lt;span class="s"&gt;Subject: Issue $bz_info-&amp;gt;{bug} fixed&lt;/span&gt;

&lt;span class="s"&gt;\@bug_id = $bz_info-&amp;gt;{bug}&lt;/span&gt;
&lt;span class="s"&gt;\@bug_status = RESOLVED&lt;/span&gt;
&lt;span class="s"&gt;\@resolution = FIXED&lt;/span&gt;

&lt;span class="s"&gt;Fixed in $bz_info-&amp;gt;{branch} pending merge.&lt;/span&gt;

&lt;span class="dl"&gt;MAIL&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;elsif&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$action&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ow"&gt;eq&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;#39;merge&amp;#39;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;my&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$target_milestone&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;shift&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;||&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;#39;---&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;my&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$merge_to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;shift&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;my&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$version&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$merge_to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$versions&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nv"&gt;$merge_to&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;||&lt;/span&gt;
&lt;span class="w"&gt;                   &lt;/span&gt;&lt;span class="s"&gt;&amp;#39;unspecified&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;my&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$bz_info&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;get_bz_info&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;my&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$user_email&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;get_user_email&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nb"&gt;defined&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$bz_info&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;bug&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="n"&gt;croak&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;No bug id found in branch name&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;my&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$bug_id&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$bz_info&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;bug&lt;/span&gt;&lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;my&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$bz_branch&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$bz_info&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;branch&lt;/span&gt;&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c1"&gt;#============================================================================&lt;/span&gt;
&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c1"&gt;# get the remote branch, url and name&lt;/span&gt;
&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c1"&gt;#============================================================================&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;my&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;@remote_info&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;Git::&lt;/span&gt;&lt;span class="n"&gt;command&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;#39;config&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;#39;--get-regexp&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;#39;^branch\.&amp;#39;&lt;/span&gt;
&lt;span class="w"&gt;                        &lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$bz_branch&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;my&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$remote&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$remote_branch&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;my&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$line&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;@remote_info&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$line&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=~&lt;/span&gt;&lt;span class="sr"&gt; /\.remote\s+(.+)/x&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nv"&gt;$remote&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;elsif&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$line&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=~&lt;/span&gt;&lt;span class="sr"&gt; /merge\s+((refs\/)?heads\/)?(.+)/x&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nv"&gt;$remote_branch&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$3&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;my&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$remote_url&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;Git::&lt;/span&gt;&lt;span class="n"&gt;command_oneline&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;#39;config&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;#39;--get-regexp&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="s"&gt;&amp;#39;remote.&amp;#39;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$remote&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;#39;.url&amp;#39;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$remote_url&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=~&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="sr"&gt;m/url\s+(.+)/x&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nv"&gt;$remote_url&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c1"&gt;#============================================================================&lt;/span&gt;
&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c1"&gt;# get the commits to show&lt;/span&gt;
&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c1"&gt;#============================================================================&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;my&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$commits&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;Git::&lt;/span&gt;&lt;span class="n"&gt;command&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="s"&gt;&amp;#39;log&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;$remote/$remote_branch..&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="s"&gt;&amp;#39;--pretty=short&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;#39;--name-status&amp;#39;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c1"&gt;#============================================================================&lt;/span&gt;
&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c1"&gt;# finally print out the email message&lt;/span&gt;
&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c1"&gt;#============================================================================&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;lt;&amp;lt;&amp;quot;&lt;/span&gt;&lt;span class="dl"&gt;MAIL&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;;&lt;/span&gt;
&lt;span class="s"&gt;To: $bz_email&lt;/span&gt;
&lt;span class="s"&gt;From: $user_email&lt;/span&gt;
&lt;span class="s"&gt;Subject: Please merge $bz_branch to $remote_branch&lt;/span&gt;

&lt;span class="s"&gt;\@blocked = $bug_id&lt;/span&gt;
&lt;span class="s"&gt;\@product = Application Defects&lt;/span&gt;
&lt;span class="s"&gt;\@component = Merge Request&lt;/span&gt;
&lt;span class="s"&gt;\@version = $version&lt;/span&gt;
&lt;span class="s"&gt;\@target_milestone = $target_milestone&lt;/span&gt;

&lt;span class="s"&gt;Please merge $bz_branch to the remote branch $remote_branch&lt;/span&gt;

&lt;span class="s"&gt;Merge: $bz_branch&lt;/span&gt;
&lt;span class="s"&gt;To: $remote_branch&lt;/span&gt;
&lt;span class="s"&gt;Repository: $remote_url&lt;/span&gt;

&lt;span class="s"&gt;$commits&lt;/span&gt;
&lt;span class="dl"&gt;MAIL&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;croak&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;lt;&amp;lt;&amp;quot;&lt;/span&gt;&lt;span class="dl"&gt;USAGE&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;;&lt;/span&gt;
&lt;span class="s"&gt;error: Unknon subcommand: $action&lt;/span&gt;
&lt;span class="s"&gt;usage: git bz fix &amp;lt;target&amp;gt;&lt;/span&gt;
&lt;span class="s"&gt;   or: git bz merge &amp;lt;merge_to&amp;gt; &amp;lt;target&amp;gt;&lt;/span&gt;

&lt;span class="dl"&gt;USAGE&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;#============================================================================&lt;/span&gt;
&lt;span class="c1"&gt;# get current branch and bug ID&lt;/span&gt;
&lt;span class="c1"&gt;#============================================================================&lt;/span&gt;
&lt;span class="k"&gt;sub&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;get_bz_info&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;my&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$bz_branch&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;Git::&lt;/span&gt;&lt;span class="n"&gt;command_oneline&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;#39;symbolic-ref&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;#39;HEAD&amp;#39;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nv"&gt;$bz_branch&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=~&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="sr"&gt;s{^refs\/heads/}{}x&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;my&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$bug_id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$bz_branch&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=~&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="sr"&gt;m/bz(\d+)/x&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;branch&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$bz_branch&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;bug&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$bug_id&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;sub&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;get_user_email&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;my&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$email&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;Git::&lt;/span&gt;&lt;span class="n"&gt;command_oneline&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;#39;config&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;#39;--get&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;#39;user.email&amp;#39;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$email&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;If you want to use it, you'll need to set up a config to point to your own bz
email.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="go"&gt;&amp;gt; git config bz.email mybz@somedomain.com&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;This script is available as a &lt;a href="https://gist.github.com/710374"&gt;gist&lt;/a&gt; on &lt;a href="http://github.com"&gt;github&lt;/a&gt;.&lt;/p&gt;</content><category term="programming"/><category term="git"/><category term="bugzilla"/></entry><entry><title>Emacs and Remember The Milk all jumbled up</title><link href="https://sethmason.com/2010/08/19/emacs-and-remember-the-milk-all-jumbled-up.html" rel="alternate"/><published>2010-08-19T00:00:00-07:00</published><updated>2010-08-19T00:00:00-07:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2010-08-19:/2010/08/19/emacs-and-remember-the-milk-all-jumbled-up.html</id><summary type="html">&lt;p&gt;I'm a huge fan of &lt;a href="http://www.rememberthemilk.com"&gt;Remember The Milk&lt;/a&gt; and &lt;a href="http://www.gnu.org/software/emacs/"&gt;GNU Emacs&lt;/a&gt;.  So much so, that
I've given them both money over the years.   And now I've (kind of) combined
them.  I just pushed &lt;a href="http://github.com/slackorama/slack-rtm"&gt;slack-rtm&lt;/a&gt; to GitHub.&lt;/p&gt;
&lt;p&gt;I've kind of avoided Emacs Lisp, &lt;a href="http://steve-yegge.blogspot.com/2008/11/ejacs-javascript-interpreter-for-emacs.html"&gt;the 1984 Subaru of Lisp&lt;/a&gt;.  While I've
done …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I'm a huge fan of &lt;a href="http://www.rememberthemilk.com"&gt;Remember The Milk&lt;/a&gt; and &lt;a href="http://www.gnu.org/software/emacs/"&gt;GNU Emacs&lt;/a&gt;.  So much so, that
I've given them both money over the years.   And now I've (kind of) combined
them.  I just pushed &lt;a href="http://github.com/slackorama/slack-rtm"&gt;slack-rtm&lt;/a&gt; to GitHub.&lt;/p&gt;
&lt;p&gt;I've kind of avoided Emacs Lisp, &lt;a href="http://steve-yegge.blogspot.com/2008/11/ejacs-javascript-interpreter-for-emacs.html"&gt;the 1984 Subaru of Lisp&lt;/a&gt;.  While I've
done some minor hacking of my .emacs in the two years I've been using Emacs, I
have not really done any serious programming in it.  But with this, I'm hoping
to remedy that a bit.  It's been fine so far, even though the learning curve has
been steep.  I don't think I'll be writing a JavaScript interpreter anytime soon.&lt;/p&gt;
&lt;p&gt;Right now, it's pretty simple.  It just creates a buffer and shoves your tasks
into it.  I've only tested it on GNU Emacs 23.1.50.1.  Ultimately, I'd like it
to sync between an &lt;a href="http://www.orgmode.org"&gt;orgmode&lt;/a&gt; file and RTM, kind of like what
&lt;a href="http://sachachua.com/blog/2010/05/org-toodledo/"&gt;Sacha Chua did with org-toodledo.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;So, &lt;a href="http://github.com/slackorama/slack-rtm"&gt;have at it&lt;/a&gt;.  Feel free to fork it and send me pull requests.  I'm hoping
to release early (DONE!) and often.&lt;/p&gt;</content><category term="editor"/><category term="emacs"/><category term="rtm"/><category term="emacs-lisp"/></entry><entry><title>Sheena Is A C++ Hacker</title><link href="https://sethmason.com/2010/07/01/sheena-is-a-c-hacker.html" rel="alternate"/><published>2010-07-01T00:00:00-07:00</published><updated>2010-07-01T00:00:00-07:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2010-07-01:/2010/07/01/sheena-is-a-c-hacker.html</id><summary type="html">&lt;p&gt;Not really.  And my name's not Sheena.  But I did make a contribution to the
awesome console based newsreader &lt;a href="http://www.newsbeuter.org"&gt;Newsbeuter&lt;/a&gt;.  If
you want to see my patch, it's available on
&lt;a href="http://github.com/akrennmair/newsbeuter/commit/31933f2e60f2d99b08fd5108e63421997a900696"&gt;Github&lt;/a&gt;.
I fixed a problem with the way that it authenticated against Google Reader
API.&lt;/p&gt;
&lt;p&gt;As for Newsbeuter, if you …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Not really.  And my name's not Sheena.  But I did make a contribution to the
awesome console based newsreader &lt;a href="http://www.newsbeuter.org"&gt;Newsbeuter&lt;/a&gt;.  If
you want to see my patch, it's available on
&lt;a href="http://github.com/akrennmair/newsbeuter/commit/31933f2e60f2d99b08fd5108e63421997a900696"&gt;Github&lt;/a&gt;.
I fixed a problem with the way that it authenticated against Google Reader
API.&lt;/p&gt;
&lt;p&gt;As for Newsbeuter, if you like doing everything from the commandline, this is
the newsreader for you.   Lots of features like keyboard shortcuts that can be
reconfigured easily and query feeds so you can create your own pipe.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.newsbeuter.org"&gt;Check it out&lt;/a&gt;&lt;/p&gt;</content><category term="personal"/><category term="newsbeuter"/></entry><entry><title>Google Apps Script For Fun and Profit</title><link href="https://sethmason.com/2010/05/28/google-apps-script-for-fun-and-profit.html" rel="alternate"/><published>2010-05-28T00:00:00-07:00</published><updated>2010-05-28T00:00:00-07:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2010-05-28:/2010/05/28/google-apps-script-for-fun-and-profit.html</id><summary type="html">&lt;p&gt;OK, so I have to admit that I have a mancrush on &lt;a href="http://www.google.com/google-d-s/scripts/scripts.html"&gt;Google Apps
Script&lt;/a&gt;.  It's a nice little tool that allows you to do a whole
variety of things on a bunch of Google Products.  For instance:&lt;/p&gt;
&lt;blockquote&gt;
With scripts, you can:&lt;br /&gt;
* Create your own custom spreadsheet functions&lt;br /&gt;
* Automate repetitive …&lt;/blockquote&gt;</summary><content type="html">&lt;p&gt;OK, so I have to admit that I have a mancrush on &lt;a href="http://www.google.com/google-d-s/scripts/scripts.html"&gt;Google Apps
Script&lt;/a&gt;.  It's a nice little tool that allows you to do a whole
variety of things on a bunch of Google Products.  For instance:&lt;/p&gt;
&lt;blockquote&gt;
With scripts, you can:&lt;br /&gt;
* Create your own custom spreadsheet functions&lt;br /&gt;
* Automate repetitive tasks (e.g. process responses to Google Docs forms)&lt;/br /&gt;
* Link multiple Google products together (e.g. send emails or schedule&lt;br /&gt;
* Calendar events from a list of addresses in a Spreadsheet)&lt;br /&gt;
* Customize existing Google products (e.g. add custom buttons or menus to run
* your own scripts)&lt;br /&gt;
&lt;/blockquote&gt;

&lt;p&gt;Not only is the tool itself very nice (a slick in-browser editor with syntax
highlighting and context sensitive prompts), the &lt;a href="http://www.google.com/google-d-s/scripts/articles.html"&gt;tutorials&lt;/a&gt; are as well.
In a little under 15 minutes while reading the tutorial I was able to write a
script that emails you the next 10 days events from any calendar.  It uses
JavaScript so if you are familiar with that, then you could probably even do
it quicker than me and my old brain.&lt;/p&gt;
&lt;p&gt;A pet peeve that I have is that the daily email I get from Google Calendar
doesn't include my contact's birthdays.  Even if it did, it'd only be for that
day which would be too late for me to drop a card in the mail. And even if did
that, it wouldn't send the email to my wife.  Thus, the following script was
born.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="c1"&gt;// how many days in advance&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;INTERVAL&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;10&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// the calendar to grab&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;CALENDAR&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Contacts&amp;#39; birthdays and events&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// who to send it to&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;EMAIL_TO&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;email1@somewhere.com,email2@somewhere.com&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;//  the subject to use&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;SUBJECT&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Birthdays for Seth next &amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;INTERVAL&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot; days &amp;quot;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;onOpen&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;submenu&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Send Birthday List&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;                   &lt;/span&gt;&lt;span class="nx"&gt;functionName&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;sendBirthdayList&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;                 &lt;/span&gt;&lt;span class="p"&gt;}];&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;SpreadsheetApp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getActiveSpreadsheet&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;addMenu&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;Birthdays&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;submenu&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;sendBirthdayList&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="c1"&gt;// Get the event template string from the spreadsheet&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;emailTemplate&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;SpreadsheetApp&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getActiveSheet&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;getRange&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;b2&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;getValue&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;eventTemplate&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;SpreadsheetApp&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getActiveSheet&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;getRange&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;b3&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;getValue&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="c1"&gt;// Get the next INTERVAL days&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;start&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ow"&gt;new&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;end&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ow"&gt;new&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;start&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getTime&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;1000&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="mf"&gt;60&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="mf"&gt;60&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="mf"&gt;24&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="mf"&gt;10&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;cal&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;CalendarApp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;openByName&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;CALENDAR&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;events&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;cal&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getEvents&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;start&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;end&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="c1"&gt;// Add each event to the email&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;eventLines&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ow"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;events&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;events&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nx"&gt;eventLines&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;eventTemplate&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&amp;lt;TITLE&amp;gt;&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getTitle&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&amp;lt;DAY&amp;gt;&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getEndTime&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;toLocaleDateString&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&amp;#39;s birthday&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;email&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;emailTemplate&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&amp;lt;EVENTS&amp;gt;&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;eventLines&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;MailApp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;sendEmail&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;EMAIL_TO&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;                    &lt;/span&gt;&lt;span class="nx"&gt;SUBJECT&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;now&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;toLocaleDateString&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;email&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Lo!  Better living through technology.&lt;/p&gt;
&lt;p&gt;Right now, I have the template for the email stored in two cells in a
spreadsheet and other configuration info at the top of the script.  Those
could probably go in cell data too, just so it'd be easier to share this
script.  But it should give you an idea of lovely it is touse &lt;a href="http://www.google.com/google-d-s/scripts/scripts.html"&gt;Google Apps Script&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Using the triggers that are built-in (Triggers &amp;lt; Current script
triggers...), I have it scheduled to email us every 3 days at midnight.  So,
hopefully, I won't be missing any birthdays.&lt;/p&gt;</content><category term="personal"/><category term="google"/><category term="scripts"/><category term="javascript"/></entry><entry><title>97 Things Every Programmer Should Know</title><link href="https://sethmason.com/2010/04/05/97-things-every-programmer-should-know.html" rel="alternate"/><published>2010-04-05T00:00:00-07:00</published><updated>2010-04-05T00:00:00-07:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2010-04-05:/2010/04/05/97-things-every-programmer-should-know.html</id><summary type="html">&lt;p&gt;I recently picked up O'Reilly's book
&lt;a href="http://www.amazon.com/gp/product/0596809484?ie=UTF8&amp;amp;tag=slackorama-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=05968094840"&gt;97
Things Every Programmer Should Know: Collective Wisdom from the Experts&lt;/a&gt; as it
was an eBook Deal of the Day. Overall, I thought it a great book for a
programmer just starting out in the field.  It had quite a few things that I …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I recently picked up O'Reilly's book
&lt;a href="http://www.amazon.com/gp/product/0596809484?ie=UTF8&amp;amp;tag=slackorama-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=05968094840"&gt;97
Things Every Programmer Should Know: Collective Wisdom from the Experts&lt;/a&gt; as it
was an eBook Deal of the Day. Overall, I thought it a great book for a
programmer just starting out in the field.  It had quite a few things that I
wish I'd known earlier.  Probably because I took an unconventional route to
programming.&lt;/p&gt;
&lt;p&gt;One thing I found interesting was that many of the essays made reference to
the suggestion from &lt;a href="http://www.amazon.com/gp/product/020161622X?ie=UTF8&amp;amp;tag=slackorama-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=020161622X"&gt;The Pragmatic Programmer: From Journeyman to
Master&lt;/a&gt;
to learn one new langauage every year.  The suggestion by itself wasn't
interesting.  I think many people have heard it.  The thing that intrigued me
about it was that &amp;quot;The Pragmatic Programmer&amp;quot; is published by
Addison-Wesley.  I don't think I've seen such overt references to other
publishers' books in a programming book before.&lt;/p&gt;
&lt;p&gt;Kudos to you O'Reilly.&lt;/p&gt;</content><category term="reading"/><category term="books"/><category term="programming"/></entry><entry><title>A Better Bugzilla2</title><link href="https://sethmason.com/2010/02/18/a-better-bugzilla2.html" rel="alternate"/><published>2010-02-18T00:00:00-08:00</published><updated>2010-02-18T00:00:00-08:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2010-02-18:/2010/02/18/a-better-bugzilla2.html</id><summary type="html">&lt;p&gt;For a variety of reasons, I'm still using version 2 of
&lt;a href="http://www.bugzilla.org"&gt;Bugzilla&lt;/a&gt; at work even though it's considered "dead"
by Bugzilla.  And the interface looks like it's been dead awhile.&lt;/p&gt;
&lt;p&gt;But, thanks to
&lt;a href="https://addons.mozilla.org/en-US/firefox/addon/748"&gt;Greasemonkey&lt;/a&gt;, I'm not
stuck with the interface.  Inspired by
&lt;a href="http://www.squarefree.com/2009/02/26/tidybug/"&gt;Jesse Ruderman's TidyBug&lt;/a&gt;, I
made my own Greasemonkey …&lt;/p&gt;</summary><content type="html">&lt;p&gt;For a variety of reasons, I'm still using version 2 of
&lt;a href="http://www.bugzilla.org"&gt;Bugzilla&lt;/a&gt; at work even though it's considered "dead"
by Bugzilla.  And the interface looks like it's been dead awhile.&lt;/p&gt;
&lt;p&gt;But, thanks to
&lt;a href="https://addons.mozilla.org/en-US/firefox/addon/748"&gt;Greasemonkey&lt;/a&gt;, I'm not
stuck with the interface.  Inspired by
&lt;a href="http://www.squarefree.com/2009/02/26/tidybug/"&gt;Jesse Ruderman's TidyBug&lt;/a&gt;, I
made my own Greasemonkey script which I'm calling &lt;a href="https://gist.github.com/slackorama/0f240d18df3fb0ebca5e"&gt;TidyBz2&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Here's the before shot:&lt;/p&gt;
&lt;p&gt;&lt;img alt="A Better Bugzilla Before" class="center-block" src="https://sethmason.com/images/20100218_tidybz2-pre.png"&gt;&lt;/p&gt;
&lt;p&gt;Here's the after shot:&lt;/p&gt;
&lt;p&gt;&lt;img alt="A Better Bugzilla After" class="center-block" src="https://sethmason.com/images/20100218_tidybz2-post.png"&gt;&lt;/p&gt;
&lt;p&gt;It hides the huge header, makes the title of the issue much more prominent and
fixes some other formatting nits I disliked.  Information that I think is more
important is moved up to the top as well.  But there are also perks you can't
see.  You can use the keyboard to do pretty much anything you need to: comment,
resolve, browse the URL, search, navigate between comments a la gmail, etc.
Once you have it installed, just press &lt;kbd&gt;?&lt;/kbd&gt; to see all the keyboard shortcuts.&lt;/p&gt;
&lt;p&gt;It's up on &lt;a href="http://github.com/slackorama/tidybz2"&gt;GitHub&lt;/a&gt; so feel free to fork
it and make any modifications you'd like to see.&lt;/p&gt;</content><category term="tools"/><category term="bugzilla"/><category term="greasemonkey"/></entry><entry><title>PragPub</title><link href="https://sethmason.com/2010/02/04/pragpub.html" rel="alternate"/><published>2010-02-04T00:00:00-08:00</published><updated>2010-02-04T00:00:00-08:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2010-02-04:/2010/02/04/pragpub.html</id><summary type="html">&lt;p&gt;This is probably way late but &lt;a href="http://www.pragprog.com" title="The Pragmatic Bookshelf"&gt;The Pragmatic Bookshelf&lt;/a&gt;, publishers of
fine programming books, have launched a &lt;a href="http://www.pragprog.com/magazines" title="PragPub"&gt;free monthly magazine&lt;/a&gt; called
&lt;em&gt;PragPub&lt;/em&gt; that covers a variety of topics.  For instance, this month has a
nice overview of how to use &lt;a href="http://sass-lang.com/" title="Sytactically awesome stylesheets"&gt;Sass&lt;/a&gt;.  Past topics have included articles
about Clojure, automating screencasts …&lt;/p&gt;</summary><content type="html">&lt;p&gt;This is probably way late but &lt;a href="http://www.pragprog.com" title="The Pragmatic Bookshelf"&gt;The Pragmatic Bookshelf&lt;/a&gt;, publishers of
fine programming books, have launched a &lt;a href="http://www.pragprog.com/magazines" title="PragPub"&gt;free monthly magazine&lt;/a&gt; called
&lt;em&gt;PragPub&lt;/em&gt; that covers a variety of topics.  For instance, this month has a
nice overview of how to use &lt;a href="http://sass-lang.com/" title="Sytactically awesome stylesheets"&gt;Sass&lt;/a&gt;.  Past topics have included articles
about Clojure, automating screencasts and managing life projects.&lt;/p&gt;
&lt;p&gt;Granted, they are ultimately pushing their books (which I think are excellent)
but they are releasing the magazine in PDF, epub and mobi.  How cool is that?&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.pragprog.com/magazines" title="PragPub"&gt;PragPub&lt;/a&gt;&lt;/p&gt;</content><category term="reading"/><category term="programming"/></entry><entry><title>Visit your local library via Amazon.com</title><link href="https://sethmason.com/2010/01/30/visit-your-local-library-via-amazoncom.html" rel="alternate"/><published>2010-01-30T00:00:00-08:00</published><updated>2010-01-30T00:00:00-08:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2010-01-30:/2010/01/30/visit-your-local-library-via-amazoncom.html</id><summary type="html">&lt;p&gt;&lt;img alt="xISBN" class="pull-left article-image" src="https://sethmason.com/images/20100130.gif"&gt;&lt;/p&gt;
&lt;p&gt;I love reading.  It's how I get most my knowledge (or lack thereof).  And I
also really like &lt;a href="http://en.wikipedia.org/wiki/Bookmarklet" title="What is a bookmarklet?"&gt;bookmarklets&lt;/a&gt;.  They make browsing the web much easier.&lt;/p&gt;
&lt;p&gt;And I found this great bookmarklet that let's you find a book that you are
viewing on Amazon.com at your local library.  It's …&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;img alt="xISBN" class="pull-left article-image" src="https://sethmason.com/images/20100130.gif"&gt;&lt;/p&gt;
&lt;p&gt;I love reading.  It's how I get most my knowledge (or lack thereof).  And I
also really like &lt;a href="http://en.wikipedia.org/wiki/Bookmarklet" title="What is a bookmarklet?"&gt;bookmarklets&lt;/a&gt;.  They make browsing the web much easier.&lt;/p&gt;
&lt;p&gt;And I found this great bookmarklet that let's you find a book that you are
viewing on Amazon.com at your local library.  It's called &lt;a href="http://xisbn.worldcat.org/liblook2/index.htm" title="xISBN Bookmarket"&gt;xISBN
Bookmarklet&lt;/a&gt;.  I just call it 'library lookup v2.'  It was inspired by Jon
Udell's &lt;a href="http://jonudell.net/LibraryLookupGenerator.html"&gt;LibraryLookup&lt;/a&gt; which
I used to use so I just updated the version.&lt;/p&gt;
&lt;p&gt;It's really easy to set up and use.  Set up is &lt;a href="http://xisbn.worldcat.org/liblook2/index.htm" title="xISBN Bookmarket"&gt;covered on its page&lt;/a&gt; under
&amp;quot;Try xISBN Bookmarkets.&amp;quot; One thing you'll need in advance is to know
the base URL of your library's catalog.  Mine is
&lt;a href="http://catalog.colapl.org"&gt;http://catalog.colapl.org&lt;/a&gt; for example.&lt;/p&gt;
&lt;p&gt;Using it is even eaiser.  You just look at a page on Amazon or Barnes and
Noble and click the bookmarklet.  Or if there's a &lt;a href="http://en.wikipedia.org/wiki/International_Standard_Book_Number" title="ISBN"&gt;ISBN&lt;/a&gt; on a page, you can just
select it and click the bookmarklet.  It'll take you to a page &lt;a href="http://xisbn.worldcat.org/liblook/resolve.htm?res_id=http://catalog.colapl.org/&amp;amp;rft.isbn=1878424076&amp;amp;url_ver=Z39.88-2004&amp;amp;rft_val_fmt=info:ofi/fmt:kev:mtx:book" title="Seth Speaks"&gt;like
this.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Depending on your library, you could place a hold on it and then pick it up.
Remember, support your local library!&lt;/p&gt;</content><category term="tools"/><category term="amazon"/><category term="worldcat"/><category term="bookmarklet"/></entry><entry><title>And I'm back</title><link href="https://sethmason.com/2010/01/25/and-im-back.html" rel="alternate"/><published>2010-01-25T00:00:00-08:00</published><updated>2010-01-25T00:00:00-08:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2010-01-25:/2010/01/25/and-im-back.html</id><summary type="html">&lt;p&gt;OK, so it's been over a year since &lt;a href="https://sethmason.com/2009/01/06/resolutions.html"&gt;my last post&lt;/a&gt; (of which I completed all except two).  But here I am now with a wonderful new design, thanks to &lt;a href="http://www.sproutcreative.com"&gt;Sprout Creative&lt;/a&gt; and a new outlook on blogging.&lt;/p&gt;
&lt;p&gt;I've taken a bit of a different approach to blogging this time …&lt;/p&gt;</summary><content type="html">&lt;p&gt;OK, so it's been over a year since &lt;a href="https://sethmason.com/2009/01/06/resolutions.html"&gt;my last post&lt;/a&gt; (of which I completed all except two).  But here I am now with a wonderful new design, thanks to &lt;a href="http://www.sproutcreative.com"&gt;Sprout Creative&lt;/a&gt; and a new outlook on blogging.&lt;/p&gt;
&lt;p&gt;I've taken a bit of a different approach to blogging this time.  Instead of using a content management system like &lt;a href="http://www.wordpress.org"&gt;Wordpress&lt;/a&gt; or &lt;a href="http://www.movabletype.com"&gt;Movable Type&lt;/a&gt;, I'm opting for static html.  The pages are generated by &lt;a href="http://wiki.github.com/mojombo/jekyll/"&gt;Jekyll&lt;/a&gt; after being written in &lt;a href="http://www.gnu.org/software/emacs/emacs.html"&gt;GNU Emacs&lt;/a&gt;.  I'm hoping that this tool set makes it easier for me to get posts up.  &lt;a href="/contact.html"&gt;Let me know&lt;/a&gt; if you have any questions about the process or if you have any comments about the design.&lt;/p&gt;
&lt;p&gt;We'll see if it sticks.  If you don't hear from me for another year, then you'll know that this little experiment failed.&lt;/p&gt;</content><category term="personal"/><category term="site"/></entry><entry><title>Resolutions</title><link href="https://sethmason.com/2009/01/06/resolutions.html" rel="alternate"/><published>2009-01-06T00:00:00-08:00</published><updated>2009-01-06T00:00:00-08:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2009-01-06:/2009/01/06/resolutions.html</id><summary type="html">&lt;p&gt;I have been mulling these over for the past couple of days but I thought
I'd post them to the internets in hopes of injecting some accountability
into the whole morass.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Get knee fixed&lt;/li&gt;
&lt;li&gt;Go on vacation somewhere besides San Francisco/Oakland or Rhode
    Island with wife and child&lt;/li&gt;
&lt;li&gt;Take …&lt;/li&gt;&lt;/ul&gt;</summary><content type="html">&lt;p&gt;I have been mulling these over for the past couple of days but I thought
I'd post them to the internets in hopes of injecting some accountability
into the whole morass.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Get knee fixed&lt;/li&gt;
&lt;li&gt;Go on vacation somewhere besides San Francisco/Oakland or Rhode
    Island with wife and child&lt;/li&gt;
&lt;li&gt;Take better photos&lt;/li&gt;
&lt;li&gt;Bake cake for wife's birthday&lt;/li&gt;
&lt;li&gt;Lay off the sugar and don't lay around as much (uhm, after I bake
    the cake)&lt;/li&gt;
&lt;li&gt;Learn Clojure&lt;/li&gt;
&lt;li&gt;Fix what ails desktop computer&lt;/li&gt;
&lt;li&gt;Clean out top drawer of bureau&lt;/li&gt;
&lt;li&gt;Rebalance 401K&lt;/li&gt;
&lt;li&gt;Turn 40 (yeah, I'm old)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you are reading this and want a health check, feel free to &lt;a href="https://sethmason.com/contact.html"&gt;ping
me&lt;/a&gt;.&lt;/p&gt;</content><category term="personal"/><category term="resolutions"/></entry><entry><title>Dojo snippets for Emacs</title><link href="https://sethmason.com/2008/12/14/dojo-snippets-for-emacs.html" rel="alternate"/><published>2008-12-14T00:00:00-08:00</published><updated>2008-12-14T00:00:00-08:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2008-12-14:/2008/12/14/dojo-snippets-for-emacs.html</id><summary type="html">&lt;p&gt;I've been using &lt;a href="http://www.dojotoolkit.org"&gt;Dojo&lt;/a&gt; for a couple of
months now and I really like it as it makes writing cross-browser
JavaScript a breeze.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Emacs 4EVA!!" class="pull-left article-image" src="https://sethmason.com/images/13.png"&gt;&lt;/p&gt;
&lt;p&gt;I've also been using &lt;a href="http://www.gnu.org/software/emacs/"&gt;Emacs&lt;/a&gt; with
&lt;a href="http://pluskid.lifegoo.com/upload/project/yasnippet/doc/index.html"&gt;YASnippet&lt;/a&gt;
for a bit now too. YASnippet is a plugin for Emacs that allows you to
define a snippet that'll get …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I've been using &lt;a href="http://www.dojotoolkit.org"&gt;Dojo&lt;/a&gt; for a couple of
months now and I really like it as it makes writing cross-browser
JavaScript a breeze.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Emacs 4EVA!!" class="pull-left article-image" src="https://sethmason.com/images/13.png"&gt;&lt;/p&gt;
&lt;p&gt;I've also been using &lt;a href="http://www.gnu.org/software/emacs/"&gt;Emacs&lt;/a&gt; with
&lt;a href="http://pluskid.lifegoo.com/upload/project/yasnippet/doc/index.html"&gt;YASnippet&lt;/a&gt;
for a bit now too. YASnippet is a plugin for Emacs that allows you to
define a snippet that'll get transformed into something much bigger in
your file. It saves you a lot of typing as you can define areas in your
snippet where you get prompted to enter text and it'll autofill with
your entries. Very handy, let me tell you. There's a &lt;a href="http://www.youtube.com/watch?v=vOj7btx3ATg"&gt;screencast on
YouTube&lt;/a&gt; showing how
powerful it is.&lt;/p&gt;
&lt;p&gt;Which brings me to the point of this post. I've created a package of
snippets aimed at people writing Dojo based JavaScript. It's hosted up
on
&lt;a href="http://www.github.com/slackorama/dojo-yasnippets/tree/master"&gt;GitHub&lt;/a&gt;
if you would like to use it. Currently, it only includes (what I feel to
be) the major functions but feel free to contact me if you'd like to add
more.&lt;/p&gt;</content><category term="editor"/><category term="dojo"/><category term="emacs"/><category term="yasnippet"/><category term="javascript"/></entry><entry><title>svn log made easy</title><link href="https://sethmason.com/2008/12/01/svn-log-made-easy.html" rel="alternate"/><published>2008-12-01T00:00:00-08:00</published><updated>2008-12-01T00:00:00-08:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2008-12-01:/2008/12/01/svn-log-made-easy.html</id><summary type="html">&lt;p&gt;&lt;a href="http://svnbook.red-bean.com/en/1.5/svn.ref.svn.c.log.html"&gt;svn log&lt;/a&gt; is
a great command to see what's going on in your subversion repository.
Unfortunately, at my job we are using a really old version (1.1.4!), a
version so old that it doesn't support the &lt;code&gt;--limit&lt;/code&gt; argument. This
makes the &lt;code&gt;svn log&lt;/code&gt; painful to use as it …&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;a href="http://svnbook.red-bean.com/en/1.5/svn.ref.svn.c.log.html"&gt;svn log&lt;/a&gt; is
a great command to see what's going on in your subversion repository.
Unfortunately, at my job we are using a really old version (1.1.4!), a
version so old that it doesn't support the &lt;code&gt;--limit&lt;/code&gt; argument. This
makes the &lt;code&gt;svn log&lt;/code&gt; painful to use as it outputs EVERYTHING.&lt;/p&gt;
&lt;p&gt;Luckily, &lt;code&gt;svn log&lt;/code&gt; is so awesome that it overcomes this weakness and
allows you to use a date based criteria for listing log statements.
Unfortunately, the syntax is hard for me to remember. Thus, I wrote this
little shell script function that'll list activity for the given days in
the past. You can put it in your &lt;code&gt;.bashrc&lt;/code&gt; and run it like &lt;code&gt;svnlog 14&lt;/code&gt;.
That'll output logs from the last 14 days.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;svnlog&lt;span class="o"&gt;()&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nv"&gt;OFFSET&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;shift&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;svn&lt;span class="w"&gt; &lt;/span&gt;log&lt;span class="w"&gt; &lt;/span&gt;-r&lt;span class="w"&gt; &lt;/span&gt;HEAD:&lt;span class="o"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;`date -d &amp;quot;&lt;/span&gt;&lt;span class="nv"&gt;$OFFSET&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;days&lt;span class="w"&gt; &lt;/span&gt;ago&lt;span class="s2"&gt;&amp;quot; +%Y-%m-%d`&amp;quot;&lt;/span&gt;&lt;span class="o"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$*&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</content><category term="programming"/><category term="subversion"/><category term="tip"/></entry><entry><title>Commandline Fun</title><link href="https://sethmason.com/2008/11/05/commandline-fun.html" rel="alternate"/><published>2008-11-05T00:00:00-08:00</published><updated>2008-11-05T00:00:00-08:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2008-11-05:/2008/11/05/commandline-fun.html</id><summary type="html">&lt;p&gt;Insprired by &lt;a href="http://www.ibm.com/developerworks/linux/library/l-friendfeed/?S_TACT=105AGX01&amp;amp;S_CMP=HP"&gt;an article on
ibm.com&lt;/a&gt;
about using &lt;a href="http://www.twitter.com"&gt;twitter&lt;/a&gt; from the command line, I
wrote up a simple little script to get your friends updates.&lt;/p&gt;
&lt;p&gt;Here it is:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="gp"&gt;$ &lt;/span&gt;curl&lt;span class="w"&gt; &lt;/span&gt;-s&lt;span class="w"&gt; &lt;/span&gt;-u&lt;span class="w"&gt; &lt;/span&gt;username:password&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
http://twitter.com/statuses/friends_timeline.xml&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="go"&gt;awk &amp;#39;/&amp;lt;text/ {&lt;/span&gt;
&lt;span class="go"&gt;  gsub(/&amp;lt;\/*text&amp;gt;/,&amp;quot;&amp;quot;);&lt;/span&gt;
&lt;span class="go"&gt;  text = $0;&lt;/span&gt;
&lt;span class="go"&gt;}&lt;/span&gt;
&lt;span class="go"&gt;/screen_name/ {&lt;/span&gt;
&lt;span class="go"&gt;  gsub(/ *&amp;lt;\/*screen_name&amp;gt;/,&amp;quot;&amp;quot;);&lt;/span&gt;
&lt;span class="go"&gt;  print …&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</summary><content type="html">&lt;p&gt;Insprired by &lt;a href="http://www.ibm.com/developerworks/linux/library/l-friendfeed/?S_TACT=105AGX01&amp;amp;S_CMP=HP"&gt;an article on
ibm.com&lt;/a&gt;
about using &lt;a href="http://www.twitter.com"&gt;twitter&lt;/a&gt; from the command line, I
wrote up a simple little script to get your friends updates.&lt;/p&gt;
&lt;p&gt;Here it is:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="gp"&gt;$ &lt;/span&gt;curl&lt;span class="w"&gt; &lt;/span&gt;-s&lt;span class="w"&gt; &lt;/span&gt;-u&lt;span class="w"&gt; &lt;/span&gt;username:password&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
http://twitter.com/statuses/friends_timeline.xml&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="go"&gt;awk &amp;#39;/&amp;lt;text/ {&lt;/span&gt;
&lt;span class="go"&gt;  gsub(/&amp;lt;\/*text&amp;gt;/,&amp;quot;&amp;quot;);&lt;/span&gt;
&lt;span class="go"&gt;  text = $0;&lt;/span&gt;
&lt;span class="go"&gt;}&lt;/span&gt;
&lt;span class="go"&gt;/screen_name/ {&lt;/span&gt;
&lt;span class="go"&gt;  gsub(/ *&amp;lt;\/*screen_name&amp;gt;/,&amp;quot;&amp;quot;);&lt;/span&gt;
&lt;span class="go"&gt;  print $0;&lt;/span&gt;
&lt;span class="go"&gt;  print text;&lt;/span&gt;
&lt;span class="go"&gt;}&amp;#39;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;All it does it is use &lt;a href="http://curl.haxx.se/"&gt;cURL&lt;/a&gt; to grab the timeline
from twitter. Then it passes it through
&lt;a href="http://en.wikipedia.org/wiki/Awk"&gt;awk&lt;/a&gt; to extract the name and text
from your buddies. Simple and silly, yes?&lt;/p&gt;</content><category term="shell"/><category term="curl"/><category term="twitter"/><category term="tip"/></entry><entry><title>More Keyboard Fun</title><link href="https://sethmason.com/2008/10/28/more-keyboard-fun.html" rel="alternate"/><published>2008-10-28T00:00:00-07:00</published><updated>2008-10-28T00:00:00-07:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2008-10-28:/2008/10/28/more-keyboard-fun.html</id><content type="html">&lt;p&gt;Continuing along on the keyboard theme, most Google apps have keyboard
shortcuts. I've started using Google calendar and found the &lt;a href="http://www.google.com/support/calendar/bin/answer.py?hl=en-il&amp;amp;answer=37034"&gt;keyboard
shortcuts&lt;/a&gt;
for it as well. Very handy.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.google.com/support/calendar/bin/answer.py?hl=en-il&amp;amp;answer=37034"&gt;Google Calendar keyboard
shortcuts&lt;/a&gt;&lt;/p&gt;</content><category term="tools"/><category term="google"/><category term="tip"/></entry><entry><title>Speaking of keyboard navigation....</title><link href="https://sethmason.com/2008/10/10/speaking-of-keyboard-navigation.html" rel="alternate"/><published>2008-10-10T00:00:00-07:00</published><updated>2008-10-10T00:00:00-07:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2008-10-10:/2008/10/10/speaking-of-keyboard-navigation.html</id><summary type="html">&lt;p&gt;Did you know that you can navigate &lt;a href="http://www.google.com"&gt;Google&lt;/a&gt;
search results with your keyboard?&lt;/p&gt;
&lt;p&gt;It's a &lt;a href="http://labs.google.com"&gt;Google Labs&lt;/a&gt; experiment so you'll have
to enable it on any machine you want to try it.&lt;/p&gt;
&lt;p&gt;To experience the glory of navigating search results with your keyboard,
head on over to &lt;a href="http://www.google.com/experimental/"&gt;Google Experimental
Search …&lt;/a&gt;&lt;/p&gt;</summary><content type="html">&lt;p&gt;Did you know that you can navigate &lt;a href="http://www.google.com"&gt;Google&lt;/a&gt;
search results with your keyboard?&lt;/p&gt;
&lt;p&gt;It's a &lt;a href="http://labs.google.com"&gt;Google Labs&lt;/a&gt; experiment so you'll have
to enable it on any machine you want to try it.&lt;/p&gt;
&lt;p&gt;To experience the glory of navigating search results with your keyboard,
head on over to &lt;a href="http://www.google.com/experimental/"&gt;Google Experimental
Search&lt;/a&gt; and click "Join" for the
Keyboard Shortcuts experiment. Then it's simply a matter of pressing "J"
to navigate down the search results and "K" to move up your search
results on Google. Pressing "O" will then open up the link for you.
There are a few others that you might like as well so give this
experiment a whirl.&lt;/p&gt;
&lt;p&gt;The keyboard shortcuts key will also show up on your search results page
so that'll help you remember them. (Experienced &lt;a href="http://www.vim.org"&gt;vi&lt;/a&gt;
users will of course recognize these keyboard shortcuts.)&lt;/p&gt;</content><category term="tools"/><category term="google"/></entry><entry><title>Throw away that mouse</title><link href="https://sethmason.com/2008/10/10/throw-away-that-mouse.html" rel="alternate"/><published>2008-10-10T00:00:00-07:00</published><updated>2008-10-10T00:00:00-07:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2008-10-10:/2008/10/10/throw-away-that-mouse.html</id><summary type="html">&lt;p&gt;&lt;img alt="Mouseless browsing screenshot" class="pull-right" src="https://sethmason.com/images/12.png"&gt;&lt;/p&gt;
&lt;p&gt;I'm not a big fan of using the mouse. It pains me to reach for it to
accomplish something. That's why I was really excited to find the
&lt;a href="https://addons.mozilla.org/en-US/firefox/addon/879"&gt;Mouseless Browsing&lt;/a&gt;
add-on for &lt;a href="http://www.getfirefox.com"&gt;Firefox&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;From the add-on's
&lt;a href="http://www.mouseless.de/index.php?/content/view/14/26/"&gt;homepage&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Mouseless Browsing (MLB) is a Firefox-Extension which enables you to
browse the internet …&lt;/p&gt;&lt;/blockquote&gt;</summary><content type="html">&lt;p&gt;&lt;img alt="Mouseless browsing screenshot" class="pull-right" src="https://sethmason.com/images/12.png"&gt;&lt;/p&gt;
&lt;p&gt;I'm not a big fan of using the mouse. It pains me to reach for it to
accomplish something. That's why I was really excited to find the
&lt;a href="https://addons.mozilla.org/en-US/firefox/addon/879"&gt;Mouseless Browsing&lt;/a&gt;
add-on for &lt;a href="http://www.getfirefox.com"&gt;Firefox&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;From the add-on's
&lt;a href="http://www.mouseless.de/index.php?/content/view/14/26/"&gt;homepage&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Mouseless Browsing (MLB) is a Firefox-Extension which enables you to
browse the internet with the keyboard. The basic principle is to add
small boxes with unique ids behind every link and/or form element. You
just have to type in the id and press enter (there is also an
automatice mode available) to trigger the corresponding action i.e.
following a link, pressing a button or selecting a textfield.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I could never get &lt;a href="http://w3m.sourceforge.net/"&gt;w3m&lt;/a&gt; working how I liked
it so Mouseless Browsing really scratches an itch I have.&lt;/p&gt;</content><category term="tools"/><category term="firefox"/><category term="tip"/></entry><entry><title>jQuery and Friendfeed experimentation</title><link href="https://sethmason.com/2008/07/24/jquery-and-friendfeed-experimentation.html" rel="alternate"/><published>2008-07-24T00:00:00-07:00</published><updated>2008-07-24T00:00:00-07:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2008-07-24:/2008/07/24/jquery-and-friendfeed-experimentation.html</id><summary type="html">&lt;p&gt;So, I created a little page that'll dump out the last 30 items from my
&lt;a href="http://friendfeed.com/slackorama"&gt;Friendfeed&lt;/a&gt; feed.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.jquery.com"&gt;jQuery&lt;/a&gt; and &lt;a href="http://friendfeed.com/api/"&gt;the Friendfeed
API&lt;/a&gt; make it incredibly easy. It only took
me about 15 minutes to get it working. The rest of the time was making
it ugly with my crazy design …&lt;/p&gt;</summary><content type="html">&lt;p&gt;So, I created a little page that'll dump out the last 30 items from my
&lt;a href="http://friendfeed.com/slackorama"&gt;Friendfeed&lt;/a&gt; feed.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.jquery.com"&gt;jQuery&lt;/a&gt; and &lt;a href="http://friendfeed.com/api/"&gt;the Friendfeed
API&lt;/a&gt; make it incredibly easy. It only took
me about 15 minutes to get it working. The rest of the time was making
it ugly with my crazy design skills.&lt;/p&gt;
&lt;p&gt;It's over on my &lt;a href="http://www.slackorama.com/projects/friendfeed/jquery-test.html"&gt;vanity
site&lt;/a&gt; if
you are curious to check it out.&lt;/p&gt;</content><category term="programming"/><category term="jquery"/><category term="javascript"/><category term="friendfeed"/></entry><entry><title>Google Code Search to the rescue</title><link href="https://sethmason.com/2008/06/18/google-code-search-to-the-rescue.html" rel="alternate"/><published>2008-06-18T00:00:00-07:00</published><updated>2008-06-18T00:00:00-07:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2008-06-18:/2008/06/18/google-code-search-to-the-rescue.html</id><summary type="html">&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt; Google Code Search was shutdown so this fun doesn't apply anymore.&lt;/p&gt;
&lt;p&gt;Mmkay, this tip is probably a gazillion years late but &lt;a href="http://www.google.com/codesearch"&gt;Google Code
Search&lt;/a&gt; is a great resource for a
budding developer. Heck, I'm a relatively seasoned developer and I use
it.&lt;/p&gt;
&lt;p&gt;It allows you to search public source …&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt; Google Code Search was shutdown so this fun doesn't apply anymore.&lt;/p&gt;
&lt;p&gt;Mmkay, this tip is probably a gazillion years late but &lt;a href="http://www.google.com/codesearch"&gt;Google Code
Search&lt;/a&gt; is a great resource for a
budding developer. Heck, I'm a relatively seasoned developer and I use
it.&lt;/p&gt;
&lt;p&gt;It allows you to search public source code using a variety of methods.
You can search for an exact string or a regex. You can search certain
files, certain packages and certain languages.&lt;/p&gt;
&lt;p&gt;For instance, today I was curious how to use the Perl API for writing a
&lt;a href="http://www.pidgin.im"&gt;Pidgin&lt;/a&gt; plugin as their documentation is a tad
sparce. A quick search looking for
&lt;a href="http://www.google.com/codesearch?q=Purple%3A%3AFind%3A%3ABuddy&amp;amp;hl=en&amp;amp;btnG=Search+Code"&gt;Purple::Find::buddy&lt;/a&gt;
and I found a whole bunch of examples. You can also use it for silly
things, like looking for
&lt;a href="http://www.google.com/codesearch?hl=en&amp;amp;lr=&amp;amp;q=%22meaning+of+life%22&amp;amp;sbtn=Search"&gt;quotes&lt;/a&gt;
from "Hitchiker's Guide To The Galaxy."&lt;/p&gt;
&lt;p&gt;It's official, Google now owns me. &lt;em&gt;sigh&lt;/em&gt;&lt;/p&gt;</content><category term="programming"/><category term="google"/><category term="coding"/></entry><entry><title>Machine specific startup files in BASH</title><link href="https://sethmason.com/2008/06/10/machine-specific-startup-files-in-bash.html" rel="alternate"/><published>2008-06-10T00:00:00-07:00</published><updated>2008-06-10T00:00:00-07:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2008-06-10:/2008/06/10/machine-specific-startup-files-in-bash.html</id><summary type="html">&lt;p&gt;Here's a helpful tip if you use a couple of different machines and need
specific things set up on a specific machine.&lt;/p&gt;
&lt;p&gt;Just add the following to your
&lt;a href="http://en.wikipedia.org/wiki/Bash"&gt;.bashrc&lt;/a&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="c1"&gt;## Read Generic RC                                                                            &lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;rcfile&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="nv"&gt;$HOME&lt;/span&gt;&lt;span class="s2"&gt;/.shell/&amp;quot;&lt;/span&gt;*.rc&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;do&lt;/span&gt;&lt;span class="w"&gt;                        &lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-r&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="nv"&gt;$rcfile&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;
&lt;span class="k"&gt;done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Thus, common things are stored in your …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Here's a helpful tip if you use a couple of different machines and need
specific things set up on a specific machine.&lt;/p&gt;
&lt;p&gt;Just add the following to your
&lt;a href="http://en.wikipedia.org/wiki/Bash"&gt;.bashrc&lt;/a&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="c1"&gt;## Read Generic RC                                                                            &lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;rcfile&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="nv"&gt;$HOME&lt;/span&gt;&lt;span class="s2"&gt;/.shell/&amp;quot;&lt;/span&gt;*.rc&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;do&lt;/span&gt;&lt;span class="w"&gt;                        &lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-r&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="nv"&gt;$rcfile&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;
&lt;span class="k"&gt;done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Thus, common things are stored in your .bashrc (like aliases, functions,
etc.) and things you want on a specific machine are in their own
directory.&lt;/p&gt;
&lt;p&gt;Then, just put whatever machine specific files you want/need in &lt;code&gt;~/.shell&lt;/code&gt; and
name them with &lt;code&gt;.rc&lt;/code&gt;. For instance, I have &lt;code&gt;~/.shell/smurf.rc&lt;/code&gt; that sets up
some smurf information.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="go"&gt;&amp;gt; export FAVORITE_SMURF=&amp;quot;Poppa Smurf&amp;quot;&lt;/span&gt;
&lt;span class="go"&gt;&amp;gt; export SMURF_LOVER=$HOME/bin/blue_love&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;That way, if I ever need something that's specific to a machine, I just
drop it in my &lt;code&gt;.shell&lt;/code&gt; directory and away we go.&lt;/p&gt;</content><category term="shell"/><category term="bash"/><category term="configuration"/></entry><entry><title>Cost of try/catch in JavaScript</title><link href="https://sethmason.com/2008/02/15/cost-of-trycatch-in-javascript.html" rel="alternate"/><published>2008-02-15T00:00:00-08:00</published><updated>2008-02-15T00:00:00-08:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2008-02-15:/2008/02/15/cost-of-trycatch-in-javascript.html</id><summary type="html">&lt;p&gt;I know that in Java, using a try/catch is fairly expensive vs. a if
check. Since JavaScript has the same syntax for the most part, I wrote
up a simple benchmarking script to test it out. On my box, it outputs:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;avg&lt;/span&gt;:&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;.&lt;span class="mi"&gt;029&lt;/span&gt;
&lt;span class="nv"&gt;try&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;avg&lt;/span&gt;:&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;.&lt;span class="mi"&gt;372 …&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</summary><content type="html">&lt;p&gt;I know that in Java, using a try/catch is fairly expensive vs. a if
check. Since JavaScript has the same syntax for the most part, I wrote
up a simple benchmarking script to test it out. On my box, it outputs:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;avg&lt;/span&gt;:&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;.&lt;span class="mi"&gt;029&lt;/span&gt;
&lt;span class="nv"&gt;try&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;avg&lt;/span&gt;:&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;.&lt;span class="mi"&gt;372&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Note, that you'll need &lt;a href="http://ww.getfirebug.com"&gt;the Firebug plugin&lt;/a&gt;
for &lt;a href="http://www.getfirefox.com"&gt;Firefox&lt;/a&gt; in order to run this.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;tryFunc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;fake&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;innerHTML&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;hi there&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;catch&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="c1"&gt;// eat it!&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;ifFunc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;el&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;fake&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;el&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nx"&gt;el&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;innerHTML&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;hi there&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;benchmark&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;func&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;repeats&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;elapsed&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;startTime&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;endTime&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;repeats&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nx"&gt;startTime&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ow"&gt;new&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;getTime&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nx"&gt;func&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;call&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nx"&gt;endTime&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ow"&gt;new&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;getTime&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nx"&gt;elapsed&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;endTime&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;startTime&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot; avg: &amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;elapsed&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;repeats&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;benchmark&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;if&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;ifFunc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;benchmark&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;try&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;tryFunc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</content><category term="programming"/><category term="javascript"/><category term="benchmark"/></entry><entry><title>HOWTO: Invoke a shell script on a file on save with emacs</title><link href="https://sethmason.com/2008/01/22/howto-invoke-a-shell-script-on-a-file-on-save-with-emacs.html" rel="alternate"/><published>2008-01-22T00:00:00-08:00</published><updated>2008-01-22T00:00:00-08:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2008-01-22:/2008/01/22/howto-invoke-a-shell-script-on-a-file-on-save-with-emacs.html</id><summary type="html">&lt;p&gt;At my &lt;a href="http://www.cheetahmail.com"&gt;current job&lt;/a&gt;, we use a lot of
&lt;a href="http://www.template-toolkit.org"&gt;Template Toolkit&lt;/a&gt;. Due to some design
decisions (that I consider a tad strange), we have to run a shell script
on the template files (e.g. files that end with “.tt”) after they are
saved in order for them to be …&lt;/p&gt;</summary><content type="html">&lt;p&gt;At my &lt;a href="http://www.cheetahmail.com"&gt;current job&lt;/a&gt;, we use a lot of
&lt;a href="http://www.template-toolkit.org"&gt;Template Toolkit&lt;/a&gt;. Due to some design
decisions (that I consider a tad strange), we have to run a shell script
on the template files (e.g. files that end with “.tt”) after they are
saved in order for them to be displayed on the dev site.&lt;/p&gt;
&lt;p&gt;Since I started using emacs about two months ago, I've learned quite a
bit. A new thing on the learning heap is the
&lt;a href="http://www.gnu.org/software/emacs/elisp/html_node/Saving-Buffers.html"&gt;after-save-hook.&lt;/a&gt;
Emacs to the rescue yet again.&lt;/p&gt;
&lt;p&gt;Here's a emacs lisp function I wrote to automate the execution of the
script when a template file is saved:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;defun&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;ssm-cheetah-after-save-hook&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;After saving a tt file, run the language_update file&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;buffer-file-name&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;progn&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;setq&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;is-tt-file&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;numberp&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;string-match&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;&lt;/span&gt;&lt;span class="se"&gt;\.&lt;/span&gt;&lt;span class="s"&gt;tt$&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;buffer-file-name&lt;/span&gt;&lt;span class="p"&gt;)))&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;is-tt-file&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;progn&lt;/span&gt;
&lt;span class="w"&gt;              &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;setq&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;cmd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;concat&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;getenv&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;B&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;/bin/YOURSCRIPTHERE --template=&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="w"&gt;              &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;shell-command&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;concat&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;cmd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;buffer-file-name&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="w"&gt;              &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;message&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;Updated template with %s&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;buffer-file-name&lt;/span&gt;&lt;span class="p"&gt;))))))&lt;/span&gt;
&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;add-hook&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;&amp;#39;after-save-hook&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;&amp;#39;ssm-cheetah-after-save-hook&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;What it does, is first defines a function that checks to see if we have
a file name, (which should probably always be true since we are saving
now that I look at it). If we do, check to see if the name ends with
“.tt.” If it does, pass the name of the file to the shell script and
output a message to the user saying the template was updated. Finally,
the function is added to the after save hook.&lt;/p&gt;</content><category term="editor"/><category term="emacs"/><category term="tip"/></entry><entry><title>Emacs Tips</title><link href="https://sethmason.com/2007/12/28/emacs-tips.html" rel="alternate"/><published>2007-12-28T00:00:00-08:00</published><updated>2007-12-28T00:00:00-08:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2007-12-28:/2007/12/28/emacs-tips.html</id><summary type="html">&lt;p&gt;Since I've been programming more Perl than Java lately, I've started
using Emacs as my primary IDE. Been checking out a few sites with tips
and tricks to help me along the path of conversion from vi to Emacs.
&lt;a href="http://trey-jackson.blogspot.com/"&gt;Trey Jackson's blog&lt;/a&gt; seems pretty
promising.&lt;/p&gt;
&lt;p&gt;Hopefully, he can keep up …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Since I've been programming more Perl than Java lately, I've started
using Emacs as my primary IDE. Been checking out a few sites with tips
and tricks to help me along the path of conversion from vi to Emacs.
&lt;a href="http://trey-jackson.blogspot.com/"&gt;Trey Jackson's blog&lt;/a&gt; seems pretty
promising.&lt;/p&gt;
&lt;p&gt;Hopefully, he can keep up the tip a week format. Allegedly, he has 150
tips so he should be good for 3 or so years.&lt;/p&gt;</content><category term="editor"/><category term="emacs"/></entry><entry><title>Lisp Fun</title><link href="https://sethmason.com/2007/10/30/lisp-fun.html" rel="alternate"/><published>2007-10-30T00:00:00-07:00</published><updated>2007-10-30T00:00:00-07:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2007-10-30:/2007/10/30/lisp-fun.html</id><summary type="html">&lt;p&gt;Interested in learning
&lt;a href="http://en.wikipedia.org/wiki/Lisp_%28programming_language%29"&gt;Lisp&lt;/a&gt;? A
new site has launched with screencast episodes about developing an
application in Lisp. The site is &lt;a href="http://www.lispcast.com/"&gt;LispCast&lt;/a&gt;
and so far there are three videos up. It's about building a web
application that is a clone of &lt;a href="http://www.reddit.com"&gt;Reddit&lt;/a&gt;. The
subject of the videos so far are …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Interested in learning
&lt;a href="http://en.wikipedia.org/wiki/Lisp_%28programming_language%29"&gt;Lisp&lt;/a&gt;? A
new site has launched with screencast episodes about developing an
application in Lisp. The site is &lt;a href="http://www.lispcast.com/"&gt;LispCast&lt;/a&gt;
and so far there are three videos up. It's about building a web
application that is a clone of &lt;a href="http://www.reddit.com"&gt;Reddit&lt;/a&gt;. The
subject of the videos so far are writing it, developing tests and
refactoring. They each clock in at about twenty minutes and are quite
helpful.&lt;/p&gt;
&lt;p&gt;It looks like the creator, one Eric Normand, has some pretty big plans
for the site. Let's hope that he is able to do it. I know I'm rooting
for him.&lt;/p&gt;</content><category term="programming"/><category term="lisp"/><category term="screencasts"/></entry><entry><title>Intellij IDEA and Linux: Not Like Peanut Butter and Chocolate</title><link href="https://sethmason.com/2007/10/22/intellij-idea-and-linux-not-like-peanut-butter-and-chocolate.html" rel="alternate"/><published>2007-10-22T00:00:00-07:00</published><updated>2007-10-22T00:00:00-07:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2007-10-22:/2007/10/22/intellij-idea-and-linux-not-like-peanut-butter-and-chocolate.html</id><summary type="html">&lt;p&gt;I love me some Intellij and I love me some Linux. Unfortunately, they
don't play too well together. Lots of keyboard shortcuts do operating
system commands.&lt;/p&gt;
&lt;p&gt;For instance, &lt;code&gt;CTRL+ALT+L&lt;/code&gt; reformats your code in Intellij but it never
gets a chance to that because that keyboard sequence locks the …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I love me some Intellij and I love me some Linux. Unfortunately, they
don't play too well together. Lots of keyboard shortcuts do operating
system commands.&lt;/p&gt;
&lt;p&gt;For instance, &lt;code&gt;CTRL+ALT+L&lt;/code&gt; reformats your code in Intellij but it never
gets a chance to that because that keyboard sequence locks the desktop
on Ubuntu. Besides changing quite a few keyboard shortcuts in the
administration screen, does anyone have any tips or tricks?&lt;/p&gt;</content><category term="editor"/><category term="intellij"/><category term="linux"/><category term="idea"/></entry><entry><title>Editing Huge Amounts of Files Easily</title><link href="https://sethmason.com/2007/10/06/editing-huge-amounts-of-files-easily.html" rel="alternate"/><published>2007-10-06T00:00:00-07:00</published><updated>2007-10-06T00:00:00-07:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2007-10-06:/2007/10/06/editing-huge-amounts-of-files-easily.html</id><summary type="html">&lt;p&gt;Where I &lt;a href="http://www.ign.com"&gt;work&lt;/a&gt;, we have tons of static html files
that are published using our custom built Content Management System.
Sometimes, we have to change a single line on every single page. For
example, the latest case involved a change involving the size of ads
that were on the pages …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Where I &lt;a href="http://www.ign.com"&gt;work&lt;/a&gt;, we have tons of static html files
that are published using our custom built Content Management System.
Sometimes, we have to change a single line on every single page. For
example, the latest case involved a change involving the size of ads
that were on the pages. Rather than use publishing and database
resources just to make this relatively simple change, I use the power of
the shell. Specifically, I use
&lt;a href="http://linuxcommand.org/man_pages/find1.html"&gt;find&lt;/a&gt;,
&lt;a href="http://www.grymoire.com/Unix/Sed.html"&gt;sed&lt;/a&gt; and a shell script
that I wrote. It's based on a shell script in the &lt;a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&amp;amp;location=http%3A%2F%2Fwww.amazon.com%2FPower-Tools-Third-Shelley-Powers%2Fdp%2F0596003307%3Fie%3DUTF8%26s%3Dbooks%26qid%3D1191730398%26sr%3D8-1&amp;amp;tag=slackorama-20&amp;amp;linkCode=ur2&amp;amp;camp=1789&amp;amp;creative=9325"&gt;Unix Power
Tools&lt;/a&gt;
book.&lt;/p&gt;
&lt;p&gt;First off, we need to find all the files. I usually accomplish this with
something simple like&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="gp"&gt;$ &lt;/span&gt;find&lt;span class="w"&gt; &lt;/span&gt;/www&lt;span class="w"&gt; &lt;/span&gt;-type&lt;span class="w"&gt; &lt;/span&gt;f&lt;span class="w"&gt; &lt;/span&gt;-name&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;*.html&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-print
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;This simply finds that end with .html in the /www directory. You can do
more complex things with &lt;code&gt;find&lt;/code&gt; like find all files modified in the last
2 days by Frank if you needed to change files like that.&lt;/p&gt;
&lt;p&gt;The results of this will be passed off to a file named &lt;code&gt;replace.sh&lt;/code&gt;
located in my &lt;code&gt;~/bin&lt;/code&gt; directory. &lt;code&gt;replace.sh&lt;/code&gt; is reproduced here:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="ch"&gt;#!/bin/sh&lt;/span&gt;
&lt;span class="nv"&gt;temp&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/tmp/replace&lt;span class="nv"&gt;$$&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-n&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;editing &lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="s2"&gt;: &amp;quot;&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;test&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;sedscr&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;then&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-n&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Not editing sedscript!&amp;quot;&lt;/span&gt;
&lt;span class="k"&gt;elif&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;test&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-s&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;then&lt;/span&gt;
&lt;span class="w"&gt;         &lt;/span&gt;sed&lt;span class="w"&gt; &lt;/span&gt;-f&lt;span class="w"&gt; &lt;/span&gt;sedscr&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&amp;gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$temp&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;test&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-s&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="nv"&gt;$temp&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;then&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;cmp&lt;span class="w"&gt; &lt;/span&gt;-s&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$temp&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;then&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-n&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;FILE NOT CHANGED: &amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="k"&gt;else&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="c1"&gt;# save original, just in case&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="c1"&gt;# mv $1 $1.bak&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;cp&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$temp&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="k"&gt;fi&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-n&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;done&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;else&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-n&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Sed produced an empty file \&lt;/span&gt;
&lt;span class="s2"&gt;- check your sedscript&amp;quot;&lt;/span&gt;.
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;fi&lt;/span&gt;
&lt;span class="k"&gt;else&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-n&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;ORIGINAL FILE IS EMPTY&amp;quot;&lt;/span&gt;
&lt;span class="k"&gt;fi&lt;/span&gt;
rm&lt;span class="w"&gt; &lt;/span&gt;-f&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$temp&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;So, the command we would run would now look like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="gp"&gt;$ &lt;/span&gt;find&lt;span class="w"&gt; &lt;/span&gt;/www&lt;span class="w"&gt; &lt;/span&gt;-type&lt;span class="w"&gt; &lt;/span&gt;f&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;-name&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;*.html&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;-exec&lt;span class="w"&gt; &lt;/span&gt;~/bin/replace.sh&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;{}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;This does the same as above but passes each file found by the &lt;code&gt;find&lt;/code&gt;
command above to the &lt;code&gt;~/bin/replace.sh&lt;/code&gt; script.&lt;/p&gt;
&lt;p&gt;You'll notice that the &lt;code&gt;replace.sh&lt;/code&gt; file calls &lt;code&gt;sed&lt;/code&gt; using a file named
&lt;code&gt;sedscr.&lt;/code&gt; The next step is creating the &lt;code&gt;sedscr&lt;/code&gt; file.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;sedscr&lt;/code&gt; files simple contains &lt;code&gt;sed&lt;/code&gt; commands. It must exist in the
same directory that you call the &lt;code&gt;find&lt;/code&gt; command above from. Here's a
sample &lt;code&gt;sedscr&lt;/code&gt; that just does a simple replace.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="sr"&gt;s/BigHonkingAd/NiceSmallAd/&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;You can enter in as many complex &lt;a href="http://main.rtfiber.com.tw/~changyj/sed/"&gt;sed commands&lt;/a&gt; as you want. It's
&lt;code&gt;sed&lt;/code&gt; so the power is there!&lt;/p&gt;
&lt;p&gt;This simply replaces all instances of BigHonkingAd with NiceSmallAd in
each of your files found by the &lt;code&gt;find&lt;/code&gt; command. The nice thing about the
&lt;code&gt;replace.sh&lt;/code&gt; script is that it will not edit the file if the contents of
your &lt;code&gt;sedscr&lt;/code&gt; don't produce an altered file. Also, if you want the
&lt;code&gt;replace.sh&lt;/code&gt; to make a backup of your original file, just uncomment the
&lt;code&gt;mv&lt;/code&gt; line.&lt;/p&gt;
&lt;p&gt;Using this methodology, I'm able to edit about 5000 files a minute. It
could probably be faster if I used
&lt;a href="http://unixhelp.ed.ac.uk/CGI/man-cgi?xargs"&gt;xargs&lt;/a&gt; and the output of
&lt;code&gt;replace.sh&lt;/code&gt; is a little verbose but this solution has worked for me for
years and if it ain't broke, why fix it?&lt;/p&gt;</content><category term="programming"/><category term="shell"/><category term="sed"/><category term="find"/></entry><entry><title>Vim Tip: Select Column</title><link href="https://sethmason.com/2007/09/27/vim-tip-select-column.html" rel="alternate"/><published>2007-09-27T00:00:00-07:00</published><updated>2007-09-27T00:00:00-07:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2007-09-27:/2007/09/27/vim-tip-select-column.html</id><summary type="html">&lt;p&gt;&lt;img alt="Columns in vim" class="pull-right img-rounded" src="https://sethmason.com/images/11.png"&gt;&lt;/p&gt;
&lt;p&gt;How many times have you wanted
to replace a column of text with something. With &lt;a href="http://vim.org"&gt;vim&lt;/a&gt;
it's easy. Just use &lt;code&gt;CTRL-V&lt;/code&gt; to select a column using a visual block.&lt;/p&gt;
&lt;p&gt;Once it's selected, you can do a search and replace, yank, cut and other
actions. For example, here's the keystrokes to …&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;img alt="Columns in vim" class="pull-right img-rounded" src="https://sethmason.com/images/11.png"&gt;&lt;/p&gt;
&lt;p&gt;How many times have you wanted
to replace a column of text with something. With &lt;a href="http://vim.org"&gt;vim&lt;/a&gt;
it's easy. Just use &lt;code&gt;CTRL-V&lt;/code&gt; to select a column using a visual block.&lt;/p&gt;
&lt;p&gt;Once it's selected, you can do a search and replace, yank, cut and other
actions. For example, here's the keystrokes to change a column.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Put cursor and beginning of text to select&lt;/li&gt;
&lt;li&gt;Press &lt;code&gt;CTRL-V&lt;/code&gt; to begin select of the column&lt;/li&gt;
&lt;li&gt;When you reach the end of your select, type '&lt;code&gt;c&lt;/code&gt;'&lt;/li&gt;
&lt;li&gt;Type the new text. Note that this will only replace the first
    instance.&lt;/li&gt;
&lt;li&gt;Now hit &lt;code&gt;&amp;lt;ESC&amp;gt;&amp;lt;ESC&amp;gt;&lt;/code&gt;. All the text has been changed!&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The same thing works with plain old '&lt;code&gt;v&lt;/code&gt;' (select character by
character) and &lt;code&gt;SHIFT-V&lt;/code&gt; (select by line).&lt;/p&gt;
&lt;p&gt;Happy vimming!&lt;/p&gt;</content><category term="editor"/><category term="vim"/></entry><entry><title>Just Cuz'</title><link href="https://sethmason.com/2007/09/20/just-cuz.html" rel="alternate"/><published>2007-09-20T00:00:00-07:00</published><updated>2007-09-20T00:00:00-07:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2007-09-20:/2007/09/20/just-cuz.html</id><content type="html">&lt;p&gt;OK, I've decided that the next programming langauge I learn is Lisp. I
just love all the parenthesis I guess. An excellent &lt;a href="http://www.gigamonkeys.com/book/"&gt;Lisp
tutorial&lt;/a&gt; is Peter Siebel's book
&lt;a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&amp;amp;location=http%3A%2F%2Fwww.amazon.com%2FPractical-Common-Lisp-Peter-Seibel%2Fdp%2F1590592395%3Fie%3DUTF8%26s%3Dbooks%26qid%3D1190332229%26sr%3D8-1&amp;amp;tag=slackorama-20&amp;amp;linkCode=ur2&amp;amp;camp=1789&amp;amp;creative=9325"&gt;Practical Common
Lisp&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Fun stuff.&lt;/p&gt;</content><category term="personal"/><category term="lisp"/></entry><entry><title>Command Line Fun</title><link href="https://sethmason.com/2007/07/15/command-line-fun.html" rel="alternate"/><published>2007-07-15T00:00:00-07:00</published><updated>2007-07-15T00:00:00-07:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2007-07-15:/2007/07/15/command-line-fun.html</id><summary type="html">&lt;p&gt;If you use the command line in bash, you should check out the CDPATH
environment variable. It'll make your life tons easier.&lt;/p&gt;
&lt;p&gt;From the &lt;a href="http://www.linuxcommand.org/man_pages/bash1.html"&gt;bash man
pages&lt;/a&gt;, CDPATH is
defined as:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The search path for the cd command. This is a colon-separated list of
directories in which the shell looks …&lt;/p&gt;&lt;/blockquote&gt;</summary><content type="html">&lt;p&gt;If you use the command line in bash, you should check out the CDPATH
environment variable. It'll make your life tons easier.&lt;/p&gt;
&lt;p&gt;From the &lt;a href="http://www.linuxcommand.org/man_pages/bash1.html"&gt;bash man
pages&lt;/a&gt;, CDPATH is
defined as:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The search path for the cd command. This is a colon-separated list of
directories in which the shell looks for destination directories
specified by the cd command. A sample value is “.:\~:/usr”.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;In my &lt;code&gt;.bashrc&lt;/code&gt;, I've got the following defined: &lt;code&gt;CDPATH='.:..:../..:~/projects'&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;This allows me to just type &lt;code&gt;cd app&lt;/code&gt; when I want to go to
&lt;code&gt;~/projects/app&lt;/code&gt;. Another great part of it is that if I am in &lt;code&gt;/var/log&lt;/code&gt;
and want to go to &lt;code&gt;/var/www&lt;/code&gt; I only need to type &lt;code&gt;cd www&lt;/code&gt;. The &lt;code&gt;..&lt;/code&gt; in
the &lt;code&gt;CDPATH&lt;/code&gt; takes care of finding it.&lt;/p&gt;
&lt;p&gt;The important part of it is the first one. The single period allows for
&lt;code&gt;cd&lt;/code&gt; to work normally and find directories in your current directory.&lt;/p&gt;</content><category term="shell"/><category term="bash"/><category term="configuration"/><category term="tip"/></entry><entry><title>Ten Keyboard Shortcuts for IntelliJ IDEA</title><link href="https://sethmason.com/2007/06/29/ten-keyboard-shortcuts-for-intellij-idea.html" rel="alternate"/><published>2007-06-29T00:00:00-07:00</published><updated>2007-06-29T00:00:00-07:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2007-06-29:/2007/06/29/ten-keyboard-shortcuts-for-intellij-idea.html</id><summary type="html">&lt;p&gt;&lt;img alt="IntellJ Shortcuts" class="center-block" src="https://sethmason.com/images/10.png"&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;
For my &lt;a href="http://www.ign.com" title="IGN"&gt;day job&lt;/a&gt; I use Java quite a bit. And
to edit I use &lt;a href="http://www.jetbrains.com/idea/" title="The Most Intelligent Java IDE"&gt;IntelliJ
IDEA&lt;/a&gt;. I
used to use &lt;a href="http://eclipse.org"&gt;Eclipse&lt;/a&gt; but work paid for an IntelliJ
IDEA license and I've become hooked. The refactorings and clean
interface are a boon to my productivity.&lt;/p&gt;
&lt;p&gt;Well this post isn't an …&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;img alt="IntellJ Shortcuts" class="center-block" src="https://sethmason.com/images/10.png"&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;
For my &lt;a href="http://www.ign.com" title="IGN"&gt;day job&lt;/a&gt; I use Java quite a bit. And
to edit I use &lt;a href="http://www.jetbrains.com/idea/" title="The Most Intelligent Java IDE"&gt;IntelliJ
IDEA&lt;/a&gt;. I
used to use &lt;a href="http://eclipse.org"&gt;Eclipse&lt;/a&gt; but work paid for an IntelliJ
IDEA license and I've become hooked. The refactorings and clean
interface are a boon to my productivity.&lt;/p&gt;
&lt;p&gt;Well this post isn't an IntelliJ IDEA fanboy post so let's get back on
track. Here's a list of shortcuts that I find most helpful for use with
IntelliJ IDEA. Note that these aren't the obvious ones (like
&lt;strong&gt;Alt-Space&lt;/strong&gt; for code completion). These are some hidden ones that you
might not know about it.&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;strong&gt;Ctrl-/&lt;/strong&gt;&lt;/dt&gt;
&lt;dd&gt;Comment out the selected lines with //.&lt;/dd&gt;
&lt;dt&gt;&lt;strong&gt;Ctrl-D&lt;/strong&gt;&lt;/dt&gt;
&lt;dd&gt;Copy the current line and paste it.&lt;/dd&gt;
&lt;dt&gt;&lt;strong&gt;Ctrl-Y&lt;/strong&gt;&lt;/dt&gt;
&lt;dd&gt;Delete the current line.&lt;/dd&gt;
&lt;dt&gt;&lt;strong&gt;Ctrl-BACKSPACE&lt;/strong&gt;&lt;/dt&gt;
&lt;dd&gt;Delete to word end from cursor.&lt;/dd&gt;
&lt;dt&gt;&lt;strong&gt;Ctrl-DEL&lt;/strong&gt;&lt;/dt&gt;
&lt;dd&gt;Delete to word start from cursor.&lt;/dd&gt;
&lt;dt&gt;&lt;strong&gt;Ctrl-W&lt;/strong&gt;&lt;/dt&gt;
&lt;dd&gt;Select the current word. Press it again and it selects more of the
code block.&lt;/dd&gt;
&lt;dt&gt;&lt;strong&gt;Shift+F10&lt;/strong&gt;&lt;/dt&gt;
&lt;dd&gt;Run the configuration&lt;/dd&gt;
&lt;dt&gt;&lt;strong&gt;Shift+F9&lt;/strong&gt;&lt;/dt&gt;
&lt;dd&gt;Debug the configuration&lt;/dd&gt;
&lt;dt&gt;&lt;strong&gt;Alt+F7&lt;/strong&gt;&lt;/dt&gt;
&lt;dd&gt;Find usages of the current word&lt;/dd&gt;
&lt;dt&gt;&lt;strong&gt;Ctrl-J&lt;/strong&gt;&lt;/dt&gt;
&lt;dd&gt;Bring up the &lt;a href="http://www.jetbrains.com/idea/docs/help/editing/livetemplates/definetemplates.html"&gt;Live
Template&lt;/a&gt;
context menu. If you don't know about Live Templates, you can save
major keystrokes by defining them.&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;For a complete list of keyboard shortcuts for IntelliJ IDEA, there's a
&lt;a href="http://www.jetbrains.com/idea/docs/IntelliJIDEA8_ReferenceCard.pdf" title="PDF of IntelliJ IDEA keyboard shortcuts"&gt;PDF&lt;/a&gt;
issued by JetBrains floating around.&lt;/p&gt;</content><category term="editor"/><category term="idea"/></entry><entry><title>Linux Cut and Paste</title><link href="https://sethmason.com/2007/06/20/linux-cut-and-paste.html" rel="alternate"/><published>2007-06-20T00:00:00-07:00</published><updated>2007-06-20T00:00:00-07:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2007-06-20:/2007/06/20/linux-cut-and-paste.html</id><summary type="html">&lt;p&gt;&lt;img alt="Linux logo" class="pull-left" src="https://sethmason.com/images/9.png"&gt;&lt;/p&gt;
&lt;p&gt;Since I'm in the process of switching to &lt;a href="https://www.ubuntu.com/"&gt;Ubuntu&lt;/a&gt; I've
been hunting down tips and tricks. One great resource is the &lt;a href="https://ubuntu.wordpress.com"&gt;Ubuntu
Blog&lt;/a&gt;. Today they had a &lt;a href="https://ubuntu.wordpress.com/2006/12/12/cut-copy-paste-clipboard-management/"&gt;great tip for
copying and pasting in
GNOME&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Basically, what you do is highlight the text in one application (for
example Firefox), switch …&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;img alt="Linux logo" class="pull-left" src="https://sethmason.com/images/9.png"&gt;&lt;/p&gt;
&lt;p&gt;Since I'm in the process of switching to &lt;a href="https://www.ubuntu.com/"&gt;Ubuntu&lt;/a&gt; I've
been hunting down tips and tricks. One great resource is the &lt;a href="https://ubuntu.wordpress.com"&gt;Ubuntu
Blog&lt;/a&gt;. Today they had a &lt;a href="https://ubuntu.wordpress.com/2006/12/12/cut-copy-paste-clipboard-management/"&gt;great tip for
copying and pasting in
GNOME&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Basically, what you do is highlight the text in one application (for
example Firefox), switch to another application and then click the
middle mouse button where you want the text to show up. Your highlighted
text is now exactly where you want it. If you don't feel like using the
mouse, you can use Shift+Insert in the second application to paste the
text.&lt;/p&gt;</content><category term="shell"/><category term="linux"/></entry><entry><title>Cygwin And SSH Tip</title><link href="https://sethmason.com/2007/06/13/cygwin-and-ssh-tip.html" rel="alternate"/><published>2007-06-13T00:00:00-07:00</published><updated>2007-06-13T00:00:00-07:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2007-06-13:/2007/06/13/cygwin-and-ssh-tip.html</id><summary type="html">&lt;p&gt;&lt;img alt="cygwin logo" class="pull-right" src="https://sethmason.com/images/8.png"&gt;&lt;/p&gt;
&lt;p&gt;Auto completion for &lt;code&gt;ssh&lt;/code&gt; under cygwin was driving me nuts. It wasn't
parsing the &lt;code&gt;~/.ssh/known_hosts&lt;/code&gt; file like it should have and using
those values to auto-complete. Investigating, (by using &lt;code&gt;ssh -v&lt;/code&gt;) I
found out that my &lt;code&gt;known_hosts&lt;/code&gt; didn't exist in &lt;code&gt;${HOME}/.ssh&lt;/code&gt; and &lt;code&gt;ssh&lt;/code&gt;
was using the one in …&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;img alt="cygwin logo" class="pull-right" src="https://sethmason.com/images/8.png"&gt;&lt;/p&gt;
&lt;p&gt;Auto completion for &lt;code&gt;ssh&lt;/code&gt; under cygwin was driving me nuts. It wasn't
parsing the &lt;code&gt;~/.ssh/known_hosts&lt;/code&gt; file like it should have and using
those values to auto-complete. Investigating, (by using &lt;code&gt;ssh -v&lt;/code&gt;) I
found out that my &lt;code&gt;known_hosts&lt;/code&gt; didn't exist in &lt;code&gt;${HOME}/.ssh&lt;/code&gt; and &lt;code&gt;ssh&lt;/code&gt;
was using the one in &lt;code&gt;C:/Documents and Settings/smason/.ssh&lt;/code&gt;. Uh,
&lt;em&gt;excuse me&lt;/em&gt;? My &lt;code&gt;$HOME&lt;/code&gt; is &lt;code&gt;/home/smason&lt;/code&gt;. I &lt;code&gt;cd ~&lt;/code&gt; and I'm in
&lt;code&gt;/home/smason&lt;/code&gt;. Bafflement ensued.&lt;/p&gt;
&lt;p&gt;Turns out my &lt;code&gt;/etc/passwd&lt;/code&gt; was all mucked up. It had my &lt;code&gt;HOME&lt;/code&gt; directory
set to the one in my &lt;code&gt;Documents and Settings&lt;/code&gt; directory. I manually
edited my &lt;code&gt;/etc/passwd&lt;/code&gt; and now &lt;code&gt;ssh&lt;/code&gt; auto completion works.&lt;/p&gt;
&lt;p&gt;Wow, the &lt;a href="https://sethmason.com/2007/06/12/bashrc-fun-with-subversion.html"&gt;second post&lt;/a&gt;
in a row dealing with auto completion. I guess I &lt;strong&gt;really&lt;/strong&gt; like
auto-completion. Think of the keystrokes I'm saving you!&lt;/p&gt;</content><category term="shell"/><category term="cygwin"/><category term="ssh"/><category term="bash"/></entry><entry><title>.bashrc Fun With Subversion</title><link href="https://sethmason.com/2007/06/12/bashrc-fun-with-subversion.html" rel="alternate"/><published>2007-06-12T00:00:00-07:00</published><updated>2007-06-12T00:00:00-07:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2007-06-12:/2007/06/12/bashrc-fun-with-subversion.html</id><summary type="html">&lt;p&gt;Do you use Subversion a lot from the command line in bash? Then this tip
is for you.&lt;/p&gt;
&lt;p&gt;Add the following to your .bashrc&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="c1"&gt;# svn completion&lt;/span&gt;
_svn&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt;
&lt;span class="o"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;local&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;cur&lt;span class="w"&gt; &lt;/span&gt;prev
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nv"&gt;COMPREPLY&lt;/span&gt;&lt;span class="o"&gt;=()&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nv"&gt;cur&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;COMP_WORDS&lt;/span&gt;&lt;span class="p"&gt;[COMP_CWORD]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nv"&gt;prev&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;COMP_WORDS&lt;/span&gt;&lt;span class="p"&gt;[COMP_CWORD-1]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$COMP_CWORD&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-eq&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;||&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;prev&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nv"&gt;0&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nv"&gt;1&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;-&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;then&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nv"&gt;COMPREPLY&lt;/span&gt;&lt;span class="o"&gt;=(&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;$(&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;compgen&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-W&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;add blame …&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</summary><content type="html">&lt;p&gt;Do you use Subversion a lot from the command line in bash? Then this tip
is for you.&lt;/p&gt;
&lt;p&gt;Add the following to your .bashrc&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="c1"&gt;# svn completion&lt;/span&gt;
_svn&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt;
&lt;span class="o"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;local&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;cur&lt;span class="w"&gt; &lt;/span&gt;prev
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nv"&gt;COMPREPLY&lt;/span&gt;&lt;span class="o"&gt;=()&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nv"&gt;cur&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;COMP_WORDS&lt;/span&gt;&lt;span class="p"&gt;[COMP_CWORD]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nv"&gt;prev&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;COMP_WORDS&lt;/span&gt;&lt;span class="p"&gt;[COMP_CWORD-1]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$COMP_CWORD&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-eq&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;||&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;prev&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nv"&gt;0&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nv"&gt;1&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;-&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;then&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nv"&gt;COMPREPLY&lt;/span&gt;&lt;span class="o"&gt;=(&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;$(&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;compgen&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-W&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;add blame cat checkout cleanup \&lt;/span&gt;
&lt;span class="s1"&gt;        commit copy delete diff export help import info list lock \&lt;/span&gt;
&lt;span class="s1"&gt;        log merge mkdir move propdel propedit propget proplist \&lt;/span&gt;
&lt;span class="s1"&gt;        propset resolved revert status switch unlock update&amp;#39;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$cur&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;)&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;else&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nv"&gt;COMPREPLY&lt;/span&gt;&lt;span class="o"&gt;=(&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;$(&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;compgen&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-f&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$cur&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;)&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;fi&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
ccomplete&lt;span class="w"&gt; &lt;/span&gt;-F&lt;span class="w"&gt; &lt;/span&gt;_svn&lt;span class="w"&gt; &lt;/span&gt;-o&lt;span class="w"&gt; &lt;/span&gt;default&lt;span class="w"&gt; &lt;/span&gt;-X&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;@(*/.svn|.svn)&amp;#39;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;svn
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Save your .bashrc, source it (using &lt;code&gt;source .bashrc&lt;/code&gt;) and now Subversion
commands will complete. For example, enter &lt;code&gt;svn upd&lt;/code&gt; press the Tab key
and you'll get &lt;code&gt;svn update&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Think of all the keystrokes you'll be saving.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; I just found Subversion's own &lt;a href="http://svn.collab.net/repos/svn/trunk/tools/client-side/bash_completion"&gt;bash completion
script&lt;/a&gt;
which has a ton more options. Mine is easier to maintain. :)&lt;/p&gt;</content><category term="shell"/><category term="subversion"/><category term="bash"/></entry><entry><title>Got Ugly SQL?</title><link href="https://sethmason.com/2007/06/09/got-ugly-sql.html" rel="alternate"/><published>2007-06-09T00:00:00-07:00</published><updated>2007-06-09T00:00:00-07:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2007-06-09:/2007/06/09/got-ugly-sql.html</id><summary type="html">&lt;p&gt;&lt;img alt="SQL Formatter screen shot" class="pull-right" src="https://sethmason.com/images/6.png"&gt;&lt;/p&gt;
&lt;p&gt;Sometimes you have a bunch of SQL statements that are very long, very
verbose and very unreadable. Would you spend minutes of your time to
format the SQL in strings so that it's readable? Would you paste the
ugly SQL in your source code letting some future maintainer try and …&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;img alt="SQL Formatter screen shot" class="pull-right" src="https://sethmason.com/images/6.png"&gt;&lt;/p&gt;
&lt;p&gt;Sometimes you have a bunch of SQL statements that are very long, very
verbose and very unreadable. Would you spend minutes of your time to
format the SQL in strings so that it's readable? Would you paste the
ugly SQL in your source code letting some future maintainer try and
decipher it? Well, I'm about to save you a metric ton of time as well as
your reputation with maintainers of your code. Use &lt;a href="http://www.sqlinform.com/" title="SQL Formatter formats SQL statements"&gt;SQL
Formatter&lt;/a&gt;
and it'll do all the grunt work for you.&lt;/p&gt;
&lt;p&gt;It's bloody easy to use. Just Accept the usage agreement, paste in your
offending SQL statement and choose the formatting and output you want.
Bingo! Nicely formatted SQL. You can even choose to format it as a
string in the language of your choice so you can just copy and paste it
into your source.&lt;/p&gt;
&lt;p&gt;If you don't feel comfortable using an online tool, there's a desktop
version that's
&lt;a href="http://en.wikipedia.org/wiki/Postcardware" title="Definition of postcardware on wikipedia"&gt;postcardware&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.sqlinform.com/" title="SQL Formatter"&gt;Give it a whirl!&lt;/a&gt;&lt;/p&gt;</content><category term="programming"/><category term="sql"/><category term="prettyprinting"/><category term="formatting"/></entry><entry><title>Keeping It Real Safe And Real Easy</title><link href="https://sethmason.com/2007/06/02/keeping-it-real-safe-and-real-easy.html" rel="alternate"/><published>2007-06-02T00:00:00-07:00</published><updated>2007-06-02T00:00:00-07:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2007-06-02:/2007/06/02/keeping-it-real-safe-and-real-easy.html</id><summary type="html">&lt;p&gt;&lt;img alt="Subversion logo" class="center-block" src="https://sethmason.com/images/7.png"&gt;&lt;/p&gt;
&lt;p&gt;OK, I've fallen in love with putting my home directory in
&lt;a href="http://subversion.tigris.org/" title="A version control system to rival CVS"&gt;Subversion&lt;/a&gt;.
The benefits are enormous. They include (but are not limited to):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;ease of setting up environment on new system&lt;/li&gt;
&lt;li&gt;backup&lt;/li&gt;
&lt;li&gt;ability to go “back in time” using Subversion
    &lt;a href="http://svnbook.red-bean.com/nightly/en/svn.branchmerge.tags.html" title="Tags rule"&gt;tags&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Mind you I don't put everything in there, just …&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;img alt="Subversion logo" class="center-block" src="https://sethmason.com/images/7.png"&gt;&lt;/p&gt;
&lt;p&gt;OK, I've fallen in love with putting my home directory in
&lt;a href="http://subversion.tigris.org/" title="A version control system to rival CVS"&gt;Subversion&lt;/a&gt;.
The benefits are enormous. They include (but are not limited to):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;ease of setting up environment on new system&lt;/li&gt;
&lt;li&gt;backup&lt;/li&gt;
&lt;li&gt;ability to go “back in time” using Subversion
    &lt;a href="http://svnbook.red-bean.com/nightly/en/svn.branchmerge.tags.html" title="Tags rule"&gt;tags&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Mind you I don't put everything in there, just the important stuff like
my shell configuration files and my
&lt;a href="http://www.vim.org" title="The one true editor"&gt;vim&lt;/a&gt; configuration files.
Other important files (like pictures and music I spent ages ripping) are
backed up in other ways.&lt;/p&gt;
&lt;p&gt;Here's what I currently have saved in svn:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="gp"&gt;$ &lt;/span&gt;svn&lt;span class="w"&gt; &lt;/span&gt;ls&lt;span class="w"&gt; &lt;/span&gt;http://my.svn.server/svn/home-dir/trunk/
&lt;span class="go"&gt;.Xdefaults&lt;/span&gt;
&lt;span class="go"&gt;.antrc&lt;/span&gt;
&lt;span class="go"&gt;.bash_profile&lt;/span&gt;
&lt;span class="go"&gt;.bashrc&lt;/span&gt;
&lt;span class="go"&gt;.dircolors&lt;/span&gt;
&lt;span class="go"&gt;.inputrc&lt;/span&gt;
&lt;span class="go"&gt;.irbrc&lt;/span&gt;
&lt;span class="go"&gt;bin/&lt;/span&gt;
&lt;span class="go"&gt;vim_local/&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;So now when I'm on a system, I'll have the same look and feel and same
functionality as the utilities I use will be available in my &lt;code&gt;~/bin&lt;/code&gt;
directory.&lt;/p&gt;
&lt;p&gt;For those astute readers, you'll notice that I don't have a .vimrc file in
there. That's because I'm using an excellent tip from Amir Salihefendic about
&lt;a href="http://amix.dk/blog/viewEntry/162"&gt;taming your vim config&lt;/a&gt;. Basically on each
system I have a specialized but simple .vimrc that sources the vim_local for
what it needs.&lt;/p&gt;
&lt;p&gt;I've found this setup works great on the many different systems I use
throughout a given week (e.g. Windows, Mac and Linux). And I'm safe in
the knowledge that my configuration files won't disappear should my
machines suddenly implode.&lt;/p&gt;</content><category term="tools"/><category term="subversion"/><category term="configuration"/><category term="vim"/></entry><entry><title>Debugging Is Sexy Good Times</title><link href="https://sethmason.com/2007/05/24/debugging-is-sexy-good-times.html" rel="alternate"/><published>2007-05-24T00:00:00-07:00</published><updated>2007-05-24T00:00:00-07:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2007-05-24:/2007/05/24/debugging-is-sexy-good-times.html</id><summary type="html">&lt;p&gt;I love me some &lt;a href="http://json.org" title="JavaScript Object Notation"&gt;JSON&lt;/a&gt;.
The problem with it is that it's not too human readable when you need to
see what it's returning. Sure you could litter your code with alerts or
console.debug (if you are using
&lt;a href="http://www.getfirebug.com" title="Awesome JavaScript debugger"&gt;Firebug&lt;/a&gt; and
&lt;a href="http://www.getfirefox.com" title="Awesome web browser"&gt;Firefox&lt;/a&gt; to figure
out what values are you getting …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I love me some &lt;a href="http://json.org" title="JavaScript Object Notation"&gt;JSON&lt;/a&gt;.
The problem with it is that it's not too human readable when you need to
see what it's returning. Sure you could litter your code with alerts or
console.debug (if you are using
&lt;a href="http://www.getfirebug.com" title="Awesome JavaScript debugger"&gt;Firebug&lt;/a&gt; and
&lt;a href="http://www.getfirefox.com" title="Awesome web browser"&gt;Firefox&lt;/a&gt; to figure
out what values are you getting back.&lt;/p&gt;
&lt;p&gt;But if you've got the Firefox/Firebug setup (and why don't you if you
don't?) then you can just use the Firebug console to display the JSON
data. Say for instance you have the following data returned from your
service (but imagine it's a bazillion lines long):&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;SomeObject&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:{&lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;Attrib1&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;foo&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;               &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;Attrib2&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;bar&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;               &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;SubObject&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;SubAttrib1&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;bar&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="w"&gt;              &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Just wrap that in an &lt;code&gt;eval&lt;/code&gt; function, plug it into the console and you
get back a nice little tree of your data in the DOM view.&lt;/p&gt;
&lt;p&gt;&lt;img alt="console screencap" src="https://sethmason.com/images/5.png"&gt;&lt;/p&gt;
&lt;p&gt;Now isn't that sexy?&lt;/p&gt;</content><category term="programming"/><category term="javascript"/><category term="firebug"/><category term="firefox"/></entry><entry><title>Welcome</title><link href="https://sethmason.com/2007/05/22/welcome.html" rel="alternate"/><published>2007-05-22T00:00:00-07:00</published><updated>2007-05-22T00:00:00-07:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2007-05-22:/2007/05/22/welcome.html</id><summary type="html">&lt;p&gt;Hello and welcome to sethmason.com. This site is basically an experiment
to set up a site that's a resume of sorts. It will feature articles
about technology that reflect my depth of knowledge.&lt;/p&gt;
&lt;p&gt;The site itself is set up using
&lt;a href="http://textpattern.com" title="TextPattern - easy-to-use content management system for all kinds of websites"&gt;TextPattern&lt;/a&gt;.
Normally, I would &lt;a href="https://en.wikipedia.org/wiki/Eating_your_own_dog_food" title="wikipedia definition for eat your own dogfood"&gt;eat my own dog
food …&lt;/a&gt;&lt;/p&gt;</summary><content type="html">&lt;p&gt;Hello and welcome to sethmason.com. This site is basically an experiment
to set up a site that's a resume of sorts. It will feature articles
about technology that reflect my depth of knowledge.&lt;/p&gt;
&lt;p&gt;The site itself is set up using
&lt;a href="http://textpattern.com" title="TextPattern - easy-to-use content management system for all kinds of websites"&gt;TextPattern&lt;/a&gt;.
Normally, I would &lt;a href="https://en.wikipedia.org/wiki/Eating_your_own_dog_food" title="wikipedia definition for eat your own dogfood"&gt;eat my own dog
food&lt;/a&gt;
and use a Java based content management system but I wanted to give PHP
and Textile a test. So far, I'm impressed.&lt;/p&gt;
&lt;p&gt;For more information about myself, check out my &lt;a href="/about" title="about -- all about Seth Mason"&gt;about
page&lt;/a&gt;. And feel free to leave a
comment.&lt;/p&gt;</content><category term="personal"/><category term="site"/></entry><entry><title>Writing Tests For Fun And Profit</title><link href="https://sethmason.com/2007/05/22/writing-tests-to-expand-your-brain.html" rel="alternate"/><published>2007-05-22T00:00:00-07:00</published><updated>2007-05-22T00:00:00-07:00</updated><author><name>Seth Mason &lt;seth@sethmason.com</name></author><id>tag:sethmason.com,2007-05-22:/2007/05/22/writing-tests-to-expand-your-brain.html</id><summary type="html">&lt;p&gt;Learning a new programming language historically starts off with the
classic “Hello World” example. I've probably written a variation on that
a bazillion times. From there you take more steps into advanced parts of
the language. If you are smart, you save your example programs to refer
back to them …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Learning a new programming language historically starts off with the
classic “Hello World” example. I've probably written a variation on that
a bazillion times. From there you take more steps into advanced parts of
the language. If you are smart, you save your example programs to refer
back to them later. But there's a better way. And that better way is to
write test cases that exercise the capabilities of the language you are
trying to learn. This also works for new libraries within a language you
are trying to learn.&lt;/p&gt;
&lt;p&gt;The advantages of writing test cases are plentiful. It gets you writing
actual code which helps you remember, they can be usually be run easily,
they serve as an extra source of documentation about what you are trying
to do (e.g. “How do I use &lt;code&gt;gsub&lt;/code&gt; again? Oh yeah, it's in that string
test I wrote?”) and finally writing tests is fun.&lt;/p&gt;
&lt;h3&gt;An Example&lt;/h3&gt;
&lt;p&gt;After ignoring it for way too long, I recently started trying out the
&lt;a href="http://developer.yahoo.com/yui" title="Yahoo! User Interface Library"&gt;Yahoo! User Interface
Library&lt;/a&gt;.
It's a JavaScript library with scads of useful utilities for buidling
web applications. So, I pulled up the documentation and started writing
a tests based on what's documented. Since it's JavaScript, I used
&lt;a href="http://jsunit.net" title="JsUnit is a Unit Testing framework"&gt;JsUnit&lt;/a&gt; since
I'm used to
&lt;a href="http://www.junit.com" title="JUnit -- Java Unit Test framework"&gt;JUnit&lt;/a&gt; on the
Java side of things. And &lt;em&gt;voila&lt;/em&gt; we have our first test:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;html&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;head&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;title&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Test Yahoo&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;title&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;script&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;text/javascript&amp;quot;&lt;/span&gt; 
        &lt;span class="na"&gt;src&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;jsUnitCore.js&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;script&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;script&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;text/javascript&amp;quot;&lt;/span&gt; 
        &lt;span class="na"&gt;src&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;yahoo.js&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;script&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;script&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;text/javascript&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="c"&gt;&amp;lt;!--&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;testIsArray&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nx"&gt;assertTrue&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;YAHOO&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;lang&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;isArray&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="mf"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mf"&gt;2&lt;/span&gt;&lt;span class="p"&gt;]));&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="c1"&gt;//--&amp;gt;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;script&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;head&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;body&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    A test document.
&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;body&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;html&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;(I know it's very simple but I just wanted to get a feel for the first
method in the global library and type it so my brain remembered it.)&lt;/p&gt;
&lt;p&gt;So, now I drop the test file into my test runner and here we have the
results:&lt;/p&gt;
&lt;p&gt;&lt;img alt="It's all green!" src="https://sethmason.com/images/4.png"&gt;&lt;/p&gt;
&lt;p&gt;Can't you just feel your brain expanding with the possibilities?&lt;/p&gt;</content><category term="programming"/><category term="tests"/><category term="javascript"/></entry></feed>