Toby Kurien - articleshttp://tobykurien.com/2022-10-08T13:21:00+02:00<br/>Engineer, Maker, Heavy-metal loving GeekSimpler Linux self-hosting with tmux and bubblewrap2022-10-08T13:21:00+02:002022-10-08T13:21:00+02:00Toby Kurientag:tobykurien.com,2022-10-08:/simpler-linux-selfhosting/<p>I describe a simple method I use to self-host portable server applications using tmux and bubblewrap</p><h2>Introduction</h2>
<p>Let's say you want to self-host a Gemini capsule and a weblog. Maybe you'll use a Raspberry Pi or VPS server. Typically, you'd install (or get a pre-installed) operating system, like Debian/Ubuntu. You might then <code>apt install</code> a webserver like nginx, and <code>pip3 install</code> a Gemini server like JetForce.</p>
<p>Some problems come to mind with this kind of setup:</p>
<ul>
<li>You need root access. This isn't usually a problem, but for the less technical, this can be a foot-gun. Even for the technical, if like me you get used to typing <code>sudo</code> from muscle-memory without due care, you can hose your system.</li>
<li>When you install things with package managers, things get sprayed all over your file system. At this point you loose some control over the system, e.g. were any services installed? where any suid binaries installed? what access does it have? does it run on boot?</li>
<li>If you <code>pip3 install</code> a package, how do you secure it? How do you make it run on boot? These require some deep technical skills.</li>
<li>Over the years, you will have to re-learn and re-setup your machine, because SysV Init changes to systemd (for example), so oops, /etc/init.d/ stuff doesn't work anymore and you'd best learn to use journald to read logs, etc. More hurdles for the less technical self-hosters.</li>
<li>If you want to move to another OS or re-build the machine, it's a huge barrier, unless you've been diligent and kept an up-to-date automation script like Ansible. I've tried, but often I install things just to try it out, then I end up depending on it, and my automation scripts fall way behind and I give up and end up with a snowflake server.</li>
</ul>
<h2>Getting back some control</h2>
<p>In order to get back some control, I thought about how nice it would be if:</p>
<ul>
<li>The OS is an immutable image, like with Android. I "flash" it, then don't touch it. Every so often, I "flash" updates.</li>
<li>Services I want to run are sandboxed apps (like on Android). They get their own "home" directory, have no access to the directories of other services, and read-only access to system files.</li>
<li>They can start on boot, and get restarted if they crash.</li>
<li>They are the type of portable services that you unzip-and-run, preferably Go or C based statically compiled binaries. No root access needed to install them, just unzip into a directory and run them.</li>
<li>The services I install and run are kept independent of the system services, so that when I list services, only my user-installed ones are listed.</li>
</ul>
<h2>The current solution</h2>
<p>This is my solution for implementing the above ideas:</p>
<ul>
<li>I install the unzip-and-run services into a subfolder of <code>~/services</code>. I strongly prefer services written in compiled languages with no system dependencies, e.g. Caddy server, HAProxy, or SyncThing</li>
<li>I use <code>tmux</code> to run the services. If you don't know tmux at all, this might seem like a barrier or added complexity, but learning it is both easy and worthwhile. A tmux session called "services" is started on boot, and each service runs in a named tmux window, e.g. <code>caddy</code> web server runs in a window called "caddy". When I log out, the services continue to run.</li>
<li>I can list running services by listing the tmux windows: <code>tmux list-windows -t services</code></li>
<li>I can stop a service by either sending a Ctrl-C to the window (<code>tmux send-keys -t services:myservice C-c</code>), or by killing the window (<code>tmux kill-window -t services:myservice</code>).</li>
<li>When I start a service, I run it in a while loop to restart if it crashes, after <code>sleep 10s</code></li>
<li>When I start a service, I <code>tee</code> the output both to a log file, as well as to the console. This way, I can <code>tmux attach -t services</code> and interact with each service from the console, or I can parse the corresponding log files.</li>
<li>When I start a service, I open it with bubblewrap (i.e. <code>bwrap</code>). You can read about bubblewrap in the Arch Wiki. It is my favourite security tool in Linux that I use both on desktop and server. It creates a sandbox much like a chroot but with added control over mounting tmpfs directories, read-only system directories, changing the user/pid/network namespaces for isolation, and much much more. This is similar in some ways to a container, but it's much more lightweight and allows the processes to share the OS and system files. </li>
<li>Using bwrap, for each service, I mount a new <code>/home/user/app</code> directory in the sandbox, which maps to the folder of the service itself (<code>~/services/myservice</code>), and the <code>/home/user</code> folder in the sandbox is mounted from a subfolder of <code>~/sandboxes</code>. Let's say the service wants to store files in <code>~/.config/myservice/myservice.conf</code>, then the actual file gets written to <code>~/sandboxes/home/user/services/service/.config/myservice/myservice.conf</code>. Each service sees a different <code>~/.config</code> folder and thus cannot access each other's files.</li>
<li>To start the services on boot, I use a nifty feature of <code>cron</code> by adding this to my crontab: <code>@reboot cd ~/services/ && ./start</code> </li>
</ul>
<p>=> <a href="https://wiki.archlinux.org/title/Bubblewrap">Arch wiki bubblewrap page</a></p>
<h2>Usage</h2>
<p>=> <a href="https://fossil.tobykurien.com/bws">Source code for the scripts and example services</a>
=> <a href="https://fossil.tobykurien.com/bws/zip/trunk/bws-trunk.zip">Download repo zip</a></p>
<p>In my hypothetical scenario from the introduction, this is how I'd go about setting up my server:</p>
<ul>
<li>Install a fresh Linux OS (my preference is Alpine Linux for it's simplicity and security). Alpine can be made to run-from-RAM, which is very useful on a Raspberry Pi as it saves your microSD from writes thus massively improving reliability.</li>
<li>Install tmux and bwrap if they aren't already installed.</li>
<li>Log in as the user created during install. Download the <code>services</code> folder linked above into the user's home folder.</li>
<li>Add the line from <code>crontab</code> file to the user's crontab.</li>
<li>To add a service, download the binaries into a subfolder of <code>~/services</code> e.g. <code>~/services/caddy/</code> and make a script file called <code>start.sh</code> to start it, i.e. <code>~/services/caddy/start.sh</code>. Don't forget to <code>chmod +x start.sh</code></li>
<li>Start the service: <code>~/services/bws start caddy</code></li>
<li>The logs are written to <code>/tmp/log/caddy.log</code> but you can also attach a tmux session using <code>~/services/bws attach caddy</code> and view it there.</li>
<li>To auto-start the service on boot, add a line to <code>~/services/start</code>, e.g. <code>~/services/bws start caddy</code></li>
<li>A good way to explore the sandbox of a running service is to try running the <code>ttyd</code> service and poke around</li>
</ul>
<p>=> <a href="https://github.com/tsl0922/ttyd">ttyd - Share your terminal over the web</a></p>
<h2>Benefits</h2>
<p>Here are some benefits I find for using this method:</p>
<ul>
<li>It is simpler to understand and see what's going on. My user-selected services run separately to system-level services so I don't need to deal with the latter's complexity.</li>
<li>It can be run root-less (I remove <code>sudo</code> and <code>doas</code> to harden the system). I still use <code>su</code> to install updates, setup a firewall or <code>fail2ban</code>, or to install any system-wide packages.</li>
<li>It avoids the issue of files from different services being owned by different users, making backups and sharing files between services difficult</li>
<li>It has easier security to reason about, and reduces attack surface, e.g. directory traversals have much less attack surface. I can also run "untrusted" binaries knowing the damage would be limited.</li>
<li>I can switch to another OS with minimal fuss. I simply copy my home folder across and add the crontab line. This method should work in most Linux OS's, maybe even BSD's and MacOS (barring the bubblewrap sandbox which should be replaced with jails or similar). </li>
<li>This method could potentially be used by less technical users, and users without root access. I've used it at work on some servers I don't have root access to.</li>
</ul>
<h2>Caveats</h2>
<p>This simple method is only really useful for simple self-hosting. Here are some downsides I found:</p>
<ul>
<li>Services that need to bind to priviledged ports (like port 80, 443 for web) would need to be run as root. I mitigate this by adding <code>iptables</code> rules to forward port 80 to port 8080, for example, then the service can run on port 8080.</li>
<li>You need to manually update the services when new versions are available. You could automate it with a bash script and cronjob though, and with the reduced attack surface, you may not need to be as pedantic about updates.</li>
<li>Services that need to write to system directories (like /var or /etc) can be problematic. It is possible to use an overlayfs file system to allow writes to system folders (that get saved elsewhere), but this adds complexity.</li>
<li>Services that use PHP, Python, or other interpreted languages can be tricky to run, since you'd typically need to install those languages system-wide, with potential version conflicts, etc. If you're just running one Python service though, it's not too much of a problem.</li>
</ul>
<h2>Future refinements</h2>
<p>Some features I'd like to explore in future:</p>
<ul>
<li>Ability to detect when a service is using too much CPU/RAM/disk and stop it. Running <code>earlyoom</code> can mitigate the RAM issue, for example.</li>
<li>Make the service logs readable by <code>fail2ban</code>, a very useful and important security tool for self-hosters</li>
<li>Ability to adjust the sandbox per service, e.g. some services don't need internet access, so add <code>--unshare-net</code></li>
<li>Log rotation or trimming to keep the log files from getting too big</li>
</ul>
<p>=> <a href="https://github.com/rfjakob/earlyoom">Early OOM Daemon for Linux</a> <br>
=> <a href="https://en.wikipedia.org/wiki/Fail2ban">Fail2ban on Wikipedia</a></p>Semi-self-hosted email2021-12-21T16:25:00+02:002021-12-21T16:25:00+02:00Toby Kurientag:tobykurien.com,2021-12-21:/semi-self-hosted-email/<p>You've heard of GMail and other 3rd party email, and "self-hosted email" which will make some of you cringe and trigger PTSD if you've ever tried it, but did you know there's a nice middle ground?</p><p>I got off GMail back in 2013, right after the Snowden leaks. I temporarily moved my email to my hosting provider at the time, and then tried to follow a guide "NSA-proof your e-mail in 2 hours":</p>
<p>=> <a href="https://sealedabstract.com/code/nsa-proof-your-e-mail-in-2-hours/index.html">https://sealedabstract.com/code/nsa-proof-your-e-mail-in-2-hours/index.html</a></p>
<p>By the time I got to "Open DKIM", "SPF", "Reverse PTR", etc. I'd given up. It's not that it's hard, but I could see how getting myself off spam blacklists and avoiding other people's spam boxes would end up becoming a full time job for me. So I decided to try something slightly different.</p>
<h2>Goals</h2>
<p>To figure out how to handle my email, I needed to have some explicit goals in mind:</p>
<ul>
<li>I want all my email on my own server, under my control, and searchable/archivable in an easy plain text format, like Maildir or mbox.</li>
<li>I would prefer email I send to my friends/colleagues to be routed and stay within my country, rather than being routed to and stored in/via another country (unless they are using GMail or similar).</li>
<li>I don't want to have to work constantly with domain settings and requesting myself removed from spam blacklists, etc.</li>
<li>If I use a hosting provider for my email, I'd like to be able to quickly switch to another hosting provider with minimal downtime. I don't want to be tied to a specific provider.</li>
</ul>
<h2>The method</h2>
<p>The method for achieving this is quite simple:</p>
<ul>
<li>Sign up for a cheap email hosting account at a local hosting provider. The local part is important for many reasons: your email doesn't need to be routed unnecessarily far away; you may get better support locally; you may get a better price locally; your provider is beholden to local laws; you support a local business.</li>
<li>On a regular basis (e.g. once a minute), pull down all email from the email account into your own server, and serve it using IMAP. This part is easier than it sounds, see below.</li>
<li>Filter spam out while pulling in the email into your IMAP server.</li>
<li>Optionally install a webmail service on your server so that you have GMail-like usability.</li>
</ul>
<p>This is what I refer to as semi-self-hosted email, since the actual mail and SMTP server is at a hosting provider of my choosing, but I store and interact with my email from my own server.</p>
<h2>Dovecot</h2>
<p>Dovecot is the IMAP server I use. The first part of the afore-mentioned article on setting up your own email server outlines how to install and configure Dovecot. I installed SSL certificates to allow access to the IMAP server over TLS and firewalled it to the IP address range of my ISP to reduce the chances of it being hacked. If I need to access it while on a trip, for example, I use the webmail interface instead (see below). I wouldn't bother with the encryption of the mail directory though, I can't think of a scenario where that might be useful - your email needs to stay in unencrypted form on your server anyway, so if it's hacked, your email can be copied.</p>
<p>=> <a href="https://www.dovecot.org/">Dovecot</a></p>
<h2>Fetchmail and Procmail</h2>
<p>Now to pull new email from my hosting provider into Dovecot. For this, I use Fetchmail. It's as easy as installing it and adding a .fetchmailrc config file to tell it where to fetch email from, and then run it on boot. And example config file:</p>
<div class="highlight"><pre><span></span><code><span class="n">poll</span><span class="w"> </span><span class="n">pop3</span><span class="p">.</span><span class="n">myhostingprovider</span><span class="p">.</span><span class="n">com</span><span class="w"> </span><span class="n">protocol</span><span class="w"> </span><span class="n">POP3</span><span class="w"></span>
<span class="w"> </span><span class="k">user</span><span class="w"> </span><span class="ss">"user@mydomain.com"</span><span class="w"> </span><span class="k">is</span><span class="w"> </span><span class="n">toby</span><span class="w"> </span><span class="n">here</span><span class="w"></span>
<span class="w"> </span><span class="n">password</span><span class="w"> </span><span class="s1">'thepasswordformyemailaccountatmyhostingprovider'</span><span class="w"></span>
<span class="w"> </span><span class="n">fetchall</span><span class="w"></span>
<span class="w"> </span><span class="n">fetchlimit</span><span class="w"> </span><span class="mi">500</span><span class="w"></span>
<span class="w"> </span><span class="n">nokeep</span><span class="w"></span>
<span class="w"> </span><span class="n">mda</span><span class="w"> </span><span class="ss">"/usr/bin/procmail -m /home/toby/procmail/procmail.conf"</span><span class="w"></span>
</code></pre></div>
<p>In the above example, I tell Fetchmail to connect to POP3 server "pop3.myhostingprovider.com", then fetch the email from my registered account there "user@mydomain.com" with the specified password, and pull it into the local "toby" email account in Dovecot. The other options mean that it fetches all email on the server and deletes them off the server (nokeep).</p>
<p>=> <a href="https://www.fetchmail.info/fetchmail-man.html">Fetchmail</a></p>
<p>Fetchmail can pull email from multiple accounts into one (just repeat the poll block above), which is quite handy! It also supports multiple protocols like POP3 and IMAP. It can push the email straight into Dovecot, however as per my example above, I invoke Procmail on each received e-mail (the line starting with mda), passing in the 'procmail.conf' configuration.</p>
<p>=> <a href="https://wiki.archlinux.org/title/Procmail">Procmail</a></p>
<p>Procmail allows me to act on the incoming email in almost unlimited ways, for example I can invoke programs on the email, I can filter the email, I can send auto-reponses, I can set up auto-forwards, etc. My main use for Procmail is to filter out spam. I used to simply add regular expressions to filter spam such as:</p>
<div class="highlight"><pre><span></span><code># ------------------- Blacklist
:0
* ^(Subject:) .*(viagra|cialis|unforgettable|pills|hack you|michel kors.)
/dev/null
:0
* ^(From:|Reply-To:) .*(no-reply@|noreply@|messages-noreply@|promotions)
/dev/null
</code></pre></div>
<p>However, eventually after adding rules for whitelists and blacklists and pre-whitelist-blacklist (no kidding), I decided I needed a new approach to spam filtering, where I'd rather err on the side of losing a few legit emails than have to constantly update my rules for spammers. My new simplified procmail config only has 2 rules, and it looks like this:</p>
<div class="highlight"><pre><span></span><code><span class="c1"># ALLOW: If it mentions my name or contains my signature</span>
:<span class="mi">0</span> <span class="n">B:</span>
* ( <span class="n">Toby</span> | <span class="n">Toby</span>!| <span class="n">Toby</span>\.| <span class="n">Toby</span>,| <span class="n">Toby</span>$| <span class="n">Kurien</span> | <span class="n">Kurien</span>!| <span class="n">Kurien</span>\.| <span class="n">Kurien</span>,| <span class="n">Kurien</span>$| <span class="nv">@tobykurien</span> | <span class="nv">@tobykurien</span>$)
<span class="n">toby</span>/
<span class="c1"># DISALLOW: If it's not in my whitelist (email addresses in my email box)</span>
<span class="n">FROM</span>=`<span class="n">formail</span> -<span class="n">XFrom:</span> | <span class="n">formail</span> -<span class="n">r</span> -<span class="n">xTo:</span> | <span class="nb">grep</span> -<span class="n">i</span> -<span class="n">o</span> <span class="s">'[A-Z0-9._%+-]\+@[A-Z0-9.-]\+\.[A-Z]\{2,4\}'</span>`
:<span class="mi">0</span>
* ! ? <span class="nb">grep</span> -<span class="n">F</span> -<span class="n">i</span> -<span class="s">q "$FROM"</span> /<span class="n">home</span><span class="o">/</span><span class="n">toby</span><span class="o">/</span><span class="n">whitelist</span>.<span class="n">txt</span>
/<span class="n">home</span><span class="o">/</span><span class="n">toby</span><span class="o">/</span><span class="n">spam</span>
<span class="c1"># -------------------- Catch all</span>
:<span class="mi">0</span>
<span class="n">toby</span>/
</code></pre></div>
<p>So basically, only allow an email through if it mentions my name (e.g. starts with "Hi Toby!") or is a reply to my email, where I know my signature contains "@tobykurien"; or allow an email through if I've already received (and kept in my mail box) emails from them before. Any other email goes into my spam box (which I can still access via Dovecot), but I have a cron job to clear that spam box every night. This means I can still get at any two-factor e-mails or the like if I need to. This is a fairly hard-line stance for managing email, but it's worked incredibly well for me so far - I get at most 1 spam email per month that sneaks through, but rarely miss any important email (at least, to my knowledge!)</p>
<p>How does the second rule work, i.e. how does procmail know what email addresses are in my mail box? The rule checks to see if the email occurs in the "whitelist.txt" file. This file is re-generated every night by the following script:</p>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span>
<span class="normal"> 2</span>
<span class="normal"> 3</span>
<span class="normal"> 4</span>
<span class="normal"> 5</span>
<span class="normal"> 6</span>
<span class="normal"> 7</span>
<span class="normal"> 8</span>
<span class="normal"> 9</span>
<span class="normal">10</span>
<span class="normal">11</span>
<span class="normal">12</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="ch">#!/bin/sh</span>
<span class="c1"># create a list of email addresses from my mailbox</span>
grep <span class="s2">"From: "</span> -r /Mailbox/toby/* <span class="p">|</span> cut -d <span class="s1">' '</span> -f2- > whitelist2.txt
<span class="c1"># strip out the exact email addresses and remove duplicates</span>
grep -i -o <span class="s1">'[A-Z0-9._%+-]\+@[A-Z0-9.-]\+\.[A-Z]\{2,4\}'</span> whitelist2.txt <span class="p">|</span> sort<span class="p">|</span> uniq -i > whitelist.txt
<span class="c1"># remove some email addresses from the whitelist</span>
egrep -v -i <span class="s2">"tobykurien|noreply|no-reply|marketing"</span> whitelist.txt > whitelist2.txt <span class="o">&&</span> mv whitelist2.txt whitelist.txt
mv whitelist.txt ~/whitelist.txt
</code></pre></div></td></tr></table></div>
<h2>SMTP</h2>
<p>So with the above setup, I can use an email client like Thunderbird/Evolution on desktop, or K-9 mail/FairEmail on Android to send and receive e-mail. For sending email, I can simply configure the client with the SMTP server details provided by my hosting provider. I did also opt to install an SMTP server on my own server, which has been working fine for me. This did require me to set up SPF, Reverse PTR, etc.</p>
<h2>Web mail</h2>
<p>Since I move around devices and laptops often, I wanted the ability to access my email via a web browser. This also allows me to add stricter firewall rules to deny access to my IMAP and SMTP servers from outside my ISP's IP address range, for additional security. I initially tried a few options like Horde and Roundcube, but by far the easiest and nicest (for me) solution has been Rainloop. Installing it is as easy as unzipping it into your web server directory and then editing a config file with the details of your IMAP and SMTP server. It has a beautiful and simple interface that works on both desktop and mobile. It even integrates with my WebDAV server to pull in all my contacts, so for me it has all the features I could need, so much so that I no longer use email clients, I just use Rainloop exclusively.</p>
<p>=> <a href="https://www.rainloop.net/">Rainloop</a></p>
<h2>Summary</h2>
<p>In summary, I semi-self-host my email by using a local email hosting provider to provide the email service. I then pull in all email from the provider into my own Dovecot server and then delete the mail off the hosting provider, giving me storage and control over my email archive. In the process, I also filter out spam using two simple rules: either you greet me by name, or I've already contacted you before. This almost entirely eliminates spam. I use Rainloop web mail interface to read and respond to emails from my web browser on either desktop or smartphone. This setup gives me control over my email, allowing me to easily backup my entire email archive using rsync, and I can search and process my email as plain text files (a fact I use to generate my whitelist, for example). Finally, I can easily add additional email accounts or domains by simply adding them to my fetchmail config, and I can move email hosting providers easily.</p>Creating audiobooks2021-07-13T10:45:00+02:002021-07-13T10:45:00+02:00Toby Kurientag:tobykurien.com,2021-07-13:/creating-audiobooks/<p>How to create audiobooks from epub and mobi using text-to-speech</p><p>I've recently started listening to more audiobooks than actually reading books (physical or on an e-reader), as it allows me to consume more books and long-form articles. This is because I can be listening to a book while outside, or while performing a chore, whereas reading requires setting aside a lot of uninterrupted time. I also feel that reading while outdoors in a beautiful setting seems like a waste of the setting, since I'm sucked into the book and not actually looking around and enjoying the environment.</p>
<p>The downside of audiobooks is that there may not always be an audiobook version of what you want to read. Then there's the DRM-riddled services which offer audiobooks, but you must listen on their terms, and if they delete your account, you loose access to the books. For these reasons, I never really bothered with audiobooks before.</p>
<p>I've found three options for DRM-free audiobooks for any book or text (e.g. long-form articles): find the audiobook on YouTube and download the audio track (using for example Invidious or youtube-dl); use an ebook reader app such as Librera/FBReader to read the book using text-to-speech; or create an audiobook using a text-to-speech service. The real-time text-to-speech option (using an app) has downsides: it either needs a constant internet connection to use a web service to perform the TTS, or else it's an offline version but the quality of TTS is usually pretty bad. I decided that I'd much prefer good quality offline audiobooks that I can listen to anytime, anywhere.</p>
<p>To create my audiobook, I follow this process: convert the article/book to text, clean up the text if necessary, generate an audio file using text-to-speech, and post-process the audio file if necessary.</p>
<h1>Convert to text</h1>
<p>For long form articles from the web, I simply copy and paste the article content into a text file. For epub and mobi ebooks, I use the pandoc utility to convert to plain text as follows:</p>
<div class="highlight"><pre><span></span><code>pandoc -i "thebook.epub" -t plain -o "thebook.txt"
</code></pre></div>
<p>Depending on the book, you may need to clean up the text, for example it may contain many dashes separating chapters, which would come out in the audio as "dash dash dash dash ...". You'll probably also want to remove the preface, table of contents, index, etc. I find vi to be a great editor for this, since the text files are usually very large (which many editors will struggle with) and vi makes it easy to "delete everything up to here" or "delete everything from here".</p>
<h1>Use text-to-speech to generate audio</h1>
<p>I tried several solutions for this (such as flite, espeak, svox, festival, etc.), but the best one I could find makes use of Google Translate to do the text-to-speech synthesis. The default voice sounds quite natural, and can pronounce names, technical terms, and common abbreviations correctly, which other TTS systems fail on. </p>
<p>An easy way to make use of Google Translate for text-to-speech is to use the Python package gtts:</p>
<div class="highlight"><pre><span></span><code>pip3 install gtts
gtts-cli -f "mybook.txt" > "mybook.mp3"
</code></pre></div>
<p>The speech synthesis takes really long, it's only a little faster than real-time, so a 10 hour book could take 6 or more hours to generate. Best to leave it to run overnight. Sometimes it may time out, leaving you with a portion of a book. In this case, instead of re-generating the entire thing, listen to the last portion, find the corresponding text in the text file, and delete everything above it, then generate a new file. It's easy to join these up afterwards. Alternatively, generate each chapter as a separate file, allowing you to skip chapters and making it easier to recover from failed TTS runs.</p>
<h1>Audio post-processing</h1>
<p>One thing you may notice with the Google TTS method used above is that the text is read back very slowly. This is usually not a problem, as you can simply increase playback speed to compensate for this. I use Audacity to increase the playback speed by using the "Change Tempo" effect to increase the tempo by 50%. Audacity also provides an easy way to stitch together multiple files if needed.</p>
<h1>Final thoughts</h1>
<p>This might all seem like a lot of effort to go to in order to listen to an ebook, but if you care about having a DRM-free copy of your ebook that you can listen to on your own terms, it might just be worth the effort. I get some of my books from DRM-free sites that support independent authors (such as SmashWords), and this gives me a great way to make audiobook versions that I can listen to at my leisure. It is also one of those rare instances when proprietary Big Tech services can be used to my advantage, so I'm keeping my fingers crossed that gtts will continue to work for a long time. </p>Digital de-clutter2021-05-23T10:45:00+02:002021-05-23T10:45:00+02:00Toby Kurientag:tobykurien.com,2021-05-23:/digital-declutter/<p>My on-going journey to digital minimalism</p><p>Over a month ago, I came to the realization that my smartphone was having several negative impacts on my mental health:</p>
<ul>
<li>
<p>Anxiety over tracking and loss of privacy. Over the years I've mitigated most of these concerns by rooting, flashing LineageOS, disabling Google apps (de-googling), replacing native apps with web versions using my WebApps app, etc. However this year things have stepped up a notch with things like Google FLoC for tracking in the browser itself, and CNAME cloaking for bypassing 3rd party blocking, etc. Can I even trust the Android WebView anymore? Why should I jump through so many hoops, just to even maintain my Android app [1]?</p>
</li>
<li>
<p>Shortness of attention span. The constant need to fill any boredom gap by checking my phone, even if this boredom is while watching a supposedly entertaining movie/series or reading a book. It's too easy to pick up the phone and start doomscrolling. The decline in the number of books I read has been a red flag for me.</p>
</li>
</ul>
<p>In a desperate attempt to regain some control, I ditched the smartphone. I put it into airplane mode, stuck it into a drawer, then went out and bought the cheapest dumbphone I could find, a Nokia 105. I stuck with this phone for 3 weeks while I figured out how to find a balance. During this time, I discovered the book "Digital Minimalism" by Cal Newport [2], which was the perfect book to get me back on track! It explains the negative effects that smartphones have on us, and how we can continue to use technology in a more focused and intentional way to still get value out of it. A number of podcasts on YouTube featuring Cal Newport [3] and Tristan Harris have also been quite enlightnening. </p>
<p>The upshot of all this is that I decided to stick with the dumbphone idea, and instead move all of my computing to the laptop/desktop. This mitigates most of my concerns and gives me back control over my computing device, while also adding a bit of friction (I have to walk to the study to use my laptop) to prevent me from mindlessly checking for notifications and tweets. Over the month, I've actually weaned myself off social media entirely, and finished reading 5 amazing books! I also have my attention span back, and can easily enjoy sitting outside for hours with nothing but a beverage in hand, the view, and my thoughts.</p>
<p>It wasn't all smooth sailing, though! Here are some of the issues that cropped up and how I dealt with them:</p>
<ul>
<li>
<p>Spam calls! The dumbphone doesn't have a feature like "Do not disturb", so three weeks in, I was woken up in the middle of the night by a spam SMS. That was the end of the dumbphone experiment! Instead, I hauled out my low-end 2015 Android One smartphone (running LineageOS), wiped it clean and used that as a dumbphone (i.e. no apps, no internet). Later on, I added OsmAnd for offline GPS, and DAVx5 to sync contacts and calendar for reminders. This means I manually, maybe twice a week or so, enable internet for DAVx5 to sync, then turn it off again. The battery lasts 9 days!</p>
</li>
<li>
<p>Instant messaging. I use Telegram for chatting, and so I installed Telegram Desktop on my laptop and use that. I only really use my laptop once or twice a day, so that's when I check my e-mail and Telegram. My friends know not to expect a fast response. They call or SMS if they need immediate attention. </p>
</li>
<li>
<p>Music, podcasts, and audiobooks. The dumbphone does not support SD cards, and I could not find a music player I could buy that can play formats like OGG, FLAC, and m4a. In addition I was pretty adamant that the music player must not connect to the internet. I also wanted features like hardware buttons for play/pause and skip forwards/backwards (no touchscreen!). Previously I had dumped my entire music collection onto my smartphone and realised that this is bad because I get paralyzed by choice and only listen to a few favourites (not a fan of random play). I often forget that I had added some podcasts or music shows and they go unlistened. I wanted something like the old days of cassette tape, where I could pop in an audiobook tape, listen to it part-way, then later pop in some genre of music, and later still go back to the audiobook tape and continue where it left off. Except instead of tape, I'd be using USB thumbdrives. Oh, and of course I want it to have a high-quality headphone amplifier! The only solution was for me to make my own music player that does all of these things [4] (I could post more about this if there is interest)</p>
</li>
<li>
<p>Taking photos. I'm not an avid photographer, and when I do take photos, I don't care too much about taking instagram-worthy pics. I already have a compact digital camera with optical zoom, which will now be my only photo taking device. My smartphone camera wasn't great anyway.</p>
</li>
<li>
<p>GPS navigation. This was solved once I moved to using my old smartphone as a dumbphone, with the bonus that OsmAnd is a great offline navigation app that uses OpenStreetMap.</p>
</li>
<li>
<p>Going away on a trip. Should I carry all these devices (music player, laptop, camera, smart-dumb-phone?) Should I just cave and install some apps on my smart-dumb-phone? Of course not! I carried all the devices and they worked a treat :) Not totally true, I didn't carry the laptop, instead I took my Raspberry Pi tablet [5].</p>
</li>
</ul>
<p>And that's where I am at. I almost never look at my phone, except to check the time. I use my laptop for all my internet-connected computing needs, and it's so much more of a pleasure to use than my smartphone was. I installed Lubuntu recently and I love how minimalist, lightweight and fast it is. I spend most of my time listening to content (music, audiobooks, podcasts) while enjoying being outdoors. This feels like a step in the right direction for me, and I don't see myself going back to, or buying a new smartphone (even if it is FOSS) anytime soon.</p>
<p>[1] <a href="https://github.com/tobykurien/WebApps/issues/253">Expressing my frustrations with Android and Web on a Github issue</a><br>
[2] <a href="https://www.calnewport.com/books/digital-minimalism/">"Digital Minimalism" by Cal Newport</a><br>
[3] <a href="https://www.youtube.com/watch?v=y3Umo_jd5AA">Cal Newport: Deep Work, Focus, Productivity, Email, and Social Media | Lex Fridman Podcast #166</a> <br>
[4] <a href="/images/microblog/post-1618908395-0.jpg">Raspberry Pi music player: Pi Zero + Pimoroni Pirate Audio HAT</a><br>
[5] <a href="https://tobykurien.com/rpi_tab/">DIY Raspberry Pi Tablet</a> </p>Gemini and e-paper are a great combination2021-03-30T09:45:00+02:002021-03-30T09:45:00+02:00Toby Kurientag:tobykurien.com,2021-03-30:/gemini-epaper/<p>Browsing gemini content on a Kindle is a pleasant, distraction-free experience</p><p>Three months after discovering the <a href="https://en.wikipedia.org/wiki/Gemini_(protocol)">Gemini protocol</a>, I'm still super excited about the possibilities it offers, especially the ability to escape the user-hostile web. For many years I've been thinking about how I can scrape data off the web (things like traffic alerts, weather report, news, etc.) and make it accessible in a simple way on an LCD display or e-paper display, perhaps even on a smart watch. Gemtext offers a great format in which to scrape the data (it's simple enough to parse with a micro-controller), with the bonus that the content can also be published to other devices and users via the Gemini protocol. I've already setup bridges/scrapers to Gemini for my daily feeds, and have been reading them on my smartphone.</p>
<p>As part of my <a href="https://tobykurien.com/war-on-doomscrolling/">war on doomscrolling</a> I recently removed all social media and news content from my smartphone, and instead read books on my Kindle. This got me thinking about building a simple device to read Gemini content on e-paper, since Gemini is mostly just text and very simple to parse. I'm pretty sure this could be done with a <a href="https://www.waveshare.com/wiki/4.2inch_e-Paper_Module">4.2" e-paper display</a> paired with an ESP32 micro-controller. It turns out, such a device already exists in a great form factor: the <a href="https://m5stack-store.myshopify.com/products/m5paper-esp32-development-kit-960x540-4-7-eink-display-235-ppi">m5paper</a>. Wouldn't this make a great pocket Gemini-reader?</p>
<p>Before going down this path however, I thought about the e-paper device I already have: an old Kindle 3. It has an experimental web browser, but I'd never really used it because it's SSL stack is outdated and so doesn't work with most modern websites, and even when it does, the experience is frustrating. I thought of two options to read content on this Kindle: scrape the content into text files and copy it over USB for reading; or use a proxy server for the experimental web browser. I manually tried the first option by copy-and-pasting a few articles from web sites onto the Kindle, and this does indeed work very well. However, since there isn't a Gemtext reader for Kindle, I looked into the second option.</p>
<p>The easiest thing to try was to use the Mozz.us Gemini-to-HTML proxy server over at <a href="https://portal.mozz.us">portal.mozz.us</a>. It seems this site still allows old SSL versions, so it actually works on the Kindle:</p>
<p><img alt="Mozz.us proxy on Kindle 3" src="/images/gemini-epaper/kindle2.jpg"></p>
<p>If you have a Kindle, give this a try! It brings Gemini content to the Kindle in a way that still feels like reading a book. You can't open multiple tabs, navigating around takes some time (you can't just fling content around), there is no JavaScript to popup or distract you, all of which leads to a very pleasant distraction-free reading experience.</p>
<p>There are some issues, however. You can't adjust the font size, font type, line spacing, or contrast. You can zoom, but it resets when you navigate to another page. There is extra cruft at the top of all pages. You're reliant on a server which may go down or tighten up it's SSL support. To solve these issues, I looked into running a local Gemini-to-HTML proxy on a Raspberry Pi. I found two candidates: <a href="https://github.com/pgorman/gneto">Gneto</a> and <a href="https://sr.ht/~sircmpwn/kineto/">Kineto</a>. After trying both, I settled on Kineto, because Gneto doesn't work on URLs that have query parameters. Both allow you to specify a CSS stylesheet, which gives you almost total control over the rendering of the pages.</p>
<p>To compile Kineto on the Raspberry Pi, I had to first download and install the latest version of <a href="https://golang.org/">Go lang</a> from the website, since the version of Go in the OS repository is too old. I then spend a lot of time tweaking the stylesheet to work on the Kindle according to my preferences. The Kineto template makes use of modern HTML tags such as <strong>article</strong>, <strong>details</strong>, <strong>summary</strong>, etc. The Kindle browser does not understand these, and so just dumps out their content without applying any styles to them. This created problems with the display, and so I had to modify the Kineto source to comment them out. Finally, with all the changes in place, I can run Kineto as:</p>
<div class="highlight"><pre><span></span><code>nohup ./kineto -b 0.0.0.0:9065 -s kindle.css gemini://tobykurien.com &
</code></pre></div>
<p>The end result is a clean, book-like display of the content:</p>
<p><img alt="Kindle 3 viewing Gemini content via Kineto proxy" src="/images/gemini-epaper/kindle3.jpg"></p>
<p>If you'd like to run this verion of Kineto yourself, the code and even the compiled binary are available in <a href="https://cloud.tobykurien.com/cgi-bin/repo/kineto/dir?ci=tip">this repo</a>.</p>
<p>I think the most satisfying type of programming is when you create something simple that makes your life a little easier or more pleasant, like home automation. It's even better when one little side project leverages another little side project. Reading web content scraped into Gemini on my Kindle ranks right up there with satisfying side projects!</p>My war on doomscrolling2021-02-11T07:45:00+02:002021-02-11T07:45:00+02:00Toby Kurientag:tobykurien.com,2021-02-11:/war-on-doomscrolling/<p>My attempts at avoiding doomscrolling and living a healthier digital lifestyle</p><p>The definition of doomscrolling, according to <a href="https://www.urbandictionary.com/define.php?term=doomscrolling">Urban Dictionary</a> is:</p>
<blockquote>
<p>When you keep scrolling through all of your social media feeds, looking for the most recent upsetting news about the latest catastrophe. The amount of time spent doing this is directly proportional to how much worse you're going to feel after you're done.</p>
</blockquote>
<p>I'd like to broaden that definition a bit, because it's not just about upsetting news, it's about any news. Doomscrolling for me is when I scroll through feeds, then decide it's enough, put the phone down, can't think of anything else to do, so pick the phone back up and continue. Often I'm so sucked in that when I finally look away from my phone, my eyes take a while to adjust and feel strained. A few months ago I decided that this is a bad habit, and needed to stop.</p>
<h2>Culprit 1: Algorithms</h2>
<p>Twitter just sucks me in. Endless tweets, even from people I don't follow. So I deleted it off my phone, and just kept checking it on my less convenient tablet from time to time. That didn't change things much though, because I just spent more time on my tablet. Then twitter started sticking irrelevant tweets into my notifications. That's when I realised that the problem is not that I look at Twitter, but that their algorithm keeps sticking tweets everywhere I look, tweets I didn't ask for. First it was promoted tweets (easy to ignore), then the "because you follow XXX" tweets, then the topic-based tweets, then just completely random popular tweets, and finally the "in case you missed it" tweets in my sacred notifications! Nothing more insulting than looking for the dopamine hit from clicking on an unread notification, only to see a non-interaction.</p>
<p>To get past this, I stopped using the Twitter app altogether. Instead I use <a href="https://github.com/zedeus/nitter">Nitter</a>. I added people I want to follow into a public list, and then I load that list in Nitter to see my timeline. No more algorithms, just tweets from people I deliberately follow. I can now actually finish looking at all my new tweets from the people I follow, in about 5 minutes. Done. Close Nitter and move on... to Mastodon š At least Mastodon doesn't have algorithms, so I get the same benefit of "finishing" my feeds in about 5 minutes.</p>
<p>Algorithms are the main problem!</p>
<h2>Culprit 2: posting stuff, expecting interactions</h2>
<p>The second big reason to keep picking up the phone and looking for notifications is for the aforementioned dopamine hit from interactions. If there are interactions, I'll want to see who it was, maybe interact back, and then resume the doomscrolling. So I made a pact with myself: ignore likes and retweets, these are not real interactions. An interaction is when someone replies or @s me. Those can be set to come through via e-mail, or is a simple Nitter search for my username away. So I check that once or twice a day.</p>
<p>Related to this is that the more I post, the more I'll want to check if there was an interaction. Email notifications solve this problem - no email, no interaction. Also, I post less, more deliberately. Fire and forget, post and don't look back, move on to other things.</p>
<h2>What other things?</h2>
<p>So no more social media (other than my 10 minute catchup), no more Hacker News, no more Reddit on my phone. When I wake up, I'm done reading stuff in 10 minutes. So then what do I do in my leisure time?</p>
<p>This is where it gets tricky - what do I do to satiate my brain's endless need for something new to find delight in? I'm trying a few things. For one, I read books. When there's nothing else to read on my phone, but there's a book waiting to be read, why not read it? Is reading a book so much better than reading social media feeds? I think so.</p>
<p>I found that when I have a lot more time to spend, then I might let a few distractions creep in. One such is news and thought/opinion pieces. Regular news sites are full of click-bait and algorithm-driven content, so I spent some time finding just a single source of quality news and opionions, which ended up being <a href="https://www.dailymaverick.co.za">Daily Maverick</a>. I skip past the corruption news though - I'm glad it's there, expose the bastards, but I'll pass, thanks. </p>
<p>A more recent distraction is <a href="https://gemini.circumlunar.space/">Geminispace</a>: a whole new world of content-driven sites, because it's all just text. I <a href="https://tobykurien.com/post-1611168829/">previously blogged</a> that:</p>
<blockquote>
<p>Gemini is to the web what reading a book is to watching TV. The former is focussed, simple, requires some effort, and may be more rewarding. The latter may be more compelling but also full of distractions and advertisements.</p>
</blockquote>
<p>Another thing I do with my spare time is that I try to embrace a "slow life": sit outside, listen to music, watch birds, pay attention to my surroundings. I call it "soul feeding" time, and it happens at around sunset. I've taken up the challenge of trying to identify all the birds I see in my yard. I've created a bird list, which now has 24 bird species in it. </p>
<p>Will it stick? I hope so. </p>The anti-consumerist lifestyle2020-08-11T12:36:00+02:002020-08-11T12:36:00+02:00Toby Kurientag:tobykurien.com,2020-08-11:/the-anti-consumerist-lifestyle/<p>I live an anti-consumerist lifestyle - one that is focused on maximizing health, time, and money rather than the acquisition of _stuff*.</p><p>I live an anti-consumerist lifestyle - one that is focused on maximizing <em>health</em>, <em>time</em>, and <em>money</em> rather than the acquisition of <em>stuff</em>. One could call it <a href="https://tobykurien.com/i-am-a-productivity-hobbyist-and-life-hacker/">life-hacking</a>: how to turn the powerful force of consumerism on its head, and make it work for you, rather than against you. By age 39, I <em>retired</em> and am <em><a href="https://en.wikipedia.org/wiki/Financial_independence">financially independent</a></em> (AKA FIRE - Financially Independent, Retired Early), although I do still work (to fulfil non-monetary goals and also to supplement my investments).</p>
<p>How did I go about doing this? Through "a combination of simple living, anticonsumerism, DIY ethics, self-reliance, and applied capitalism" (from <a href="http://earlyretirementextreme.com/about-the-blog">Early Retirement Extreme</a>). If I had to write a blog about how I achieved my current lifestyle, it would read pretty much like this great blog by Mr Money Mustache: <a href="http://www.mrmoneymustache.com/2013/02/22/getting-rich-from-zero-to-hero-in-one-blog-post/">http://mrmoneymustache.com</a></p>
<p>I was influenced by "<a href="https://en.wikipedia.org/wiki/The_4-Hour_Workweek">The Four Hour Work Week</a>" by Timothy Ferriss (life- and time-hacking), as well as "<a href="https://en.wikipedia.org/wiki/Rich_Dad_Poor_Dad">Rich Dad, Poor Dad</a>", by Robert Kiyosaki (finance), and "The Testosterone Advantage", or more recently "<a href="https://www.goodreads.com/book/show/48730.The_New_Rules_of_Lifting">The New Rules of Lifting</a>" by Lou Schuler and Alwyn Cosgrove (health/fitness). I base my life philosophy on the Stoic philosophy, as described in the book <a href="https://www.goodreads.com/book/show/5617966-a-guide-to-the-good-life">A Guide to the Good Life: The Ancient Art of Stoic Joy</a>.</p>
<p>Note, these aren't affiliate links, these are books that genuinely changed my lifestyle. I didn't understand anything about the world of finance or investing (or the possibility of being financially independent) until I attended the excellent <a href="http://financialfitnesstraining.co.za/">Financial Fitness</a> training course. I've been making progress on the road to financial freedom ever since.</p>
<h2>In a nutshell</h2>
<p>Here's an over-simplification of my guidelines to maximizing health, time and money.</p>
<h3>1. Health</h3>
<ul>
<li>
<p>This should be priority #1. If you don't have time to gym 3 times a week, you should make time (even if you have to trade off income, i.e. change jobs).</p>
</li>
<li>
<p>On a scale of 0 (completely ineffective) to 10 (highly effective), gymming twice a week is about 2, and three times a week is about 7. You are wasting effort if you gym less than 3 times a week.</p>
</li>
<li>
<p>Gym should be about increasing your strength (both men and women), not about aerobics or cardio. Leave cardio for the great outdoors (running, cycling). Why strength? Basically, you need to increase muscle tissue to offset the drop in metabolism as you age. Read the aforementioned <em>New Rules of Lifting</em> book for more.</p>
</li>
<li>
<p>Strength training is a universal fix for most health problems, and the best (and cheapest) weapon against aging. Don't believe me? Then meet <a href="http://ernestineshepherd.net">Ernestine Shepherd</a>, a female body builder in her late 70's who looks like she's in her 20's!</p>
</li>
<li>
<p>A highly effective and simple routine for men and women is the one I follow: <a href="https://stronglifts.com/5x5/">Strong Lifts 5x5</a>. For more information about diet and exercise, check out this great <a href="https://liamrosen.com/fitness.html">Beginner's Health and Fitness Guide</a></p>
</li>
<li>
<p>Sleep is just as important as diet and exercise, and not getting 8 hours a night can be massively detrimental to your health. I would consider Matthew Walker's book <a href="https://www.goodreads.com/book/show/34466963-why-we-sleep">Why we sleep</a> required reading for everyone and potentially life-changing. Also check out <a href="https://www.youtube.com/watch?v=_d583swchPA">YouTube videos</a> for more.</p>
</li>
</ul>
<h3>2. Time</h3>
<ul>
<li>
<p>Time should be priority #2. If you value your time, you will make good decisions about how you spend it. The value of leisure time is not to be under-estimated. The essay <a href="http://www.zpub.com/notes/idle.html">In praise of Idleness</a> (by Bertrand Russell) is a good read as to why.</p>
</li>
<li>
<p>If you're "too busy" to go out for an unscheduled coffee with an old friend or meet with colleagues, then you may need to improve your time management skills. I highly recommend following the productivity techniques described by David Allen: "<a href="https://en.wikipedia.org/wiki/Getting_Things_Done">Getting Things Done</a>" (AKA GTD). Combine this with the "<a href="https://en.wikipedia.org/wiki/Pomodoro_Technique">Pomodoro Technique</a>" for maximum productivity. If work still overwhelms you, then consider changing your job/employer or letting your employer know that they are under-staffed.</p>
</li>
<li>
<p>Understand that time and finance are linked together: if you take out a loan for a purchase, you will need to work to repay it, which will rob you of time. Even if you didn't take out a loan, you would reduce the amount of money invested, which would reduce your passive income, which may mean you'd have to earn more money. Bottom line: everything you buy robs you of time, more-so if you have to pay monthly.</p>
</li>
<li>
<p>I get asked: "well what's acceptable to buy, and what's not?" That's for you to decide, but I have a simple guideline: I prefer to spend money on lifestyle items (like a bicycle, tent, or guitar) rather than status-symbol items (like a luxury sedan). I also prefer to buy items that get me out of the sitting/lying down position that we spend most of our life in.</p>
</li>
<li>
<p>Once you have enough free time, you will start to ponder about how you can live a more fulfilling life. You will finally be in a position to help change the world (or your neighbourhood), learn new things (like playing the piano or <a href="https://www.youtube.com/watch?v=tmNXKqeUtJM">why the Solar System is flat</a>), explore the world by travelling, and generally growing as a person. Ultimately, <a href="https://tobykurien.com/tobys-pearls-of-wisdom/"><strong>happiness is growth</strong></a>.</p>
</li>
</ul>
<h3>3. Finance</h3>
<ul>
<li>
<p><em>Debt</em> is very bad. You know this, but you may be underestimating it. All debts should be paid off ASAP, because...</p>
</li>
<li>
<p><em>Compound interest</em> you pay will make you a slave to your job (which will ultimately rob you of your time and health). However, compound interest paid <em>to</em> you is the most powerful way to become financially free.</p>
</li>
<li>
<p>Compound interest takes lots of time to work, which is why you should start ASAP. You <em>really</em> have to play with the numbers in a spreadsheet to get an intuitive feel for this. Try to follow along with this exercise using your favourite spreadsheet application (e.g. Excel):</p>
</li>
<li>
<p>Using first principles (no fancy equations needed), work out what R100 per month saved over 20 years is, using one row for each month:</p>
<table>
<thead>
<tr>
<th>Month</th>
<th>Saving</th>
<th>Total</th>
</tr>
</thead>
<tbody>
<tr>
<td>01/2016</td>
<td>R100</td>
<td>R100</td>
</tr>
<tr>
<td>02/2016</td>
<td>R100</td>
<td>R200</td>
</tr>
<tr>
<td>03/2016</td>
<td>R100</td>
<td>R300</td>
</tr>
</tbody>
</table>
<p>...</p>
</li>
<li>
<p>Now work out what it is if you earn 15% per annum in interest, i.e.</p>
<blockquote>
<p>total_this_month = total_last_month * (0.15 / 12) + total_last_month + saving_this_month.</p>
</blockquote>
</li>
<li>
<p>Now work out what it will be at the end of 40 or 50 years. The numbers become unbelievably big over 50 years, which is why it is so important to start early.</p>
</li>
<li>
<p>That's just R100 per month, what about if you saved R1000 per month? Or what if you started with R100 per month, then increased it by R10 every month?Ā What if you went "all-in" and saved R2000 per month for 15 years, would you then be financially independent (your fixed expenses covered by interest earned)? These are the type of questions the spreadsheet can answer for you, allowing you to set your financial goals realistically, and making it very clear how your spending habits may be robbing you of financial freedom.</p>
</li>
<li>
<p>You should now be aware that it is possible to be financially free on a modest salary, but don't waste all those R100 p/m you could have been saving, on things like Dstv or fancy cellphone contracts. Invest it instead.</p>
</li>
<li>
<p>The above spreadsheet was a fundamental tool in helping me achieve my financial goals, and for helping me figure out when I can consider myself retired.</p>
</li>
<li>
<p>Think you've got a feel for compound interest now? Ok, try guessing this: If I started with R1 today, and doubled it every day for 40 consecutive days, how much would I have at the end of the 40 days?</p>
</li>
<li>
<p>Inflation erodes your wealth over time in just as big a way, and is typically higher than quoted by the government (as that is based on bare necessities, but your inflation is based on things like cars, houses, school/university fees, etc.). Inflation is typically higher than the best rate a bank will give you on a savings/investment account. I like to think that it is around 12% (this is much lower in developed countries), so you need to earn more than that to beat inflation (otherwise you are getting poorer!). The good news is that in developing countries, you can typically get greater returns, which is why foreigners often invest in developing countries.</p>
</li>
<li>
<p>The best way to beat inflation (as proven over time) is to invest in <em>shares (AKA stocks)</em>, <em>unit trusts (AKA mutual funds)</em>, and/or <em>property</em>. You could, of course, <em>start your own business</em> too. My preference is <em>shares</em> (good return without requiring much of my time). Surprisingly, shares can also be <em>less risky</em> because of a thing called <a href="http://www.investopedia.com/articles/stocks/09/use-stop-loss.asp">stop loss</a>, which none of the other options have.</p>
</li>
<li>
<p>You should learn to invest your money (i.e. buy income-generating assets). An easy way to start <em>right now</em> (assuming your debts are paid off), is to invest in <a href="http://www.satrix.co.za/">Satrix 40</a>, <a href="http://www.jse.co.za/taxfree">tax-free</a>! With this, a computer (not an emotional human) takes your money and invests it in the Top 40 shares on the JSE. <a href="http://www.satrix.co.za/fund-research-product.php?type=ETF&fund=satrixALSI40Fund">The result</a> (as at May 2015): 16.6% per annum over the last 10 years (despite a global economic collapse). That's a lot better than any bank account.</p>
</li>
<li>
<p>Read the aforementioned book <em>Rich Dad, Poor Dad</em> to get started, and if you can, attend the <em>Financial Fitness</em> training. Another good read is the 3-part <a href="http://www.thinksaveretire.com/2015/09/29/how-to-master-your-early-retirement-lifestyle-part-1/">how to master your early retirement lifestyle</a>. A great South African book on finance that is accessible to a younger audience (and covers all the important topics) is <a href="https://www.likeafuckinggrownup.com/books/">Manage Your Money Like a F*cking Grownup</a> by Sam Beckbessinger</p>
</li>
</ul>Last-mile commuting with an e-scooter2020-06-23T16:17:00+02:002020-06-23T16:17:00+02:00Toby Kurientag:tobykurien.com,2020-06-23:/escooter/<p>I've been using an e-scooter to get to and from public transport, and it's liberating!</p><h1>Part 1</h1>
<p>It started with me wanting to, in true <a href="http://www.mrmoneymustache.com/2013/04/22/curing-your-clown-like-car-habit/">Mustachian</a> fashion, bike to work. Unfortunately, this isn't very practical in my daily commute, because of distance (over 30km one-way), and my use of multiple modes of public transport (<a href="http://www.gautrain.co.za">bus and train</a>). While I could try a folding bike, I wasn't completely sold on this idea due to the unwieldiness of it. (UPDATE: I now have a folding <a href="/ebike/">e-bike</a> as part of my mixed-mode commute)</p>
<p>Then one day (around August 2016), I saw a kid's toy: a folding e-scooter, the <a href="http://www.uberscoot.co.za/models/300W.html">Uber Scoot S300</a>. This was affordable (R4500), however the weight of over 18kg made it seem impossibly unwieldy for carrying around a train station. Eventually, after much research and deliberation, I decided to give it go anyway.</p>
<blockquote class="twitter-tweet" data-conversation="none" data-lang="en"><p lang="en" dir="ltr">I guess you'll never know if you don't try... <a href="https://twitter.com/hashtag/escooter?src=hash&ref_src=twsrc%5Etfw">#escooter</a> <a href="https://twitter.com/hashtag/gautrain?src=hash&ref_src=twsrc%5Etfw">#gautrain</a> <a href="https://t.co/KxoZMFYr4Z">pic.twitter.com/KxoZMFYr4Z</a></p>— Toby Kurien (@TobyKurien) <a href="https://twitter.com/TobyKurien/status/781523587098374144?ref_src=twsrc%5Etfw">September 29, 2016</a></blockquote>
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
<p>I soon realised that I needed to modify the e-scooter to:</p>
<ul>
<li>be <strong>lighter</strong>. Around 14kg is light enough to sling over my shoulder.</li>
<li>have a <strong>carry strap</strong> to enable me to sling it over my shoulder.</li>
<li>have a <strong>bag</strong> to carry it in when taking it into public transport.</li>
</ul>
<p>Thus began my adventures in modifying the e-scooter. I added the carry strap, moved the heavy lead-acid batteries into a backpack, making the e-scooter much lighter (around 13kg) and easier to carry, and my wife made a nice bag to put the e-scooter into. I later swapped the lead acid batteries (that weigh around 5.5kg) for an RC LiPo pack (weighing about 1.1kg). I even <a href="https://cad.onshape.com/documents/ae64a9875b2f0880a45c9446/w/d5aa5b4b2025cd3b4b43ff48/e/d9b9a2cf0bfb7ae3e7919abe">designed</a> and <a href="https://twitter.com/TobyKurien/status/815947990951165952">3d-printed</a> a rear mudguard to avoid muddy trousers!</p>
<blockquote class="twitter-tweet" data-conversation="none" data-lang="en"><p lang="en" dir="ltr">Today I did my <a href="https://twitter.com/hashtag/escooter?src=hash&ref_src=twsrc%5Etfw">#escooter</a> <a href="https://twitter.com/hashtag/commute?src=hash&ref_src=twsrc%5Etfw">#commute</a> with <a href="https://twitter.com/TheGautrain?ref_src=twsrc%5Etfw">@TheGautrain</a> and it was great! Definitely needs a wheelie bag. Lots of curious onlookers. <a href="https://t.co/2aMGoIgEUM">pic.twitter.com/2aMGoIgEUM</a></p>— Toby Kurien (@TobyKurien) <a href="https://twitter.com/TobyKurien/status/782997288004284417?ref_src=twsrc%5Etfw">October 3, 2016</a></blockquote>
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
<blockquote class="twitter-tweet" data-conversation="none" data-lang="en"><p lang="en" dir="ltr"><a href="https://twitter.com/hashtag/escooter?src=hash&ref_src=twsrc%5Etfw">#escooter</a> stage 1 mods done: carry strap added, custom bag (for Gautrain), batteries moved to backpack (for weight reduction) <a href="https://t.co/2Bmo1ggKev">pic.twitter.com/2Bmo1ggKev</a></p>— Toby Kurien (@TobyKurien) <a href="https://twitter.com/TobyKurien/status/797461743144464384?ref_src=twsrc%5Etfw">November 12, 2016</a></blockquote>
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
<blockquote class="twitter-tweet" data-conversation="none" data-lang="en"><p lang="en" dir="ltr">Stage 2 mod for the <a href="https://twitter.com/hashtag/escooter?src=hash&ref_src=twsrc%5Etfw">#escooter</a>: LiPo battery. Pros: ~ 4kg lighter, > double the range. Cons: charging hazardous (must remove battery)! <a href="https://t.co/Vkp2LeT9M8">pic.twitter.com/Vkp2LeT9M8</a></p>— Toby Kurien (@TobyKurien) <a href="https://twitter.com/TobyKurien/status/800348992215207936?ref_src=twsrc%5Etfw">November 20, 2016</a></blockquote>
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
<blockquote class="twitter-tweet" data-conversation="none" data-lang="en"><p lang="en" dir="ltr">Another mod: Designed and <a href="https://twitter.com/hashtag/3dprinted?src=hash&ref_src=twsrc%5Etfw">#3dprinted</a> a rear mudguard for my <a href="https://twitter.com/hashtag/escooter?src=hash&ref_src=twsrc%5Etfw">#escooter</a>. Hopefully no more muddied trousers. <a href="https://t.co/vLZBUCxm9X">pic.twitter.com/vLZBUCxm9X</a></p>— Toby Kurien (@TobyKurien) <a href="https://twitter.com/TobyKurien/status/815947990951165952?ref_src=twsrc%5Etfw">January 2, 2017</a></blockquote>
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
<blockquote class="twitter-tweet" data-conversation="none" data-lang="en"><p lang="en" dir="ltr">This is how I roll. To and from <a href="https://twitter.com/TheGautrain?ref_src=twsrc%5Etfw">@TheGautrain</a> <a href="https://twitter.com/hashtag/escooter?src=hash&ref_src=twsrc%5Etfw">#escooter</a> <a href="https://twitter.com/hashtag/emobility?src=hash&ref_src=twsrc%5Etfw">#emobility</a> <a href="https://twitter.com/hashtag/joburg?src=hash&ref_src=twsrc%5Etfw">#joburg</a> <a href="https://t.co/etImyMyHbM">pic.twitter.com/etImyMyHbM</a></p>— Toby Kurien (@TobyKurien) <a href="https://twitter.com/TobyKurien/status/819939937671856130?ref_src=twsrc%5Etfw">January 13, 2017</a></blockquote>
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
<p>I get a lot of attention while I scoot around to and from work! I have yet to see one other person try this form of transport here in Johannesburg, which is sad, because it is cheap and fun, and we have cycle lanes! Here are some common responses:</p>
<ul>
<li><em>Where did you buy it?</em> <a href="http://www.tevo.co.za">Tevo</a>, also available at <a href="http://www.makro.co.za">Makro</a></li>
<li><em>How far does it go?</em> About 10km, depending on inclines.</li>
<li><em>How fast does it go?</em> About 20km/h, much faster than walking! On average, a 15 minute walk becomes a 5 minute ride.</li>
<li><em>Does it need petrol?</em> No, just charge it like a cellphone. It takes about 2 hours to charge. I use about 85Wh to travel a round-trip of about 6km which includes several inclines.</li>
<li><em>How much does it cost?</em> Less than most smartphones! I got it for R4500</li>
<li><em>Shouldn't you use a bicycle instead, for the exercise?</em> I get plenty of exercise carrying the scooter around the train station! Besides, I don't want to get sweaty and smelly on my way to work. Also, a bicycle is not as easy to carry around, even a folding one.</li>
<li><em>Why don't you just use your car?</em> Because I don't like sitting in traffic, struggling for parking, paying for petrol, ruining our environment, etc. But mostly the traffic thing.</li>
<li><em>What if it rains?</em> I carry a poncho or rain coat which keeps me dry, and I always still have the option of using my car.</li>
</ul>
<h1>Part 2</h1>
<p>Around July of 2017, I spotted <a href="https://swagtron.com/electric-scooter/Swagger-carbon-fiber/">this beauty</a> in the window of a local nondescript gadget shop:</p>
<p><img src="../images/escooter/swagger.jpg" width="220px"></p>
<p>Well, not <em>exactly</em> that model: this one has an aluminium deck, and is not branded. I was concerned about the lack of suspension and the tiny wheels, but after watching many YouTube videos, I decided to buy it. And then, there were two...</p>
<blockquote class="twitter-tweet" data-conversation="none" data-lang="en"><p lang="en" dir="ltr">Bought another <a href="https://twitter.com/hashtag/escooter?src=hash&ref_src=twsrc%5Etfw">#escooter</a>. Easier to carry on <a href="https://twitter.com/hashtag/gautrain?src=hash&ref_src=twsrc%5Etfw">#gautrain</a> but rides like a skateboard. R3200. Lithium battery. Regenerative braking. <a href="https://t.co/7idhqm57nS">pic.twitter.com/7idhqm57nS</a></p>— Toby Kurien (@TobyKurien) <a href="https://twitter.com/TobyKurien/status/894877969704943616?ref_src=twsrc%5Etfw">August 8, 2017</a></blockquote>
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
<p>A mini-review:</p>
<ul>
<li>This is pretty much the lightest e-scooter you can get! It only weighs 8,2kg (according to my scale). This makes it really easy to carry around, and it even fits on the upper luggage rack on the Gautrain.</li>
<li>It looks really nice and is well built. Strong aluminium everywhere with a well-designed folding mechanism means it can take a beating!</li>
<li>It has a very useful, bright headlight.</li>
<li>It has electronic braking (e-brake), including regenerative braking! This means that as you brake, some energy goes back into charging the battery. In practise, this is a nearly useless feature, as very little energy can really be harvested this way. How much does your laptop charge if you only plug it in for 3 seconds? Exactly. Unfortunately, the e-brake is an on/off type, meaning that you need to be leaning back before you brake, else you can go flying over the handlebars! You also need to be ready to step on the rear mudguard for extra braking power.</li>
<li>The wheels are tiny and square, so it is very easy to loose grip and fall off. Infact a friend who hopped on, fell off the e-scooter merely seconds later, in front of an amused and applauding crowd! I had the e-scooter slide out from under me on a few occasions - luckily I was able to perform a running catch each time to avoid an embarrassing fall.</li>
<li>The handlebar locks in place when folded, making it possible to wheel it around rather than carry it, which greatly improves portability.</li>
<li>Lack of power. With only 250W, it needs plenty of assitance up any appreciable incline, even with my sub-70kg weight. Note that it has a front-wheel driven brushless hub motor.</li>
<li>Lack of battery capacity. With plenty of assistance up hills, it can barely manage about 6km range. The battery meter will also give you stress: just 1km into your ride, it will show low battery every time you apply throttle (as it's showing voltage, rather than charge remaining).</li>
<li>Poor weight balance. The deck and rear wheel is extremely light, as the batteries are in the steering column, and the brushless hub motor is on the front wheel. This means the everytime you lift the e-scooter, the deck will most likely swing around and hit your ankle in the most painful manner. Also, it's easy to tip over forwards when riding into small mounts of sand.</li>
<li>The worst part about this e-scooter: it rides worse than a skateboard due to the stiffness and lack of suspension. It helps to stand sideways on the deck with your heels off the deck, so that your calves can absorb the shocks, because if you don't, your vision will blur from all the vibration. </li>
</ul>
<p>In short, this e-scooter is only usable on smooth, dry, tarred lanes for fairly short rides. It is quite unstable due to lack of grip, high stiffness, and tiny wheels. Still, I find that I use it when I only need to ride it in town, on the smooth cycle lanes.</p>
<h1>Part 3</h1>
<p>I'd pre-ordered a <a href="http://www.mudslinger.co.za/product/e-scooter/">MudSlinger e-scooter</a> way back in April 2017 after reading <a href="http://www.popularmechanics.co.za/wheels/mudslinger-electric-scooter/">this Popular Mechanics article</a> about it. I got in touch with the creators, who were very friendly and willing to listen to my advice regarding what an ideal e-scooter should be. Eventually, by September 2017, I got a review unit from them. And then, there were three:</p>
<blockquote class="twitter-tweet" data-conversation="none" data-lang="en"><p lang="en" dir="ltr">Got a Mudslinger <a href="https://twitter.com/hashtag/escooter?src=hash&ref_src=twsrc%5Etfw">#escooter</a> to add to my collection. SA-designed product <a href="https://t.co/Ibp97R354N">https://t.co/Ibp97R354N</a> <a href="https://t.co/xPReTFLcNk">pic.twitter.com/xPReTFLcNk</a></p>— Toby Kurien (@TobyKurien) <a href="https://twitter.com/TobyKurien/status/904328559807868929?ref_src=twsrc%5Etfw">September 3, 2017</a></blockquote>
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
<p>Here's a mini-review:</p>
<ul>
<li>The MudSlinger e-scooter has suspension! It isn't obvious from the pictures, but the suspension has decent travel. Combined with the air-filled front wheel, it results in a smooth ride over paving and road (and even dirt trails), while reducing the amount of strain on the e-scooter.</li>
<li>Very light! While not the lightest, it weighs only 10.4kg (according to my scale) making it easy to carry on my shoulder.</li>
<li>The solid rubber rear wheel (with integrated brushless hub motor) means no punctures on the wheel with the motor. Doesn't compromise the ride quality too much due to suspension.</li>
<li>Powerful 350W motor. It can easily achieve 31km/h on flats and downhills, which is dangerously fast. Luckily there's a low gear (eco mode) which limits the top speed to around 22km/h, which is much safer.</li>
<li>Slick-looking, compact, and durable. The review unit I had took a beating and nothing broke. It is hard to believe that the battery is in that super-thin deck.</li>
<li>High-capacity 8800mAh battery. I haven't managed to test out the range, but it seems it will get over 10km on a charge on my usual route. I once did around 9km (lots of flat-out downhill) with charge to spare afterwards.</li>
<li>Comes with powerful headlight and tail light, including a brake light.</li>
<li>On the downside, the throttle is a big laggy, and the rear mudguard is inadequate.</li>
</ul>
<p>I added a few modifications - a carry strap, and an extended rear mudguard to avoid muddy pants:</p>
<p><img src="../images/escooter/mudslinger_mods.jpeg" width="220px"></p>
<p>In short, the MudSlinger e-scooter is the one I'd recommend!</p>
<p><strong>UPDATE</strong></p>
<p>After almost 1500km of riding over a year, a few things broke:</p>
<ul>
<li>The handlebar stem broke internally due the strain on it when braking (body weight pushing forwards on it). I managed to hack together a fix that held for a few months.</li>
<li>The front wheel bearings wore out. I was able to replace them fairly easily.</li>
<li>I hit a bump in the road once and the front part of the deck where the hinge is attached tore and bent upwards. I fixed this by drilling through and bolting it back together.</li>
</ul>
<p>Hopefully the updated models have resolved some of the design issues. This scooter is now available at <a href="https://www.sportsmanswarehouse.co.za/product/mudslinger-electric-scooter">Sportsmans Warehouse</a>.</p>
<h1>Part 4</h1>
<p>In October 2019, I got the latest model of the Mudslinger e-scooter - the <a href="https://www.mudslinger.co.za/product/gosmart-explorer-electric-scooter/">Mudslinger GoSmart Explorer Electric Scooter</a>, which is available from <a href="https://www.sportsmanswarehouse.co.za/mudslinger-gosmart-explorer-electric-scooter-c1139456">Sportsmans Warehouse</a> for R5300. </p>
<p><img src="../images/escooter/mudslinger2_1.jpg" width="220px"></p>
<p>This e-scooter is a huge improvement over the previous model. Most notably, it is of a much better build quality! The folding mechanism and hinge is much stronger, the battery is moved into the hefty stem, and an improved suspension is now integrated into the rear. There is also a kick-stand integrated into the deck. Overall the e-scooter feels much stronger.</p>
<p><img src="../images/escooter/mudslinger2_2.jpg" width="220px"></p>
<p>In addition, this e-scooter features a USB charging port, and bluetooth, allowing you to pair it with an app on your phone, which is most useful for diagnosing any problems, but not for much else. There isn't any lock/unlock feature, nor the ability to view detailed battery stats, but that's OK. The e-scooter is perfectly usable without the app. The display readout on the handlebar shows all the important information (speed, charge state, mode, etc.), although it is not readable in direct sunlight.</p>
<p><img src="../images/escooter/mudslinger2_3.jpg" width="220px"></p>
<p>This is still a compact and relatively lightweight e-scooter that is easy to fold, and fits neatly into the boot of my car. When folded, there is a hook that hooks into the rear mudguard, allowing it to be carried easily. The headlight is an improvement over the previous model (it is angled downwards and inside a reflector assembly), with much better night-time visibility, and the rear light flashes during breaking. The speed control features 3 modes, where mode 1 is limited in speed to about 9km/h, making it perfect for beginners to learn to ride it without the risk of a high-speed crash. The rear suspension makes for a more comfortable ride over the previous model, as it doesn't bottom out (with my weight). It feels like it has longer travel and is stiffer.</p>
<p>Another improvement over the previous model is the motor. Even though the power output is lower (250W compared to the previous 300W), it is a 36V motor, and thus delivers more torque, and it is much quieter. The top speed may be slightly lower, but it pulls a lot better up the hills! </p>
<p>The only thing to be wary of with this e-scooter is the brake - at high speed, the brake is really sharp and hard to modulate, so you will need to brace yourself and shift your weight rearwards before touching the brake.</p>
<p>In short, the Mudslinger GoSmart Explorer is a really well-built e-scooter that is a major improvement over the older model in all aspects, despite being priced the same! This is my favourite e-scooter yet!</p>
<p>Here's what is looks like, locked up at the Gautrain bike rack:</p>
<p><img src="../images/escooter/mudslinger2_4.jpg" width="220px"></p>
<h1>Video</h1>
<p>Here's what my daily commute looks like:</p>
<p><a href="https://www.youtube.com/watch?v=IsEZbf2s62s" title="e-Scooter commute"><img alt="e-Scooter commute" src="../images/escooter/escooter_commute.jpg"></a></p>
<p>Sometimes, we just ride for the fun of it:</p>
<p><a href="https://www.youtube.com/watch?v=mk5h6Ys06xk" title="e-Scooter fun"><img alt="e-Scooter fun" src="../images/escooter/escooter_fun.jpg"></a></p>
<h1>Tips</h1>
<p>Here are some tips if you're planning to try this mode of transport:</p>
<ul>
<li><em>Wear sunglasses or safety glasses</em> to protect your eyes. I use <a href="https://www.takealot.com/bramhope-spectacle-orb-safety-glasses-clear/PLID47833006">clear polycarbonate safety glasses</a> as they are a lot cheaper and tougher than sunglasses.</li>
<li><em>Wear a cap with a peek</em> which allows you to shield your eyes from glare and possibly bird droppings.</li>
<li><em>Carry a poncho or rain coat, and a high-visibility jacket</em>. A poncho is light, small, and keeps you dry when it rains. The high-visibility jacket is a must when riding at night.</li>
<li><em>Lean back when you ride</em>. The faster you go, the more you should lean back. Try to get your weight over the rear wheel. This will greatly assist in braking and avoid you falling over forwards when braking hard or hitting sand.</li>
<li><em>Avoid using sidewalks</em>. Pedestrians aren't expecting you, and they can't hear you, so it is very likely you'll run into them, as you'll be travelling much faster than them. It is faster and safer to stay on the bicycle lanes or the shoulder lanes on the road.</li>
<li><em>Use the bicycle lanes</em> as much as possible. Since they aren't currently used much, expect many pedestrians and cars to be in your way. Going the wrong way down the cycle lane can also be extremely hazardous as pedestrians aren't expecting you and generally don't look in the direction you're coming from.</li>
<li><em>Install a bell</em> or something so that you can warn pedestrians as you approach them. My experience has been that something that sounds like a high-pitched squealing brake disc is far more effective (people jump out of the way) than something that sounds like an iPhone notification tone ('ding' - not effective at all).</li>
<li>The best way to safely pass oblivious pedestrians is to hop off the scooter, walk around them, then hop back on and ride when it is safe to do so. Unlike a bicycle, this is very easy to do on an e-scooter.</li>
<li>Don't "full throttle" up every incline. The e-scooter slows down up hills, and past a certain throttle position, will not go any faster. Infact, beyond that point, the speed controller heats up, wastes energy, and will possibly also cut out from overheating. You can extend your range by finding and sticking to this optimum throttle position.</li>
<li>Assist the e-scooter up steep inclines by gently kicking off the ground as you would on a normal kick-scooter. This means you'll go faster up hills while also extending the range of your battery.</li>
<li>e-scooters are great for travelling about 5km of fairly level and smooth terrain. Beyond this, battery life and rider comfort become an issue. For greater distances, perhaps consider an e-bike, <a href="/ebike/">like I did</a>.</li>
</ul>
<p>Follow my thoughts and experiences on my <a href="https://twitter.com/search?q=tobykurien%20%23escooter">twitter #escooter hashtag</a>.</p>Commuting with an e-bike2019-03-05T20:01:00+02:002019-03-05T20:01:00+02:00Toby Kurientag:tobykurien.com,2019-03-05:/ebike/<p>I now commute with both and e-bike and an e-scooter!</p><h1>The backstory</h1>
<p>I've been commuting with an <a href="/escooter/">e-scooter</a> for over 2 years, but there was room for improvement:</p>
<blockquote class="twitter-tweet" data-lang="en"><p lang="en" dir="ltr">An <a href="https://twitter.com/hashtag/escooter?src=hash&ref_src=twsrc%5Etfw">#escooter</a> is great for < 5km trips on fairly level terrain. Where they fail is up long hills. They slow down a lot and eat through battery. I tried scooting 8km mostly uphill in eco mode, and averaged only 16km/h (with lots of assistance).</p>— Toby Kurien (@TobyKurien) <a href="https://twitter.com/TobyKurien/status/1091701870672990208?ref_src=twsrc%5Etfw">February 2, 2019</a></blockquote>
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
<p>Basically my daily commute looked like this: I was scooting to a bus stop about 3km away from my house, then waiting for a bus, then taking the bus to the train station, then waiting for the train, then taking the train into the CBD, then unpacking the e-scooter I'd been carrying with me all the way, and riding it to the office. This worked well for the most part, except when it didn't: bus drivers on strike, bus being late due to traffic, and finally, the e-scooter eventually broke (after about 1500km of riding it), so I decided to look at another option: an e-bike. The idea being that I could ride the e-bike all the way to the train station.</p>
<blockquote class="twitter-tweet" data-conversation="none" data-lang="en"><p lang="en" dir="ltr">So, in my quest for <a href="https://twitter.com/hashtag/emobility?src=hash&ref_src=twsrc%5Etfw">#emobility</a> all the way up the 8km daily uphill route, I have purchased a commuter <a href="https://twitter.com/hashtag/ebike?src=hash&ref_src=twsrc%5Etfw">#ebike</a> - let's see how this goes! <a href="https://t.co/BEWsi6qD6S">pic.twitter.com/BEWsi6qD6S</a></p>— Toby Kurien (@TobyKurien) <a href="https://twitter.com/TobyKurien/status/1091701956370927618?ref_src=twsrc%5Etfw">February 2, 2019</a></blockquote>
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
<p>I did a lot of research, and finally decided to buy a <a href="https://www.giant-bicycles.com/us/expressway-1-2017">Giant Expressway 1</a> folding bicycle, and an e-bike kit, from <a href="http://www.relectro.co.za">Relectro</a>. This is a beautiful, light-weight, high-quality commuter bike that I really love riding. As a DIY enthusiast who's previously built my own full-sus mountain bike from parts, I was only too happy to buy the kit separately and assemble it all myself. Relectro were super helpful in helping me decide between upgrading the battery on my e-scooter, retro-fitting my mountain bike, or getting a separate e-bike. It took me a few days to get everything set up (with help from Relectro), and a few <em>weeks</em> to understand all the settings available on the LCD controller! (Don't worry, I'll break it down for you below)</p>
<h1>The new commute</h1>
<p>The big question for the new commute is: do I take the bike on the train, or what do I do when I get to the other side? To be honest I didn't know what the answer would be. I knew I'd figure it out eventually. One thing I didn't want to do: fold up the e-bike, pack it into a bag (as mandated by <a href="http://www.gautrain.co.za">gautrain</a>), carry it onto a packed train, then unpack and unfold on the other side. Once the e-bike kit was installed onto the bike, it was no longer light-weight: it now weighs around 20kg.</p>
<p>So Plan A was this: carry the lightest of my e-scooters on the e-bike, to the train station, then carry it on the train, and then use it on the other side! Here's what that looked like:</p>
<p><img src="../images/ebike/ebike_escooter.jpg" width="220px"></p>
<p>This actually worked! However, it was a bit cumbersome, and eventually I decided (after speaking to a few security guards) to trust the security at the Gautrain station, and rather just lock up my e-scooter on the other side, than carry it daily. </p>
<h1>Commuting Utopia</h1>
<p>Finally, commuting utopia! I don't have to carry anything other than my backpack on the e-bike or train, my e-bike ride is so much fun that I look forward to it daily, and my scoot to the office on the e-scooter is a quick and fun zip to the office. </p>
<p>My commute time is now so deterministic, that I can minimize my wait time for the train, and arrive at the office at anytime I choose. I can choose to take the first of the off-peak trains for comfort, space, and saving money. I also save a lot of money compared to taking the car (fuel, parking fees, etc) that my e-bike will pay itself off in about a year.</p>
<p>One of the biggest benefits is health and weight-loss. I have lost so much weight in just a month of e-biking, that I am now at BMI levels I last saw almost 10 years ago. You might wonder how that can be, if an e-bike does all the work? Well it can, but it is much more fun (and you get more range and battery life) if you put in <em>some</em> effort. It turns out that even a fairly minor amount of effort will raise your heart rate and give you the benefit of cardio, without the sweat and tiredness that follows a tough cardio routine. To put things into context, a mountain bike ride along the same route takes me 50 minutes and completely drains my energy, while on the e-bike it takes me 21 minutes and I still have energy to face the day.</p>
<h1>Technical</h1>
<p>For the geeks, here's some technical information about the e-bike and the electronics behind it:</p>
<ul>
<li>Bike: Giant Expressway 1 folding bike (weights around 12kg)</li>
<li>Battery: 36V, 10.4Ah, 10s4p 18650 cells</li>
<li>Motor: Greenpedel GP-G500 500W motor, max speed ~32km/h</li>
<li>Controller: <a href="https://duckduckgo.com/?q=kt-lcd3+ebike+controller&t=ffsb&ia=products">KT-LCD3</a> with 20A contoller, with both throttle and pedal-assist sensors.</li>
</ul>
<p>For technical details about controllers, batteries, motors (direct drive vs geared, etc.), and so on, please check out the documentation on the <a href="http://www.relectro.co.za">Relectro</a> website - it is quite comprehensive!</p>
<p>The manual for the KT-LCD3 controller is however quite cryptic, so it took me a long time to figure most of it out. For your benefit, here's what I've figured out so far and my recommendations (refer to the manual on how to access the various settings):</p>
<h2>User settings</h2>
<p>The "General Project Setting" refers to the basic user settings available:</p>
<ul>
<li>Maximum trip speed: the speed at which the power to the motor is cut off. While you can set it to any high value, there is a hard-coded power limit in the controller that kicks in at 25km/h, with a hard cut off at about 32km/h. You can go faster downhill, but with no motor assistance.</li>
<li>The rest of the settings are self-explanatory.</li>
</ul>
<h2>P Settings</h2>
<ul>
<li><strong>P1</strong>: You will need to find out how many magnets your motor has, and it's gearing ratio, from the manufacturer. In my case, gearing ratio is 1:5, and magnets is 20, so the value is 5 x 20 = 100.</li>
<li><strong>P2</strong>: The default is 0, which is a bad value! If you switch on your bike, then walk with it for at least 10 seconds, you should see a speed of around 5km/h appearing on the LCD (if not, try another value). When set to 0, the speed will only appear if you are pedalling or using throttle, which means that while you are not using the motor (coasting), no speed appears, and more importantly, the distance is not added! So the distance will always under-read. On my motor, setting this to 1 worked, i.e. there's one speed pulse per revolution of the motor.</li>
<li><strong>P3</strong>: determines how the assist gears work. If set to 0, assist gears limit speed, and if set to 1, assist gears limit power. I much prefer setting this to 1 for a smooth get-away, and also because you can control how much power each gear provides by setting C14 accordingly (see below). In speed-limit mode (P3 = 0), it applies max power when you start pedalling, and then hard-cutoff when you get to the limit speed (e.g. gear 1 around 22km/h, gear 2 around 25km/h, etc.) which is jerky and potentially dangerous.</li>
<li><strong>P4</strong>: set to 1 -> By "handlebar", they mean "throttle". P4 = 1 will stop the throttle from being active if you are not pedaling (except in special cases, see C4 below).</li>
<li><strong>P5</strong>: set to around 12 for 36V. This controls how the "bars" on the battery meter works. A low value means less "damping", i.e. how quickly it will keep going up and down as you decrease and increase motor power.</li>
</ul>
<h2>C settings</h2>
<ul>
<li><strong>C1</strong>: install the pedal sensor magnets the way the arrow on it displays. Then if it's inverted, change this from 1 to 6 or vice versa and it will work correctly.</li>
<li><strong>C3</strong>: set to 0 -> when bike is switched on, it will start with assist level 0 (for safety, think kids playing with throttle while bike is parked). I think if you set this to 8, it will remember whatever gear you were on last.</li>
<li><strong>C4</strong>: set to 1 -> determines throttle mode. With this setting (and P4 set to 1), throttle will act as "walk mode" when not pedaling, and full power when pedaling. Mode 4 is also a good one: the throttle is limited according to the assist gear.</li>
<li><strong>C9</strong>: allows you to set a pin code that you have to enter to ride the bike. I don't recommend it, because if you forget the pin code, you need to either replace the controller, or else copy settings from another controller using a special cable.</li>
<li><strong>C14</strong>: This changes the power limit level of gears 1 to 4 to weak (C14 = 1), medium (C14 = 2), or strong (C14 = 3), but only if P3 = 1.</li>
</ul>
<p>Check back later as I will keep updating this post.</p>
<p>Follow my thoughts and experiences on my <a href="https://twitter.com/search?q=tobykurien%20%23ebike">twitter #ebike hashtag</a>.</p>My work at IBM Research Lab2017-03-11T15:13:00+02:002017-03-11T15:13:00+02:00Toby Kurientag:tobykurien.com,2017-03-11:/ibm-research/<p>I was on the cover of a magazine, thanks to the work being done at IBM Research!</p><p><a href="http://africanbusinessnetwork.co.za/">African Business Network</a> magazine, Volume 3 Issue 4, featured me on the cover! You can read the issue <a href="http://africanbusinessnetwork.co.za/images/magazines/v3i4/mobile/index.html">online</a> or view <a href="/images/ibm-research/abn_article.pdf">the PDF</a> of the cover story that outlines what we currently work on at the <a href="https://www.youtube.com/watch?v=9FA2j7ei1M0">newly-launched</a> <a href="http://research.ibm.com/labs/africa/">IBM Research Lab</a> in Johannesburg.</p>
<p>I am an engineer (both software and hardware) at the lab, bringing some of the ideas into reality, with the judicious application of making and coding.</p>
<p><br clear="all"/>
Here is my IBM story so far, in tweets:</p>
<blockquote class="twitter-tweet" data-lang="en"><p lang="en" dir="ltr">Officially an IBMer at <a href="https://twitter.com/IBMResearch">@IBMResearch</a> <a href="https://twitter.com/hashtag/dreamjob?src=hash">#dreamjob</a> <a href="https://t.co/x3Vh5ZiaPn">pic.twitter.com/x3Vh5ZiaPn</a></p>— Toby Kurien (@TobyKurien) <a href="https://twitter.com/TobyKurien/status/735522313546911744">May 25, 2016</a></blockquote>
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
<blockquote class="twitter-tweet" data-lang="en"><p lang="en" dir="ltr">IBM scientist <a href="https://twitter.com/TobyKurien">@TobyKurien</a> shows off our maker space to students and start-ups <a href="https://twitter.com/hashtag/IBMResearchWITS?src=hash">#IBMResearchWITS</a> <a href="https://t.co/g3zeVs9o2d">pic.twitter.com/g3zeVs9o2d</a></p>— IBM Research (@IBMResearch) <a href="https://twitter.com/IBMResearch/status/769124825914830848">August 26, 2016</a></blockquote>
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
<blockquote class="twitter-tweet" data-lang="en"><p lang="en" dir="ltr">This is me explaining the custom RF tags we developed at <a href="https://twitter.com/IBMResearch">@IBMResearch</a> with <a href="https://twitter.com/SiGNLLabs">@SiGNLLabs</a> to tackle tubercolosis <a href="https://t.co/zZIRBagW0B">https://t.co/zZIRBagW0B</a></p>— Toby Kurien (@TobyKurien) <a href="https://twitter.com/TobyKurien/status/771747802456158208">September 2, 2016</a></blockquote>
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
<blockquote class="twitter-tweet" data-lang="en"><p lang="en" dir="ltr">How <a href="https://twitter.com/TobyKurien">@TobyKurien</a>, a "maker" in our South Africa lab is tagging <a href="https://twitter.com/hashtag/tuberculosis?src=hash">#tuberculosis</a> <a href="https://t.co/36tDND4apx">https://t.co/36tDND4apx</a> <a href="https://twitter.com/hashtag/ibmresearch?src=hash">#ibmresearch</a> <a href="https://t.co/QWbwFBBz0c">pic.twitter.com/QWbwFBBz0c</a></p>— IBM Research (@IBMResearch) <a href="https://twitter.com/IBMResearch/status/785931147087708160">October 11, 2016</a></blockquote>
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
<blockquote class="twitter-tweet" data-lang="en"><p lang="en" dir="ltr">WOW, Great story. Check out who is on the cover <a href="https://twitter.com/TobyKurien">@TobyKurien</a>! Great photos of <a href="https://twitter.com/solo_assefa">@solo_assefa</a> and <a href="https://twitter.com/gsiwo">@gsiwo</a>. Game changing research in <a href="https://twitter.com/hashtag/Africa?src=hash">#Africa</a> <a href="https://t.co/Bdup2QnegG">https://t.co/Bdup2QnegG</a></p>— IBM Research (@IBMResearch) <a href="https://twitter.com/IBMResearch/status/802170828989329408">November 25, 2016</a></blockquote>
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
<blockquote class="twitter-tweet" data-lang="en"><p lang="en" dir="ltr">The bracelet that catches a killer: Could wearable tech track TB in South Africa? <a href="https://t.co/havy1tHRVZ">https://t.co/havy1tHRVZ</a> <a href="https://t.co/rPbxrpTQWw">pic.twitter.com/rPbxrpTQWw</a></p>— IBM Research (@IBMResearch) <a href="https://twitter.com/IBMResearch/status/824714761765953537">January 26, 2017</a></blockquote>
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
<blockquote class="twitter-tweet" data-lang="en"><p lang="en" dir="ltr"><a href="https://twitter.com/hashtag/IBMers?src=hash">#IBMers</a> have developed an app to drive the leap to universal electrification in Africa. Itās all solar. <a href="https://twitter.com/TobyKurien">@TobyKurien</a> <a href="https://t.co/x3SEJ7hPmB">https://t.co/x3SEJ7hPmB</a></p>— IBM Research (@IBMResearch) <a href="https://twitter.com/IBMResearch/status/824331589584883712">January 25, 2017</a></blockquote>
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
<blockquote class="twitter-tweet" data-lang="en"><p lang="en" dir="ltr">Our lab <a href="https://twitter.com/hashtag/tjbot?src=hash">#tjbot</a> can now listen, process, and respond to human speech using Watson's speech APIs and Conversation API <a href="https://twitter.com/hashtag/IBMResearchWits?src=hash">#IBMResearchWits</a> <a href="https://t.co/rQIgz7NUa0">pic.twitter.com/rQIgz7NUa0</a></p>— Toby Kurien (@TobyKurien) <a href="https://twitter.com/TobyKurien/status/806793760080216065">December 8, 2016</a></blockquote>
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
<blockquote class="twitter-tweet"><p lang="en" dir="ltr">Demo'd the self-driving RC car <a href="https://twitter.com/IBMResearch?ref_src=twsrc%5Etfw">@IBMResearch</a> for <a href="https://twitter.com/hashtag/machinelearning?src=hash&ref_src=twsrc%5Etfw">#machinelearning</a> incl skewed dataset - track has too few right turns! <a href="https://twitter.com/hashtag/ibmreseachwits?src=hash&ref_src=twsrc%5Etfw">#ibmreseachwits</a> <a href="https://t.co/sPjN8fFgt1">pic.twitter.com/sPjN8fFgt1</a></p>— Toby Kurien (@TobyKurien) <a href="https://twitter.com/TobyKurien/status/871712372020432896?ref_src=twsrc%5Etfw">June 5, 2017</a></blockquote>
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
<blockquote class="twitter-tweet"><p lang="en" dir="ltr">Make a talking robot with <a href="https://twitter.com/TobyKurien?ref_src=twsrc%5Etfw">@TobyKurien</a> <a href="https://twitter.com/hashtag/fakugesi?src=hash&ref_src=twsrc%5Etfw">#fakugesi</a> workshop! If you didn't get a space. Join us at the <a href="https://twitter.com/hashtag/MarketHack?src=hash&ref_src=twsrc%5Etfw">#MarketHack</a> 9 Sep 10-4pm <a href="https://twitter.com/staysouthpoint?ref_src=twsrc%5Etfw">@staysouthpoint</a> <a href="https://t.co/8TFAzNMvz5">pic.twitter.com/8TFAzNMvz5</a></p>— Fak'ugesi Festival (@fakugesi) <a href="https://twitter.com/fakugesi/status/906060957125890048?ref_src=twsrc%5Etfw">September 8, 2017</a></blockquote>
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
<blockquote class="twitter-tweet"><p lang="en" dir="ltr">The <a href="https://twitter.com/IBMResearch?ref_src=twsrc%5Etfw">@IBMResearch</a> EmpowerSolar app has been released! Use it to design a solar solution for your home or small business: <a href="https://t.co/BzWMVKoxAE">https://t.co/BzWMVKoxAE</a> <a href="https://twitter.com/hashtag/empowersolar4africa?src=hash&ref_src=twsrc%5Etfw">#empowersolar4africa</a></p>— Toby Kurien (@TobyKurien) <a href="https://twitter.com/TobyKurien/status/937387924072656896?ref_src=twsrc%5Etfw">December 3, 2017</a></blockquote>
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
<blockquote class="twitter-tweet"><p lang="en" dir="ltr">So today we <a href="https://twitter.com/IBMResearch?ref_src=twsrc%5Etfw">@IBMResearch</a> went out to <a href="https://twitter.com/ASESouthAfrica?ref_src=twsrc%5Etfw">@ASESouthAfrica</a> to try that Bluetooth keyboard on student phones. Turns out:<br><br>- Works on all the phones we tried<br>- Kids had no idea this was a thing<br>- They love it!<br><br>Can't afford laptops for each child? Buy bluetooth keyboards instead! <a href="https://t.co/zHabeTRhpG">pic.twitter.com/zHabeTRhpG</a></p>— Toby Kurien (@TobyKurien) <a href="https://twitter.com/TobyKurien/status/1022471435309260800?ref_src=twsrc%5Etfw">July 26, 2018</a></blockquote>
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
<blockquote class="twitter-tweet"><p lang="en" dir="ltr">Our work <a href="https://twitter.com/IBMResearch?ref_src=twsrc%5Etfw">@ibmresearch</a> on peer-assisted language learning will be presented at Learning@Scale 2019! <a href="https://t.co/DXXXQDFUAn">https://t.co/DXXXQDFUAn</a></p>— Toby Kurien (@TobyKurien) <a href="https://twitter.com/TobyKurien/status/1131583869050871809?ref_src=twsrc%5Etfw">May 23, 2019</a></blockquote>
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
<blockquote class="twitter-tweet"><p lang="en" dir="ltr">Excited to reveal something <a href="https://twitter.com/richardyoung00?ref_src=twsrc%5Etfw">@richardyoung00</a> and I have cooked up at <a href="https://twitter.com/IBMResearch?ref_src=twsrc%5Etfw">@IBMResearch</a><br><br>Browser Functions: A new <a href="https://twitter.com/hashtag/serverless?src=hash&ref_src=twsrc%5Etfw">#serverless</a> platform using Web Browser execution engines<a href="https://t.co/aCsb01wSrA">https://t.co/aCsb01wSrA</a></p>— Toby Kurien (@TobyKurien) <a href="https://twitter.com/TobyKurien/status/1203971865015914496?ref_src=twsrc%5Etfw">December 9, 2019</a></blockquote>
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
<blockquote class="twitter-tweet"><p lang="en" dir="ltr">This what my team has been working on for the past few months <a href="https://twitter.com/IBMResearch?ref_src=twsrc%5Etfw">@IBMResearch</a> in partnership with <a href="https://twitter.com/WitsUniversity?ref_src=twsrc%5Etfw">@WitsUniversity</a> <a href="https://twitter.com/hashtag/Covid19SA?src=hash&ref_src=twsrc%5Etfw">#Covid19SA</a> <a href="https://t.co/bo7VjVAica">https://t.co/bo7VjVAica</a></p>— Toby Kurien (@TobyKurien) <a href="https://twitter.com/TobyKurien/status/1276486406563651584?ref_src=twsrc%5Etfw">June 26, 2020</a></blockquote>
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
<blockquote class="twitter-tweet"><p lang="en" dir="ltr">šæš¦Researchers at the <a href="https://twitter.com/WitsUniversity?ref_src=twsrc%5Etfw">@WitsUniversity</a> have teamed with scientists at IBM, <a href="https://twitter.com/UPTuks?ref_src=twsrc%5Etfw">@UPTuks</a> and <a href="https://twitter.com/GCR_Observatory?ref_src=twsrc%5Etfw">@GCR_Observatory</a> in <a href="https://twitter.com/hashtag/Gauteng?src=hash&ref_src=twsrc%5Etfw">#Gauteng</a> to build a dashboard for tracking Covid-19 at the provincial level to prevent the spread of the virus via <a href="https://twitter.com/qzafrica?ref_src=twsrc%5Etfw">@qzafrica</a> <a href="https://twitter.com/bbrowdie?ref_src=twsrc%5Etfw">@bbrowdie</a> <a href="https://twitter.com/TobyKurien?ref_src=twsrc%5Etfw">@TobyKurien</a> <a href="https://t.co/0J0urOVitd">https://t.co/0J0urOVitd</a></p>— IBM Research (@IBMResearch) <a href="https://twitter.com/IBMResearch/status/1278978225092296704?ref_src=twsrc%5Etfw">July 3, 2020</a></blockquote>
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
<p>Follow the <a href="https://twitter.com/search?f=tweets&q=%40tobykurien%20ibmresearch&src=typd">latest tweets</a> relating to my work at IBM Research for more.</p>Mobile app development is too hard2013-05-28T11:15:00+02:002013-05-28T11:15:00+02:00Toby Kurientag:tobykurien.com,2013-05-28:/mobile-app-development-is-too-hard/<p>I've come to realise that mobile app development is too difficult for beginner programmers, but it can be made simpler.</p><p>I've come to realise that mobile app development is too difficult for
beginner programmers (by which I mean programmers with little software
development experience, e.g. university students). This is true for most
of the various SDK's I've tried (Android, iOS, Windows Phone 8). The
reason it's difficult is because these new developers have to learn a
lot of hard things just to get a basic app up. As an example, to fetch
data from the internet and display it, they typically need to know:
Views and controls, app lifecycle, design patterns and development
patterns (like MVC, MVVM, etc.), multi-threading (with access to UI only
on the UI thread), memory management (in a restricted environment), data
usage management (caching, etc.), networking (with battery
considerations), and so on. That's just the programming skills, as they
also need to learn UI skills like interaction patterns, navigation
patterns, native controls and skinning them, creating responsive layouts
for various orientations and screen-sizes, etc. They can't ease into
this knowledge, they need to absorb all of it before they can develop
even the most basic app, if it is to be published on an app store. No
wonder everyone wants to use PhoneGap or other HTML5 solution - there's
a lot less complexity there. </p>
<p>I've been thinking about a possible solution to this problem. I want
junior developers to be able to get common stuff done easily, and then
ease into learning all of the advanced techniques as they progress. I
like the <a href="http://doc.qt.digia.com/4.7/qdeclarativeintroduction.html">Qt/QML</a> framework: it shields you from C++ for the simple
stuff by allowing you to declaratively build a UI, instantiate
components to do the hard work, then string it all together with some
JavaScript. It has great ways of extracting your own code into
components, and the ability to use C++ to create components for the
intensive/low-level stuff. This is like the Unix philosophy: create tons
of little utility programs that each do one thing well, then string them
together using some script (like BASH) to do useful complex things. </p>
<p>I thought about how I could bring this component-based approach to
Android, and so I came up with a prototype (warning: demo-only, not a
practical framework) to test my ideas: <a href="http://github.com/tobykurien/ScriptDroid">ScriptDroid</a>. ScriptDroid is
simply a scripting environment inside Android that can call various
components (written in Java). The components can do complex things (such
as an asynchronous web request), but hide the complexity with simple
method calls and callbacks. Before diving into what I've done there, I'd
like to talk about my thinking behind it: </p>
<p><strong>Core principles</strong> </p>
<ul>
<li><strong>Simplify</strong> Android development, don't dumb-it-down.
<a href="http://appinventor.mit.edu/">AppInventor</a> (or even<a href="http://phonegap.com/">PhoneGap</a>) for example, dumbs-down the
development experience, meaning you are limited in what you can
develop using it. While PhoneGap does allow native extensions, the
programmer would have to make the huge leap from HTML to full-on
native development, which is a big barrier.</li>
<li><strong>Abstract away complexity</strong> until such time as the programmer is
ready to explore it, e.g. multi-threading. Multi-threading is hard,
even for seasoned developers. The component-based approach makes
this possible.</li>
<li><strong>Reduce syntax burden</strong> - for a junior developer, leaving out
closing braces or semi-colons, or building up SQL query strings in a
language without string templating, can be daunting! They shouldn't
have to waste tons of time on this. Ideally, <a href="http://www.ruby-lang.org/">Ruby</a> would be the
language they develop in, because it has the loosest syntax in any
dynamic language I've tried, making it very beginner-friendly. I've
used <a href="http://www.beanshell.org/">BeanShell</a> script for my demo instead, as it was easy to get
working in Android, lightweight, and provides some nice hooks into
Java. I'd also like to try using <a href="http://www.eclipse.org/xtend/">Xtend</a> at some point.</li>
<li><strong>Reduce/eliminate boilerplate code</strong> as beginners find it hard to
read past it. <a href="http://developer.android.com/reference/android/os/AsyncTask.html">Take a look</a>, for instance, at the boilerplate code
for multi-threading on Android using an AsyncTask. It may be just a
few lines, but to a beginner it's very confusing with all those
generics and different execution scopes.</li>
<li><strong>Allow messy code</strong>, and let programmers learn to refactor and use
design patterns in an evolutionary way. HTML/CSS/JavaScript allows
extremely messy code, but programmers learn to separate things out
and re-use code as they get more experienced.</li>
<li><strong>Quick turn-around</strong> between code change and execution. Ideally,
I'd have implemented a <a href="http://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop">REPL</a> (like <a href="http://www.rubymotion.com/">RubyMotion</a> does, for
example), perhaps using a TCP/IP socket connection to the app
forwarded over <a href="http://developer.android.com/tools/help/adb.html">ADB</a>.Ā </li>
</ul>
<p><strong>Implementation</strong> </p>
<p>I simply embedded BeanShell script into Android and wrote two components
to demonstrate the idea: </p>
<ul>
<li><strong>Alert</strong> - for Toasts and AlertDialogs (although I haven't
implemented the dialogs yet).</li>
<li><strong>HttpRequest</strong> - to make an asynchronous web request and return the
results.</li>
</ul>
<p><strong>The Demo app</strong> </p>
<p>The demo app is extremely simple (to demonstrate the unnecessary
complexity of standard code). It fetches a quote from <a href="http://www.iheartquotes.com/"><em>www.iheartquotes.com</em></a>
and displays it. That's it. The <em>MainActivity</em> class sets up the scripting
environment (this stuff will obviously get extracted into a library
project) and finds and calls <em>index.js</em> (which is not technically
JavaScript, it's BeanShell, but they are very close). In <em>index.js</em>, the
layout is loaded into the Activity and then the components are used to
fetch the data and display a <em>Toast</em>. So apart from the UI layout (which
is standard Android fare), this is all the code needed:</span> </p>
<div class="highlight"><pre><span></span><code><span class="w"> </span><span class="nx">onHttpLoaded</span><span class="p">(</span><span class="nx">data</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w"> </span><span class="nx">Alert</span><span class="p">.</span><span class="nx">toast</span><span class="p">(</span><span class="s2">"got data"</span><span class="p">);</span><span class="w"></span>
<span class="w"> </span><span class="nx">activity</span><span class="p">.</span><span class="nx">findViewById</span><span class="p">(</span><span class="nx">id</span><span class="p">.</span><span class="nx">main_text</span><span class="p">).</span><span class="nx">setText</span><span class="p">(</span><span class="nx">data</span><span class="p">);</span><span class="w"></span>
<span class="w"> </span><span class="p">}</span><span class="w"></span>
<span class="w"> </span><span class="nx">activity</span><span class="p">.</span><span class="nx">setContentView</span><span class="p">(</span><span class="nx">layout</span><span class="p">.</span><span class="nx">activity_main</span><span class="p">);</span><span class="w"></span>
<span class="w"> </span><span class="nx">http</span><span class="p">.</span><span class="nx">fetch</span><span class="p">(</span><span class="s2">"http://www.iheartquotes.com/api/v1/random"</span><span class="p">,</span><span class="w"> </span><span class="k">this</span><span class="p">);</span><span class="w"></span>
</code></pre></div>
<p>Notice that BeanShell does some <a href="http://www.beanshell.org/manual/interfaces.html#%27this%27_references_as_Interface_Types">magic with interfaces</a> to allow
passing a function from the script to the Java component, and I've
injected some Java stuff into the scripting environment for some
syntactic sugar (e.g. the <em>id</em> and <em>layout</em> objects). The programmer did
not need to worry about multi-threading issues and code was kept to a
minimum to get the job done (apart from error-handling which was omitted
for brevity). The <em>HttpRequest</em> component did all the schlep work. </p>
<p>Of course, this app could have been done as simply in Java (without the
scripting language) with maybe just a few more lines of code, if it
called the same components. The idea of using the scripting language is
to reduce syntax burden and boilerplate code (which will become problems
as this app is developed further). </p>
<p><strong>Incomplete</strong> </p>
<p>Unfortunately I didn't reduce much syntax burden as BeanShell needs
semi-colons and curly braces everywhere, but more complex code would be
simpler than Java due to the loose typing. Xtend would reduce the syntax
burden more, still remain strictly typed and provide tooling support, so
I may pursue that at some point. This brings up the main problem with
ScriptDroid: no tooling support (code completion,Ā compile-time syntax
checking, etc.). Another problem is that errors in the script are not
properly handled and displayed. I also didn't tackle the quick turn
around problem, but that can be accomplished by moving the scripts into
a read/write folder where it can be edited while the app is running, and
also by implementing a REPL interface. </p>
<p>As I said, this is just a demo of the ideas, not a practical framework. </p>
<p><strong>More components</strong> </p>
<p>This system gets more useful as you add more components and features,
for example: </p>
<ul>
<li><strong>HttpRequest</strong>: implement caching, check for large response size
and force a stream if so, implement GZip, and so on.</li>
<li><strong>Alert</strong>: also add prompts and confirmations (like you get in a web
browser, but using <em>AlertDialog</em>)</li>
<li><strong>Timer</strong>: auto-execute a callback at certain intervals or install
<em>Alarms</em> using the <em>AlarmManager</em></li>
<li><strong>Database</strong>: create and manage a sqlite db (perhaps
<a href="http://en.wikipedia.org/wiki/Active_record_pattern">ActiveRecord</a>-style), provide cursors to data queries. Setting up
and querying databases is quite a menial, labour-intensive process.</li>
<li><strong>ListAdapter</strong>: make loading data into a <em>ListView</em> easy. Should
have properties to enable section headers, and maybe lazy-loading
callbacks to separate the intensive view rendering from the
non-intensive rendering, so that scrolling is always smooth (a hard
problem with multiple solutions).</li>
</ul>
<p>Those are just some basic examples, but they are examples of common
functionality that can be major stumbling blocks for beginner
developers. One unintended benefit of the component approach is that the
components can abstract higher-level problems by communicating their
needs to a component manager. An example would be that components could
register their intended memory usage, so that the component manager can
reply with how much temporary memory may be available (e.g. for caching
images), based on usage by other components, the device specs and heap
space available. Another consequence is that the components are
re-usable in Java/Xtend as well, making coding an app much easier once a
suite of components are developed. </p>
<p><strong>What about the UI?</strong> </p>
<p>I've left the UI code as standard Android XML-based layouts. I could
implement a pre-processor that would allow embedding scripts into the
layouts, but I think the standard Android layout XML is pretty simple
already (apart from XML's syntax burden). This is the fun bit for a
beginner to learn, anyway. </p>
<p><strong>Wrap up</strong> </p>
<p>In summary, I was inspired by the component-based approach (among other
things) of Qt/QML. I believe that using a scripting language together
with components can make the life of junior developers much easier,
while allowing them to learn the advanced programming skills as they
gain more experience. Most senior developers work this way: building
reusable components/classes/libraries and then stringing them together,
but they are not slowed down by the syntax burden or boilerplate code
like junior developers are. </p>
<p>I should also just mention the <a href="http://jimulabs.com/">Jimu</a> project, which uses a
component-based approach to building an app, although it does things
differently by generating standard Java code for the components used,
thus resulting in an editable app.</p>Cloud services for freelancers2011-08-31T13:57:00+02:002011-08-31T13:57:00+02:00Toby Kurientag:tobykurien.com,2011-08-31:/cloud-services-for-freelancers/<p>I thought I'd run through the important online services I use, in case it will be of benefit to other freelancers.</p><p>As a freelance developer in South Africa for about 2 years, I've signed
on for a few online services that make my business life a whole lot
easier. My business runs in the cloud! </p>
<p>I thought I'd run through the important online services I use, in case
it will be of benefit to other freelancers. Note that many of these
services aren't South African, and there may even be local alternatives,
but these are the ones I found that work really well for me without
costing me much (if anything). </p>
<p><strong>GMail, Google Calendar</strong> </p>
<p>Won't dwell on these as they are well known, but these are the primary
tools I use. The fact that they intergrate well with my Android phone
makes them more useful that I can convey, e.g. I get a meeting request
via email, I accept, my phone reminds me of the meeting, I click to
navigate to the addess using Google Navigation and I get to my meeting
on time. </p>
<p><em>Price:</em> free<br>
<em>Site:</em> <a href="http://gmail.com/">http://gmail.com</a>, <a href="http://calendar.google.com/">http://calendar.google.com</a> </p>
<p><strong>Toodledo</strong> </p>
<p>I subscribe to <a href="http://www.davidco.com/">David Allen's</a> productivity methodology called
<a href="http://en.wikipedia.org/wiki/Getting_Things_Done">Getting Things Done</a> (GTD), and if you don't, you *really* should.
Toodledo is a site that you can use to track all the things you need to
do (organised by when they need to get done and in what context, e.g.
home, work, errands, etc.) Reading David Allen's book will help you make
the most of it (or <a href="http://www.toodledo.com/info/gtd.php">read their guide</a>). There are plenty of apps that
will integrate with the site to allow you to quickly capture todo's from
your phone or tablet, etc. I've linked this with my Google Calendar so
that I get reminders on todo's that have a deadline. </p>
<p><em>Price:</em> free (Pro version available, but not needed)<br>
<em>Site:</em> <a href="http://toodledo.com/">http://toodledo.com</a> </p>
<p><strong>Evernote</strong> </p>
<p>This post was typed out on Evernote on my phone, at a coffee shop. BTW,
I used a bluetooth keyboard, I'm not mad! Evernote is a free site that
let's you capture notes such as blog posts, ideas, meeting notes, etc.
These can be captured offline and then sync'd to the site when you get
online again (which happens automatically). There are apps available for
all platforms, and Evernote apps usually set the benchmark of what an
app can be on each platform. I resisted Evernote for the longest time,
believing that Toodledo and local text files are usually enough, but
once I started using it, I immediately saw the benefit and ease-of-use. </p>
<p><em>Price:</em> free (with premium version available)<br>
<em>Site:</em> <a href="http://evernote.com/">http://evernote.com</a> </p>
<p><strong>Dropbox</strong> </p>
<p>Files that clients send via email are safely stored away on Google's
servers. However, files you create, for example signed agreements,
invoices, etc. need to be backed up offsite. The important consideration
is that if your laptop is stolen or your house burns down, you still
have a copy of your important documents somewhere. For this, Dropbox is
perfect (far better than e-mailing yourself a copy of the file). It is
also incredibly easy to use - once installed, just copy files into the
Dropbox folder on your machine, and everything is automatically backed
up and versioned. This is another one of those services that is far more
impressive in use, than in theory. It is also a fantastic collaboration
tool, as folders can be shared with other users (something I use a lot).
I only use it for documents, so the free 2gb of space will last me a
long time. I back up large media files to local drives or DVD. </p>
<p><em>Price:</em> free for 2gb, pay for more<br>
<em>Site:</em> <a href="http://dropbox.com/">http://dropbox.com</a> </p>
<p><strong>ProjectLocker</strong> </p>
<p>If your work involves programming or producing small digital content
like books, copy writing, graphics design, etc. then you should be using
a source code version control system, like Subversion or Git. This is
like a versioned backup of your source material, but is much more
powerful. For example, it can let teams work on the same project in a
coordinated way. This is very different to Dropbox, as it is used for
source code control (with things like line-by-line difference viewing,
checkin/checkout, branching and tagging, etc). I use ProjectLocker as my
cloud-hosted version control system. This also protects me against
laptop theft or hard drive crash, as the latest version (or very nearly
the latest version) of my code will be just one checkout away.
ProjectLocker also integrates to other services and provides a wiki,
time line of your project (who changed what lines of which files
today?), bug tracking, etc. </p>
<p><em>Price:</em> free for 500mb<br>
<em>Site:</em> <a href="http://projectlocker.com/">http://projectlocker.com</a> </p>
<p><strong>Basecamp</strong> </p>
<p>Basecamp is a well-known and well-loved cloud service for simple project
management. I use it to let clients provide trackable feedback on their
project, exchange files relating to the project, and manage project
milestones. While ProjectLocker provides a bug tracking system, it is
too complicated for clients to use. Basecamp is dead simple and easy to
use. Just create a todo list, type in the tasks, assign it to whoever,
and comment or tick them off as appropriate. </p>
<p><em>Price:</em> free for 1 project (so I get the clients to sign up and invite
me ;)<br>
<em>Site:</em> <a href="http://basecamphq.com/">http://basecamphq.com</a> </p>
<p><strong>PayPal</strong> </p>
<p>In order to make payments possible for overseas clients, and to pay for
some of the services I subscribe to, I use PayPal. If you have an FNB
account, you can bring the money into the country. Links to your credit
card. </p>
<p><em>Price:</em> around 3.4% per transaction<br>
<em>Site:</em> <a href="http://paypal.com/">http://paypal.com</a> </p>
<p><strong>Freshbooks</strong> </p>
<p>I used to use OpenOffice to generate invoices from manually entered
timesheet entries in a text file, which were then saved to Dropbox. As I
started dealing with more clients, and invoiced more often, this quickly
became a chore. I wasn't sure that paying for a timesheet and invoicing
system would add much value, as I would still have to capture my
timesheet, and generating an invoice didn't take a lot of time. After
trying out Freshbooks, I was convinced and immediately paid upfront for
a year. Apart from a simple and easy-to-use interface, it also tracks
when clients view the invoice, integrates with PayPal, shows you unpaid
invoices, allows clients to query invoices, allows you to generate
recurring invoices, etc. I love it, and my clients love it. </p>
<p><em>Price:</em> free for 3 active clients, premium options available<br>
<em>Site:</em> <a href="http://freshbooks.com/">http://freshbooks.com</a> </p>
<p><strong>Lessfuss</strong> </p>
<p>I believe an important part of the freelancer life is to outsource as
much as possible. You should not get bogged down with admin work and
other chores like getting stuff fixed around the house. Unfortunately it
is not feasible to hire a personal assistant full-time, but luckily
there's a great South African startup that will sort out any of your
desk-based tasks for a mere R300 per month. Need to cancel your Telkom
line or query your ADSL downtime? Need to find the nearest place to
renew your car licence? Need to get quotes to fix your car? Need to
arrange a birthday party? These guys will do it for you. </p>
<p><em>Price:</em> R300 per month for 10 tasks, other options available<br>
<em>Site:</em> <a href="http://www.lessfuss.co.za/">http://www.lessfuss.co.za</a> </p>
<p><strong>MyVirtualWorker</strong> </p>
<p>I even outsource some of the more mundane aspects of my work, such as
setting up Wordpress sites or doing SEO work, or even some coding. For
all this, I use a company from India called MyVirtualWorker. Their rates
are good and their terms are flexible. I haven't shopped around though,
and there are plenty of other outsourcing options in India, Russia,
China, etc. </p>
<p><em>Price:</em> varies on type of task, but very reasonable.<br>
<em>Site:</em> <a href="http://www.myvirtualworker.com/">http://www.myvirtualworker.com</a> </p>
<p>The above sites are pretty integral to my freelance business. I also use
<a href="http://skype.com/">Skype</a> where possible to communicate with clients, <a href="http://hostexcellence.com/">HostExcellence</a>
for hosting, <a href="http://docs.google.com/">Google Docs</a> for document sharing, and <a href="http://adwords.google.com/">Google
AdWords</a> to advertise my/clients services. Sites like <a href="http://instapaper.com/">Instapaper</a>,
<a href="http://plus.google.com/">Google Plus</a>, <a href="http://www.linkedin.com/">LinkedIn</a>, and <a href="http://twitter.com/">Twitter</a> are also handy for
research and marketing. </p>
<p>While I haven't always hunted around for the best options, I love using
the above-mentioned services and they make my life as a freelancer
stress-free and secure. If you are a freelancer, what other services do
you use, and which freelancer directories do you list yourself in?</p>Android apps for newbies2011-06-02T20:06:00+02:002011-06-02T20:06:00+02:00Toby Kurientag:tobykurien.com,2011-06-02:/android-apps-for-newbies/<p>Here is a list of some of my favourite apps that should give newbies a fresh perspective on the capabilities of their new device.</p><p>I see a lot of people with new Android devices who simply play games on
their shiny new devices, without knowing the power they wield in the
palm of their hands. So here is a list of some of my favourite apps that
should give newbies a fresh perspective on the capabilities of their new
device. </p>
<p>Here we go: </p>
<ul>
<li>Zinio - Local and international magazines, great interface, cheap mags.
This has replaced printed mags for me. </li>
<li>MySubs - local magazines from mysubs.co.za </li>
<li>PressReader - latest newspapers from around the world. Interface as good
as Zinio </li>
<li>Star chart - planetarium, better than Google Sky map. </li>
<li>Tweetdeck - facebook and twitter in one, with easy posting, url
shortning, image uploading, etc. </li>
<li>Pulse - news reader app, beautiful interface </li>
<li>Kobo - nice book reader, like Kindle. Better interface for discovering
and browsing new books </li>
<li>Imdb - movies and tv series guide </li>
<li>Xbmc remote - control your XBMC media PC from your phone, see calls and
messages on your TV which will pause for you, etc. </li>
<li>Opera - fast and responsive web browser </li>
<li>Skype - audio chat </li>
<li>Qik - video chat </li>
<li>Layar - augmented reality browser, see info about stuff around you </li>
<li>Angry birds - most addictive game </li>
<li>Evernote - best note-taking app for meetings and such<br>
Compass, Spirit level, Metal detector - turn your device into a useful
tool </li>
<li>SA Events - my app for upcoming events in SA </li>
<li>Adobe reader - best pdf reader </li>
<li>Launcher pro - best homescreen replacement </li>
<li>Google docs - take a photo of a document and it scans it into a word
doc </li>
<li>Thinkfree Office - one of many office suites </li>
<li>Fireflies live wallpaper - one of the best looking live wallpapers </li>
<li>Zedge - tons of ringtones and wallpapers </li>
<li>Sound hound - tells you what song is playing </li>
<li>Tune-in radio - listen to radio stations around the world,.including
local ones </li>
</ul>
<p>The above are just a small sample of what is available. Try them all
out, even if their function doesn't really interest you, as you will
still be amazed by the experience of it. </p>
<p>There are lots more apps, so try out the featured apps in the Market.
Enjoy your new device!</p>The cumulative effect2009-10-14T20:05:00+02:002009-10-14T20:05:00+02:00Toby Kurientag:tobykurien.com,2009-10-14:/the-cumulative-effect/<p>This is my post for Blog Action Day 2009 regarding the topic of climate change</p><p><em>Small actions and choices have the power to destroy or save the planet</em></p>
<p>This is my post for <a href="http://www.blogactionday.org">Blog Action Day</a> 2009 regarding the topic of climate change.
When I think of climate change, I think of energy utilisation and waste
production, especially in my own household, as this is my direct
contribution to climate change. As a thought experiment, I mutiplied
this by the approximate amount of people on this planet that live
similar or better lifestyles, and the sudden realisation of our effect
on this planet had me reaching for the floor to pick up my jaw and
return it to it's rightful position. Consumerism, you see, has seen such
rampant growth lately that small actions by many individuals has
resulted in large-scale damage to our environment.Ā </p>
<p>I call this the cumulative effect, and while it is obvious to many, the
real problem is that these small actions by themselves seem perfectly
acceptable and reasonable. Take for instance garbage. Ā I average about 2
black bin bags full of garbage a week. If that can be taken as an
average for say 15 million households across South Africa, that's 30
million bags of garbage a week! What happens to all that garbage, and
how much energy is used to move it around? What happens to 120 million
bags of garbage every month? What's the total for the world? It's
staggering!</p>
<p>Recently, I've been reading a book called <a href="http://www.shantaram.com/">Shantaram</a> by Gregory David
Roberts. One particular conversation stood out for me. To paraphrase the
book, one character defines evil in a novel way: by observing the world
and the universe, and it's evolution from the big bang to what we have
today, we can state that the universe is growing in complexity. In this
way, it is heading towards a state we might think of as the Ultimate
Complexity. Anything that hinders this progress towards this Ultimate
Complexity could be considered evil. So the way to judge an act as evil
or not, is to ask: if <em>everyone</em> did this action, would it help move
us towards the Ultimate Complexity, or hinder it? If the latter, then
the action is evil. So, for instance, killing is evil, as we would end
up wiping each other and all life out. What I like about this definition
of evil, is that it applies the cumulative effect without ambiguity and
answers the question: is what I am doing evil or not?</p>
<p>Ask this question in your daily life. Is leaving a light on that doesn't
need to be on evil? Is using a heater in a room when there is warm
sunshine outside evil? Is buying packaged fruit when there is perfectly
fresh unpackaged fruit available evil? Yes, yes, yes! The small actions
that you do, or the choices that you make that even in the smallest way
has a negative impact on our environment (whether directly or
indirectly), are infact evil, because everyone else is making the same
choices and performing the same actions. It is no longer alright to
worry only about what comes into your life, and then stop worrying once
it leaves - you need to concern yourself with how it got to you in the
first place, and what happens to it once it leaves. The companies that
bring the stuff to you, or take it away, do not necessarily concern
themselves with the effect they have on the environment.</p>
<p>One of the truths that come from applying the cumulative effect is that
you realise that you are either saving the planet, or destroying it. You
cannot be neutral. It is the unfortunate truth that living the
consumerist lifestyle means you are helping to destroy the planet. Even
the food we eat is helping to destroy the planet. Meat consumption, for
instance, has lead to large-scale farming to such an extent that even
the methane gas emissions from the animals are having an effect on our
climate. Let alone the way those animals are treated.</p>
<p>While I applaud the efforts of those who have <a href="http://www.thoughtleader.co.za/burningpaper/2009/10/12/the-evil-of-meat/">forsaken meat for the
cause</a>, I believe in a more phased approach. For instance, have one
vegetarian meal a day to reduce consumption of meat. The nice thing
about the cumulative effect is that it can be made to work for the
planet. If we all reduced our average garbage output to one bin bag or
less per week, then we may well be reducing the country's average
garbage output by 60 million bags per month. If we all replaced one
100watt light blub with a 11watt CFL blub, we'd be saving over 8000MWh
(mega-watt hours) of electricity consumption (based on 6 hours a day
usage for 15 million households). That is a LOT of energy that we don't
need to be leeching off our planet. How many 50watt downlights (yes,
those innocent looking 12V lifestyle items) do you have in your house?
Evil.</p>
<p>In a way, I was quite glad about the positive side-effects of the global
recession, load shedding,Ā and the electricity price hikes. People have
started to take interest in energy consumption, as it now directly
affects their pockets. I still believe that electricity is too cheap: I
worked out that to leave my pool pump on for 3 hours a day, every day,
only costs me R30 per month at the current rates. That's too little to
bother anyone. In 3 years' time, that will cost around R90, if Eskom
have their way. That might be enough to switch off a few 50watt
downlights!</p>
<p>Ultimately, I believe that it needs to start making business sense to
save this planet, in order for the planet to survive. Maybe this means
heavy taxes for companies contributing to climate change, or maybe it
means a lifestyle attitude change to create high demand for companies
producing environmentally friendly technologies (like efficient solar
panels). Perhaps we could even on-sell excess capacity from our own
solar projects back into the grid (like in some countries) to help us to
make a living out of Ā saving this planet. It all starts with everyone
being aware of the fact that ignorance is not an excuse, that a
1000watts is a lot of power to be using, that every item thrown into the
garbage bin is an item contributing to the demise of this planet. Then,
maybe, there will come a time when consumerism and the cumulative effect
will actually help save this planet, instead of helping to destroy it.
Till then, we need causes like Blog Action Day to beat the reality into
everyone's minds until it is glaringly obvious.</p>Misnumbers2009-03-29T10:37:00+02:002009-03-29T10:37:00+02:00Toby Kurientag:tobykurien.com,2009-03-29:/misnumbers/<p>Kind of like a misnomer, but with numbers.</p><p><em>Kind of like a misnomer, but with numbers.</em> </p>
<p>There are a bunch of numbers that people base decisions on (primarily
purchasing decisions) that are misleading. Marketing people love these
numbers, and engineers hate them, because they fool people into spending
more money than they ought to. I call these numbers misleading numbers,
or <em>misnumbers</em>.</p>
<p>My favourite misnumber is that of audio power ratings. You will see
a hifi orĀ amplifier rated at 80 watts per channel, another at 100W per
channel, and yet a third for 120W per channel. There is usually at least
a few thousand rand difference between them. Which should you buy, if
you can afford all of them? The sales and marketing guy will tell you
the 120W, but the engineer knows better. Much better. Without going into
any technical detail, the difference in sound volume between them
(assuming the same efficiency speakers) is almost imperceptible! The
reason for this is that it takes double the power to get the sound to be
"one notch" louder, and ten times the power to make it twice as loud.
And whatĀ about those tiny computer speakers rated at 1000W? Complete
marketing bull manure! The engineer looks for RMS rating, and knows that
speaker efficiency is more important than amplifier power output rating.
The engineer is a good friend to have, when shopping for tech!</p>
<p>What about car performance rating? Almost every car enthusiast I know
bases their entire opinion of a car based purely on one number: how many
kilowatts of power the engine puts out. In practise, I know that this
number is highly overrated, and almost completely irrelevant on it's
own. As an example, a <a href="http://wikicars.org/en/Toyota_ZZ_engine">Lotus Elise/Exige uses a Toyota RunX RSi
engine</a>, but significantly outperforms it. The reason is mainly
becauseĀ of it's lighter weight, but also because of it's better
aerodynamics and suspension. My 17 year old <a href="http://200sx.za.net/">Nissan 200SX</a> with "only"
127kW can keep up with, if not outperform many of the "hot hatches" with
significantly more power on a track or a drag strip because of a
combination of several factors including weight, aerodynamics, engine
power delivery, power distribution to the wheels, suspension, etc.</p>
<p>Another favourite car performance misnumber is top speed - practically,
it is insignificant once it gets over 200km/h as even on many race
tracks it's difficult to hit the top speed. The 0 to 100km/h time (or
quarter mile time) is also a misnumber in that removes handling from the
equation (a modified Uno beating a Ferrarri on a drag strip is not
uncommon), but of all the automotive misnumbers, this is the least evil
of them all. What does the engineer recommend for measuring car
performance? A combination of 0 to 100km/h time and a lap time around a
standard short track (like the <a href="http://www.bbc.co.uk/topgear/show/powerlaps.shtml">Top Gear Test Track</a>).Ā </p>
<p>What is more important though, is that the performance differential out
in the real world on a real road is almost negligible, because of speed
limits, traffic, driver ability, driver sensibility, etc. If a modified
sports car capable of producing 200kW opened full throttle in front of a
similar unmodified 130kW car which responded in kind, the car in front
would pull away at a rate significantly slower than what you would
expect. Infact, for all practical purposes, up to the speed limit, any
car with sufficient performance (e.g. a hot hatch or better) would be as
fast as any other car on the road (including super cars).Ā My advice is
to forget trying to be faster than someone else - you are wasting your
money. Instead focus on getting the most enjoyment out of your purchase.
If the performance of the car you like puts a smile on your face when
you test drive it, then that is all you need to know - forget the
misnumbers! </p>
<p>I could go on and on about other misnumbers. I could talk about
resolution, contrast ratio and response time of LCD TV's, gigabyte
rating of MP3 players, or one of my other favourites - megahertz rating
of computer processor chips. However, I want to touch on the greatest
misnumber of them all - price, or more specifically, money! </p>
<p>Try this quick thought experiment: imagine a time when you had no idea
how much houses cost, but you know you need to buy one. If you were
asked how much you would pay for a 3 bedroom house in The Reeds in
Centurion, what would you answer? R10,000? R100,000? R10? What if it was
an auction with no reserve and no starting bid? What would your maximum
bid be? No idea? So you do some research: look at the local classifieds,
speak to estate agents, etc. Then you get an idea of what houses cost in
different sizes and in different areas. At this point you have been
conditioned into accepting the value of houses (as set by who? Estate
agents? The market? The builders?) You then find something you can
afford, negotiate a little, and buy. You have accepted the misnumber
they call price. Why is this a misnumber? The idea that a house can have
the same value to all people is rediculous - a family of four will value
a bigger house more than a retired couple. "Fine", you say, "let the
retired couple buy elsewhere!". Well, let's extend the thought
experiment a little - imagine that money was taken out of the equation
and everyone worked on a barter system. Your circumstances changed and
you now have a bigger family and you want to move closer to work and
schools. Similarily, a couple near the CBD have retired and want to move
out into quieter, safer suburbs. So the two parties decide to swop
houses, because they both value the other's property more than their
own. Having taken money out of the equeation, the misnumber is gone, and
both parties win. </p>
<p>It gets worse though. What money is doing is getting people to trade
objects (or services) for anĀ intermediate trading object (currency),
then trade that into another object (or service). That would not be so
bad, except that theĀ intermediate trading objectĀ changes it's intrinsic
value over time as well! Just how bad the monetary system is, is a topic
for another blog post, but I'd like to mention <a href="http://www.blogger.com/www.zeitgeistmovie.com">Zeitgeist The Movie</a>
(and it's Addendum) as must-watch free movies, and there are some good
online resources for learning about the monetary system, such as this
<a href="http://www.chrismartenson.com/crashcourse">crash course</a></p>
<p>Recognising misnumbers is a truly empowering experience, as it fights
that consumerism urge that is programmed into us from the day we are
born. It helps to have technical knowledge in order to recognise some of
these misnumbers, but in these days a Google search can be just as
empowering.</p>Changed my routine, changed my life2009-03-12T20:51:00+02:002009-03-12T20:51:00+02:00Toby Kurientag:tobykurien.com,2009-03-12:/changed-my-routine-changed-my-life/<p>It's amazing what far-reaching implications a subtle change in my routine can have on my life...</p><p><em>It's amazing what far-reaching implications a subtle change in my routine can have on my life...</em></p>
<p>I'm a routine-oriented guy. Any of my friends will attest to that. I
like to have a set time for everything that needs to happen on a daily
basis, such as meals, commuting to and from work, gym, shower, etc. I'm
a follower of <a href="http://zenhabits.net">Zen Habits</a> and the like, which encourages a routine to
simplify life. Lately though, I've found that my routine has taken a
toll on me, so I've decided to change it... </p>
<p>The thinking behind my previous routine was that I needed to avoid
traffic. This meant getting up early in the morning (5h30), so that I
could be at the office by around 6h15. I could then work my 8 hours and
have a bit of web surfing time, leave the office at 15h00, get home by
15h30, and have most of the afternoon and evening for personal time
(which includes gymming at home). Even this was tweaked over time as
traffic patterns changed - I initially left home at about 6h45, and left
the office at 16h00. Having found a good balance between commuting time,
work hours, and personal time, I happily adopted this routine for the
last 5 years. </p>
<p>Recently I realised that, despite the healthy amount of personal time in
the work day, I felt like I had very little of what I like to call
Personal Productivity Time (PPT). This is time I can use to do tasks
that usually require me to be alone or have low SAF (Spouse Acceptance
Factor), for example: read a book, practise guitar, play some heavy
metal loudly on my hifi, meditate, etc. Having spent most of my single
years living alone and hence having an abundance of PPT, changing to a
routine that had almost no PPT was a pretty big problem for me, causing
me stress that spilled through into my marriage. </p>
<p>Another big problem was that this routine is very inflexible - the times
are fixed and cannot be changed, unless I fancied sitting in my car
pumping the clutch pedal for an hour and a half non-stop. I *had* to
leave work at 15h00, even if production servers were falling over. I
*had* to be in bed by 21h30 or else getting up at 5h30 would be a
problem. I *had* to leave home by 6h00 for fear of another marathon
clutch-pumping session. My life was ruled by the clock. </p>
<p>It took me a really long time to realise this, but it was time for a
change - something I am thankfully not resistant to. I found the
solution in a simple yet profound change to my routine: work a later
shift. Amazingly enough, the solution was found quite by accident: one
day I got up a bit later and decided that I'd like to get up later every
day. In order to facilitate traffic avoidance, I decided to get to work
much later, and leave work much later. I hadn't considered this option
before, due to it's low SAF, but since it became necessary for mental
and marital health, SAF was vastly improved. </p>
<p>The consequences are quite unexpected. Suddenly I am far more flexible
with time. If I get to work late because of traffic, I just work a bit
later. If a meeting runs late, no problem - I have to wait for peak
traffic to end anyway before I can go home. I have some PPT in the
morning since I have to wait till after peak traffic to leave home. This
also gives me a few hours of PPT after work, albeit not at home. This is
a good thing, as it forces me to discover new things to do (such as
joining a gym), and allows me to do things that I don't need to be at
home for, such as writing this blog at Mugg & Bean over a bottomless
coffee. So I still sleep for 8 hours, work for 8 hours, mostly avoid
traffic, and yet I have a lot more PPT! </p>
<p>There are downsides to this, of course. Most obviously, I have less time
at home, and less time with the wife (although this time is now better
spent). I don't get to cook with my wife as I'm not home at that time. I
also end up getting stuck in bad traffic more often than previously, as
traffic is highly unpredictable and varies a lot on a daily basis.
Luckily, <a href="http://mtnloaded.mtn.co.za/dsb/LoadedWEB/Level2.do?cid=11674&gid=3793268">MTN's JamCams</a> help with monitoring traffic on the highways,
and I can always throw in an early shift like before when I feel the
need. </p>
<p>Change is often good, and sometimes it's worth just trying something
different when you feel that things are boring, routine, or frustrating.
Even the smallest of changes can have the biggest impact on your life. I
am sure my new routine won't keep me happy forever, so the best I can do
is to recognise when it stops working, and then try something different.
For now though, I am enjoying the freedom from the shackles of the clock
that I have endured for too long!</p>Be safe in your home2008-12-11T20:31:00+02:002008-12-11T20:31:00+02:00Toby Kurientag:tobykurien.com,2008-12-11:/be-safe-in-your-home/<p>There maybe some things to cheer about in the [latest crime statistics][], but it's not all good news, sadly.</p><p><em>There maybe some things to cheer about in the <a href="http://www.iol.co.za/index.php?from=rss_News&set_id=1&click_id=79&art_id=vn20080701054703285C176973">latest crime statistics</a>, but it's not all good news, sadly.</em></p>
<p>While most of the statistics show a slight downward trend, a few
worrying stats remain. These are mainly the ATM bombings, house
robberies, car hijacking, and business robberies. Residential robbery is
of particular interest. To quote the <a href="http://www.iol.co.za/index.php?from=rss_News&set_id=1&click_id=79&art_id=vn20080701054703285C176973">article from iol.co.za</a>: </p>
<blockquote>
<p>According to the report, residential
robberies are usually committed between 9pm and 3am (55 percent) by
"small groups of unemployed youths" who, in almost 90 percent of
cases, surprise their victims inside their homes. </p>
</blockquote>
<p>This surprises me. How is it that so often, the victims literally wake
up to a gun against their heads? </p>
<p>A few years ago, my house was burgled. Thankfully, it happened at a time
when nobody was home. However, the incident got me thinking carefully
about how the security at home was implemented. A year before, when I
moved in, I had installed an electric fence and a house alarm system
that was linked to a security company. None of my neighbours had an
electric fence. I figured that if my house was harder to break into than
my neighbours, I would be ok. </p>
<p>The problem with the system, however, was that it was focussed on
detecting a break-in. It worked, mind you. After the gate was removed
from it's rails and opened, the security gate on the front door was
ripped open with a crowbar, and then the front door soon succumbed to
the relentless tool-wielding thieves. Aha! The ever-alert security
system sprang into action! It immediately responded to the "open" front
door by beeping for 30 seconds. This, you see, gives the home owners a
chance to run into the bedroom and enter the code to disarm the alarm
system. However, since these weren't the home owners, it gave them
plenty of time to spot the audio visual equipment and start relieving
the house of their burden. The alarm system was not to be defeated
though. Oh no, having not received it's disarming code, it promptly set
the alarm off, thus alerting the armed response company. They, in turn,
called the house to verify the validity of the alarm. After a few tries,
they concluded that this may infact be an actual robbery in progress, so
they called one of their patrol cars to go have a look-see. By the time
that happened, the enriched burglars were probably having a shot of
scotch at their local watering hole. </p>
<p>This is the reality of many of the house alarm systems that get
installed these days. They have a special offer, where you sign up for a
security company contract and in return they install a free alarm system
with something like 2 sensors and a keypad. While this may lower your
insurance premium somewhat, it does nothing for you and your family's
personal safety. All it does, is make it easier for the guy pointing the
gun at your head to wake you up. </p>
<p>I decided that I needed an alarm system that isn't focussed only on
detecting break-ins, but rather one that is focussed on alerting me to
any suspicious activity around my house, while I am in the house. Being
the crafty engineer that I am, I immediately began designing a circuit
that would hook up to the front gate, so that if the gate was opened
forcefully, it would immediately set off the panic alarm. I built the
circuit and it worked. I immediately felt safer, because I knew that
even if I had not activated the alarm, any messing about with my front
gate would set off the panic alarm, which in theory would yield a better
response from the security company. However, several thunderstorms and
two blown circuits later, I gave up. I decided to extend the idea using
off-the-shelf parts. </p>
<p>The security system I designed is based on the simple idea that I want
to be alerted of any suspicious activity in or around my property <span
style="font-weight: bold;">before</span> any break-in happens. I don't
need to know once my house has been broken into - that's already too
late. This is very much what a dog would accomplish, except that I don't
have a dog, and dogs also tend to bark too often to be taken seriously
all the time. I went to some local security shops (<a href="http://www.yalesecuritypoint.co.za/">Yale Security
Point</a> and <a href="http://www.communica.co.za/">Communica</a>) to find out what sensors they sell, how much
they cost, and how they work. Since I'm technically minded, I decided to
design the security system myself, although any security consultant
would be able to do the same. Firstly, I had to do away with those
ridiculous 30 second timeouts on arming and disarming. This meant
getting <span style="font-weight: bold;">secure</span> remote controls
to activate/deactivate the alarm. I then used outside motion detectors
at various points around the house, especially all the entrances and
windows. I drew out a map of my house and property and then mapped out
the "footprints" of the sensors (from their specifications sheets) to
ensure adequate coverage. This would ensure that if anyone scaled the
perimeter fence, they would set off chimes or the alarm if they so much
as approach any part of the house. I took it once step further - if
anyone even walks across my driveway <span
style="font-weight: bold;">outside</span> my property, that will set off
a loud chime inside the house alerting me to the fact. This way, I would
know if anyone was tampering with my gate while I am in the house. It
takes a bit of discipline to get out of bed at 2am and check what's
happening in your driveway when the chimes go off, but the beauty of the
system is that there are no false alarms. If I hear a chime, I give it
due respect. </p>
<p>Does this make me less inclined to become a crime statistic? I think it
helps. There's no guaranteed way to thwart crime, but I sure as hell
feel a lot safer. It helps that I have a house on a cul-de-sac and a
yard that's easily covered by motion sensors. If I was living in a
second-floor apartment, things might be different, but my approach would
be the same - add beams or motion sensors with chimes and cctv cameras
so that I know what's going on around me. </p>
<p>How much does this all cost? Since I designed the system myself and
sourced parts from the suppliers of the security shops, I got a good
deal - roughly about R7000. The outside motion sensors don't come cheap
- they are about R2000 each for the good ones (VX40). It's a worthwhile
investment, in my opinion. </p>
<p>My next step is to know about a crime being planned, while it is being
planned. While I'm at work, there may be people (for example the
building contractors next door) checking out my house. By linking my
driveway motion sensor to a night-vision camera, I can get a picture of
whoever ventures near my gate anytime, day or night. If I then have this
MMS'd to my cellphone, it will be pretty much like I'm sitting at my
front door 24 hours a day, watching what's going on!</p>Two projectors are more than the sum of its parts2008-12-11T20:31:00+02:002008-12-11T20:31:00+02:00Toby Kurientag:tobykurien.com,2008-12-11:/two-projectors-are-more-than-the-sum-of-its-parts/<p>If you're thinking of buying a projector, think of buying two rather. Here's why...</p><p><em>If you're thinking of buying a projector, think of buying two rather. Here's why...</em></p>
<p>Long before Plasma and LCD TVs were around, the biggest picture I could
have hoped for would have been from a 74cm TV. Pthewy. That kind of
middling size didnĀ“t catch my interest, never mind the fact that the
monstrosity of a TV would have taken up way too much space in my
single-room bachelor pad. So I bought a projector instead. </p>
<p>Lying on your back in your bed, and watching a movie on your ceiling is
one of those rare pleasures you can only get from a portable projector.
Bliss. Especially when all you have is a bedroom. But that kind of
spoils you. Now you want a bigger picture... </p>
<p>Eventually, what IĀ“d secretly hoped for happened. The lamp blew. When
faced with such a calamity, there is only ONE solution - buy a bigger,
better projector! And so I did. The new projector had a zoom lens and
much higher resolution, allowing me to view movies on a 2 meter wide
screen (actually a white wall). ThatĀ“s plenty of inches for any man,
right? Wrong! </p>
<p>There are several problems with such a setup. For one, you need to max
out the zoom and distance of projector from the wall to get a big enough
picture. This leads to the second problem: you need a big enough room.
Not a heck of a lot you can do about that. DonĀ“t get me wrong though, I
am eternally grateful to the significant other for letting me have this
room in the first place! </p>
<p>In your relentless pursuit of more inches, you will have diminished the
picture quality in several ways: the larger picture leads to less
densely packed pixels, meaning you could actually see individual pixels;
the brightness of the picture diminishes with the larger size; and the
colours wash out a bit more. And the final kick in the nuts: for all
that screen space, your widescreen movie only uses a fraction of it,
cropping the rest with black bars. Colour me disappointed. </p>
<p><img alt="Giant screen" src="/images/two-projectors-are-more-than-the-sum-of-its-parts/dsc00003.png"></p>
<p>Enter a second projector. Granted, the setup can be very tricky,
especially if you donĀ“t already have a home theater PC with a decent
enough graphics card. Luckily, I have just such a thing. Okay, it didnĀ“t
magically appear in my home theater, I custom build it. IĀ“m handy like
that. After plugging in the second projector, and then spanning the
desktop across both, I was able to play videos across both projectors.
Luckily for me, both my projectors were of the same make, so I had one
remote to rule them all. The trickiest part is to line up the projectors
perfectly so that the picture is seamless. You also have to adjust
colour and brightness on both projectors to get an even picture. It can
be a bit unnerving to see Nicole Kidman take on a green hue as she walks
across the screen. I didn't bother with these though - another problem
for another time. </p>
<p>The difference that the second projector makes is huge, so to speak. In
order to accommodate the gargantuan picture, you have to reduce the size
of each screen by reducing the zoom on both projectors. Suddenly, those
pixels get all warm and cozy. So much so that you can't distinguish
individual pixels anymore, and all you see is glorious high resolution
and sharp picture. The brightness also goes up, and the colour
saturation improves. Since the screens are side-by-side, you have a nice
wide screen that suits those 16:9 aspect ratios beautifully. No more
black bars. Instead of the entire picture frame taking up a portion of
one screen, it now spans two full screens. That's about a four-fold
increase in effective picture size! The picture is now so big and wide
that you have to pan your eyes and head around to take it all in.
Orgasmic. </p>
<p><img alt="Giant screen 2" src="/images/two-projectors-are-more-than-the-sum-of-its-parts/dsc00008.png"></p>
<p>So surely, this is it? The ultimate home theater? Well, sadly, no.
Technology progresses. Suddenly, that 480p DVD quality picture doesn't
look quite so high res anymore. You can see more craters on the moon
with your naked eye than on a close-up of Lawrence Fishburne's face.
Enough to give you sleepless nights. Enter high definition video. And
full high definition projectors with 1080p widescreen output. Now my
setup looks inadequate. Projectors have become cheap though. I can now
get a DLP projector for the price of the replacement bulb on my old
projector. So I could get 3 projectors of 1024x768 resolution, and stand
them on their side next to each other, giving me an output of 2304x1024.
Not quite 1080p, but maybe this 3 projector setup can restore my manhood
while I wait for prices on the full HD projectors to drop? </p>Switched on to digital TV2008-11-06T09:17:00+02:002008-11-06T09:17:00+02:00Toby Kurientag:tobykurien.com,2008-11-06:/switched-on-to-digital-tv/<p>South Africa officially switched on its digital TV signal on November 1 2008</p><p>South Africa officially switched on its digital TV signal on November 1
2008. Wanting to be a part of the revolution, I acquired a digital TV
tuner so that I could play...</p>
<p>I decided to get a digital TV tuner for my <a href="http://en.wikipedia.org/wiki/Home_theater_PC">media center PC</a>, the reasoning being that instead of the poor quality recordings I was getting off my analogue TV tuner, I wanted to be able to record TV programmes in perfect quality a-la PVR. I ended up buying a <a href="http://www.kworld-global.com/main/prod_in.aspx?mnuid=1248&modid=6&pcid=56&ifid=17&prodid=69">KWorld PlusTV hybrid USB stick</a>, which is capable of both analogue and digital TV reception. As an added bonus, this stick works on laptops and even the XP-based EeePC. On switch-on day, I plugged in my USB stick at around 10am, expecting a quick Next -> Next -> Next -> Ok type of installation, followed by glorious digital pictures on my HD-ready LCD TV. At around 2pm, after losing about 10 clumps of hair and over 100Mb off my internet cap, I had a semblance of picture slideshowing in a little <a href="http://www.videolan.org/vlc/">VLC</a> window ā¦</p>
<p>But more about that later; letās focus on what this is all about. Firstly, digital TV is not HDTV (although it can be used to broadcast HDTV). Itās more like DStv, except that instead of broadcasting a programme via satellite, the programme is broadcast using the terrestrial transmitters that are used for analogue broadcasts such as the SABC channels and etv. Most HDTV sets and all HD-ready sets sold do not have a tuner that is capable of receiving the digital TV broadcast (in much the same way as they donāt have a built-in satellite receiver capable of receiving DStv), which is why you would need to buy a digital TV set-top box. One of the fundamental benefits of digital TV over analogue is that they can fit several channels in the same spectrum that a normal analogue station occupies. It is also possible to broadcast interactive content similar to DStv, such as the EPG (electronic programme guide). South Africa has standardised on the <a href="http://en.wikipedia.org/wiki/DVB-T">DVB-T</a> standard, which is used in most places around the world, with the notable exception of the United States of America ā they use the <a href="http://en.wikipedia.org/wiki/ATSC_Standards">ATSC</a> standard (very much like PAL vs NTSC). South Africa has chosen to use <a href="http://en.wikipedia.org/wiki/MPEG-4_AVC">H.264/MPEG4 AVC</a> codec to encode the video, and that was the source of my problems.</p>
<p>So, back to my foray into digital TV. It seems most DVB-T receivers assume MPEG-2 encoding (as used in DVD), which is why I couldnāt get a picture from the software that came with the tuner. Not that Iām complaining terribly ā MPEG-4 offers much higher compression, meaning that we can potentially get several more channels than with MPEG-2. However, one must be careful when purchasing a set-top box or digital TV tuner and ensure that it supports H.264 decoding. In my case, neither the bundled software, nor the latest version of <a href="http://www.team-mediaportal.com/">MediaPortal</a>, nor two other DVB players I tried worked. Hence the hair-pulling. I eventually had to resort to using the latest version of VLC to play back the digital TV broadcast. However, my 1.7GHz Intel Celeron CPU could not cope with decoding the video, maxing out at 100% and dropping frames like hot potatoes.</p>
<p>Once I got it working on a beefier PC, these were my findings:</p>
<ul>
<li>In the Midrand area where I live, I can receive six TV stations and six radio stations on one frequency ā 554MHz. The TV stations are: SABC 1, SABC 2, SABC 3, etv, SABC Entertainment, and SABC News International. The radio channels are: Radio 2000, Lesedi FM, Ukhozi FM, SAFM, Umhlobo Wenene FM and Ikwekwezi FM. All stations are free-to-air.</li>
<li>I am unable to receive any signal with a bunny aerial or the external antenna that was bundled with the tuner. However, I did not need to re-orient my external TV antenna and the software showed 100% signal.</li>
<li>According to a <a href="http://mybroadband.co.za/vb/showthread.php?t=142789">thread on myadsl.co.za forums</a>, some people can pick up more channels, including MPEG-2 versions of the channels at 770MHz. Maybe I need to re-orient the external antenna to pick up the other transmissions.</li>
<li>I was unable to get any EPG data, although some people on the afore-mentioned thread were able to receive now and next information on the 770MHz channel.</li>
<li>Quality-wise, it seems high levels of compression are used, so on a large screen some encoding artifacts are visible. However, on the whole the video looks about on a par with the analogue broadcast (and DStv in standard definition). The picture is clear and undistorted with no jerkiness or ghosting. The video was decoded at 785Ć576 in 24-bit colour, on my player. That equates to standard definition TV. Audio is in stereo and about the same quality as the analogue broadcast.</li>
<li>The video is interlaced. I had to enable a deinterlacer.</li>
<li>Unlike satellite broadcasts, there was no loss of picture quality during a storm.</li>
<li>Sometimes playback will just stop abruptly, as if the transmission has ended, and I then have to restart the playback to continue watching. This may be instability in the VLC software, which tends to crash a lot during channel switching.</li>
</ul>
<p>So, should you rush out and buy a digital TV tuner? Absolutely not! For one, you will be hard pressed to find one available for purchase, let alone one that plays the H.264 video. It was fun (and at times frustrating) for me to play with digital TV and experience the start of a revolution in broadcasting, but as it stands, there is no significant advantage to getting a digital TV set-top box right now. Quality-wise, it is on a par with analogue, provided you have good analogue reception (if you donāt, you probably wonāt pick up the digital TV broadcast). Content-wise, you get two additional TV channels. Future content providers may encrypt their channels using one of several encryption schemes, so a wait-and-see approach might be better in the long run, before plonking down for a box that might not be able to access those channels.</p>
<p>Bearing in mind that this is still a trial phase of digital TV broadcasting, I am sure there will be more content, EPG, interactive services (such as the intention of the government to provide public services), and better quality broadcasts (full HD, please!) to come in future when digital set-top boxes are launched. In addition, the DVB-T standard allows the broadcast of <a href="http://en.wikipedia.org/wiki/Dvb-h">DVB-H</a> content simultaneously, which will allow people to watch digital content on their cellphones or portable media players. This is certainly a technology to get excited about and I look forward to the day when the infrastructure is in place and the content providers come to the party.</p>
<p>UPDATE: South Africa has since changed to adopt the DVB-T2 standard, so old DVB-T receivers no longer work.</p>
<p>Read original article at <a href="http://thoughtleader.co.za/tobykurien/2008/11/06/switched-on-to-digital-tv/">ThoughtLeader</a></p>Netbooks have lost the plot2008-09-25T12:18:00+02:002008-09-25T12:18:00+02:00Toby Kurientag:tobykurien.com,2008-09-25:/netbooks-have-lost-the-plot/<p>My article on TechLeader about Netbooks</p><p>First came the promise of theĀ <a href="http://laptop.org/">OLPC</a>, then came theĀ <a href="http://eeepc.asus.com/">Asus Eee PC</a>, and
life got good. Now that Pandoraās box has been opened, a hell spawn of
so-calledĀ <a href="http://gizmodo.com/tag/netbooks/">netbooks</a>Ā are flooding the market creating confusion, and
completely eroding the good work done by the original Eee PC.</p>
<p>I picked up the Asus Eee PC 2G Surf model for R2 700 from Incredible Connection. It comes with a solid state drive of 2Gb, a 7 inch LCD screen, 512Mb of RAM and an Intel Celeron processor. The idea was brilliant ā build a low-spec portable notebook capable of running a web browser and e-mail, as well as an office suite (OpenOffice.org). All this for less than the cost of a medium-range cellphone.</p>
<p>This is a good example of applying the <a href="http://en.wikipedia.org/wiki/80-20_rule">Pareto principle</a> (the 80-20 rule): about 80% of the time, most laptop/notebook users are only using 20% of the capability of the machine. So why not build a notebook that only provides that 20% of capability, at a remarkably cheaper price? Since most of our applications are web-based now (such as Google apps, Zoho, etc.), that 20%, which includes web browsing, suddenly becomes very appealing.</p>
<p>When the original Eee PC was released, the demand was high and the market quickly snapped up the little Asus machines, with Asus even claiming to be <a href="http://eeepc.asus.com/global/news101812007.htm">selling one every six seconds</a>.The rampant success of the original Eee PC spurred Asus and other manufacturers to release better versions of the Eee PC. Intel jumped onto the bandwagon and created the Intel Atom processor, specifically for these netbooks ā previously called UMPCs (ultra-mobile personal computers), MIDs (mobile internet devices), mini-notebooks, or mini-laptops. The new processor promised more power, better battery life, and lower cost. Suddenly, a whole slew of netbooks were announced from various manufacturers, all sporting the new Atom chip, and various configurations of hard drives or solid-state drives (SSDs), and a choice of operating systems.</p>
<p>So what is wrong with this picture? Well, for me, the problem starts with the price. Most of the new comers are over R4 000 in price. Well over. You can buy full blown laptops in this price range. These ānetbooksā even come with Windows XP or Vista installed, implying that they are full blown laptops, although they perform very poorly at anything more than web browsing and office applications. They donāt know whether they want to be laptops, or netbooks.</p>
<p>While there is a market for ultra-portable laptops, they have completely missed the netbook sweet spot ā a web-capable machine about the size of a paper-back novel, weighing less than 1kg, costing less than R3 000. They should have just stuck with the mini-laptop name and left the netbook name for the Asus Eee PC 2G Surf, because quite frankly, nothing else comes close to itās value for money and purpose-built nature.</p>
<p>I think the manufacturers should go back to the drawing board on their netbook product range. Start with something like the <a href="http://www.nseries.com/products/n810/#l=products,n810">Nokia N810</a> or the <a href="http://www.apple.com/ipodtouch/">Apple iPod Touch</a>, and scale that up. Hereās how I think they should do it:</p>
<ul>
<li>Use the <a href="http://www.arm.com/products/CPUs/">Arm processor</a>. It is extremely power efficient and is already used many devices such as the Nokia N810, iPod Touch and several cellphones. These devices prove itās capability for playing media and web browsing, while providing several hours of battery life, or several days if left on standby.</li>
<li>Add a lot of RAM. Memory is very cheap nowadays. About 1 gigabyte or more of RAM would be more than adequate. The Nokia N810, for example, has only 128Mb of RAM, and yet is capable of running a complete Linux-based GUI operating system, have several websites open with Flash support and play media at the same time.</li>
<li>Add solid state storage. With SSD prices falling rapidly, these can get bigger over time. However, considering that the N810 only has 256Mb of flash RAM, and still fits in a complete operating system with media and web 2.0 capability, even a 2Gb SSD would be more than adequate.</li>
<li>Add in a transflexive (sunlight-readable) LCD display with ambient light sensor. A 9 inch display with at least 1 024 x 600 resolution would be ideal here. An iPod-like resistive touch screen would be a nice-to-have.</li>
<li>Add in a keyboard, such as the one on the Eee PC 701. This is about as small as a keyboard can get without becoming completely impractical for most users.</li>
<li>Add in the hardware features of the modern mobile device. The N810 already has audio (with headphone jack and speakers), Bluetooth, GPS, and Wifi. The iPod touch features accelerometers and a 3D accelerator for smooth user interfaces. Other features to include would be gigabit Ethernet, a multi-touch capable track pad, compass, Wi-Max, and a web camera. A top-end model could even feature 3G/HSDPA with a slot for the SIM card.</li>
<li>Add expandability. This means USB ports, memory card slots (at least two), and optionally, an Express Card slot.</li>
<li>Use most of the extra space in the chassis for a decent Lithium-Ion battery pack. Due to the lack of need for active cooling of the CPU, and the fact that the ARM-based boards are very compact, there will be more room in the chassis for a large battery pack. Considering that the N810 can play back continuous video for over 20 hours if supplied with a four-cell AA battery pack, this netbook should be able to deliver days of battery life, not hours.</li>
</ul>
<p>The hardware, believe it or not, is the easy part. The hard part is the software. Luckily, there are several options to choose from:</p>
<ul>
<li>Appleās OS for the iPhone/iPod touch. Unfortunately it is a closed source and Apple wonāt be supporting it on anything but their own hardware, which is a pity, since itās a great, lightweight, stable, fast and beautiful operating system.</li>
<li>A strong contender here would be the Linux-based <a href="http://maemo.org/">Maemo</a>. It already runs on the specified hardware, is open source, has Nokiaās backing, and has an <a href="http://www.internettablettalk.com/">active community</a>. It is so lightweight that is makes <a href="http://www.canonical.com/netbooks">Ubuntu Netbook Remix</a> look like Vista. It has a Firefox 3 based web browser and some office applications.</li>
<li>Microsoft Windows Mobile. This operating system is already supported on ARM processors, and has good third party application support, including Opera browser. No real office suite other than Pocket Office or Documents to go.</li>
<li>Nokiaās Symbian OS. A very successful operating system for mobile phones that could scale up well to a netbook.</li>
<li>Googleās <a href="http://code.google.com/android/what-is-android.html">Android</a>. Although written primarily for mobile phones, it is open source and extremely capable. It also features a user interface to match that of Appleās iPod. I believe this would be the best choice of software stack for a netbook.</li>
</ul>
<p>What do we end up with, after this netbook re-think? We have a portable machine, the size of a paper-back novel, designed from the ground up to be great at browsing the web (the full web 2.0, with Flash and Java support), with an open source operating system backed by Google, full integration with Googleās applications, third party application support, a beautiful iPod-like interface that is 3D accelerated, media-playback capability, continuous battery life of over a day and a price point hopefully under R4 000. Now <em>that</em> is what I would call a netbook.</p>
<p>Read the original article at <a href="http://www.thoughtleader.co.za/tobykurien/2008/09/24/netbooks-have-lost-the-plot/">Thoughtleader</a></p>Privacy in social networks2008-08-25T17:10:00+02:002008-08-25T17:10:00+02:00Toby Kurientag:tobykurien.com,2008-08-25:/privacy-in-social-networks/<p>They are in your Facebook, mining your data...</p><p><em>They are in your Facebook, mining your data...</em> </p>
<p>The issue of privacy on social networking platforms like Facebook has been discussed at length before, and dismissed by most as merely drivel from paranoid folk. My take on the issue has always been one of neutrality ā Iām well aware of the ability for private and confidential information to get out into the public domain without your authorisation, but then again, thatās true for almost anything you put on the internet.</p>
<p>Recently, however, I decided to investigate the issue a bit further. Since I am already registered on Facebook, I decided to try writing a Facebook application in order to learn what capabilities such an application has, and to what kind of information the API gives access. The results, although not entirely surprising, were startling nonetheless. I shall summarise some of what I picked up below:</p>
<ul>
<li>By default, a Facebook application has access to all the information to which the user of that application has access. The user can, in the privacy settings, choose not to share certain information with applications that he or she doesnāt currently use. This means that, by default, all applications that anyone on your friends list has added has access to all the information that your friends can access (even if you havenāt installed the application).</li>
<li>Unless you have changed your privacy settings, when you are tagged in a photo by someone (even if you havenāt approved it yet), your photo becomes immediately accessible to all your friends. Whatās interesting is that if the creator of the album didnāt restrict access to the album (assuming that only his or her friends can see the album, a reasonable and common assumption), then your friends have access to the entire album in which you were tagged. The same is true if you comment on a photo. Similarly, wall posts and group posts are broadcast to all your friends. Thus, any applications they have installed have access to this information.</li>
</ul>
<p>None of the above is particularly surprising, but the implications can be. In one scenario, you could be posting a private picture into a restricted album, and then sharing that with your friend. Your friend finds it funny and comments. Suddenly all your friendās friends can see the photo. Whatās more, any applications installed by your friend and your friendās friends have access to this photo too. This means that any of these applications can download the photo off Facebookās server and on to their own, and add enough metadata about the photo to make it a useful data-mining effort.</p>
<p>This becomes particularly dangerous when scam or con artists are introduced into the equation. Most people trust strangers who have information that they donāt expect a complete stranger to have, such as what primary school they went to, or which clubs they used to go to when they were at university. In most cases, people are not aware that they are giving out this information (they are just joining a group, attending a reunion event or making a simple comment on a photo). By feeding you this information (āHey! Remember me? I used to go to school with you at so and so!ā), they can get your trust, even if only to get on your friends list (since you feel embarrassed not to remember this āfriendā and thus accept the friendship invitation). Once on your friends list, data mining can pick up steam. Maybe you arenāt the target, but a step along the way to the target.</p>
<p>This brings me to the crux of the problem: the reason that your privacy is more of an issue on a social network like Facebook ā rather than, say, on a personal home page where you disseminate the same information ā is that the social networking platform makes your data incredibly easy and cheap to mine. You are in effect filling in a form on the web where someone asks you to put information about your life into particular fields and tag these with useful metadata, thank you very much, sir! In an age where even your email address can generate revenue for a spammer (and the data miner that sold your email address to the spammer), you can easily begin to see why this is a bad thing.</p>
<p>It gets worse. Heard of OpenSocial? This is an effort to standardise the format in which data is captured and used on social networks so that applications can be written that will work on multiple social networks! So now the effort of mining data from multiple social networks becomes as easy as mining one. Add OpenId to the mix, and you now even have a unique identifier on the internet linking all of your mined data, never mind what would happen if your OpenID password was cracked. We are also entering the era of mashups on the internet, to the point where anyone can point and click to create aggregated feeds using something like Yahoo Pipes. Itās now possible, for (an extreme paranoia) example, to create a ārevenge pipeā, which, when clicked on, will publish your name, email address, Facebook and Flickr photos, possibly your physical address with a Google map and satellite photos (by whois-ing your domain name for example), into an extremist website for people testing out their bomb-making skills!</p>
<p>Am I suggesting that everyone stop using social networks? Not at all! I still use Facebook myself (mainly to see photos that my friends or their friends post). Itās a great meeting point on the web ā a place where other people can find you. An address, if you will, in prime real estate on the web. Donāt give that up (in fact, sign up to all of them)! Use it to allow people to find you, contact you and see more information about you that is not uploaded to the platform. By that, I mean, put links from your social network to other platforms where you store your public information, such as a photo-sharing site, a video-sharing site, your homepage, your blog and so forth. That data cannot easily be mined from a social networking application.</p>
<p>One caveat here is that popular media-sharing sites (like Flickr) are still susceptible to data mining and spam bots (especially if they have public APIs for mashups), since it is worth their while for the data miners to write the necessary code to mine those sites. Treat these sites as victims of their own success ā switch to a less frequently used site. This way, we even solve the problem of one site/company owning most of the data on the internet.</p>
<p>Read the original article on <a href="http://www.thoughtleader.co.za/tobykurien/2008/08/24/privacy-on-social-networks/">ThoughtLeader</a></p>I am a productivity hobbyist and life hacker2008-08-10T08:28:00+02:002008-08-10T08:28:00+02:00Toby Kurientag:tobykurien.com,2008-08-10:/i-am-a-productivity-hobbyist-and-life-hacker/<p>Joining the new geek sub-culture of getting things done and getting the most out of life</p><p><em>Joining the new geek sub-culture of getting things done and getting the most out of life</em></p>
<p>For the longest time, I've been obsessed with being productive in my
spare time. By productive, I mean that whatever I did in my spare time
should in some way contribute to making my life, or someone else's,
better. This meant that things like reading novels or watching movies
was unproductive. However, things like writing freeware software (like
my own IRC client), designing and building circuits (like audio
amplifiers and home automation kit), improving my guitar playing
technique, gymming, or reading self-help books (on things like finance
and meditation), was productive. There had to be some form of rolled-up
progress. If the garden needed to be tended to every week just to
maintain it in it's current state, then that was not productive.
However, if I could paint one wall of the house once a month, then
eventually my whole house would be repainted. Highly productive! </p>
<p>Over time I discovered that this obsession left me with a lot of
productive "projects" to complete. The more projects I had, the less
motivation I had to do any single one of them, because I couldn't decide
which one to focus my energy on. This resulted in me wasting away my
spare time with useless things like watching TV series or playing
computer games. </p>
<p>A few months ago, I stumbled upon the <a href="http://www.getrichslowly.org/blog/2006/11/06/getting-things-done-how-to-take-control-of-life/" rel="nofollow">GTD</a> <a href="http://en.wikipedia.org/wiki/Getting_Things_Done">phenomenon.</a> GTD is an
abbreviation for "getting things done", which is a reference to the book
<a href="http://www.davidco.com/store/catalog/Getting-Things-Done-Paperback-p-16175.php">"Getting Things Done" by David Allen</a>. I was instantly hooked as I
read about GTD, because as a geek, this appeals to my nature of hacking
things to make them work better, or in ways they weren't intended to.
Here was a book describing how to organise and focus your mind so that
you can be productive, even when you feel like you have way to much to
do, and way too little time. Even more profound was that it explained
why I always felt stressed instead of motivated, when I thought about my
projects. I went around telling everyone how busy I was and how little
time I had for anything, even when I wasn't actually doing anything
useful, simply because of the energy it took to organise my thoughts. </p>
<p>One of the first things I learned with GTD was to get things out of my
head and into some written form. They suggest a pen and pocketable
writing pad (in a form they call Hipster PDA). Imagine that! Suddenly
geeks are excited about dumping their unwieldy electronic PDA's for a
pen and piece of paper! We've known all along that despite the
uber-coolness of an electronic diary/PDA, they are pretty useless when
you need to jot down thoughts as you have them, wherever you may be. You
tell yourself to remember to enter it in your PDA when you get a chance,
then you forget, and then you feel stressed and can't figure out why.
One of the best things about GTD is that you no longer rely on yourself
or anyone else to remember anything. It gets written down, processed
into a to-do list, and the GTD process makes sure you know about it when
you need to. </p>
<p>Having a to-do list is all good an well, but completely useless and a
waste of time if it is not organised correctly and used in a process
that keeps it visible and manageable. I won't go into details here, as
it's all explained very well in the book (and there's a nice summary
<a href="http://www.getrichslowly.org/blog/2006/11/06/getting-things-done-how-to-take-control-of-life/" rel="nofollow">here</a>). I find that it is all too easy to ignore the to-do list
(especially if it has too many items in it) and go back to the
unfocussed, demotivated state, so I've made it a part of my routine,
like with gymming. It's not easy to get myself into the gym when I don't
really feel like it, but once I'm there, I enjoy it and start giving it
my best (without fail). When I get myself started on a task in my to-do
list, the satisfaction of having completed it motivates me to keep
going, and soon I'm ticking off tasks like there's no tomorrow. Now
that's rolled-up progress! </p>
<p>What works well for me is to use my cellphone to gather my thoughts,
to-do's and information. Since it has a full keyboard on it, it's easy
to enter information, and I always have it with me. If I can't type, I
do a voice recording. When I am at home, I enter that information into
my to-do list. I use <a href="http://www.toodledo.com/">toodledo.com</a> (although there are tons of other
good sites, such as <a href="http://www.rememberthemilk.com/">rememberthemilk.com</a>) to manage my to-do list, as
it is accessible from my cellphone, pocket PC, iPod touch, EeePC
netbook, or any internet-connected PC. </p>
<p>While researching GTD, I stumbled upon <a href="http://lifehacker.com/">lifehacker.com</a> and
<a href="http://zenhabits.net/">zenhabits.net.</a> I am fascinated by the various ways in which you can
hack your life to get more out of it. Lifehacker.com aggregates articles
from around the web on mostly tech tips and tricks but also some life
hacks, be it tips and tricks on using Outlook, tools to implement GTD,
or even <a href="http://lifehacker.com/399895/top-10-conversation-hacks">how to hack conversations</a> you have with people!
Zenhabits.net has amazing self-help articles on improving your life by
simplifying it. It includes topics about health, wealth, relationships,
work, etc. This site can change your life for the better, if you are
receptive to it. </p>
<p>Hacking my mind is currently one of my biggest fascinations. By applying
<a href="http://www.buddhanet.net/e-learning/5minbud.htm">Buddhist</a> <a href="http://en.wikipedia.org/wiki/Buddhist_meditation">meditation</a> techniques, it's possible to hack my mind
and change the way I feel and think! Feeling anger? A bit of
<a href="http://en.wikipedia.org/wiki/Mindfulness">mindfulness</a> and centering will sort that out. Feeling frustrated
with someone? Nothing that some <a href="http://www.buddhanet.net/metta_in.htm">loving kindness</a> meditation can't
solve. Infact, I have now changed my mind about some tasks I used to
think were unproductive: ironing my clothes, swordsmanship (yes! with a
<a href="http://en.wikipedia.org/wiki/Katana">katana sword</a>!), and washing my cars offers me a great opportunity to
meditate while still doing something useful. Chores have changed from
being unproductive and frustrating, to tasks that allow me to meditate,
do some cardio, and complete the task at hand, all in one go. </p>
<p>Hack my mind, my body, and be productive, all at the same time. Now that
is the ultimate life hack.</p>Of functionality and form factors - why I still need more than one mp3 player2008-06-10T04:42:00+02:002008-06-10T04:42:00+02:00Toby Kurientag:tobykurien.com,2008-06-10:/of-functionality-and-form-factors/<p>My recent gadget buying spree has left me with a gold mine of geeky gadgets.</p><p>My recent gadget buying spree has left me with a gold mine of geeky
gadgets. It suddenly hit me, as I made a list for insurance purposes,
that I have several devices that can serve the same purpose, but I still
use them all. This left me wondering: why do I have so many gadgets? </p>
<p>Letās step back a bit and take stock of what weāre dealing with here. Amongst other gadgets that are not relevant to this discussion, I have a Creative Zen Stone mp3 player, an MP4 player, a Kodak V610 digital camera, a Motorola Q9h smartphone, an Asus EeePC, a Nokia N800 (with a bluetooth GPS receiver and bluetooth foldout keyboard), and my most recent acquisition, an Apple iPod touch.</p>
<p>If you are familiar with these devices, the common features are pretty obvious:</p>
<ul>
<li>Play MP3s: Zen Stone, MP4 player, Q9h, EeePC, N800, iPod</li>
<li>View photos: MP4 player, Kodak, Q9h, EeePC, N800, iPod</li>
<li>Take photos: Kodak, Q9h, N800</li>
<li>Watch videos: MP4 player, Kodak, Q9h, EeePC, N800, iPod</li>
<li>Take videos: Kodak, Q9h, N800</li>
<li>View websites via WiFi: Q9h, EeePC, N800, iPod</li>
<li>View website via GPRS/HSDPA: Q9h, EeePC, N800</li>
<li>View ebooks or text files: MP4 player, Q9h, EeePC, N800, iPod</li>
<li>View/edit Office documents: Q9h, EeePC, N800 (using Google docs or similar)</li>
<li>Internet instant messaging: Q9h, EeePC, N800</li>
<li>Video/voice conference over internet: Q9h, EeePC, N800</li>
<li>GPS navigation: Q9h, N800</li>
<li>Connect to office server: Q9h, EeePC, N800</li>
</ul>
<p>Wow! By the looks of it, you should just buy an N800 and be done with it! Look at that Zen Stone ā why on earth would I need that when pretty much all other gadgets can do the same with far more fanfare? Heck, maybe even just the Q9h would be enough. Especially when we start considering form factor:</p>
<ul>
<li>Shirt pocketable: Zen Stone, MP4 player, Q9h, iPod</li>
<li>Jacket/pants pocketable: N800, Kodak</li>
<li>Fits into shoulder bag: EeePC, N800 with accessories.</li>
</ul>
<p>From my experience, Iāve made some observations about form factor:</p>
<ul>
<li>Shirt pocketable: the flatter the device, the better, meaning the device must be far broader than its depth. Anything with a depth of over 14mm becomes unwieldy. The broader the device, the better, otherwise it falls on its side in your pocket (big win for Q9h here ā even though it looks like a bulky device, it is far more pocketable than a smaller-looking device that is not broad enough). Weight wise, the device must be under 130g.</li>
<li>Jacket/pants pocketable: Again, flatter is better. Device weight should be under 300g.</li>
<li>Shoulder bag: my benchmark here is a small shoulder bag, about a third the size of a standard 15ā³ laptop bag, because this is what I use (I assure you, itās manly!). Anything bigger will not come with me to shops or other outings. The EeePC actually fails here, as itās about half the size of a standard laptop, meaning it doesnāt come with me to shops. The MacBook Air, although thin and light, fails miserably here, as it needs a standard laptop size bag.</li>
</ul>
<p>Right, so we have analysed functionality and form factor. That still doesnāt answer the question: why do I use a Zen Stone, when my Q9h can play MP3s, has expandable memory, and is shirt pocketable? Why do I still use so many gadgets? The answer to this lies in what I believe is the current trend in gadgets: general-purpose gadgets are being replaced by application-specific gadgets.</p>
<p>What do I mean by application-specific gadgets? Gadgets that do one thing, and do that thing well. Examples of such devices: digital audio players (DAPs), digital stills camera, digital video camera, digital photo frames, e-book readers, mobile internet devices (MIDs), GPS navigation devices, etc. Sure, cellphones can currently do it all (being a general-purpose gadget) but it does none of them well. In fact, cellphones are getting bad at just being cellphones!</p>
<p>And therein lies the rub.</p>
<p>Do I use my Q9h for MP3 playback, watching videos, surfing the internet, or editing office documents on the go? No. Not unless I am desperate and none of the other gadgets are available (charged). So why did I buy the Q9h? For two reasons: it has a useable qwerty keyboard for sms and very quick contact retrieval, and it has HSDPA with bluetooth, which is important for tethering my mobile internet device (the N800). Using its MP3 playback feature (for example) is a bad idea because:</p>
<ul>
<li>It flattens your battery. Now you have to choose whether you want to listen to music, or be contactable! That is to say, you can either use your cellphone as a cellphone, or as a music player, not both (in essence).</li>
<li>It makes for a horrible MP3 player. So much so that it is practically useless. You have to load up the player software. Then you have to load up the playlist. It doesnāt remember which song you were last listening to. You canāt one-touch switch to another song or playlist or skip to the next album. You canāt operate the music playback without looking at the screen (which makes it useless while driving). It doesnāt support gapless playback for songs that run into each other, or remember the sort order of songs, etc. I could go on, but you get the idea.</li>
</ul>
<p>So, the smart way to use technology seems to be to buy the best device for each application, rather than one device that does a lot of things badly (the bonus here is that the application-specific gadgets being sold today are really beautiful, well crafted, lovely to look at, and lovely to hold). For me, this means I need the following:</p>
<ul>
<li>MP3 player for the car: must not have a screen, because if it does, I cannot use it while driving. This is why I use the Zen Stone ā it is perfect for car use. You can skip songs and albums without looking at the device. You can load it with songs easily, and it plays them in the correct order. It remembers exactly where you were when you switched it off (which is necessary for audio books or long songs). It has a long battery life and is easily recharged, even with a car charger. Itās so cheap I can buy one for each car, or one for each genre of music!</li>
<li>General MP3 player, for when Iām relaxing somewhere like the garden, at a resort, or in bed. The Zen Stone will work fine here, but its storage space is limited, and I generally leave it in the car. The iPod is good here with its beautiful interface and ample storage space. However, I most often use the N800 because it can play music off my network via Wifi (or a SD memory card) while I surf the web, look at photos, or read an ebook. In addition, I can listen to the music via its (surprisingly great) built-in speakers, so that I can still hear my phone or doorbell ring.</li>
<li>Cellphone: must be shirt pocketable. A qwerty keyboard is nice-to-have for SMS and getting to a contact quickly. Long battery life is essential. Must support 3G or HSDPA as it will be used as my mobile internet connection. Any other features are irrelevant as I do not want to unnecessarily shorten its battery life.</li>
<li>Mobile internet: must be with me whenever I might need mobile internet: When Iām sitting in my garden soaking up winter sun, stopped off at a coffee shop, or waiting in a queue to renew my vehicle licence. This means it must be jacket/pants pocketable. The iPod can view websites, but is severly limited by not having bluetooth or a screen with enough resolution. Zooming in and panning around is just not a fun way to browse. The Nokia N800 wins here in spades. The one thing it does really well is mobile internet browsing. It has a full-blown Firefox 3 engine (meaning Google Docs works!), ample resolution to display most websites without sideways scrolling (800Ć480 ā same as the EeePC), extremely good wifi reception and bluetooth tethering, built-in webcam for video conferencing, speakers and flash for watching YouTube videos, etc. The fact that it runs Linux is an added bonus for a geek like me (yes, it plays Doom), as well as great community support in the form of third party software for things like iPod-like photo viewing, video playback, GPS navigation (when using the bluetooth GPS receiver), games, and tons more. Also throw in the laptop-trouncing battery life of about 5 to 7 hours. All my blogs to date have been written on my N800 using the fantastic iGo foldout keyboard that tethers via bluetooth. And the cherry on top ā it cost me about half the price of my Q9h, including the keyboard! The iPod, with its far larger development community, has also come up with great hacks (it can play Doom too!), but the lack of bluetooth and high resolution screen means it will never be as useful as my N800 (but maybe a future version might be).</li>
<li>Photo viewing: Must have big-ish screen with good resolution and be sunlight-viewable. The iPod wins here, even though the N800 has a bigger screen with better resolution, simply because it is sunlight-viewable, and has an orientation sensor so that you can rotate the display for vertically-oriented photos. Also, the iPodās touchscreen is easier to use.</li>
<li>Watching videos: all the devices need the videos to be transcoded. The N800 has the better screen and has speakers, making it the better video player, but the iPod can, if I get the cables, be connected to a TV set (for say, when I am at a resort or hotel). No definate winner here (especially when you consider Nokiaās noBounds project ā high definition video from an N800 onto an HDTV? Yes, please!). Maybe I should buy an MVix? Thereās an application-specific gadget, complete with remote control and no need to transcode videos!</li>
<li>Taking photos: Only a digital camera will do. The Kodak V610 is awesome with its pocketability, while still providing 10x optical zoom, bluetooth for transferring pics directly to my N800 (or I could just stick the SD card in), orientation sensor (making it a good picture viewer too), and big LCD screen. It takes great video clips too, and since my video taking requirements are minimal (i.e. I donāt have children), it will do perfectly.</li>
<li>Viewing ebooks: An ebook reader would be ideal here, but I find the N800 quite adequate with its high resolution screen. The downsides are that it doesnāt remember where I left off last (software problem), battery life needs to be in days not hours (although five hours is not bad at all!), and the screen is not sunlight readable.</li>
<li>Instant messaging on-the-go: both the Q9h and N800 do this task well. However, since I donāt want to kill the battery on my cellphone any faster than I need to, I prefer to use the N800.</li>
<li>Work-related server maintenance: only the N800 or EeePC would be useable here as I need SSH, VPN, VNC, and Remote Desktop access to the work servers. The limited screen resolution of the Q9h, along with the need to protect its battery life (it is my lifeline to the outside world) make it unsuitable here.</li>
<li>GPS navigation: A dedicated GPS device would be ideal here, although I admit the Q9h works well enough when using Nav4All software that I havenāt found the need to buy a GPS device. The N800 works well too, although routing is still in-the-works for South Africa (to make a long story short).</li>
</ul>
<p>And there we have it! My gadgets and why I use them. You may notice that I donāt in fact use the EeePC. Thatās because I bought it for my wife ā she uses it. I donāt need it since I have the N800. I also donāt use the MP4 player, itās been āboxedā (to borrow a term from Battlestar Galactica). Also, the iPod touch is a little unnecessary, but I had to get it because itās just so sexyā¦ Other gadgets I might consider now are:</p>
<ul>
<li>Mobile gaming: Sony PSP or Nintendo DS lite. Just for fun.</li>
<li>A digital photo frame for displaying my picture collection. And please donāt sell me a slightly more expensive one that can play MP3s too!</li>
<li>Charging solution: a solar USB charger would be nice, because most of my gadgets charge off a USB port. You know, for when Iām stuck on a deserted island or in the middle of a desert. Anywhere with at least a GPRS signalā¦ Something with a strong battery would be even better, for when Eskom shuts off our power. Like the powermonkey explorer.</li>
</ul>
<p>(Hoping my wife is reading this:) Honey, you understand the method to my madness now, donāt you?</p>
<p>Read the original article on <a href="http://www.thoughtleader.co.za/tobykurien/2008/06/09/of-functionality-and-form-factors-why-i-still-need-more-than-one-mp3-player/">ThoughtLeader</a></p>Safety In South Africa2008-04-08T05:02:00+02:002008-04-08T05:02:00+02:00Toby Kurientag:tobykurien.com,2008-04-08:/safety-in-south-africa/<p>Like "military intelligence", these are words that just don't go together. Right?</p><p><em>Like "military intelligence", these are words that just don't go together. Right?</em> </p>
<p>A few days ago, my brother got hijacked by a group of armed men, while
he was transporting three women (his staff) to their home in Belville,
Cape Town. He was parked in the driveway, waiting for the gate to close
when he was attacked. He was incredibly brave and calm throughout the
incident, and had the presence of mind to walk away from the car while
the hijackers looked for keys, wallets, cellphones, and the like. In
doing so, he drew attention away from himself, and the nervous hijackers
sped off in his car. No one was injured in the incident. </p>
<p>Phew! Lucky! That's our first thought. We have come to expect a lot
worse from these situations. Infact, my young brother-in-law was
hijacked over a year ago. He was taken on a three hour hell drive
through Joburg to Soweto (even past a police road block). He was dropped
off near a vacant veld, fully expecting to be killed. He too was
relatively calm and engaged the fuel cut-off switch as he was removed
from the car. This prevented the hijackers from starting the car (which
they spend 20 minutes trying to do) and eventually gave up and ran off
with the car radio and cellphone when they sensed that police may be
patrolling nearby. He was physically unhurt - just a few bruises. Phew!
Lucky indeed! </p>
<p>Well South Africans are sick of it! It's bad enough to be hijacked or
robbed, but all the senseless violence and killing with impunity is just
too much to handle. </p>
<p>"Nothing is being done about!"<br>
"It's just a matter of time before it happens to me!"<br>
"Everywhere I look I see violent crime" </p>
<p>As if this wasn't enough, our rand is loosing value, the petrol price is
going through the roof, interest rates are climbing, electricity is
scarce, and our next president has a case pending against him for
corruption, nevermind the shower stuff. Oh, and the one silver lining in
the cloud - that booming property market we invested in - is now also
sinking. Only one thing to do! Let's head for Australia! Hell, even the
<a href="http://www.thestar.co.za/?fSectionId=&fArticleId=vn20080405102443860C900093">disbanded scorpions are packing for Perth</a>! </p>
<p>I've been noticing this sentiment permeating the country. Tales of a
mass exodus of skilled people out of this country. To be honest, that
does sound like a wonderful proposition - to go to a place where we can
walk outside without being paranoid about our safety. It's a big step to
emigrate though, and most of us have ties here that keep us here.
Infact, dammit, we WANT to stay here, if only the crime could be
stopped! </p>
<p>So I've challenged myself to buck the trend. People WANT to believe
things are so bad in this country that they HAVE to emigrate. That
justifies their abandonment of their home country. It is as easy to read
all the violent crime stories as it is to report on them - they are
sensational! Do you actually hear the good news in amongst the bad? </p>
<p>Did you know that there are people fighting back? The <a href="http://www.blogger.com/www.eblockwatch.co.za">e-blockwatch
initiative</a>, for example. Or even better, the <a href="http://realtravel.com/johannesburg-journals-j2931883.html">Glenhazel Active
Patrol</a> in Glenhazel, that hires mercenaries from African countries
armed with AK-47's to protect their community. This is so successful
that other communities are looking to emulate it. Even the police, who
we like to think are so useless, are <a href="http://www.iol.co.za/index.php?from=rss_News&set_id=1&click_id=79&art_id=vn20080324081645225C674411">making great strides</a> in
reducing violent crime, including<a href="http://www.iol.co.za/index.php?from=rss_News&set_id=1&click_id=79&art_id=vn20080405101201867C991703">cash-in-transit heists</a>. They <a href="http://www.iol.co.za/index.php?set_id=1&click_id=3045&art_id=vn20080310061107488C148055">setup
shop across the Mozambique border</a> to catch those hijacked cars that
leave our country. They have even apprehended <a href="http://www.iol.co.za/index.php?from=rss_News&set_id=1&click_id=79&art_id=vn20080323115841846C642646">terrorists operating in
South Africa</a>, a problem we don't even realise <a href="http://www.iol.co.za/index.php?from=rss_News&set_id=1&click_id=79&art_id=nw20080407174221551C387494">we have</a>. Infact,
<a href="http://www.iol.co.za/index.php?from=rss_News&set_id=1&click_id=79&art_id=vn20080328062047611C165898">one of the safest places in the world</a> is right here in South Africa!
I kid you not! Easier to move there than Australia, don't you think? </p>
</p>Toby's pearls of wisdom2008-03-14T04:56:00+02:002008-03-14T04:56:00+02:00Toby Kurientag:tobykurien.com,2008-03-14:/tobys-pearls-of-wisdom/<p>Things I wish I knew when I was 20, but if I did, I wouldn't have cared anyway. Pity.</p><p><em>Things I wish I knew when I was 20, but if I did, I wouldn't have cared
anyway. Pity.</em> </p>
<p><span style="font-weight: bold;">Happiness is growth</span> </p>
<p>You need to grow to be happy. Grow physically, mentally, spiritually,
intellectually, socially, or in whatever other way that matters to you.
But keep growing. Improve your environment. Improve your skills. Work on
your talents. Help others grow. Read up on things you donĀ“t understand,
like politics, the middle east crisis, or how an automatic gearbox
works. Learn, explore, discover, experience. Wikipedia is a great place
to start. When you stop growing, you get bored. </p>
<p><span style="font-weight: bold;">Don't get bored</span> </p>
<p>When you are bored, your mind wanders. To dark places. That leads to
depression. Depression can kill you. Don't get bored. Grow. </p>
<p><span style="font-weight: bold;">Accept it and move on!</span> </p>
<p>When things don't go as planned, accept the situation immediately. Then
move on. The quicker you accept the situation, the better. Watch Prison
Break to understand how powerful this can be. This is what got me
through three engine rebuilds on my car, when most people would have
sold it. </p>
<p><span style="font-weight: bold;">Shape up</span> </p>
<p>It's easiest to shape up in your 20's. From 30 onwards, it's an uphill
struggle. Your metabolism slows down, leading you into a viscious cycle
of weight gain and bad eating habits. Accept it and move on. Learn how
to increase your metabolism. Learn from body builders, they are the
experts. Except without the steriods and other enhancers. Do anerobic
excercises. All it takes is 3 hours a week and some healthy eating
habits. Being in good shape boosts all aspects of your life. </p>
<p><span style="font-weight: bold;">Learn about cholesterol</span> </p>
<p>Your body produces it's own, so you can have high cholesterol even if
you don't eat any. Or vice versa. Eat cholesterol-reducing foods (good
fats). Exercise. Get checked up. </p>
<p><span style="font-weight: bold;">Build your wealth</span> </p>
<p>You <em>are</em> getting poorer. Unless you have investments that beat
inflation. Inflation is higher than you think. It's more than the bank
will give you on a savings account. Debts are also making you poorer.
You could be financially independent (i.e. Retire) by the age of 40 just
by investing R1000 per month from the age of 20 into an investment that
gives you 15% return per annum. That kind of return doubles your money
every 5 years. The stock exchange can give you that kind of return.
Invest in the stock exchange. Learn how. Start with unit trusts.</p>