<?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/"
	>

<channel>
	<title>macolyte.net &#187; Programming</title>
	<atom:link href="http://macolyte.net/category/computers/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://macolyte.net</link>
	<description>a.j.&#039;s adventures in mediocrity</description>
	<lastBuildDate>Fri, 08 Aug 2008 02:46:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>PictureWindow Update</title>
		<link>http://macolyte.net/2006/12/16/picturewindow-update/</link>
		<comments>http://macolyte.net/2006/12/16/picturewindow-update/#comments</comments>
		<pubDate>Sun, 17 Dec 2006 00:40:35 +0000</pubDate>
		<dc:creator>a.j.</dc:creator>
				<category><![CDATA[Obj-C/Cocoa]]></category>

		<guid isPermaLink="false">http://macolyte.net/2006/12/16/picturewindow-update/</guid>
		<description><![CDATA[I found a bug in PictureWindow 1.5.   It basically rendered the drop down absolutely useless.  I&#8217;ve fixed the bug and everything seems to be working as it should.  Download the latest version here.
]]></description>
			<content:encoded><![CDATA[<p>I found a bug in PictureWindow 1.5.   It basically rendered the drop down absolutely useless.  I&#8217;ve fixed the bug and everything seems to be working as it should.  Download the latest version <a href="http://macolyte.net/files/PictureWindow.zip">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://macolyte.net/2006/12/16/picturewindow-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PictureWindow1.5</title>
		<link>http://macolyte.net/2006/11/26/picturewindow15/</link>
		<comments>http://macolyte.net/2006/11/26/picturewindow15/#comments</comments>
		<pubDate>Sun, 26 Nov 2006 21:26:03 +0000</pubDate>
		<dc:creator>a.j.</dc:creator>
				<category><![CDATA[Obj-C/Cocoa]]></category>

		<guid isPermaLink="false">http://macolyte.net/2006/11/26/picturewindow15/</guid>
		<description><![CDATA[We&#8217;re happy to announce the release of PictureWindow1.5.  There&#8217;s so much upgradey goodness that I jumped the version number a whole 0.4.  Here&#8217;s the changelog:
- Added a preference panel that allows selecting the default image directory
- Added the ability to delete the current picture
- Added image information (name, size and format).
- Added keyboard [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;re happy to announce the release of PictureWindow1.5.  There&#8217;s so much upgradey goodness that I jumped the version number a whole 0.4.  Here&#8217;s the changelog:</p>
<p>- Added a preference panel that allows selecting the default image directory<br />
- Added the ability to delete the current picture<br />
- Added image information (name, size and format).<br />
- Added keyboard shortcuts and menu items for next, previous and delete.<br />
- Changed Open (cmd-O) to Open Folder (shift-cmd-O)<br />
- Changed the UI around a bit<br />
- Fixed a bug where the app would crash on startup if ~/Pictures was empty<br />
- Some general code cleanup</p>
<p>Notice the &#8220;we&#8221; in the first sentence.  <a href="http://maximile.net">Max Williams</a> has contributed a significant amount of code and work to this release.  </p>
<p>Enjoy <a href="http://macolyte.net/files/PictureWindow1.5.zip">the new release</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://macolyte.net/2006/11/26/picturewindow15/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PictureWindow1.1</title>
		<link>http://macolyte.net/2006/11/17/picturewindow11/</link>
		<comments>http://macolyte.net/2006/11/17/picturewindow11/#comments</comments>
		<pubDate>Fri, 17 Nov 2006 22:34:40 +0000</pubDate>
		<dc:creator>a.j.</dc:creator>
				<category><![CDATA[Obj-C/Cocoa]]></category>

		<guid isPermaLink="false">http://macolyte.net/2006/11/17/picturewindow11/</guid>
		<description><![CDATA[I&#8217;m proud to announce the release of PictureWindow1.1.  Besides some general code clean-up, this new release adds the ability to select a folder other than ~/Pictures/, which increases its usefulness about 1000 times.  Download and enjoy.
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m proud to announce the release of PictureWindow1.1.  Besides some general code clean-up, this new release adds the ability to select a folder other than ~/Pictures/, which increases its usefulness about 1000 times.  <a href="http://macolyte.net/files/PictureWindow1.1.zip">Download</a> and enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://macolyte.net/2006/11/17/picturewindow11/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nope, not dead yet</title>
		<link>http://macolyte.net/2006/11/10/nope-not-dead-yet/</link>
		<comments>http://macolyte.net/2006/11/10/nope-not-dead-yet/#comments</comments>
		<pubDate>Sat, 11 Nov 2006 02:00:06 +0000</pubDate>
		<dc:creator>a.j.</dc:creator>
				<category><![CDATA[Obj-C/Cocoa]]></category>

		<guid isPermaLink="false">http://macolyte.net/2006/11/10/nope-not-dead-yet/</guid>
		<description><![CDATA[Been a while since I&#8217;ve updated.  My apologies.  But I have excellent news.  I&#8217;ve written my first full-fledged Cocoa application.  PictureWindow is a very basic image viewing program for OS X.  In its current state of development it will only browse your Pictures folder.  I&#8217;m working on changing that [...]]]></description>
			<content:encoded><![CDATA[<p>Been a while since I&#8217;ve updated.  My apologies.  But I have excellent news.  I&#8217;ve written my first full-fledged Cocoa application.  <a href="http://macolyte.net/files/PictureWindow.zip">PictureWindow</a> is a very basic image viewing program for OS X.  In its current state of development it will only browse your Pictures folder.  I&#8217;m working on changing that so you can select the folder you want to view.  The code is pretty decent, in my inexperienced opinion, for a newbie.  I plan on keeping this application in active development, unlike the <a href="http://macolyte.net/?page_id=21">other programs</a> I&#8217;ve written, so if you try it out and think something is lacking, let me know and I&#8217;ll try to add it.  It&#8217;ll be a good learning experience for me.  Any feedback is, of course, welcome.  Just shoot an email to aj [at] this domain.  It uses the MIT license and the source code is included in the .zip file.  Finally, I&#8217;d like to thank <a href="http://maximile.net">Max Williams</a> for the great job he did on designing PictureWindow&#8217;s icon.  Significantly better than anything I could have come up with.</p>
]]></content:encoded>
			<wfw:commentRss>http://macolyte.net/2006/11/10/nope-not-dead-yet/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Python vs Ruby</title>
		<link>http://macolyte.net/2006/08/26/python-vs-ruby/</link>
		<comments>http://macolyte.net/2006/08/26/python-vs-ruby/#comments</comments>
		<pubDate>Sat, 26 Aug 2006 15:42:18 +0000</pubDate>
		<dc:creator>a.j.</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://macolyte.net/?p=55</guid>
		<description><![CDATA[I know I said I was taking a break from tech stuff and I know that many more people have discussed this topic much more eloquently than I.  But someone on IRC posted this link; to an online Ruby tutor.  I clicked, mainly out of curiousity, and went through the entire thing.  [...]]]></description>
			<content:encoded><![CDATA[<p>I know I said I was taking a break from tech stuff and I know that many more people have discussed this topic much more eloquently than I.  But someone on IRC posted <a href="http://tryruby.hobix.com/">this link</a>; to an online Ruby tutor.  I clicked, mainly out of curiousity, and went through the entire thing.  I&#8217;ve been reluctant to give Ruby a fair shake because of my Python bias, but I think after my self-imposed tech moratorium, I&#8217;ll try it.</p>
<p>This morning I did a test between Python and Ruby.  It is, admittedly, contrived.</p>
<p><code><br />
#!/usr/bin/env python</p>
<p>class Fucker(object):</p>
<p style="text-indent:20pt;">def __init__(self, string1, string2):</p>
<p style="text-indent:40pt;">self.string1 = string1</p>
<p style="text-indent:40pt;">self.string2 = string2</p>
<p style="text-indent:20pt;">def fuck():</p>
<p style="text-indent:40pt;">print self.string1 + " fucked " + self.string2</p>
<p style="text-indent:40pt;"># alternately:</p>
<p style="text-indent:40pt;"># print "%s fucked %s" % (self.string1, self.string2)</p>
<p>&gt;&gt;&gt; f = Fucker("Sid", "Nancy")<br />
&gt;&gt;&gt; f.fuck()<br />
"Sid fucked Nancy"<br />
</code></p>
<p><code><br />
#!/usr/bin/env ruby</p>
<p>class Fucker</p>
<p style="text-indent:20pt;">def initialize(string1, string2)</p>
<p style="text-indent:40pt;">@string1 = string1</p>
<p style="text-indent:40pt;">@string2 = string2</p>
<p style="text-indent:20pt;">end</p>
<p style="text-indent:20pt;">def fuck</p>
<p style="text-indent:40pt;">puts "#{@string1} fucked #{@string2}"</p>
<p style="text-indent:20pt;">end</p>
<p>end<br />
&gt;&gt;&gt; f = Fucker.new("Sid", "Nancy")<br />
&gt;&gt;&gt; f.fuck<br />
"Sid fucked Nancy"<br />
</code></p>
<p>The two examples do exactly the same thing in very similar ways, but each language&#8217;s approach has certain appeal.  I really really dislike Ruby&#8217;s use of <code>end</code> statements.  Python&#8217;s required indentation [it's a feature!!] makes them unnecessary and thus makes the Python code shorter.  On the other hand, I&#8217;ve always despised Python&#8217;s class initialisation method.  While it&#8217;s better&#8221;ühan havdng explicit getters and setters, the <code>self</code> thing always bothered me.  I think the Ruby way is superior in this regard.  Overall I prefer Python because it doesn&#8217;t use weird looking syntax like <code>#{variable}</code>, but I realise that&#8217;s Ruby&#8217;s Perl influence shining through.  In the end, I honestly hope I do like Ruby.  I think there&#8217;s room for it alongside Python in my head.  </p>
]]></content:encoded>
			<wfw:commentRss>http://macolyte.net/2006/08/26/python-vs-ruby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I&#8217;m a little scared&#8230;</title>
		<link>http://macolyte.net/2006/04/03/im-a-little-scared/</link>
		<comments>http://macolyte.net/2006/04/03/im-a-little-scared/#comments</comments>
		<pubDate>Mon, 03 Apr 2006 13:12:20 +0000</pubDate>
		<dc:creator>a.j.</dc:creator>
				<category><![CDATA[Obj-C/Cocoa]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://macolyte.net/?p=31</guid>
		<description><![CDATA[For the past week+ I&#8217;ve been reading Programming in Objective-C.  That&#8217;s not the scary part.  The scary part is that I&#8217;m thoroughly enjoying it and I might actually like Objective-C better than I like Python.  At least so far.  &#8220;How can that be?&#8221; you may ask.  &#8220;Python&#8217;s syntax is so [...]]]></description>
			<content:encoded><![CDATA[<p>For the past week+ I&#8217;ve been reading <a href="http://www.amazon.com/exec/obidos/redirect?tag=incorrigibler-20%26link_code=xm2%26camp=2025%26creative=165953%26path=http://www.amazon.com/gp/redirect.html%253fASIN=0672325861%2526tag=incorrigibler-20%2526lcode=xm2%2526cID=2025%2526ccmID=165953%2526location=/o/ASIN/0672325861%25253FSubscriptionId=0EMV44A9A5YT1RVDGZ82" title="View product details at Amazon">Programming in Objective-C</a>.  That&#8217;s not the scary part.  The scary part is that I&#8217;m thoroughly enjoying it and I might actually like Objective-C better than I like Python.  At least so far.  &#8220;How can that be?&#8221; you may ask.  &#8220;Python&#8217;s syntax is so much nicer.  And you can do so much with so little typing.  And don&#8217;t even get me started on memory management.  Are you insane???&#8221;  Perhaps I am.  The long and the short of it is I grok Obj-C&#8217;s object model better, even though it requires more typing and having explicit getters and setters.  And if I use Obj-C, I can use Xcode [yes, I know about PyObjC].  I haven&#8217;t gotten to working with files or strings or lists yet, so my opinion my change at a later date [you really can't beat list comprehensions].</p>
]]></content:encoded>
			<wfw:commentRss>http://macolyte.net/2006/04/03/im-a-little-scared/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Python Playing</title>
		<link>http://macolyte.net/2006/03/21/python-playing/</link>
		<comments>http://macolyte.net/2006/03/21/python-playing/#comments</comments>
		<pubDate>Tue, 21 Mar 2006 14:55:04 +0000</pubDate>
		<dc:creator>a.j.</dc:creator>
				<category><![CDATA[Net Life]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://macolyte.net/?p=30</guid>
		<description><![CDATA[The other day in IRC, I was having fun with typing things backwards.  I decided to write a Python script to automate my silliness.  I came up with this one-liner:
print ''.join([x for x in reversed(raw_input("String here: "))])
Josh came up with this one-liner:
print "stringtoreverse"[::-1]
The main problem with my script is that it uses &#8220;reversed()&#8221;, [...]]]></description>
			<content:encoded><![CDATA[<p>The other day in IRC, I was having fun with typing things backwards.  I decided to write a Python script to automate my silliness.  I came up with this one-liner:</p>
<p><code>print ''.join([x for x in reversed(raw_input("String here: "))])</code></p>
<p>Josh came up with this one-liner:</p>
<p><code>print "stringtoreverse"[::-1]</code></p>
<p>The main problem with my script is that it uses &#8220;reversed()&#8221;, which is a feature available only in Python 2.4.x, so it doesn&#8217;t work with my IRC client [it uses the Mac system Python which is 2.3.5].  Plus MacIrssi didn&#8217;t like the raw_input().  Josh&#8217;s is much simpler and works with all versions of Python.  But I think mine looks cooler.  <img src='http://macolyte.net/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://macolyte.net/2006/03/21/python-playing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Google of Pythons</title>
		<link>http://macolyte.net/2006/02/17/a-google-of-pythons/</link>
		<comments>http://macolyte.net/2006/02/17/a-google-of-pythons/#comments</comments>
		<pubDate>Fri, 17 Feb 2006 23:28:11 +0000</pubDate>
		<dc:creator>a.j.</dc:creator>
				<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://macolyte.net/?p=20</guid>
		<description><![CDATA[I wish I were talented enough to work at Google and sit around having conversations like this one, which Guido recounted on python-dev:

Over lunch with Alex Martelli, he proposed that a subclass of dict with this behavior (but implemented in C) would be a good addition to the language. It looks like it wouldn&#8217;t be [...]]]></description>
			<content:encoded><![CDATA[<p>I wish I were talented enough to work at Google and sit around having conversations like this one, which Guido recounted on python-dev:</p>
<blockquote><p>
Over lunch with Alex Martelli, he proposed that a subclass of dict with this behavior (but implemented in C) would be a good addition to the language. It looks like it wouldn&#8217;t be hard to implement. It could be a builtin named defaultdict. The first, required, argument to the constructor should be the default value. Remaining arguments (even keyword args) are passed unchanged to the dict constructor.
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://macolyte.net/2006/02/17/a-google-of-pythons/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A New Trick</title>
		<link>http://macolyte.net/2006/02/09/a-new-trick/</link>
		<comments>http://macolyte.net/2006/02/09/a-new-trick/#comments</comments>
		<pubDate>Fri, 10 Feb 2006 00:02:42 +0000</pubDate>
		<dc:creator>a.j.</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://macolyte.net/?p=18</guid>
		<description><![CDATA[I decided, just for the hell of it, to learn vim.  I had always considered myself an Emacs man, because even while I didn&#8217;t really use it, it was the first *nix text editor I ever used.  So I guess I felt some kind of loyalty to it.  It probably didn&#8217;t help [...]]]></description>
			<content:encoded><![CDATA[<p>I decided, just for the hell of it, to learn <a href="http://www.vim.org/">vim</a>.  I had always considered myself an Emacs man, because even while I didn&#8217;t really use it, it was the first *nix text editor I ever used.  So I guess I felt some kind of loyalty to it.  It probably didn&#8217;t help that the first few times I tried to use vim, I thought it was too complicated.  After switching over to the Mac, I bought a copy of <a href="http://www.barebones.com/products/bbedit/">BBEdit</a>.  It&#8217;s a really great, full featured editor.  Probably too full featured for my simple programming needs.  If I needed something from the command line, I&#8217;d normally use Pico, since I wasn&#8217;t doing anything hardcore, usually just making small edits to files.  Now that I&#8217;ve actually put some effort into learning it, I have to say I quite like vim.  It does a lovely job of syntax highlighting my Python files, and the weird commands now seem less weird than those for Emacs.  So to all those folks on IRC who I made fun of for using vim [you know, all you guys who are way more hardcore than I'll ever be], I apologise.  I have seen the light.  And now, I feel a little more hardcore.  <img src='http://macolyte.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>UPDATE:  Forgot to mention, another reason for learning vim is that it&#8217;s one of the only command line text editors available for the Nokia 770.  </p>
]]></content:encoded>
			<wfw:commentRss>http://macolyte.net/2006/02/09/a-new-trick/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Python Challenge</title>
		<link>http://macolyte.net/2006/02/02/17/</link>
		<comments>http://macolyte.net/2006/02/02/17/#comments</comments>
		<pubDate>Thu, 02 Feb 2006 18:40:04 +0000</pubDate>
		<dc:creator>a.j.</dc:creator>
				<category><![CDATA[Net Life]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://macolyte.net/?p=17</guid>
		<description><![CDATA[In an effort to find something to focus my efforts on, I decided to revisit the Python Challenge.  I was able to make it through three of the challenges yesterday, bringing me up to Level 12.  In solving those 3 levels, I was reminded of why I gave up in the first place. [...]]]></description>
			<content:encoded><![CDATA[<p>In an effort to find something to focus my efforts on, I decided to revisit the <a href="http://pythonchallenge.com">Python Challenge</a>.  I was able to make it through three of the challenges yesterday, bringing me up to Level 12.  In solving those 3 levels, I was reminded of why I gave up in the first place.  There&#8217;s one thing I completely despise in these challanges, and that is the fact that quite a few of them require you to do some kind of image manipulation [usually using <a href="http://www.pythonware.com/library/index.htm">PIL</a>].  While I can see the value in exposing people to 3rd party modules, I don&#8217;t see the value in relying on them as heavily as the challenges do.  The task for Level 12 includes doing manipulation on a binary file, which I have never done and probably never will.  The hints point at using a hex editor, again something with which I have no experience.  So I&#8217;m stuck here on Level 12, with no ideas on what to do, or even what to Google for.  Overall, I like the idea of the Python Challenge, I just wish it weren&#8217;t so challenging for a n00b like me.  <img src='http://macolyte.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://macolyte.net/2006/02/02/17/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
