<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" gd:etag="W/&quot;DkIFQXw5cCp7ImA9WhdUGU0.&quot;"><id>tag:blogger.com,1999:blog-2069754202671317458</id><updated>2011-10-06T22:35:10.228+10:00</updated><category term="linux" /><category term="education" /><category term="scala" /><category term="finance" /><category term="java" /><category term="logic" /><category term="programming" /><category term="stuff" /><category term="organisation" /><category term="r" /><category term="F#" /><category term="xmonad" /><category term="matlab" /><category term="qotd" /><category term="git" /><category term="haskell" /><category term="mac" /><category term="mathematics" /><category term="windows" /><category term="cycling" /><category term="vim" /><category term="fun" /><category term="ubuntu" /><category term="mercurial" /><category term="error" /><category term="subversion" /><category term="science" /><category term="presentations" /><title>cbrad</title><subtitle type="html">Brad Clow's blog</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://bradclow.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://bradclow.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/2069754202671317458/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Brad Clow</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>180</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/cbradblog" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="cbradblog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;A0QDQns5eCp7ImA9Wx9TFUg.&quot;"><id>tag:blogger.com,1999:blog-2069754202671317458.post-5837110073949907446</id><published>2010-11-24T10:41:00.000+10:00</published><updated>2010-11-24T10:42:53.520+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-11-24T10:42:53.520+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="mac" /><title>Divvy</title><content type="html">Continuing on from my &lt;a href="http://bradclow.blogspot.com/2010/11/optimal-layout.html"&gt;post&lt;/a&gt; about &lt;a href="http://most-advantageous.com/optimal-layout/"&gt;Optimal Layout&lt;/a&gt; I also tried out &lt;a href="http://www.mizage.com/divvy/"&gt;Divvy&lt;/a&gt; (version 1.2.3) for more efficient window management on Mac OS X. My work setup is a MacBook Pro with an external display and Spaces enabled. An important goal is to achieve keyboard only window control.&lt;br /&gt;&lt;br /&gt;Divvy is a very simple app. It essentially enables you to divide the screen up into a virtual grid and snap the current window to a region within that grid. The other major feature is the ability to assign keyboard shortcuts to particular regions, enabling you to position and size the current window to one of your predefined regions with ease. There is also an option to use the keyboard shortcuts to move the current window to another display, which I find quite useful.&lt;br /&gt;&lt;br /&gt;To tile all the windows on the screen in a particular layout requires shifting the focus to each window to position and size it. If your Divvy shortcuts correspond to where you want the windows than this whole process can be done fairly quickly, without touching the mouse/trackpad. Having said that, I would love to define a layout on the Divvy grid and with a keyboard shortcut arrange all windows on the current screen into that layout.&lt;br /&gt;&lt;br /&gt;I have Windows XP running in a Parallels VM in &lt;a href="http://kb.parallels.com/4670"&gt;Coherence&lt;/a&gt; mode and Divvy does not seem to work with the Windows windows. Some applications (such as Activity Monitor) also have restrictions on window size that Divvy can't change.&lt;br /&gt;&lt;br /&gt;Over the days I was trialling Divvy on my work MacBook Pro, I found myself missing it on the Mac at home. For USD$14 and a license that supports use on multiple Mac's, it is good value.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2069754202671317458-5837110073949907446?l=bradclow.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://bradclow.blogspot.com/feeds/5837110073949907446/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2069754202671317458&amp;postID=5837110073949907446" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2069754202671317458/posts/default/5837110073949907446?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2069754202671317458/posts/default/5837110073949907446?v=2" /><link rel="alternate" type="text/html" href="http://bradclow.blogspot.com/2010/11/divvy.html" title="Divvy" /><author><name>Brad Clow</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;CUAGR3Y_cCp7ImA9Wx9TFEU.&quot;"><id>tag:blogger.com,1999:blog-2069754202671317458.post-7655554738985202578</id><published>2010-11-23T10:35:00.000+10:00</published><updated>2010-11-23T13:42:06.848+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-11-23T13:42:06.848+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="mac" /><title>Optimal Layout</title><content type="html">Inspired by &lt;a href="http://xmonad.org/"&gt;xmonad&lt;/a&gt; on linux, I tried out &lt;a href="http://most-advantageous.com/optimal-layout/"&gt;Optimal Layout&lt;/a&gt; (version 1.1.2) for more efficient window management on Mac OS X. My work setup is a MacBook Pro with an external display and Spaces enabled. An important goal is to achieve keyboard only window control.&lt;br /&gt;&lt;br /&gt;In Optimal Layout, tiling windows in an arrangement requires&lt;br /&gt;&lt;ol&gt;&lt;li&gt;explicitly selecting the windows in the Optimal Layout UI&lt;/li&gt;&lt;br /&gt;&lt;li&gt;selecting a layout from a list&lt;/li&gt;&lt;br /&gt;&lt;li&gt;selecting the target display&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;My most common use case is to arrange windows in the current space on the display with the focus, i.e. my current context. There are too many steps for this to feel efficient.&lt;br /&gt;&lt;br /&gt;The available window layouts are predefined, including the window sizing. After arranging windows, sizing adjustments can be made using the sticky resizing feature, but this requires using the mouse.  Furthermore, should you open one more window, you have to go through the whole process again.&lt;br /&gt;&lt;br /&gt;I am disapointed with Optimal Layout and am trying out &lt;a href="http://www.mizage.com/divvy/"&gt;Divvy&lt;/a&gt;, which I will post about next.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2069754202671317458-7655554738985202578?l=bradclow.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://bradclow.blogspot.com/feeds/7655554738985202578/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2069754202671317458&amp;postID=7655554738985202578" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2069754202671317458/posts/default/7655554738985202578?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2069754202671317458/posts/default/7655554738985202578?v=2" /><link rel="alternate" type="text/html" href="http://bradclow.blogspot.com/2010/11/optimal-layout.html" title="Optimal Layout" /><author><name>Brad Clow</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>3</thr:total></entry><entry gd:etag="W/&quot;DU4NQXo6eCp7ImA9Wx5bEk8.&quot;"><id>tag:blogger.com,1999:blog-2069754202671317458.post-3898029821012596996</id><published>2010-10-28T11:02:00.001+10:00</published><updated>2010-10-28T11:06:30.410+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-10-28T11:06:30.410+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="xmonad" /><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu" /><title>Installing XMonad on Ubuntu 10.10 Maverick Meerkat</title><content type="html">I installed &lt;a href="http://ubuntu.com/"&gt;Ubuntu&lt;/a&gt; 10.10 Maverick Meerkat (in Parallels on my Mac) to try out &lt;a href="http://xmonad.org/"&gt;XMonad&lt;/a&gt;, the tiling window manager. XMonad is a candidate if I move off the Mac. I am slowly increasing my keyboard use and relying less on the mouse and XMonad is a further step in that direction.&lt;br /&gt;&lt;br /&gt;I have never installed or used Xmonad before and after too much time stuffing around with the usual linux problems, these are the steps I followed to get a simple, initial installation working on a fresh install of Ubuntu.&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Install &lt;a href="http://haskell.org/"&gt;Haskell&lt;/a&gt;, XMonad and &lt;a href="http://en.wikipedia.org/wiki/Dmenu"&gt;dmenu&lt;/a&gt;.&lt;br /&gt;&lt;pre&gt;$ sudo apt-get install haskell-platform xmonad dwm-tools&lt;/pre&gt;&lt;br /&gt;Originally, I installed Haskell and then tried to install XMonad via &lt;a href="http://haskell.org/cabal/"&gt;Cabal&lt;/a&gt;. Unfortunately the xmonad-contrib package failed to install due to dependency issues.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Set XMonad to be the window manager for Gnome.&lt;br /&gt;&lt;pre&gt;$ gconftool-2 -s /desktop/gnome/session/required_components/windowmanager xmonad --type string&lt;/pre&gt;&lt;br /&gt;Found this at &lt;a href="http://haskell.org/haskellwiki/Xmonad/Using_xmonad_in_Gnome"&gt;Xmonad/Using xmonad in Gnome&lt;/a&gt;. Don't log out or restart X now. If you do, you will find XMonad workspace 1 broken. It seems to consist of two Gnome panels tiled to fill the screen but hidden behind the desktop and any further windows you create are also hidden. The next step fixes this.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Create a simple Xmonad configuration file.&lt;br /&gt;&lt;pre&gt;$ mkdir ~/.xmonad&lt;br /&gt;$ touch ~/.xmonad/xmonad.hs&lt;/pre&gt;&lt;br /&gt;Set the contents of &lt;code&gt;xmonad.hs&lt;/code&gt; to&lt;br /&gt;&lt;pre class="brush: plain;"&gt;import XMonad&lt;br /&gt;import XMonad.Hooks.ManageDocks&lt;br /&gt;&lt;br /&gt;main = xmonad $ defaultConfig {&lt;br /&gt;        manageHook = manageDocks &lt;+&gt; manageHook defaultConfig,&lt;br /&gt;        layoutHook = avoidStruts  $  layoutHook defaultConfig&lt;br /&gt;        }&lt;/pre&gt;&lt;br /&gt;Apply the configuration.&lt;br /&gt;&lt;pre&gt;$ xmonad --recompile&lt;/pre&gt;&lt;br /&gt;This configuration was found at &lt;a href="http://haskell.org/haskellwiki/Xmonad/Config_archive/John_Goerzen's_Configuration"&gt;Xmonad/Config archive/John Goerzen's Configuration&lt;/a&gt;.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Logout and back in again. You should see a standard looking Ubuntu desktop with the menubar across the top and the normal panel along the bottom. See the &lt;a href="http://xmonad.org/tour.html"&gt;tour&lt;/a&gt; to get started with the XMonad commands.&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2069754202671317458-3898029821012596996?l=bradclow.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://bradclow.blogspot.com/feeds/3898029821012596996/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2069754202671317458&amp;postID=3898029821012596996" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2069754202671317458/posts/default/3898029821012596996?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2069754202671317458/posts/default/3898029821012596996?v=2" /><link rel="alternate" type="text/html" href="http://bradclow.blogspot.com/2010/10/installing-xmonad-on-ubuntu-1010.html" title="Installing XMonad on Ubuntu 10.10 Maverick Meerkat" /><author><name>Brad Clow</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;C0MNSX8yeSp7ImA9Wx5UFEk.&quot;"><id>tag:blogger.com,1999:blog-2069754202671317458.post-5391329985551640289</id><published>2010-10-19T08:00:00.000+10:00</published><updated>2010-10-19T08:38:18.191+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-10-19T08:38:18.191+10:00</app:edited><title>Defamation?</title><content type="html">Yesterday I received a letter from lawyers representing a doctor named in my post &lt;a href="http://bradclow.blogspot.com/2009/03/tonys-letter-to-medical-board-of.html"&gt;Tony's letter to the Medical Board of Queensland&lt;/a&gt;. They claim the letter contains defamatory statements and demanded I remove the post.&lt;br /&gt;&lt;br /&gt;At the time I posted this blog entry, Tony was missing and left a public message of possible self harm. People were looking for him, his family was worried and many people in the programming communities Tony frequented online feared for his safety. I published Tony's letter at that time for those people online that had seen and were discussing his message, but had no awareness of the real situation.&lt;br /&gt;&lt;br /&gt;I do not wish to remove the blog post as it captures a small part of the prolonged trauma Tony endured in engaging with the medical system. I have no reason to doubt that all the practitioners Tony saw genuinely believed they were doing the right thing. This does not change the experience of the patient though.  It can be a demoralising cycle of slowly progressing from generalists to specialists, booking appointments weeks/months into the future meanwhile enduring symptoms, bearing the financial burden, deciphering sometimes poor communication, having to evaluate practitioners and their advice and decide next steps in the face of enduring pain.&lt;br /&gt;&lt;br /&gt;I am disappointed that one of the doctor's involved has resorted to this level of legal involvement against me. Instead of attempting to censor, he could have simply written a rebuttal. I defy anyone that claims the medical system (as a whole) handled Tony's case well. Therefore there is room for improvement that is better served by reflection and constructive criticism rather than a legal approach.&lt;br /&gt;&lt;br /&gt;I am not a lawyer and have no experience with defamation law. I have removed the doctor's name from the blot post in an attempt to avoid legal confrontation.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2069754202671317458-5391329985551640289?l=bradclow.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://bradclow.blogspot.com/feeds/5391329985551640289/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2069754202671317458&amp;postID=5391329985551640289" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2069754202671317458/posts/default/5391329985551640289?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2069754202671317458/posts/default/5391329985551640289?v=2" /><link rel="alternate" type="text/html" href="http://bradclow.blogspot.com/2010/10/defamation.html" title="Defamation?" /><author><name>Brad Clow</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>3</thr:total></entry><entry gd:etag="W/&quot;A0cGQn0zeyp7ImA9Wx5VEUk.&quot;"><id>tag:blogger.com,1999:blog-2069754202671317458.post-9157362528590200529</id><published>2010-10-04T08:00:00.001+10:00</published><updated>2010-10-04T09:37:03.383+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-10-04T09:37:03.383+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="cycling" /><title>Why are helmets mandatory for cycling?</title><content type="html">The issue of mandatory helmet laws for cycling has been growing in public awareness. This is possibly due to recent &lt;a href="http://freedomcyclist.blogspot.com/2010/03/criminal-conviction-quashed.html"&gt;court cases&lt;/a&gt; and &lt;a href="http://www.heraldsun.com.au/news/national/scrap-bike-helmets-associate-professor-chris-rissel-from-sydney-university/story-e6frf7l6-1225906004560"&gt;research&lt;/a&gt;, the proported lack of take up of the &lt;a href="http://www.melbournebikeshare.com.au/"&gt;Melbourne Bike Share&lt;/a&gt; and the brand new &lt;a href="http://www.citycycle.com.au/"&gt; Brisbane CityCycle&lt;/a&gt; program. &lt;br /&gt;&lt;br /&gt;Proponents of repealing mandatory helmet laws generally focus their discussion on practical issues. They cite the lack of compelling scientific research regarding helmet efficacy in preventing serious brain injury, the deteriorating overall physical health of society and improving sustainability through lower impact on the environment. My question is should they be required to do that? &lt;br /&gt;&lt;br /&gt;Supposedly Australia is a free, civilised country. We value our individual freedom. This freedom includes daily choices concerning how our own actions affect our own good, balancing our own personal risk against convenience, benefit and enjoyment. We make these choices whenever we drive our cars, fly in an aeroplane, jump out of an aeroplane, take up smoking, drink varying volumes of alcohol and go swimming.&lt;br /&gt;&lt;br /&gt;By definition mandatory helmet laws restrict individual freedom. The cyclist is unable to make the choice of balancing personal risk against convenience, benefit and enjoyment. It does not matter what type of bike is being ridden, the speeds, riding surface, distance travelled and presence or absence of vehicles.&lt;br /&gt;&lt;br /&gt;So my question is why isn't the government required to justify the presence of mandatory helmet laws, since they are exercising power over individual freedom, against some people's will? Such a justification would necessarily be in terms of preventing harm to others, otherwise it impinges on the individual freedom we as a society also claim to value. If no such reasonable justification is available then repealing the laws is the sensible and rational course of action to take.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2069754202671317458-9157362528590200529?l=bradclow.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://bradclow.blogspot.com/feeds/9157362528590200529/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2069754202671317458&amp;postID=9157362528590200529" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2069754202671317458/posts/default/9157362528590200529?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2069754202671317458/posts/default/9157362528590200529?v=2" /><link rel="alternate" type="text/html" href="http://bradclow.blogspot.com/2010/10/why-are-helmets-mandatory-for-cycling.html" title="Why are helmets mandatory for cycling?" /><author><name>Brad Clow</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>2</thr:total></entry><entry gd:etag="W/&quot;CkYCQHw4fCp7ImA9Wx5XGEg.&quot;"><id>tag:blogger.com,1999:blog-2069754202671317458.post-3926719867028546871</id><published>2010-09-19T08:41:00.003+10:00</published><updated>2010-09-19T08:49:21.234+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-09-19T08:49:21.234+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="qotd" /><title>QOTD</title><content type="html">&lt;blockquote&gt;I consider it extremely important–perhaps vital, even–to spend time engaging others intelligently who have diverging views from one’s own.  I think that this is, on the whole, one of the most valuable uses of one’s time that exists.  Whether it’s consulting a disagreeable book or a person, somehow at the intersection of intelligence and difference lies a “something” that is mind-expanding.&lt;/blockquote&gt;&lt;br /&gt;&lt;a href="http://sealedabstract.com/rants/why-i-stopped-reading-hn/"&gt;From Sealed Abstract - Why I stopped reading HN&lt;/a&gt; via &lt;a href="http://twitter.com/conal"&gt;@conal&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2069754202671317458-3926719867028546871?l=bradclow.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://bradclow.blogspot.com/feeds/3926719867028546871/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2069754202671317458&amp;postID=3926719867028546871" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2069754202671317458/posts/default/3926719867028546871?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2069754202671317458/posts/default/3926719867028546871?v=2" /><link rel="alternate" type="text/html" href="http://bradclow.blogspot.com/2010/09/qotd.html" title="QOTD" /><author><name>Brad Clow</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DkcFRno7cCp7ImA9Wx5XFk0.&quot;"><id>tag:blogger.com,1999:blog-2069754202671317458.post-7279885019726836671</id><published>2010-09-16T12:18:00.007+10:00</published><updated>2010-09-16T12:26:57.408+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-09-16T12:26:57.408+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="haskell" /><category scheme="http://www.blogger.com/atom/ns#" term="r" /><title>Single exponential smoothing and foldl</title><content type="html">Recently I looked at simple techniques for &lt;a href="http://en.wikipedia.org/wiki/Time_series"&gt;time series&lt;/a&gt; smoothing and forecasting. One such primitive method is the &lt;a href="http://www.itl.nist.gov/div898/handbook/pmc/section4/pmc431.htm"&gt;single exponentially weighted moving average&lt;/a&gt; (SEWMA), defined as&lt;br /&gt;&lt;br /&gt;&lt;img class="latex"  src="http://lh5.ggpht.com/_5B9pEqMIO84/TJBlPhRCraI/AAAAAAAAAR8/apWdPTSyx-U/s800/sewma.gif" alt="\begin{align*}&lt;br /&gt;S_{t+1} &amp; = \alpha y_t + \left(1-\alpha \right ) S_t \quad \quad 0 \leq \alpha \leq 1 \quad \quad t \geq 2 \\&lt;br /&gt;S_2 &amp; = y_1&lt;br /&gt;\end{align*}"/&gt;&lt;br /&gt;&lt;br /&gt;where the sequences are indexed from 1. &lt;img class="latex-inline"  src="http://lh5.ggpht.com/_5B9pEqMIO84/TJBjQFggtLI/AAAAAAAAARw/ktTWi0TBqko/s800/y_iinline.gif" alt="y_i"/&gt; denotes an observed value of the time series and &lt;img class="latex-inline"  src="http://lh3.ggpht.com/_5B9pEqMIO84/TJBkJdMltXI/AAAAAAAAAR4/7_1KKrq0fXg/s800/S_iinline.gif" alt="S_i"/&gt; a SEWMA value. In words, this recursive definition expresses that the next SEWMA value is a weighted average of the curent observed and SEWMA values.&lt;br /&gt;&lt;br /&gt;If I pose the question "What is the predicted value for the next time series observation?" we just apply the formula.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;A typical imperative implementation&lt;/span&gt;&lt;br /&gt;&lt;pre class="brush: plain;"&gt;sewma &lt;- function (alp, y) {&lt;br /&gt;  S &lt;- y[1]&lt;br /&gt;  for (t in 2:length(y)) { S &lt;- alp * y[t] + (1-alp) * S }&lt;br /&gt;  S&lt;br /&gt;}&lt;/pre&gt;This is &lt;a href="http://www.r-project.org/"&gt;R&lt;/a&gt; code, but it should look familiar enough to anyone who has written Java, C#, etc.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Haskell implementation&lt;/span&gt;&lt;br /&gt;In &lt;a href="http://haskell.org/"&gt;Haskell&lt;/a&gt;, a &lt;a href="http://en.wikipedia.org/wiki/Fold_(higher-order_function)"&gt;fold&lt;/a&gt; is a way of recursively iterating a data structure, accumulating a return value. The left fold has type &lt;br /&gt;&lt;pre class="brush: plain;"&gt;foldl :: (a -&gt; b -&gt; a) -&gt; a -&gt; [b] -&gt; a&lt;br /&gt;foldl f s y = ...&lt;/pre&gt;Denote one of the values from the conceptual sequence of accumulator values as &lt;img class="latex-inline"  src="http://lh3.ggpht.com/_5B9pEqMIO84/TJBkJdMltXI/AAAAAAAAAR4/7_1KKrq0fXg/s800/S_iinline.gif" alt="S_i"/&gt;. The function &lt;code&gt;f&lt;/code&gt; maps from the current accumulator and list values to the next accumulator value&lt;br /&gt;&lt;br /&gt;&lt;img class="latex"  src="http://lh5.ggpht.com/_5B9pEqMIO84/TJFvYRNyUXI/AAAAAAAAASQ/Gg8sKCZtTME/s800/foldlf.gif" alt="S_{t+1} = f\left(S_t, y_t \right)"/&gt;&lt;br /&gt;&lt;br /&gt;which is the form of the SEWMA equation above. The &lt;a href="http://haskell.org/ghc/docs/6.12.1/html/libraries/base-4.2.0.0/Data-List.html#v%3Afoldl1"&gt;&lt;code&gt;foldl1&lt;/code&gt;&lt;/a&gt; function is a specialisation of &lt;code&gt;foldl&lt;/code&gt; that uses the first value of the list as the initial accumulator value, yielding the implementation&lt;pre class="brush: plain;"&gt;sewma alp = foldl1 (\s y -&gt; alp * y + (1-alp) * s)&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Revisiting R&lt;/span&gt;&lt;br /&gt;R has the &lt;code&gt;Reduce&lt;/code&gt; function for performing folds. &lt;pre class="brush: plain;"&gt;sewma &lt;- function (alp, ys) {&lt;br /&gt;  Reduce(function (S, y) { S &lt;- alp * y + (1-alp) * S }, ys[2:length(ys)], ys[1])&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Summary&lt;/span&gt;&lt;br /&gt;If accumulating a value over a data structure can be represented with a step function of the form&lt;br /&gt;&lt;br /&gt;&lt;img class="latex"  src="http://lh5.ggpht.com/_5B9pEqMIO84/TJFvYRNyUXI/AAAAAAAAASQ/Gg8sKCZtTME/s800/foldlf.gif" alt="S_{t+1} = f\left(S_t, y_t \right)"/&gt;&lt;br /&gt;&lt;br /&gt;then a left fold captures the recursive implementation.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2069754202671317458-7279885019726836671?l=bradclow.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://bradclow.blogspot.com/feeds/7279885019726836671/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2069754202671317458&amp;postID=7279885019726836671" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2069754202671317458/posts/default/7279885019726836671?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2069754202671317458/posts/default/7279885019726836671?v=2" /><link rel="alternate" type="text/html" href="http://bradclow.blogspot.com/2010/09/single-exponential-smoothing-and-foldl.html" title="Single exponential smoothing and foldl" /><author><name>Brad Clow</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh5.ggpht.com/_5B9pEqMIO84/TJBlPhRCraI/AAAAAAAAAR8/apWdPTSyx-U/s72-c/sewma.gif" height="72" width="72" /><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;A0YEQXs4eCp7ImA9Wx5QF0s.&quot;"><id>tag:blogger.com,1999:blog-2069754202671317458.post-4626281241564042316</id><published>2010-09-06T19:57:00.004+10:00</published><updated>2010-09-06T20:31:40.530+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-09-06T20:31:40.530+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="vim" /><category scheme="http://www.blogger.com/atom/ns#" term="haskell" /><title>Haskell mode in MacVim</title><content type="html">I set up &lt;a href="http://projects.haskell.org/haskellmode-vim/"&gt;Haskell mode&lt;/a&gt; (haskellmode-20100622.vba) in &lt;a href="http://code.google.com/p/macvim/"&gt;MacVim&lt;/a&gt; 7.3 (53). As a Vim newbie I found this &lt;a href="http://splonderzoek.blogspot.com/2009/04/haskell-mode-for-vim-on-mac.html"&gt;page&lt;/a&gt; useful, even though it says pretty much the same thing as the Haskell mode project page.&lt;br /&gt;&lt;br /&gt;I followed the instructions and created &lt;code&gt;$HOME/.vimrc&lt;/code&gt; with these contents.&lt;br /&gt;&lt;pre class="brush: plain;"&gt;" use ghc functionality for haskell files&lt;br /&gt;au Bufenter *.hs compiler ghc&lt;br /&gt;&lt;br /&gt;" switch on syntax highlighting&lt;br /&gt;set syntax on&lt;br /&gt;&lt;br /&gt;" enable filetype detection, plus loading of filetype plugins&lt;br /&gt;set filetype plugin on&lt;br /&gt;&lt;br /&gt;" Configure browser for haskell_doc.vim&lt;br /&gt;let g:haddock_browser = "open"&lt;br /&gt;let g:haddock_browser_callformat = "%s %s"&lt;/pre&gt;Unfortunately when I edited a Haskell file none of the Haddock integration was working. I assume the &lt;code&gt;haskell_doc.vim&lt;/code&gt; filetype plugin wasn't being loaded because the &lt;code&gt;:DocSettings&lt;/code&gt; command failed with &lt;code&gt;E492: Not an editor command&lt;/code&gt;.&lt;br /&gt;&lt;br /&gt;After some hours I changed the line &lt;code&gt;set filetype plugin on&lt;/code&gt; to &lt;code&gt;:filetype plugin on&lt;/code&gt; and Haddock integration now works (don't know why). I am using the &lt;a href="http://hackage.haskell.org/platform/"&gt;Haskell Platform&lt;/a&gt; which includes the documentation.&lt;br /&gt;&lt;br /&gt;After reading &lt;a href="http://b4winckler.wordpress.com/2009/07/10/a-minimal-vim-configuration/"&gt;A minimal Vim configuration&lt;/a&gt; I have switched from &lt;code&gt;$HOME/.vimrc&lt;/code&gt; to &lt;code&gt;$HOME/.gvimrc&lt;/code&gt; with these contents.&lt;br /&gt;&lt;pre class="brush: plain;"&gt;" line numbers&lt;br /&gt;set number&lt;br /&gt;&lt;br /&gt;" show the cursor line and column number&lt;br /&gt;set ruler&lt;br /&gt;&lt;br /&gt;" turn off blinking cursor in normal mode&lt;br /&gt;set gcr=n:blinkon0&lt;br /&gt;&lt;br /&gt;" hide the toolbar&lt;br /&gt;set go-=T&lt;br /&gt;&lt;br /&gt;" switch on syntax highlighting&lt;br /&gt;set syntax&lt;br /&gt;&lt;br /&gt;" highlight matches in a search (hls)&lt;br /&gt;" show the current matching pattern as you search (is),&lt;br /&gt;" ignore case (ic) unless you are searching for both upper and lowercase letters (scs)&lt;br /&gt;set hls is ic scs&lt;br /&gt;&lt;br /&gt;" use ghc functionality for haskell files&lt;br /&gt;au Bufenter *.hs compiler ghc&lt;br /&gt;&lt;br /&gt;" enable filetype detection, plus loading of filetype plugins&lt;br /&gt;:filetype plugin indent on&lt;br /&gt;&lt;br /&gt;" Configure browser for haskell_doc.vim&lt;br /&gt;let g:haddock_browser = "open"&lt;br /&gt;let g:haddock_browser_callformat = "%s %s"&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2069754202671317458-4626281241564042316?l=bradclow.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://bradclow.blogspot.com/feeds/4626281241564042316/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2069754202671317458&amp;postID=4626281241564042316" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2069754202671317458/posts/default/4626281241564042316?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2069754202671317458/posts/default/4626281241564042316?v=2" /><link rel="alternate" type="text/html" href="http://bradclow.blogspot.com/2010/09/haskell-mode-in-macvim.html" title="Haskell mode in MacVim" /><author><name>Brad Clow</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;D0UCQXg6cCp7ImA9Wx5TEkU.&quot;"><id>tag:blogger.com,1999:blog-2069754202671317458.post-7636747655865026072</id><published>2010-07-28T12:44:00.004+10:00</published><updated>2010-07-28T12:47:40.618+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-07-28T12:47:40.618+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="error" /><title>GMail down</title><content type="html">&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_5B9pEqMIO84/TE-aQFzEDnI/AAAAAAAAARA/fgK-WNWayG0/s1600/gmaildown.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 294px;" src="http://2.bp.blogspot.com/_5B9pEqMIO84/TE-aQFzEDnI/AAAAAAAAARA/fgK-WNWayG0/s400/gmaildown.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5498783271267602034" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2069754202671317458-7636747655865026072?l=bradclow.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://bradclow.blogspot.com/feeds/7636747655865026072/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2069754202671317458&amp;postID=7636747655865026072" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2069754202671317458/posts/default/7636747655865026072?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2069754202671317458/posts/default/7636747655865026072?v=2" /><link rel="alternate" type="text/html" href="http://bradclow.blogspot.com/2010/07/gmail-down.html" title="GMail down" /><author><name>Brad Clow</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_5B9pEqMIO84/TE-aQFzEDnI/AAAAAAAAARA/fgK-WNWayG0/s72-c/gmaildown.jpg" height="72" width="72" /><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DkEDRHo-fSp7ImA9WxFbGU4.&quot;"><id>tag:blogger.com,1999:blog-2069754202671317458.post-9154711835209095125</id><published>2010-07-12T21:26:00.004+10:00</published><updated>2010-07-12T21:37:55.455+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-07-12T21:37:55.455+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="education" /><title>Charles Leadbeater: Education innovation in the slums (TED talk)</title><content type="html">&lt;ul&gt;&lt;li&gt;education that works by pull not push&lt;/li&gt;&lt;br /&gt;&lt;li&gt;learning has to be productive to make sense&lt;/li&gt;&lt;br /&gt;&lt;li&gt;learning that starts from questions not from knowledge in curriculum&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Chinese restaurant model instead of McDonalds model&lt;/li&gt;&lt;br /&gt;&lt;li&gt;technology that makes learning fun and accessible&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;In these models, it seems the "teacher" plays more of a mentor type role of guiding and encouraging.&lt;br /&gt;&lt;br /&gt;&lt;object width="446" height="326"&gt;&lt;param name="movie" value="http://video.ted.com/assets/player/swf/EmbedPlayer.swf"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true" /&gt;&lt;param name="allowScriptAccess" value="always"/&gt;&lt;param name="wmode" value="transparent"&gt;&lt;/param&gt;&lt;param name="bgColor" value="#ffffff"&gt;&lt;/param&gt; &lt;param name="flashvars" value="vu=http://video.ted.com/talks/dynamic/CharlesLeadbeater_2010S-medium.flv&amp;su=http://images.ted.com/images/ted/tedindex/embed-posters/TedTalks-1609.embed_thumbnail.jpg&amp;vw=432&amp;vh=240&amp;ap=0&amp;ti=892&amp;introDuration=15330&amp;adDuration=4000&amp;postAdDuration=830&amp;adKeys=talk=charles_leadbeater_on_education;year=2010;theme=new_on_ted_com;theme=how_we_learn;theme=unconventional_explanations;event=TEDSalon+London+2010;&amp;preAdTag=tconf.ted/embed;tile=1;sz=512x288;" /&gt;&lt;embed src="http://video.ted.com/assets/player/swf/EmbedPlayer.swf" pluginspace="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent" bgColor="#ffffff" width="446" height="326" allowFullScreen="true" allowScriptAccess="always" flashvars="vu=http://video.ted.com/talks/dynamic/CharlesLeadbeater_2010S-medium.flv&amp;su=http://images.ted.com/images/ted/tedindex/embed-posters/TedTalks-1609.embed_thumbnail.jpg&amp;vw=432&amp;vh=240&amp;ap=0&amp;ti=892&amp;introDuration=15330&amp;adDuration=4000&amp;postAdDuration=830&amp;adKeys=talk=charles_leadbeater_on_education;year=2010;theme=new_on_ted_com;theme=how_we_learn;theme=unconventional_explanations;event=TEDSalon+London+2010;"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2069754202671317458-9154711835209095125?l=bradclow.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://bradclow.blogspot.com/feeds/9154711835209095125/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2069754202671317458&amp;postID=9154711835209095125" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2069754202671317458/posts/default/9154711835209095125?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2069754202671317458/posts/default/9154711835209095125?v=2" /><link rel="alternate" type="text/html" href="http://bradclow.blogspot.com/2010/07/charles-leadbeater-education-innovation.html" title="Charles Leadbeater: Education innovation in the slums (TED talk)" /><author><name>Brad Clow</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;C04MSHozfCp7ImA9WxFbFk4.&quot;"><id>tag:blogger.com,1999:blog-2069754202671317458.post-8704372652977975931</id><published>2010-07-07T16:40:00.001+10:00</published><updated>2010-07-09T09:33:09.484+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-07-09T09:33:09.484+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="organisation" /><title>Managing PDF books and papers</title><content type="html">I have a small collection of mathematical and computer science books and papers as PDF files. Some are stashed in &lt;a href="https://docs.google.com/"&gt;Google Docs&lt;/a&gt;, others in &lt;a href="http://readitlaterlist.com/"&gt;Read it Later&lt;/a&gt; and others as links in email, etc. It would be nice if:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;all documents were organised together&lt;/li&gt;&lt;br /&gt;&lt;li&gt;I could access the documents from all my devices - work and home macs and iPad&lt;/li&gt;&lt;br /&gt;&lt;li&gt;adding / removing documents automatically synchronised across all devices&lt;/li&gt;&lt;br /&gt;&lt;li&gt;there is a record of the url each document came from&lt;/li&gt;&lt;br /&gt;&lt;li&gt;document contents are searchable&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;A cloud solution with device specific apps would be a good start. I would be happy to pay an annual price similar to &lt;a href="http://flickr.com/"&gt;flickr&lt;/a&gt; and &lt;a href="https://rememberthemilk.com/"&gt;Remember the Milk&lt;/a&gt; for a good product. From memory these are about USD$25 / year.&lt;br /&gt;&lt;br /&gt;All the solutions I have come across are intended for academic bibliographic management. Most of my documents were collected adhoc from the web, without access to restricted channels such as the &lt;a href="http://portal.acm.org/dl.cfm"&gt;ACM Digital Library&lt;/a&gt;. The tools are geared towards searching the popular open and paid publication repositories and extracting bibliographic details automatically. I can see how this would be very useful if you have access, but I found it problematic in matching my documents when I don't have access. Given my requirements this became more hassle then it was worth.&lt;br /&gt;&lt;br /&gt;Some solutions integrate social networking. Being able to share your reading and observe what others are reading might be quite useful. Warrants future investigation.&lt;br /&gt;&lt;br /&gt;I don't have any need to annotate, highlight or add notes to the PDF files at present.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://mekentosj.com/papers/"&gt;Papers&lt;/a&gt;&lt;br /&gt;A Mac application (USD$42) featuring document synchronisation with the corresponding iPhone and iPad apps (USD$17.99). Storing the database and documents on &lt;a href="https://www.dropbox.com/"&gt;Dropbox&lt;/a&gt; should also enable sharing between Macs. Metadata and content are searchable and the full screen reading mode is great. You can add notes to documents, but not annotate or highlight portions. At work I am behind a strict corporate firewall and proxy. Papers gave a spurious error about internet connectivity and disabled all online actions. Following this forum &lt;a href="http://mekentosj.com/papers/forum15/viewtopic.php?id=3200"&gt;post&lt;/a&gt; fixed things up.&lt;br /&gt;&lt;br /&gt;I had high hopes for Papers. The iPad synchronisation is very compelling, but otherwise it currently doesn't do enough for me to warrant paying money for (and putting my data in) Mac only software. If I end up regularly using the supported repositories then I will probably reconsider.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.mendeley.com/"&gt;Mendeley&lt;/a&gt;&lt;br /&gt;A web application with a companion Mac/Windows/Linux desktop app. There is no iPad app, although it is apparently in the works. The desktop UI looks like it is Java and is a bit clunky on the Mac.&lt;br /&gt;&lt;br /&gt;The desktop app is orientated around managing your documents and associated files. You can add your files, set their metadata and sync with your website account. Synchronisation is initiated manually via a UI button. There is a full screen viewer, although I couldn't figure out the zoom and navigation keys. Alternatively you can open documents with the default external application. Document annotations, highlighting and notes are all supported, as well as full text searching. Unfortunately the network proxy settings aren't automatically detected from System Preferences and I need to manually edit them when taking the MacBook Pro between work and home.&lt;br /&gt;&lt;br /&gt;On the website you can manage your references and notes and view your files, but I couldn't figure out how to upload files or see annotations and highlighting. Otherwise, the web site is all about social networking. You get 500MB of personal storage space and 500MB of shared space. The first upgrade is USD$4.99/month for 3.5GB + 3.5GB.&lt;br /&gt;&lt;br /&gt;To make it attractive for me, Mendeley needs to tidy up the desktop app, automatically sync in the background, make the full screen view useful, release a synchronised iPad app and lower the price.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://bibdesk.sourceforge.net/"&gt;BibDesk&lt;/a&gt; + &lt;a href="https://www.dropbox.com/"&gt;Dropbox&lt;/a&gt; + &lt;a href="http://skim-app.sourceforge.net/"&gt;Skim&lt;/a&gt; + &lt;a href="http://www.goodiware.com/goodreader.html"&gt;GoodReader&lt;/a&gt;&lt;br /&gt;BibDesk is a Mac &lt;a href="http://www.bibtex.org/"&gt;BibTex&lt;/a&gt; editor and reference manager. I can record as much metadata as is convenient, associate url's and PDF files, organise and search. By storing the BibDesk database file and PDF files on Dropbox, both content and metadata is automatically synchronised between all Macs. Dropbox provides 2GB of free storage, which is a great to get started. Skim is a PDF reader with a decent full screen mode on the Mac. GoodReader (USD$1.19) is a PDF viewer with Dropbox integration on the iPad. Although it is much quicker to transfer documents to GoodReader via iTunes.&lt;br /&gt;&lt;br /&gt;The main downside with this setup is the lack of BibDesk support on the iPad and that all documents aren't automatically synchronised locally to the iPad. It is sufficient for me now though, as I am currently only adding new documents periodically.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.citeulike.org/"&gt;CiteULike&lt;/a&gt;&lt;br /&gt;Web site sponsored by Springer. I haven't investigated it properly, but it looks like you can add references from the major publication repositories or add your own, upload the associated documents and setup social connections. There are no Mac or iPad apps, so you need to manage your local files and how to view them yourself.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2069754202671317458-8704372652977975931?l=bradclow.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://bradclow.blogspot.com/feeds/8704372652977975931/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2069754202671317458&amp;postID=8704372652977975931" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2069754202671317458/posts/default/8704372652977975931?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2069754202671317458/posts/default/8704372652977975931?v=2" /><link rel="alternate" type="text/html" href="http://bradclow.blogspot.com/2010/07/managing-pdf-books-and-papers.html" title="Managing PDF books and papers" /><author><name>Brad Clow</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>3</thr:total></entry><entry gd:etag="W/&quot;CUACQn46eip7ImA9WxFbEU4.&quot;"><id>tag:blogger.com,1999:blog-2069754202671317458.post-7843564272734766609</id><published>2010-07-02T08:43:00.003+10:00</published><updated>2010-07-03T15:09:23.012+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-07-03T15:09:23.012+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="programming" /><category scheme="http://www.blogger.com/atom/ns#" term="qotd" /><title>QOTD</title><content type="html">&lt;blockquote&gt;Do not have the mind set that the day you release version 1.0 is the finish line, it’s the starting line, so hurry up and get there.&lt;br /&gt;&lt;br /&gt;-- Sam Howley&lt;/blockquote&gt;&lt;br /&gt;From: &lt;a href="http://successfulsoftware.net/2010/05/27/learning-lessons-from-13-failed-software-products/"&gt;Lessons learned from 13 failed software products&lt;/a&gt;  via &lt;a href="http://twitter.com/ericries"&gt;@ericries&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2069754202671317458-7843564272734766609?l=bradclow.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://bradclow.blogspot.com/feeds/7843564272734766609/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2069754202671317458&amp;postID=7843564272734766609" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2069754202671317458/posts/default/7843564272734766609?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2069754202671317458/posts/default/7843564272734766609?v=2" /><link rel="alternate" type="text/html" href="http://bradclow.blogspot.com/2010/07/qotd.html" title="QOTD" /><author><name>Brad Clow</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;A08AQXo-eSp7ImA9WxFUF0o.&quot;"><id>tag:blogger.com,1999:blog-2069754202671317458.post-7634817506729449163</id><published>2010-06-29T12:46:00.002+10:00</published><updated>2010-06-29T12:50:40.451+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-06-29T12:50:40.451+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="mathematics" /><category scheme="http://www.blogger.com/atom/ns#" term="qotd" /><title>QOTD</title><content type="html">&lt;blockquote&gt;It's not that people cannot think mathematically. It's that they have enormous trouble doing it in a de-contextualized, abstract setting.&lt;br /&gt;&lt;br /&gt;-- Keith Devlin&lt;/blockquote&gt;&lt;br /&gt;From  &lt;a href="http://www.maa.org/devlin/devlin_06_10.html"&gt;In Math You Have to Remember, In Other Subjects You Can Think About It&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2069754202671317458-7634817506729449163?l=bradclow.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://bradclow.blogspot.com/feeds/7634817506729449163/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2069754202671317458&amp;postID=7634817506729449163" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2069754202671317458/posts/default/7634817506729449163?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2069754202671317458/posts/default/7634817506729449163?v=2" /><link rel="alternate" type="text/html" href="http://bradclow.blogspot.com/2010/06/qotd.html" title="QOTD" /><author><name>Brad Clow</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;A08CSX85fSp7ImA9WxFUF0o.&quot;"><id>tag:blogger.com,1999:blog-2069754202671317458.post-1860272756571551945</id><published>2010-06-22T09:56:00.008+10:00</published><updated>2010-06-29T12:51:08.125+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-06-29T12:51:08.125+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="education" /><category scheme="http://www.blogger.com/atom/ns#" term="programming" /><category scheme="http://www.blogger.com/atom/ns#" term="mathematics" /><title>Masters to Graduate Diploma</title><content type="html">In 2008 I commenced a coursework Masters in mathematics at the University of Queensland. I have downgraded this to a Graduate Diploma and should officially graduate in a few weeks.&lt;br /&gt;&lt;br /&gt;My original goal for commencing postgraduate study was to improve my knowledge in programming languages and make the current research more accessible. Unfortunately the local universities teach very little (relevant) theoretical computing science, so I enrolled in mathematics with a focus on discrete mathematics, logic and abstract algebra. After the first year I discovered that there is no real future in programming language research here in Brisbane. I had achieved my goal in the context of the courses available and so switched my study to statistics as data analytics is both interesting and hopefully more viable locally.&lt;br /&gt;&lt;br /&gt;To complete the Masters I need to do the equivalent of four courses in research. As I am enrolled in a coursework masters, I pay 2-3 times the standard undergraduate fees. The last course cost $2010. Therefore there is approximately $8000 in fees remaining. &lt;br /&gt;&lt;br /&gt;I would enjoy the remaining Masters research component if could find the right supervisor and topic. However employment as a researcher now generally requires a PhD, not a Masters and while a PhD is longer, it also has no fees. So if the circumstances were right to do the Masters research it makes more sense to consider a PhD anyway.&lt;br /&gt;&lt;br /&gt;The value proposition for completing the Masters is too low. I have fulfilled the requirements for a Graduate Diploma and so will finish with that.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2069754202671317458-1860272756571551945?l=bradclow.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://bradclow.blogspot.com/feeds/1860272756571551945/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2069754202671317458&amp;postID=1860272756571551945" title="6 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2069754202671317458/posts/default/1860272756571551945?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2069754202671317458/posts/default/1860272756571551945?v=2" /><link rel="alternate" type="text/html" href="http://bradclow.blogspot.com/2010/06/masters-to-graduate-diploma.html" title="Masters to Graduate Diploma" /><author><name>Brad Clow</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>6</thr:total></entry><entry gd:etag="W/&quot;DU4GSHc_fyp7ImA9WxFXF0k.&quot;"><id>tag:blogger.com,1999:blog-2069754202671317458.post-2285801355455975787</id><published>2010-05-25T10:08:00.003+10:00</published><updated>2010-05-25T10:38:49.947+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-05-25T10:38:49.947+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="education" /><category scheme="http://www.blogger.com/atom/ns#" term="qotd" /><title>Education is not linear</title><content type="html">&lt;object width="446" height="326"&gt;&lt;param name="movie" value="http://video.ted.com/assets/player/swf/EmbedPlayer.swf"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true" /&gt;&lt;param name="allowScriptAccess" value="always"/&gt;&lt;param name="wmode" value="transparent"&gt;&lt;/param&gt;&lt;param name="bgColor" value="#ffffff"&gt;&lt;/param&gt; &lt;param name="flashvars" value="vu=http://video.ted.com/talks/dynamic/SirKenRobinson_2010-medium.flv&amp;su=http://images.ted.com/images/ted/tedindex/embed-posters/SirKenRobinson-2010.embed_thumbnail.jpg&amp;vw=432&amp;vh=240&amp;ap=0&amp;ti=865&amp;introDuration=15330&amp;adDuration=4000&amp;postAdDuration=830&amp;adKeys=talk=sir_ken_robinson_bring_on_the_revolution;year=2010;theme=new_on_ted_com;theme=master_storytellers;theme=a_taste_of_ted2010;theme=how_the_mind_works;theme=the_creative_spark;theme=the_rise_of_collaboration;theme=whipsmart_comedy;theme=how_we_learn;event=TED2010;&amp;preAdTag=tconf.ted/embed;tile=1;sz=512x288;" /&gt;&lt;embed src="http://video.ted.com/assets/player/swf/EmbedPlayer.swf" pluginspace="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent" bgColor="#ffffff" width="446" height="326" allowFullScreen="true" allowScriptAccess="always" flashvars="vu=http://video.ted.com/talks/dynamic/SirKenRobinson_2010-medium.flv&amp;su=http://images.ted.com/images/ted/tedindex/embed-posters/SirKenRobinson-2010.embed_thumbnail.jpg&amp;vw=432&amp;vh=240&amp;ap=0&amp;ti=865&amp;introDuration=15330&amp;adDuration=4000&amp;postAdDuration=830&amp;adKeys=talk=sir_ken_robinson_bring_on_the_revolution;year=2010;theme=new_on_ted_com;theme=master_storytellers;theme=a_taste_of_ted2010;theme=how_the_mind_works;theme=the_creative_spark;theme=the_rise_of_collaboration;theme=whipsmart_comedy;theme=how_we_learn;event=TED2010;"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;And we have sold ourselves into a fast food model of education and it's impoverishing our spirits and our energies as much as fast food is depleting our physical bodies.&lt;br /&gt;&lt;br /&gt;-- Ken Robinson&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2069754202671317458-2285801355455975787?l=bradclow.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://bradclow.blogspot.com/feeds/2285801355455975787/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2069754202671317458&amp;postID=2285801355455975787" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2069754202671317458/posts/default/2285801355455975787?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2069754202671317458/posts/default/2285801355455975787?v=2" /><link rel="alternate" type="text/html" href="http://bradclow.blogspot.com/2010/05/education-is-not-linear.html" title="Education is not linear" /><author><name>Brad Clow</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CkENR3o6fip7ImA9WxFQFU4.&quot;"><id>tag:blogger.com,1999:blog-2069754202671317458.post-6399058073785359915</id><published>2010-05-11T08:00:00.000+10:00</published><updated>2010-05-11T08:31:36.416+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-05-11T08:31:36.416+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="organisation" /><title>Brief summary of iPhone Flickr apps</title><content type="html">I use &lt;a href="http://www.flickr.com/"&gt;Flickr&lt;/a&gt; to store my photos. Now that I have an iPhone, I would like to use it as a mobile photo album as well as uploading photos taken from the camera. I don't want the added complexity of using iPhoto as a middleman, so I did a rough survey of iPhone Flickr apps.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://itunes.apple.com/au/app/flickr/id328407587"&gt;Flickr&lt;/a&gt; 1.1.3 (free).&lt;ul&gt;&lt;li&gt;Loads photos fast. Caching works well if you have already viewed a photo.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;View photos full screen and swipe to navigate.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;No zoom.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;If you take photos with the inbuilt Camera app and upload them sometime later, it doesn't set the map location and time taken to the original values.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Uploaded photo file size seems larger than with Mobile Fotos or syncing with iPhoto.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;a href="http://connectedflow.com/darkslide/"&gt;Darkslide&lt;/a&gt; 1.6.2 (free add-supported version)&lt;ul&gt;&lt;li&gt;Slow load times (even for previously viewed photos).&lt;/li&gt;&lt;br /&gt;&lt;li&gt;No swipe to nagivate photos.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;No zoom.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;a href="http://www.greenvolcanosoftware.com/flickit.html"&gt;Flickit&lt;/a&gt; 2.0 (free)&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Only does uploading. The Pro app ($5.99) is a full client.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;If you take photos with the inbuilt camera app and upload them sometime later, it doesn't set the map location and time taken to original values. Found an &lt;a href="http://www.jasonhansen.net/2009/02/12/flickit-for-iphone/"&gt;explanation&lt;/a&gt; from the developer.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Compresses photos significantly. I could only see small differences compared with the same photo uploaded via alternative means. Developer was helpful when I asked about this.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;a href="http://mobilefotosapp.com/"&gt;Mobile Fotos&lt;/a&gt; ($5.99)&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Upload correctly sets the map location and time taken to the original values for photos taken with the inbuilt Camera app.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;View photos full screen, swipe to navigate and pinch to zoom.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Slideshow.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Uploaded photos have washed out colours.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Can't select from your tags when uploading, need to type in each time.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Had one case where photos were shown as a blank screen. Cleared cache and problem was resolved.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Developer was responsive when I asked questions.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;a href="http://orangepetal.com/reflections/"&gt;Reflections&lt;/a&gt; ($5.99) and &lt;a href="http://www.midnightmobility.com/"&gt;Photo Wallet: Flickr&lt;/a&gt; ($3.99) both look interesting in their own right, but neither offer zoom. The developer of Photo Wallet answered my question via twitter quickly to.&lt;br /&gt;&lt;br /&gt;In summary, none of the Apps I tried are ideal for uploading to Flickr. This leaves me importing into iPhoto and uploading via the standard web uploader.* Mobile Fotos has the best viewing experience and I would also use it for uploading if the colours and tagging were fixed.&lt;br /&gt;&lt;br /&gt;* The iPhone saves GPS information into the EXIF data. I had to set the "Import EXIF location data" privacy setting for the Flickr map location to be set. The privacy implications of this need further investigation.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2069754202671317458-6399058073785359915?l=bradclow.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://bradclow.blogspot.com/feeds/6399058073785359915/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2069754202671317458&amp;postID=6399058073785359915" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2069754202671317458/posts/default/6399058073785359915?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2069754202671317458/posts/default/6399058073785359915?v=2" /><link rel="alternate" type="text/html" href="http://bradclow.blogspot.com/2010/04/brief-summary-of-iphone-flickr-apps.html" title="Brief summary of iPhone Flickr apps" /><author><name>Brad Clow</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DE4ESH8-eyp7ImA9WxFSEUg.&quot;"><id>tag:blogger.com,1999:blog-2069754202671317458.post-7532735422518757357</id><published>2010-04-13T21:06:00.001+10:00</published><updated>2010-04-13T21:08:29.153+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-04-13T21:08:29.153+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="education" /><category scheme="http://www.blogger.com/atom/ns#" term="mathematics" /><title>Math is not linear</title><content type="html">&lt;div class="prezi-player"&gt;&lt;style type="text/css" media="screen"&gt;.prezi-player { width: 550px; } .prezi-player-links { text-align: center; }&lt;/style&gt;&lt;object id="prezi_aww2hjfyil0u" name="prezi_aww2hjfyil0u" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="550" height="400"&gt;&lt;param name="movie" value="http://prezi.com/bin/preziloader.swf"/&gt;&lt;param name="allowfullscreen" value="true"/&gt;&lt;param name="allowscriptaccess" value="always"/&gt;&lt;param name="bgcolor" value="#ffffff"/&gt;&lt;param name="flashvars" value="prezi_id=aww2hjfyil0u&amp;amp;lock_to_path=1&amp;amp;color=ffffff&amp;amp;autoplay=no"/&gt;&lt;embed id="preziEmbed_aww2hjfyil0u" name="preziEmbed_aww2hjfyil0u" src="http://prezi.com/bin/preziloader.swf" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="550" height="400" bgcolor="#ffffff" flashvars="prezi_id=aww2hjfyil0u&amp;amp;lock_to_path=1&amp;amp;color=ffffff&amp;amp;autoplay=no"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="prezi-player-links"&gt;&lt;p&gt;&lt;a title="description" href="http://prezi.com/aww2hjfyil0u/math-is-not-linear/"&gt;Math is not linear&lt;/a&gt; on &lt;a href="http://prezi.com"&gt;Prezi&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2069754202671317458-7532735422518757357?l=bradclow.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://bradclow.blogspot.com/feeds/7532735422518757357/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2069754202671317458&amp;postID=7532735422518757357" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2069754202671317458/posts/default/7532735422518757357?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2069754202671317458/posts/default/7532735422518757357?v=2" /><link rel="alternate" type="text/html" href="http://bradclow.blogspot.com/2010/04/math-is-not-linear.html" title="Math is not linear" /><author><name>Brad Clow</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;C0IFR3Y8fCp7ImA9WxBaE0w.&quot;"><id>tag:blogger.com,1999:blog-2069754202671317458.post-4205039819533279412</id><published>2010-03-21T10:52:00.001+10:00</published><updated>2010-03-23T12:31:56.874+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-03-23T12:31:56.874+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="mathematics" /><title>Embedding LaTeX in Blogger take 2</title><content type="html">After further consideration on &lt;a href="http://bradclow.blogspot.com/2010/03/embeding-latex-in-blogger.html"&gt;Embedding LaTeX in Blogger&lt;/a&gt; I have the following concerns in using &lt;a href="http://blog.dreasgrech.com/2009/12/jslatex-jquery-plugin-to-directly-embed.html"&gt;jsLaTeX&lt;/a&gt;.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;LaTeX images not rendered in RSS readers&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Stability of all the components over (a long) time&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;a href="http://www.math.union.edu/~dpvc/jsMath/"&gt;jsMath&lt;/a&gt; improves on point 2, but looks way too hard to host on Blogger. So I am falling back to using images generated by the &lt;a href="http://www.codecogs.com/components/equationeditor/equationeditor.php"&gt;CodeCogs online equation editor&lt;/a&gt; hosted on Picasa, which is where Blogger uploads images. I put the LaTeX source in the &lt;code&gt;img alt&lt;/code&gt; attribute.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Blogger resizing images&lt;/span&gt;&lt;br /&gt;After adding a few equations through the standard Blogger mechanism, I noticed that they weren't as clear when previewing. The following two equations are the same image hosted on Picasa, but embedded with different src urls.&lt;br /&gt;&lt;br /&gt;&lt;img class="latex" src="http://2.bp.blogspot.com/_5B9pEqMIO84/S6Q0h4W8uKI/AAAAAAAAAMA/jy_2uYL0YXg/s400/obsvariance2deriv.gif"/&gt;&lt;br /&gt;&lt;br /&gt;This is using the Blogger generated url in the image tag and has size 400 x 285 pixels.&lt;br /&gt;&lt;br /&gt;&lt;img class="latex" src="http://lh4.ggpht.com/_5B9pEqMIO84/S6Q0h4W8uKI/AAAAAAAAAMA/jy_2uYL0YXg/s800/obsvariance2deriv.gif"/&gt;&lt;br /&gt;&lt;br /&gt;This is using the Picasa generated url and has the original size of 415 x 296 pixels.&lt;br /&gt;&lt;br /&gt;Notice how the first image is both smaller and blurry. It seems that Blogger is automatically resizing it. Unfortunately this means a little more work for each equation as it requires generating the link in Picasa and replacing the Blogger generated image tag.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2069754202671317458-4205039819533279412?l=bradclow.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://bradclow.blogspot.com/feeds/4205039819533279412/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2069754202671317458&amp;postID=4205039819533279412" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2069754202671317458/posts/default/4205039819533279412?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2069754202671317458/posts/default/4205039819533279412?v=2" /><link rel="alternate" type="text/html" href="http://bradclow.blogspot.com/2010/03/embedding-latex-in-blogger-take-2.html" title="Embedding LaTeX in Blogger take 2" /><author><name>Brad Clow</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_5B9pEqMIO84/S6Q0h4W8uKI/AAAAAAAAAMA/jy_2uYL0YXg/s72-c/obsvariance2deriv.gif" height="72" width="72" /><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;C0AFR3c9fCp7ImA9WxBaE0w.&quot;"><id>tag:blogger.com,1999:blog-2069754202671317458.post-9128917834248173896</id><published>2010-03-21T09:48:00.006+10:00</published><updated>2010-03-23T12:35:16.964+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-03-23T12:35:16.964+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="mathematics" /><title>Computing variance</title><content type="html">Given a list of &lt;code&gt;n&lt;/code&gt; numbers &lt;img class="latex-inline" src="http://lh3.ggpht.com/_5B9pEqMIO84/S6Q8NDkO0GI/AAAAAAAAAMI/LMiabj1T-hc/s800/x1toxninline.gif" alt="x_1,x_2,...,x_n"/&gt;, the &lt;a href="http://en.wikipedia.org/wiki/Variance"&gt;variance&lt;/a&gt; is defined as&lt;br /&gt;&lt;br /&gt;&lt;img class="latex" src="http://lh4.ggpht.com/_5B9pEqMIO84/S6Q-pBXTtmI/AAAAAAAAAMQ/6OswuNwuVzk/s800/obsvariancenum1.gif" alt="\frac{1}{n}\sum_{i=1}^n{\left(x_i - \bar{x}\right)^2}\quad\quad\quad\text{(1)}"/&gt;&lt;br /&gt;&lt;br /&gt;where &lt;img class="latex-inline" src="http://lh6.ggpht.com/_5B9pEqMIO84/S6RGNorLarI/AAAAAAAAAMY/ACUZQoEPFAM/s800/xbar.gif" alt="\bar{x}"/&gt; is the &lt;a href="http://en.wikipedia.org/wiki/Arithmetic_mean"&gt;arithmetic mean&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;img class="latex" src="http://lh4.ggpht.com/_5B9pEqMIO84/S6RGw4XM6DI/AAAAAAAAAMg/5R3KVbI3l9U/s800/xbardef.gif" alt="\bar{x} = \frac{1}{n}\sum_{i=1}^n{x_i}"/&gt;&lt;br /&gt;&lt;br /&gt;Expression 1 stated in words is the average squared difference of each data point from the mean. Implemented as an algorithm, this requires two passes over the data set. The first to calculate the mean and the second to sum the squared differences.&lt;br /&gt;&lt;br /&gt;Let's derive the more commonly used expression for variance.&lt;br /&gt;&lt;br /&gt;&lt;img class="latex" src="http://lh4.ggpht.com/_5B9pEqMIO84/S6Q0h4W8uKI/AAAAAAAAAMA/jy_2uYL0YXg/s800/obsvariance2deriv.gif" alt="\begin{align*}&lt;br /&gt;\frac{1}{n}\sum_{i=1}^n{\left(x_i - \bar{x}\right)^2} &amp; =  \frac{1}{n}\sum_{i=1}^n{\left({x_i}^2 - 2x_i\bar{x} + \bar{x}^2\right)} \\&lt;br /&gt;&amp; = \frac{1}{n}\left(\sum_{i=1}^n{x_i}^2 - 2\bar{x}\sum_{i=1}^n{x_i} + n\bar{x}^2\right) \\&lt;br /&gt;&amp; = \frac{1}{n}\sum_{i=1}^n{x_i}^2 - 2\bar{x}^2 + \bar{x}^2 \\&lt;br /&gt;&amp; = \frac{1}{n}\sum_{i=1}^n{x_i}^2 - \bar{x}^2 \\&lt;br /&gt;&amp; = \frac{1}{n}\sum_{i=1}^n{x_i}^2 - \left(\frac{1}{n}\sum_{i=1}^n{x_i}\right)^2 &amp;&amp; \text{(2)}&lt;br /&gt;\end{align*}"/&gt;&lt;br /&gt;&lt;br /&gt;This only requires a single pass over the data set, computing the incremental sum of the values and the incremental sum of their squares. However, if the terms in the subtraction are large and close enough, &lt;a href="http://en.wikipedia.org/wiki/Catastrophic_cancellation"&gt;catastrophic cancellation&lt;/a&gt; can occur. Essentially the precision of the floating point representation is exceeded, yielding unacceptable results. See &lt;a href="http://en.wikipedia.org/wiki/Algorithms_for_calculating_variance"&gt;Algorithms for calculating variance&lt;/a&gt; and &lt;a href="http://www.johndcook.com/blog/2008/09/28/theoretical-explanation-for-numerical-results/"&gt;Theoretical explanation for numerical results&lt;/a&gt; for examples (they are calculating the sample variance which is slightly different). More detailed information on catastrophic cancellation can be found in &lt;a href="http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.22.6768"&gt;What Every Computer Scientist Should Know About Floating Point Arithmetic (1991)&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;A more numerically stable (but computationally expensive) single pass &lt;a href="http://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#On-line_algorithm"&gt;algorithm&lt;/a&gt; was published by Knuth in The Art of Computer Programming, volume 2. Define &lt;img class="latex-inline" src="http://lh6.ggpht.com/_5B9pEqMIO84/S6ROeVm8JmI/AAAAAAAAAMo/TkhH9fGPQ28/s800/xbarninline.gif" alt="\bar{x}_n"/&gt; and &lt;img class="latex-inline" src="http://lh3.ggpht.com/_5B9pEqMIO84/S6ROiN_20qI/AAAAAAAAAMw/E6gIPJeFjHY/s800/sninline.gif" alt="s_n"/&gt; as the mean and sum of squared differences of the the first n values respectively.&lt;br /&gt;&lt;br /&gt;&lt;img class="latex" src="http://lh3.ggpht.com/_5B9pEqMIO84/S6Scbxoj6rI/AAAAAAAAAPE/tdifliZAzrM/s800/runningsumofsquares.gif" alt="\begin{align*}&lt;br /&gt;s_0 &amp; = 0\\&lt;br /&gt;\\&lt;br /&gt;s_{n+1} &amp; = \sum_{i=1}^{n+1}\left(x_i-\bar{x}_{n+1}\right)^2\\&lt;br /&gt;&amp; = s_n + \left(x_{n+1}-\bar{x}_n\right)\left(x_{n+1}-\bar{x}_{n+1}\right)\quad\quad\quad(3)&lt;br /&gt;\end{align*}"/&gt;&lt;br /&gt;&lt;br /&gt;For &lt;code&gt;m &gt; 0&lt;/code&gt; values, the variance is then &lt;img class="latex-inline" src="http://lh4.ggpht.com/_5B9pEqMIO84/S6RYTXx-QyI/AAAAAAAAANc/u3yvenEt6tQ/s800/smonm.gif" alt="\frac{s_m}{m}"/&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Derivation of Equation 3&lt;/span&gt;&lt;br /&gt;This is really just a more verbose version of &lt;a href="http://planetmath.org/encyclopedia/OnePassAlgorithmToComputeSampleVariance.html"&gt;one-pass algorithm to compute sample variance&lt;/a&gt;. First up is the running mean.&lt;br /&gt;&lt;br /&gt;&lt;img class="latex" src="http://lh4.ggpht.com/_5B9pEqMIO84/S6Sa3QWCI3I/AAAAAAAAAO4/p7xM_qRrb08/s800/runningmean.gif" alt="\begin{align*}&lt;br /&gt;\bar{x}_0 &amp; = 0\\&lt;br /&gt;\\&lt;br /&gt;\bar{x}_{n+1} &amp; = \frac{n\bar{x}_n + x_{n+1}}{n+1}\\&lt;br /&gt;&amp; = \frac{\left(n+1\right)\bar{x}_n-\bar{x}_n+x_{n+1}}{n+1}\\&lt;br /&gt;&amp; = \bar{x}_n + \frac{x_{n+1}-\bar{x}_n}{n+1} &amp;&amp; \quad &amp;&amp;&amp; (4)\\&lt;br /&gt;\end{align*}"/&gt;&lt;br /&gt;&lt;br /&gt;If you think of the mean visually i.e. a horizontal line through the data on a scatter plot, then it is intuitive that the sum of the distances between each point and the mean is zero.&lt;br /&gt;&lt;br /&gt;&lt;img class="latex" src="http://lh6.ggpht.com/_5B9pEqMIO84/S6SfcnGDsGI/AAAAAAAAAPM/3twvv93VWJQ/s800/sumdiftomeannum5.gif" alt="\sum_{i=1}^n\left(x_i-\bar{x}_n\right) &amp; = \sum_{i=1}^nx_i-n\left(\frac{1}{n}\sum_{i=1}^nx_i\right)=0\quad\quad\quad(5)"/&gt;&lt;br /&gt;&lt;br /&gt;Now define &lt;img class="latex-inline" src="http://lh5.ggpht.com/_5B9pEqMIO84/S6Si4ZHPZ-I/AAAAAAAAAPU/hya46OpiDSA/s800/gammainline.gif" alt="\gamma"/&gt;  as the difference of consecutive incremental means, along with a few useful variations.&lt;br /&gt;&lt;br /&gt;&lt;img class="latex" src="http://lh4.ggpht.com/_5B9pEqMIO84/S6SjiijBP9I/AAAAAAAAAPc/OqLPo_iTJhE/s800/sumofsquaresnum678.gif" alt="\begin{align*}&lt;br /&gt;\gamma &amp; = \bar{x}_{n+1} - \bar{x}_n &amp;&amp; \quad &amp;&amp;&amp; (6)\\&lt;br /&gt;\\&lt;br /&gt;\gamma &amp; = \bar{x}_n + \frac{x_{n+1}-\bar{x}_n}{n+1} - \bar{x}_n &amp;&amp; &amp;&amp;&amp; \text{by (4)}\\&lt;br /&gt;\gamma &amp; = \frac{x_{n+1}-\bar{x}_n}{n+1} \\&lt;br /&gt;\left(n+1\right)\gamma &amp; = x_{n+1}-\bar{x}_n &amp;&amp; &amp;&amp;&amp; (7)\\&lt;br /&gt;\\&lt;br /&gt;x_{n+1}-\bar{x}_{n+1} &amp; = x_{n+1}-\bar{x}_n+\bar{x}_n-\bar{x}_{n+1} \\&lt;br /&gt;&amp; = \left(n+1\right)\gamma-\gamma &amp;&amp; &amp;&amp;&amp; \text{by (7, 6)} \\&lt;br /&gt;&amp; = n\gamma &amp;&amp; &amp;&amp;&amp; (8)\\&lt;br /&gt;\end{align*}"/&gt;&lt;br /&gt;&lt;br /&gt;The pieces are now all in place to derive equation 3.&lt;br /&gt;&lt;br /&gt;&lt;img class="latex" src="http://lh3.ggpht.com/_5B9pEqMIO84/S6Slw-5fjDI/AAAAAAAAAPs/FosxRZkMwBI/s800/snplus1deriv.gif" alt="\begin{align*}&lt;br /&gt;s_{n+1} &amp; = \sum_{i=1}^{n+1}\left(x_i-\bar{x}_{n+1}\right)^2\\&lt;br /&gt;&amp; = \sum_{i=1}^{n}\left(x_i-\bar{x}_{n+1}\right)^2 + \left(x_{n+1}-\bar{x}_{n+1}\right)^2\\&lt;br /&gt;&amp; = \sum_{i=1}^{n}\left(x_i-\bar{x}_n+\bar{x}_n-\bar{x}_{n+1}\right)^2 + \left(n\gamma\right)^2 &amp;&amp; \quad &amp;&amp;&amp; \text{by (8)}\\&lt;br /&gt;&amp; = \sum_{i=1}^{n}\left(\left(x_i-\bar{x}_n\right)-\gamma\right)^2+n^2\gamma^2 &amp;&amp; &amp;&amp;&amp; \text{by (6)}\\&lt;br /&gt;&amp; = \sum_{i=1}^{n}\left(x_i-\bar{x}_n\right)^2 -2\gamma\sum_{i=1}^{n}\left(x_i-\bar{x}_n\right)+n\gamma^2+n^2\gamma^2\\&lt;br /&gt;&amp; = s_n-0+n\gamma^2\left(1+n\right) &amp;&amp; &amp;&amp;&amp; \text{by (5)}\\&lt;br /&gt;&amp; = s_n+\left(x_{n+1}-\bar{x}_n\right)n\gamma &amp;&amp; &amp;&amp;&amp; \text{by (7)}\\&lt;br /&gt;&amp; = s_n+\left(x_{n+1}-\bar{x}_n\right)\left(x_{n+1}-\bar{x}_{n+1}\right) &amp;&amp; &amp;&amp;&amp; \text{by (8)}&lt;br /&gt;\end{align*}"/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2069754202671317458-9128917834248173896?l=bradclow.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://bradclow.blogspot.com/feeds/9128917834248173896/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2069754202671317458&amp;postID=9128917834248173896" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2069754202671317458/posts/default/9128917834248173896?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2069754202671317458/posts/default/9128917834248173896?v=2" /><link rel="alternate" type="text/html" href="http://bradclow.blogspot.com/2010/03/computing-variance.html" title="Computing variance" /><author><name>Brad Clow</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh3.ggpht.com/_5B9pEqMIO84/S6Q8NDkO0GI/AAAAAAAAAMI/LMiabj1T-hc/s72-c/x1toxninline.gif" height="72" width="72" /><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;C0QNQ306eip7ImA9WxBaE0w.&quot;"><id>tag:blogger.com,1999:blog-2069754202671317458.post-766116407534912472</id><published>2010-03-12T10:41:00.010+10:00</published><updated>2010-03-23T12:29:52.312+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-03-23T12:29:52.312+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="mathematics" /><title>Embeding LaTeX in Blogger</title><content type="html">The goal is to include mathematical equations in blog posts. My plan was to create images from the output of &lt;a href="http://www.tug.org/mactex/"&gt;MacTeX&lt;/a&gt;. Apart from being painfully slow to crop and upload with multiple distinct equations, the LaTeX source would not be contained in the post.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://measuringmeasures.com/blog/2010/2/19/embedding-latex-in-html.html"&gt;Embedding LaTeX in HTML&lt;/a&gt; led me to &lt;a href="http://blog.dreasgrech.com/2009/12/jslatex-jquery-plugin-to-directly-embed.html"&gt;jsLaTeX&lt;/a&gt;. Option 4 from &lt;a href="http://quiterandom.com/tutorials/solutions-for-js-hosting/"&gt;Solutions for JavaScript Hosting in Blogger&lt;/a&gt; solved the Blogger hosting issue. After some CSS shenanigans we have &lt;a href="http://en.wikipedia.org/wiki/Bayes%27_theorem"&gt;Bayes rule&lt;/a&gt; right here, right now.&lt;br /&gt;&lt;br /&gt;&lt;img class="latex" src="http://lh5.ggpht.com/_5B9pEqMIO84/S6gl5EsYpWI/AAAAAAAAAP4/hnD6lv0bqxs/s800/bayes.png" alt="\mathbb{P}(B_j|A) = \frac{\mathbb{P}(A|B_j)\mathbb{P}(B_j)}{\sum_{i=1}^n\mathbb{P}(A|B_i)\mathbb{P}(B_i)}"/&gt;&lt;br /&gt;&lt;br /&gt;It is easier to write simple equations in the &lt;a href="http://www.codecogs.com/components/equationeditor/equationeditor.php"&gt;CodeCogs online equation editor&lt;/a&gt; first as Blogger preview doesn't seem to execute the JavaScript to render them.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Edit 23/03/2010:&lt;/span&gt; No longer using jsLaTeX, see &lt;a href="http://bradclow.blogspot.com/2010/03/embedding-latex-in-blogger-take-2.html"&gt;Embedding LaTeX in Blogger take 2&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2069754202671317458-766116407534912472?l=bradclow.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://bradclow.blogspot.com/feeds/766116407534912472/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2069754202671317458&amp;postID=766116407534912472" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2069754202671317458/posts/default/766116407534912472?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2069754202671317458/posts/default/766116407534912472?v=2" /><link rel="alternate" type="text/html" href="http://bradclow.blogspot.com/2010/03/embeding-latex-in-blogger.html" title="Embeding LaTeX in Blogger" /><author><name>Brad Clow</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh5.ggpht.com/_5B9pEqMIO84/S6gl5EsYpWI/AAAAAAAAAP4/hnD6lv0bqxs/s72-c/bayes.png" height="72" width="72" /><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;A0YASXg5eSp7ImA9WxBVFkk.&quot;"><id>tag:blogger.com,1999:blog-2069754202671317458.post-4932486981012235794</id><published>2010-02-19T14:47:00.011+10:00</published><updated>2010-02-20T16:59:08.621+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-02-20T16:59:08.621+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="presentations" /><category scheme="http://www.blogger.com/atom/ns#" term="F#" /><category scheme="http://www.blogger.com/atom/ns#" term="programming" /><title>F# examples talk at BFG</title><content type="html">Earlier this week I gave a short talk at the Brisbane Functional Group on &lt;a href="http://www.fsharp.net/"&gt;F#&lt;/a&gt;. The idea was to give an introductory feel for the language by way of some simple examples. The talk was intended to be short so I assumed knowledge of previously discussed idioms such as tuples and curried type signatures.&lt;br /&gt;&lt;br /&gt;I took the examples (with permission :-) from the environmental sensing project I work on at &lt;a href="http://www.mquter.qut.edu.au/"&gt;MQUTeR&lt;/a&gt;. This post is intended as a reference for those who attended rather than a self-contained introduction to F#.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;The &lt;code&gt;uncurry&lt;/code&gt; function was first up.&lt;br /&gt;&lt;pre class="brush: plain;"&gt;let uncurry f (x,y) = f x y&lt;/pre&gt;We talked about the syntax of function definition, tuples and type inference in Visual Studio. We inserted the function into F# Interactive (the REPL available in Visual Studio) by highlighting it and pressing &lt;code&gt;ALT-Enter&lt;/code&gt;. The F# Interactive transcript went something like:&lt;br /&gt;&lt;pre class="brush: plain;"&gt;val uncurry : ('a -&gt; 'b -&gt; 'c) -&gt; 'a * 'b -&gt; 'c&lt;br /&gt;&lt;br /&gt;&gt; 1 + 2;;&lt;br /&gt;val it : int = 3&lt;br /&gt;&lt;br /&gt;&gt; uncurry (+) (1,2);;&lt;br /&gt;val it : int = 3&lt;br /&gt;&lt;br /&gt;&gt; (+) 1 2;;&lt;br /&gt;val it : int = 3&lt;/pre&gt;This lead to a discussion on operators and infix/prefix notation. The post &lt;a href="http://bradclow.blogspot.com/2009/07/f-option-orelse-getorelse-functions.html"&gt;F# Option orElse getOrElse functions&lt;/a&gt; should cover that.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Next was the &lt;code&gt;|&gt;&lt;/code&gt; operator, which has type signature &lt;code&gt;'a -&gt; ('a -&gt; 'b) -&gt; 'b&lt;/code&gt;.&lt;br /&gt;&lt;pre class="brush: plain;"&gt;// Haskell catMaybes&lt;br /&gt;let catOptions xs = Seq.filter Option.isSome xs |&gt; Seq.map Option.get&lt;br /&gt;&lt;br /&gt;let euclidianDist (x1, y1) (x2, y2) = (x1 - x2) ** 2.0 + (y1 - y2) ** 2.0 |&gt; sqrt&lt;br /&gt;&lt;br /&gt;let spt' t a = &lt;br /&gt;    let m = Math.Matrix.ofArray2D a&lt;br /&gt;    allPeaks t m |&gt; removeSmall |&gt; dilate t m |&gt; Math.Matrix.toArray2D&lt;br /&gt;&lt;br /&gt;// type signatures&lt;br /&gt;// allPeaks : float -&gt; matrix -&gt; matrix&lt;br /&gt;// removeSmall : matrix -&gt; matrix&lt;br /&gt;// dilate : float -&gt; matrix -&gt; matrix -&gt; matrix&lt;br /&gt;// spt' : float -&gt; float [,] -&gt; float [,]&lt;/pre&gt;We briefly compared &lt;code&gt;|&gt;&lt;/code&gt; with the Haskell &lt;code&gt;$&lt;/code&gt; function, which has the type signature &lt;code&gt;(a -&gt; b) -&gt; a -&gt; b&lt;/code&gt;.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;A quick look at type annotations, pattern matching and Haskell like guards. The example is an implementation of the MATLAB smooth function, which calculates a moving average. We didn't dwell on the entire function, just the relevant parts.&lt;br /&gt;&lt;pre class="brush: plain;"&gt;(* &lt;br /&gt;yy = smooth(y,span) sets the span of the moving average to span. span must be odd.&lt;br /&gt;&lt;br /&gt;If span = 5 then the first few elements of yy are given by:&lt;br /&gt;yy(1) = y(1)&lt;br /&gt;yy(2) = (y(1) + y(2) + y(3))/3&lt;br /&gt;yy(3) = (y(1) + y(2) + y(3) + y(4) + y(5))/5&lt;br /&gt;yy(4) = (y(2) + y(3) + y(4) + y(5) + y(6))/5&lt;br /&gt;...&lt;br /&gt;*)&lt;br /&gt;let smooth s (a:float []) = &lt;br /&gt;    let n = (s - 1) / 2&lt;br /&gt;    let f i _ =&lt;br /&gt;        let (b, l) = match i with&lt;br /&gt;                     | _ when i &lt; n                  -&gt; (0, i*2+1)&lt;br /&gt;                     | _ when i + n &lt; a.GetLength(0) -&gt; (i-n, s)&lt;br /&gt;                     | _                             -&gt; (i-(a.GetLength(0)-1-i), (a.GetLength(0)-1-i)*2+1)&lt;br /&gt;        Array.sum (Array.sub a b l) / (float l) // TODO try Array.average here&lt;br /&gt;    Array.mapi f a&lt;br /&gt;&lt;/pre&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/dd233184%28VS.100%29.aspx"&gt;Records&lt;/a&gt; are a common kind of data type. The labels are not automatically available as functions like they are in Haskell. &lt;br /&gt;&lt;pre class="brush: plain;"&gt;type 'a Rectangle = {Left:'a; Top:'a; Right:'a; Bottom:'a; Width:'a; Height:'a;}&lt;br /&gt;&lt;br /&gt;let inline cornersToRect l r t b = {Left=l; Top=t; Right=r; Bottom=b; Width=r-l; Height=t-b;}&lt;br /&gt;let inline lengthsToRect l t w h = {Left=l; Top=t; Right=l+w-1; Bottom=t+h-1; Width=w; Height=h;}&lt;br /&gt;let fcornersToRect (l:float) r t b = cornersToRect l r t b // for C#&lt;br /&gt;let left r = r.Left&lt;br /&gt;let right r = r.Right&lt;br /&gt;let top r = r.Top&lt;br /&gt;let bottom r = r.Bottom&lt;br /&gt;let bottomLeft r = (r.Left, r.Bottom)&lt;br /&gt;let width r = r.Width&lt;br /&gt;let height r = r.Height&lt;br /&gt;let inline area r = r.Width * r.Height&lt;/pre&gt;&lt;a href="http://blog.lab49.com/archives/2895"&gt;The F# overload-o-phone&lt;/a&gt; covers our discussion on arithmetic operators. The &lt;code&gt;inline&lt;/code&gt; keyword is mentioned in the comments.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Finally we looked at available API documentation. I find that I generally skim API documentation by first looking at function type signatures. The &lt;a href="http://fsharppowerpack.codeplex.com/"&gt;F# PowerPack&lt;/a&gt; is a useful library developed by the F# team and the format of the &lt;a href="http://research.microsoft.com/en-us/um/cambridge/projects/fsharp/manual/FSharp.PowerPack/Microsoft.FSharp.Math.Matrix.html"&gt;documentation&lt;/a&gt; supports my approach.&lt;br /&gt;&lt;br /&gt;The F# API documentation was previously in this format. It has now been moved to &lt;a href="http://msdn.microsoft.com/en-us/library/ee370544%28VS.100%29.aspx"&gt;MSDN&lt;/a&gt; and the list of function type signatures is not presented for each module, rendering it almost useless.&lt;/li&gt;&lt;/ol&gt;Along the way there were a few comments about F# being strictly evaluated and having no effect tracking system, no &lt;a href="http://en.wikipedia.org/wiki/Type_polymorphism"&gt;higher-order parametric polymorphism&lt;/a&gt; and no &lt;a href="http://en.wikipedia.org/wiki/Type_class"&gt;type classes&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Thanks to everyone that participated in the discussion and I hope the talk was interesting.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2069754202671317458-4932486981012235794?l=bradclow.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://bradclow.blogspot.com/feeds/4932486981012235794/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2069754202671317458&amp;postID=4932486981012235794" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2069754202671317458/posts/default/4932486981012235794?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2069754202671317458/posts/default/4932486981012235794?v=2" /><link rel="alternate" type="text/html" href="http://bradclow.blogspot.com/2010/02/f-examples-talk-at-bfg.html" title="F# examples talk at BFG" /><author><name>Brad Clow</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CEMHR3g5fSp7ImA9WxBVE08.&quot;"><id>tag:blogger.com,1999:blog-2069754202671317458.post-987251098425147947</id><published>2010-02-12T20:54:00.005+10:00</published><updated>2010-02-16T22:13:56.625+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-02-16T22:13:56.625+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="education" /><category scheme="http://www.blogger.com/atom/ns#" term="mathematics" /><category scheme="http://www.blogger.com/atom/ns#" term="qotd" /><title>QOTD</title><content type="html">&lt;blockquote&gt;The role of the proof for mathematics is similar to that for orthography or even calligraphy for poetry. A person, who had not mastered the art of the proofs in high school, is as a rule unable to distinguish correct reasoning from that which is misleading. Such people can be easily manipulated by the irresponsible politicians.&lt;br /&gt;&lt;br /&gt;-- V.I. Arnold&lt;/blockquote&gt;&lt;br /&gt;From: &lt;a href="http://www.bug-list.org/Arnold-ASR.pdf"&gt;The antiscientifical revolution and mathematics&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2069754202671317458-987251098425147947?l=bradclow.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://bradclow.blogspot.com/feeds/987251098425147947/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2069754202671317458&amp;postID=987251098425147947" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2069754202671317458/posts/default/987251098425147947?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2069754202671317458/posts/default/987251098425147947?v=2" /><link rel="alternate" type="text/html" href="http://bradclow.blogspot.com/2010/02/qotd.html" title="QOTD" /><author><name>Brad Clow</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CEANRn0zfSp7ImA9WxBWE08.&quot;"><id>tag:blogger.com,1999:blog-2069754202671317458.post-1876578041879560032</id><published>2010-02-04T21:07:00.005+10:00</published><updated>2010-02-05T08:33:17.385+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-02-05T08:33:17.385+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="programming" /><title>Pair Programming again</title><content type="html">I saw a local bank advertising a position to promote so called "sustainable software development" practices. These included Pair Programming, TDD, BDD and 100% code coverage.&lt;br /&gt;&lt;br /&gt;I have written about Pair Programming &lt;a href=" http://bradclow.blogspot.com/2008/04/pair-programming.html"&gt;before&lt;/a&gt;, but it needs re-iterating.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The value of pair programming is &lt;span style="font-weight:bold;"&gt;not&lt;/span&gt; constant - it is a function of the problem, people and technologies at hand.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;If the problem at hand is not new or not complex the value is often significantly reduced.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;On common information systems / web projects (such as at this company) the problem at hand is often neither new nor complex.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Therefore, if there is a project rule stating that all production code is to be paired on, the business value of the project will immediately be sub-optimal.&lt;/li&gt;&lt;/ul&gt;This is not rocket science. Consider a couple of competent developers pairing on the usual crud/plumbing code that makes up such a large proportion of these kinds of apps. What value is the second person really adding here vs doing something else?&lt;br /&gt;&lt;br /&gt;Anecdotally, with skilled developers of reasonable talent and discipline, the pair programming time on these types of projects doesn't need to be above 50%.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2069754202671317458-1876578041879560032?l=bradclow.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://bradclow.blogspot.com/feeds/1876578041879560032/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2069754202671317458&amp;postID=1876578041879560032" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2069754202671317458/posts/default/1876578041879560032?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2069754202671317458/posts/default/1876578041879560032?v=2" /><link rel="alternate" type="text/html" href="http://bradclow.blogspot.com/2010/02/pair-programming-again.html" title="Pair Programming again" /><author><name>Brad Clow</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;A0ACQn48fip7ImA9WxBQEUo.&quot;"><id>tag:blogger.com,1999:blog-2069754202671317458.post-6941241325473388716</id><published>2010-01-11T13:14:00.003+10:00</published><updated>2010-01-11T13:16:03.076+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-01-11T13:16:03.076+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="error" /><title>Twitter error</title><content type="html">&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_5B9pEqMIO84/S0qXspO2fQI/AAAAAAAAAIo/AcZAFHbmHPg/s1600-h/twittererror.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 314px;" src="http://1.bp.blogspot.com/_5B9pEqMIO84/S0qXspO2fQI/AAAAAAAAAIo/AcZAFHbmHPg/s400/twittererror.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5425315494359366914" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;One of the many times &lt;a href="http://twitter.com/"&gt;twitter&lt;/a&gt; has barfed on me.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2069754202671317458-6941241325473388716?l=bradclow.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://bradclow.blogspot.com/feeds/6941241325473388716/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2069754202671317458&amp;postID=6941241325473388716" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2069754202671317458/posts/default/6941241325473388716?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2069754202671317458/posts/default/6941241325473388716?v=2" /><link rel="alternate" type="text/html" href="http://bradclow.blogspot.com/2010/01/twitter-error.html" title="Twitter error" /><author><name>Brad Clow</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_5B9pEqMIO84/S0qXspO2fQI/AAAAAAAAAIo/AcZAFHbmHPg/s72-c/twittererror.jpg" height="72" width="72" /><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;D0cMQH48fCp7ImA9WxBRFks.&quot;"><id>tag:blogger.com,1999:blog-2069754202671317458.post-5223982870762802100</id><published>2010-01-05T08:03:00.003+10:00</published><updated>2010-01-05T14:18:01.074+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-01-05T14:18:01.074+10:00</app:edited><title>Home internet protection</title><content type="html">We have a few macs at home and the kids are all in primary school. As they grow up they need to learn about computing and utilise the benefits of the internet. There is also the dark side that comes with internet access. I will continue to educate them about that, but at this early stage they also need protection and as they mature, I can reduce that.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;OpenDNS&lt;/span&gt;&lt;br /&gt;Content filtering requires registering our public IP address with &lt;a href="http://opendns.com/"&gt;OpenDNS&lt;/a&gt;. Our WAN router IP is dynamic and so I would need to update OpenDNS whenever we are assigned a different IP by our ISP. They have a windows and mac client to do this, but it should really be done on the router. My router doesn't support it, so OpenDNS is not suitable.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Mac parental controls&lt;/span&gt;&lt;br /&gt;Apple has built in an option to try and restrict access to "adult" content automatically. I was pleasantly surprised to find that this worked with both Firefox and Safari.&lt;br /&gt;&lt;br /&gt;I would have preferred a centralised option such as OpenDNS so I didn't have to configure each machine. However, I will try the inbuilt mac parental controls to start with and will investigate&lt;a href="http://dansguardian.org/"&gt;DansGuardian&lt;/a&gt; should it fail.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2069754202671317458-5223982870762802100?l=bradclow.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://bradclow.blogspot.com/feeds/5223982870762802100/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2069754202671317458&amp;postID=5223982870762802100" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2069754202671317458/posts/default/5223982870762802100?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2069754202671317458/posts/default/5223982870762802100?v=2" /><link rel="alternate" type="text/html" href="http://bradclow.blogspot.com/2010/01/home-internet-protection.html" title="Home internet protection" /><author><name>Brad Clow</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry></feed>

