<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>TonyAndrewMeyer</title>
	<atom:link href="http://tonyandrewmeyer.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://tonyandrewmeyer.wordpress.com</link>
	<description>Various (non-family) musings</description>
	<lastBuildDate>Tue, 22 Sep 2009 00:40:52 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='tonyandrewmeyer.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/f23cc03cb18f96bcd4024032f62daa8e?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>TonyAndrewMeyer</title>
		<link>http://tonyandrewmeyer.wordpress.com</link>
	</image>
			<item>
		<title>More notes coming soon</title>
		<link>http://tonyandrewmeyer.wordpress.com/2009/09/21/more-notes-coming-soon/</link>
		<comments>http://tonyandrewmeyer.wordpress.com/2009/09/21/more-notes-coming-soon/#comments</comments>
		<pubDate>Tue, 22 Sep 2009 00:40:52 +0000</pubDate>
		<dc:creator>tonyandrewmeyer</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[teaching]]></category>
		<category><![CDATA[d520]]></category>
		<category><![CDATA[delay]]></category>
		<category><![CDATA[IronPython]]></category>

		<guid isPermaLink="false">http://tonyandrewmeyer.wordpress.com/2009/09/21/more-notes-coming-soon/</guid>
		<description><![CDATA[I am still putting together the weekly D520 notes. However, the last couple of weeks have been a bit busy and so they&#8217;re waiting to be cleaned up and have links added. The intra-semester break starts next week so I&#8217;ll catch up then. 
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tonyandrewmeyer.wordpress.com&blog=36233&post=211&subd=tonyandrewmeyer&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I am still putting together the weekly D520 notes. However, the last couple of weeks have been a bit busy and so they&#8217;re waiting to be cleaned up and have links added. The intra-semester break starts next week so I&#8217;ll catch up then. </p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tonyandrewmeyer.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tonyandrewmeyer.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tonyandrewmeyer.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tonyandrewmeyer.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tonyandrewmeyer.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tonyandrewmeyer.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tonyandrewmeyer.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tonyandrewmeyer.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tonyandrewmeyer.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tonyandrewmeyer.wordpress.com/211/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tonyandrewmeyer.wordpress.com&blog=36233&post=211&subd=tonyandrewmeyer&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://tonyandrewmeyer.wordpress.com/2009/09/21/more-notes-coming-soon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d64dfbf30e9685c0cabe10bdc9ee7b57?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=PG" medium="image">
			<media:title type="html">tonyandrewmeyer</media:title>
		</media:content>
	</item>
		<item>
		<title>D520 &#8211; Week Six</title>
		<link>http://tonyandrewmeyer.wordpress.com/2009/09/07/d520-week-six/</link>
		<comments>http://tonyandrewmeyer.wordpress.com/2009/09/07/d520-week-six/#comments</comments>
		<pubDate>Tue, 08 Sep 2009 09:31:20 +0000</pubDate>
		<dc:creator>tonyandrewmeyer</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[teaching]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[d520]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[IronPython]]></category>
		<category><![CDATA[ironpython in action]]></category>
		<category><![CDATA[problems]]></category>
		<category><![CDATA[sdk]]></category>
		<category><![CDATA[sp1]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://tonyandrewmeyer.wordpress.com/?p=196</guid>
		<description><![CDATA[Chapter 6 of IronPython in Action covers &#8220;properties, dialogs, and Visual Studio&#8221;.  This seemed an obvious place to insert the material on user-interface design that is normally covered in the course, and to look a bit more deeply than the textbook does at Visual Studio itself (and the Windows Forms controls and their properties).  I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tonyandrewmeyer.wordpress.com&blog=36233&post=196&subd=tonyandrewmeyer&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Chapter 6 of <a href="http://ironpythoninaction.com">IronPython in Action</a> covers &#8220;properties, dialogs, and Visual Studio&#8221;.  This seemed an obvious place to insert the material on user-interface design that is normally covered in the course, and to look a bit more deeply than the textbook does at <a href="http://www.microsoft.com/express/">Visual Studio</a> itself (and the Windows Forms controls and their properties).  I only scheduled a single week to cover this, but I suspected that it might take more than one (I left an empty slot in the schedule to cover one such over-run), and that was, indeed, the case.  The students received <a href="http://files.me.com/tonyandrewmeyer/4knt5w">notes</a> [PDF], slightly longer this week (covering the UI design material not in the textbook, as well as the usual chapter summary, key points, and examples, and the steps required to install <a href="http://ironpython.codeplex.com">IronPython</a> support in the &#8216;Experimental Hive&#8217; Visual Studio SDK), and a fairly simple lab exercise [PDF].<span id="more-196"></span></p>
<p>The recommended reading for this week (which I didn&#8217;t get a chance to mention, but is listed in the course material) is <a href="http://www.paulgraham.com/fix.html">a very light-hearted comparison of different programming languages</a> (somewhat old, so the students probably don&#8217;t actually know many of these, but I like the underlying truths &#8211; I guess I should have tried to add languages like Ruby, PHP and Javascript myself) and <a href="http://wilshipley.com/blog/2007/05/pimp-my-code-part-14-be-inflexible.html">a Wil Shipley article about the fast/good/cheap trade-off</a>.  I really enjoy Shipley&#8217;s style of writing, but even if I didn&#8217;t, I&#8217;d include this article: the point about there being many dimensions (brevity, features, speed, time, robustness, flexibility, &#8230;) and that you can&#8217;t have them all is really important for starting developers to understand.  However, even more than that, I really agree with Shipley&#8217;s contention that you should always start with brevity.</p>
<p>The first half of the class is straight from previous offerings of the course (although a little condensed), and is basically just a 90 minute talk about user-interface design, aimed at non-designers.  As previously, I use the points from <a href="http://www.asktog.com/basics/firstPrinciples.html">Tog&#8217;s First Principles of Design</a> as the outline, although I talk about more than just what&#8217;s in the article (and only skim over some parts of it).  The course isn&#8217;t really about UI/UX design, but it is an important element, and I try to emphasise it in some way each week (and many of the recommended reading articles are about some sort of UI/UX design).  For the two projects, the students will have to complete not just a development design document, but also a UI design, <em>including an explanation of why they made the decisions they did</em>.  Historically, this is notoriously badly done for the first project, with most students (despite my emphasis when outlining the project, and giving them a marking schedule) submitting nothing more than a screenshot of a Visual Studio mock-up.  For the first project, all I really need to see is that they&#8217;ve considered <strong>something</strong>, rather than just thrown things together &#8211; by the end of the course, I expect that they should be able to put something together that is a reasonable UI.  There has historically been an examination question on this topic as well &#8211; something along the lines of &#8220;outline three important considerations in user-interface design&#8221;.</p>
<p>The biggest issue was in installation &#8211; again!  I carefully tested running through the installation on a clean copy of the Windows image they have.  It was slow (so I recommended doing it before coming to class, and planned to kick it off at the start and only start using it a couple of hours later, after the UI talk), but worked fine.  I forgot, however, about the <a href="http://northtec.ac.nz">Northtec</a> proxy server that blocks so much Internet functionality.  There were basically three steps required to get the &#8220;Experimental Hive&#8221; version of Visual Studio running with IronPython (1, unfortunately) support: install Visual Studio 2008 SP1, install Visual Studio 2008 SDK, compile the IronPython sample.</p>
<p>The Visual Studio SP1 installer is one of the &#8220;stub&#8221; installers that are popular in some circles &#8211; i.e. it&#8217;s a very small installer that then downloads whatever is necessary to complete the installation.  While there are some merits in this approach, it doesn&#8217;t work well in all situations: this was one of those.  It seems that the service pack installer only support proxies that provide auto-discovery, which the Northtec proxy does not.  That left two alternatives: force the students to download and install the service pack (many hundreds of MB) outside of the lab, or use the .iso version of the SP.  I downloaded the .iso (830 MB!), and that installed without problem in the lab.  However, I don&#8217;t really have a convenient way to distribute files of that size among the class (generally the files I provide are quite small) &#8211; if I had realised this in advance I could have had it added to the file server, but that wasn&#8217;t really feasible in the time available.</p>
<p>I had to fall back to copying the files on to a USB drive (1GB, so max&#8217;ing it out) and distributing them via <a href="http://en.wikipedia.org/wiki/Sneakernet">sneakernet</a>.  Figuring out all of this (around the actual teaching) took most of the class, so when I left I had only got this far (i.e. halfway through step 1 of 3).  The SP installation should be trouble-free (but will probably take 30-60 minutes), so the students should have that done by next class.  We&#8217;ll continue with the SDK installation (~120 MB standard installer) and IronPython compilation at that point.  Next year, I&#8217;ll make sure that SP1 is installed on the image, side-stepping this whole problem (I hadn&#8217;t got to testing software installation when the images were created this year, because I knew that I wanted the students to do installation themselves).  Of course, I could be really lucky, and V<a href="https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=475830&amp;wa=wsignin1.0">isual Studio 2010 might include built-in IronPython support</a>.</p>
<p>We were able to use Visual Studio in the method described in <a href="http://ironpythoninaction.com">IronPython in Action</a>, however (creating class libraries in Visual Studio and subclassing in IronPython).  I think the students found this less appealing that I do &#8211; moving the generated .dll around was problematic for some of the students, for example.  I suspect that even though using IronPython directly in Visual Studio is problematic (e.g. stuck with IronPython 1) many students will elect to do that.</p>
<p>To me, properties seem a bit like decorators and lambdas, in that they are slightly advanced Python, and perhaps a bit ahead of where the students generally are in D520.  However, we certainly covered properties in Visual Basic, and the fundamentals are the same, really.  The MultiDoc example was very useful here, in that it uses properties to implement observers, so there was a practical use for properties, rather than the toy examples that are often used in explaining <em>why </em>you&#8217;d want to hide your attributes behind getters and setters.  I think that the students understood the general idea.  As part of this, I briefly covered the observer pattern, as outlined in the textbook &#8211; perhaps it&#8217;s just the work that I&#8217;ve done, but I come across observers all the time, so I tried to get across the importance of this idea.</p>
<p>My plan at this stage is to find somewhere in the schedule where I can insert an &#8220;Advanced Python Refresher&#8221;, where the students can take another look at decorators, properties, lambdas, and anything else that comes up along these lines.  I doubt many (maybe any) students will use these techniques in their projects, but I do expect that they&#8217;ll feature in the final examination &#8211; and will probably be a good indicator of the good programmers (those that really understand programming and might end up doing it professionally) versus the good students (those that put in enough effort to get through, but are really suited for other IT jobs &#8211; sysadmin, testing, managing, etc).</p>
<p>Chapter 6 has nicely thorough coverage of the very versatile MessageBox, but it&#8217;s not really overly complicated to use, if you have a list of the icon and button options available (as in the book, or on MSDN).  Since we&#8217;ve seen MessageBox a few times already, I skipped over this material, focusing instead on the custom dialogs.  The chapter also has a section on serialising in .NET &#8211; the students are already familiar with the <a href="http://docs.python.org/library/pickle.html">pickle</a> module, so this is really just a .NET version of something they already know.  I originally intended to cover this next week, but if time is short again, I might just skip it completely (since they can easily use pickle instead).</p>
<p>We ran out of time before I could really go over the MultiDoc code from Chapter 6, so I left that for the next week.</p>
<p>The lab exercise was just redesigning the Airline application used in earlier labs.  There were two aims here &#8211; firstly to get the students to try out the various controls that are available (it&#8217;s easier to explore in Visual Studio, even if you end up using the controls in hand-written code).  Secondly, the students must design their projects, including the UI, and submit that design.  This doesn&#8217;t just mean &#8217;sketch the UI&#8217; &#8211; it means consider and explain the reasons behind the UI decisions &#8211; hopefully the lab started students on the road to doing this properly in the project.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tonyandrewmeyer.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tonyandrewmeyer.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tonyandrewmeyer.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tonyandrewmeyer.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tonyandrewmeyer.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tonyandrewmeyer.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tonyandrewmeyer.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tonyandrewmeyer.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tonyandrewmeyer.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tonyandrewmeyer.wordpress.com/196/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tonyandrewmeyer.wordpress.com&blog=36233&post=196&subd=tonyandrewmeyer&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://tonyandrewmeyer.wordpress.com/2009/09/07/d520-week-six/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d64dfbf30e9685c0cabe10bdc9ee7b57?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=PG" medium="image">
			<media:title type="html">tonyandrewmeyer</media:title>
		</media:content>
	</item>
		<item>
		<title>Mailbox flattening messages</title>
		<link>http://tonyandrewmeyer.wordpress.com/2009/08/30/mailbox-flattening-messages/</link>
		<comments>http://tonyandrewmeyer.wordpress.com/2009/08/30/mailbox-flattening-messages/#comments</comments>
		<pubDate>Mon, 31 Aug 2009 09:35:44 +0000</pubDate>
		<dc:creator>tonyandrewmeyer</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[mailbox]]></category>
		<category><![CDATA[unicode]]></category>
		<category><![CDATA[unicodedecodeerror]]></category>

		<guid isPermaLink="false">http://tonyandrewmeyer.wordpress.com/?p=202</guid>
		<description><![CDATA[The mailbox.py code does this to dump a message (e.g. when adding to a Maildir file):
def _dump_message(self, message, target, mangle_from_=False):
    # Most files are opened in binary mode to allow predictable seeking.
    # To get native line endings on disk, the user-friendly \n line endings
    # [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tonyandrewmeyer.wordpress.com&blog=36233&post=202&subd=tonyandrewmeyer&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>The <a href="http://docs.python.org/library/mailbox.html">mailbox.py</a> code does this to dump a message (e.g. when adding to a Maildir file):</p>
<pre>def _dump_message(self, message, target, mangle_from_=False):
    # Most files are opened in binary mode to allow predictable seeking.
    # To get native line endings on disk, the user-friendly \n line endings
    # used in strings and by email.Message are translated here.
    """Dump message contents to target file."""
    if isinstance(message, email.Message.Message):
        buffer = StringIO.StringIO()
        gen = email.Generator.Generator(buffer, mangle_from_, 0)
        gen.flatten(message)
        buffer.seek(0)
        target.write(buffer.read().replace('\n', os.linesep))
    elif isinstance(message, str):
        if mangle_from_:
            message = message.replace('\nFrom ', '\n&gt;From ')
        message = message.replace('\n', os.linesep)
        target.write(message)</pre>
<p>(There&#8217;s a bit more that deals with other types of message).  Unfortunately, with some messages containing Unicode characters, this breaks with a UnicodeDecodeError:</p>
<pre>Traceback (most recent call last):
  File "", line 1, in
  File "/usr/lib/python2.5/mailbox.py", line 245, in add
    self._dump_message(message, tmp_file)
  File "/usr/lib/python2.5/mailbox.py", line 203, in _dump_message
    buffer.seek(0)
  File "/usr/lib/python2.5/StringIO.py", line 106, in seek
    self.buf += ''.join(self.buflist)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd6 in position 106: ordinal not in range(128)</pre>
<p>The message does flatten with message.as_string() &#8211; or str(message) &#8211; without any problems.  I&#8217;m not really sure why mailbox.py doesn&#8217;t just use as_string(), rather than create a generator itself.  I&#8217;m also not totally sure where the error is coming from, especially since it happens inside of seek().</p>
<p>For now, I can just call mailbox.add() with msg.as_string(), rather than with msg directly, and it&#8217;ll work fine.  At some point, if I have time, I&#8217;ll revisit this and try and figure out if it&#8217;s a <a href="http://python.org">Python</a> <a href="http://bugs.python.org/">bug</a> that should be reported.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tonyandrewmeyer.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tonyandrewmeyer.wordpress.com/202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tonyandrewmeyer.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tonyandrewmeyer.wordpress.com/202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tonyandrewmeyer.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tonyandrewmeyer.wordpress.com/202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tonyandrewmeyer.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tonyandrewmeyer.wordpress.com/202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tonyandrewmeyer.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tonyandrewmeyer.wordpress.com/202/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tonyandrewmeyer.wordpress.com&blog=36233&post=202&subd=tonyandrewmeyer&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://tonyandrewmeyer.wordpress.com/2009/08/30/mailbox-flattening-messages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d64dfbf30e9685c0cabe10bdc9ee7b57?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=PG" medium="image">
			<media:title type="html">tonyandrewmeyer</media:title>
		</media:content>
	</item>
		<item>
		<title>Forced Materialism</title>
		<link>http://tonyandrewmeyer.wordpress.com/2009/08/29/forced-materialism/</link>
		<comments>http://tonyandrewmeyer.wordpress.com/2009/08/29/forced-materialism/#comments</comments>
		<pubDate>Sun, 30 Aug 2009 10:10:22 +0000</pubDate>
		<dc:creator>tonyandrewmeyer</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[birthday]]></category>
		<category><![CDATA[charity]]></category>
		<category><![CDATA[donation]]></category>
		<category><![CDATA[gift]]></category>
		<category><![CDATA[happiness]]></category>
		<category><![CDATA[materialism]]></category>
		<category><![CDATA[party]]></category>
		<category><![CDATA[present]]></category>
		<category><![CDATA[sam]]></category>
		<category><![CDATA[samuel]]></category>

		<guid isPermaLink="false">http://tonyandrewmeyer.wordpress.com/?p=191</guid>
		<description><![CDATA[Fewer people than normal (is there a &#8220;normal&#8221; after only three?) asked what to get Samuel for his birthday this year &#8211; perhaps they all asked Olyvia and she didn&#8217;t mention it, or perhaps people know him better, or perhaps it&#8217;s just easier to buy for a three-year-old.  My stock response (which I tried, fairly [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tonyandrewmeyer.wordpress.com&blog=36233&post=191&subd=tonyandrewmeyer&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Fewer people than normal (is there a &#8220;normal&#8221; after only three?) asked what to get Samuel for his birthday this year &#8211; perhaps they all asked Olyvia and she didn&#8217;t mention it, or perhaps people know him better, or perhaps it&#8217;s just easier to buy for a three-year-old.  My stock response (which I tried, fairly successfully, to get Olyvia to use as well) was as follows (this didn&#8217;t apply to parents or grandparents):</p>
<blockquote><p>Sam has so many toys that he just doesn&#8217;t have time to play with everything.  He has toys in his toy box that he hasn&#8217;t even played with yet.  He really doesn&#8217;t need any more at the moment.  He also has heaps of books and clothes.  If you want to buy him a present, then you are, of course, welcome to do so.  In that case, our suggestions are:</p>
<p>* Make him something.  He&#8217;s a bit of a fussy eater these days, unfortunately, so food might not be a good choice.  If you can think of something else to make, then that would fine.<br />
* Something to do.  e.g. an IOU for a trip with you to somewhere. This could be as simple as a picnic at a park somewhere &#8211; he loves being outside.<br />
* A donation to a charity and a card (he likes opening mail) saying what you did.  He&#8217;s not going to understand it now, but when he&#8217;s older, he&#8217;ll hopefully think that was really cool, and right now he already has so much stuff.</p></blockquote>
<p>My hope was really for the latter &#8211; we actually do quite a few things already, so there isn&#8217;t a pressing need for the middle choice.  Making him something is great, but it seemed unlikely to appeal to many givers.  We did actually try this once before &#8211; suggesting a donation to a charity (<a href="http://www.starship.org.nz/">Starship</a>, I think) as a Christening present.  If I recall correctly, we didn&#8217;t get a single bite that time.<span id="more-191"></span></p>
<p>Samuel&#8217;s party was yesterday, and he had something like 50 people attend (perhaps 25 groups, e.g. families).  I know there are a few more presents coming, but the bulk will have been dealt with so far.  It wasn&#8217;t a total win, but we did have two or three people that chose to do a donation, which <strong>really</strong> pleases me (and I hope will please Samuel when he&#8217;s old enough to understand).  We also have a lot of stuff that I&#8217;m (of course) really grateful that people bought for Sam, but will hardly (if at all) get played with and will end up just getting donated somewhere.  On the &#8220;something to do&#8221; side, he did get supplies for baking (which he loves) and gardening (which he might get interested in) &#8211; not exactly what I had in mind, but good gift choices in my mind.  There were home-made cards and wrapping paper, but I don&#8217;t recall any home-made gifts.  He also got three gifts of cash &#8211; Olyvia and I had planned to top up his savings to reach the next milestone, so we did that after adding the other gifts and made an equivalent donation for him.</p>
<p>I wish I knew why people are so reluctant to choose the charity option.  The comment I hear most often (via Olyvia) is something disparaging about me and how I&#8217;m a killjoy, or don&#8217;t want Samuel to have fun.  This is ludicrous &#8211; half of the problem is that Olyvia and I (along with others, like his grandparents) spoil him so much that he already has so many things.  I also know what he likes &#8211; at the moment he likes opening cards just as much as presents, and he doesn&#8217;t like getting overwhelmed (which opening the flood of presents at his party was, although he managed well).  It&#8217;s also my (and Olyvia&#8217;s) job to consider his future happiness &#8211; I&#8217;d love it if he grew up happy and having the things that he wanted, but also without a need to have more <em>things</em> all the time.  This is a step along that road.</p>
<p>The other frequent comment is something along the lines of how Samuel would want to open a present and see something.  That&#8217;s true &#8211; but he enjoys opening cards just as much as a gift &#8211; so a card that went along with a donation (or something to do, or something homemade) would be just as much fun for him as another toy.  Olyvia noted something that I think is probably quite true &#8211; it&#8217;s also often that the giver wants to see a reaction from Samuel when he opens the present, and they think that a toy will provoke a better reaction than a card.  Although I understand this, I think it&#8217;s more important to consider what&#8217;s best for the receiver than for the giver.</p>
<p>Unfortunately, this is probably the last time that we&#8217;ll be able to try this experiment for some time.  Christmas is a much smaller event, where this isn&#8217;t as big an issue.  For Sam&#8217;s 4th birthday, he probably will be old enough that he will care what&#8217;s in the box, and not react as positively if it&#8217;s homemade/an activity/a donation.  My aim is for the party next year to be vastly scaled down, too (probably cutting out many of the parents, and also people that are really friends of mine/Olyvia&#8217;s, rather than Samuel&#8217;s), and this isn&#8217;t much of an issue with half-a-dozen gifts.</p>
<p>On a tangentially-related note: we did manage to get through his party without gift-bags or organised party games, which I&#8217;m quite pleased about.  (I&#8217;m sure games will be featured next year, by which time Sam will probably really enjoy them).</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tonyandrewmeyer.wordpress.com/191/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tonyandrewmeyer.wordpress.com/191/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tonyandrewmeyer.wordpress.com/191/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tonyandrewmeyer.wordpress.com/191/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tonyandrewmeyer.wordpress.com/191/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tonyandrewmeyer.wordpress.com/191/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tonyandrewmeyer.wordpress.com/191/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tonyandrewmeyer.wordpress.com/191/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tonyandrewmeyer.wordpress.com/191/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tonyandrewmeyer.wordpress.com/191/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tonyandrewmeyer.wordpress.com&blog=36233&post=191&subd=tonyandrewmeyer&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://tonyandrewmeyer.wordpress.com/2009/08/29/forced-materialism/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d64dfbf30e9685c0cabe10bdc9ee7b57?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=PG" medium="image">
			<media:title type="html">tonyandrewmeyer</media:title>
		</media:content>
	</item>
		<item>
		<title>D520 &#8211; Week Five</title>
		<link>http://tonyandrewmeyer.wordpress.com/2009/08/24/d520-week-five/</link>
		<comments>http://tonyandrewmeyer.wordpress.com/2009/08/24/d520-week-five/#comments</comments>
		<pubDate>Tue, 25 Aug 2009 05:57:44 +0000</pubDate>
		<dc:creator>tonyandrewmeyer</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[teaching]]></category>
		<category><![CDATA[conway's game of life]]></category>
		<category><![CDATA[d520]]></category>
		<category><![CDATA[IronPython]]></category>
		<category><![CDATA[ironpython in action]]></category>
		<category><![CDATA[multidoc]]></category>
		<category><![CDATA[Northtec]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://tonyandrewmeyer.wordpress.com/?p=186</guid>
		<description><![CDATA[Chapter 5 of IronPython in Action deals with XML, although it starts out covering some of the more advanced things you can do with functions.  I considered skipping this chapter (the function material is perhaps a bit advanced, and covering XML isn&#8217;t a necessity), but decided that it was worth learning about XML in .NET [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tonyandrewmeyer.wordpress.com&blog=36233&post=186&subd=tonyandrewmeyer&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Chapter 5 of <a href="http://ironpythoninaction.com">IronPython in Action</a> deals with <a href="http://en.wikipedia.org/wiki/Xml">XML</a>, although it starts out covering some of the more advanced things you can do with functions.  I considered skipping this chapter (the function material is perhaps a bit advanced, and covering XML isn&#8217;t a necessity), but decided that it was worth learning about XML in .NET (since it&#8217;s so common) and that it would make using the MultiDoc example tricky (since the file format is XML) and I really wanted to use MultiDoc.  I gave the students <a href="http://files.me.com/tonyandrewmeyer/joshve">notes</a> [PDF], again covering the textbook material that we could look at, the tools (unchanged), key points, and a link to the MultiDoc example code.  We had a new <a href="http://files.me.com/tonyandrewmeyer/6f2ptv">lab exercise</a> [PDF] this week (implementing <a href="http://en.wikipedia.org/wiki/Conway%27s_game_of_life">Conway&#8217;s Game of Life</a>), as well as two new recommended reading articles: a <a href="http://ignorethecode.net/blog/2008/05/18/preferences-considered-harmful/">Lukas Mathis post about preferences</a> and another <a href="http://www.joelonsoftware.com/items/2008/05/01.html">Spolsky post, this one about &#8220;architecture astronauts&#8221;</a>. <span id="more-186"></span></p>
<p>Students again read the recommended reading (again, before class!).  There was some debate about the Mathis article about preferences.  The points I hoped they took away were the difference between configuration and preferences and that preferences don&#8217;t suit &#8216;casual&#8217; users.  I think some students were unconvinced, but I hope that I managed to get across the point that they are (by definition, as students in this course) more than casual users, and so not the sort of user that preferences don&#8217;t suit.  (However, even though I&#8217;m far from a casual user, I too generally dislike preferences &#8211; one reason I use a lot of <a href="http://apple.com">Apple</a> products).</p>
<p>I got the feeling that the material on functions was a little advanced, as I suspected.  This was, however, the ideal place for me to cover lambdas, as I proposed doing last week, so I added that in.  I talked about functions defined in other functions, passing functions as arguments, anonymous functions (lambdas), and decorators.  These are important things to learn if you&#8217;re going to be a <a href="http://python.org">Python</a> developer (or a developer in other languages that let you treat functions in this way), but perhaps belong in a more advanced class.  Next year I might skip over this (i.e. assign it as recommended reading), and just rewrite any of the textbook examples to use regular functions.  On the other hand, it&#8217;s great exam question material!</p>
<p>Last week, I stepped through the MultiDoc code, typing it in as I went.  I felt there wasn&#8217;t sufficient time for that this week, so instead opened up the <a href="http://ironpythoninaction.com/download.html">source that Michael provides</a> and talked through it.  I don&#8217;t feel this was as successful as the previous week, so I&#8217;ll go back to typing as much as I can.  I didn&#8217;t have time to comment the code as I went, but did so after class (for the version of MultiDoc as it stands at the end of the chapter).  The <a href="http://files.me.com/tonyandrewmeyer/5h54xp">commented version</a> is available under <a href="http://www.opensource.org/licenses/bsd-license.php">the same license as the original</a>.  I completely skipped going over xmldocumentreader.py since it&#8217;s fairly generic and well covered in the textbook, and concentrated on documentreader.py and documentwriter.py instead.</p>
<p>Implementing Conway&#8217;s Game of Life wasn&#8217;t an exercise that was in the course in previous years (although it would be essentially the same task to do it in Visual Basic), although I have used it some time ago in other courses (and I think I had to do it myself back in my undergraduate years).  It seemed like an exercise that would concentrate on Python programming in general, and just happen to use some .NET classes.  Two of the classes that they would need (Timer and PictureBox) I expect they&#8217;ll want to use in their projects later on.</p>
<p>I particularly like to cover Timer (whether it&#8217;s Visual Basic or IronPython) because the students at this point are still working in a procedural fashion, rather than an event-driven one.  That means that their natural instinct when needing to do something like update the grid every X seconds is to have a loop with a time.sleep() call in it.  They then end up with an unresponsive GUI, because they are blocking the main thread.  A timer isn&#8217;t the only way to deal with this, but it&#8217;s a good default choice, and covering it explicitly saves me explaining it to many students individually when they come across it (e.g. in project work).</p>
<p>However, most of the class found that they didn&#8217;t know where to start (and were either so stuck that they really had no idea, or just didn&#8217;t feel like taking a crack on this particular day).  So I ended up working through the exercise with them (rather like I ended up doing the Quiz the week after that exercise).  I don&#8217;t mind doing this occasionally, but the students really need to start on their own eventually.  I could perhaps provide a detailed design next year, that clearly showed what functions you would use and how they would be tied together.</p>
<p>I wrote three versions of Life in the end (all extremely similar).  I wrote my <a href="http://files.me.com/tonyandrewmeyer/jswz4s">first one</a> simply to check how difficult it would be for the students, intending it to be an example answer.  The <a href="http://files.me.com/tonyandrewmeyer/viu321">second</a> was a small modification of the first, which added a bit more colour to make the display more interesting.  The <a href="http://files.me.com/tonyandrewmeyer/5ejcwh">third</a> was the one I wrote during class &#8211; it&#8217;s considerably simpler (i.e. not as nice code) than the other version.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tonyandrewmeyer.wordpress.com/186/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tonyandrewmeyer.wordpress.com/186/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tonyandrewmeyer.wordpress.com/186/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tonyandrewmeyer.wordpress.com/186/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tonyandrewmeyer.wordpress.com/186/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tonyandrewmeyer.wordpress.com/186/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tonyandrewmeyer.wordpress.com/186/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tonyandrewmeyer.wordpress.com/186/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tonyandrewmeyer.wordpress.com/186/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tonyandrewmeyer.wordpress.com/186/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tonyandrewmeyer.wordpress.com&blog=36233&post=186&subd=tonyandrewmeyer&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://tonyandrewmeyer.wordpress.com/2009/08/24/d520-week-five/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d64dfbf30e9685c0cabe10bdc9ee7b57?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=PG" medium="image">
			<media:title type="html">tonyandrewmeyer</media:title>
		</media:content>
	</item>
		<item>
		<title>D520 &#8211; Week Four</title>
		<link>http://tonyandrewmeyer.wordpress.com/2009/08/15/d520-week-four/</link>
		<comments>http://tonyandrewmeyer.wordpress.com/2009/08/15/d520-week-four/#comments</comments>
		<pubDate>Sun, 16 Aug 2009 04:54:19 +0000</pubDate>
		<dc:creator>tonyandrewmeyer</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[teaching]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[d50]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[IronPython]]></category>
		<category><![CDATA[ironpython in action]]></category>
		<category><![CDATA[multidoc]]></category>

		<guid isPermaLink="false">http://tonyandrewmeyer.wordpress.com/?p=178</guid>
		<description><![CDATA[This week continued from the previous one, covering Chapter 4 of IronPython in Action.  That meant no new notes, and no new lab exercise.  We basically did two things: worked through the MultiDoc example in Chapter 4, and worked on implementing the Airline lab designed in the previous week.
The first recommended reading for the week [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tonyandrewmeyer.wordpress.com&blog=36233&post=178&subd=tonyandrewmeyer&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This week continued from <a href="http://tonyandrewmeyer.wordpress.com/2009/08/09/d520-week-three/">the previous one</a>, covering Chapter 4 of <a href="http://ironpythoninaction.com">IronPython in Action</a>.  That meant no new notes, and no new lab exercise.  We basically did two things: worked through the MultiDoc example in Chapter 4, and worked on implementing the Airline lab designed in the previous week.</p>
<p>The first recommended reading for the week was <a href="http://www.joelonsoftware.com/items/2007/12/03.html">Part 1 of Joel Spolsky&#8217;s &#8220;Talk at Yale&#8221;</a>, wherein he tries to relate his study to his career &#8211; the part I hoped they would find interesting was the discussion of &#8220;geeks&#8221; versus &#8220;suits&#8221;.  The second recommended article was <a href="http://steve-yegge.blogspot.com/2007/12/codes-worst-enemy.html">Steve Yegge&#8217;s &#8220;Code&#8217;s Worst Enemy&#8221;</a>, which is mostly about code bloat.  In retrospect, these might not be the best pairing, since Yegge is always long, and this particular Spolsky article is very long (if you read all three parts).  However, I was again pleasantly surprised to hear that students were actually reading these.<span id="more-178"></span></p>
<p>I was right to set aside a whole &#8216;lecture&#8217; section of a week for introducing MultiDoc &#8211; I used all two hours (with breaks and a late start, actually about 90 minutes) going over the code, and didn&#8217;t quite manage to finish &#8211; I got up to the very last section, but didn&#8217;t have time to go through adding the menubar/menu items (so I did that in the break and showed the working example afterwards).</p>
<ul>
<li>I typed out all the code in class from the (paper) textbook.  I could have copied-and-pasted the code from the (ebook) textbook, or used the <a href="http://www.ironpythoninaction.com/download.html">source available from the textbook&#8217;s site</a>.  I did tell the students that they could do this, but I noticed that many of them typed along with me (I didn&#8217;t wait for them to keep up, but I did position windows so that they could type while I demo&#8217;d).  I think this generally worked well and helps the students understand more than just reading the code.</li>
<li>I found the concept of separating pages of text into tabs somewhat strange, but one of the students compared it to separating out worksheets in a spreadsheet, which makes it more palatable in a way.  Perhaps &#8211; considering the authors&#8217; day jobs &#8211; this was even the inspiration!</li>
<li>I ran the code to show them the results at roughly the same places the book shows screenshots.</li>
<li>I did the SaveFileDialog example in the interactive interpreter as the textbook does, but skipped the file IO example and the MessageBox example (I briefly talked about the former and we had looked at the latter for Lab 2).</li>
<li>I talked about MVC as we created each of the parts, although I had mostly covered this the previous week.</li>
<li>I only lightly touched on using command patterns.  We&#8217;ll be adding new commands for a few weeks, so I felt there would be time for that later, and the advantages would be more obvious once there were more than two commands (which is really just one command, since &#8216;Save As&#8217; is just a special case of &#8216;Save&#8217;).</li>
<li>The students had used standard dialogs in D500 using Tk, so weren&#8217;t as impressed by what SaveFileDialog provided as I thought they might be (perhaps I should task them with creating one!).  In fact, some felt that it took a lot more lines of code to use the dialog &#8211; but when I pointed out that most of the code was setting the dialog up nicely (filters, initial location), they saw that it was comparable.</li>
<li>In the context of reading/writing files, I again mentioned the issue of having two &#8217;standard&#8217; libraries (the part of IronPython I dislike the most), as the textbook does.  I&#8217;ll stick with doing things the .NET way in general (because the students are meant to be getting familiar with .NET), although since I&#8217;m personally more familiar with Python, that might not always be the case.  I added comments to the code showing the Python library equivalents.</li>
<li>I brushed over exceptions.  I&#8217;m not sure how familiar they are with the concept from their introductory course, and I didn&#8217;t have time to do the topic justice.  We&#8217;ll go back to them in a later week &#8211; for now I just added the code.</li>
<li>I brushed over lambdas as well, which I&#8217;m certain that they wouldn&#8217;t have seen before.  I included them in the code, but I wonder if I should have written named functions instead.  I&#8217;m not sure that they need to know about anonymous functions for the course, but I would like to keep the example as close to the textbook as possible.  I think I&#8217;ll insert a mini topic on lambda into a later week, and just put the equivalent function in comments for now.</li>
<li>I added a reasonable amount of comments to my code (partly as I was going, and partly while the students took their breaks).  My version (of how MultiDoc.py appears at the end of Chapter 4) is available if you&#8217;re interested in <a href="http://files.me.com/tonyandrewmeyer/bwoy02">the commented version</a>.  (The original version is available under the <a href="http://www.opensource.org/licenses/bsd-license.php">BSD license</a>, with the copyright owned by Michael Foord.  I believe I&#8217;m allowed to make this available under the same terms, but I couldn&#8217;t find a copy of the license.  If Michael objects, I&#8217;ll pull this down).</li>
</ul>
<p>This part of the lesson went very well.  The MultiDoc example is straightforward, and the students have the opportunity to examine both my code and the code as it appears in the textbook (without even having to type it in).  They can also read through the outline in the textbook (ideally they did that before class, but that&#8217;s not likely to have been the case for most), so they have both my explanation and the author&#8217;s to help them understand what is happening.  We actually covered quite a lot (MVC, command patterns, tabs, common dialogs, toolbars, and menus) even though it was just a single example.</p>
<p>I&#8217;m looking forward to continuing with MultiDoc over the next few weeks.  I won&#8217;t always been able to dedicate this much of the lesson to it, so I will have to copy-and-paste code at some points.  Where possible, though, I&#8217;d like to continue working through building up the application part-by-part, just as they would.</p>
<p>The second part of the lesson was slightly reduced in time (because I ran over a little with MultiDoc).  The task, which I didn&#8217;t create an outline for, was simply to implement the Airline application described in the previous week&#8217;s exercise.  The students had the option of using their own design, or <a href="http://files.me.com/tonyandrewmeyer/5jw3m2">the example one that I provided</a> [PDF]. My example is ugly (we cover UI design later!) but I tried to keep it as simple as possible (e.g. everything is in a single form), and I based it on the model answer from the Visual Basic exercise that this exercise was based on.  I provided a <a href="http://files.me.com/tonyandrewmeyer/p1zbp4">UI</a> [.py] as well as a design outline &#8211; I built the UI in Visual Studio because I was in a rush and didn&#8217;t expect that the students would look at the GUI code, so it&#8217;s not elegant (e.g. I would replace a great deal of the code with a few loops).  I also provided <a href="http://files.me.com/tonyandrewmeyer/t3sumq">a shell</a> [.py] that showed them how to subclass from the GUI.</p>
<p>I was surprised that several students opted to use their own design (I got the impression that they had started working on it before class, which was when they got access to the example design).  Most students seemed able to jump in and start implementing things, although there were a few stuck in the &#8220;where do I start&#8221; mode that I&#8217;ve seen before.  I&#8217;m curious to see what gets submitted so I can get an idea of how well they can do this sort of coding.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tonyandrewmeyer.wordpress.com/178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tonyandrewmeyer.wordpress.com/178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tonyandrewmeyer.wordpress.com/178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tonyandrewmeyer.wordpress.com/178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tonyandrewmeyer.wordpress.com/178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tonyandrewmeyer.wordpress.com/178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tonyandrewmeyer.wordpress.com/178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tonyandrewmeyer.wordpress.com/178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tonyandrewmeyer.wordpress.com/178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tonyandrewmeyer.wordpress.com/178/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tonyandrewmeyer.wordpress.com&blog=36233&post=178&subd=tonyandrewmeyer&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://tonyandrewmeyer.wordpress.com/2009/08/15/d520-week-four/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d64dfbf30e9685c0cabe10bdc9ee7b57?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=PG" medium="image">
			<media:title type="html">tonyandrewmeyer</media:title>
		</media:content>
	</item>
		<item>
		<title>Yet Another New Look</title>
		<link>http://tonyandrewmeyer.wordpress.com/2009/08/12/yet-another-new-look/</link>
		<comments>http://tonyandrewmeyer.wordpress.com/2009/08/12/yet-another-new-look/#comments</comments>
		<pubDate>Thu, 13 Aug 2009 10:12:03 +0000</pubDate>
		<dc:creator>tonyandrewmeyer</dc:creator>
				<category><![CDATA[meta]]></category>
		<category><![CDATA[change]]></category>
		<category><![CDATA[readability]]></category>
		<category><![CDATA[theme]]></category>

		<guid isPermaLink="false">http://tonyandrewmeyer.wordpress.com/?p=176</guid>
		<description><![CDATA[As you can tell (unless you&#8217;re reading this via RSS), I&#8217;ve changed the theme for the site again.  I quite liked the layout of the old theme, but the text was just too hard to read, especially with large posts (which I am prone to).  Let me know if there are any issues &#8211; since [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tonyandrewmeyer.wordpress.com&blog=36233&post=176&subd=tonyandrewmeyer&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>As you can tell (unless you&#8217;re reading this via RSS), I&#8217;ve changed the theme for the site again.  I quite liked the layout of the old theme, but the text was just too hard to read, especially with large posts (which I am prone to).  Let me know if there are any issues &#8211; since this is hosted WordPress, it should be fine, of course.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tonyandrewmeyer.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tonyandrewmeyer.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tonyandrewmeyer.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tonyandrewmeyer.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tonyandrewmeyer.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tonyandrewmeyer.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tonyandrewmeyer.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tonyandrewmeyer.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tonyandrewmeyer.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tonyandrewmeyer.wordpress.com/176/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tonyandrewmeyer.wordpress.com&blog=36233&post=176&subd=tonyandrewmeyer&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://tonyandrewmeyer.wordpress.com/2009/08/12/yet-another-new-look/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d64dfbf30e9685c0cabe10bdc9ee7b57?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=PG" medium="image">
			<media:title type="html">tonyandrewmeyer</media:title>
		</media:content>
	</item>
		<item>
		<title>D520 &#8211; Week Three</title>
		<link>http://tonyandrewmeyer.wordpress.com/2009/08/09/d520-week-three/</link>
		<comments>http://tonyandrewmeyer.wordpress.com/2009/08/09/d520-week-three/#comments</comments>
		<pubDate>Mon, 10 Aug 2009 11:01:31 +0000</pubDate>
		<dc:creator>tonyandrewmeyer</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[teaching]]></category>
		<category><![CDATA[d520]]></category>
		<category><![CDATA[IronPython]]></category>
		<category><![CDATA[Northtec]]></category>

		<guid isPermaLink="false">http://tonyandrewmeyer.wordpress.com/?p=174</guid>
		<description><![CDATA[When planning the semester&#8217;s schedule for D520, I choose a few topics that seemed large and gave them a two-week time-slot.  One of these was chapter 4 of IronPython in Action, which covers duck typing, design patterns, and introduces the MultiDoc example that&#8217;s used throughout the middle section of the book.  One of the concepts [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tonyandrewmeyer.wordpress.com&blog=36233&post=174&subd=tonyandrewmeyer&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>When planning the semester&#8217;s schedule for <a href="http://northnet.northland.ac.nz/moodle/course/info.php?id=983">D520</a>, I choose a few topics that seemed large and gave them a two-week time-slot.  One of these was chapter 4 of <a href="http://ironpythoninaction.com">IronPython in Action</a>, which covers <a href="http://en.wikipedia.org/wiki/Duck_typing">duck typing</a>, design patterns, and introduces the MultiDoc example that&#8217;s used throughout the middle section of the book.  One of the concepts that the course has always (at least, as long as I have known it) tried to push is the importance of design &#8211; not just user-interface design (although that&#8217;s both important and covered), but the importance of doing at least some planning before starting to write large amounts of code.  In the last couple of years, I&#8217;ve moved the course away from focusing on extensive formal design to also cover design patterns and testing (particularly automated testing, like unit tests).  Since this is such a major issue for the course, and since I planned on using MultiDoc as an example in class (I try to always have an example that continues on from week to week), this seemed like an obvious point for a two-week session.<span id="more-174"></span></p>
<p>As such, the <a href="http://files.me.com/tonyandrewmeyer/ffqdl0">notes</a> [PDF], the textbook chapter (4), and the <a href="http://files.me.com/tonyandrewmeyer/7rakre">lab</a> [PDF] (somewhat) are shared over week three and week four.  The notes follow the standard layout, although there&#8217;s an extra section that condenses some of the material from previous years about emphasising design; the tools remain the same as the previous week.  The lab is outlined in more detail below.  The recommended (but completely optional) reading was a 2005 Gamasutra <a href="http://www.gamasutra.com/features/20051026/gabler_01.shtml">post about rapid game design</a> (many of the students are often into gaming, so I like to include this article) and <a href="http://www.scottberkun.com/essays/22-the-list-of-reasons-ease-of-use-doesnt-happen-on-engineering-projects/">one that attempts to explain why ease-of-use is often neglected</a> by Scott Berkun (from 2002! Oldies but goodies this week).</p>
<p>I&#8217;d noticed in the previous week that the students weren&#8217;t doing a particularly elegant job of completing the &#8220;Quiz&#8221; lab exercise, which was causing difficulties in converting the console version to a GUI version (apart from the expected difficulties of building a GUI with Windows Forms for the first time).  While their programs did the task, there was a great deal of repetition &#8211; basically a print statement, a raw_input and an if, repeated for each question in the quiz (i.e. no loop, no data structure).  I decided that rather than just provide an example application, I&#8217;d walk through the lab myself, showing the students how I would progress from the console version through to a GUI.</p>
<p>I deliberately did this without any preparation (although I have done a Visual Basic version of this application in previous years, and I did do a partial GUI version in class in week two), so that the students would see how I had to go back and change things (emphasising the importance of design), and how mistakes were a natural part of developing (although thankfully I didn&#8217;t make too many &#8211; it&#8217;s always a little tricky writing code when you need to restrict yourself to writing something that a beginner can easily understand).  I started with a console version that was basically the same as the ones I saw being created, then altered it so that it stored the data in a dictionary and looped through it.  We then worked through changing that application into a Windows Forms application.  The resulting program isn&#8217;t great (and the UI is very ugly), but it demonstrated the progression that I wanted to show.  I made <a href="http://files.me.com/tonyandrewmeyer/nhok0a">each version of the program available to the students</a> [zip].</p>
<p>I talked for a while about duck typing &#8211; I did this &#8216;freehand&#8217; rather than via the material in the textbook, so that the students would have multiple perspectives to use to absorb this.  I&#8217;m not sure how well they understood the importance &#8211; it&#8217;s a fundamental aspect of Python programming, but they haven&#8217;t yet come across anything significant enough that typing is important, so it&#8217;s a little abstract.  I think that since they started in <a href="http://python.org">Python</a>, rather than a strictly typed language like C or <a href="http://java.com">Java</a>, that they don&#8217;t understand quite how lucky they are (when they get to doing templates in C++, they&#8217;ll wish they had duck typing there!).  Hopefully it did sink in a little, especially for the better students, and they&#8217;ll see the importance as we work through more advanced programs.  It&#8217;s also an obvious exam question! (Any of the students smart enough to have found this via <a href="http://google.com">Google</a> will have figured that out already, I expect).</p>
<p>For the section on design, I mostly talked &#8216;freehand&#8217; as well, condensing material that I&#8217;ve covered in a few classes in the previous couple of years.  I talked a little about the MVC style that the textbook introduces, but also talked a lot more about the high-level, overall, importance of design, how students tend to work, how real-life projects often work, and tried to convey the important of some sort of planning.  I left introducing MultiDoc for the next week (that will be the main focus of the first half of the lesson).  That meant that we didn&#8217;t use the textbook extensively this week &#8211; not because it was lacking in any way, but rather because it&#8217;s a large topic and I wanted to use it more in the second part.  I hope that (at least some of) the students will read the chapter in the days between week three and week four (to follow through with what we covered in week three) and so will be more prepared for week four.  (I&#8217;m quite looking forward to starting the MultiDoc example next week).</p>
<p>The lab exercise is based on an exercise that has been in the course for a long time (I think it was perhaps from a textbook that was once used).  In the past, the students have been given a working (although very buggy) application used to do simple seat booking for an airline.  Their task has been to write a formal design document for the application, using the way that the application worked as the basis.  In the following week, the students would then implement the application themselves, based on their designs.  I&#8217;ve never loved this exercise &#8211; partly because the example application was so buggy (although I fixed it up somewhat), and partly because it&#8217;s doing things backwards (design after implementation), which is exactly what I&#8217;m telling them not to do.  I did like the concept itself (no coding &#8211; just design) and the example (airline booking) was good enough.</p>
<p>I threw away the &#8216;example application&#8217; part of the exercise, and simply gave the students a description of what the application was meant to do.  It was then up to them to figure out how it should work (including an idea of what the interface would be, although I emphasised that wasn&#8217;t the focus of the task).  Next week I&#8217;ll give them an example design, and they can implement the application, either based on their own design, or on my example one.  I&#8217;ll probably build a GUI for them as well, so that they can concentrate more on improving their coding skills than figuring out how to make Windows Forms look nice.</p>
<p>The students accepted this much more readily than in the past (there&#8217;s usually grumbling about the lack of coding).  I&#8217;m not sure what that signifies, and I haven&#8217;t seen any submissions yet, so I&#8217;m not sure how well they did.  It did seem like the designs (as in the past) were very shallow, failing to consider many aspects (data structures, starting up, shutting down, and so forth).  In that, the results seem quite similar to previous years, which is pleasing (since I&#8217;m trying to keep as much continuity as possible, given the huge change from Visual Basic to <a href="http://ironpython.codeplex.com">IronPython</a>).</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tonyandrewmeyer.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tonyandrewmeyer.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tonyandrewmeyer.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tonyandrewmeyer.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tonyandrewmeyer.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tonyandrewmeyer.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tonyandrewmeyer.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tonyandrewmeyer.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tonyandrewmeyer.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tonyandrewmeyer.wordpress.com/174/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tonyandrewmeyer.wordpress.com&blog=36233&post=174&subd=tonyandrewmeyer&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://tonyandrewmeyer.wordpress.com/2009/08/09/d520-week-three/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d64dfbf30e9685c0cabe10bdc9ee7b57?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=PG" medium="image">
			<media:title type="html">tonyandrewmeyer</media:title>
		</media:content>
	</item>
		<item>
		<title>Google Voice? Who really cares?</title>
		<link>http://tonyandrewmeyer.wordpress.com/2009/08/09/google-voice-who-really-cares/</link>
		<comments>http://tonyandrewmeyer.wordpress.com/2009/08/09/google-voice-who-really-cares/#comments</comments>
		<pubDate>Mon, 10 Aug 2009 09:26:46 +0000</pubDate>
		<dc:creator>tonyandrewmeyer</dc:creator>
				<category><![CDATA[rant]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[ipod]]></category>
		<category><![CDATA[itunes]]></category>
		<category><![CDATA[jason calacanis]]></category>
		<category><![CDATA[monopoly]]></category>
		<category><![CDATA[opinion]]></category>
		<category><![CDATA[Politics]]></category>
		<category><![CDATA[regulation]]></category>
		<category><![CDATA[twit]]></category>

		<guid isPermaLink="false">http://tonyandrewmeyer.wordpress.com/?p=172</guid>
		<description><![CDATA[I really enjoy listening to Jason Calacanis when he&#8217;s on TWiT, and I think he generally makes a lot of sense (and considering his success, he clearly knows more than me).  However, his anti-Apple rant (like so many others) is really off-base (I&#8217;m not the only one that thinks so).
There is no technical reason why [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tonyandrewmeyer.wordpress.com&blog=36233&post=172&subd=tonyandrewmeyer&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I really enjoy listening to Jason Calacanis when he&#8217;s on <a href="http://twit.tv">TWiT</a>, and I think he generally makes a lot of sense (and considering his success, he clearly knows more than me).  However, his <a href="http://calacanis.com/2009/08/08/the-case-against-apple-in-five-parts/">anti-Apple rant</a> (like so many others) is really off-base (<a href="http://www.marco.org/159321665">I&#8217;m not the only one that thinks so</a>).</p>
<blockquote><p>There is no technical reason why the iTunes ecosystem shouldn’t allow the ability to sync with any MP3 player</p></blockquote>
<p>The iTunes ecosystem <strong>does</strong> allow the ability to sync with any MP3 player (even more so now that music is DRM-free).  You can build an application that uses the XML library description that iTunes creates to figure out where all the music/video is, and do what you like with it.  The way I see it, there&#8217;s no reason that iTunes/<a href="http://apple.com">Apple</a> should be forced to support any MP3 player with their software.  Apple clearly makes some money from the iTunes music/video sales, but it&#8217;s clearly not the main profit generator is the ecosystem &#8211; the high-margin iPods/iPhones are.  Apple has spent a great deal of time and money building a store and an application to make the players more appealing.  Why should any other player get to piggyback on the top of that?  If (e.g.) <a href="http://palm.com">Palm</a> wants to create an online music store and develop an application that works with it and the Pre, then they should be able to (and I see no reason they can&#8217;t).</p>
<p>I like iTunes more than other media applications I&#8217;ve used, but it&#8217;s certainly not perfect, and it shows that it started out as a music player and is now a great deal more.  I love the iTunes Store, but <a href="http://amazon.com">Amazon</a> completes with it (I can&#8217;t tell how well, since they won&#8217;t see to me in NZ) as does the <a href="http://microsoft.com/zune">Zune</a> Store &#8211; which even offers a subscription model (no idea if this is available in NZ &#8211; it&#8217;s too Windows-centric for me).  There&#8217;s absolutely room for someone (e.g. Palm) to build a better store (or interface with an existing one like Amazon) and built a better application.  Do that, and build a better device, and you&#8217;ll get customers.  Don&#8217;t expect that Apple should have to help you compete against them.</p>
<blockquote><p>Think for a moment about what your reaction would be if Microsoft made the Zune the only MP3 player compatible with Windows.</p></blockquote>
<p>The iPod/iPhone isn&#8217;t the only MP3 player compatible with OS X.  However, isn&#8217;t the Zune is the only MP3 player compatible with the Zune store?  The &#8220;PlaysForSure&#8221; idea got thrown out some time ago.</p>
<blockquote><p>Simple solution and opportunity: Not only let the iPhone work on any carrier,</p></blockquote>
<p>How many countries is the iPhone locked in?  It certainly isn&#8217;t locked here, or in many other countries (e.g. Australia).  This is only an issue in some countries, like the U.S. &#8211; it&#8217;s a U.S. Apple problem, not an Apple problem.  From what I understand, it makes business sense for Apple to have an exclusivity deal with <a href="http://att.com">AT&amp;T</a>, at least for now.  I don&#8217;t see anything wrong with that.  If AT&amp;T was bad enough, then people wouldn&#8217;t use it, even if it was the only iPhone choice.  If other companies made phones good enough on other carriers, then it wouldn&#8217;t matter which network the iPhone was with.  I presume this is a temporary issue and the U.S. will join the other enlightened countries before long and have unlocked phones, anyway.</p>
<blockquote><p>but put *two* SIM card slots on the iPhone</p></blockquote>
<p>A nice idea in some ways, but about as un-Apple as you can get.</p>
<blockquote><p>3. Draconian App Store policies that are, frankly, insulting</p></blockquote>
<p>This is actually points 3, 4 <strong>and </strong>5.</p>
<blockquote><p>Yes, every application on the phone has to approved by Apple, and if you were interested in something adult in nature…well…you can’t do that.</p></blockquote>
<p>From all accounts, the approval process needs a lot of work.  One suspects that now that Jobs is officially returned to work (and Schiller is speaking openly about at least some things) that changes will happen before too long.  I think Apple must surely realise that the situation is getting out of control, and will start implementing changes.  For now, there are still a lot of applications that I really love, there are none that I know of (which is an issue, of course) that I wish I had, and only one that has been pulled <a href="http://deliciousmonster.com">that I love</a> (which is Amazon&#8217;s fault, not Apple&#8217;s).  I&#8217;m willing to give Apple a bit more time to fix this &#8211; I suspect that even they didn&#8217;t realise quite how successful this would be.</p>
<blockquote><p>4. Being a horrible hypocrite by banning other browsers on the iPhone</p></blockquote>
<p>Again, this is really just a specific case of #3.  Personally, I see almost no demand for <a href="http://opera.com">Opera</a> anywhere apart from by a few (very extreme) fans.  I don&#8217;t even see much desire for <a href="http://mozilla.com/products/firefox">Firefox</a> or <a href="http://google.com/chrome">Chrome</a> on the iPhone.</p>
<blockquote><p>5. Blocking the Google Voice Application on the iPhone</p></blockquote>
<p>There&#8217;s a lot of talk about this.  It seems overblown to me, considering that Google Voice isn&#8217;t even publicly available (I believe it&#8217;s an invite-only beta) and is U.S.-only.  I think it&#8217;s just that a lot of the noisy tech pundits use Google Voice, and so this impacts them directly.  I think there are much worse cases of App Store approval problems.  In any case, this is again just another instance of #3.</p>
<blockquote><p>Making great products does not absolve you from technology’s cardinal rule: Don’t be evil.</p></blockquote>
<p>It seems to me that the cardinal rule is more &#8220;make great stuff&#8221;.  I&#8217;ll still buy from Amazon, even after they killed my favourite iPhone application.  I dislike some of how Apple handles App Store submission, but I&#8217;ll still buy various products from them.  I dislike DRM in general, but the iTunes Store is good enough that it&#8217;s still worth using.</p>
<blockquote><p>1. Do you think Apple would be more, or less, successful if they adopted a more open strategy (i.e. allowing other MP3 players in iTunes)?</p></blockquote>
<p>Less.  A huge part of the appeal of the Apple &#8216;ecosystem&#8217; is that because they control all parts, everything &#8220;just works&#8221;.  If you use all-Apple products, everything works so much nicer than if you mix-and-match.</p>
<blockquote><p>2. Do you think Apple should face serious antitrust action?</p></blockquote>
<p>No.</p>
<blockquote><p>3. Do you think Apple’s dexterity and competence forgive their bad behavior?</p></blockquote>
<p>Yes.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tonyandrewmeyer.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tonyandrewmeyer.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tonyandrewmeyer.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tonyandrewmeyer.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tonyandrewmeyer.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tonyandrewmeyer.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tonyandrewmeyer.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tonyandrewmeyer.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tonyandrewmeyer.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tonyandrewmeyer.wordpress.com/172/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tonyandrewmeyer.wordpress.com&blog=36233&post=172&subd=tonyandrewmeyer&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://tonyandrewmeyer.wordpress.com/2009/08/09/google-voice-who-really-cares/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d64dfbf30e9685c0cabe10bdc9ee7b57?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=PG" medium="image">
			<media:title type="html">tonyandrewmeyer</media:title>
		</media:content>
	</item>
		<item>
		<title>My 2GB, 4 day 0.0.1 iPhone update</title>
		<link>http://tonyandrewmeyer.wordpress.com/2009/08/03/my-2gb-4-day-0-0-1-iphone-update/</link>
		<comments>http://tonyandrewmeyer.wordpress.com/2009/08/03/my-2gb-4-day-0-0-1-iphone-update/#comments</comments>
		<pubDate>Mon, 03 Aug 2009 23:24:26 +0000</pubDate>
		<dc:creator>tonyandrewmeyer</dc:creator>
				<category><![CDATA[rant]]></category>
		<category><![CDATA[3.0.1]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[recovery]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[vodafone]]></category>

		<guid isPermaLink="false">http://tonyandrewmeyer.wordpress.com/?p=170</guid>
		<description><![CDATA[A few days ago, Apple released version 3.0.1 of the iPhone OS, which addressed a pretty major SMS vulnerability.  When Olyvia tried updating her 3GS to 3.0.1, something went wrong.  The iPhone entered &#8220;Recovery Mode&#8221;, which means that it displays an image indicating that you need to connect it to iTunes, and you can&#8217;t do [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tonyandrewmeyer.wordpress.com&blog=36233&post=170&subd=tonyandrewmeyer&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>A few days ago, <a href="http://apple.com">Apple</a> released version <a href="http://support.apple.com/kb/HT3754">3.0.1</a> of the iPhone OS, which addressed a pretty major SMS vulnerability.  When Olyvia tried updating her 3GS to 3.0.1, something went wrong.  The iPhone entered &#8220;Recovery Mode&#8221;, which means that it displays an image indicating that you need to connect it to iTunes, and you can&#8217;t do anything else (no phone calls, no iPod, no applications &#8211; absolutely nothing).  Connecting the phone to iTunes prompted a message indicating that the phone needed to be recovered &#8211; doing so downloaded the 3.0.1 update, and then got stuck on the &#8220;Verifying Restore with Apple&#8221; step for a long time, until it would finally fail with error &#8220;3104&#8243;.  This process could then be repeated, with the same results.</p>
<p>What this meant in practice was that the phone was bricked as of last Friday.  <strong>An update should never be able to brick a (legitimate, not jailbroken) phone!</strong> Even more, failing to verify a restore with Apple should never leave the phone in a broken state.</p>
<p>I tried many thing to resolve this:</p>
<ul>
<li>Restoring on three different computers (three OS X Leopard, one Windows XP).</li>
<li>Using three USB cables.</li>
<li>Using two Internet connections (different router, different physical location, different ISPs).</li>
<li>Restoring with five different user accounts, including one that was created solely for this purpose.</li>
<li>Removing iTunes and the Mobile Device helper completely and reinstalling.</li>
<li>Restoring with an administrator account (both OS X and Windows XP) and a standard account.</li>
<li>Redoing the restore at many different times of day, including times when most of the US would be asleep (so the server load should be fairly low), over Friday, Saturday, Sunday, and Monday.</li>
</ul>
<p>None of this worked.  It did mean that I downloaded the 300MB+ update six times (one for each user account and once to refresh) over the four days.  That combined with the iTunes installation brings the total download cost to around 2GB.</p>
<p>I eventually gave up.  <a href="http://google.com">Google</a> found many other people with this problem, but only a single <a href="http://ipitg.net/how-to-kick-iphone-out-of-recovery-mode-mac/">solution</a>, which involved opening a terminal connection to the phone and changing an environment variable.  I wasn&#8217;t particularly comfortable doing that, since if something goes wrong I want <a href="http://vodafone.co.nz">Vodafone</a>/Apple to just replace the phone without any argument.  Since there isn&#8217;t any real support available over the weekend, I waited for Monday morning.</p>
<p>I wasn&#8217;t sure whether to contact Apple (expecting a &#8220;please call Vodafone&#8221; answer) or Vodafone (expecting a &#8220;what do you mean you updated your phone?  Can you do that?&#8221; answer).  Thankfully, Vodafone NZ has a very responsive and helpful <a href="http://twitter.com">Twitter</a> presence (<a href="http://twitter.com/vodafoneNZ">@vodafoneNZ</a>).  I tweeted, asking who to call, and was asked for details.  I provided these (going into more detail in an email), and got back a (unfortunately not helpful at all) suggestion.  Since that didn&#8217;t work, <a href="http://twitter.com/paulbrislen">Paul Brislen</a> provided me with an 0800 number for the &#8220;iPhone Team&#8221; (I&#8217;d call them &#8220;iTeam&#8221;, subtitled &#8220;there&#8217;s an &#8216;i&#8217; in iTeam&#8221;, but anyway&#8230;).  Unfortunately, since I had to do a lot of travelling and offline things on Monday, I wasn&#8217;t able to get to this until Tuesday.</p>
<p>I certainly appreciate a (free) phone number I can call.  However, I don&#8217;t have a great deal of time to spend talking on the phone, explaining a rather complex problem and the many steps that I&#8217;ve already done to try and resolve the problem.  I also have poor cellphone coverage (Vodafone&#8217;s fault) and a rather noisy landline (<a href="http://telecom.co.nz">Telecom</a>&#8217;s fault), so voice calls aren&#8217;t a great solution to a problem.  Faced with a (presumably) long and difficult phone call, the &#8216;hack&#8217; solution of altering the environment variable looked a little more appealing.</p>
<p>I downloaded <a href="http://ipitg.net/ifiles/iRecovery.zip">iRecovery</a> and opened a terminal (shell) connection to the iPhone.  Typing &#8220;printenv&#8221; gave a list of the environment variables &#8211; the ones that had a &#8220;P&#8221; at the start were presumably non-default values (these included &#8220;auto-boot&#8221;, &#8220;bootdelay&#8221;, &#8220;backlight-level&#8221;, and &#8220;platform-uuid&#8221;).  The article indicated that the &#8220;false&#8221; value for &#8220;auto-boot&#8221; was the problem (and the solution to use setenv to change it, then reboot the phone).  This seemed a reasonably safe thing to do (and also easily reversed), although I imagine that it would be rather scary to a non-programmer (who has no idea what &#8220;printenv&#8221; or &#8220;setenv&#8221; might mean).</p>
<p>Thankfully, this worked.  The iPhone rebooted &#8211; although it went straight back to the recovery page in iTunes, which wasn&#8217;t hopeful.  However, this time the recovery process worked flawlessly (using the existing four-day-old copy of the download).  The phone was recovered from the automatic backup, and then sync&#8217;d.  Some of the settings are a bit out as you expect in a recovery, but the phone actually works, which is really all that matters.</p>
<p>I don&#8217;t know what would have happened if I called the &#8220;iPhone Team&#8221; (and don&#8217;t need to find out now).  I suspect that we wouldn&#8217;t have got far, or maybe would have ended up doing exactly this (or perhaps having to return the phone for service).  I could be wrong about that.  I do feel that Vodafone (specifically @vodafoneNZ) handled this pretty well (and Apple extremely badly).</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tonyandrewmeyer.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tonyandrewmeyer.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tonyandrewmeyer.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tonyandrewmeyer.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tonyandrewmeyer.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tonyandrewmeyer.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tonyandrewmeyer.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tonyandrewmeyer.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tonyandrewmeyer.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tonyandrewmeyer.wordpress.com/170/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tonyandrewmeyer.wordpress.com&blog=36233&post=170&subd=tonyandrewmeyer&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://tonyandrewmeyer.wordpress.com/2009/08/03/my-2gb-4-day-0-0-1-iphone-update/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d64dfbf30e9685c0cabe10bdc9ee7b57?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=PG" medium="image">
			<media:title type="html">tonyandrewmeyer</media:title>
		</media:content>
	</item>
	</channel>
</rss>