<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;D0UGQno4eyp7ImA9WhRaE0U.&quot;"><id>tag:blogger.com,1999:blog-8810892689770735074</id><updated>2012-02-16T11:40:23.433+02:00</updated><category term="Coding" /><category term="Software" /><category term="Phones" /><category term="Hardware" /><category term="Life" /><category term="Technion" /><category term="Tips" /><category term="Asides" /><category term="Source Control" /><title>Shallow and Pedantic</title><subtitle type="html">Like calculus in a kiddie pool</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://blog.lutzky.net/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://blog.lutzky.net/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/8810892689770735074/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Ohad Lutzky</name><uri>https://profiles.google.com/110055235459155538352</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-r14iGgAuheU/AAAAAAAAAAI/AAAAAAAAC0Q/LKihP_bYGJg/s512-c/photo.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>98</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/ShallowAndPedantic" /><feedburner:info uri="shallowandpedantic" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;C04NR3w7fyp7ImA9WhRQGUg.&quot;"><id>tag:blogger.com,1999:blog-8810892689770735074.post-1389115398435025307</id><published>2011-12-15T14:08:00.000+02:00</published><updated>2011-12-15T14:26:36.207+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-12-15T14:26:36.207+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Tips" /><category scheme="http://www.blogger.com/atom/ns#" term="Software" /><title>The show downloading stack - part n+1</title><content type="html">&lt;p&gt;I've &lt;a href="http://blog.lutzky.net/2009/09/my-show-downloading-stack.html"&gt;already mentioned&lt;/a&gt; my show downloading stack on this blog. It's changed a bit since - I now use &lt;a href="http://transmission-bt.org/"&gt;Transmission&lt;/a&gt; rather than rtorrent, as it has the excellent &lt;code&gt;transmission-daemon&lt;/code&gt; package which has it acting exactly the way I like (without using &lt;code&gt;screen&lt;/code&gt;). Also, it now E-mails me when a torrent is done downloading. So while this may be how TV works for you:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Notice that a new episode is out&lt;/li&gt;
&lt;li&gt;Torrent it&lt;/li&gt;
&lt;li&gt;Wait for the download to finish&lt;/li&gt;
&lt;li&gt;Watch it&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;...this is how TV works for me now:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Receive E-mail notification of a new downloaded episode&lt;/li&gt;
&lt;li&gt;Watch it&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Here's how it's done: First, write &lt;code&gt;/usr/local/bin/notify_torrent_done&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;#!/bin/bash

cat_the_message() {
cat &amp;lt;&amp;lt;EOF
Subject: Torrent done: $TR_TORRENT_NAME

Hello from transmission $TR_APP_VERSION at $(hostname). The following torrent
has completed:

Name: $TR_TORRENT_NAME
Finished at: $TR_TIME_LOCALTIME
Downloaded to: $TR_TORRENT_DIR
Hash: $TR_TORRENT_HASH

Enjoy!
EOF
}

RETVAL=1

while [[ $RETVAL != 0 ]]; do
 cat_the_message | msmtp -C /etc/msmtprc.transmission --from default -t &lt;i&gt;your@email.address&lt;/i&gt;
 RETVAL=$?
done&lt;/pre&gt;
&lt;p&gt;The various environment variables will be set by transmission when it calls this script. We rerun &lt;code&gt;msmtp&lt;/code&gt; until it succeeds because you will often get a "connection timed out" response from gmail (...at least on my ISP...). Here's &lt;code&gt;/etc/msmtprc.transmission&lt;/code&gt; which is relevant to gmail (this is a bit tricky and took a lot of fiddling around with):&lt;/p&gt;
&lt;pre&gt;defaults
tls on
tls_starttls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
timeout 60

account default
host smtp.gmail.com
port 587
auth on
user &lt;i&gt;yourusername&lt;/i&gt;@gmail.com
password &lt;i&gt;yourpasswordhere&lt;/i&gt;
from &lt;i&gt;yourusername&lt;/i&gt;@gmail.com
syslog LOG_MAIL
&lt;/pre&gt;
&lt;p&gt;As usual, caution is required when saving your password in plaintext. I highly recommend using Google's two-step authentication, which will have you creating a one-time password for each application - use one of those one-time passwords here.&lt;/p&gt;
&lt;p&gt;Finally, in /etc/transmission-daemon/settings.json, add the following code:&lt;/p&gt;
&lt;pre&gt;"script-torrent-done-enabled": true,
"script-torrent-done-filename": "/usr/local/bin/notify_torrent_done",&lt;/pre&gt;
&lt;p&gt;&lt;b&gt;Important:&lt;/b&gt; You need to run &lt;code&gt;/etc/init.d/transmission-daemon &lt;b&gt;reload&lt;/b&gt;&lt;/code&gt; at this point, not &lt;code&gt;&lt;b&gt;restart&lt;/b&gt;&lt;/code&gt; - that would cause &lt;code&gt;settings.json&lt;/code&gt; to be rewritten from runtime configuration.&lt;/p&gt;
&lt;p&gt;That's it. Enjoy!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8810892689770735074-1389115398435025307?l=blog.lutzky.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/HYTyiUlrnNXh8oI5qD6eeHWzA5M/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/HYTyiUlrnNXh8oI5qD6eeHWzA5M/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/HYTyiUlrnNXh8oI5qD6eeHWzA5M/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/HYTyiUlrnNXh8oI5qD6eeHWzA5M/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ShallowAndPedantic/~4/hfFK72tv_4A" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.lutzky.net/feeds/1389115398435025307/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.lutzky.net/2011/12/show-downloading-stack-part-n1.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8810892689770735074/posts/default/1389115398435025307?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8810892689770735074/posts/default/1389115398435025307?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ShallowAndPedantic/~3/hfFK72tv_4A/show-downloading-stack-part-n1.html" title="The show downloading stack - part n+1" /><author><name>Ohad Lutzky</name><uri>https://profiles.google.com/110055235459155538352</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-r14iGgAuheU/AAAAAAAAAAI/AAAAAAAAC0Q/LKihP_bYGJg/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.lutzky.net/2011/12/show-downloading-stack-part-n1.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkMBSXk7cCp7ImA9WhdbEU0.&quot;"><id>tag:blogger.com,1999:blog-8810892689770735074.post-8163155665109987877</id><published>2011-10-08T21:43:00.000+02:00</published><updated>2011-10-08T22:07:38.708+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-08T22:07:38.708+02:00</app:edited><title>Developing TransportDroidIL for Android</title><content type="html">&lt;p&gt;Here are a few words on developing &lt;a href="https://market.android.com/details?id=net.lutzky.transportdroidil"&gt;TransportDroidIL&lt;/a&gt;, a small utility to query Israeli public transportation sites more easily using an Android phone.&lt;/p&gt;
&lt;p&gt;Source control is super important. Mistakes will be made, other coders will want to join in, and experimental features will want to be in their own branches.&amp;nbsp;&lt;a href="http://git-scm.com/"&gt;Git&lt;/a&gt; is awesome; it does source control &lt;i&gt;right&lt;/i&gt;, gives me powerful tools, and isn't a hassle to set up - even for a small project like this.&amp;nbsp;&lt;a href="http://github.com/"&gt;Github&lt;/a&gt; is also awesome; it makes collaboration with other coders - even just one, in my case - easy, organized, and fun.&lt;/p&gt;
&lt;p&gt;One of my favorite git features is &lt;i&gt;revert&lt;/i&gt;. It allows you to automatically inverse a previous change. Here's an example from TransportDroidIL: &lt;a href="https://github.com/lutzky/TransportDroidIL/commit/0e194de5b8f24f85a3b4931963a06743525dacf8"&gt;0e194de&lt;/a&gt;. This commit reverts a previous "cleanup" commit in the autocompletion code - allegedly, I was keeping two copies of the autocompletion option list for no reason: One as a &lt;tt&gt;LinkedList&amp;lt;string&amp;gt;&lt;/tt&gt;, and one internal to the &lt;tt&gt;AutoCompleteTextView&lt;/tt&gt; which I can access via an &lt;tt&gt;ArrayAdapter&amp;lt;string&amp;gt;&lt;/tt&gt;. Turns out that my &lt;tt&gt;LinkedList&amp;lt;string&amp;gt;&lt;/tt&gt; copy is necessary, because the &lt;tt&gt;ArrayAdapter&amp;lt;string&amp;gt;&lt;/tt&gt; always behaves as though it's empty, so it cannot truly be read from. Despite having performed a few commits since that bad "fix", git was very helpful in letting me revert that particular change, showing me the conflicts this operation causes, and allowing me to fix them. The lesson is an important one: Make small, manageable commits. Git is optimized for this, as commits are local (no need to contact the server until a &lt;i&gt;push&lt;/i&gt;).&lt;/p&gt;
&lt;p&gt;Developing for Android makes a lot of sense when using Eclipse. I'm a VIM junkie, and generally dislike IDEs. Eclipse is slow and heavy - but it gets the job done, and it does it very well. It's a bit weird that a plugin is required to manage color schemes - but it exists. It's &lt;b&gt;very&lt;/b&gt; weird (and quite annoying) that it doesn't remove end-of-line&amp;nbsp;white-space, and doesn't have an option to do this. This makes git complain. There &lt;i&gt;is&lt;/i&gt;&amp;nbsp;an option to add "clean-up" settings which are activated on every save, but this is far too cumbersome and might change code I didn't intend to change (which becomes confusing in the revision log). Still, the excellent debugging, JUnit and logcat support are worth it.&lt;/p&gt;
&lt;p&gt;Logcat is another awesome feature of Android. Every logged line has both a "Tag" (usually defined per-class) and a severity. Logs can be filtered with a different severity for each tag, and still - one can use the same logcat to show messages from anything running on the Android device at the moment. It's basically Syslog done better.&lt;/p&gt;
&lt;p&gt;One last point is about Hebrew. This has been a problem with Android for quite a while; for example, in a stock Android 2.3.3, numbers embedded in Hebrew string appear backwards. Fixes exist, and are implemented in most Israeli ROMs, especially the ones distributed by phone carriers - but they're different, and sometimes don't work for all applications. This causes numbers to appear backwards in TransportDroidIL, which in turn caused me to implement an &lt;a href="https://github.com/lutzky/TransportDroidIL/commit/713a9bd89547763776bb8a1c991ceb23bd6426c5"&gt;ugly&lt;/a&gt; &lt;a href="https://github.com/lutzky/TransportDroidIL/commit/6ba21053a8e981882bd0b1f808f257979a2bf488"&gt;hack&lt;/a&gt;. I hope the upcoming Ice Cream Sandwich release fixes this.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8810892689770735074-8163155665109987877?l=blog.lutzky.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/113bawdd18b_C0QmZKHFvXXfXfY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/113bawdd18b_C0QmZKHFvXXfXfY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/113bawdd18b_C0QmZKHFvXXfXfY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/113bawdd18b_C0QmZKHFvXXfXfY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ShallowAndPedantic/~4/nK9U9pnKikc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.lutzky.net/feeds/8163155665109987877/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.lutzky.net/2011/10/developing-transportdroidil-for-android.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8810892689770735074/posts/default/8163155665109987877?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8810892689770735074/posts/default/8163155665109987877?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ShallowAndPedantic/~3/nK9U9pnKikc/developing-transportdroidil-for-android.html" title="Developing TransportDroidIL for Android" /><author><name>Ohad Lutzky</name><uri>https://profiles.google.com/110055235459155538352</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-r14iGgAuheU/AAAAAAAAAAI/AAAAAAAAC0Q/LKihP_bYGJg/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.lutzky.net/2011/10/developing-transportdroidil-for-android.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEQMRHkyfip7ImA9WhdWEUs.&quot;"><id>tag:blogger.com,1999:blog-8810892689770735074.post-6553459921997978032</id><published>2011-09-04T21:53:00.000+03:00</published><updated>2011-09-04T21:53:05.796+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-04T21:53:05.796+03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Hardware" /><title>Home network wiring</title><content type="html">I don't like wireless connections; they're always second-best, be it in terms of security, speed, or reliability. Here's how my apartment looks (very approximately):

&lt;pre&gt;
.-P1----.  .-------------------P4-,---------,
|  PC   |  |       COMFY SOFA     .         |
|       |  |                      . Closed  |
|  .-,  |  |      Living room     . Porch   |
|  |B| P2  |                      .         |
|  |E|     |                      .         |
|  |D|  |      HUGE CUPBOARD   TV .  R PC   |
`-------'  `-P3-------------------'--P5-----'
  My room
&lt;/pre&gt;

The room on the left is mine, with my (constantly torrenting) PC in bed-viewing position. The router (&lt;code&gt;R&lt;/code&gt;) is in the closed porch, connected to my roommate's PC. Wifi doesn't stand a chance through two walls and the porch's glass screen. &lt;code&gt;P1&lt;/code&gt; through &lt;code&gt;P5&lt;/code&gt; are power outlets.

&lt;h2&gt;First solution&lt;/h2&gt;
Put a &lt;a href="http://blog.lutzky.net/2010/11/dd-wrt-awesomeness.html"&gt;reverse DD-WRT router&lt;/a&gt; at P2 (with a cable going across the room from the PC). Slow connection, not very reliable. This worked well enough for several months.

&lt;h2&gt;Second solution&lt;/h2&gt;
Get a pair of &lt;a href="http://www.aztech.com/sg/homeplug_hl110e.html"&gt;homeplugs&lt;/a&gt;. Stick one at P1 (connected through a power strip shared by the PC, speakers, screen and guitar amp). Stick another at P5 (connected through a power strip shared by the other PC, router, modem, TV, fan, printer, speakers and a lamp). It &lt;i&gt;shouldn't&lt;/i&gt; work - but it does. It blinks red, is nowhere near the promised 200Mbps, but it's still faster (and more reliable) than my internet connection. These homeplug devices are fantastic - they require literally no configuration (unless you want to reconfigure the encryption keys) and work very well, I highly recommend them.

The problem was when I got an Xtreamer - a cute device to watch my shows on my living room TV (see: comfy sofa). Once I plug it in, the homeplug connection dies on me, proverbially the last straw.

&lt;h2&gt;Third solution&lt;/h2&gt;
Thankfully, I have my Big Box of Electronic Junk, which contained a Super Long (read: haven't measured it) network cable. Moved the homeplug to P3, hid the cable behind the Huge Cupboard. Problem solved.

On a side note, I would have preferred a &lt;a href="http://boxee.tv"&gt;Boxee Box&lt;/a&gt;, but sadly it doesn't support lame old RCA connections.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8810892689770735074-6553459921997978032?l=blog.lutzky.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/S7DjoD4zWGPceyzWlpCeWM1td2g/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/S7DjoD4zWGPceyzWlpCeWM1td2g/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/S7DjoD4zWGPceyzWlpCeWM1td2g/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/S7DjoD4zWGPceyzWlpCeWM1td2g/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ShallowAndPedantic/~4/svYqlM_GoIE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.lutzky.net/feeds/6553459921997978032/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.lutzky.net/2011/09/home-network-wiring.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8810892689770735074/posts/default/6553459921997978032?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8810892689770735074/posts/default/6553459921997978032?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ShallowAndPedantic/~3/svYqlM_GoIE/home-network-wiring.html" title="Home network wiring" /><author><name>Ohad Lutzky</name><uri>https://profiles.google.com/110055235459155538352</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-r14iGgAuheU/AAAAAAAAAAI/AAAAAAAAC0Q/LKihP_bYGJg/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.lutzky.net/2011/09/home-network-wiring.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEUNR3w_cCp7ImA9WhdXGUg.&quot;"><id>tag:blogger.com,1999:blog-8810892689770735074.post-492252084066460779</id><published>2011-09-02T11:30:00.000+03:00</published><updated>2011-09-02T11:31:36.248+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-02T11:31:36.248+03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Software" /><category scheme="http://www.blogger.com/atom/ns#" term="Phones" /><title>Upcoming features in TransportDroidIL</title><content type="html">Hello everyone,

TransportDroidIL 1.0 will be released this month. It has quite a few new features:

&lt;ol&gt;
&lt;li&gt;Separate "Source", "Destination" and "Time" fields. This is much better for auto-completion as well.&lt;/li&gt;
&lt;li&gt;Automatic location-based detection of "Source". Hopefully you'll find the interface for this unobtrusive.&lt;/li&gt;
&lt;li&gt;Quick reversal of "Source" and "Destination", for your return trip.&lt;/li&gt;
&lt;li&gt;A new settings screen, with:&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;Provider selection (currently Egged or MOT)&lt;/li&gt;
&lt;li&gt;A small attempt at right-to-left fixes for non-supporting devices.&lt;/li&gt;
&lt;li&gt;A "clear history" button&lt;/li&gt;
&lt;/ol&gt;
&lt;/ol&gt;

Everyone loves screenshots:

&lt;div&gt;
&lt;img border="0" height="320" src="http://1.bp.blogspot.com/-WpZh7qdHP68/Tk_geYCLcSI/AAAAAAAAC1s/IBQ05EvuNvE/s320/device2.png" width="192" /&gt;
&lt;img border="0" height="320" src="http://4.bp.blogspot.com/-V-eexMq9-I8/Tk_go9wC2xI/AAAAAAAAC10/wlxmH_8QVo4/s320/prefs.png" width="192" /&gt;
&lt;img border="0" height="320" src="http://3.bp.blogspot.com/-NPQC7dUauiQ/Tk_geRj7kcI/AAAAAAAAC1o/-a7Rs0wUwpo/s320/device.png" width="191" /&gt;
&lt;/div&gt;

For a sneak peek, go to &lt;a href="http://github.com/lutzky/TransportDroidIL&lt;/a&gt;our github repository&lt;/a&gt; for the latest sources. You can also report issues there.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8810892689770735074-492252084066460779?l=blog.lutzky.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/mHcFjAqjdlkOPt3AR0a4PvmxNXQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/mHcFjAqjdlkOPt3AR0a4PvmxNXQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/mHcFjAqjdlkOPt3AR0a4PvmxNXQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/mHcFjAqjdlkOPt3AR0a4PvmxNXQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ShallowAndPedantic/~4/92Y1AnFJVzM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.lutzky.net/feeds/492252084066460779/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.lutzky.net/2011/09/upcoming-features-in-transportdroidil.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8810892689770735074/posts/default/492252084066460779?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8810892689770735074/posts/default/492252084066460779?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ShallowAndPedantic/~3/92Y1AnFJVzM/upcoming-features-in-transportdroidil.html" title="Upcoming features in TransportDroidIL" /><author><name>Ohad Lutzky</name><uri>https://profiles.google.com/110055235459155538352</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-r14iGgAuheU/AAAAAAAAAAI/AAAAAAAAC0Q/LKihP_bYGJg/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-WpZh7qdHP68/Tk_geYCLcSI/AAAAAAAAC1s/IBQ05EvuNvE/s72-c/device2.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://blog.lutzky.net/2011/09/upcoming-features-in-transportdroidil.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEYCSHg-eSp7ImA9WhZQGEw.&quot;"><id>tag:blogger.com,1999:blog-8810892689770735074.post-2151722004910131527</id><published>2011-04-25T19:58:00.000+03:00</published><updated>2011-04-26T14:09:29.651+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-04-26T14:09:29.651+03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Phones" /><title>SMS and why it annoys me</title><content type="html">Don't get me wrong. I love being able to communicate textually with friends, coworkers and family. It's ideal for a noisy pub; a somewhat-private conversation on a crowded bus; telling something to someone who may be asleep, so they see it first thing when they wake up; making quick responses while in a meeting without being rude (well, at least at my workplace it's considered perfectly acceptable). It's also very handy when you want to tell someone something they ought to write down, such as a phone number or something they should remember to buy. My problem isn't with the concept of mobile textual messaging - it's with SMS, the "Short Message Service", as provided by Israeli carriers (and possibly worldwide).&lt;br /&gt;
&lt;br /&gt;
The first problem I'd like to discuss is length. SMS messages are limited to 160 characters, or rather - 160 bytes. If your message includes any foreign characters, such as Hebrew letters, then UTF-16 mode takes effect, and your message is limited to 70 characters, which is ridiculously short. While the name of the service, SMS, implies that the messages should indeed be short, this is not the only common usage: If you want to have an actual conversation with someone (and this is a perfectly reasonable situation), messages will be longer than 160 characters, and certainly longer than 70. The problem becomes worse if u dont want to use shorthands n skip punctuations like many smsers do. (Ever found yourself about to send a 75-character message, going over it to find 5 characters to trim without looking like an idiot?)&lt;br /&gt;
&lt;br /&gt;
There have been several attempts to overcome the short-message problem, all of them implemented as workarounds in cellphone software. The initial, primitive approach was to simply split a message up into appropriately-sized chunks, and send out those chunks as separate messages: A 150-character Hebrew message would be sent out as 3 separate messages (70, 70, 10 characters respectively). Later on, a mechanism was invented for the phones to detect the split messages, stitch them back up on the recipient's phone, and notify the recipient if the message is incomplete. Poor man's TCP.&lt;br /&gt;
&lt;br /&gt;
The split-message solution is very problematic, especially when taking into account two other problems with SMS: Reliability and price. The reliability problem is subtle: SMS message &lt;i&gt;usually&lt;/i&gt; make it across, but when they don't (and sometimes, in fact, they don't), no notification is given. Where E-mail servers notify you about delivery failure, where instant messaging services tell you that the other party has disconnected, SMS has... nothing. There's no way to know that your message hasn't been received, unless a little-known, not-supported-everywhere and highly annoying "read receipt" feature is enabled.&lt;br /&gt;
&lt;br /&gt;
The price problem is completely absurd: I have a small 1GB plan at Orange, which costs 70₪/month. That's 70 NIS / 1GB, 1GB being 10&lt;sup&gt;9&lt;/sup&gt; bytes. That comes to 7 &amp;times 10&lt;sup&gt;-6&lt;/sup&gt; Agorot per byte. Suppose that an SMS-style service would need a bloated 100-byte header, so an SMS message is 260 bytes. Therefore, an SMS message should cost 0.00182 Agorot. In reality, it costs 44 Agorot (inter-carrier average) without a plan, or 14 Agorot (at best, requiring a 1000-SMS plan) with a plan. That's between 7692&amp;times; and 24176&amp;times; as much.&lt;br /&gt;
&lt;br /&gt;
One additional problem with SMS is the fact that they're locked into your device. Got a new phone? You have to go through a very complicated process to transfer your SMS messages over, and this isn't possible for every phone. Lost your old phone? Unless you were backing up manually, your messages are gone. Have a separate work-phone? You'll need to use each phone to see messages sent specifically to it. None of these problems occur with an online E-mail provider, why should they happen with mobile texting?&lt;br /&gt;
&lt;br /&gt;
With modern phones, sending and receiving E-mail is just as easy as sending and receiving SMS messages. The main problem is that not everyone has a modern phone, and E-mail on older phones is quite cumbersome. Worse yet, older phones don't immediately notify you of E-mails. There could be some good money in creating an E-mail-to-SMS gateway - and it would be quite convenient to use if done properly. Imagine having your SMS messages united with your E-mails, organized and searchable by your favorite E-mail client. If you have a modern phone with proper E-mail notification and sending abilities, this could be very handy. Just sayin'.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Addendum:&lt;/b&gt; It seems that Google Voice already does exactly what I want, but is not available in Israel. Thanks, Shachar.&lt;br /&gt;
&lt;br /&gt;
&lt;iframe title="YouTube video player" width="480" height="390" src="http://www.youtube.com/embed/zpgMJ7Hv6tk" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8810892689770735074-2151722004910131527?l=blog.lutzky.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/EC8SwFCf0OrSrKZexsvDZr_CPwM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/EC8SwFCf0OrSrKZexsvDZr_CPwM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/EC8SwFCf0OrSrKZexsvDZr_CPwM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/EC8SwFCf0OrSrKZexsvDZr_CPwM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ShallowAndPedantic/~4/_x3RrrqNn5g" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.lutzky.net/feeds/2151722004910131527/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.lutzky.net/2011/04/sms-and-why-it-annoys-me.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8810892689770735074/posts/default/2151722004910131527?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8810892689770735074/posts/default/2151722004910131527?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ShallowAndPedantic/~3/_x3RrrqNn5g/sms-and-why-it-annoys-me.html" title="SMS and why it annoys me" /><author><name>Ohad Lutzky</name><uri>https://profiles.google.com/110055235459155538352</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-r14iGgAuheU/AAAAAAAAAAI/AAAAAAAAC0Q/LKihP_bYGJg/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://img.youtube.com/vi/zpgMJ7Hv6tk/default.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://blog.lutzky.net/2011/04/sms-and-why-it-annoys-me.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEQDRXwzfip7ImA9Wx9TEks.&quot;"><id>tag:blogger.com,1999:blog-8810892689770735074.post-8871344413322568362</id><published>2010-11-20T17:19:00.000+02:00</published><updated>2010-11-20T17:19:34.286+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-11-20T17:19:34.286+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Hardware" /><title>DD-WRT awesomeness</title><content type="html">Since I've last posted, I've moved to a new apartment. First order of business - get a working internet connection. This is extra-challenging when your primary machine doesn't even have a wireless network card.&lt;br /&gt;
&lt;br /&gt;
My first hack used my trustee laptop - it has a properly working wireless card, and could connect to my roommate's router quite easily. It runs Ubuntu, and as it turns out, that means sharing the connection was dead-simple: Right-click on the network manager icon, add a new wired connection called "Shared", and under IPv4 settings, choose "Shared to other computers". That's it. Once I connected my desktop to my laptop, it automatically got all of its settings, and I was good to go.&lt;br /&gt;
&lt;br /&gt;
However, this was kind of annoying - I had to leave my laptop on, the reception in my room isn't perfect so it would sometimes disconnect (requiring manual intervention), and my laptop wasn't free for ordinary use (if I wanted my torrents to keep going).&lt;br /&gt;
&lt;br /&gt;
The solution: I grabbed my (horrible) old D-Link DIR-300 router, and installed DD-WRT on it. This gave it an awesome "client mode" feature, which allowed it to use it the same way I used my laptop to bridge my wireless connection. Flashing it worked quite well by following the guide (the updated version in the wiki, that is - it has proper instructions for connecting to RedBoot, the D-Link flashing interface, from Linux), and another guide helped me set up Client mode. All seems well, except for two issues:&lt;br /&gt;
&lt;br /&gt;
First, port forwarding doesn't seem to work properly - it works well on the internal network (that is, I can SSH into my desktop using my laptop), but not on the internet (SSH port shows up as open, but I can't connect). I'm also guessing that UPnP/NAT-PMP won't work properly. Second, and this is an old problem - the router has a high-pitched whine. This may have something to do with the fact that the AC/DC adapter it came with is rated for 12V @ 1A, whereas the router is rated 5V @ 1.2A. Let's hope it doesn't fry (hasn't for the 3 years I used it).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8810892689770735074-8871344413322568362?l=blog.lutzky.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Bhv9iA4sSCKSj0SXbf13a6kffME/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Bhv9iA4sSCKSj0SXbf13a6kffME/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Bhv9iA4sSCKSj0SXbf13a6kffME/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Bhv9iA4sSCKSj0SXbf13a6kffME/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ShallowAndPedantic/~4/MxCT0xRperY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.lutzky.net/feeds/8871344413322568362/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.lutzky.net/2010/11/dd-wrt-awesomeness.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8810892689770735074/posts/default/8871344413322568362?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8810892689770735074/posts/default/8871344413322568362?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ShallowAndPedantic/~3/MxCT0xRperY/dd-wrt-awesomeness.html" title="DD-WRT awesomeness" /><author><name>Ohad Lutzky</name><uri>https://profiles.google.com/110055235459155538352</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-r14iGgAuheU/AAAAAAAAAAI/AAAAAAAAC0Q/LKihP_bYGJg/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.lutzky.net/2010/11/dd-wrt-awesomeness.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0cMR3s-cSp7ImA9WhZQF0g.&quot;"><id>tag:blogger.com,1999:blog-8810892689770735074.post-5043828803734656743</id><published>2010-09-04T19:21:00.000+03:00</published><updated>2011-04-25T20:04:46.559+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-04-25T20:04:46.559+03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Software" /><category scheme="http://www.blogger.com/atom/ns#" term="Phones" /><title>Transport Droid IL</title><content type="html">After a couple of days' messing with it, I'm releasing it: &lt;i&gt;Transport Droid IL&lt;/i&gt;! It's a handy little app for querying &lt;a href="http://egged.co.il/"&gt;Egged's site&lt;/a&gt;, as well as the new &lt;a href="http://bus.gov.il/"&gt;Ministry of Transportation site&lt;/a&gt;, on transportation information. This is pretty beta, but seems to work well enough.&lt;br /&gt;
&lt;br /&gt;
More info, source code: &lt;a href="http://lutzky.github.com/TransportDroidIL"&gt;http://lutzky.github.com/TransportDroidIL&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;APK File:&lt;/b&gt; &lt;a href="http://lutzky.github.com/TransportDroidIL/TransportDroidIL.apk"&gt;TransportDroidIL.APK&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
QR Code:&lt;br /&gt;
&lt;img height="205" src="http://lutzky.github.com/TransportDroidIL/qrcode.png" width="205" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8810892689770735074-5043828803734656743?l=blog.lutzky.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/F-rqDwZVKaBuypUYIOpvGPJ9yDM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/F-rqDwZVKaBuypUYIOpvGPJ9yDM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/F-rqDwZVKaBuypUYIOpvGPJ9yDM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/F-rqDwZVKaBuypUYIOpvGPJ9yDM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ShallowAndPedantic/~4/LFXyRqiIZCA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.lutzky.net/feeds/5043828803734656743/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.lutzky.net/2010/09/transport-droid-il.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8810892689770735074/posts/default/5043828803734656743?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8810892689770735074/posts/default/5043828803734656743?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ShallowAndPedantic/~3/LFXyRqiIZCA/transport-droid-il.html" title="Transport Droid IL" /><author><name>Ohad Lutzky</name><uri>https://profiles.google.com/110055235459155538352</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-r14iGgAuheU/AAAAAAAAAAI/AAAAAAAAC0Q/LKihP_bYGJg/s512-c/photo.jpg" /></author><thr:total>1</thr:total><georss:featurename>Haifa, Israel</georss:featurename><georss:point>32.83036 34.974339</georss:point><georss:box>32.686116 34.7408795 32.974604 35.2077985</georss:box><feedburner:origLink>http://blog.lutzky.net/2010/09/transport-droid-il.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkcNR3w5eSp7ImA9Wx5QFUQ.&quot;"><id>tag:blogger.com,1999:blog-8810892689770735074.post-1884952713049042348</id><published>2010-09-04T12:54:00.000+03:00</published><updated>2010-09-04T12:54:56.221+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-09-04T12:54:56.221+03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Tips" /><category scheme="http://www.blogger.com/atom/ns#" term="Software" /><title>Setting up Hebrew Android fonts on your AVD emulator</title><content type="html">There are several good guides for installing &lt;a href="http://benyossef.com/"&gt;Gilad Ben-Yossef&lt;/a&gt;'s excellent Hebdroid fonts on physical Android devices, but those don't really work with the Android SDK's emulator - changes to the &lt;code&gt;system&lt;/code&gt; directory aren't persistent. Here's how to get around that:&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
First, a few downloads. You'll need:&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;The android emulator (presumably you already have this, if not, you can get it at &lt;a href="http://developer.android.com/"&gt;developer.android.com&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;The&amp;nbsp;&lt;a href="http://firstpost.org/wp-content/uploads/2009/02/hebdroid.zip"&gt;hebdroid fonts&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://code.google.com/p/unyaffs/"&gt;unyaffs&lt;/a&gt;, which will extract the &lt;code&gt;system.img&lt;/code&gt; file&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.aleph1.co.uk/gitweb?p=yaffs2/.git;a=snapshot;h=69808485ec796bfa2b4806f91828281eccd0827b;sf=tgz"&gt;A snapshot of yaffs2&lt;/a&gt;, which will create our new&amp;nbsp;&lt;code&gt;system.img&lt;/code&gt;&amp;nbsp;file. This is actually today's snapshot from the git repository, which worked for me. For later versions, take a look at &lt;a href="http://www.yaffs.net/node/346"&gt;the git repository&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;Building &lt;code&gt;unyaffs&lt;/code&gt; is simple enough, or you can use the prebuilt version from the site. Building &lt;code&gt;mkyaffs2image&lt;/code&gt; is also quite easy - just untar the snapshot, and run &lt;code&gt;make&lt;/code&gt; in the &lt;code&gt;utils&lt;/code&gt; directory. Put both of these utilities somewhere in your &lt;code&gt;$PATH&lt;/code&gt; for convenience.&lt;br /&gt;
&lt;br /&gt;
Now we can get to work. First, locate your system.img file. It should be within your Android SDK directory, under &lt;code&gt;platforms/android-3/images&lt;/code&gt; (or whatever version you're emulating). We'll extract that - create a temporary directory, say &lt;code&gt;/tmp/system.img.hebdroid&lt;/code&gt;, and &lt;code&gt;cd&lt;/code&gt; to it. Then run:&lt;br /&gt;
&lt;pre&gt;unyaffs &lt;i&gt;[path-to-system.img]&lt;/i&gt;&lt;/pre&gt;With &lt;code&gt;&lt;i&gt;[path-to-system.img&lt;/i&gt;&lt;/code&gt; being the same one you just found. The whole &lt;code&gt;/system&lt;/code&gt; filesystem should be extracted. Now extract the &lt;code&gt;ttf&lt;/code&gt; files from &lt;code&gt;hebdroid.zip&lt;/code&gt; into the fonts directory, replacing the original font files. To pack everything back up, run:&lt;br /&gt;
&lt;pre&gt;mkyaffs2image &lt;i&gt;[your-temp-dir]&lt;/i&gt; system.img.hebdroid&lt;/pre&gt;Now, I recommend putting renaming your original &lt;code&gt;system.img&lt;/code&gt; to &lt;code&gt;system.img.orig&lt;/code&gt;, and using symlinking &lt;code&gt;system.img.hebdroid&lt;/code&gt; as your new &lt;code&gt;system.img&lt;/code&gt; (the emulator does indeed follow symlinks), but you can basically do whatever you like. You may have to recreate your AVD, but everything should work. Happy hacking!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8810892689770735074-1884952713049042348?l=blog.lutzky.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/2nFK9ib3BULQ_8Kgnw1iRjahhrE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/2nFK9ib3BULQ_8Kgnw1iRjahhrE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/2nFK9ib3BULQ_8Kgnw1iRjahhrE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/2nFK9ib3BULQ_8Kgnw1iRjahhrE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ShallowAndPedantic/~4/3sIVno9QZFE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.lutzky.net/feeds/1884952713049042348/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.lutzky.net/2010/09/setting-up-hebrew-android-fonts-on-your.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8810892689770735074/posts/default/1884952713049042348?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8810892689770735074/posts/default/1884952713049042348?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ShallowAndPedantic/~3/3sIVno9QZFE/setting-up-hebrew-android-fonts-on-your.html" title="Setting up Hebrew Android fonts on your AVD emulator" /><author><name>Ohad Lutzky</name><uri>https://profiles.google.com/110055235459155538352</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-r14iGgAuheU/AAAAAAAAAAI/AAAAAAAAC0Q/LKihP_bYGJg/s512-c/photo.jpg" /></author><thr:total>0</thr:total><georss:featurename>Haifa, Israel</georss:featurename><georss:point>32.83036 34.974339</georss:point><georss:box>32.686116 34.7408795 32.974604 35.2077985</georss:box><feedburner:origLink>http://blog.lutzky.net/2010/09/setting-up-hebrew-android-fonts-on-your.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEMMRH86cSp7ImA9Wx5QFUQ.&quot;"><id>tag:blogger.com,1999:blog-8810892689770735074.post-6358509114817279287</id><published>2010-09-04T12:26:00.000+03:00</published><updated>2010-09-04T12:28:05.119+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-09-04T12:28:05.119+03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Hardware" /><title>Android</title><content type="html">I've recently "bought" a &lt;a href="http://en.wikipedia.org/wiki/Samsung_Galaxy"&gt;Samsung Galaxy Android&lt;/a&gt; phone (the older i7500, not the newer i9000 "S") model. It's a seriously serious upgrade from my old &lt;a href="http://en.wikipedia.org/wiki/Nokia_6120_classic"&gt;Nokia 6120 Classic&lt;/a&gt;, and as I broke the 6120's screen and reverted back to my trusty old &lt;a href="http://en.wikipedia.org/wiki/Nokia_6070"&gt;Nokia 6070&lt;/a&gt;&amp;nbsp;(which I couldn't even get to run the GMail app), I was quite a happy camper switching to a modern phone.&lt;br /&gt;
&lt;br /&gt;
The whole idea of Android has always been very appealing to me - Nokia's software has been declining in quality, and while Motorola and Samsung have always made excellent hardware, they could never get the knack of good software. Google has. Problem solved, right?&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
The Android software is miles ahead of anything I've ever seen, including iPhone. I now have connectivity everywhere, and apps to sync all of my favorite things - GMail and Google Calendar are included, GTasks is great for tasks, Paperdroid is great for Read It Later, NewsRob is great for Google Reader. The Facebook and Twidroyd applications are also quite nice, and the convenience has me using those networks more. I even have nifty stuff like Transdroid, a Transmission web client which is actually very good at &lt;b&gt;adding&lt;/b&gt;&amp;nbsp;torrents while I'm away, so they're done by the time I get home. I get my reading done with Aldiko and ACV (for comics). Even Israeli sites have some good applications up, such as YNet and &lt;a href="http://d.co.il/"&gt;Dapei Zahav&lt;/a&gt; have a nice Android app, though not as nice as their iPhone ones. And of course, there's the wonderful &lt;a href="http://waze.co.il/"&gt;Waze&lt;/a&gt;, which is the most Israeli solution to the road congestion problem I've ever seen. I've even had the chance to do some on-foot navigation with Google Maps, which is also handy.&lt;br /&gt;
&lt;br /&gt;
The phone itself has a beautiful AMOLED screen, great audio quality (comes with quite a good set of headphones as well), and looks sleek. The touchscreen is responsive enough (though not anywhere near new Android devices nor the iPhone/iPod touch), and it even comes with a free extra 8GB SD card, for a total of 16GB.&lt;br /&gt;
&lt;br /&gt;
And now, to rant.&lt;br /&gt;
&lt;br /&gt;
Battery life isn't what is should be - the phone is awesome, I want to use it, and it can barely get through the day - especially if I'm doing heavy stuff like Waze (GPS + Data + screen is always on + voice), but even if I'm just surfing casually. The unlock button is located inconveniently on the bottom part of the right side, just above the camera button. The home button is located between the Back and Send buttons, meaning it's very easy to hit by accident; it's not even labeled. The CPU isn't always fast enough to keep everything completely smooth, and while this is generally acceptable, it gets rather irksome in odd places: If you turn on screen auto-rotation (which uses more battery power), rotation takes a while and might be accidental. However, there is no &lt;i&gt;manual&lt;/i&gt;&amp;nbsp;screen rotation option as far as I can tell.&lt;br /&gt;
&lt;br /&gt;
As a music player (relating to my previous post), the device works well enough - but I couldn't, for the life of me, get Hebrew support in ID3 tags (no matter what the encoding is), and only a limited subset of ID3 tag versions is supported, and everything works much better with Ogg files.&lt;br /&gt;
&lt;br /&gt;
The flaws I've mentioned are relatively minor and nitpicky - for Waze, you can use the car charger (which comes with the phone,&amp;nbsp;thankfully). The buttons are OK after some getting used to (and installing the excellent AnySoftKeyboard), and operation is generally smooth. However, there is a major issue I can't wrap my head around - the shipped firmware is 1.5 cupcake, and there are absolutely zero updates available from Samsung. There is a semi-official leaked 1.6 update which, as I've heard, is quite buggy. An awesome guy called &lt;a href="http://www.drakaz.com/"&gt;drakaz&lt;/a&gt; has been working on a Froyo (2.2) port for the Galaxy, which I really should check out, but Samsung's behavior on this topic is inexcusable in my opinion.&lt;br /&gt;
&lt;br /&gt;
All-in-all, however, I'm happy with my phone. It's a joy to use, and the price is hard to beat - free with my phone plan, provided I can rake up a bill of 150₪ (which I can, with some help from the 70₪ 1GB data plan, which comes in quite handy). My next phone will, however, probably not be a Samsung.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8810892689770735074-6358509114817279287?l=blog.lutzky.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/8Khwxqav8KBgsnCe-vkrUhTEp9c/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/8Khwxqav8KBgsnCe-vkrUhTEp9c/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/8Khwxqav8KBgsnCe-vkrUhTEp9c/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/8Khwxqav8KBgsnCe-vkrUhTEp9c/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ShallowAndPedantic/~4/uL0fXwUKTCQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.lutzky.net/feeds/6358509114817279287/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.lutzky.net/2010/09/android.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8810892689770735074/posts/default/6358509114817279287?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8810892689770735074/posts/default/6358509114817279287?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ShallowAndPedantic/~3/uL0fXwUKTCQ/android.html" title="Android" /><author><name>Ohad Lutzky</name><uri>https://profiles.google.com/110055235459155538352</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-r14iGgAuheU/AAAAAAAAAAI/AAAAAAAAC0Q/LKihP_bYGJg/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.lutzky.net/2010/09/android.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkMFQns-eyp7ImA9WxBbFEQ.&quot;"><id>tag:blogger.com,1999:blog-8810892689770735074.post-5584698654099078739</id><published>2010-03-13T18:35:00.000+02:00</published><updated>2010-03-13T18:40:13.553+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-03-13T18:40:13.553+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Hardware" /><title>My music player has sunk</title><content type="html">My &lt;a href="http://en.wikipedia.org/wiki/Meizu_M6_miniPlayer"&gt;Meizu Mini M6&lt;/a&gt;&amp;nbsp;has died a tragic death as a result of being left in my shirt pocket, which in turn was - with the rest of my shirt - in the laundry. I've had it for three years, so this would be a good time to review.&lt;br /&gt;
My favorite thing about the Mini was the cost. When I bought it, it was far cheaper than comparable players, at ~400₪ for 8GB. For a player with good video support, it was a steal. Other pros it had include:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Great screen. I used to watch TV shows on it quite a bit&lt;/li&gt;
&lt;li&gt;Great audio quality, especially in the lower range - very important for a bass guitarist&lt;/li&gt;
&lt;li&gt;Perfect OS compatibility - shows up as a Mass Storage device, just drag your files over. This is also how firmware upgrades are performed&lt;/li&gt;
&lt;li&gt;EBook reader, of sorts&lt;/li&gt;
&lt;li&gt;Quite small and very thin&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;However, the player is full of quirks:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Slow startup time. This is compounded by the fact that to turn it on, you have to press the "Play" button for about 3 seconds - too much less or too much more, and it won't start up.&lt;/li&gt;

&lt;ul&gt;&lt;li&gt;This is even worse when unplugging it from USB - it would rebuild the library every time, even if you were just charging it.&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;You can't turn the player on when it's connected to USB. When it's off, connecting it to USB is for charging only - to access the filesystem, you have to disconnect it, turn it on, and connect it again. (...not that the player is functional when in it's plugged in...)&lt;/li&gt;
&lt;li&gt;A few podcast niceties would be very easy to implement and extremely helpful:&lt;/li&gt;

&lt;ul&gt;&lt;li&gt;There's no way to separate podcasts from the rest of the music, so you don't get "This Week In Tech" when you put it on "All Music at random" mode.&lt;/li&gt;
&lt;li&gt;The player doesn't keep track of positions within audio streams, other than the last played one.&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;There's no way to delete a song from within the player.&lt;/li&gt;
&lt;li&gt;The interface is very inconsistent, with the video and audio sections having completely different key bindings. Long presses and short presses have very different meanings (but the length isn't all that different), so you have to be very careful.&lt;/li&gt;
&lt;li&gt;Pressing various key during startup had interesting, non-obvious effects, such as rebuilding the music library or &lt;b&gt;formatting the player without asking for confirmation&lt;/b&gt;. This isn't in the official documentation, and even if it were - that's a &lt;b&gt;very&lt;/b&gt;&amp;nbsp;bad misfeature.&lt;/li&gt;
&lt;li&gt;The newer version of the player, which I have, did away with the bottom "play" button, and moved it to the bottom of the 4-way D-pad, instead of the "Enter" key. The "Enter" key was replaced with a tap on the d-pad. Unfortunately, such a tap is very similar to a volume change drag, and even if it weren't - is very easy to perform by accident.&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;One more feature that I would have liked is one I've only seen in the iPod (which I despise for a variety of reasons) - the iPod keeps track of which songs you've played all the way through, and remembers that you "like" them - this information is later used when building playlists, and is integrated into iTunes playlists as well.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Now, I might be going to a long course soon, one which will specifically mean plenty of bus time. So go ahead, guys - recommend a player. :)&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8810892689770735074-5584698654099078739?l=blog.lutzky.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/mjEZMeWmoLAqmx1hYfq4x1mX5GM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/mjEZMeWmoLAqmx1hYfq4x1mX5GM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/mjEZMeWmoLAqmx1hYfq4x1mX5GM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/mjEZMeWmoLAqmx1hYfq4x1mX5GM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ShallowAndPedantic/~4/iTpqhLJpyT4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.lutzky.net/feeds/5584698654099078739/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.lutzky.net/2010/03/my-music-player-has-sunk_13.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8810892689770735074/posts/default/5584698654099078739?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8810892689770735074/posts/default/5584698654099078739?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ShallowAndPedantic/~3/iTpqhLJpyT4/my-music-player-has-sunk_13.html" title="My music player has sunk" /><author><name>Ohad Lutzky</name><uri>https://profiles.google.com/110055235459155538352</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-r14iGgAuheU/AAAAAAAAAAI/AAAAAAAAC0Q/LKihP_bYGJg/s512-c/photo.jpg" /></author><thr:total>0</thr:total><georss:featurename>Adi, Israel</georss:featurename><georss:point>32.782352 35.173413</georss:point><georss:box>32.764312000000004 35.1442305 32.800392 35.202595499999994</georss:box><feedburner:origLink>http://blog.lutzky.net/2010/03/my-music-player-has-sunk_13.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkMGRHw_eSp7ImA9WxBbFEQ.&quot;"><id>tag:blogger.com,1999:blog-8810892689770735074.post-3070356806012187177</id><published>2009-10-31T04:32:00.001+02:00</published><updated>2010-03-13T18:40:25.241+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-03-13T18:40:25.241+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Hardware" /><title>Broken phone screen - data rescue</title><content type="html">Last weekend I broke my Nokia 6120's screen. I have a military phone, which is far cheaper, so I've decided to keep it offline. However, being the sentimental guy that I am, I did want to save all of my contacts and SMS messages (in addition to the photos, which presented less of a problem). This proved to be a bit of a challenge without the screen working.&lt;br /&gt;&lt;br /&gt;Usually, when you connect the phone via USB, it asks if you want "PC Suite mode" or "Data Transfer mode". The "Data Transfer" mode has the phone show up as a standard USB storage device, which allows for easy transfer of MP3 files, photos and videos to and from the phone, without any nokia-specific software. However, it only works for the external SD card, so you can't use that to access SMS messages or contacts.&lt;br /&gt;&lt;br /&gt;I usually only need "Data Transfer" mode, so I changed the default to that. Today I regret that decision, as it cost me a couple of hours' work. I called the Orange hotline, and they did their best to help me, including trying to blind-guide me through the menus, which failed because the menus are actually dynamic and I didn't have the default setup. They actually got me 90% of the way there - here's the solution I found: Hit the red (disconnect) button, and type the Soft Reset GSM code: *#7780#. Now press the "left menu" key (not the left key, nor the menu key - the left of the two "dynamic" keys) - this part was what the Orange hotline missed, because it seemed so obvious. Then hit 12345 (this is the default "secret code"), and the left menu key again. I found this by watching a demo of the soft reset on YouTube.&lt;br /&gt;&lt;br /&gt;At this point I used VirtualBox and the Nokia PC suite (both are free-as-in-beer) to do the heavy lifting. I now have a text file with all of my contacts, a CSV file with all of my SMS messages, and all of my images saved both to my computer and a DR site. Now I just need to upgrade my military phone (Mirs)...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8810892689770735074-3070356806012187177?l=blog.lutzky.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/yGWEGtlRkyXBoiB-7vAPB6FV-oY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/yGWEGtlRkyXBoiB-7vAPB6FV-oY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/yGWEGtlRkyXBoiB-7vAPB6FV-oY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/yGWEGtlRkyXBoiB-7vAPB6FV-oY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ShallowAndPedantic/~4/GK9BVvZ6cBs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.lutzky.net/feeds/3070356806012187177/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.lutzky.net/2009/10/broken-phone-screen-data-rescue_30.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8810892689770735074/posts/default/3070356806012187177?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8810892689770735074/posts/default/3070356806012187177?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ShallowAndPedantic/~3/GK9BVvZ6cBs/broken-phone-screen-data-rescue_30.html" title="Broken phone screen - data rescue" /><author><name>Ohad Lutzky</name><uri>https://profiles.google.com/110055235459155538352</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-r14iGgAuheU/AAAAAAAAAAI/AAAAAAAAC0Q/LKihP_bYGJg/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.lutzky.net/2009/10/broken-phone-screen-data-rescue_30.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkMHRXg6eSp7ImA9WxBbFEQ.&quot;"><id>tag:blogger.com,1999:blog-8810892689770735074.post-4297011809886180643</id><published>2009-10-10T15:04:00.000+02:00</published><updated>2010-03-13T18:40:34.611+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-03-13T18:40:34.611+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Software" /><title>Loving the new Totem</title><content type="html">Totem is Gnome's built-in media player, and it really annoyed me in previous versions, and had me switching to VLC. However, the version included in the Ubuntu 9.10 release candidate has two features which are very important, in my opinion. The first feature is smooth graphical integration with compositing managers (such as compiz). In previous versions, as well as VLC, once you fullscreen the window, moving the mouse (which causes the cursor and the partial interface to appear) causes a very annoying flicker. This has been fixed (at least on my box, using an NVidia card). &lt;br/&gt;&lt;br/&gt;The second, more important feature, is the exact one I've been missing and talked about in &lt;a href="http://blog.lutzky.net/2009/09/05/my-show-downloading-stack"&gt;the previous post&lt;/a&gt; - hit Edit-&gt;Preferences-&gt;Start playing files from last position, and Totem will keep track of your last playback position when you close the video. Reading &lt;a href="http://article.gmane.org/gmane.comp.gnome.svn/223873"&gt;the implementation patch&lt;/a&gt; shows that there is a certain threshold for this - the position won't be saved if you're too close to the beginning or end of the video. So there, my show downloading stack now has every feature I'd want from Miro, without the downsides I've mentioned.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8810892689770735074-4297011809886180643?l=blog.lutzky.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Y9RZXIiE_0kptVMMeJdTJ75zKd0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Y9RZXIiE_0kptVMMeJdTJ75zKd0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Y9RZXIiE_0kptVMMeJdTJ75zKd0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Y9RZXIiE_0kptVMMeJdTJ75zKd0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ShallowAndPedantic/~4/hopPWouM0-k" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.lutzky.net/feeds/4297011809886180643/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.lutzky.net/2009/10/loving-new-totem.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8810892689770735074/posts/default/4297011809886180643?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8810892689770735074/posts/default/4297011809886180643?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ShallowAndPedantic/~3/hopPWouM0-k/loving-new-totem.html" title="Loving the new Totem" /><author><name>Ohad Lutzky</name><uri>https://profiles.google.com/110055235459155538352</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-r14iGgAuheU/AAAAAAAAAAI/AAAAAAAAC0Q/LKihP_bYGJg/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.lutzky.net/2009/10/loving-new-totem.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEMGRXY9eip7ImA9WxBbFEQ.&quot;"><id>tag:blogger.com,1999:blog-8810892689770735074.post-1933966064869035603</id><published>2009-09-05T16:42:00.000+03:00</published><updated>2010-03-13T18:07:04.862+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-03-13T18:07:04.862+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Tips" /><category scheme="http://www.blogger.com/atom/ns#" term="Software" /><category scheme="http://www.blogger.com/atom/ns#" term="Coding" /><title>My show downloading stack</title><content type="html">I love watching TV, and hate it. Regular show schedules are horrible, commercial breaks are annoying, and the ability to rewind is very important. I love Hot's VOD service (and happily pay to watch the shows I enjoy), but my true favorite for getting my entertainment is everyone's favorite not-a-dumptruck, the internet. In this post, I will describe how I do it.&lt;br /&gt;
Everything I describe in this post can be done using &lt;a href="http://getmiro.com/"&gt;miro&lt;/a&gt;. It's a neat piece of software, which lacked polish in version 2.4 (2.5 is out now though), but there are a few things I don't like about it:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;You have to be graphically logged in for it to run. Among other things, this means that if someone reboots your computer, there's no way to get it to start automatically. (I'll be very happy to know if I'm wrong about this)&lt;/li&gt;
&lt;li&gt;It doesn't give you as much control as I'd like over torrents.&lt;/li&gt;
&lt;li&gt;Its BitTorrent client doesn't perform as well as rtorrent.&lt;/li&gt;
&lt;/ul&gt;However, Miro does one thing which I haven't figured out how to do myself yet: It keeps track of your position within watched shows. That is, stop watching a show -and next time playback will resume from the same place.&lt;br /&gt;
&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
The first thing you want to do is get a good RSS feed for your show. Unfortunately, &lt;a href="http://revision3.com/"&gt;Revision3&lt;/a&gt;'s shows (many of which are quite good), are direct HTTP download links, as per the advertiser's request. For other shows, you can find torrent RSS feeds, which make much better use of everyone's bandwidth. Also, downloading will be handled by our trusty rtorrent, which we can configure for bandwidth limiting.&lt;br /&gt;
&lt;br /&gt;
To download RSS feeds, I use &lt;a href="http://flexget.com/"&gt;flexget&lt;/a&gt;. It does its job well, but doesn't support bandwidth limiting. It accepts a simple YAML configuration file, and has good logging. I run it as a cron job - its locking mechanism prevents multiple instances from running simultaneously. For non-torrents, I set the output directory to &lt;tt&gt;~/torrents/inbox&lt;/tt&gt;. For torrents, I set the output directory to &lt;tt&gt;~/torrents/from_rss&lt;/tt&gt;.&lt;br /&gt;
&lt;br /&gt;
For downloading torrents, I use &lt;a href="http://libtorrent.rakshasa.no/"&gt;rtorrent&lt;/a&gt;. It's a curses-based client which performs very well. My &lt;tt&gt;.rtorrent.rc&lt;/tt&gt; file looks like this:&lt;br /&gt;
&lt;pre class="prettyprint"&gt;download_rate = 30
upload_rate = 2
directory = /home/ohad/torrents/in_progress
on_finished = move_complete,"execute=mv,-u,$d.get_base_path=,~/torrents/inbox/ ;d.set_directory=~/torrents/inbox/"
session = /home/ohad/torrents/.session
schedule = watch_directory,5,5,load_start=/home/ohad/torrents/from_rss/*.torrent
schedule = untied_directory,5,5,remove_untied=
schedule = throttle_1,23:00:00,24:00:00,download_rate=0
schedule = throttle_2,05:00:00,24:00:00,download_rate=30
port_range = 6881-6889
encryption = allow_incoming,enable_retry,prefer_plaintext
dht = auto
peer_exchange = yes
scgi_local = /tmp/rtorrent-scgi.socket&lt;/pre&gt;Interesting things to note here are:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Downloads live in one directory, but get moved to the &lt;tt&gt;inbox&lt;/tt&gt; directory when they're done.&lt;/li&gt;
&lt;li&gt;The &lt;tt&gt;session&lt;/tt&gt; directory is important - this allows rtorrent to resume downloads if it's shut down.&lt;/li&gt;
&lt;li&gt;The &lt;tt&gt;from_rss&lt;/tt&gt; directory is watched for new torrent files. When the relevant downloads are stopped, &lt;tt&gt;remove_untied&lt;/tt&gt; occurs and the torrent files are deleted.&lt;/li&gt;
&lt;li&gt;Throttling is fully customizable.&lt;/li&gt;
&lt;li&gt;The SCGI socket is useful for rtgui - we'll get to that.&lt;/li&gt;
&lt;/ul&gt;I have a "watchdog"-style cron job which makes sure it's running if the computer is up. This is not as elegant as starting it from an RC-script, but keeps the whole setup confined to the limits of my own user. Again, rtorrent has a lock-file which prevents multiple instances from running.&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: monospace; white-space: pre;"&gt;#!/bin/bash&lt;/span&gt;&lt;br /&gt;
&lt;pre class="prettyprint"&gt;# A simple script to make sure I am running rtorrent in a screen

set -e

SCGI_SOCKET=/tmp/rtorrent-scgi.socket
SESSION_DIR=~/torrents/.session

screen -d -m -fn -S rtorrent -s /bin/bash -t rtorrent -m nice rtorrent

while [[ ! -S $SCGI_SOCKET ]]; do sleep 1; done

if [[ -S $SCGI_SOCKET ]]; then
chgrp www-data $SCGI_SOCKET
chmod g+rwx $SCGI_SOCKET
fi&lt;/pre&gt;&lt;a href="http://code.google.com/p/rtgui/"&gt;RTGUI&lt;/a&gt; provides a nice web-based interface. It's a bit tricky to configure, and you'll need to use an HTTP server - preferably lighttpd, as it has support for SCGI UNIX sockets (as opposed to SCGI TCP sockets). This lets you keep the number of open network ports to a minimum. This is all well-documented on the RTGUI site.&lt;br /&gt;
&lt;br /&gt;
Finally, I've written a little python script called &lt;a href="http://github.com/lutzky/check_shows"&gt;check_shows&lt;/a&gt; which uses libnotify to show a pretty pop-up whenever downloads complete. It's a tiny little hack which uses &lt;tt&gt;inotify&lt;/tt&gt;, which is lots of fun.&lt;br /&gt;
&lt;br /&gt;
That's it. Any neat tricks are welcome :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8810892689770735074-1933966064869035603?l=blog.lutzky.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/-tBtUec_BQgJ--jJe_dxpAs5dXE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-tBtUec_BQgJ--jJe_dxpAs5dXE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/-tBtUec_BQgJ--jJe_dxpAs5dXE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-tBtUec_BQgJ--jJe_dxpAs5dXE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ShallowAndPedantic/~4/gjvewUvgs2k" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.lutzky.net/feeds/1933966064869035603/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.lutzky.net/2009/09/my-show-downloading-stack.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8810892689770735074/posts/default/1933966064869035603?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8810892689770735074/posts/default/1933966064869035603?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ShallowAndPedantic/~3/gjvewUvgs2k/my-show-downloading-stack.html" title="My show downloading stack" /><author><name>Ohad Lutzky</name><uri>https://profiles.google.com/110055235459155538352</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-r14iGgAuheU/AAAAAAAAAAI/AAAAAAAAC0Q/LKihP_bYGJg/s512-c/photo.jpg" /></author><thr:total>2</thr:total><feedburner:origLink>http://blog.lutzky.net/2009/09/my-show-downloading-stack.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEMBSXs_fCp7ImA9WxBbFEQ.&quot;"><id>tag:blogger.com,1999:blog-8810892689770735074.post-8008449471169696358</id><published>2009-04-18T19:45:00.000+03:00</published><updated>2010-03-13T18:07:38.544+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-03-13T18:07:38.544+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Software" /><category scheme="http://www.blogger.com/atom/ns#" term="Coding" /><title>Timezones are fickle</title><content type="html">I've been trying to work out a system to be able to cleanly switch between IST (Israel Standard Time, GMT+2:00) and IDT (Israel Daylight savings Time, GMT+3:00) on command. The logical way to do this, in my opinion, is to have two separate files in &lt;tt&gt;/usr/share/zoneinfo&lt;/tt&gt;, say &lt;tt&gt;IsraelIST&lt;/tt&gt; and &lt;tt&gt;IsraelIDT&lt;/tt&gt;, and copy (or link) the relevant one as &lt;tt&gt;/etc/localtime&lt;/tt&gt;. The trick is creating the &lt;tt&gt;IsraelIDT&lt;/tt&gt; file.&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt; &lt;br /&gt;
My first guess was the following &lt;tt&gt;zic&lt;/tt&gt; source-file:&lt;br /&gt;
&lt;pre&gt;# Zone    NAME                GMTOFF  RULES/SAVE  FORMAT [UNTIL]
Zone      IsraelIDT           2:00    01:00       IDT&lt;/pre&gt;Now, this almost works. The problem is that both &lt;tt&gt;is_dst&lt;/tt&gt; is set and &lt;tt&gt;timezone = -10800&lt;/tt&gt; (3 hours - should be 2, as it should represent local standard time), so some software double-compensates here for a grand total of GMT+4:00. After some research (walking through &lt;tt&gt;__tzfile_read&lt;/tt&gt; gave the biggest hint), it turns out that &lt;tt&gt;timezone&lt;/tt&gt; is set according to the minimal local time type which is &lt;i&gt;transitioned into&lt;/i&gt;. So I came up with this file:&lt;br /&gt;
&lt;pre&gt;# Rule  NAME    FROM  TO    TYPE  IN   ON       AT    SAVE  LETTER/S
Rule    ZionIDT min   1939  -     Jan  1        00:00 1:00  D
Rule    ZionIDT 1939  only  -     Jan  1        00:00 0:00  S
Rule    ZionIDT 1940  max   -     Jan  1        00:00 1:00  D

# Zone    NAME                GMTOFF  RULES/SAVE  FORMAT  [UNTIL]
Zone      IsraelIDT           2:00    ZionIDT     I%sT&lt;/pre&gt;Sounds about right, nay? Even my handy little &lt;tt&gt;&lt;a href="http://github.com/lutzky/pyzdump"&gt;pyzdump&lt;/a&gt;&lt;/tt&gt; confirms that it looks about how I want it to:&lt;br /&gt;
&lt;pre&gt;./pyzdump.py /usr/share/zoneinfo/IsraelIDT
Transitions: ['At Sat Dec 31 23:00:00 1938, switch to IST',
'At Sun Dec 31 22:00:00 1939, switch to IDT']
Types: [&amp;lt;tztype dst="True" idt:="" utc+10800=""&amp;gt;,
&amp;lt;tztype dst="False" ist:="" utc+7200=""&amp;gt;]&lt;/pre&gt;However, it still doesn't work. A test program:&lt;br /&gt;
&lt;pre&gt;int main() {
    tzset();
    time_t t = time(NULL);
    printf("Timezone name is %s, timezone=%ld\n",
            __tzname[1], timezone);
    printf("The time is %s", ctime(&amp;amp;t));
    printf("Timezone name is %s, timezone=%ld\n",
            __tzname[1], timezone);
    return 0;
}&lt;/pre&gt;And its results, as run at 14:42:17 UTC, which is 19:42:17 IDT:&lt;br /&gt;
&lt;pre&gt;Timezone name is IDT, timezone=-7200
The time is Sat Apr 18 14:42:17 2009
Timezone name is UTC, timezone=0&lt;/pre&gt;Or, as I described it to a friend:&lt;br /&gt;
&lt;blockquote&gt;Me: Hi computer, do you know what timezone are we in?&lt;br /&gt;
Computer: Yeah, it's Israel Daylight Savings time, GMT+2:00 for standard time.&lt;br /&gt;
Me: OK, and what time is it?&lt;br /&gt;
Computer: 14:42&lt;br /&gt;
Me: No, that's 3 hours late. What timezone are we in?&lt;br /&gt;
Computer: Umm... UTC?&lt;br /&gt;
Me: You just said IDT.&lt;br /&gt;
Computer: Nuh-uh.&lt;/blockquote&gt;I'll get to the bottom of this eventually :/&lt;br /&gt;
&lt;b&gt;Addendum:&lt;/b&gt; It seems that the problem is even more complicated. For the following timezone file, C programs seem to work fine:&lt;br /&gt;
&lt;pre&gt;# Rule  NAME    FROM  TO    TYPE  IN   ON       AT    SAVE  LETTER/S
Rule    ZionIDT min   1939  -     Jan  1        00:00 1:00  D
Rule    ZionIDT 1939  only  -     Jan  1        00:00 0:00  S
Rule    ZionIDT 1940  2030  -     Jan  1        00:00 1:00  D
Rule    ZionIDT 2030  max   -     Jan  1        00:00 0:00  S
# Zone    NAME                GMTOFF  RULES/SAVE  FORMAT  [UNTIL]
Zone      IsraelIDT           2:00    ZionIDT     I%sT&lt;/pre&gt;However, Python programs still show &lt;tt&gt;timezone = -10800&lt;/tt&gt;. Examining Python's code, I found this:&lt;br /&gt;
&lt;pre&gt;if( janzone &amp;lt; julyzone ) {
    /* DST is reversed in the southern hemisphere */
    PyModule_AddIntConstant(m, "timezone", julyzone);
    PyModule_AddIntConstant(m, "altzone", janzone);
    PyModule_AddIntConstant(m, "daylight",
        janzone != julyzone);
    PyModule_AddObject(m, "tzname",
        Py_BuildValue("(zz)",
        julyname, janname));
    } else {
        PyModule_AddIntConstant(m, "timezone", janzone);
        PyModule_AddIntConstant(m, "altzone", julyzone);
        PyModule_AddIntConstant(m, "daylight",
            janzone != julyzone);
        PyModule_AddObject(m, "tzname",
            Py_BuildValue("(zz)",
            janname, julyname));
}&lt;/pre&gt;And since June and July have the same timezone in our case, there's a good chance that this is what's going wrong.The moral of the story seems to be this - I should go with the first, simplest "always-DST" solution. Programs should ignore the &lt;tt&gt;timezone&lt;/tt&gt; variable, as in our context it isn't reliable. In general, all internal time handling should be done in UTC; when reading times from the outside world, if they are in local time - use &lt;tt&gt;mktime&lt;/tt&gt;. If they are in a specified timezone, use &lt;tt&gt;timegm&lt;/tt&gt; and compensate manually. I'd love to hear better ideas in the comments.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8810892689770735074-8008449471169696358?l=blog.lutzky.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/P-iajI7Y_zcPGv5psyEAnfQN_gE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/P-iajI7Y_zcPGv5psyEAnfQN_gE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/P-iajI7Y_zcPGv5psyEAnfQN_gE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/P-iajI7Y_zcPGv5psyEAnfQN_gE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ShallowAndPedantic/~4/FuaCqPztlL0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.lutzky.net/feeds/8008449471169696358/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.lutzky.net/2009/04/timezones-are-fickle.html#comment-form" title="5 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8810892689770735074/posts/default/8008449471169696358?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8810892689770735074/posts/default/8008449471169696358?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ShallowAndPedantic/~3/FuaCqPztlL0/timezones-are-fickle.html" title="Timezones are fickle" /><author><name>Ohad Lutzky</name><uri>https://profiles.google.com/110055235459155538352</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-r14iGgAuheU/AAAAAAAAAAI/AAAAAAAAC0Q/LKihP_bYGJg/s512-c/photo.jpg" /></author><thr:total>5</thr:total><feedburner:origLink>http://blog.lutzky.net/2009/04/timezones-are-fickle.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkMBRn0-eyp7ImA9WxBbFEQ.&quot;"><id>tag:blogger.com,1999:blog-8810892689770735074.post-8130992175355529984</id><published>2009-04-04T15:23:00.000+03:00</published><updated>2010-03-13T18:40:57.353+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-03-13T18:40:57.353+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Source Control" /><title>Using git for code review</title><content type="html">At my workplace, I've recently been using git for code review purposes. I work on code in my own git clone, and ask a peer to review it. It works somewhat like this:&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;&lt;code&gt;master&lt;/code&gt; branch is same code as currently in upstream.&lt;/li&gt;
&lt;li&gt;Working to resolve issue #1234 pertaining to "Performance for gizmo", I work on a branch &lt;code&gt;1234-gizmo-performance&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;I mail a peer, John, with this information, as well as my repository location.&lt;/li&gt;
&lt;li&gt;John adds my repository as a remote, lutzky. Then he branches &lt;code&gt;review1&lt;/code&gt; (or &lt;code&gt;review2&lt;/code&gt; if that is taken, and so on) at &lt;code&gt;lutzky/1234-gizmo-performance.&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;John adds comments with nice big "&lt;code&gt;FIXME&lt;/code&gt;" tags, which are highlighted in any decent editor. He commits this, the commit-message stating that it was code review.&lt;/li&gt;
&lt;li&gt;John tags his final review commit (or, if he had no comments - &lt;code&gt;lutzky/1234-gizmo-performance&lt;/code&gt;) with a "&lt;code&gt;reviewed1&lt;/code&gt;" (or &lt;code&gt;reviewed2&lt;/code&gt;, etc.) annotated tag. Since the annotated tag includes all the necessary information (who tagged, when, and what), the number doesn't really matter.&lt;/li&gt;
&lt;li&gt;I merge &lt;code&gt;john/review1&lt;/code&gt;, incorporate the changes (or reject them) and remove the comments. If no further review is necessary, I submit this - and once submitted, I merge this back into master.&lt;/li&gt;
&lt;/ol&gt;It's a nice system. I wonder what other methods there are of doing this.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8810892689770735074-8130992175355529984?l=blog.lutzky.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ADUwVbfHiPEoMFMeEhsRxhGf4Fg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ADUwVbfHiPEoMFMeEhsRxhGf4Fg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/ADUwVbfHiPEoMFMeEhsRxhGf4Fg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ADUwVbfHiPEoMFMeEhsRxhGf4Fg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ShallowAndPedantic/~4/qpZcX4kYbkY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.lutzky.net/feeds/8130992175355529984/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.lutzky.net/2009/04/using-git-for-code-review.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8810892689770735074/posts/default/8130992175355529984?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8810892689770735074/posts/default/8130992175355529984?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ShallowAndPedantic/~3/qpZcX4kYbkY/using-git-for-code-review.html" title="Using git for code review" /><author><name>Ohad Lutzky</name><uri>https://profiles.google.com/110055235459155538352</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-r14iGgAuheU/AAAAAAAAAAI/AAAAAAAAC0Q/LKihP_bYGJg/s512-c/photo.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://blog.lutzky.net/2009/04/using-git-for-code-review.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkMDQ34zeSp7ImA9WxBbFEQ.&quot;"><id>tag:blogger.com,1999:blog-8810892689770735074.post-7260154968749727788</id><published>2009-02-27T00:15:00.000+02:00</published><updated>2010-03-13T18:41:12.081+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-03-13T18:41:12.081+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Hardware" /><title>Hardware doesn't like me</title><content type="html">I'm a software kind of guy. Here's proof.&lt;br/&gt;&lt;br/&gt;Today I went to visit my grandparents, and it turned out their computer wouldn't boot. BIOS would load up fine, and I could browse the menus fine - but once it tried to go on from there, it would simply blink what looked like half a cursor (that is, half of a "_"-style cursor). I figured it might be the HDD - so I took it home, and decided to connect it to my own box. Upon disconnecting my DVD drive, I destroyed the SATA cord - it had an annoying little metal tab which had to be pushed in before it would release, and it just wouldn't give, and the connector just broke, exposing and bending the wires.&lt;br/&gt;&lt;br/&gt;Checking if the computer still boots, the BIOS took much longer to display hard drive status, and while Ubuntu would start booting, it would fail in the process and tell me that my root hard drive (by UUID) isn't available. Looking at dmesg, the ata2 module was indeed reporting that the hard drive was too slow - but a few seconds later it would finally access the drive, and mount properly. This problem, however, disappeared once I connected my grandparents' drive! (Mounting it would fail, telling me that I either have a hardware error or need to connect it to a Windows machine, which I don't have, and run some diagnostic commands). Sure enough, when the HDD is connected by itself, it gets quite flaky, but once I connect a second drive (back to the DVD, eventually), everything works properly. This probably has to do with the fact that both drives are connected on continuations of the same power cord - but I've never experienced such a problem, where you &lt;em&gt;must&lt;/em&gt; connect devices to &lt;em&gt;both&lt;/em&gt; connectors on the power cord. A hardware guy I know says he's never heard of such a problem either.&lt;br/&gt;&lt;br/&gt;Naturally, these things never happen when I mess with hardware at work, where there are plenty of spare parts...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8810892689770735074-7260154968749727788?l=blog.lutzky.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/jvm54fauAsDI97htqmgVPfobxww/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/jvm54fauAsDI97htqmgVPfobxww/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/jvm54fauAsDI97htqmgVPfobxww/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/jvm54fauAsDI97htqmgVPfobxww/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ShallowAndPedantic/~4/pD6XJBk_IV0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.lutzky.net/feeds/7260154968749727788/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.lutzky.net/2009/02/hardware-doesn-like-me.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8810892689770735074/posts/default/7260154968749727788?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8810892689770735074/posts/default/7260154968749727788?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ShallowAndPedantic/~3/pD6XJBk_IV0/hardware-doesn-like-me.html" title="Hardware doesn&amp;#39;t like me" /><author><name>Ohad Lutzky</name><uri>https://profiles.google.com/110055235459155538352</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-r14iGgAuheU/AAAAAAAAAAI/AAAAAAAAC0Q/LKihP_bYGJg/s512-c/photo.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://blog.lutzky.net/2009/02/hardware-doesn-like-me.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkMAQng6cCp7ImA9WxBbFEQ.&quot;"><id>tag:blogger.com,1999:blog-8810892689770735074.post-7272387068560809130</id><published>2008-11-22T13:58:00.000+02:00</published><updated>2010-03-13T18:40:43.618+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-03-13T18:40:43.618+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Asides" /><category scheme="http://www.blogger.com/atom/ns#" term="Hardware" /><title>Whatever happened to black &amp; white LCDs?</title><content type="html">I had a &lt;a href="http://en.wikipedia.org/wiki/Game_boy"&gt;Game Boy&lt;/a&gt; once. I could play it just about anywhere, and battery life - for the time - was great. I lost it at one point, and replaced it with a &lt;a href="http://en.wikipedia.org/wiki/Game_gear"&gt;Game Gear&lt;/a&gt;, which sucked the life out of 6 AA batteries rather quickly. The &lt;a href="http://en.wikipedia.org/wiki/Game_Boy_Color"&gt;Game Boy Color&lt;/a&gt; was actually decent on battery life, but since it didn't have a backlight, you had to play it at very specific angles.&lt;br/&gt;&lt;br/&gt;For gaming, I can appreciate the need for a color screen. My point has to do with cellphones. True, most cellphones today come with cameras, are able to play video, and are rather capable mobile gaming platforms (when compared to the Game Boy, that is). All this does, in fact, require a color screen. However, I believe that there is a market for cellphones which do not support these features, but do support neat things like 3G internet connectivity (GMail and RSS on the phone is a major Win, in my opinion), and have a comfortable SMS interface. These features actually suffer from having a color screen: Battery life (for the powerful backlight), viewing angle, and screen resolution take a hit. While it's true that color LCDs have come a long way since the Game Gear, so have black &amp; white display technologies (E-Paper, anyone?).&lt;br/&gt;&lt;br/&gt;Of course, my wish for a modern B&amp;W-screen cellphone will likely never come true. The simple reason is that they would be totally unmarketable. Even business-types like color screens nowadays. So I'll just keep holding out for a folding E-Paper mobile browser.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8810892689770735074-7272387068560809130?l=blog.lutzky.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/GOg3-EoQojQRlIq5MDuhCNpOeEU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/GOg3-EoQojQRlIq5MDuhCNpOeEU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/GOg3-EoQojQRlIq5MDuhCNpOeEU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/GOg3-EoQojQRlIq5MDuhCNpOeEU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ShallowAndPedantic/~4/JDETww4YonA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.lutzky.net/feeds/7272387068560809130/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.lutzky.net/2008/11/whatever-happened-to-black-white-lcds.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8810892689770735074/posts/default/7272387068560809130?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8810892689770735074/posts/default/7272387068560809130?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ShallowAndPedantic/~3/JDETww4YonA/whatever-happened-to-black-white-lcds.html" title="Whatever happened to black &amp;amp; white LCDs?" /><author><name>Ohad Lutzky</name><uri>https://profiles.google.com/110055235459155538352</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-r14iGgAuheU/AAAAAAAAAAI/AAAAAAAAC0Q/LKihP_bYGJg/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.lutzky.net/2008/11/whatever-happened-to-black-white-lcds.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkIEQHk5eip7ImA9WxBbFEQ.&quot;"><id>tag:blogger.com,1999:blog-8810892689770735074.post-1158807404971442910</id><published>2008-11-11T01:01:00.000+02:00</published><updated>2010-03-13T18:41:41.722+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-03-13T18:41:41.722+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Tips" /><title>Another SSH trick</title><content type="html">Ever have a machine you can only ssh into through another machine? It's a very common situation in the Technion. Here's one way to get around it: Assume you can directly ssh into &lt;code&gt;alpha&lt;/code&gt;, and from &lt;code&gt;alpha&lt;/code&gt; you can ssh into &lt;code&gt;beta&lt;/code&gt;. Have the following code in your &lt;code&gt;~/.ssh/config&lt;/code&gt;:&lt;br/&gt;&lt;br/&gt;&lt;pre class="prettyprint"&gt;&lt;br/&gt;Host beta&lt;br/&gt;	Hostname 1.2.3.4  # IP Address of beta&lt;br/&gt;	ProxyCommand ssh alpha nc -w 1 %h %p&lt;br/&gt;&lt;/pre&gt;&lt;br/&gt;&lt;br/&gt;This requires you to have &lt;code&gt;nc&lt;/code&gt; (netcat) installed on &lt;code&gt;alpha&lt;/code&gt;. Once you do that, you can run &lt;code&gt;ssh beta&lt;/code&gt; directly from your own box.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8810892689770735074-1158807404971442910?l=blog.lutzky.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/cMPGwVe7zmWknj3oZDiH2AH5j1Y/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/cMPGwVe7zmWknj3oZDiH2AH5j1Y/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/cMPGwVe7zmWknj3oZDiH2AH5j1Y/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/cMPGwVe7zmWknj3oZDiH2AH5j1Y/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ShallowAndPedantic/~4/rXTIiHDLC2o" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.lutzky.net/feeds/1158807404971442910/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.lutzky.net/2008/11/another-ssh-trick.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8810892689770735074/posts/default/1158807404971442910?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8810892689770735074/posts/default/1158807404971442910?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ShallowAndPedantic/~3/rXTIiHDLC2o/another-ssh-trick.html" title="Another SSH trick" /><author><name>Ohad Lutzky</name><uri>https://profiles.google.com/110055235459155538352</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-r14iGgAuheU/AAAAAAAAAAI/AAAAAAAAC0Q/LKihP_bYGJg/s512-c/photo.jpg" /></author><thr:total>2</thr:total><feedburner:origLink>http://blog.lutzky.net/2008/11/another-ssh-trick.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEAFSX89cCp7ImA9WxBbFEQ.&quot;"><id>tag:blogger.com,1999:blog-8810892689770735074.post-1429511167475652091</id><published>2008-11-04T23:33:00.000+02:00</published><updated>2010-03-13T17:05:18.168+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-03-13T17:05:18.168+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Asides" /><title>Automatically starting rtorrent within screen</title><content type="html">These days I don't stay at home often, but I do have an RSS/BitTorrent combo fetching me all kinds of neat stuff for me, so I can have it ready for me on the weekend. I love &lt;a href="http://libtorrent.rakshasa.no/"&gt;rtorrent&lt;/a&gt;, especially due to the fact that I can run it in &lt;code&gt;screen&lt;/code&gt;, ssh home and see how things are doing (or add more torrent to the download). However, sometimes my net connection breaks down, computers gets shut off, or things like that. This week my router broke down, so I can't even ssh home to manually start up rtorrent. My solution: A small script, which checks whether rtorrent is already running, and if not - runs it in a detached screen session. Run this with your favorite &lt;code&gt;cron&lt;/code&gt; software.&lt;br/&gt;&lt;br/&gt;&lt;pre class="prettyprint"&gt;#!/bin/bash&lt;br/&gt;# A simple script to make sure I am running rtorrent in a screen&lt;br/&gt;&lt;br/&gt;if ! ps -o uname -C rtorrent | grep -q `whoami`; then&lt;br/&gt;	screen -d -m rtorrent&lt;br/&gt;fi&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8810892689770735074-1429511167475652091?l=blog.lutzky.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/3u8rKuos6Yk8RlO29u6_IQNdydE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/3u8rKuos6Yk8RlO29u6_IQNdydE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/3u8rKuos6Yk8RlO29u6_IQNdydE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/3u8rKuos6Yk8RlO29u6_IQNdydE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ShallowAndPedantic/~4/NmDw5R6JEhE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.lutzky.net/feeds/1429511167475652091/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.lutzky.net/2008/11/automatically-starting-rtorrent-within.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8810892689770735074/posts/default/1429511167475652091?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8810892689770735074/posts/default/1429511167475652091?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ShallowAndPedantic/~3/NmDw5R6JEhE/automatically-starting-rtorrent-within.html" title="Automatically starting rtorrent within screen" /><author><name>Ohad Lutzky</name><uri>https://profiles.google.com/110055235459155538352</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-r14iGgAuheU/AAAAAAAAAAI/AAAAAAAAC0Q/LKihP_bYGJg/s512-c/photo.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://blog.lutzky.net/2008/11/automatically-starting-rtorrent-within.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkIEQHk5eyp7ImA9WxBbFEQ.&quot;"><id>tag:blogger.com,1999:blog-8810892689770735074.post-4071634134724481530</id><published>2008-10-26T20:57:00.000+02:00</published><updated>2010-03-13T18:41:41.723+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-03-13T18:41:41.723+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Tips" /><title>Quick time tracking hack</title><content type="html">Gnome 2.24 adds a new Time Tracking feature, which I would have found useful. I don't have Gnome 2.24 at work, but I do have a Unix-based operating system... Here's my new &lt;code&gt;~/bin/track&lt;/code&gt;:&lt;br/&gt;&lt;br/&gt;&lt;pre class="prettyprint"&gt;&lt;br/&gt;#!/bin/bash&lt;br/&gt;date &gt;&gt; ~/time_tracking&lt;br/&gt;vim ~/time_tracking +&lt;/pre&gt;&lt;br/&gt;&lt;br/&gt;Now, if I could only get vim to automatically hit "A" and space for me afterwards... (I'm betting there's a way to do it, but AFAIK vim can only receive ex-mode commands as parameters).&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Edit:&lt;/b&gt; ...and, of course it's possible. Here's the new version:&lt;br/&gt;&lt;br/&gt;&lt;pre class="prettyprint"&gt;&lt;br/&gt;#!/bin/bash&lt;br/&gt;echo "`date` " &gt;&gt; ~/time_tracking&lt;br/&gt;vim ~/time_tracking + -c 'startinsert!'&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8810892689770735074-4071634134724481530?l=blog.lutzky.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/wuyhtnJFjB7A4di24eqMlKBBS2A/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/wuyhtnJFjB7A4di24eqMlKBBS2A/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/wuyhtnJFjB7A4di24eqMlKBBS2A/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/wuyhtnJFjB7A4di24eqMlKBBS2A/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ShallowAndPedantic/~4/HKAGqXrqfE8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.lutzky.net/feeds/4071634134724481530/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.lutzky.net/2008/10/quick-time-tracking-hack.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8810892689770735074/posts/default/4071634134724481530?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8810892689770735074/posts/default/4071634134724481530?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ShallowAndPedantic/~3/HKAGqXrqfE8/quick-time-tracking-hack.html" title="Quick time tracking hack" /><author><name>Ohad Lutzky</name><uri>https://profiles.google.com/110055235459155538352</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-r14iGgAuheU/AAAAAAAAAAI/AAAAAAAAC0Q/LKihP_bYGJg/s512-c/photo.jpg" /></author><thr:total>2</thr:total><feedburner:origLink>http://blog.lutzky.net/2008/10/quick-time-tracking-hack.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkIEQHk5eyp7ImA9WxBbFEQ.&quot;"><id>tag:blogger.com,1999:blog-8810892689770735074.post-698178935210049219</id><published>2008-10-18T23:16:00.000+02:00</published><updated>2010-03-13T18:41:41.723+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-03-13T18:41:41.723+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Tips" /><title>Delegating methods in Ruby</title><content type="html">Sometimes, when constructing a compound object, we are interested in exporting functionality while retaining encapsulation. For example, suppose we have a &lt;code&gt;Secretary&lt;/code&gt; class:&lt;br/&gt;&lt;br/&gt;&lt;pre class="prettyprint"&gt;&lt;br/&gt;class Secretary&lt;br/&gt;  def send_fax(destination, fax_contents)&lt;br/&gt;    puts 'Sending fax "%s" to %s' % [fax_contents, destination]&lt;br/&gt;  end&lt;br/&gt;&lt;br/&gt;  def answer_call(call)&lt;br/&gt;    ...&lt;br/&gt;  end&lt;br/&gt;&lt;br/&gt;  ...&lt;br/&gt;end&lt;br/&gt;&lt;/pre&gt;&lt;br/&gt;&lt;br/&gt;Our &lt;code&gt;Secretary&lt;/code&gt; provides a lot of useful functionality, that our &lt;code&gt;Boss&lt;/code&gt; class would like to have. &lt;code&gt;Boss&lt;/code&gt; would like to be able to say that he can send a fax, without having the user explicitly request his &lt;code&gt;Secretary&lt;/code&gt; beforehand. The same goes for a lot of other methods &lt;code&gt;Secretary&lt;/code&gt; provides. Instead of writing a stub function for each of these methods, it would be nice to do the following:&lt;br/&gt;&lt;br/&gt;&lt;pre class="prettyprint"&gt;&lt;br/&gt;class Boss&lt;br/&gt;  delegate_method :my_secretary, :send_fax, :answer_call&lt;br/&gt;&lt;br/&gt;  def initialize&lt;br/&gt;    @my_secretary = Secretary.new&lt;br/&gt;  end&lt;br/&gt;end&lt;br/&gt;&lt;br/&gt;john = Boss.new&lt;br/&gt;john.send_fax("Donald Trump", "YOU'RE fired")&lt;br/&gt;&lt;/pre&gt;&lt;br/&gt;&lt;br/&gt;Here's how we can get this to happen:&lt;br/&gt;&lt;br/&gt;&lt;pre class="prettyprint"&gt;&lt;br/&gt;class Class&lt;br/&gt;  def delegate_method(instance_var_name, *method_names)&lt;br/&gt;    method_names.each do |method_name|&lt;br/&gt;      define_method(method_name) do |*args|&lt;br/&gt;        instance_var = instance_variable_get("@%s" % instance_var_name)&lt;br/&gt;        instance_var.send(method_name, *args)&lt;br/&gt;      end&lt;br/&gt;    end&lt;br/&gt;  end&lt;br/&gt;end&lt;br/&gt;&lt;/pre&gt;&lt;br/&gt;&lt;br/&gt;This solution does have its drawbacks - it will not work for methods which are meant to accept blocks. I'm not sure how to get that to happen, short of using a string-based &lt;code&gt;class_eval&lt;/code&gt;, which I'm not very fond of. (I find &lt;code&gt;eval&lt;/code&gt; to be, well, evil...)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8810892689770735074-698178935210049219?l=blog.lutzky.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/G3TtHlZIPjU_vU--xI2T0hQTLjk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/G3TtHlZIPjU_vU--xI2T0hQTLjk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/G3TtHlZIPjU_vU--xI2T0hQTLjk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/G3TtHlZIPjU_vU--xI2T0hQTLjk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ShallowAndPedantic/~4/sDLLgsuVqM0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.lutzky.net/feeds/698178935210049219/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.lutzky.net/2008/10/delegating-methods-in-ruby.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8810892689770735074/posts/default/698178935210049219?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8810892689770735074/posts/default/698178935210049219?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ShallowAndPedantic/~3/sDLLgsuVqM0/delegating-methods-in-ruby.html" title="Delegating methods in Ruby" /><author><name>Ohad Lutzky</name><uri>https://profiles.google.com/110055235459155538352</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-r14iGgAuheU/AAAAAAAAAAI/AAAAAAAAC0Q/LKihP_bYGJg/s512-c/photo.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://blog.lutzky.net/2008/10/delegating-methods-in-ruby.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEAFSX88eyp7ImA9WxBbFEQ.&quot;"><id>tag:blogger.com,1999:blog-8810892689770735074.post-6325315501197610940</id><published>2008-07-30T21:03:00.000+03:00</published><updated>2010-03-13T17:05:18.173+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-03-13T17:05:18.173+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Asides" /><title>Tracking TTime</title><content type="html">I've added &lt;a href="http://lutzky.net/ttime/ditz"&gt;issue tracking for ttime&lt;/a&gt; using the fantastic &lt;a href="http://ditz.rubyforge.org"&gt;ditz&lt;/a&gt;. I've also added &lt;a href="http://lutzky.net/ttime/doc"&gt;ttime's rdoc documentation&lt;/a&gt;. (Note: Version 0.8.5 is out)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8810892689770735074-6325315501197610940?l=blog.lutzky.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ek3AtU3ON5wT_5J49ekeoYECB3o/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ek3AtU3ON5wT_5J49ekeoYECB3o/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/ek3AtU3ON5wT_5J49ekeoYECB3o/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ek3AtU3ON5wT_5J49ekeoYECB3o/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ShallowAndPedantic/~4/LSPhA_uUIOo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.lutzky.net/feeds/6325315501197610940/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.lutzky.net/2008/07/tracking-ttime.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8810892689770735074/posts/default/6325315501197610940?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8810892689770735074/posts/default/6325315501197610940?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ShallowAndPedantic/~3/LSPhA_uUIOo/tracking-ttime.html" title="Tracking TTime" /><author><name>Ohad Lutzky</name><uri>https://profiles.google.com/110055235459155538352</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-r14iGgAuheU/AAAAAAAAAAI/AAAAAAAAC0Q/LKihP_bYGJg/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.lutzky.net/2008/07/tracking-ttime.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEAFSX88fSp7ImA9WxBbFEQ.&quot;"><id>tag:blogger.com,1999:blog-8810892689770735074.post-8426676318921881103</id><published>2008-07-25T20:55:00.000+03:00</published><updated>2010-03-13T17:05:18.175+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-03-13T17:05:18.175+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Coding" /><title>Three things I didn't know Ruby does</title><content type="html">&lt;strong&gt;Edit: I was misled!&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;Illustrated here. Hints below.&lt;br/&gt;&lt;pre class="prettyprint"&gt;&amp;gt;&amp;gt; def inspect_x_and_y(x,y); puts "x: %p, y: %p" % [x,y]; end&lt;br/&gt;=&amp;gt; nil&lt;br/&gt;&amp;gt;&amp;gt; inspect_x_and_y(y={"hello" =&amp;gt; "world"},x=[1,2,3])&lt;br/&gt;x: {"hello"=&amp;gt;"world"}, y: [1, 2, 3]&lt;/pre&gt;&lt;br/&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;The bits I didn't know about:&lt;br/&gt;&lt;ol&gt;&lt;br/&gt;	&lt;li&gt;&lt;code&gt;"Format strings using a %% sign, %s, %s!" % [ "just like in python", "but with arrays" ]&lt;/code&gt;&lt;/li&gt;&lt;br/&gt;	&lt;li&gt;The &lt;code&gt;%p&lt;/code&gt; formatting character is the same as &lt;code&gt;inspect&lt;/code&gt;.&lt;/li&gt;&lt;br/&gt;	&lt;li&gt;You can call methods with &lt;code&gt;method_name(param2=val2, param1=val1)&lt;/code&gt;, also like in python. &lt;strong&gt;No you can't! This code sets external variables called y and x.&lt;/strong&gt;&lt;/li&gt;&lt;br/&gt;&lt;/ol&gt;&lt;br/&gt;How embarassing... :(&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8810892689770735074-8426676318921881103?l=blog.lutzky.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/-i62GDvJp9D5qQ-N8gP4UE8mxgA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-i62GDvJp9D5qQ-N8gP4UE8mxgA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/-i62GDvJp9D5qQ-N8gP4UE8mxgA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-i62GDvJp9D5qQ-N8gP4UE8mxgA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ShallowAndPedantic/~4/Pbex_MxhpNE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.lutzky.net/feeds/8426676318921881103/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.lutzky.net/2008/07/three-things-i-didn-know-ruby-does.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8810892689770735074/posts/default/8426676318921881103?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8810892689770735074/posts/default/8426676318921881103?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ShallowAndPedantic/~3/Pbex_MxhpNE/three-things-i-didn-know-ruby-does.html" title="Three things I didn&amp;#39;t know Ruby does" /><author><name>Ohad Lutzky</name><uri>https://profiles.google.com/110055235459155538352</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-r14iGgAuheU/AAAAAAAAAAI/AAAAAAAAC0Q/LKihP_bYGJg/s512-c/photo.jpg" /></author><thr:total>2</thr:total><feedburner:origLink>http://blog.lutzky.net/2008/07/three-things-i-didn-know-ruby-does.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEAFSX88fip7ImA9WxBbFEQ.&quot;"><id>tag:blogger.com,1999:blog-8810892689770735074.post-464116810852304274</id><published>2008-07-23T19:19:00.000+03:00</published><updated>2010-03-13T17:05:18.176+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-03-13T17:05:18.176+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Asides" /><title>Security project</title><content type="html">This site gets indexed by the almighty google. &lt;a href="http://lebmtg.hyperphp.com"&gt;This link&lt;/a&gt; is part of a security project I'm doing for my CS degree.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8810892689770735074-464116810852304274?l=blog.lutzky.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/L-MliKcrcmvKNhRvca3O6N_FDcs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/L-MliKcrcmvKNhRvca3O6N_FDcs/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/L-MliKcrcmvKNhRvca3O6N_FDcs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/L-MliKcrcmvKNhRvca3O6N_FDcs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ShallowAndPedantic/~4/zn0vTjHFCww" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.lutzky.net/feeds/464116810852304274/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.lutzky.net/2008/07/security-project.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8810892689770735074/posts/default/464116810852304274?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8810892689770735074/posts/default/464116810852304274?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ShallowAndPedantic/~3/zn0vTjHFCww/security-project.html" title="Security project" /><author><name>Ohad Lutzky</name><uri>https://profiles.google.com/110055235459155538352</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-r14iGgAuheU/AAAAAAAAAAI/AAAAAAAAC0Q/LKihP_bYGJg/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.lutzky.net/2008/07/security-project.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEAFSX88fyp7ImA9WxBbFEQ.&quot;"><id>tag:blogger.com,1999:blog-8810892689770735074.post-7928193117158558710</id><published>2008-07-20T22:19:00.000+03:00</published><updated>2010-03-13T17:05:18.177+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-03-13T17:05:18.177+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Asides" /><title>Gettext oddities with Ruby</title><content type="html">I was having a lot of trouble with &lt;a href="http://en.wikipedia.org/wiki/Gettext"&gt;gettext&lt;/a&gt; in Ruby, mostly due to lacking documentation. Here are some useful things I figured out while writing TTime. I ended up having a single &lt;code&gt;gettext_settings.rb&lt;/code&gt;, included from every file which uses&lt;br/&gt;gettext. Here it is (with some extra notes)&lt;br/&gt;&lt;br/&gt;&lt;pre class="prettyprint"&gt;#!/usr/bin/ruby&lt;br/&gt;begin&lt;br/&gt;  require 'gettext'&lt;br/&gt;  require 'pathname'&lt;br/&gt;&lt;br/&gt;  include GetText&lt;br/&gt;&lt;br/&gt;  # This fixes a swarm of problems on Windows&lt;br/&gt;  GetText.locale.charset = "UTF-8"&lt;br/&gt;&lt;br/&gt;  # Ruby's gettext acts in a sane&lt;br/&gt;  # method - add a path to the set of paths&lt;br/&gt;  # scanned.&lt;br/&gt;  locale_in_data_path = Pathname.new($0).dirname + \&lt;br/&gt;    "../data/locale/%{locale}/LC_MESSAGES/%{name}.mo"&lt;br/&gt;  add_default_locale_path(locale_in_data_path.to_s)&lt;br/&gt;  bound_text_domain = bindtextdomain("ttime")&lt;br/&gt;&lt;br/&gt;  # For Glade, however, it only seems to&lt;br/&gt;  # be possible to specify one path at a&lt;br/&gt;  # time. Fortunately, gettext already&lt;br/&gt;  # found it for us.&lt;br/&gt;  my_current_mo = bound_text_domain.entries[0].current_mo&lt;br/&gt;  if my_current_mo&lt;br/&gt;    ENV["GETTEXT_PATH"] = my_current_mo.filename.gsub(&lt;br/&gt;      /locale\/[^\/]+\/LC_MESSAGES.*/,&lt;br/&gt;      "locale/")&lt;br/&gt;  end&lt;br/&gt;rescue LoadError&lt;br/&gt;  def _ s #:nodoc:&lt;br/&gt;    # No gettext? No problem.&lt;br/&gt;    s&lt;br/&gt;  end&lt;br/&gt;end&lt;/pre&gt;&lt;br/&gt;&lt;br/&gt;One note for context: I use &lt;a href="http://i.loveruby.net/en/projects/setup/"&gt;setup.rb&lt;/a&gt; (and &lt;code&gt;ruby-pkg-tools&lt;/code&gt;) to package TTime. So my localizations go in &lt;code&gt;data/locale&lt;/code&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8810892689770735074-7928193117158558710?l=blog.lutzky.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/gkYfBjqDS977Z6VqrXRXbvpUwrc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/gkYfBjqDS977Z6VqrXRXbvpUwrc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/gkYfBjqDS977Z6VqrXRXbvpUwrc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/gkYfBjqDS977Z6VqrXRXbvpUwrc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ShallowAndPedantic/~4/oo1Rht3oNPM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.lutzky.net/feeds/7928193117158558710/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.lutzky.net/2008/07/gettext-oddities-with-ruby.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8810892689770735074/posts/default/7928193117158558710?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8810892689770735074/posts/default/7928193117158558710?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ShallowAndPedantic/~3/oo1Rht3oNPM/gettext-oddities-with-ruby.html" title="Gettext oddities with Ruby" /><author><name>Ohad Lutzky</name><uri>https://profiles.google.com/110055235459155538352</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-r14iGgAuheU/AAAAAAAAAAI/AAAAAAAAC0Q/LKihP_bYGJg/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.lutzky.net/2008/07/gettext-oddities-with-ruby.html</feedburner:origLink></entry></feed>

