<?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>Ethan Fast &#187; Apple</title>
	<atom:link href="http://blog.ethanjfast.com/category/apple/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.ethanjfast.com</link>
	<description>Lambdas, Hacks, and Fiction</description>
	<lastBuildDate>Fri, 27 Aug 2010 12:50:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Security: Simultaneously Weak and Amusing</title>
		<link>http://blog.ethanjfast.com/2010/04/security-simultaneously-weak-and-amusing/</link>
		<comments>http://blog.ethanjfast.com/2010/04/security-simultaneously-weak-and-amusing/#comments</comments>
		<pubDate>Thu, 22 Apr 2010 16:38:29 +0000</pubDate>
		<dc:creator>Ethan</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[iSight]]></category>
		<category><![CDATA[MacBook]]></category>
		<category><![CDATA[Shell Scripting]]></category>

		<guid isPermaLink="false">http://blog.ethanjfast.com/?p=450</guid>
		<description><![CDATA[At the urgings of a friend, I recently set up a script that takes a picture (with iSight) every time the lid of his MacBook is opened. To be fair, the sense in which I actually did any work is quite marginal, as two tools &#8212; ImageSnap and Sleepwatcher &#8212; handle any aspect of the [...]]]></description>
			<content:encoded><![CDATA[<p>At the urgings of a friend, I recently set up a script that takes a picture (with iSight) every time the lid of his MacBook is opened. To be fair, the sense in which I actually did any work is quite marginal, as two tools &#8212; <a href="http://iharder.sourceforge.net/current/macosx/imagesnap/">ImageSnap</a> and <a href="http://www.bernhard-baehr.de/">Sleepwatcher</a> &#8212; handle any aspect of the setup that might reasonably be considered complex.</p>
<p>As you might guess, ImageSnap is a command line tool for taking pictures with iSight. Likewise, Sleepwatcher is a system process that can be setup to watch for various events (e.g. startup, sleep, wake, ect.) and execute  specified external scripts when such events occur. Effectively, all I needed to do was compose these two helpful utilities to get the &#8216;security system&#8217; up and running. Here is the bash script that Sleepwatcher executes on wakeup:<br />
<code><br />
tre=`date "+%Y-%m-%d--%H-%M-%S.jpg"`</code><br />
<code> ~/Programming/ImageSnap-v0.2.4/imagesnap<br />
mv snapshot.jpg ~/Pictures/security/${tre}<br />
</code><br />
To get Sleepwatcher up in the first place, setup launchd to run something like the following:<br />
<code><br />
/usr/local/sbin/sleepwatcher --verbose --wakeup ./take_pic.sh<br />
</code><br />
Of course, much more complex variations can be managed. For instance, if you think a mugging might be in the cards, then you can have the pictures sent to an externally accessible server (perhaps along with intermittent system screenshots). In any case, I recommend checking these tools out.</p>
<p style="text-align: center;"><img class="aligncenter" title="Suprise" src="http://blog.ethanjfast.com/images/suprise.png" alt="" width="223" height="195" /></p>
 <img src="http://blog.ethanjfast.com/wp-content/plugins/feed-statistics.php?view=1&post_id=450" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://blog.ethanjfast.com/2010/04/security-simultaneously-weak-and-amusing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How I develop on OSX</title>
		<link>http://blog.ethanjfast.com/2010/02/why-im-dumb-or-how-i-develop-on-osx/</link>
		<comments>http://blog.ethanjfast.com/2010/02/why-im-dumb-or-how-i-develop-on-osx/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 02:06:20 +0000</pubDate>
		<dc:creator>Ethan</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Package Management]]></category>
		<category><![CDATA[Snow Leopard]]></category>

		<guid isPermaLink="false">http://blog.ethanjfast.com/?p=276</guid>
		<description><![CDATA[It recently occurred to me that I&#8217;m dumb. I certainly don&#8217;t mean this in any pejorative sense (after all, that would be abrasive to the ego), but rather I would suggest it as regards a behavioral pattern that I tend to follow. Roughly, said pattern goes like this: Identify problem On the grounds of theoretical purity, construct needlessly complicated [...]]]></description>
			<content:encoded><![CDATA[<p>It recently occurred to me that I&#8217;m dumb. I certainly don&#8217;t mean this in any pejorative sense (after all, that would be abrasive to the ego), but rather I would suggest it as regards a behavioral pattern that I tend to follow. Roughly, said pattern goes like this:</p>
<ol>
<li>Identify problem</li>
<li>On the grounds of theoretical purity, construct needlessly complicated solution.</li>
<li>Implement solution.</li>
</ol>
<p>For instance, a few days ago I wanted to put together a small rails application. There was nothing earth shattering in this; I simply wanted to get a quick prototype up and running. So I update my gems, do a quick `rails prototype/` command, and boot up the empty app. It fails.</p>
<p>Ok, so I do the natural thing; I google the error message or whatnot; I search for a few minutes. Well, it has something to do with Snow Leopard, that much becomes clear. This begs the question: does any bug ever <em>not</em> have something to do with Snow Leopard? But I won&#8217;t adress that here. Anyhow, there is an obscure solution, under which I&#8217;d have to edit manually my rails installation &#8212; something like that, anyway.  But I&#8217;m not going to do that. I try some earlier versions of rails and it&#8217;s dependancies &#8212; they fail for some other reasons.</p>
<p>I&#8217;m sure that I could have figured it out, had I dug around for a while. I might have, with work, discovered the vagaries behind why the same programs, with the same (nominally) installed dependancies exhibited opposite behaviors on different machines. But no, by next month I&#8217;d probably just have a new and similar problem. So I do just what any irrational fellow ought to; I decide to install a virtual Arch distro (my favorite) with VMware fusion, mount the machine as a disk via ssh, and develop from there. At least in Arch, I will know exactly what is installed, where it is, and how it ought to be working. Basically, I eliminate the free variable of imprecise ignorance regarding everything that&#8217;s on the machine, and whether I&#8217;ve hacked it up manually. Of course, god forbid that I give up TextMate and actually code directly on a linux machine. Emacs is awesome for my more lispy projects, but I like TM for rails.</p>
<p>To be clear, the blame here is almost entirely on me. However, given the recent announcement of  the iPad, I feel that it&#8217;s become the custom to lay down some hate. So here goes: Apple, you ought to implement a decent <a href="http://blog.ethanjfast.com/2009/10/osx-package-management/">package management</a> scheme. Some inconsistency with something I had installed (or worse, <em>you</em> put there) was messing things up. Sure, one might say that I use pacman (or yum, or <em>insert-reader-favorite</em>) as a crutch, and I&#8217;m fine with that. In particular, said management helps prevent people like me &#8212; overly exuberant installers and occasional hackers of who-knows-what &#8211; from messing up systems.</p>
<p>So on the one hand, I get what I want. Things tend to work on Arch, and updating is only a `pacman -Syu` away. On the other hand &#8212; yeah, I&#8217;m dumb.</p>
 <img src="http://blog.ethanjfast.com/wp-content/plugins/feed-statistics.php?view=1&post_id=276" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://blog.ethanjfast.com/2010/02/why-im-dumb-or-how-i-develop-on-osx/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>OSX Package Management</title>
		<link>http://blog.ethanjfast.com/2009/10/osx-package-management/</link>
		<comments>http://blog.ethanjfast.com/2009/10/osx-package-management/#comments</comments>
		<pubDate>Fri, 09 Oct 2009 13:45:10 +0000</pubDate>
		<dc:creator>Ethan</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Macports]]></category>
		<category><![CDATA[Open source]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[Package Management]]></category>
		<category><![CDATA[Snow Leopard]]></category>

		<guid isPermaLink="false">http://blog.ethanjfast.com/?p=93</guid>
		<description><![CDATA[A few days ago, I was discussing Snow Leopard with a recent OSX convert. For the record, this person remains primarily a linux user &#8212; a stalwart patron of Fedora &#8212; but he had very recently acquired a unibody Macbook. As I am similarly a user of both linux and OSX, this came as music [...]]]></description>
			<content:encoded><![CDATA[<p>A few days ago, I was discussing Snow Leopard with a recent OSX convert. For the record, this person remains primarily a linux user &#8212; a stalwart patron of <a href="http://fedoraproject.org/">Fedora</a> &#8212; but he had very recently acquired a unibody Macbook. As I am similarly a user of both linux and OSX, this came as <a href="http://muppet.wikia.com/wiki/Episode_113:_Music_to_My_Ears">music to my ears</a>. Curious, I asked him to name the biggest flaw in his shiny new laptop.</p>
<p>It did not take long to get an answer, and the answer I got left me decidedly unsurprised. Having come from the linux world, he was disappointed with the state of package management on OSX. My thoughts exactly.</p>
<p>Now, before every random reader writes me off as an idiot and troll, let me qualify this opinion. Yes, I have heard of <a href="http://www.macports.org/">Macports</a> (so had the person with whom I was conversing). Macports, as awesome as it is, has always seemed to me a bit too much of a hack, and at its best, a less than ideal solution. I miss the feeling of complete integration I get with something like <em><a href="http://wiki.archlinux.org/index.php/Pacman">pacman</a></em> and Arch. These thoughts have only gained strength since the release of Snow Leopard, where half the programs I need will not install &#8212; not simply, anyway &#8212; under the macports system. Why, when I first open the <a href="http://www.flickr.com/photos/fabrico/sets/72157619902380800/show/with/3638186906/">beautiful packaging</a> of an Apple computer, can I not begin to explore all manner of open source goodness? Why is there no native management system, along the lines of apt-get, yum, or pacman?</p>
<p>I will readily admit that these complaints fall well within the <a href="http://www.amazon.com/Want-Pony-Pals-No/dp/0590485830">I want a pony</a> mentality. But that said, what difficulties (or possibly, incentives) prevent Apple from establishing an official package management system? Is it simply not worth the time required to do so? Legal issues? I am <a href="http://www.cs.rice.edu/~ssiyer/minstrels/poems/1699.html">young and ignorant</a>, so quite honestly, I&#8217;d like to hear more experienced thoughts on the matter.</p>
 <img src="http://blog.ethanjfast.com/wp-content/plugins/feed-statistics.php?view=1&post_id=93" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://blog.ethanjfast.com/2009/10/osx-package-management/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>
