<?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>Coppery Keen Claws</title>
	<atom:link href="http://www.copperykeenclaws.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.copperykeenclaws.com</link>
	<description>Mostly software</description>
	<lastBuildDate>Thu, 01 Mar 2012 02:43:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>The Internet can&#8217;t decide how old I am</title>
		<link>http://www.copperykeenclaws.com/the-internet-cant-decide-how-old-i-am/</link>
		<comments>http://www.copperykeenclaws.com/the-internet-cant-decide-how-old-i-am/#comments</comments>
		<pubDate>Thu, 01 Mar 2012 02:41:25 +0000</pubDate>
		<dc:creator>tborthwick</dc:creator>
				<category><![CDATA[ruminations]]></category>

		<guid isPermaLink="false">http://www.copperykeenclaws.com/?p=178</guid>
		<description><![CDATA[Several articles came out a little while ago on Google&#8217;s ad preference settings and the fairly specific profile they keep on you, but I had already become intrigued by another online age measurement almost as explicit- match.com ads. Now I have &#8230; <a href="http://www.copperykeenclaws.com/the-internet-cant-decide-how-old-i-am/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Several articles came out a little while ago on Google&#8217;s <a href="http://www.google.com/ads/preferences" target="_blank">ad preference</a> settings and the fairly specific profile they keep on you, but I had already become intrigued by another online age measurement almost as explicit- match.com ads.</p>
<p><a href="http://www.copperykeenclaws.com/wp-content/uploads/2012/02/match20-292.png"><img class="alignleft size-full wp-image-183" title="match20-29" src="http://www.copperykeenclaws.com/wp-content/uploads/2012/02/match20-292.png" alt="" width="142" height="230" /></a>Now I have no interest in match.com. I&#8217;ve never used it, I&#8217;m not single, and, as far as I can recall, I&#8217;ve never clicked on of their ads even accidentally. Yet I see their ads all the time, especially on Pandora and on a Yahoo email account I have. On Yahoo, it suggests I might want to date women aged 20-29.</p>
<p>On Pandora, however, the match ads give me a suggested age of 30-39. <a href="http://www.copperykeenclaws.com/wp-content/uploads/2012/02/match30-39.png"><img class="alignright size-full wp-image-180" title="match30-39" src="http://www.copperykeenclaws.com/wp-content/uploads/2012/02/match30-39.png" alt="" width="274" height="163" /></a></p>
<p>Of course, that&#8217;s not a direct measure of how old they think I am. Given dating patterns and male stereotypes, those sites no doubt think I&#8217;m that old <em>or older</em>, but it still suggests a relative difference in their perception of my age.</p>
<p>Clearly, Yahoo and Pandora have different information sets available to them. Pandora has some direct user choices to consider in the form of the channels its users set up. Reviewing my set-up, I found channels on Oliver Messiaen and John Coltrane. Boom goes my online age!</p>
<p>Who wants to be older? I decided to try adding a Justin Bieber channel. But I couldn&#8217;t really commit to it. I never played it and after a week or so, there was no change in the ads. I reluctantly started playing the Bieber channel with the volume off. It took a few weeks, but it worked. I started seeing ads for 25-34 year-olds on Pandora. I was young again!</p>
<p>I couldn&#8217;t keep it up, though. I got tired of minimizing Pandora whenever someone came over to my desk just in case some Bieber cover art was visible. And I feared that I would start seeing Tiger Beat ads. I deleted the Bieber channel and before long, the ads went back to 30-39.</p>
<p>But just a few days later, I pulled up weather.com, and lo and behold, it had match.com ads waiting for me suggesting women aged&#8230;40-49. Son of a bitch! It&#8217;s not like I was reading feature articles there or anything, honest. I just wanted to know the hourly forecast.</p>
<p>Clearly, the Hive Mind at the bottom of the Intertubes is not as all-knowing as it no doubt wishes to be. It has not yet encapsulated my demographic attributes into a single unified avatar. Its vision is still fragmented and broken, but it&#8217;s getting better every day.</p>
<p>Maybe it&#8217;s better to try to <a href="http://blog.microco.sm/2012/02/04/i-dont-think-you-browse-like-i-do/" target="_blank">keep your online activity as private</a> as possible and stick to sites that have tighter privacy and advertising policies, but anything that requires much effort is probably doomed. Besides, concealing your online activities could have unintended consequences. You don&#8217;t want to meticulously erase your online persona only to find you&#8217;ve raised suspicions that you have something to hide and wound up on some government watch list and now need several hours to make it through airport security.</p>
<p>Celebrities and politicians assiduously cultivate their image in the press, and while they can directly influence how they&#8217;re perceived, there are many forces outside of their control. Their words and images can take on almost a life of their own. Maybe that&#8217;s what our online profiles will be like- semi-malleable entities that we have to monitor like credit scores. I&#8217;m sure someone will write an app for it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.copperykeenclaws.com/the-internet-cant-decide-how-old-i-am/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up Puppet on Windows</title>
		<link>http://www.copperykeenclaws.com/setting-up-puppet-on-windows/</link>
		<comments>http://www.copperykeenclaws.com/setting-up-puppet-on-windows/#comments</comments>
		<pubDate>Mon, 30 Jan 2012 14:17:27 +0000</pubDate>
		<dc:creator>tborthwick</dc:creator>
				<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://www.copperykeenclaws.com/?p=176</guid>
		<description><![CDATA[Our system configuration strategy consists mainly of saved VMs, a hodgepodge of scripts and notes scattered about, a lot of manual effort, and good intentions. We have a mixed linux/windows environment so we&#8217;ve never been sure if the new DevOps &#8230; <a href="http://www.copperykeenclaws.com/setting-up-puppet-on-windows/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Our system configuration strategy consists mainly of saved VMs, a hodgepodge of scripts and notes scattered about, a lot of manual effort, and good intentions. We have a mixed linux/windows environment so we&#8217;ve never been sure if the new DevOps tools offered us much. But we decided to take the plunge and start trying out <a href="http://puppetlabs.com/" target="_blank">Puppet</a>&#8216;s relatively new Windows offerings.</p>
<p><strong>Install puppet agent on Windows</strong></p>
<p>You can&#8217;t run your central Puppet server on Windows, but you can install a puppet agent, which can run standalone or take marching orders from a puppet master running on linux. Even if you&#8217;re not interested in standalone, it&#8217;s helpful to make sure it works before trying it with your master.</p>
<p>The <a href="http://projects.puppetlabs.com/projects/1/wiki/Puppet_Windows" target="_blank">Puppet Windows instructions</a> are pretty straightforward. Before you start, though, think about whether you&#8217;ll want to run puppet as administrator or as a regular user. On Windows 2008/Windows 7, if you run puppet as administrator, data will be stored at <code>C:\ProgramData\PuppetLabs\puppet</code>. For other users, data will get stored relative to <code>%HOMEDRIVE%%HOMEPATH%\.puppet</code>.</p>
<p>Download and run the <a href="Download and run http://rubyforge.org/frs/download.php/74293/rubyinstaller-1.8.7-p334.exe." target="_blank">ruby 1.8.7 installer</a>. If you have a different version of ruby already installed, you obviously need to figure out how you want to handle the PATH variable.</p>
<p>Install some gems:</p>
<p><code>gem install sys-admin win32-process win32-dir win32-taskscheduler --no-rdoc --no-ri</code><br />
<code>gem install win32-service --platform=mswin32 --no-rdoc --no-ri --version 0.7.1</code></p>
<p>Download <a href="https://github.com/puppetlabs/facter" target="_blank">facter</a> and <a href="https://github.com/puppetlabs/puppet" target="_blank">puppet</a> from github, unzip each, go into the uncompressed folder and run <code>ruby install.rb</code> (do facter first) for each.</p>
<p><strong>Test Puppet standalone on Windows</strong></p>
<p>At this point, you should be able to run puppet standalone, which isn&#8217;t terribly interesting, but you can test that things are okay so far. Here&#8217;s a simple manifest, for example, that ensures that a test file stored in a source folder exists in a target folder and that my MySQL service was running:</p>
<pre>file { "c:/test/puppet/target/win_<wbr>test_file.txt":  
  ensure =&gt; 'file',
  owner =&gt; 'Administrator',
  source =&gt; 'c:/test/puppet/source/win_<wbr>test_file.txt',
} 

service { 'MySQL':
  ensure =&gt; 'running',
  enable =&gt; true,
}
</pre>
<p>Save this into a file named init.pp, and run <code>puppet apply init.pp</code> (<code>puppet.bat</code> is now in your ruby install&#8217;s <code>bin</code> folder). It should turn on the MySQL service if it&#8217;s off and copy the test file over from source to target if it&#8217;s missing from target.</p>
<p>Puppet can control a fair number of things on Windows, as listed in the docs, but it&#8217;s not very compelling unless you add in puppet&#8217;s ability to control agents from a central puppet server.</p>
<p><strong>Install Puppetmaster on Linux</strong></p>
<p>There are many other, better instructions for installing puppet on linux, but just to keep documenting what I did for this case&#8230;I installed the master on an old Oracle Enterprise Linux vm. Again, you need ruby. The puppet instructions recommend using the ruby package that comes with your OS, but I used rvm and matched the same version of ruby, 1.8.7, as on Windows, though it probably doesn&#8217;t matter.</p>
<p><a href="https://rvm.beginrescueend.com/rvm/install/" target="_blank">Install rvm</a> by first getting the installer:<br />
<code>wget https://raw.github.com/<wbr>wayneeseguin/rvm/master/<wbr>binscripts/rvm-installer<br />
sudo bash rvm-installer</wbr></wbr></code></p>
<p>I started installing puppet from a gem first, but the latest gem on the <a href="http://downloads.puppetlabs.com/gems/" target="_blank">download site</a> was only 2.7.6. There are a few warnings floating around about not using a higher version on agents than on the master so I got the source from <a href="https://github.com/puppetlabs/puppet" target="_blank">github</a>. Run <code>rvmsudo ruby install.rb</code> to build it.</p>
<p>Start it up with <code>rvmsudo puppet master --mkusers</code>. Use <code>--mkusers</code> to make a users for puppet if it doesn&#8217;t exist yet. The first time you run this it should also create the master security certificate, too, I believe.</p>
<p>Make sure the firewall allows 8140/tcp.</p>
<p><strong>Introduce your Windows agent to your Linux master</strong></p>
<p>Back on your Windows agent, add the server to your puppet.conf (ie. <code>C:\ProgramData\PuppetLabs\puppet\etc\puppet.conf</code>):<br />
<code>server = &lt;yourmaster.com&gt;</code></p>
<p>Set up puppet with your DNS, or add to your hosts file at <code>C:\WINDOWS\system32\drivers\etc\hosts</code> a line like &lt;<code>yourmaster.com&gt; puppet</code>.</p>
<p>Try <code>puppet agent --test --verbose</code>. You can also specify the master explicitly by adding <code>--server &lt;yourmaster.com&gt;</code>.</p>
<p>You should get output like</p>
<p><code>info: Creating a new SSL key for yourwindowsagent.com<br />
warning: peer certificate won't be verified in this SSL session<br />
info: Caching certificate for ca/etc/puppet/manifests/site.pp<br />
warning: peer certificate won't be verified in this SSL session<br />
warning: peer certificate won't be verified in this SSL session<br />
info: Creating a new SSL certificate request for yourwindowsagent.com<br />
info: Certificate Request fingerprint (md5):<br />
BB:D7:30:C4:12:B9:13:33:F3:DE:E6:E8:71:7A:60:E7<br />
warning: peer certificate won't be verified in this SSL session<br />
warning: peer certificate won't be verified in this SSL session<br />
warning: peer certificate won't be verified in this SSL session<br />
Exiting; no certificate found and waitforcert is disabled</code></p>
<p>This attempts to connect to the puppet master and sends a certificate request. Back on the puppet master, check out the waiting requests with <code>puppet cert --list</code>. Your client host should show up. Accept it with <code>puppet cert --sign &lt;yourclient.com&gt;.</code></p>
<p>Go back to your Windows agent and try <code>puppet agent --test</code> again. It should now output something like <code>notice: Finished catalog run</code> with no errors.</p>
<p>Judging from online comments, getting the certificates working is a common stumbling block for setting up puppet clients in general. The error messages are often not very informative. For example, I kept getting this error:</p>
<p><code> err: Could not retrieve catalog from remote server: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed. This is often because the time is out of sync on the server or client<br />
warning: Not using cache on failed catalog<br />
err: Could not retrieve catalog; skipping run<br />
</code></p>
<p>It took a while to realize that I had an old, incorrect server key stored on the client. Removing the files from <code>C:\ProgramData\PuppetLabs\puppet\etc\ssl</code> then trying again worked.</p>
<p><strong>Set up a manifest to execute</strong></p>
<p>I set up more or less the same manifest on the master as I had run for standalone. It would be nice to store source files on the master, but puppet currently requires that Windows files and packages live on the Windows agent (or some share or location reachable by the agent, of course).</p>
<p>If you try to define a *nix file location in a manifest on the linux master to copy over to Windows, you will get an error like: <code>err: Failed to apply catalog: Parameter source failed: Cannot use relative URLs</code>.</p>
<p>Once it works running it from the command line, you can set up a Windows service to check in with the master regularly with <a href="https://iain.cx/src/nssm/" target="_blank">nssm</a>:</p>
<p><code>nssm.exe install puppet-agent &lt;FULLPATH&gt;\puppet.bat agent --server &lt;yourpuppetmaster.com&gt;</code></p>
<p><code></code>The server arg shouldn&#8217;t really be necessary if you have it defined in your puppet.conf.</p>
<p>And there you are! Sit back and let your puppet master control your services, set up users and groups, and run msi packages or other executables on your Windows instances.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.copperykeenclaws.com/setting-up-puppet-on-windows/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Book Review: Programming Android</title>
		<link>http://www.copperykeenclaws.com/book-review-programming-android/</link>
		<comments>http://www.copperykeenclaws.com/book-review-programming-android/#comments</comments>
		<pubDate>Mon, 19 Dec 2011 04:34:36 +0000</pubDate>
		<dc:creator>tborthwick</dc:creator>
				<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://www.copperykeenclaws.com/?p=173</guid>
		<description><![CDATA[Programming Android provides a good, comprehensive view of Android application architecture, but for someone already familiar with java, it starts slowly&#8230;reeeeeeeeaallly slowly. There are sections on installation of the Android SDK, basic concepts of standard java (like its type system), a &#8230; <a href="http://www.copperykeenclaws.com/book-review-programming-android/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://shop.oreilly.com/product/0636920010364.do" target="_blank">Programming Android</a> provides a good, comprehensive view of Android application architecture, but for someone already familiar with java, it starts slowly&#8230;reeeeeeeeaallly slowly. There are sections on installation of the Android SDK, basic concepts of standard java (like its type system), a long introduction to Eclipse&#8230;even a section on the preferred location to store java source code.</p>
<p>To be fair, the book proclaims at the very beginning that it&#8217;s written for people of all backgrounds, not just java, and it&#8217;s got to cover the basics for those who might, say, know iOS but not server-side java. But for me, the book didn&#8217;t really get interesting until it launched into a detailed description of concurrency and serialization on Android. From there, it kept going at a fast clip all the way into advanced topics, like NFC, sensors, and audio and video.</p>
<p>Layout, which some Android references get bogged down in, is explained conceptually in the context of MVC architecture. The book doesn&#8217;t spend time introducing all the standard view classes or going through their properties. You&#8217;ll find a good description of how Android measures and arranges UI components, but you won&#8217;t find simplistic code examples for the onMeasure() method.</p>
<p>The book goes through the Android framework and advocates how it thinks a non-trivial app should be organized. It keeps mobile issues like battery life, connectivity, and asynchronicity in the forefront of all its discussions, and it provides extended examples on things like how to write your own content provider and how to incorporate Google maps.</p>
<p><em>Programming Android</em> is really not for beginners. If you want simple code examples to get up to speed on basic concepts, you&#8217;re better off starting with the online dev guide and other resources. But if you&#8217;re interested in deeper discussions of architectural issues as well as of more advanced Android APIs, this book should have what you want. Just don&#8217;t be afraid to skip the beginning if you&#8217;ve done much java before.</p>
<p>[Note: free review copy provided by O'Reilly]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.copperykeenclaws.com/book-review-programming-android/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Looking for HTML5 Nirvana</title>
		<link>http://www.copperykeenclaws.com/looking-for-html5-nirvana/</link>
		<comments>http://www.copperykeenclaws.com/looking-for-html5-nirvana/#comments</comments>
		<pubDate>Mon, 28 Nov 2011 05:15:10 +0000</pubDate>
		<dc:creator>tborthwick</dc:creator>
				<category><![CDATA[software]]></category>
		<category><![CDATA[development]]></category>

		<guid isPermaLink="false">http://www.copperykeenclaws.com/?p=162</guid>
		<description><![CDATA[This is a dumb question, but does HTML5 support true cross-browser compatibility? Or, I should say, is it browser-agnostic? I kinda thought the latest versions of the major browsers were all converging on the same standards anyway, so I tried &#8230; <a href="http://www.copperykeenclaws.com/looking-for-html5-nirvana/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This is a dumb question, but does HTML5 support true cross-browser compatibility? Or, I should say, is it browser-agnostic? I kinda thought the latest versions of the major browsers were all converging on the same standards anyway, so I tried doing a simple layout with absolutely no browser-specific elements. Here&#8217;s what it looked like in some different browsers.</p>
<p><strong>UPDATE</strong>: I put the site back online at <a href="http://bigmath.herokuapp.com/">http://bigmath.herokuapp.com/</a> for folks to look at. If I had, ahem, known I&#8217;d be making this public, I&#8217;d have cleaned it up more, but this is the state it was in when I took the screenshots.</p>
<div id="attachment_166" class="wp-caption alignleft" style="width: 310px"><a href="http://www.copperykeenclaws.com/wp-content/uploads/2011/11/firefox.png"><img class="size-medium wp-image-166" title="firefox8" src="http://www.copperykeenclaws.com/wp-content/uploads/2011/11/firefox-300x245.png" alt="" width="300" height="245" /></a><p class="wp-caption-text">Firefox 8</p></div>
<div id="attachment_169" class="wp-caption alignleft" style="width: 310px"><a href="http://www.copperykeenclaws.com/wp-content/uploads/2011/11/chrome.png"><img class="size-medium wp-image-169" title="chrome" src="http://www.copperykeenclaws.com/wp-content/uploads/2011/11/chrome-300x274.png" alt="" width="300" height="274" /></a><p class="wp-caption-text">Chrome</p></div>
<div id="attachment_169" class="wp-caption alignleft" style="width: 310px"><a href="http://www.copperykeenclaws.com/wp-content/uploads/2011/11/ie.png"><img class="alignleft size-medium wp-image-170" title="ie" src="http://www.copperykeenclaws.com/wp-content/uploads/2011/11/ie-300x242.png" alt="" width="300" height="242" /></a><p class="wp-caption-text">IE 9</p></div>
<div id="attachment_171" class="wp-caption alignleft" style="width: 310px"><a href="http://www.copperykeenclaws.com/wp-content/uploads/2011/11/opera.png"><img class="size-medium wp-image-171" title="opera" src="http://www.copperykeenclaws.com/wp-content/uploads/2011/11/opera-300x244.png" alt="" width="300" height="244" /></a><p class="wp-caption-text">Opera 11.5</p></div>
<p>The numbers should really all be the same for comparison, but still, you get the idea. I don&#8217;t do much front-end design at all, and my html and css here are childishly simple. So is there a way to HTML5-ify them to get this mess straightened out?</p>
<p>I googled &#8220;HTML5 layout&#8221; and the first few results promise better cross-browser support with HTML5, but include parallel &#8216;moz&#8217; and &#8216;webkit&#8217; CSS elements, as well as huge swaths of IE-specific junk. I didn&#8217;t even bother checking out earlier versions of these browsers or mobile browsers.</p>
<p>There&#8217;s a <a href="http://en.wikipedia.org/wiki/Comparison_of_layout_engines_(HTML5)" target="_blank">wiki pag</a>e on HTML5 for different browser engines, and it makes me think there&#8217;s not a simple HTML5 solution for all browsers out there. Or at least if there is, it&#8217;s well-hidden from front-end noobs like me.</p>
<p>A lot of articles and tutorials claim that HTML5 <em>is</em> great for multiple browsers, but then set forth the principle of &#8216;progressive enhancement&#8217; or &#8216;graceful degradation&#8217;, which is the idea that it&#8217;s fine for different browsers to display the same website differently with it possibly looking much worse on some than others. This smells a little like a rationalization.</p>
<p>I have done a little GUI work in flex (Adobe&#8217;s SDK for the Flash Player) and I have to say, you do not encounter the concept of &#8216;graceful degradation&#8217; when you write your UI with flex. For the most part, you don&#8217;t worry about browsers at all (except for things like ssl and tab behavior).</p>
<p>Now, I don&#8217;t want to be on the wrong side of history or put myself in the path of the pitchfork-wielding mob seeking to <a href="http://occupyflash.org/" target="_blank">occupy flash</a>. Flash is proprietary, has never been stable enough on macs or linux, and uses a plugin architecture that has always been problematic, so I&#8217;m okay to see it go if there&#8217;s a better alternative.</p>
<p>Instead of a plugin architecture, I guess you just rely on repetitive CSS and a toolkit architecture when you use HTML5/CSS3/javascript. Do most shops just use tools like jQuery and Sencha instead of raw javascript? It reminds me a little of all the java frameworks and design patterns that sprouted up to deal with its underlying deficiencies. It can work fine, but it doesn&#8217;t leave you feeling like the technology underneath is very solid or well thought out.</p>
<p>And we&#8217;re talking about HTML5 here- the One True Standard to Rule Them All. HTML5 has been marketed and hyped as heavily as any new technology I can think of.  I thought writing a simple, horizontally-centered equation would be like pressing the easy button. For all the HTML5 headlines I&#8217;ve had to wade through, I want it to not just be <em>possible</em> to make consistent sites, but totally simple. It should be hard NOT to write a browser-agnostic site.</p>
<p>Surely I don&#8217;t have to write parallel pieces of my site for different browsers and even then have to accept differences, right? Do people just accept that, even with a technology so new its spec isn&#8217;t even done yet? Has everyone drunk the &#8216;graceful degradation&#8217; kool-aid?</p>
<p>Not to mention the fact that there&#8217;s no agreement on the HTML5 <a href="http://en.wikipedia.org/wiki/HTML5_video" target="_blank">video format</a>; or that WebGL, which provides some of the cooler Flash alternative examples people display, is <a href="http://blogs.technet.com/b/srd/archive/2011/06/16/webgl-considered-harmful.aspx" target="_blank">not accepted</a> by Microsoft; or that Google has put forward a javascript replacement, <a href="http://www.dartlang.org/" target="_blank">Dart</a>, that may wind up being their preferred platform. This doesn&#8217;t really feel like a triumphant, unified new world of web development&#8230;</p>
<p>When people say HTML5 is the future, I believe them. Only, it looks like the future that Joe Hewitt <a href="http://joehewitt.com/2011/09/22/web-technologies-need-an-owner" target="_blank">warned about</a>.  There is no single care-taker, and the big players are just pushing and pulling the web to their best advantage. That&#8217;s not exactly news, but given the hopes attached to HTML5, it&#8217;s a bit more disappointing than usual.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.copperykeenclaws.com/looking-for-html5-nirvana/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Configuring Spring Integration channels without XML</title>
		<link>http://www.copperykeenclaws.com/configuring-spring-integration-channels-without-xml/</link>
		<comments>http://www.copperykeenclaws.com/configuring-spring-integration-channels-without-xml/#comments</comments>
		<pubDate>Wed, 19 Oct 2011 02:39:12 +0000</pubDate>
		<dc:creator>tborthwick</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://www.copperykeenclaws.com/?p=157</guid>
		<description><![CDATA[I&#8217;ve been looking at some messaging frameworks lately and trying to find something that&#8217;s not too obtrusive. Spring Integration seems straightforward, plays nicely with our other Spring stuff, and runs in your application, which is a plus for us, but &#8230; <a href="http://www.copperykeenclaws.com/configuring-spring-integration-channels-without-xml/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been looking at some messaging frameworks lately and trying to find something that&#8217;s not too obtrusive. Spring Integration seems straightforward, plays nicely with our other Spring stuff, and runs in your application, which is a plus for us, but it&#8217;s hard to find simple examples to get started with, especially if you want to avoid xml configuration.</p>
<p>Spring makes it hard to totally skip all xml, but here&#8217;s an attempt to configure a pollable channel and a subscribable channel with as little xml as I can get away with.</p>
<p>First, the Maven pom has these dependencies:<br />
<code><br />
org.springframework.integration:spring-integration-core:2.0.5.RELEASE<br />
org.springframework:spring-context:3.0.3.RELEASE<br />
org.springframework:spring-context-support:3.0.3.RELEASE<br />
cglib:cglib-nodep:2.2<br />
</code></p>
<p>The configuration xml is just a pointer to the java configuration (the TestAppConfig class).<br />
<script src="https://gist.github.com/1298324.js?file=config.xml"></script><br />
In java, we configure the context with a QueueChannel, a PublishSubscribeChannel, and a TaskScheduler.</p>
<p><script src="https://gist.github.com/1298324.js?file=TestAppConfig.java"></script><br />
I didn&#8217;t see a simple implementation of MessageHandler, so I wrote a test handler that just prints out messages.</p>
<p><script src="https://gist.github.com/1298324.js?file=SimpleMessageHandler.java"></script></p>
<p>For this demo, the channels and their consumers are squeezed into one main method. We get the channels out of the Spring context, set up consumers to listen to them, then send out simple string messages to each of the channels.<br />
<script src="https://gist.github.com/1298324.js?file=Bootstrap.java"></script><br />
Try running it and you should see the output of all the consumers as they receive the messages and let the message handler process them.</p>
<p><code>Handler A; [Payload=Message on the pollablechannel][Headers={timestamp=1318972120696,id=9db9d54a-a2d3-4396-bfac-632c3b4b861f}]<br />
Handler B; [Payload=Message on the subscribablechannel][Headers={timestamp=1318972120697,id=5c918d28-4044-4b52-9e36-60f2498c5616}]<br />
Handler C; [Payload=Message on the subscribablechannel][Headers={timestamp=1318972120697,id=5c918d28-4044-4b52-9e36-60f2498c5616}]</code></p>
<p>Woohoo! Not that useful in itself, but it shows the basic idea of channels and consumers.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.copperykeenclaws.com/configuring-spring-integration-channels-without-xml/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Adding more users to your EC2 instance with IAM</title>
		<link>http://www.copperykeenclaws.com/adding-more-users-to-your-ec2-instance-with-iam/</link>
		<comments>http://www.copperykeenclaws.com/adding-more-users-to-your-ec2-instance-with-iam/#comments</comments>
		<pubDate>Sun, 18 Sep 2011 21:31:04 +0000</pubDate>
		<dc:creator>tborthwick</dc:creator>
				<category><![CDATA[cloud]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[aws]]></category>

		<guid isPermaLink="false">http://www.copperykeenclaws.com/?p=147</guid>
		<description><![CDATA[Amazon makes it easy to try out AWS with a free micro instance. As you start using it more, one of the first things you might want to do is let others have access to your instance. Using the IAM &#8230; <a href="http://www.copperykeenclaws.com/adding-more-users-to-your-ec2-instance-with-iam/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Amazon makes it easy to try out AWS with a free micro instance. As you start using it more, one of the first things you might want to do is let others have access to your instance. Using the IAM service, it&#8217;s easy to add more users and set up a management console address that&#8217;s not directly tied to your own Amazon account.</p>
<p>Go to your AWS Console (I&#8217;m assuming you&#8217;ve already set up an account). The screen at this point should have the message, &#8216;Sign In or Create an AWS Account&#8217;, and prompt you for your Amazon account username and password. Sign in.</p>
<p>At the AWS Management Console prompt, select &#8216;AWS Identity and Access Management (IAM)&#8217;. You should be at the IAM dashboard. <a href="http://www.copperykeenclaws.com/wp-content/uploads/2011/09/iam_dashboard4.png"><img class="alignright size-medium wp-image-154" title="iam_dashboard" src="http://www.copperykeenclaws.com/wp-content/uploads/2011/09/iam_dashboard4-300x168.png" alt="" width="300" height="168" /></a></p>
<p>At the bottom of the screen, under AWS Account Alias, notice the IAM User sign-in URL at the bottom. We want to change that url that starts with a bunch of random numbers to something easier to deal with. Think of an alias you want to use. We&#8217;re going to use &#8216;acme-app&#8217;.</p>
<p>This is only a url for the AWS console. Your end-users won&#8217;t see it so it&#8217;s not a huge deal. Click the &#8216;Create Account Alias&#8217; button at the bottom and put in your name, eg. &#8216;acme-app&#8217;. The url for the console would then becomes &#8216;https://acme-app.signin.aws.<wbr>amazon.com/console&#8217;. You can go back later and change it if you want.</wbr></p>
<p>Next click the big &#8216;Create a new group of users&#8217; button.</p>
<p>We&#8217;ll just do an admin group, but there are a lot of different authorization settings you can use. Type in a group name of &#8216;admin&#8217;. On the next screen, &#8216;Permissions&#8217;, click the &#8217;Administrator Access&#8217;  select button. Just hit &#8216;Continue&#8217; through the edit permissions screen.</p>
<p>On the users screen, create user ids for all your admins.</p>
<p><a href="http://www.copperykeenclaws.com/wp-content/uploads/2011/09/newusers2.png"><img class="alignright size-medium wp-image-153" title="newusers2" src="http://www.copperykeenclaws.com/wp-content/uploads/2011/09/newusers2-300x222.png" alt="" width="300" height="222" /></a></p>
<p>On the next screen there is a &#8216;Download credentials&#8217; link. Download it somewhere you won&#8217;t forget.</p>
<p>To set initial passwords for your users, screen, click the users link under IAM Resources. Then go to the Security Credentials tab below, and click &#8216;Manage Password&#8217;. Assign or auto-generate a password.</p>
<p>Your users will also need their access key id and secret access key from the credentials.csv you downloaded in order to connect to AWS through api calls, ie. command-line.</p>
<p>And that&#8217;s it! Other users can now get to your instance. If they go to the url you defined, they should see &#8216;AWS Account acme-app&#8217;, rather than the initial basic AWS screen we noted above, and only the user accounts you defined for it will be valid.</p>
<p>The owner of the account will always be able to get into the the console with either a user account defined for the new url, or their normal Amazon logon. If you&#8217;re on the new app-specific login screen but want to use your AWS account instead, click the &#8216;Sign in using AWS Account credentials&#8217; link.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.copperykeenclaws.com/adding-more-users-to-your-ec2-instance-with-iam/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>In Praise of Pre-built Software Components That Keep Me From Having to Learn Things</title>
		<link>http://www.copperykeenclaws.com/in-praise-of-pre-built-software-components-that-keep-me-from-having-to-learn-things/</link>
		<comments>http://www.copperykeenclaws.com/in-praise-of-pre-built-software-components-that-keep-me-from-having-to-learn-things/#comments</comments>
		<pubDate>Tue, 16 Aug 2011 00:56:50 +0000</pubDate>
		<dc:creator>tborthwick</dc:creator>
				<category><![CDATA[software]]></category>
		<category><![CDATA[development]]></category>

		<guid isPermaLink="false">http://www.copperykeenclaws.com/?p=142</guid>
		<description><![CDATA[We would all like to be spending our time learning Forth or competing on TopCoder or writing compilers, but sadly we are often forced instead to work on things that will satisfy the intellectually dreary business requirements of a paying &#8230; <a href="http://www.copperykeenclaws.com/in-praise-of-pre-built-software-components-that-keep-me-from-having-to-learn-things/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>We would all like to be spending our time learning Forth or competing on TopCoder or writing compilers, but sadly we are often forced instead to work on things that will satisfy the intellectually dreary business requirements of a paying client or employer.</p>
<p>In those times, a developer may have the good fortune to discover a project or library that already does a lot of what they need and the question arises, should they design a whole new structure from scratch or just grab a pre-fab one?</p>
<p><a href="http://www.copperykeenclaws.com/wp-content/uploads/2011/08/prefab-home.jpg"><img class="aligncenter size-medium wp-image-144" title="prefab-home" src="http://www.copperykeenclaws.com/wp-content/uploads/2011/08/prefab-home-300x140.jpg" alt="" width="300" height="140" /></a></p>
<p>For example, ldap. I had a project that needed to connect to and query ldap servers. I tried to interest myself in the subject, really I did. I dutifully started educating myself on the subject, which I knew nothing about previously.</p>
<p>My inner monologues as I did this research sounded like, &#8220;Ah, so ldap is the <a href="http://www.engineyard.com/blog/2009/ldap-directories-the-forgotten-nosql/" target="_blank">original nosql</a>. That&#8217;s interesting. And it involves issues of identity and security which are inherently interesting. Okay&#8230;good&#8230;this is all really very interesting&#8230;and&#8230;and&#8230;oh God, please don&#8217;t make me learn Active Directory.&#8221; So I dedicate this paean today to the modest and useful and tedium-saving <code>Spring LDAP</code> library.</p>
<p>For better or worse, the java ecosystem has components to help with just about every need in the enterprise world. I quickly found a few ldap libraries that looked fine. Spring LDAP had a good api, decent documentation, did not seem to overreach itself, and just worked when I tried it.</p>
<p>Obviously there are some risks to using third-party components. You couple your code and your understanding to the library and its api, rather than to your core subject. Sometimes, especially if you haven&#8217;t evaluated the third-party code well, the cure turns out to be worse than the cold. You&#8217;re forced to jump through hoops that you could have avoided by just doing the work yourself.</p>
<p>Using a free, open-source project also seems to cause developers to leave whiny, exasperated notes on the project&#8217;s forums demanding help from the volunteer project maintainers who have already saved them a huge amount of time and effort. I&#8217;m not sure how this happens but you need to guard against it.</p>
<p>And of course, most obviously, you&#8217;re responsible for whatever you put into your solution. If you don&#8217;t educate yourself about what you&#8217;re using and it breaks, whether it&#8217;s a Spring library or a github project, it&#8217;s on you.</p>
<p>Even so, if you don&#8217;t take advantage of the stuff out there, you&#8217;re doing yourself and your client a disservice. You could go back to first principles and re-imagine the whole idea of &#8216;ldap&#8217;, but that&#8217;s probably not what you&#8217;re being paid for. They just want something done fast. The way that the work stimulates or educates you is way down on the priority list.</p>
<p><a href="http://www.copperykeenclaws.com/wp-content/uploads/2011/08/turtle_stack.jpg"><img class="alignright size-full wp-image-145" title="turtle_stack" src="http://www.copperykeenclaws.com/wp-content/uploads/2011/08/turtle_stack.jpg" alt="" width="102" height="275" /></a>You&#8217;re expected to have enough judgment to choose what can be trusted and then use it if it&#8217;s the best way to accomplish your goals. Many enterprise tasks are not only well-served by existing third-party components, they&#8217;re incredibly dull as well, so it&#8217;s a win-win.</p>
<p>Most developers are working on the tops of teetering stacks of tools and technologies that do a tremendous amount of work for us. It&#8217;s turtles all the way down, my friend. Some are more shaky than others, but if you do find a trustworthy turtle, there&#8217;s nothing wrong with kicking back and enjoying the ride.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.copperykeenclaws.com/in-praise-of-pre-built-software-components-that-keep-me-from-having-to-learn-things/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Book review: Programming Amazon EC2</title>
		<link>http://www.copperykeenclaws.com/book-review-programming-amazon-ec2/</link>
		<comments>http://www.copperykeenclaws.com/book-review-programming-amazon-ec2/#comments</comments>
		<pubDate>Sun, 24 Jul 2011 20:01:36 +0000</pubDate>
		<dc:creator>tborthwick</dc:creator>
				<category><![CDATA[cloud]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[aws]]></category>

		<guid isPermaLink="false">http://www.copperykeenclaws.com/?p=140</guid>
		<description><![CDATA[Amazon Web Services is a vast ecosystem and Programming Amazon EC2 by Jurg van Vliet and Flavia Paganelli strikes a nice balance between explaining general concepts and providing practical coding examples. It&#8217;s a great way to get started with EC2. &#8230; <a href="http://www.copperykeenclaws.com/book-review-programming-amazon-ec2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Amazon Web Services is a vast ecosystem and <em>Programming Amazon EC2</em> by Jurg van Vliet and Flavia Paganelli strikes a nice balance between explaining general concepts and providing practical coding examples. It&#8217;s a great way to get started with EC2.</p>
<p>It can be daunting for newcomers to grasp how all the different parts of AWS fit together. The first part of the book introduces AWS and the basics of setting up an EC2 instance. Then it moves into how to scale with ELB and extra services like SQS, SNS, SimpleDB, and RBS. Finally, it goes into some practical discussions on how to monitor your system, improve uptime, and work with all the decoupled parts of your new system.</p>
<p>At the same time, the book doesn&#8217;t try to provide an encyclopedic accounting for all of AWS, and it doesn&#8217;t detail every little step to work with AWS. That&#8217;s a good thing. The result is a good substance-to-page ratio. If you need a cookbook or step-by-step account of how to do things, there&#8217;s always the Amazon docs. They will be more up-to-date anyway. Instead, the book goes for concepts, context, and useful coding examples in ruby, java, and php. The authors touch on AWS&#8217;s console but also other tools, many of them, third-party, to help manage your app and provide examples of things like backup scripts.</p>
<p>AWS is so vast that there will be some parts of the book that readers have no interest in and other parts they wish had more detail. But for beginning and intermediate users, the book is a great reference to get up and working with AWS.</p>
<p>[Disclosure: review copy provided through O'Reilly Blogger Review Program]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.copperykeenclaws.com/book-review-programming-amazon-ec2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Adding an https connector to embedded Tomcat 7</title>
		<link>http://www.copperykeenclaws.com/adding-an-https-connector-to-embedded-tomcat-7/</link>
		<comments>http://www.copperykeenclaws.com/adding-an-https-connector-to-embedded-tomcat-7/#comments</comments>
		<pubDate>Tue, 19 Jul 2011 00:29:05 +0000</pubDate>
		<dc:creator>tborthwick</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[tomcat]]></category>

		<guid isPermaLink="false">http://www.copperykeenclaws.com/?p=138</guid>
		<description><![CDATA[The api to add https support to an embedded tomcat server follows the corresponding server.xml elements pretty closely. For example: Connector httpsConnector = new Connector(); httpsConnector.setPort(443); httpsConnector.setSecure(true); httpsConnector.setScheme("https"); httpsConnector.setAttribute("keyAlias", keyAlias); httpsConnector.setAttribute("keystorePass", password); httpsConnector.setAttribute("keystoreFile", keystorePath); httpsConnector.setAttribute("clientAuth", "false"); httpsConnector.setAttribute("sslProtocol", "TLS"); httpsConnector.setAttribute("SSLEnabled", true); &#8230; <a href="http://www.copperykeenclaws.com/adding-an-https-connector-to-embedded-tomcat-7/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The api to add https support to an embedded tomcat server follows the corresponding <code>server.xml</code> elements pretty closely. For example:</p>
<pre>
       Connector httpsConnector = new Connector();
       httpsConnector.setPort(443);
       httpsConnector.setSecure(true);
       httpsConnector.setScheme("https");
       httpsConnector.setAttribute("keyAlias", keyAlias);
       httpsConnector.setAttribute("keystorePass", password);
       httpsConnector.setAttribute("keystoreFile", keystorePath);
       httpsConnector.setAttribute("clientAuth", "false");
       httpsConnector.setAttribute("sslProtocol", "TLS");
       httpsConnector.setAttribute("SSLEnabled", true);

       Tomcat tomcat = new Tomcat();
       //...
       Service service = tomcat.getService();
       service.addConnector(httpsConnector);
</pre>
<p>To add a redirect to your http port:</p>
<pre>
       Connector defaultConnector = tomcat.getConnector();
       defaultConnector.setRedirectPort(443);
</pre>
<p>If you only want an https port with no other port open, you can call setConnnector() to make your connector the default on the tomcat object instead of adding new ones to the service.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.copperykeenclaws.com/adding-an-https-connector-to-embedded-tomcat-7/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Upgrading Maven 2 to 3</title>
		<link>http://www.copperykeenclaws.com/upgrading-maven-2-to-3/</link>
		<comments>http://www.copperykeenclaws.com/upgrading-maven-2-to-3/#comments</comments>
		<pubDate>Fri, 10 Jun 2011 01:18:28 +0000</pubDate>
		<dc:creator>tborthwick</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[maven]]></category>

		<guid isPermaLink="false">http://www.copperykeenclaws.com/?p=136</guid>
		<description><![CDATA[Maven 3 doesn&#8217;t have a huge number of visible improvements over Maven 2, but upgrading is easy and doesn&#8217;t pose a large risk. We encountered only a minor number of problems in the upgrade, the biggest ones related to how &#8230; <a href="http://www.copperykeenclaws.com/upgrading-maven-2-to-3/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Maven 3 doesn&#8217;t have a huge number of visible improvements over Maven 2, but upgrading is easy and doesn&#8217;t pose a large risk. We encountered only a minor number of problems in the upgrade, the biggest ones related to how we had configured our Artifactory repo and Jenkins jobs.</p>
<p><strong>Improvements</strong></p>
<ul>
<li>Maven 3 is faster than Maven 2. Others have reported large improvements, but for us it wasn&#8217;t not really noticeable. It&#8217;s nice to have, but for our small to medium-size builds, Maven&#8217;s speed was never a problem.</li>
<li>Maven 3 has better error reporting and logging and we do notice this sometimes. It&#8217;s not a huge difference but it&#8217;s also nice.</li>
<li>Maven 3 is the platform for new and upcoming projects. It&#8217;s easier to embed, easier to extend, and promises to be the foundation for all new features. Our main reason for switching, in fact, was because the project to support flex code coverage requires it.</li>
<li>Other improvements like <a href="http://shell.sonatype.org/" target="_blank">maven shell</a> or <a href="http://polyglot.sonatype.org/" target="_blank">polyglot maven</a> might be interesting to play around with, but they&#8217;re not that useful to us now.</li>
</ul>
<p><strong>Upgrade Changes</strong></p>
<ul>
<li>Maven 3 is largely <a href="https://cwiki.apache.org/MAVEN/maven-3x-compatibility-notes.html" target="_blank">backwards compatible</a>.  You can run it against your old Maven 2 poms without any changes and quite a bit will work just fine. That gave us confidence that the upgrade wouldn&#8217;t be a big deal.</li>
<li>Plugins defined in the old &lt;<code>reporting</code>&gt; section must be moved to &lt;<code>build</code>&gt;. The maven <a href="http://maven.apache.org/plugins/maven-site-plugin-3.0-beta-3/maven-3.html" target="_blank">docs</a> have more info on changes you have to make for reporting, which are not a big deal.</li>
<li>We did have a problem initially with getting the latest snapshot updates. Local repositories would show updated timestamps on <code>maven-metadata.xml</code> files, but not get the latest jars. It turned out that Maven 3 does not allow non-unique snapshots (&lt;<code>uniqueVersion&gt;false&lt;/uniqueVersion</code>&gt;) but we still had our Artifactory repository configured for non-unique versions. Artifactory has a <a href="http://wiki.jfrog.org/confluence/display/RTF/Local+Repositories" target="_blank">write-up</a> on the issue, and changing the configuration solves the problem.</li>
<li>Finally, some of our Jenkins jobs could not resolve common plugins from Artifactory. The url for them showed &#8216;null&#8217; instead of the name of the virtual repo, ie. &#8216;repo&#8217;. Maven 3 worked fine from the command-line, however. These jobs turned out to have been created as &#8216;free-style&#8217; jobs that just invoked maven. Once we recreated them as &#8216;Maven 2/3&#8242; jobs, everything worked fine. Extra Artifactory build configuration options showed up, as well. I&#8217;m sure there&#8217;s a way to correctly configure the free-style jobs, but we just changed them to maven jobs.
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.copperykeenclaws.com/upgrading-maven-2-to-3/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

