<?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>Lost Continent</title>
	<atom:link href="http://jonfeatherstone.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://jonfeatherstone.com</link>
	<description>The Personal Website of Jon Featherstone</description>
	<lastBuildDate>Fri, 24 May 2013 20:30:00 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Careerbug</title>
		<link>http://jonfeatherstone.com/2013/05/24/careerbug/</link>
		<comments>http://jonfeatherstone.com/2013/05/24/careerbug/#comments</comments>
		<pubDate>Fri, 24 May 2013 19:48:25 +0000</pubDate>
		<dc:creator>Jon</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://jonfeatherstone.com/?p=38</guid>
		<description><![CDATA[I had an interesting issue creep on a one of our production servers.  It was a career defining bug.  A &#8220;careerbug&#8221; you might say. At random intervals throughout the day, we were receiving calls / emails from internal staff that our primary software portal was running sluggishly.  I first wrote it off as a latency [...]]]></description>
				<content:encoded><![CDATA[<p>I had an interesting issue creep on a one of our production servers.  It was a career defining bug.  A &#8220;careerbug&#8221; you might say.</p>
<p><img class="alignnone" alt="" src="http://imgs.xkcd.com/comics/bug.png" width="271" height="258" /></p>
<p>At random intervals throughout the day, we were receiving calls / emails from internal staff that our primary software portal was running sluggishly.  I first wrote it off as a latency issue, because the internet connectivity in our office is really bad, but it soon became apparent that customers outside of our network were seeing the problem as well.  I rebooted IIS and called it an evening, but my troubles were far from over.</p>
<p>Early the next day, my phone was buzzing with emails from my boss, telling me that our clients in Asia were complaining about site performance again.  I got my groggy butt out of bed, took at hot shower, and rode the train into work, ready to kick-butt and solve problems.</p>
<p>But, where to begin?</p>
<p>This is an asp.net application running on a windows production server, running on code compiled in &#8220;release&#8221; mode, on a machine floating around in the  Amazon EC2 ether.  I don&#8217;t have any stack traces, or other exception reports to work from.  I am effectively flying blind.  Where do I start.</p>
<p>Well, thankfully this was not my first Rodeo, and I have a few goto tools to work with:</p>
<p><a href="http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx">Process explorer</a> - How did I ever work without this amazing tool?  Gives solid metrics and other data about all processes running on a windows machine.  CPU utilization looked normal, but would spike to 100% and remain pegged for quite some time at random intervals.  Ram usage looked fine.  Next.</p>
<p><a href="http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx" target="_blank">Process monitor</a> &#8211; Basically tells you everything (and I mean everything) that every process doing at any given interval.  Really helpful for finding IO problems.  IO of all kinds is your biggest bottleneck in any software system, so being able to see if disks or network are being abused is key for flying blind.  Disk IO seemed fine, but network IO was through the roof.  Wireshark!</p>
<p><a href="http://www.wireshark.org/" target="_blank">Wireshark</a> - Due to my C++ background, I will often begin thinking of problems at the protocol level (I had to implement a SOAP webservice integration at the socket level in C++, but that is a story for a different day).  Wireshark is my goto.  A bit daunting at first, once you understand the lingo, it is invaluable.  As is often the case, wireshark had a pretty interesting story to tell.  During the CPU spikes, network traffic was through the roof.  At first, I thought that it might be a DOS or some other external attack, but upon further inspection, the vast majority of the traffic was between the EC2 instance and the RDS server (database).</p>
<p>Luckily, the traffic between IIS and the database is not encrypted, so I could see what sql statements were being run.  At first glance, it appeared normal, but once I was able to time a wireshark network traffic capture exactly during a CPU spike, which thankfully, happened by fluke chance due to the extremely sporadic nature of this problem, I saw some really strange SQL running over the wire.  About 98% of the statements were an insert statement into our analytic session table.</p>
<p>Session table?  There should only be one session row created per session upon successful login.  Strange.  After running a few queries, it turns out that there were a few THOUSAND session records created per login.  Eh&#8230;</p>
<p>Checking the session records, it turns out that the vast majority of the rows (about 80%) are duplicates and have the same timestamps (in groups of a few thousand).  Furthermore, those timestamps correlate to the exact times that we were seeing problems with performance.</p>
<p>Well at least I know what the symptom looks like.  What now?</p>
<p>I ended up writing a script that would run a database query looking for the duplicate (ghost) sessions and send me a text message.  That way I could login to the production server while the problem was happening.  It was actually pretty eerie being woken by a text message that said &#8220;Ghosts are here!!!&#8221;.  It always took me a few minutes of utter sleep deprived confusion to remember what the hell that actually meant.</p>
<p>After a few days of ghosts haunting me, I was finally able to isolate the problem down to a few lines of code:</p>
<script src="https://gist.github.com/5645810.js"></script><noscript><p>View the code on <a href="https://gist.github.com/5645810">Gist</a>.</p></noscript>
<p>Can you find the careerbug?</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://jonfeatherstone.com/2013/05/24/careerbug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stack from scratch (almost)</title>
		<link>http://jonfeatherstone.com/2012/06/22/stack-from-scratch-almost/</link>
		<comments>http://jonfeatherstone.com/2012/06/22/stack-from-scratch-almost/#comments</comments>
		<pubDate>Sat, 23 Jun 2012 04:22:14 +0000</pubDate>
		<dc:creator>Jon</dc:creator>
				<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://jonfeatherstone.com/?p=24</guid>
		<description><![CDATA[What is your current technology / development stack?  Are you happy with it?  If you could start from scratch, how would you structure things? Well, I had the great fortune to be given free reign to build an entire software arm of a company from scratch.  Just think, carte blanche on server Infrastructure, application stack, [...]]]></description>
				<content:encoded><![CDATA[<p>What is your current technology / development stack?  Are you happy with it?  If you could start from scratch, how would you structure things?</p>
<p>Well, I had the great fortune to be given free reign to build an entire software arm of a company from scratch.  Just think, carte blanche on server Infrastructure, application stack, ticket tracking system, source control type and hosting, release management, version management, development policies and practices, the &#8220;whole shootin&#8217; match!&#8221;</p>
<p>Ok, well I guess that I inherited most of the application stack decisions of our previous contractors, but you get the point.</p>
<p>&nbsp;</p>
<p>I felt like Augustus Gloop in the chocolate factory.</p>
<p>&nbsp;</p>
<p><a href="http://jonfeatherstone.com/wp-content/uploads/2012/06/Augustus-Gloop-charlie-and-the-chocolate-factory-4535564-254-576.jpg"><img class="alignnone size-full wp-image-28" title="Augustus-Gloop-charlie-and-the-chocolate-factory-4535564-254-576" src="http://jonfeatherstone.com/wp-content/uploads/2012/06/Augustus-Gloop-charlie-and-the-chocolate-factory-4535564-254-576.jpg" alt="" width="254" height="576" /></a></p>
<p><strong>Server Infrastructure</strong></p>
<p>One of the first tasks that I was given as the new lead developer, was to consolidate all of our existing server infrastructure.  We had 3 different service providers, and the costs were getting out of control.  I was told to pick a host, and consolidate.  Amazon Web Services (IAAS) to the rescue!  EC2 really is magic.  I say, &#8220;Amazon, I need 2 large linux servers running linux, 2 large servers running windows, a few mysql data stores, and a few mssql data stores&#8221;.  It thinks for a few minutes and says &#8220;Ok Jonfen, here you go!&#8221;)  Magic.  I have a few minor complaints with AWS, but overall, I have loved working on this great platform.</p>
<p>&nbsp;</p>
<p><strong>Development Machines</strong></p>
<p>From the beginning, I knew that I had an interesting challenge ahead me.  I would be responsible for software components built in Rails, Python (django and cherrypy) and asp.net.  I wrestled with the idea of just using MacbookPros for both rails and asp.net development, but visual studio is already clunky enough without the virtualization overhead, and dual booting with base camp is tedious.  I instead opted for having windows development machines alongside our existing MacBooks (synergy anyone?)  This has worked out great so far, but I can&#8217;t tell you how many times I have tried and failed to copy-paste from my windows machine to my MacBook and vice versa.  windows (command) + c, ctrl + v?  Or windows + c, windows + v?  Buh&#8230;</p>
<p>&nbsp;</p>
<p><strong>SCM</strong></p>
<p>I decided to use a mix of git and mercurial for our source control systems.  Previous contractors had used git on unfuddle to track our *nix projects, and I was fine with keeping that going (git that is, unfuddle is a cluster).  We use our MacBooks Pros for our *nix development, and I love how straight forward SourceTree makes working with git.  I know that the hardcore git guys will say that it is blasphemous to use anything other that the cli for git, but I think that source control should be a visual experience.  I migrated all of our existing applications from unfuddle to bitbucket git repositories.</p>
<p>The latest project that my team inherited was implemented in asp.net.  I tinkered with the idea of using git for this as well, but git is not pretty on windows (git bash?  Yikes&#8230;)  The DVCS of choice on windows seems to be mercurial.  The tortisehg client is mature and highly functional.  I had used it in conjunction with bitbucket on some personal projects, and I really liked it.</p>
<p>Git + SourceTree on OSX, Mercurial + TortiseHG on windows.  Cool.</p>
<p>&nbsp;</p>
<p><strong>Source Code Hosting</strong></p>
<p>No contest here.  I needed a cheap hosting service that provided unlimited private repositories for both git and mercurial.  Whammo, bammo bitbucket!  Having been a happy free tier bitbucket user for a year or so now, I was excited to begin using it at work as well.  The closest competitor was github, and they aren&#8217;t even close (can you say pricey?)</p>
<p>&nbsp;</p>
<p><strong>Issue Tracking</strong></p>
<p>I spent a while on this one.  Maybe its because there are more ticket tracking systems than Baskin and Robbins ice cream flavors.  I had worked with a wide enought variety of different systems at previous jobs (bugzilla, flyspray, helpdesk, team-forge, fogbugz) to make a good decision on what would be the best fit.  Issue tracking is the bread and butter of software development, so I wanted ot make sure to do this right with the following goals in mind:</p>
<ul>
<li>Must be a hosted solution.  I did not want to deal with managing the server on this.</li>
<li>Must be simple to use (create tickets quickly and add as much detail as needed later)</li>
<li>Must integrate with source control system to tie tickets to commits</li>
<li>Must have good reporting</li>
<li>Must have simple interface for tying tickets to release milestones (or sprints)</li>
<li>Must have simple work-flow</li>
</ul>
<p>Once I laid out all the criteria, this one ended up being a no-brainer as well.  Jira + Greenhopper.  Not only does Jira meet all of the requirements listed, it has seamless integration with bitbucket built in! (atlassian bought bitbucket a while back).  The greenhopper gives me a great view into each release and a quick glance view of everything that my team is working on.  I love it.  I honestly can&#8217;t picture working in any other environment after working like this.</p>
<p>&nbsp;</p>
<p><strong>Release / version management</strong></p>
<p>After researching different methodologies for releasing, I decided that a two branch (default and release) approach would work the best for our needs.  All daily development is committed and pushed to the default (development) branch.  Once a release is ready, all commits are merged from the default branch into the release branch, and the release branch is tagged with the current version.  If a critical bug is found in the release, it is fixed, committed, and released directly from the release branch and merged into the development branch (export / import revision).</p>
<p>I like the idea of giving a particular version or sprint some personality, so I opened up to my team for ideas on naming our releases.  One of my engineers suggested naming releases after a particular genre &#8211; artist &#8211; album to match the major, minor, and tiny revision numbers.  It was determined that &#8220;metal&#8221; would be our first genre for &#8220;0&#8243; series builds, so our first release was &#8220;0.1.1, Metal &#8211; Metallica &#8211; Metallica.&#8221;  While running our automated deployments, we play a song from the album for the release.  We have a great time with it.</p>
<p>&nbsp;</p>
<p><strong>Deployment</strong></p>
<p>One thing that our previous contractors did very well is enforce push-button deployment for our software components.  Both ruby and python have great deployment frameworks (capistrano and fabric) that work over ssh.  I really like the simplicity and effectiveness of these systems.  There really is something so gratifying about typing &#8220;cap production deploy&#8221; and watching the magic happen.  After seeing the nightmare that deployments became at my previous job, I wanted to strictly enforce fully automated deployment.  Unfortunately, asp.net deployment is messy (integrated with visual studio or msi installers, uh no thanks.)  After considering a few commercially available systems, I decided to do what no programmer should do but always does and roll my own system.</p>
<p>I would structure it to work the same way as capistrano, but on windows.  Possible right?  You bet your boots!  In about a week of development time, I had our fully automated deployment system written from scratch in Python.  &#8221;python deploy.py production&#8221;, cue the metal, BAAAM!  I love it.  I am so proud of my little push button deployment system that I am considering generalizing and cleaning it up a bit and posting it on github.  Fully automated asp.net server deployment anyone???</p>
<p>Anyway, I am very happy with how smoothly everything is running.  It is extremely gratifying to build an entire development stack from the ground up.  I hope that all you developers out there will get the pleasure one day.</p>
]]></content:encoded>
			<wfw:commentRss>http://jonfeatherstone.com/2012/06/22/stack-from-scratch-almost/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>On being a generalist</title>
		<link>http://jonfeatherstone.com/2012/03/07/on-being-a-generalist/</link>
		<comments>http://jonfeatherstone.com/2012/03/07/on-being-a-generalist/#comments</comments>
		<pubDate>Thu, 08 Mar 2012 01:30:27 +0000</pubDate>
		<dc:creator>Jon</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[programming hiring jobs]]></category>

		<guid isPermaLink="false">http://jonfeatherstone.com/?p=17</guid>
		<description><![CDATA[I have an interesting job.  I get to build and lead a small team of developers to create a fancy web-based content distribution / market analysis tool.  This will be the first time in the history of the company that a full time team has worked on the software.  Up until now, they have had [...]]]></description>
				<content:encoded><![CDATA[<p>I have an interesting job.  I get to build and lead a small team of developers to create a fancy web-based content distribution / market analysis tool.  This will be the first time in the history of the company that a full time team has worked on the software.  Up until now, they have had a mix of contractors and outsourcing firms provide their software needs.  These are talented folks who have been able to come up with a great product, but as you can imagine, the system has become a bit fragmented.</p>
<p>In our solution, we are currently using the following technologies (in no particular order):</p>
<ul>
<li>Ruby / Rails</li>
<li>Ruby / Sinatra / Unicorn</li>
<li>MySql</li>
<li>C# / ASP.net</li>
<li>MSSQL</li>
<li>Python / django</li>
<li>Python / CherryPy</li>
<li>Mongodb</li>
<li>PHP</li>
</ul>
<p>Quite a laundry list no?  This might sound like a crazy stack, but other software companies I work for are no different.  Software systems are complex beasts that tend to be spread across multiple platforms / technologies.  Why is this the case?  I believe that there are a few reasons why:</p>
<ol>
<li><strong>Software moves a million miles an hour</strong> &#8211; New programming languages, frameworks, and technologies come out seemingly every day.  Most of the time, these technologies provide developers with a faster, better, or more friendly way of solving a problem, so developers are anxious to get their hands dirty and try them out.</li>
<li><strong>Programmers are magpies, and prototypes, unfortunately, often end up being end product</strong> &#8211; Because of reason #1, developers will often want to keep up on new technologies and frameworks by getting a &#8220;hello world&#8221; fired up.  I personally do this quite frequently.  It is critical for developers to stay current on new tech. Often while experimenting with new technology, a particular software problem will come up at work, and a developer will think &#8220;man, that would be soooo slick in Node!&#8221;  They poke around a bit, get a prototype running, show it to their customer, and before you know it, you&#8217;ve got Node running on your production server.</li>
<li><strong>Technology choice, or lack of adapting new technology is a narrative of the culture of an organization</strong> &#8211; Organizations say a lot about who they are and want to be by what technology stack they use.  No one wants to be perceived as being built on a barn, so new passing craze technology will get wrapped into existing solutions just so the name of the technology can be thrown around in geeky conversation.</li>
</ol>
<p>Seldom will a developer work for an organization that utilizes a single platform.  <em>We need to be flexible</em>.  <em>We need to be willing to learn new things</em>.  We need to be <strong>generalists</strong>.</p>
<p>Two stories:</p>
<p>At a previous job, a developer was working on a project.  He had worked in a particular technology for most of his career and was quite skilled at getting things done with it.  A request came in from management which required him to step outside of his sandbox and use a new technology.  I had personally used this technology only a little bit (due to my incessant &#8220;hello world&#8221; dablings) so he asked if I could help him out.  I of course was happy to help.  Teaching and mentoring are my true passions.  I began to explain to him how he could go about solving his problem with this new technology.  After about 5 minutes, he said something like this: &#8220;You know, why don&#8217;t you just go ahead and write the code for me.  I really don&#8217;t have any desire to learn new technology.&#8221;</p>
<p>I was floored.  How could you not have the desire to learn new technology?  How do you expect to stay even close to relevant as a developer?</p>
<p>The second story relates to my new position.  I am currently in the process of hiring a new developer, and I have had a few phone screenings with potential candidates.  One candidate in particular stuck out to me.  his resume was solid, and he had a lot of good .NET experience (which is good, because a large chunk of our new product is written in ASP.NET).  After speaking with him for a while, I asked him what he thought about Ruby, Python, and a few other technologies.  He said something very simmillar to the guy in my first story.  &#8221;I haven&#8217;t worked at all in Python or Ruby.  I don&#8217;t like Linux.  I don&#8217;t really want to learn any of that stuff.&#8221;</p>
<p>He was immediately off my list.</p>
<p>A large chunk of our product is written in Ruby and Python, and runs on Ubuntu Servers.  What happens when those components break down?  Does he just twiddle his thumbs until a bug report for the ASP components come in?  Sorry.</p>
<p>Don&#8217;t be afraid to learn new things.  Don&#8217;t pigeon-hole yourself into a technology.  Be a generalist.</p>
<p>Unless, of course, you don&#8217;t want to be on my team.</p>
]]></content:encoded>
			<wfw:commentRss>http://jonfeatherstone.com/2012/03/07/on-being-a-generalist/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hosted Solution</title>
		<link>http://jonfeatherstone.com/2012/03/05/hosted-solution/</link>
		<comments>http://jonfeatherstone.com/2012/03/05/hosted-solution/#comments</comments>
		<pubDate>Mon, 05 Mar 2012 14:47:29 +0000</pubDate>
		<dc:creator>Jon</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jonfeatherstone.com/?p=5</guid>
		<description><![CDATA[Well, I decided that it was time to move to an actual hosted solution.  I will admit that it was a fun challenge to figure out how to trick my ISP into allowing me to host a website from my home server, but I just couldn&#8217;t beat the bluehost prices, and I want to move [...]]]></description>
				<content:encoded><![CDATA[<p>Well, I decided that it was time to move to an actual hosted solution.  I will admit that it was a fun challenge to figure out how to trick my ISP into allowing me to host a website from my home server, but I just couldn&#8217;t beat the <a href="http://www.bluehost.com/" target="_blank">bluehost </a>prices, and I want to move to a NAS solution instead of a full server eventually.  I am thinking about something like <a href="http://www.newegg.com/Product/Product.aspx?Item=N82E16822108095" target="_blank">this</a>, raid1, 2 TB?</p>
<p>Since I haven&#8217;t written anything earth-shattering, I most likely won&#8217;t be migrating over my old articles, but I think that I will keep my same bio and information.</p>
<p>Stay tuned.</p>
]]></content:encoded>
			<wfw:commentRss>http://jonfeatherstone.com/2012/03/05/hosted-solution/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
