<?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>Groby Unplugged &#187; Software Development</title>
	<atom:link href="http://www.robertblum.com/articles/category/software-development/feed" rel="self" type="application/rss+xml" />
	<link>http://www.robertblum.com</link>
	<description>Rachel Blum on Software, Games And The Rest Of Life</description>
	<lastBuildDate>Sat, 26 Dec 2009 20:26:04 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Writing Acorn Plug-Ins</title>
		<link>http://www.robertblum.com/articles/2007/10/14/writing-acorn-plug-ins</link>
		<comments>http://www.robertblum.com/articles/2007/10/14/writing-acorn-plug-ins#comments</comments>
		<pubDate>Sun, 14 Oct 2007 19:41:17 +0000</pubDate>
		<dc:creator>Robert Blum</dc:creator>
				<category><![CDATA[OSX]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.robertblum.com/articles/2007/10/14/writing-acorn-plug-ins</guid>
		<description><![CDATA[Ever since Gus Mueller released Acorn, I was itching to write a few plug-ins for it &#8211; having an image editor with scripting capabilities is a rather exciting prospect for me.





ImageUnit for Reflections and a Spotlight!


The first thing I tried out was simply running a filter kernel. Strangely enough, Apple&#8217;s documentation in that area is [...]]]></description>
			<content:encoded><![CDATA[<p>Ever since <a href="http://gusmueller.com/">Gus Mueller</a> released <a href="https://secure.flyingmeat.com/acorn/">Acorn</a>, I was itching to write a few plug-ins for it &#8211; having an image editor with scripting capabilities is a rather exciting prospect for me.</p>

<p><center>
<img src="http://www.robertblum.com/wp-content/uploads/2007/10/acorn-plugins.png" alt="Acorn Plugins" />
</center>
<center>
<a href="http://www.robertblum.com/projects/AcornPlugins/imageUnit.dmg">ImageUnit for Reflections and a Spotlight</a>!
</center></p>

<p>The first thing I tried out was simply running a filter kernel. Strangely enough, Apple&#8217;s documentation in that area is rather lacking &#8211; the assumption is always that you want to build the whole filter infrastructure with your kernel. Which I don&#8217;t &#8211; I want to get things going as soon as possible.</p>

<p>Well, after a bit of fiddling, here&#8217;s the necessary Python code:</p>

<pre><code>kernelCode = """
kernel vec4 test(sampler src)
{
    return sample(src,samplerCoord(src))*0.5;
}
"""

def main(image):

    kernels = CIKernel.kernelsWithString_( kernelCode )
    kernel = kernels.objectAtIndex_(0)
    sampler = CISampler.samplerWithImage_( image )
    filter = CIFilter.alloc().init()

    return filter.apply_arguments_options_(kernel,[sampler,None],None)  
</code></pre>

<p>As an additional caveat, if you use Acorn versions older than 1.0.3, you need to attach a crop filter so the resulting image has extents. (Gus has added a fix for that in later releases)</p>

<pre><code>extent = image.extent()

image = filter.apply_arguments_options_(kernel,[sampler,None],None)

# This part can be skipped with the latest Acorn - Gus added a fix. (Thanks, Gus!)
theCropVector = CIVector.vectorWithX_Y_Z_W_(0.0, 0.0, extent[1][0], extent[1][1])
cropFilter = CIFilter.filterWithName_("CICrop")
cropFilter.setValue_forKey_(theCropVector, "inputRectangle")
cropFilter.setValue_forKey_(image, "inputImage")
return cropFilter.valueForKey_("outputImage")
</code></pre>

<p>This gives you tremendous power, since it allows you to create ad-hoc filter effects &#8211; and all you have to do is change the python code on disc. Acorn will automatically use the latest version.</p>

<p>The only drawback here is that it&#8217;s hard to control filter parameters in a plug-in. You could write lots of U/I code &#8211; and you could do that in Python, yes &#8211; but Acorn already has a pretty fancy interface to filters. So instead, we&#8217;d like to register a core image filter via Plugins.</p>

<p>Can we do that? Technically, yes. <a href="http://pyobjc.sourceforge.net/">PyObjC</a> lets us subclass Objective C classes. Unfortunately, Python plugins get executed after the list of Core Image Filters is built &#8211; so our own filter will never show up in the filter menu. (The same is true for Objective-C Acorn plugins)</p>

<p>So &#8211; at least until Gus changes that &#8211; I&#8217;ll publish my filter kernels as Image Unit in Objective C. It&#8217;s a pain to create, compared to just wielding Python, though. (Technically, I could probably use the CGenericFilter in <a href="http://toxicsoftware.com/">Jonathan Wight</a>s <a href="http://toxicsoftware.com/toxicmedia_sequencegrabber_stable/">ToxicMedia framework</a>. Haven&#8217;t gotten around to it yet. Please let me know if you try.)</p>

<p>I&#8217;d bug Gus about that, but I&#8217;ll wait till I can actually afford a license. I&#8217;ve soaked up quite a bit of his time already, and all on the trial version. Thank you for all the support, Gus &#8211; and I&#8217;ll be back <img src='http://www.robertblum.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>

<p>And because I&#8217;ve had so much fun developing filter kernels, here&#8217;s a <a href="http://www.robertblum.com/projects/AcornPlugins/imageUnit.dmg">Core Image plugin with the spotlight and reflection effect</a> I used further up. Just drop it into <code>~/Library/Graphics/Image Units</code>, and you have those two filters in the &#8216;Stylize&#8217; category.</p>

<p>Update: <a href="http://www.robertblum.com/projects/AcornPlugins/SimpleFilter.python">Full source for Acorn Python plugin</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.robertblum.com/articles/2007/10/14/writing-acorn-plug-ins/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Listening to your customers &#8211; Done Right</title>
		<link>http://www.robertblum.com/articles/2007/04/11/listening-to-your-customers-done-right</link>
		<comments>http://www.robertblum.com/articles/2007/04/11/listening-to-your-customers-done-right#comments</comments>
		<pubDate>Thu, 12 Apr 2007 04:04:13 +0000</pubDate>
		<dc:creator>Robert Blum</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.robertblum.com/articles/2007/04/11/listening-to-your-customers-done-right</guid>
		<description><![CDATA[There are a lot of companies out there that claim they &#8220;listen to their customers&#8221;. Mostly, that means they have a call center with endless wait times and ignore any suggestion you make to them. If you&#8217;re really lucky, they charge you for it too.

That makes it even more important when companies get it right. [...]]]></description>
			<content:encoded><![CDATA[<p>There are a lot of companies out there that claim they &#8220;listen to their customers&#8221;. Mostly, that means they have a call center with endless wait times and ignore any suggestion you make to them. If you&#8217;re really lucky, they charge you for it too.</p>

<p>That makes it even more important when companies get it right. One company that &#8211; in my opinion &#8211; got it totally right is <a href="http://www.smugmug.com">SmugMug</a>. I started a trial account with them about two weeks ago since I was exploring online photo services. I played around with it for a few days, and then got distracted.</p>

<p>They only give you a 14-day free period, but they&#8217;re smart enough to ask for feedback at the mid-term mark. And since I had some time, I actually wrote up my thoughts and concerns, including the reasons why I&#8217;d probably not switch over. To my surprise, I had an answer to this within 30 minutes &#8211; they addressed some of my concerns, showed me things I missed, and promised to take a few of my suggestions under consideration. That is quite impressive.</p>

<p>At that point, I was 50:50 on the switching thing. I really like <a href="http://www.smugmug.com">SmugMug</a> better than <a href="http://flickr.com">flickr</a>. There are lots of features to tempt you &#8211; great galleries, awesome web interface, and the fact that the data is stored in several places simultaneously. (Hence you&#8217;ll lose pictures about never). Switching is always a hassle, so I thought I&#8217;d just let it lapse for now &#8211; especially since I just paid for a 2-year Pro account on flickr.</p>

<p>It got better, though. At the end of the 14 days, I got a second reminder &#8211; showing me where to sign up, or if I weren&#8217;t going to, asking if I&#8217;d share the reasons with them. I shared my reasoning with them, and I also mentioned I was working on an iPhoto plug-in for SmugMug. What can I say &#8211; I <em>love</em> playing with Web APIs, and I <em>love</em> plug-ins. Imagine my surprise when they immediately comp&#8217;ed me for a lifetime account. It&#8217;s their policy to give free accounts to all plug-in developers. Now <em>that</em> is really amazing. Not only the fact that they do it at all &#8211; the really mindblowing part is that it happens without any bureaucratic hassle.</p>

<p>A company that actively listens to you, answers your questions, and stands by its word &#8211; that would be enough for me to sign up with them even if I didn&#8217;t get the free account. So it&#8217;s time to move some pictures around&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.robertblum.com/articles/2007/04/11/listening-to-your-customers-done-right/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The Pain &#8211; Ruby and OSX</title>
		<link>http://www.robertblum.com/articles/2007/02/09/the-pain-ruby-and-osx</link>
		<comments>http://www.robertblum.com/articles/2007/02/09/the-pain-ruby-and-osx#comments</comments>
		<pubDate>Sat, 10 Feb 2007 03:50:08 +0000</pubDate>
		<dc:creator>Robert Blum</dc:creator>
				<category><![CDATA[OSX]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Technote]]></category>

		<guid isPermaLink="false">http://www.robertblum.com/articles/2007/02/09/the-pain-ruby-and-osx</guid>
		<description><![CDATA[Remember how I asked for advice on generating local RSS feeds a couple of days ago? My old colleague Brian pointed me to the RubyRSS package, a fairly simple interface to RSS generation. Easy, you think &#8211; after all, it&#8217;s Ruby, we have gems. Let&#8217;s use it.

Since it&#8217;s going to be rather technical, the details [...]]]></description>
			<content:encoded><![CDATA[<p>Remember how I asked for advice on <a href="http://www.robertblum.com/articles/2007/02/02/odds-and-ends">generating local RSS</a> feeds a couple of days ago? My old colleague Brian <a href="http://www.robertblum.com/articles/2007/02/02/odds-and-ends#comment-12583">pointed me</a> to the <a href="http://www.rubyrss.com/">RubyRSS</a> package, a fairly simple interface to RSS generation. Easy, you think &#8211; after all, it&#8217;s Ruby, we have gems. Let&#8217;s use it.</p>

<p>Since it&#8217;s going to be rather technical, the details are hidden behind the cut&#8230;</p>

<p><span id="more-95"></span></p>

<p>Except this is OSX (Tiger in my case). So there <em>is</em> no Gems. Awesome. Before you head off to install it, be aware that the Darwin Ports version of it seems broken. The best way is going directly for the source.</p>

<p><code>
    curl -O http://rubyforge-files.ruby-forum.com/rubygems/rubygems-0.9.0.tgz<br />
    tar xzvf rubygems-0.9.0.tgz<br />
    cd rubygems-0.9.0<br />
    sudo /usr/bin/ruby setup.rb
</code></p>

<p>OK, gems is installed. Next stop: simple-rss, a prerequisite for rubyrss. Conveniently enough it&#8217;s available as a gem.  Except the rdocs are broken and cause gem to spit out a flood of error messages. Seems the developers know about it, too &#8211; but why rush a new gem just for a couple of warnings&#8230;. Anyways: disabling doc installation does <em>that</em> trick.</p>

<p><code>
    sudo gem install --no-ri --no-rdoc simple-rss-1.1.gem
</code></p>

<p>That leaves the main package. And because it&#8217;s so much fun, it&#8217;s source-only, not packaged as a gem. Installation pains are to be expected, so I created a gem for you (and me) to use: <a href="http://robertblum.com/downloads/rubyrss-1.1.gem">rubyrss-1.1.gem</a></p>

<p><code>
    sudo install rubyrss-1.1.gem
</code></p>

<p>And after all this, I&#8217;m finally ready to work on the main task. More on watching directory changes in a later post&#8230;</p>

<p>Tags: <a href="http://technorati.com/tag/ruby" rel="tag" class="techtag">ruby</a> <a href="http://technorati.com/tag/osx" rel="tag" class="techtag">osx</a> <a href="http://technorati.com/tag/rss" rel="tag" class="techtag">rss</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.robertblum.com/articles/2007/02/09/the-pain-ruby-and-osx/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Sticky Notes for Code</title>
		<link>http://www.robertblum.com/articles/2006/01/17/sticky-notes-for-code</link>
		<comments>http://www.robertblum.com/articles/2006/01/17/sticky-notes-for-code#comments</comments>
		<pubDate>Tue, 17 Jan 2006 17:02:48 +0000</pubDate>
		<dc:creator>Robert Blum</dc:creator>
				<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.robertblum.com/articles/2006/01/17/sticky-notes-for-code</guid>
		<description><![CDATA[Oh my, it&#8217;s tech-article time again. I know most of you are here for either the Toys (iCalFix and the ChallengeMap) or the Productivity Articles, but  this actually is about toys and productivity &#8211; how can you actually have a decent code review, and what tools can help me there?



I&#8217;m not talking about constant [...]]]></description>
			<content:encoded><![CDATA[<p>Oh my, it&#8217;s tech-article time again. I know most of you are here for either the Toys (<a href="http://www.robertblum.com/articles/2006/01/16/icalfix-02-released">iCalFix</a> and the <a href="http://www.robertblum.com/challengemap/map.html">ChallengeMap</a>) or the <a href="http://www.robertblum.com/articles/category/productivity/">Productivity Articles</a>, but  this actually <em>is</em> about toys and productivity &#8211; how can you actually have a decent code review, and what tools can help me there?</p>

<p><span id="more-46"></span></p>

<p>I&#8217;m not talking about constant reviews, like pair programming affords them. I&#8217;m talking about reviewing complete subsystems. Yes, theoretically they all get re-factored into excellence. Practically, it doesn&#8217;t hurt to take a step back and review the whole thing from time to time.</p>

<p>One method would be to sit down in front of the computer, look at the code, and discuss it. That leads to lots of good ideas, but it&#8217;s hard to keep track of all of them. You can add <code>/// @TODO</code> sections to the code, but those are hard to see, difficult to break out, and distracting &#8211; they are code comments, yet they have nothing to do with what the code does.</p>

<p>The old-fashioned method is to print out reams of paper, get everybody in a room, and have a go at it. Let&#8217;s skip the group review part, and why that&#8217;s a bad idea &#8211; even one on one, this is not a good practice. Not only is printing out all that paper environmentally unfriendly, it&#8217;s unmanageable. A weeks worth of code is easily 1000-1500 lines of code. If you can print it out at all, it probably requires landscape printing &#8211; which means you are now creating somewhere around 40-60 pages of printout.</p>

<p>And even more, I actually want   to annotate code on my own and just send the notes to the owner. Putting a stack of paper on somebody&#8217;s desk is not the way to go.</p>

<p><img src="http://www.robertblum.com/images/annotate.png"/><br /><center>Annotations like they <em>should</em> look</center></p>

<p>Thankfully, we work in the Software Industry. We all have that problem. There must be tons of tools for this, right? Turns out the answer is &#8220;Not so&#8221;. After lots of Googling, there are very few links to share:</p>

<ul>
<li><p><a href="http://www.codehistorian.com/codereviewer-detail.php">Code Reviewer</a> from <a href="http://www.codehistorian.com">Smart Bear Software</a>. While it has a lot of features, its UI is rather outdated. The worst thing for me &#8211; the notes don&#8217;t show up in the code. Right behind that the fact that it&#8217;s high-process. Complete with audit trails, rejection/approval of check-ins, etc.  Add to that a price of $350 per seat.</p></li>
<li><p>Let&#8217;s turn to open source, then: <a href="http://codestriker.sourceforge.net/">CodeStriker</a> is a web-based solution that does allow some commenting. But again, no inline-view of the comment, and a clunky interface. </p></li>
<li><p>Finally, Microsoft offers the source to an <a href="http://www.gotdotnet.com/workspaces/workspace.aspx?id=099db4c5-2b6c-4170-acb5-4a7de24a320a">annotation plug-in for Visual Studio</a>. Still no inline annotation view, though. </p></li>
</ul>

<p>After much searching, enter an unlikely knight: MS Word does almost exactly what I want to do. Just take your source from your IDE, complete with all the syntax highlighting. Copy it into a word file, turn the orientation to landscape. And voila &#8211; annotations like I want them. Now if somebody could put <em>that</em> in the IDE!</p>

<p>Tags: <a href="http://technorati.com/tag/software+development" rel="tag">software development</a>, <a href="http://technorati.com/tag/tools" rel="tag">tools</a>, <a href="http://technorati.com/tag/code+review" rel="tag">code review</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.robertblum.com/articles/2006/01/17/sticky-notes-for-code/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
