<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Chris Weldon</title>
	
	<link>http://www.chrisweldon.net</link>
	<description>Rants and tech solutions from your neighborly geek</description>
	<lastBuildDate>Mon, 11 Jul 2011 00:53:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/chrisweldon" /><feedburner:info uri="chrisweldon" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Installing the oAuth pecl extension on Mac OS X with Zend Server Community Edition</title>
		<link>http://feedproxy.google.com/~r/chrisweldon/~3/o0CbQTdq9c8/installing-the-oauth-pecl-extension-on-mac-os-x-with-zend-server-community-edition</link>
		<comments>http://www.chrisweldon.net/2011/07/10/installing-the-oauth-pecl-extension-on-mac-os-x-with-zend-server-community-edition#comments</comments>
		<pubDate>Mon, 11 Jul 2011 00:53:27 +0000</pubDate>
		<dc:creator>Chris Weldon</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Systems Administration]]></category>

		<guid isPermaLink="false">http://www.chrisweldon.net/?p=299</guid>
		<description><![CDATA[I&#8217;m running Zend Server Community Edition on Mac OS X. I attempted to install the PECL oAuth extension by using the simple command: sudo pecl install oauth The installation went fine, but when I attempted to find pecl in my &#8230; <a href="http://www.chrisweldon.net/2011/07/10/installing-the-oauth-pecl-extension-on-mac-os-x-with-zend-server-community-edition">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m running Zend Server Community Edition on Mac OS X. I attempted to install the PECL oAuth extension by using the simple command:</p>
<p><code><br />
sudo pecl install oauth<br />
</code></p>
<p>The installation went fine, but when I attempted to find pecl in my modules list, it wasn&#8217;t present. When I checked
<pre>/usr/local/zend/var/log/php.log</pre>
<p>, I got the following error message:</p>
<p><code><br />
[11-Jul-2011 00:19:32] PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/zend/lib/php_extensions/oauth.so' - dlopen(/usr/local/zend/lib/php_extensions/oauth.so, 9): no suitable image found.  Did find:<br />
/usr/local/zend/lib/php_extensions/oauth.so: mach-o, but wrong architecture in Unknown on line 0<br />
</code></p>
<p>It turns out the reason for this is that Snow Leopard builds the pecl extension, it&#8217;s doing so as a 64-bit binary. However, Zend Server community edition is compiled using 32-bit. I found a <a href="http://www.worldgoneweb.com/2011/zendserver-community-edition-on-mac-os-x-compiling-php-extensions/">blog post</a> which explains exactly how to compile the PECL module. The solution worked out <em>perfectly</em>.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/RpFt6RieWDM7ZGU0Itkr1i0XqTQ/0/da"><img src="http://feedads.g.doubleclick.net/~a/RpFt6RieWDM7ZGU0Itkr1i0XqTQ/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/RpFt6RieWDM7ZGU0Itkr1i0XqTQ/1/da"><img src="http://feedads.g.doubleclick.net/~a/RpFt6RieWDM7ZGU0Itkr1i0XqTQ/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.chrisweldon.net/2011/07/10/installing-the-oauth-pecl-extension-on-mac-os-x-with-zend-server-community-edition/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.chrisweldon.net/2011/07/10/installing-the-oauth-pecl-extension-on-mac-os-x-with-zend-server-community-edition</feedburner:origLink></item>
		<item>
		<title>Account Deletions</title>
		<link>http://feedproxy.google.com/~r/chrisweldon/~3/2FnYJJ1XuqY/account-deletions</link>
		<comments>http://www.chrisweldon.net/2011/01/28/account-deletions#comments</comments>
		<pubDate>Fri, 28 Jan 2011 13:36:04 +0000</pubDate>
		<dc:creator>Chris Weldon</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.chrisweldon.net/?p=295</guid>
		<description><![CDATA[I had to recently re-install WordPress. During the process, I didn&#8217;t (forgot to) reinstall the registration plugin that helped prevent bots from auto-creating accounts. This resulted in a large number of illegitimate accounts being created. I&#8217;ve purged all of these &#8230; <a href="http://www.chrisweldon.net/2011/01/28/account-deletions">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I had to recently re-install WordPress. During the process, I didn&#8217;t (forgot to) reinstall the registration plugin that helped prevent bots from auto-creating accounts. This resulted in a large number of illegitimate accounts being created. I&#8217;ve purged all of these accounts. If I purged one of your accounts that was legit, I apologize and ask that you re-register.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/4ZDSwEh7kyTKZEpdBcqdfRJdhhg/0/da"><img src="http://feedads.g.doubleclick.net/~a/4ZDSwEh7kyTKZEpdBcqdfRJdhhg/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/4ZDSwEh7kyTKZEpdBcqdfRJdhhg/1/da"><img src="http://feedads.g.doubleclick.net/~a/4ZDSwEh7kyTKZEpdBcqdfRJdhhg/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.chrisweldon.net/2011/01/28/account-deletions/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.chrisweldon.net/2011/01/28/account-deletions</feedburner:origLink></item>
		<item>
		<title>My Move to Improving Enterprises, Part 1</title>
		<link>http://feedproxy.google.com/~r/chrisweldon/~3/qh2GufdcQcQ/my-move-to-improving-enterprises-part-1</link>
		<comments>http://www.chrisweldon.net/2010/08/23/my-move-to-improving-enterprises-part-1#comments</comments>
		<pubDate>Mon, 23 Aug 2010 18:03:10 +0000</pubDate>
		<dc:creator>Chris Weldon</dc:creator>
				<category><![CDATA[*nix]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Systems Administration]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[continuous integration]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[phpunit]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[wcf]]></category>
		<category><![CDATA[wpf]]></category>
		<category><![CDATA[zend framework]]></category>

		<guid isPermaLink="false">http://www.chrisweldon.net/?p=281</guid>
		<description><![CDATA[This blog article has turned into a ridiculously long posting that I&#8217;m splitting into 2, possibly 3 parts. The series pretty much recaps what I did at the College of Architecture and what I&#8217;m doing at Improving Enterprises. Enjoy! For &#8230; <a href="http://www.chrisweldon.net/2010/08/23/my-move-to-improving-enterprises-part-1">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This blog article has turned into a ridiculously long posting that I&#8217;m splitting into 2, possibly 3 parts. The series pretty much recaps what I did at the College of Architecture and what I&#8217;m doing at Improving Enterprises. Enjoy!</p>
<p>For those who have been following my <a href="http://twitter.com/neraath">Twitter</a> stream, I am no longer employed by the <a href="http://www.arch.tamu.edu/" target="_blank">College of Architecture</a> at <a href="http://www.tamu.edu" target="_blank">Texas A&#038;M University</a>. I have joined the ranks of <a href="http://www.improvingenterprises.com/">Improving Enterprises</a> (<a href="http://twitter.com/improving">@improving</a> on Twitter) as a Consultant! I have been a consultant for quite some time. My consulting started with my business, <a href="http://www.cerberusonline.com/">Cerberus</a>, then with the work I did on behalf of CIS Customer Applications, and finally consulting on my own. There were several reasons why I decided to leave the university, and continuing down the path of being a consultant was certainly one of them. In this post, I plan on discussing some of the reasons why I left the university, and what life has been like at Improving Enterprises since I&#8217;ve left.<br />
<span id="more-281"></span><br />
My tenure at the College of Architecture was fun and exciting (initially) and we (the IT team) managed to <strong>completely</strong> revamp our infrastructure from the ground-up. When we inherited the infrastructure after the latest IT team turnover, it was in a very poor situation. There was no redundancy between services, no high availability, and no scalability. There was a single web server, a single Microsoft Exchange server, a couple of domain controllers, a single DHCP server, and two separate file servers. Some of these servers were dedicated hosts, and some of them were hosted using VMware Server. Backups were failing intermittently. The infrastructure was expect to support close to 250 faculty and staff and around 1500 students, and it goes without saying that it was struggling to do so. </p>
<p>One of the first things we undertook was to get a current-state backup and ensure that backups continued both regularly and successfully. From there, we acquired nearly 12 new servers to replace the then 4-to-6-year-old servers that weren&#8217;t standardized. We had dual needs to get both our Windows infrastructure in a stable state as well as to spool up a UNIX infrastructure (reasons below). While testing out which direction we wanted to go with, we tried Microsoft Hyper-V for Windows virtualized hosting. While it was certainly a strong competitor to that of VMware ESX, it definitely left a bitter taste in our mouth and left us wanting more. For starters, it didn&#8217;t provide a way to over-budget resources on servers. Additionally, it didn&#8217;t provide a way to dynamically migrate virtual machines from host-to-host without shutting it down (aka vMotion in VMware parlance). Finally, the performance of the virtual machines seemed to be slower than virtual machines hosted through VMware ESX. </p>
<p>I started the journey with *NIX environment setup with Solaris 10, at the recommendation of our IT Director, Nolan Flowers. The reason he recommended it was because of the built-in Zones, which in essence was Solaris&#8217; virtual machine hosting environment. Sadly, however, the PowerEdge 2650s I was trying this out on were terribly slow for virtual machine hosting. Then, when I tried to put Solaris 10 on our then-new PowerEdge 1950s, the installation failed indicating that there was a problem loading hard disk drivers for our SAS controllers. This put a quick end to doing Solaris virtualization.</p>
<p>In any case, we decided to switch the direction we decided upon from Microsoft Hyper-V and Solaris Zones to VMware ESX. Thankfully, we made the decision at the right time as ESX 4.0 was just released and put vMotion at our fingertips with an Advance license purchase rather than an Enterprise license. Myself and Derek Groh managed to setup our environment to be highly available as a result of our purchase of an IBM-branded NetApp FAS 2050 and using iSCSI disk access. This device was pure genius and was <strong>extremely</strong> versatile and robust. We only had one disk throw and one incident where it contacted IBM support of an alert condition, only to find out that the controller was not seated properly. </p>
<p>Once we got ESX up-and-running, I started spooling up our Linux virtual infrastructure. One of the other key responsibilities I had at the College was in setting up and maintaining a stable, scalable, and useful Linux infrastructure. This infrastructure was necessary to host the Atlassian software (see below) and to provide a better platform for web and application hosting within the College. Because the majority of the visible web presence for the College was due to be converted to PHP, I wanted to ensure that we were hosting on a Linux infrastructure. I say this because at the time of making that decision, PHP hosting on Windows was still a significant pain and would have taken me significantly longer to setup and maintain.</p>
<p>I spent a good deal of time talking with Nolan and having internal debates of whether to go with the universally-recognized RedHat or SuSE enterprise flavors of Linux, or go with what I know (Debian and Gentoo). I opted to go with the flavor that I had been running for so long at Cerberus &#8211; Gentoo. I love this distro. It&#8217;s extremely configurable, super fast, and above-all: stable. While many of the complaints on Gentoo have been it&#8217;s long computation times, I find that the stability of the distro far outweighs the length of compilation time of all the packages. For those anti-Gentoo enthusiasts out there, check out <a href="http://distcc.samba.org/">distcc</a> &#8211; that&#8217;s what brings down the overall computation time. </p>
<p>I knew from the get-go that individual logins on each of the virtual machines was not going to work out well. My previous sysadmin experience definitely taught me that having to manage individual accounts across dozens of systems gets to be an exponential pain REAL fast. Thus, I started looking into whether or not I wanted my machines integrated with Active Directory or to spawn my own OpenLDAP. When it got down to it, I knew I was going to have a much easier time moving towards OpenLDAP rather than integrating with Active Directory. The latter required modifications to the AD schema which was <strong>not</strong> possible because we were not Forest Administrators &#8211; <a href="http://cis.tamu.edu/">CIS</a> controlled that. Thus, I started my own OpenLDAP server and had integrated authentication and authorization on my Gentoo virtual machines rather quickly. Further revisions allowed me to enable sudo configuration via LDAP.  </p>
<p>Finally, the last piece of systems administration that I loved working with was <a href="http://www.puppetlabs.com/">Puppet</a>. For any individual running multiple Linux systems, this is an absolute <strong>must</strong> if you want to start automating your environment. When I started spooling up half a dozen new web servers and realizing that I was typing the same commands to install Apache, PHP, etc. on them, I then asked myself the same question that I do when I develop software: why am I repeating myself? Puppet helps to avoid that. In fact, if you have a way to have your provisioning steps automatically assign an IP address and hostname to your virtual machine, then you can have all packages and necessary updates installed to your VM template without touching the VM &#8211; Puppet handles all of this. It really allowed me to move away from systems administration and concentrate on software development (again) for the last 6 months of working at the College. </p>
<p>During this entire process, I spent a good deal of time learning how to properly administrate the full <a href="http://www.atlassian.com/">Atlassian</a> suite of software. Our localized installation included <a href="http://www.atlassian.com/confluence/">Confluence</a>, <a href="http://www.atlassian.com/jira/">JIRA</a>, <a href="http://www.atlassian.com/crowd/">Crowd</a>, <a href="http://www.atlassian.com/bamboo/">Bamboo</a>, and <a href="http://www.atlassian.com/crucible/">Crucible</a>. Being able to administer these software installations had to have been one of my favorite tasks at the College. I managed to become quite well-versed in the various problems that could occur during any stage of using the software, became an expert at performing installations (both for the College and personally), and became very familiar with the various features available as an end-user and an administrator. This, in addition to the heavy amount of software development we were doing at the College, led me to documenting a plethora of infrastructure and software documentation. It also allowed me to be able to have the flexibility of being able to plan software projects in an Agile context. All of this has led me down the path of becoming an Atlassian Evangelist. Be prepared to see more posts on the use of the Atlassian software. </p>
<p>In summary, all of the different systems software that I worked with and gained or continued to grow my expertise in were the following:</p>
<ul>
<li>Solaris</li>
<li>Gentoo Linux</li>
<li>VMware ESX</li>
<li>Windows Server 2008</li>
<li>NetApp OnTap</li>
<li>Microsoft Hyper-V</li>
<li>Nagios</li>
<li>Cacti</li>
<li>Puppet</li>
<li>Atlassian JIRA, Confluence, Crowd, Fisheye, Crucible, and Bamboo</li>
<li>PostgreSQL</li>
<li>MSSQL Administration</li>
</ul>
<h3>Software</h3>
<p>I know this is getting to be quite a long post, but I intend to encapsulate my <em>entire</em> experience at the College prior to my departure. For you software developers, this is the section for you. </p>
<p>The first major software project undertaking wasn&#8217;t the new <a href="http://www.arch.tamu.edu/">College web site</a>, nor was it the revamp of the <a href="http://its.arch.tamu.edu/">ITS web site</a>. Instead, it was the <a href="http://researchsymposium.arch.tamu.edu/">Research Symposium</a>. This was a quickly assembled web application that didn&#8217;t have an administrative interface. It was dynamically-driven, but required manual entry of all information into the database. Why? Because we were given less than 3 weeks to put this application together and get information out to the public before the event occurred. Why so quickly? Our Assistant Dean of Research, Lou Tassinary, continued to allow late submissions to the symposium &#8211; up until about a week before the event occurred. This prevented the book that typically goes along with the symposium from being sent to the publisher with enough lead time for it to be available by the event. Thus, the alternative was the web application. </p>
<p>Once that was complete, our focus did shift to the main <a href="http://www.arch.tamu.edu/">College of Architecture</a> web site. By this point in time, Jorge Vanegas had been appointed the interim Dean of the College and set our goals for revamping the College&#8217;s web site. He set up the task force that included myself and my graduate assistants, and Phillip Rollfing and his grad assistants. We set about by polling everyone at the College (Staff, Faculty, and Students) what they thought was deficient, could be improved, etc. Furthermore, we applied what we knew was missing and validated those assumptions with the results that came back from the polls we performed. </p>
<p>Before we even started considering a design, we needed to figure out the information architecture for the new site. We did this by analyzing what information we had that we must keep, what we needed to enhance, and ultimately, what we needed to add. From there, we had to figure out how best to organize it in order to drive users to the parts of the web site they want to get to. This was at least a one-month endeavor that entailed researching patterns of information architecture from other web sites, performing research by other information architects, etc. in order to finally decide in our final architecture. </p>
<p>The last step before we could start working on the design was to figure out what dynamic elements we needed to have on the site. We knew that we would want a calendar of events and the top-most articles from the archone newsletter, but we also needed to consider what else might appear on the front of the web site. Once we figured that we needed spaces that could be interchanged into thirds, we set our designers to the task of developing a design for the site. While they did that, I started on the framework for our new web presence.</p>
<p>At this point, some of y&#8217;all will be asking why I didn&#8217;t just simply start integrating the design within an existing CMS such as Plone, Drupal, or WordPress. First: WordPress is not a CMS. My arguments regarding this can easily take up another blog post, so I won&#8217;t discuss this here. But, the ultimate reason we were developing our own framework was because we <strong>weren&#8217;t</strong> rolling our own CMS. The Division of Marketing &#038; Communications at the university level were working with the TAMU developer and systems administrator community to stand up and host a truly enterprise CMS &#8211; Percussion. This CMS worked exactly as I would want it to &#8211; it provided the appropriate controls to allow site administrators to setup the workflows of approvals that content changes would have to go through before being published, gave the ability to integrate (some) dynamic information that would be shared across multiple sites, and most importantly, was distributed. By distributed, I mean it is a push-based CMS. This was more idealistic than a database-driven CMS for multiple reasons:</p>
<ul>
<li>If your database goes down, your web site goes down. With static pages, your web site does not necessarily have to go down if your database goes down.</li>
<li>If your CMS dies, your web sites are still available. If your web servers die and are completely unrecoverable, when you stand a new one up, you don&#8217;t have to go to backups to recover your web content &#8211; just push it from the CMS again and all is well.</li>
<li>Dozens (if not hundreds) of sites can all be managed by a single CMS engine, but all of those sites can be hosted on any combination of IIS, Apache, lighthttpd, nginx, etc. web servers. Because the CMS pushes content down to the servers &#8211; it&#8217;s completely agnostic of the delivery mechansim.</li>
</ul>
<p>With this, we developed the new web framework with the expectation that we would be pushing the static content from the Percussion CMS. In this, we had a single directory dubbed <code>content</code> that we had all of our content pages and structure. Furthermore, I had to develop a breadcrumb generation system for this framework that could walk up the path of the directories to be able to generate all of the hyperlinks for the breadcrumbs. This was a simple, yet interesting, challenge, particularly when dealing with if you were directly referencing an index page or the directory. </p>
<p>Other dynamic pieces that we started moving over from the old web framework to the new web framework were the Outstanding Alumni lists, scholarships, and In Memory Of, all of which were CRUD-based info. The next largest challenge was trying to move the directory into the new framework. </p>
<p>The college directory was exactly what you think it was: a listing of all faculty and staff within the College of Architecture. However, since it is a dynamic set of pages driven from info in the database, we could filter results based on the department or center an individual was a part of, do name-part searches, and also restrict their type (staff or faculty). But, over the course of my first 6 months at the college, my analysis of the needs of the college, departments, and centers, in addition to IT needs, really brought up the fact that our problems extended much beyond that of a simple directory: we needed a system that gave all members with association at the college (employees and students) identity management. </p>
<p>This was identified in multiple ways &#8211; the single most important way was inconsistent information across web sites. Since (most) center web sites and a couple of departmental web sites were not managed by ITS at the time of the evaluation, the information portrayed on the different sites regarding faculty and staff could vary quite a bit. By varying, it could present more or less information than other sites and in completely different style. Ultimately, the largest problem was ensuring the information was up-to-date. Anytime an employee changed their office, their phone number, their title, or any other piece of information that was (generally) consistent across web sites, they had to contact at least 3 people to ensure that update was recorded. Furthermore, <strong>none</strong> of the departments or centers listed all of the publications, ongoing research, or other achievements of their faculty &#8211; it was up to them to post to their own faculty web site. Because we had no centralized database of this information, we could not generate reports or metrics in any timely manner of the achievements of our faculty. We were not promoting them, and thus not promoting the College. </p>
<p>When it came to terminating or hiring individuals, there was no consistency in terms of when their account was disabled and subsequently terminated. There was no consistency of when accounts were established, and ensuring the proper trail of who was responsible for vetting the account&#8217;s creation didn&#8217;t really exist. This was obviously a process that needed more formality. </p>
<p>I started looking at identity management solutions that would provide us the most flexibility. Our core requirements were as follows:</p>
<ul>
<li>Giving human resources the ability to create and disable accounts at-will, in addition to other account management tasks such as updating titles, contact information, etc.</li>
<li>Giving directory administrators (the dean&#8217;s office staff) the ability to update directory and contact information for any staff and faculty member within the College.</li>
<li>Giving individuals the ability to manage their own directory information.</li>
<li>Being able to track the following items per faculty member:
<ul>
<li>Papers, articles, presentations, and other published materials</li>
<li>Research projects (current and completed)</li>
<li>Funds brought into the university</li>
<li>PhD students advised</li>
<li>Other information as necessary</li>
</ul>
</li>
</ul>
<p>Without delving into too much detail, the most optimal solution for this was a web service, particularly a WCF web service. It was necessary that the information to be provided through this service was going to be consumed by multiple applications (both internal and external), thus the need to use a web service rather than a database. Furthermore, it was critical that we use a .Net platform for hosting since we needed the hooks to integrate with Microsoft Active Directory for lifecycle management. The design also had to use two different data contracts for much of the data. Some of the data was public to everyone (per State law), and some of the data was hidden (due to other regulations and policies). Thus, to certain web applications, it was necessary to have a data contract that exposed and received all information (that way our internal users could manage it). For other internal applications and some external users, it was important that we serve out a publicly consumable data contract that didn&#8217;t expose the private information. </p>
<p>Sadly, I almost got to the first production release. It took 2 iterations (roughly 6 weeks) to develop the database design and start implementing the basic service set. Using Spring.Net&#8217;s IoC containers, though, really helped speed up the process of auto-wiring the dependencies and the translations between the service, business, and data layers. Furthermore, I worked very closely with NHibernate rather than using LINQ-to-SQL as I didn&#8217;t want to have to run a build script to regenerate my data model after each change to the database. </p>
<p>I have more software projects that I want to discuss, but will leave that for the topic of my next post. </p>

<p><a href="http://feedads.g.doubleclick.net/~a/0_6y3pKCDsNHk2Ea7rns7_LFk3I/0/da"><img src="http://feedads.g.doubleclick.net/~a/0_6y3pKCDsNHk2Ea7rns7_LFk3I/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/0_6y3pKCDsNHk2Ea7rns7_LFk3I/1/da"><img src="http://feedads.g.doubleclick.net/~a/0_6y3pKCDsNHk2Ea7rns7_LFk3I/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.chrisweldon.net/2010/08/23/my-move-to-improving-enterprises-part-1/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.chrisweldon.net/2010/08/23/my-move-to-improving-enterprises-part-1</feedburner:origLink></item>
		<item>
		<title>Nessus Scans FTW</title>
		<link>http://feedproxy.google.com/~r/chrisweldon/~3/xwBjUst5vdc/nessus-scans-ftw</link>
		<comments>http://www.chrisweldon.net/2010/06/22/nessus-scans-ftw#comments</comments>
		<pubDate>Wed, 23 Jun 2010 04:15:32 +0000</pubDate>
		<dc:creator>Chris Weldon</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.chrisweldon.net/2010/06/22/nessus-scans-ftw</guid>
		<description><![CDATA[Isn&#8217;t this the most worthless result from a vulnerability scan: PHP Unspecified Vulnerability (Protocol: tcp Port: 80) DESCRIPTION An unspecified vulnerability has been discovered in PHP with Unknown impact and attack vectors. All versions before 5.2.11, and 5.3.x before 5.3.1 &#8230; <a href="http://www.chrisweldon.net/2010/06/22/nessus-scans-ftw">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Isn&#8217;t this the most worthless result from a vulnerability scan:<br />
<quote><br />
PHP Unspecified Vulnerability (Protocol: tcp Port: 80)<br />
DESCRIPTION An unspecified vulnerability has been discovered in PHP with Unknown impact and attack vectors. All versions before 5.2.11, and 5.3.x before 5.3.1 are affected<br />
SOLUTION Upgrade to the latest version of PHP, available at http://www.php.net/downloads.php<br />
</quote><br />
Go Nessus. </p>

<p><a href="http://feedads.g.doubleclick.net/~a/EpMpYZtxfSo5EtfuINeWAz8USVQ/0/da"><img src="http://feedads.g.doubleclick.net/~a/EpMpYZtxfSo5EtfuINeWAz8USVQ/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/EpMpYZtxfSo5EtfuINeWAz8USVQ/1/da"><img src="http://feedads.g.doubleclick.net/~a/EpMpYZtxfSo5EtfuINeWAz8USVQ/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.chrisweldon.net/2010/06/22/nessus-scans-ftw/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.chrisweldon.net/2010/06/22/nessus-scans-ftw</feedburner:origLink></item>
		<item>
		<title>Merge is out of date?</title>
		<link>http://feedproxy.google.com/~r/chrisweldon/~3/3_bhiG3L09Q/merge-is-out-of-date</link>
		<comments>http://www.chrisweldon.net/2010/06/08/merge-is-out-of-date#comments</comments>
		<pubDate>Wed, 09 Jun 2010 04:59:09 +0000</pubDate>
		<dc:creator>Chris Weldon</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[subversion]]></category>

		<guid isPermaLink="false">http://www.chrisweldon.net/?p=277</guid>
		<description><![CDATA[So, I encountered a weird problem earlier tonight while trying to merge changes from our trunk back into a branch I&#8217;ve been working on. The merge went successfully and I could see all the changes locally. However, when I attempted &#8230; <a href="http://www.chrisweldon.net/2010/06/08/merge-is-out-of-date">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>So, I encountered a weird problem earlier tonight while trying to merge changes from our trunk back into a branch I&#8217;ve been working on. The merge went successfully and I could see all the changes locally. However, when I attempted to check in the changes, I got the following error message:</p>
<pre>
svn: File 'path/to/file' is out of date
</pre>
<p>This wasn&#8217;t terribly unusual, with the exception of the case I <strong>just</strong> checked out the branch from the repository. When I performed an update, nothing was updated which further complicated the situation. When I used the <code>--force</code> switch, only then did one of my folders update and indicate that it was in a conflicted state. When I resolved the conflict and attempted to check back in, guess what? The same error message. </p>
<p>This is when I started Googling to see if I could find someone else who had this problem, but alas found no answers. I then started trying to compare the differences between the versions, including what was available in the most recent trunk release and found something interesting. The most recent trunk <strong>didn&#8217;t</strong> have any properties named <code>svn:mergeinfo</code>. This was despite multiple merges already taking place in the past. Yet, when I looked at the merge that I am attempting to perform, the following mergeinfo appeared:</p>
<pre>
/branches/timelog-and-multi-speaker-ui:430-526
/trunk:532-533
</pre>
<p>I had specified only to merge versions 532-533 &#8211; nothing before then. Thus, the previous merge version was <strong>extremely</strong> unusual, and likely was what was causing the conflicts upon checkin. Sure enough, when I deleted that line in the <code>svn:mergeinfo</code> property, I was able to checkin successfully. </p>
<p>So, the lesson to be learned is if you try to merge and find you&#8217;re blocked because something isn&#8217;t really out-of-date, check your <code>mergeinfo</code>.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/1PkXTbZCWO0Jhfhd2nB0a7Bp37A/0/da"><img src="http://feedads.g.doubleclick.net/~a/1PkXTbZCWO0Jhfhd2nB0a7Bp37A/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/1PkXTbZCWO0Jhfhd2nB0a7Bp37A/1/da"><img src="http://feedads.g.doubleclick.net/~a/1PkXTbZCWO0Jhfhd2nB0a7Bp37A/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.chrisweldon.net/2010/06/08/merge-is-out-of-date/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.chrisweldon.net/2010/06/08/merge-is-out-of-date</feedburner:origLink></item>
		<item>
		<title>MyServiceHostFactory could not be loaded during host compilation</title>
		<link>http://feedproxy.google.com/~r/chrisweldon/~3/xinm95rvMCM/myservicehostfactory-could-not-be-loaded-during-host-compilation</link>
		<comments>http://www.chrisweldon.net/2010/05/24/myservicehostfactory-could-not-be-loaded-during-host-compilation#comments</comments>
		<pubDate>Mon, 24 May 2010 15:22:58 +0000</pubDate>
		<dc:creator>Chris Weldon</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Systems Administration]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[nant]]></category>

		<guid isPermaLink="false">http://www.chrisweldon.net/?p=273</guid>
		<description><![CDATA[Last Friday and this morning I had been trying to deploy the latest changes to my WCF application. As I started doing this the manual way (e.g. copying all DLLs, configs, and service endpoints into a directory to zip and &#8230; <a href="http://www.chrisweldon.net/2010/05/24/myservicehostfactory-could-not-be-loaded-during-host-compilation">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Last Friday and this morning I had been trying to deploy the latest changes to my WCF application. As I started doing this the manual way (e.g. copying all DLLs, configs, and service endpoints into a directory to zip and send up to my web server), I took a step back and realized I needed a NAnt build target because I&#8217;m going to be doing this over-and-over again. However, after creating the build target and deploying the resulting Zip to my web server, I received a strange error message when trying to invoke my services.<br />
<span id="more-273"></span><br />
The specific error message can be seen below. In a nutshell, rather than relying on the standard WCF ServiceHost to invoke my service contracts, I have custom defined a factory (dubbed <code>MyServiceHostFactory</code>) for building out my ServiceHost. However, WCF was unable to find the factory. I checked the bin/ directory and the assembly was present (<code>Coa.Accounts.Services.Host.dll</code>). I spent a good deal of time trying to figure out why this error message was being caused. The various recommendations from Google didn&#8217;t work, and recompiling half a dozen times also didn&#8217;t fix the problem. </p>
<pre>
Server Error in '/2010/05/631' Application.
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: The CLR Type 'Coa.Accounts.Services.Host.Infrastructure.MyServiceHostFactory' could not be loaded during service compilation. Verify that this type is either defined in a source file located in the application's \App_Code directory, contained in a compiled assembly located in the application's \bin directory, or present in an assembly installed in the Global Assembly Cache. Note that the type name is case-sensitive and that the directories such as \App_Code and \bin must be located in the application's root directory and cannot be nested in subdirectories.

Source Error:

Line 1:  <%@ ServiceHost
Line 2:  Service="Coa.Accounts.Services.ServiceImplementation.ProfileService"
Line 3:  Factory="Coa.Accounts.Services.Host.Infrastructure.MyServiceHostFactory" %>

Source File: /2010/05/631/ProfileService.svc    Line: 3

Version Information: Microsoft .NET Framework Version:2.0.50727.4200; ASP.NET Version:2.0.50727.4016
</pre>
<p>This is when I tried using my setup project and noticed something interesting. Although I was copying the same files to the <code>bin/</code> directory as the Setup project in Visual Studio was, the Setup project would work and not throw the error message. This is when I started paying attention to my build process. It should compile all *.cs files in my project directory. This is where the discrepancy showed up:</p>
<pre>
compile.sil.host:

      [csc] Compiling 2 files to 'C:\development\carc-accountctrl\build\bin\Coa.Accounts.Services.Host.dll'.

BUILD SUCCEEDED

Total time: 5.2 seconds.
</pre>
<p>There are a lot more than just 2 files in my project folder. There&#8217;s actually 6 files, plus 1 commonly linked file (<code>GlobalAssemblyInfo.cs</code>). Sure enough, when I looked at my NAnt <code>csc</code> target, the sources referenced my build <strong>destination</strong> instead of the sources. A quick fix results in a fix to the problem:</p>
<pre>
compile.sil.host:

      [csc] Compiling 7 files to 'C:\development\carc-accountctrl\build\bin\Coa.Accounts.Services.Host.dll'.

BUILD SUCCEEDED

Total time: 5.2 seconds.
</pre>
<p>So, in a nutshell, if you receive the error listed above and are using NAnt to automate your deployment, pay attention to the fact that your build sources are correct. Thankfully this wasn&#8217;t a weeklong ordeal like it could have potentially become. </p>

<p><a href="http://feedads.g.doubleclick.net/~a/BSRE255sqqIAETz69QpNc4sAW2M/0/da"><img src="http://feedads.g.doubleclick.net/~a/BSRE255sqqIAETz69QpNc4sAW2M/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/BSRE255sqqIAETz69QpNc4sAW2M/1/da"><img src="http://feedads.g.doubleclick.net/~a/BSRE255sqqIAETz69QpNc4sAW2M/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.chrisweldon.net/2010/05/24/myservicehostfactory-could-not-be-loaded-during-host-compilation/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.chrisweldon.net/2010/05/24/myservicehostfactory-could-not-be-loaded-during-host-compilation</feedburner:origLink></item>
		<item>
		<title>NetApp vSphere Virtual Storage Console Woes</title>
		<link>http://feedproxy.google.com/~r/chrisweldon/~3/cskhHjOlyvM/netapp-vsphere-virtual-storage-console-woes</link>
		<comments>http://www.chrisweldon.net/2010/04/05/netapp-vsphere-virtual-storage-console-woes#comments</comments>
		<pubDate>Mon, 05 Apr 2010 22:15:11 +0000</pubDate>
		<dc:creator>Chris Weldon</dc:creator>
				<category><![CDATA[Systems Administration]]></category>
		<category><![CDATA[configure]]></category>
		<category><![CDATA[esx]]></category>
		<category><![CDATA[netapp]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[vcenter]]></category>
		<category><![CDATA[vsphere]]></category>

		<guid isPermaLink="false">http://www.chrisweldon.net/?p=269</guid>
		<description><![CDATA[As I was looking for ways to better interact with our NetApp FAS2050, I came across an article detailing the Virtual Storage Console. Being intrigued, I decided to install it on our vCenter Server. The install went fine and the &#8230; <a href="http://www.chrisweldon.net/2010/04/05/netapp-vsphere-virtual-storage-console-woes">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>As I was looking for ways to better interact with our NetApp FAS2050, I came across an article detailing the <a href="http://blogs.netapp.com/storage_nuts_n_bolts/2009/06/virtual-storage-console.html">Virtual Storage Console</a>. Being intrigued, I decided to install it on our vCenter Server. The install went fine and the application registered fine per documentation. However, the problem came when entering the credentials under the <strong>NetApp</strong> tab. I was stuck in an infinite loop that stated <code>SSL is not configured.</code>. No matter what I did (whether that was use the root user, the vcenter user I created, checking or unchecking <strong>Use SSL</strong>, I got the same error message &#8211; <code>SSL is not configured</code>.</p>
<p>This was despite installing the software per the <a href="http://blog.aarondelp.com/2010/01/installing-netapp-vsc-according-to-best.html">Installing NetApp VSC According to Best Practices</a>. SSHv2 and SSL were enabled when executing <code>secureadmin status</code>. Furthermore, <code>httpd.admin.enable</code> was on using legacy access. </p>
<p>I went Googling for the solution to the problem, and came across an <a href="http://old.nabble.com/ESX-utilty-problem-td22709305.html">old Nabble list scrape</a> that said to put the IP addresses of all of my ESX hosts in <code>/etc/hosts.equiv</code> and turn on <code>httpd.admin.hostsequiv.enable</code>. Sadly, that didn&#8217;t work. Yet, further Googling revealed <a href="http://communities.netapp.com/message/14396?tstart=0">something painfully obvious</a>. If you&#8217;ve ever tried accessing your filer via HTTPS (e.g. https://filer/na_admin/) and you were <strong>not</strong> listed in the <code>trusted.hosts</code>, then you&#8217;re flat out denied access. That&#8217;s <strong>exactly</strong> what was going on here. The VSC requires access to the APIs provided through the same console, and thus requires you to manually list all the IP addresses of the ESX servers in the <code>trusted.hosts</code> file. </p>
<h3>In Summary</h3>
<p>Make sure all of your ESX hosts (and vCenter server) are listed in the <code>options trusted.hosts</code>. </p>

<p><a href="http://feedads.g.doubleclick.net/~a/z2DjizFjMmnMNTWsVfzgV4VG_Qo/0/da"><img src="http://feedads.g.doubleclick.net/~a/z2DjizFjMmnMNTWsVfzgV4VG_Qo/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/z2DjizFjMmnMNTWsVfzgV4VG_Qo/1/da"><img src="http://feedads.g.doubleclick.net/~a/z2DjizFjMmnMNTWsVfzgV4VG_Qo/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.chrisweldon.net/2010/04/05/netapp-vsphere-virtual-storage-console-woes/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.chrisweldon.net/2010/04/05/netapp-vsphere-virtual-storage-console-woes</feedburner:origLink></item>
		<item>
		<title>PHP Developers Beware – PHPUnit isn’t gonna be on Subversion for Much Longer</title>
		<link>http://feedproxy.google.com/~r/chrisweldon/~3/9swXpMhSCrE/php-developers-beware-phpunit-isnt-gonna-be-on-subversion-for-much-longer</link>
		<comments>http://www.chrisweldon.net/2010/03/16/php-developers-beware-phpunit-isnt-gonna-be-on-subversion-for-much-longer#comments</comments>
		<pubDate>Wed, 17 Mar 2010 01:05:50 +0000</pubDate>
		<dc:creator>Chris Weldon</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[phpunit]]></category>
		<category><![CDATA[rant]]></category>

		<guid isPermaLink="false">http://www.chrisweldon.net/2010/03/16/php-developers-beware-phpunit-isnt-gonna-be-on-subversion-for-much-longer</guid>
		<description><![CDATA[Sebastian Bergmann, lead developer of the PHPUnit testing framework, has decided to switch PHPUnit from subversion to Git. I wouldn&#8217;t normally have a problem with this, especially if he were to follow all of the other mainstream projects that choose &#8230; <a href="http://www.chrisweldon.net/2010/03/16/php-developers-beware-phpunit-isnt-gonna-be-on-subversion-for-much-longer">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://sebastian-bergmann.de" target="_blank">Sebastian Bergmann</a>, lead developer of the PHPUnit testing framework, has decided to <a href="http://sebastian-bergmann.de/archives/876-PHPUnit-Development-Moved-to-GitHub.html">switch PHPUnit from subversion to Git</a>. I wouldn&#8217;t normally have a problem with this, especially if he were to follow all of the other mainstream projects that choose to keep backwards-compatibility with Subversion by keeping Subversion and Git in sync. However, he&#8217;s chosen to go strictly the route of Git and not bother keeping a subversion repository in sync. </p>
<p>Why do I have such a significant problem with this? I don&#8217;t do <strong>anything</strong> in Git right now. Everything of mine is still in Subversion, and quite frankly, I intend to continue using Subversion for quite some time as it works well for my group and I&#8217;m too overwhelmed with learning other technologies to learn yet another source code control system. </p>
<p>So, please Sebastian, at least keep subversion around and sync it with Git. All of us Subversion developers that use your repository to fetch PHPUnit from there (instead of using the PHP un-best practices way of installing through PEAR) would greatly appreciate it. </p>

<p><a href="http://feedads.g.doubleclick.net/~a/RIUQhag2FEjolrUmo7YQ2T2nlPc/0/da"><img src="http://feedads.g.doubleclick.net/~a/RIUQhag2FEjolrUmo7YQ2T2nlPc/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/RIUQhag2FEjolrUmo7YQ2T2nlPc/1/da"><img src="http://feedads.g.doubleclick.net/~a/RIUQhag2FEjolrUmo7YQ2T2nlPc/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.chrisweldon.net/2010/03/16/php-developers-beware-phpunit-isnt-gonna-be-on-subversion-for-much-longer/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.chrisweldon.net/2010/03/16/php-developers-beware-phpunit-isnt-gonna-be-on-subversion-for-much-longer</feedburner:origLink></item>
		<item>
		<title>JavaScript OO Function Encapsulation</title>
		<link>http://feedproxy.google.com/~r/chrisweldon/~3/OUBPN22WJBw/javascript-oo-function-encapsulation</link>
		<comments>http://www.chrisweldon.net/2010/03/09/javascript-oo-function-encapsulation#comments</comments>
		<pubDate>Tue, 09 Mar 2010 07:13:56 +0000</pubDate>
		<dc:creator>Chris Weldon</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.chrisweldon.net/?p=266</guid>
		<description><![CDATA[I&#8217;ll admit, I&#8217;m a bit of a JavaScript n00b when it comes to doing UI development. One of the outside consulting projects that I&#8217;m working on is asking me to push the limits of my JavaScript knowledge, and I can &#8230; <a href="http://www.chrisweldon.net/2010/03/09/javascript-oo-function-encapsulation">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ll admit, I&#8217;m a bit of a JavaScript n00b when it comes to doing UI development. One of the outside consulting projects that I&#8217;m working on is asking me to push the limits of my JavaScript knowledge, and I can definitely say the past couple of days have given me a sad realization that there are some strange oddities to JavaScript development. Once you understand that Prototyping is much like Extension Methods in .Net, that part&#8217;s pretty easy. What&#8217;s not easy is trying to figure out how to do event handing with Object Oriented classes.<br />
<span id="more-266"></span><br />
Here it is in a nutshell. I have a function (<span style="font-family: monospace;">keystrokeListener</span>) defined for a class (<span style="font-family: monospace;">KeystrokeHandler</span>). The idea is I want to <span style="font-family: monospace;">addEventListener</span> the <span style="font-family: monospace;">keydown</span> event for a particular object using the <span style="font-family: monospace;">keystrokeListener</span> method in my object. No matter what I was doing (whether that be declaring the method as a static method, registering the event within the class constructor, or declaring the method name on an instance of the <span style="font-family: monospace;">KeystrokeHandler</span>) yielded the following error for a call within <span style="font-family: monospace;">keystrokeListener</span>:</p>
<pre>
this.getRealKeycode is not a function
</pre>
<p>Let&#8217;s look at my code for just a moment:</p>
<pre lang="javascript">
        /**
         * KeystrokeHandler object definition.
         */
        function KeystrokeHandler() {
            /**
             * Proceeds to fetch the mapped keycode, including value for any special keybindings.
             *
             * @param {Event} event The event that was triggered.
             */
            this.getRealKeycode = function(event) {
                var realCode = (event.keyCode ? event.keyCode : event.charCode);

                // Check to see if the various special keys are also depressed (ALT, CTRL, SHIFT, and META)
                if (event.altKey) {
                    realCode += QT.ALT;
                }
                if (event.ctrlKey) {
                    realCode += QT.CTRL;
                }
                if (event.shiftKey) {
                    realCode += QT.SHIFT;
                }
                if (event.metaKey) {
                    realCode += QT.META;
                }

                return realCode;
            };

            /**
             * A generic keystroke keyNotify used for debugging purposes.
             *
             * @param {Event} nsEvent The keydown event that triggered this keyNotify to be called.
             */
            this.keyNotify = function(nsEvent) {
                var trueEvent = (nsEvent) ? nsEvent : window.event;
                alert("Keystroke: " + trueEvent.keyCode);
            };

            /**
             * The generic keystroke listener that is called upon each keystroke.
             *
             * @param {Event} nsEvent The keypress event that triggered this method call.
             */
            this.keystrokeListener = function(nsEvent) {
                var trueEvent = (nsEvent) ? nsEvent : window.event;
                this.keyNotify(nsEvent);
                var realCode = this.getRealKeycode(trueEvent);
            };

            return this;
        }

        function registerTextareaEvents() {
            var mainArea = document.getElementById('textarea-transcription');
            var keystrokeHandler = new KeystrokeHandler();
            //mainArea.addEventListener('keydown', function(evt) { keystrokeHandler.keystrokeListener(evt) }, true);
            mainArea.addEventListener('keydown', keystrokeHandler.keystrokeListener, true);
        }
</pre>
<p>What was happening was the event was firing and actually calling the method appropriately. However, it was not resolving properly, as within the event handler, it was unable to find the other methods associated with the object. </p>
<p>The solution to fix this is actually commented out at the bottom of the code sample above. What you have to do is wrap the handler registration in an anonymous function and call it explicitly if you want this to work correctly. More specifically:</p>
<pre lang="javascript">
        function registerTextareaEvents() {
            var mainArea = document.getElementById('textarea-transcription');
            var keystrokeHandler = new KeystrokeHandler();
            mainArea.addEventListener('keydown', function(evt) { keystrokeHandler.keystrokeListener(evt) }, true);
        }
</pre>

<p><a href="http://feedads.g.doubleclick.net/~a/P1IREZwA0ZZRkvs39XdbzjqedgY/0/da"><img src="http://feedads.g.doubleclick.net/~a/P1IREZwA0ZZRkvs39XdbzjqedgY/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/P1IREZwA0ZZRkvs39XdbzjqedgY/1/da"><img src="http://feedads.g.doubleclick.net/~a/P1IREZwA0ZZRkvs39XdbzjqedgY/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.chrisweldon.net/2010/03/09/javascript-oo-function-encapsulation/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.chrisweldon.net/2010/03/09/javascript-oo-function-encapsulation</feedburner:origLink></item>
		<item>
		<title>HTML5 Audio Elements</title>
		<link>http://feedproxy.google.com/~r/chrisweldon/~3/2mLDqMOaMdk/html5-audio-elements</link>
		<comments>http://www.chrisweldon.net/2010/03/01/html5-audio-elements#comments</comments>
		<pubDate>Tue, 02 Mar 2010 03:33:07 +0000</pubDate>
		<dc:creator>Chris Weldon</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[chrome]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[safari]]></category>
		<category><![CDATA[webkit]]></category>

		<guid isPermaLink="false">http://www.chrisweldon.net/?p=264</guid>
		<description><![CDATA[One of the side projects I&#8217;m working on involves having users listen to audio files and fill out information in response to the audio files they listen to. Some audio files will be short (e.g. 5 seconds or less), but &#8230; <a href="http://www.chrisweldon.net/2010/03/01/html5-audio-elements">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>One of the side projects I&#8217;m working on involves having users listen to audio files and fill out information in response to the audio files they listen to. Some audio files will be short (e.g. 5 seconds or less), but others may be long, say a few minutes to an hour or longer. These audio files are typically voicemails or ditcations, so people can have a tendency to leave long breaks between words, will talk slowly, etc., thus slowing down the listening process. The goal: figure out a way to allow the users to speed up (or slow down) the audio files as much as they would like without having to process the audio files on the server ahead of time. The possible solution? HTML5<br />
<span id="more-264"></span><br />
I figured the solution here would be HTML5! The <a href="http://dev.w3.org/html5/spec/Overview.html#dom-media-playbackrate">HTML5 Spec</a> supports <span style="font-family: monospace;">&lt;audio&gt;</span> and <span style="font-family: monospace;">&lt;video&gt;</span> elements. <strong>Furthermore</strong>, it calls for the support of varying the playback speeds through a nice little object property called <span style="font-family: monospace;">playbackRate</span>. This object allows audio to be played back in multiples of speeds either faster (or slower) than the original audio file speed (which is governed by the <span style="font-family: monospace;">defaultPlaybackRate</span> property). The specification even states that browser should support a negative <span style="font-family: monospace;">playbackRate</span> to allow audio and video files to be played in reverse. Really cool stuff!</p>
<p>I start my development on <a href="http://www.getfirefox.com/">Mozilla Firefox</a> for the most part. And, I&#8217;ve been fairly satisfied with their speed of development and keeping up with developer trends. No, I won&#8217;t go into flaming Mozilla for choosing not to support MP3s in this post, but rather state my perplexity as to why they&#8217;re the only browser that doesn&#8217;t support the <span style="font-family: monospace;">playbackRate</a> property and the <span style="font-family: monospace;">ratechange</span> event. </p>
<p>However, for the browsers that did correctly increase or decrease the speed of the audio playback, I was quite impressed at their ability to maintain pitch. This is key for what we&#8217;re trying to accomplish in this project. However, where there was lack of pitch variances, there was not a lack of noise being introduced. Granted, when I checked the process monitor while the rate of playback was being adjusted, I was surprised that there was no change in CPU or memory utilization for either Chrome or Webkit. So, by gaining performance, we unfortunately have to sacrifice the cleanliness of the output. </p>
<p>Here&#8217;s my results thus far:</p>
<table border="1" cellpadding="3" cellspacing="0">
<tr>
<th>Browser Name</th>
<th>ratechange Supported?</th>
<th>Noise?</th>
</tr>
<tr>
<td>Mozilla Firefox</td>
<td></td>
<td>N/A</td>
</tr>
<tr>
<td>Google Chrome 4</td>
<td>✓</td>
<td>Yes (minimal)</td>
</tr>
<tr>
<td>Webkit (aka Apple Safari)</td>
<td>✓</td>
<td>Yes (heavy)</td>
</tr>
<tr>
<td>Opera 10</td>
<td>N/A</td>
<td>N/A</td>
</tr>
<tr>
<td>Internet Explorer</td>
<td>N/A</td>
<td>N/A</td>
</tr>
</table>
<p>As for Opera 10, I had immense problems getting it to wire up and play successfully that I eventually abandoned it. Internet Explorer? You&#8217;ve got to be joking. Like they&#8217;ll support a standard anytime in the near future. <img src='http://www.chrisweldon.net/wp-includes/images/smilies/icon_razz.gif' alt=':-P' class='wp-smiley' /> </p>
<p>Other oddities that I noticed was skipping around audio files in <strong>any</strong> of the browsers caused some unexpected turmoil for the playback. Many times, playback would altogether stop, and many other times I couldn&#8217;t resume the playback from the current position even after being stopped. Other oddities include seeking simply resetting the position back to 0. </p>
<p>In a nutshell, the browsers are well on their way to supporting <span style="font-family: monospace;">&lt;audio&gt;</span> and <span style="font-family: monospace;">&lt;video&gt;</span>, but for production use I&#8217;m very apprehensive about supporting it at this time because of the sheer number of bugs/unimplemented features. </p>

<p><a href="http://feedads.g.doubleclick.net/~a/l-SewQtzGz3L18gqm3Ny95ZiUbw/0/da"><img src="http://feedads.g.doubleclick.net/~a/l-SewQtzGz3L18gqm3Ny95ZiUbw/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/l-SewQtzGz3L18gqm3Ny95ZiUbw/1/da"><img src="http://feedads.g.doubleclick.net/~a/l-SewQtzGz3L18gqm3Ny95ZiUbw/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.chrisweldon.net/2010/03/01/html5-audio-elements/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.chrisweldon.net/2010/03/01/html5-audio-elements</feedburner:origLink></item>
	</channel>
</rss>

