<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>Paint the Tiger, Carve the Swan</title>
	<atom:link href="http://schinckel.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://schinckel.net</link>
	<description>Like a fortune cookie, only without the fortune, and not a cookie.</description>
	<pubDate>Tue, 13 Apr 2010 11:14:12 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.5</generator>
	<language>en</language>
			<item>
		<title>Django templates not loading?</title>
		<link>http://schinckel.net/2010/04/13/django-templates-not-loading/</link>
		<comments>http://schinckel.net/2010/04/13/django-templates-not-loading/#comments</comments>
		<pubDate>Tue, 13 Apr 2010 11:14:12 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[django]]></category>

		<guid isPermaLink="false">http://schinckel.net/2010/04/13/django-templates-not-loading/</guid>
		<description><![CDATA[Had an annoying issue today after upgrading an installation of django to the trunk. All of a sudden, my admin interface would not load. I had errors stating that the template admin/login.html could not be loaded.
Now, django.contrib.admin was in settings.INSTALLED_APPS, and django.template.loaders.app_directories.Loader was in settings.TEMPLATE_LOADERS.
So, why was django throwing an exception? To find out, I [...]]]></description>
			<content:encoded><![CDATA[<p>Had an annoying issue today after upgrading an installation of django to the trunk. All of a sudden, my admin interface would not load. I had errors stating that the template <code>admin/login.html</code> could not be loaded.</p>
<p>Now, django.contrib.admin was in settings.INSTALLED_APPS, and <code>django.template.loaders.app_directories.Loader</code> was in <code>settings.TEMPLATE_LOADERS</code>.</p>
<p>So, why was django throwing an exception? To find out, I stepped into a shell:</p>
<pre>
&gt;&gt;&gt; from django.template.loader import find_template_loader
&gt;&gt;&gt; loader = find_template_loader('django.template.loaders.app_directories.Loader')
&gt;&gt;&gt; loader.load_template('admin/login.html')
</pre>
<p>This was where I realised something was wrong. I don&#8217;t get the error now (as I have fixed it), but it complained about being not allowed to open the file. As in a permissions error.</p>
<p>Looking up the location in a new shell, I was able to see that all of the files in the <code>django.contrib.admin.templates</code> directory were only able to be read by root. For some reason, <code>python setup.py install</code> had set the mode of these files to <i>0600</i>, instead of the expected <i>0644</i>. A quick <code>sudo chmod -r ag+r templates</code> (from inside the <code>django.contrib.admin</code> directory) fixed it.</p>
]]></content:encoded>
			<wfw:commentRss>http://schinckel.net/2010/04/13/django-templates-not-loading/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Dvorak and VMWare Fusion</title>
		<link>http://schinckel.net/2010/04/06/dvorak-and-vmware-fusion/</link>
		<comments>http://schinckel.net/2010/04/06/dvorak-and-vmware-fusion/#comments</comments>
		<pubDate>Tue, 06 Apr 2010 00:00:49 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[Dvorak]]></category>

		<category><![CDATA[VMWare Fusion]]></category>

		<guid isPermaLink="false">http://schinckel.net/?p=1686</guid>
		<description><![CDATA[I made the choice a year or so ago to go Dvorak: I was on holidays and I spent the time I was free doing a typing tutor. I really liked how quickly I was able to make the transition. Most words and sentences can be written with little movement of the fingers off the [...]]]></description>
			<content:encoded><![CDATA[<p>I made the choice a year or so ago to go Dvorak: I was on holidays and I spent the time I was free doing a typing tutor. I really liked how quickly I was able to make the transition. Most words and sentences can be written with little movement of the fingers off the home row.</p>
<p>I also use the Programmers Dvorak layout, including swapping the orientation of the numeric keypad to be more like a phone, not a calculator.  This was the only part I needed to actually swap the keycaps on my keyboards around on, as I touch-type on the main keyboard, but tend to look a bit more when entering values.</p>
<p>I have noticed that quite a few applications don&#8217;t handle a different keymap that well. It appears they are using the keycodes, which are independent of the values that should be presented to the operating system. I can understand why this is in many cases: for games for instance, you want to be able to continue to walk around using the aswd keys in World of Warcraft regardless of the layout of the keymap.</p>
<p>I guess it makes a bit of sense to pass through this stuff to the virtual machine too: after all, it has its own keymap to interpret. With VMWare Fusion, however, the translation of Mac Shortcuts to Windows Shortcuts is slightly broken. Because on my keymap, the ⌘-keys match their keycode (didn&#8217;t want to re-learn all of the shortcut keys), then they are not passed through correctly.</p>
<p>Luckily, they are editable in the VMWare Fusion preferences.</p>
<p>Mine now look like this:</p>
<p><a href="http://schinckel.net/blog/wp-content/uploads/2010/04/vmwarekeyboardshortucts.png"><img src="http://schinckel.net/blog/wp-content/uploads/2010/04/vmwarekeyboardshortucts-300x128.png" alt="" title="vmwarekeyboardshortucts" width="300" height="128" class="alignnone size-medium wp-image-1687" /></a></p>
<p>Now, I can hit ⌘S in notepad, under Windows, and it saves my document. And I can use the cut/copy/paste/undo shortcuts again!</p>
]]></content:encoded>
			<wfw:commentRss>http://schinckel.net/2010/04/06/dvorak-and-vmware-fusion/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Am I connected remotely?</title>
		<link>http://schinckel.net/2010/03/30/am-i-connected-remotely/</link>
		<comments>http://schinckel.net/2010/03/30/am-i-connected-remotely/#comments</comments>
		<pubDate>Tue, 30 Mar 2010 14:01:34 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[MacOS X]]></category>

		<category><![CDATA[bash]]></category>

		<guid isPermaLink="false">http://schinckel.net/2010/03/30/am-i-connected-remotely/</guid>
		<description><![CDATA[I now share my dotfiles between the various OS X machines I use daily, using Dropbox and symlinks.
However, I have many aliases and functions that need to act differently if I only have a console session at the machine in question, or a full GUI session.
With bash, this is easy to test:

export EDITOR='nano'
if [[ -z [...]]]></description>
			<content:encoded><![CDATA[<p>I now share my dotfiles between the various OS X machines I use daily, using Dropbox and symlinks.</p>
<p>However, I have many aliases and functions that need to act differently if I only have a console session at the machine in question, or a full GUI session.</p>
<p>With bash, this is easy to test:</p>
<pre>
<code>export EDITOR='nano'
if [[ -z "$SSH_CONNECTION" &amp;&amp; $OSTYPE =~ ^darwin ]]; then
export EDITOR='mate --wait'
export TEXEDIT='mate -w -l %d "%s"'
export LESSEDIT='mate -l %lm %f'
fi</code>
</pre>
<p>Now, if I am remotely connected to a machine, then I will get <code>nano</code> as my editor, but if I am sitting directly in front of it, then it will open Textmate.</p>
]]></content:encoded>
			<wfw:commentRss>http://schinckel.net/2010/03/30/am-i-connected-remotely/feed/</wfw:commentRss>
		</item>
		<item>
		<title>django-bshell</title>
		<link>http://schinckel.net/2010/03/28/django-bshell/</link>
		<comments>http://schinckel.net/2010/03/28/django-bshell/#comments</comments>
		<pubDate>Sun, 28 Mar 2010 13:59:23 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[Python]]></category>

		<category><![CDATA[django]]></category>

		<guid isPermaLink="false">http://schinckel.net/2010/03/28/django-bshell/</guid>
		<description><![CDATA[bpython is pretty cool. It gives you an improved python shell, with popups of completeable values. About the only drawback is that some command-line editing doesn&#8217;t work that well, but I can live with that.
I made a django app that provides a new management command: bshell. This will start a new shell, using bpython, and [...]]]></description>
			<content:encoded><![CDATA[<p>bpython is pretty cool. It gives you an improved python shell, with popups of completeable values. About the only drawback is that some command-line editing doesn&#8217;t work that well, but I can live with that.</p>
<p>I made a django app that provides a new management command: bshell. This will start a new shell, using bpython, and import all of your models.</p>
<p>You can get it with:</p>
<p><code>pip install django-bshell</code></p>
<p>And then install it into your django settings.INSTALLED apps. The app itself is called &#8216;bshell&#8217;. Then you can just use:</p>
<p><code>django-admin.py bshell</code></p>
<p>The code can be found on <a href="http://bitbucket.org/schinckel/django-bpython/">bitbucket</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://schinckel.net/2010/03/28/django-bshell/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Issues with PyPI/other python.org sites</title>
		<link>http://schinckel.net/2010/03/28/issues-with-pypiother-pythonorg-sites/</link>
		<comments>http://schinckel.net/2010/03/28/issues-with-pypiother-pythonorg-sites/#comments</comments>
		<pubDate>Sun, 28 Mar 2010 10:57:27 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[Airport Extreme]]></category>

		<guid isPermaLink="false">http://schinckel.net/2010/03/28/issues-with-pypiother-pythonorg-sites/</guid>
		<description><![CDATA[I was having some issues connecting to (although not pinging) python.org and some of the python-subdomains: notably the CheeseShop (http://pypi.python.org).
I disabled IPv6, and they all cleared up.
I don&#8217;t know if this was an issue with Internode&#8217;s IPv6 stuff, but it was being handled by my Airport Extreme. My iPhone was working fine, because it doesn&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>I was having some issues connecting to (although not pinging) python.org and some of the python-subdomains: notably the CheeseShop (http://pypi.python.org).</p>
<p>I disabled IPv6, and they all cleared up.</p>
<p>I don&#8217;t know if this was an issue with Internode&#8217;s IPv6 stuff, but it was being handled by my Airport Extreme. My iPhone was working fine, because it doesn&#8217;t use IPv6.</p>
<p>What a relief.</p>
<p>I had tried everything I could think of: from changing my DNS server, DHCP server, I even tried a reinstall of my OS (although this wasn&#8217;t why I did that - I wanted a cleanup of my dev machine).</p>
]]></content:encoded>
			<wfw:commentRss>http://schinckel.net/2010/03/28/issues-with-pypiother-pythonorg-sites/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Django Management.tmbundle</title>
		<link>http://schinckel.net/2010/02/28/django-managementtmbundle/</link>
		<comments>http://schinckel.net/2010/02/28/django-managementtmbundle/#comments</comments>
		<pubDate>Sun, 28 Feb 2010 05:29:38 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[django]]></category>

		<category><![CDATA[Testing]]></category>

		<category><![CDATA[TextMate]]></category>

		<guid isPermaLink="false">http://schinckel.net/2010/02/28/django-managementtmbundle/</guid>
		<description><![CDATA[Did some work on my Django Management.tmbundle last night.
It now handles running tests when (a) The apps are not directly in the project root, but inside another folder, for instance; and (b) the app/tests.py file has been split into seperate files.
The main reason I made this was so that I could run tests and have [...]]]></description>
			<content:encoded><![CDATA[<p>Did some work on my <a href="ttp://github.com/schinckel/Django-Management.tmbundle">Django Management.tmbund</a>le last night.</p>
<p>It now handles running tests when (a) The apps are not directly in the project root, but inside another folder, for instance; and (b) the app/tests.py file has been split into seperate files.</p>
<p>The main reason I made this was so that I could run tests and have clickable links in the results window for the location of failing tests.</p>
<p>There is still much to do on this. I am considering re-writing it in python rather than ruby, so I can programmatically find the app name, rather than guess it. I also want to refactor the hell out of it and make it much nicer.</p>
<p>Anyway, if you are interested, you can find the most recent version at h<a href="ttp://github.com/schinckel/Django-Management.tmbundle">ttp://github.com/schinckel/Django-Management.tmbundle</a> - and I think it also appears in TextMate&#8217;s getBundles bundle.</p>
]]></content:encoded>
			<wfw:commentRss>http://schinckel.net/2010/02/28/django-managementtmbundle/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Images in placeholder for input fields</title>
		<link>http://schinckel.net/2010/02/28/images-in-placeholder-for-input-fields/</link>
		<comments>http://schinckel.net/2010/02/28/images-in-placeholder-for-input-fields/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 22:58:39 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://schinckel.net/2010/02/28/images-in-placeholder-for-input-fields/</guid>
		<description><![CDATA[Since I have been doing a heap of web/html dev lately, I&#8217;ve taken to noticing things. Today, on MacWorld, I noticed this:

Clicking in the search box results in:

So, there is an image in the placeholder. This is very neat!
Unfortunately, it appears this might not be a part of the HTML5 spec, but is done using [...]]]></description>
			<content:encoded><![CDATA[<p>Since I have been doing a heap of web/html dev lately, I&#8217;ve taken to noticing things. Today, on MacWorld, I noticed this:</p>
<p><a href="http://schinckel.net/images/Google-search-placeholder.png"><img src="http://schinckel.net/images/Google-search-placeholder.png" alt="Google-search-placeholder" /></a></p>
<p>Clicking in the search box results in:</p>
<p><a href="http://schinckel.net/images/Google-search-placeholder-focus.png"><img src="http://schinckel.net/images/Google-search-placeholder-focus.png" alt="Google-search-placeholder-focus" /></a></p>
<p>So, there is an image in the placeholder. This is very neat!</p>
<p>Unfortunately, it appears this might not be a part of the HTML5 spec, but is done using JavaScript.</p>
]]></content:encoded>
			<wfw:commentRss>http://schinckel.net/2010/02/28/images-in-placeholder-for-input-fields/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Copy password button in Keychain.app</title>
		<link>http://schinckel.net/2010/02/28/copy-password-button-in-keychainapp/</link>
		<comments>http://schinckel.net/2010/02/28/copy-password-button-in-keychainapp/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 22:27:20 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[MacOS X]]></category>

		<guid isPermaLink="false">http://schinckel.net/2010/02/28/copy-password-button-in-keychainapp/</guid>
		<description><![CDATA[I don&#8217;t know if this is new or not, but I haven&#8217;t noticed it before. My normal workflow for Keychain.app and finding a forgotten password (ie, my Twitter one to put into a new app) is to open the password entry, and copy the value.
Today, I noticed a Copy button at the bottom of the [...]]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t know if this is new or not, but I haven&#8217;t noticed it before. My normal workflow for Keychain.app and finding a forgotten password (ie, my Twitter one to put into a new app) is to open the password entry, and copy the value.</p>
<p>Today, I noticed a Copy button at the bottom of the window:</p>
<p><a href="http://schinckel.net/images/Keychain%20Access.png"><img src="http://schinckel.net/images/Keychain%20Access.png" alt="Keychain Access" /></a></p>
<p>This still requires you to enter your keychain password to authorise the copy, but saves a step or two.</p>
]]></content:encoded>
			<wfw:commentRss>http://schinckel.net/2010/02/28/copy-password-button-in-keychainapp/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Combining recurring events with approval</title>
		<link>http://schinckel.net/2010/02/25/combining-recurring-events-with-approval/</link>
		<comments>http://schinckel.net/2010/02/25/combining-recurring-events-with-approval/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 09:09:33 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://schinckel.net/2010/02/25/combining-recurring-events-with-approval/</guid>
		<description><![CDATA[A while ago, I talked about the issues with taking a set of potentially recurring events and merging them into the least number of events that fully describe all of the occurrences. This was a bit of a challenge, but with a TDD process, I was able to get something that, as far as my [...]]]></description>
			<content:encoded><![CDATA[<p>A while ago, I talked about the issues with taking a set of potentially recurring events and merging them into the least number of events that fully describe all of the occurrences. This was a bit of a challenge, but with a TDD process, I was able to get something that, as far as my testing tells me works. Thus, deleting one middle occurrence of a recurring event results in two events being left, and re-creating that occurrence results in the one event being created.</p>
<p>This goes even further, with occurrences that touch or overlap being merged into potentially a new event. This is a requirement of our problem domain, since these events are used to see if a person is available to perform a task, and two adjacent occurrences would otherwise make it hard to determine if the person is indeed available.</p>
<p>So, it turns out that this is only part of the problem. In addition, changes to availability may require approval by a manager. So, in addition to being able to merge objects, we also need to be able to merge pending objects with one another, and mark pending objects as superseding other objects. And, even more fun, if a pending object is created that matches a pending-deletion object, for instance, then that object is restored: the two pending events cancel one another out. Finally, a pending object can also be &#8216;psuedo-merged&#8217; with an availability, where it then is the union of the two events, and supersedes the approved event!</p>
<p>This problem is even stickier than the previous part. Having said that, I have it working, although at this stage it is not possible to have recurring pending events. Things were made even more difficult by the way that I handle superseding events. This cannot be just references in the database, as events and occurrences may be deleted and created by saving another event, so a different method of keeping track of which events are superseded is required.</p>
<p>The good news is, this is coming along well. It did occur to me on the way home today that without &#8216;never ending&#8217; events, this would possibly collapse the problem space down. Occurrences would no longer need to be recreated quite as often, and indeed they may be the sole storage representation: abstract events could then be created on the fly, purely for descriptive purposes. All I need is some way to represent events that don&#8217;t have an end date…</p>
<p>…or I could make it that never-ending events must end in 2050. Then, any event that ends that year will be represented to the user as never-ending. This seems like a slippery Y2K-style slope, but if I keep moving the goal-posts, then it might work. And simplify my code immensely. It turns out there are only ~2100 weeks until then, and my events at this stage only occur weekly (it makes the simplification simpler to only have to look for weekly patterns, and that is how people usually determine their schedule).</p>
<p>I&#8217;m glad we had this little chat.</p>
]]></content:encoded>
			<wfw:commentRss>http://schinckel.net/2010/02/25/combining-recurring-events-with-approval/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Combining recurring events</title>
		<link>http://schinckel.net/2010/02/09/combining-recurring-events/</link>
		<comments>http://schinckel.net/2010/02/09/combining-recurring-events/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 06:20:16 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://schinckel.net/2010/02/09/combining-recurring-events/</guid>
		<description><![CDATA[On a project I am working on for work at the moment, we have a need to handle recurring events. These events need to be merged if they are the same and can be simplified in any way. As it turns out, this is quite a tricky problem.
There are really only two ways that events [...]]]></description>
			<content:encoded><![CDATA[<p>On a project I am working on for work at the moment, we have a need to handle recurring events. These events need to be merged if they are the same and can be simplified in any way. As it turns out, this is quite a tricky problem.</p>
<p>There are really only two ways that events can be merged. If two events have the same frequency, and occur on the same day, or on consecutive days according to the period, and they have the same start and finish times, then they can be merged into one.</p>
<p>Similarly, if two events have the same period, occur on all of the same days, and overlap or touch in times, they can be merged into a single event.</p>
<p>From there, it starts to get complicated. Two events that partially overlap may be able to merge parts of themselves, possibly resulting in an extra event being created.</p>
<p>For instance, an event every Tuesday at 9am-12noon, that lasts for 10 weeks, and another event every Tuesday 11am-2pm that starts 5 weeks later, and also runs for 10 weeks, will result in 3 events: one that lasts 5 weeks 9-12, one that lasts 5 more weeks 9-2, and one that lasts a further 5 weeks 11-2.</p>
<p>This on its own is easy to deal with, but as soon as you consider events that have no end date, things get tricky quickly.</p>
]]></content:encoded>
			<wfw:commentRss>http://schinckel.net/2010/02/09/combining-recurring-events/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
