<?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>@TheKeyboard &#187; documentation</title>
	<atom:link href="http://www.littlehart.net/atthekeyboard/tag/documentation/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.littlehart.net/atthekeyboard</link>
	<description>Facebook should&#039;ve be written in unicornSchemaLang, because everyone *knows* that PHP is no good for anything, right?</description>
	<lastBuildDate>Thu, 29 Jul 2010 20:05:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Where In Chris Reads The Documentation&#8230;and Does Not Find The Answer</title>
		<link>http://www.littlehart.net/atthekeyboard/2010/02/19/where-in-chris-reads-the-documentation-and-does-not-find-the-answer/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
		<comments>http://www.littlehart.net/atthekeyboard/2010/02/19/where-in-chris-reads-the-documentation-and-does-not-find-the-answer/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 21:33:23 +0000</pubDate>
		<dc:creator>Chris Hartjes</dc:creator>
				<category><![CDATA[Chris' Brain]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://www.littlehart.net/atthekeyboard/?p=662</guid>
		<description><![CDATA[If you follow me on Twitter you&#8217;ve seen me pissing and moaning about not being able to figure stuff out as I build out my first Zend Framework project in a LONG time. 3 years to be exact. I had two things that I wanted to add to the project: (1) a new custom controller [...]]]></description>
			<content:encoded><![CDATA[<p>If you follow me on Twitter you&#8217;ve seen me pissing and moaning about not being able to figure stuff out as I build out my first <a href="http://framework.zend.com">Zend Framework</a> project in a LONG time.  3 years to be exact.  I had two things that I wanted to add to the project:  (1) a new custom controller to base some other controllers off of and (2) create custom routes for it.  Sounds simple, right?
</p>
<p>
I have stared into the belly of the beast that is the Zend Framework documentation and have discovered the following truth:  there always seems to be two ways to do something.  For someone just starting out learning a framework (never mind their actual level of experience with PHP itself) this is not a good thing.  For example, let&#8217;s look at creating a new base controller to extend controllers off of.  Via twitter I found the following ways:</p>
<ul>
<li>no, don&#8217;t do that, use custom action helpers</li>
<li>sure, just put it somewhere and use autoloading to find it</li>
</ul>
<p>
So I proceeded to start digging around and figure things out.  Hrm, an action helper is not what I need, so let&#8217;s create that new base controller.  Oh, you mean you can have more than one way to lay out your project, even if you are using Zend_Application?  How come it&#8217;s not finding the new controller even though I put it in a common place.  Why won&#8217;t this work?!?  DAMNIT, I AM GOING TO QUIT PROGRAMMING AND RUN A DADDY DAY CARE OUT OF MY HOME.
</p>
<p>Fortunately the custom routing thing was easier to figure out.   Hey, here&#8217;s an example of adding code to your bootstrap.  Oh wait, I&#8217;m using Zend_Application so things are different.  WTF, I am overriding my existing routes and everything is broken?!?  You can put this stuff in XML?!?!  But I am using the .ini format&#8230;.  Nice, <a href="http://weierophinney.net/matthew/">MWOP</a> pointed me in the right direction.  Good thing he&#8217;s on twitter.
</p>
<p>
Look, I&#8217;ve talked about this before.  It&#8217;s awesome to have lots of documentation.  The Zend Framework documentation is awesome&#8230;but seems to only have 80% of the solutions I was looking for.  Digging around using Google just seemed to point me at the same 80%-complete documentation.
</p>
<p>
Writing documentation is a thankless task, so do not interpret my comments as a slam against those who are contributing.  I work best when I see FULL examples on how to do something, and then I can &#8220;extend and embrace&#8221; that to produce the customized solutions I always end up needing.  My complaints are solely my own, which is why I usually blog the solutions when I come up them.  I certainly cannot be the only one having problems sifting through the documentation.
</p>
<p>
As someone who had invested a lot of time in another framework, I am painfully aware of how much you take for granted when using a familiar tool, and then try to help people solve a problem.  My own experiences have ranged from &#8220;you are most definitely doing it wrong&#8221; to &#8220;I&#8217;ve never done it that way, and I can see how that will work&#8221;.
</p>
<p>
Special thanks to @weierophinney, @elazar and @andriesss for their actual help and offers of help as I stumble around using Zend Framework.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.littlehart.net/atthekeyboard/2010/02/19/where-in-chris-reads-the-documentation-and-does-not-find-the-answer/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Open Source Is Really About Documentation &#8211; Twisted vs. Tornado</title>
		<link>http://www.littlehart.net/atthekeyboard/2009/09/14/open-source-is-really-about-documentation/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
		<comments>http://www.littlehart.net/atthekeyboard/2009/09/14/open-source-is-really-about-documentation/#comments</comments>
		<pubDate>Mon, 14 Sep 2009 16:34:07 +0000</pubDate>
		<dc:creator>Chris Hartjes</dc:creator>
				<category><![CDATA[Chris' Brain]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Tornado]]></category>
		<category><![CDATA[Twisted]]></category>

		<guid isPermaLink="false">http://www.littlehart.net/atthekeyboard/?p=534</guid>
		<description><![CDATA[I think I can give you an executive summary of this blog post: if the documentation for an open source project sucks, nobody but the most hardcore developers will use it. What has prompted this incredibly brilliant stating-of-the-obvious? The reaction by those in the Twisted community over Facebook&#8217;s pre-emptive strike in the non-blocking Python-based web [...]]]></description>
			<content:encoded><![CDATA[<p>I think I can give you an executive summary of this blog post:  if the documentation for an open source project sucks, nobody but the most hardcore developers will use it.</p>
<p>
What has prompted this incredibly brilliant stating-of-the-obvious?  The reaction by those in the <a href="http://twistedmatrix.com/trac/">Twisted</a> community over Facebook&#8217;s pre-emptive strike in the non-blocking Python-based web server space by open sourcing a framework they are using internally called <a href="http://www.tornadoweb.org">Tornado</a>.  Why are the Twisted folks getting all twisted (look how funny I am!) up about this?  Like any good Open Source project for people who are interested in Getting Things Done, Tornado is dissing Twisted by basically saying &#8220;yeah, we thought about using Twisted but it wasn&#8217;t easy enough for us to use and we think it sucks&#8221;.  I&#8217;m pretty sure I&#8217;m paraphrasing here, but you get the idea.
</p>
<p>
Now, I have looked at Twisted and have come to the following conclusions:</p>
<ul>
<li>It looks awesome</li>
<li>It is built for people who are supposed to understand what they are doing</li>
<li>The documentation sucks</li>
<li>The examples on how to build anything of any significance are, to this developer, non-existant and/or difficult to find without shelling out for a possibly very-outdated book</li>
</ul>
<p>Contrast this with Tornado.  I&#8217;ve looked at Tornado and have come to the following conclusions:</p>
<ul>
<li>It looks awesome</li>
<li>It is built for people who are supposed to understand what they are doing</li>
<li>The documentation is inside the comments on the code which sucks only if you&#8217;re not into reading the code</li>
<li>It includes a sample application so you can see something other than Hello World</li>
</ul>
<p>
Am I biased towards Tornado?  You bet.  Why?  Because as hard as I tried, I could not find USEFUL documentation on how to build things using Twisted.  Maybe I didn&#8217;t use the right search terms.  Maybe I didn&#8217;t dig down enough links deep on the Twisted site.  Maybe I didn&#8217;t fully understand the terminology or architecture of Twisted and how they different components speak to each other.
</p>
<p>
I&#8217;ll tell you this though:  I am not having any such problems with Tornado.  This is coming across as a criticism aimed towards Twisted, and I suppose that&#8217;s fair.  I&#8217;ve noticed complaints from the Twisted community which really amount to whining.  I understand that attitude totally.  I&#8217;ve been there, when faced with competition that just might be doing a better job then I am doing.  But complaining that Facebook should&#8217;ve simply fixed up Twisted instead of writing their own is not productive.  Productive is understanding that Facebook looking at Twisted and said &#8220;this is not for us because *we* don&#8217;t find it easy enough to use&#8221; is a sign that something serious is wrong with Twisted&#8217;s documentation.   You could have the most awesome non-blocking web server available, but if people with who WANT to use it can&#8217;t figure out HOW to use it, well, what can you say to that?  Only the most dedicated open source contributors would&#8217;ve done that.  Most will say &#8220;meh, I want to do this myself so I understand it&#8221; and then Twisted will die an obscure death while Tornado plunges forward gaining mindshare amongst people interested in the type of applications you can build with this technology.  In my opinion, it&#8217;s all because of the lack of clear, freely available documentation for Twisted.
</p>
<p>
If there is an online source BETTER than the Twisted site, please share the link love in the comments so I can try and do a better comparison of the two at a documentation level.  For someone like me, who is new to Python but old to the idea of web frameworks, I think that would be the fairest comparison.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.littlehart.net/atthekeyboard/2009/09/14/open-source-is-really-about-documentation/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
		</item>
		<item>
		<title>Making Mistakes So You Don&#8217;t Have To:  Development Tools</title>
		<link>http://www.littlehart.net/atthekeyboard/2008/11/17/making-mistakes-so-you-dont-have-to-development-tools/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
		<comments>http://www.littlehart.net/atthekeyboard/2008/11/17/making-mistakes-so-you-dont-have-to-development-tools/#comments</comments>
		<pubDate>Tue, 18 Nov 2008 03:23:02 +0000</pubDate>
		<dc:creator>Chris Hartjes</dc:creator>
				<category><![CDATA[Chris' Brain]]></category>
		<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[development tools]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.littlehart.net/atthekeyboard/?p=337</guid>
		<description><![CDATA[I&#8217;ve been thinking about topics for conference talk submissions a lot lately (I have a serious case of conference envy the last little while), which usually gets my dev juices going and trying to make a better dev environment for myself. I&#8217;ve started using a few newer techniques so forgive me if some of these [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been thinking about topics for conference talk submissions a lot lately (I have a serious case of conference envy the last little while), which usually gets my dev juices going and trying to make a better dev environment for myself.  I&#8217;ve started using a few newer techniques so forgive me if some of these seem old to you, dear reader.
</p>
<p><h3>MySQL over an SSH tunnel</h3>
</p>
<p>
I certainly can&#8217;t be the only person who has to do development (or refactoring) work involving databases that have GB of data in them.  It&#8217;s not even remotely practical to copy it over to my laptop, and taking a snapshot is pretty much impossible given the relationships between the tables.  It would be 3 times the work to create a tool to give me a snapshot that includes all the proper related records.  How do people handle that anyway?</p>
<p>
So I discovered via <a href="http://lazyweb.ca">my favourite pair-program-via-IM partner</a> the technique of tunnelling to MySQL over SSH.  It couldn&#8217;t be easier:</p>
<pre>
ssh -fNg -L3310:127.0.0.1:3306 user@server.domain.ext
mysql -h127.0.0.1 -P 3310 -u user -p database
</pre>
<p>
You can use whatever port you want at your end, but the key here is telling SSH that you want to map port 3306 on the remote server to a specific port at your own end.
</p>
<p>
The only downside I&#8217;ve seen is that when I was pounding on a remote server with a very involved query that the remote server started writing MySQL tmp files to disk.  Files so large that they started to trigger our <a href="http://www.nagios.org/">Nagios</a> monitoring process that look at free drive space.  Maybe I shouldn&#8217;t do that on a production server.  Heh.
</p>
<h3>Use an editor that supports remote debugging in PHP</h3>
<p>
I took a Twitter poll and asked how many people actually use debugging tools like <a href="http://xdebug.org">xDebug</a> and was surprised by how many don&#8217;t.  I have used them off an on (more on these days) and now that I&#8217;m using <a href="http://www.vim.org">vim</a> I have also started <a href="http://2bits.com/articles/using-vim-and-xdebug-dbgp-for-debugging-drupal-or-any-php-application.html">debugging stuff inside of vim</a>.  Is there *nothing* you cannot bend and twist vim to do for you?
</p>
<p>
This just further reinforces my recommendation that whatever editor you do decide to use every day, learn it inside and out.  Right now I&#8217;m trying to break myself of the habit of using the arrow keys to move around in vim, instead relying on the hjkl home row keys to do so.  Debuggers are so common in other languages (Ruby and Python have an awesome interactive console to act as a debugger for you) there is no reason except for, I dunno, laziness and an unwillingness to learn how to add an extension to your PHP install, to not at least try using xdebug.
</p>
<h3>Don&#8217;t procrastinate, read the documentation</h3>
<p>
A side project I&#8217;ve been working on has some of the tightest production-level PHP code I&#8217;ve ever written in it.  Why?  Because I took the time to dig into the documentation of the newer features in Cake to see how they apply to the work I&#8217;m doing.  Containable behavior that is now part of the core.  Johnathan Snook&#8217;s <a href="http://snook.ca/archives/cakephp/multiple_validatable_behavior/">Multiple Validation behavior</a>.  Fat models and skinny controllers.  Reusable elements in your pages.  Pestering Nate and Garrett via IM to confirm my suspicions on how to tackle certain problems &#8220;the Cake way&#8221;.  It&#8217;s amazing what happens when you stop to think about all the techniques you&#8217;ve learned and then figure out the best way to weld them all together to solve a problem.
</p>
<p>
Again, I&#8217;ve said this before and will continue to say it:  making the effort to fully understand the tools you are using (that includes editor AND programming environment) can only make you better.
</p>
<h3>If the documentation is bad, don&#8217;t even bother using it</h3>
<p>My IM pair-programming partner once said to me &#8220;Chris, if the documentation is shit then don&#8217;t even think about using it.&#8221;  Lately I&#8217;ve seen the wisdom in that.  If the documentation is lacking, just forget about using that tool.  Of course, if you *do* have the skills to dive right into it and figure out what&#8217;s going on then this technique probably doesn&#8217;t apply to you.
</p>
<h3>Learn your version control system, or else have it decide your fate for you.</h3>
<p>
There is incredibly well-written documentation for what I call the Big Three (CVS, SVN and Git) open source version control systems.  For the love of Wotan, go and learn the one you are using beyond how to commit a change.  And if you AREN&#8217;T using a version control system (no, renaming files to index.php.old.frank is NOT version control) then you should stop calling yourself a programmer.  Seriously.</p>
<h3>Peer code reviews are good, not bad</h3>
<p>
Even if it consists of taking 15 minutes to talk with your boss who wrote stuff and says &#8220;but I&#8217;m not really a programmer&#8221; so he understands the changes (for the better that you are making, it pays off huge in the end.  Especially when you know they will be going back in to tweak things as they play with the code you wrote.
</p>
<p>
That&#8217;s all I can think of for the moment.  What programming techniques or tools have you come across that have made your work go faster or help you produce better code?  Let me know in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.littlehart.net/atthekeyboard/2008/11/17/making-mistakes-so-you-dont-have-to-development-tools/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>What Is Really Considered Documentation?</title>
		<link>http://www.littlehart.net/atthekeyboard/2008/07/22/what-is-really-considered-documentation/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
		<comments>http://www.littlehart.net/atthekeyboard/2008/07/22/what-is-really-considered-documentation/#comments</comments>
		<pubDate>Wed, 23 Jul 2008 02:46:34 +0000</pubDate>
		<dc:creator>Chris Hartjes</dc:creator>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[Chris' Brain]]></category>
		<category><![CDATA[documentation]]></category>

		<guid isPermaLink="false">http://www.littlehart.net/atthekeyboard/?p=285</guid>
		<description><![CDATA[I struggled to come up with a good name for this blog post, and have totally failed, but give this article a chance. Or maybe you&#8217;re here by accident thanks to a weird google search. As a committed user of open source technologies, the difference between me using something and not using something is the [...]]]></description>
			<content:encoded><![CDATA[<p>
I struggled to come up with a good name for this blog post, and have totally failed, but give this article a chance.  Or maybe you&#8217;re here by accident thanks to a weird google search.
</p>
<p>As a committed user of open source technologies, the difference between me using something and not using something is the documentation.  Is there documentation for it?  Is it easy to find?  Does it answer my questions?  Is there someone I can call an idiot if I disagree with the level of documentation?  These are all very important questions.
</p>
<p>My involvement with <a href="http://cakephp.org">CakePHP</a> has opened my eyes in terms of what people consider documentation.  Me, I&#8217;m the type who learns from examples that come with explanations.  While API documentation is great, it only becomes useful to me once *I* can figure out how to do something useful with this new technology.  I see people on the mailing list for Cake asking for the source code to a sample application, which I immediately file away in my head as &#8220;looking for answer to their homework&#8221;, and move on.  Maybe that&#8217;s unfair, but it&#8217;s more a reflection of the fact that I tend not to learn anything from having the source code for an application.  I learn by getting in there and DOING SOMETHING and figuring out why this goddamn thing is not behaving properly and who do I know who can help me with this problem etc.  Learning by mooching, I call it.
</p>
<p>
So, back to CakePHP.  CakePHP had acquired the reputation that the documentation for it sucked.  While I did not share that opinion, I can see why people say that.  Because most coders are lazy.  Seriously.  They want solutions handed to them in a form that they can just drop into their application and then get onto the next problem.  There are definitely times when I wish someone else could just write this goddamn &#8220;alter the football game stats form dynamically via Ajax and send the results to the XML database&#8221; code for me.  Inevitably, I build the code up from an example stolen via Google into something that both works and that I understand fully.  However, most of the time I am content to figure stuff out on my own and ask for help only when stuck.  I&#8217;m not lazy, but maybe I&#8217;m suffering from a bit of the <a href="http://en.wikipedia.org/wiki/Lake_Wobegon_effect">Lake Woebegon effect</a>.
</p>
<p>So, things are much better in terms of documentation for CakePHP.  Whereas we used to have a manual that only covered 1.1, we now have the amazing <a href="http://book.cakephp.org">CakePHP cookbook</a> that covers both 1.1 and 1.2.  If that&#8217;s not enough, well, you might actually have to do a little thing I like to call &#8220;research&#8221;.  This gets us to the point of this blog posting.  Sometimes you have to stop being lazy and actually think about where you could find an answer.
</p>
<p>
There are no shortage of blogs that talk about CakePHP.  Some of them are even good.  Maybe you like the code examples I put up here.  People seem to like them enough to comment, so maybe I&#8217;m doing something right.  Google is your friend to track down blogs that have exactly the type of information that you need:  small examples with explanations about how they work.
</p>
<p>
The CakePHP mailing list is done via Google Groups, so all those posts where I make fun of people for no reason other than my poor self-esteem can be found with a few keywords.  But there are a lot of great tips on how to accomplish things using Cake, so a search of the google group will find lots of good information.
</p>
<p>
The <a href="http://bakery.cakephp.org">Bakery</a> is another good source of CakePHP info, consisting of all sorts of small articles along with comments.  It has a search function as well, but could easily be considered YACB (Yet Another Cake Blog).  Again, perfect for people with the same learning style as me:  short examples with explanations of how it was done.
</p>
<p>
Finally, we come to one of the more unorthodox documentation sources:  the unit tests for CakePHP.  CakePHP has some really good unit test coverage, although I sometimes wonder if you can really say that a piece of code works properly if it passes all the unit tests associated with it.  This is by no means a phenomenon limited to CakePHP, it happens everywhere there are unit tests.  Sometimes you can&#8217;t figure out a test that makes something break.  It happens, so please do not misinterpret my thoughts on this.  Unit tests are good, and the amount of tests that CakePHP has in place is awesome and perfect example of a cohesive development team.  Automated testing is a goal worth striving for, don&#8217;t let anyone else tell you otherwise.  I&#8217;m in the early phases of automated testing for a work project on the integration side of things because I&#8217;m tired of always running through the same damn tests by hand all the time to make sure something that I wrote didn&#8217;t break things.  Tips on what good browser-based solutions are out there would be appreciated.  Other than telling me to use Selenium.  A solution that is tailored to the <a href="http://codeigniter.com">framework I have been forced to use</a> would be even better.
</p>
<p>
Okay, back on topic.  Since the unit tests cover so much of what CakePHP can do, what better way to see examples of how to actual do things?  My work on fiddling around with new console functionality showed me that I had no idea of how to create unit tests for my console work.  That led to discussions with people on the best way to do testing of console functionality.  Which leads to changes in the console code itself to make it easier to test certain things.  But at least when I&#8217;m ready to get back to doing that console work I can see if doing testing for it has become easier.
</p>
<p>
So, having been told all the stuff above, how can anyone who is not simply lazy say that the documentation for CakePHP sucks?!?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.littlehart.net/atthekeyboard/2008/07/22/what-is-really-considered-documentation/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
