<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: How do you learn how to use a library?</title>
	<atom:link href="http://www.sitepoint.com/blogs/2004/02/25/how-do-you-learn-how-to-use-a-library/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sitepoint.com/blogs/2004/02/25/how-do-you-learn-how-to-use-a-library/</link>
	<description>News, opinion, and fresh thinking for web developers and designers. The official podcast of sitepoint.com.</description>
	<pubDate>Fri, 05 Dec 2008 01:53:07 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
		<item>
		<title>By: Darren Campbell</title>
		<link>http://www.sitepoint.com/blogs/2004/02/25/how-do-you-learn-how-to-use-a-library/#comment-12204</link>
		<dc:creator>Darren Campbell</dc:creator>
		<pubDate>Wed, 21 Dec 2005 16:26:07 +0000</pubDate>
		<guid isPermaLink="false">1287825651#comment-12204</guid>
		<description>To answer the original question I refer to the following sources in order from first to last.

d: Any packaged documentation (such as tests and READMEs)
b: API docs (such as that generated by phpDocumentor or the PHP manual)
a: Examples packaged with the code
c: Reading the source code

I avoid secondary sources as much as possible out of fear of inaccuracies which could lead to programming errors. Source code is the most reliable and is the only "truth". Examples packaged with the code can be out-of-date. Auto-generated API docs are usually pretty good. Packaged documentation can be out of sync with the source code and examples. So if I get any problems at all from the documentation, I try the next most reliable source and eventually the source code.</description>
		<content:encoded><![CDATA[<p>To answer the original question I refer to the following sources in order from first to last.</p>
<p>d: Any packaged documentation (such as tests and READMEs)<br />
b: API docs (such as that generated by phpDocumentor or the PHP manual)<br />
a: Examples packaged with the code<br />
c: Reading the source code</p>
<p>I avoid secondary sources as much as possible out of fear of inaccuracies which could lead to programming errors. Source code is the most reliable and is the only &#8220;truth&#8221;. Examples packaged with the code can be out-of-date. Auto-generated API docs are usually pretty good. Packaged documentation can be out of sync with the source code and examples. So if I get any problems at all from the documentation, I try the next most reliable source and eventually the source code.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Darren Campbell</title>
		<link>http://www.sitepoint.com/blogs/2004/02/25/how-do-you-learn-how-to-use-a-library/#comment-12114</link>
		<dc:creator>Darren Campbell</dc:creator>
		<pubDate>Sun, 18 Dec 2005 12:46:28 +0000</pubDate>
		<guid isPermaLink="false">1287825651#comment-12114</guid>
		<description>I wish I could read the "End User" documentation for PEAR packages. 

But I have been burnt with this approach many times because it turns out the documentation is missing key information is or is frankly inaccurate.

So I have to read through the source code for myself and decipher what's going on and sort of guess at how the original author meant for the class or classes to be used.

The worst documentation is where the funtion name and parameters are described but not in enough detail. Bad documentation fails to describe the datastructures which a function is supposed to accept. And bad documentation doesn't explain how the function uses the data structure to achieve the purpose of the function, this means you don't know what parts of the data structure you can change and what you can't.

It is too risky to trust the documentation on PEAR because over time I have found the documentation doesn't match the actual operation. The problem with this is that it makes it difficult to know what your doing wrong if the program isn't working as expected.

The packages I use mainly are DB, DB_Table, Date, Mail, Mail_Queue, Validate, Auth, QuickForm, QuickForm_Controller and that's about all I can think of right now.

This sounds like a rant and it is. I had hoped that PEAR would save me some time and headaches but it made projects more risky because the documentation was insufficient. Instead of being able to just plug in and go, I had to experiment with the code. Instead of simply learning how and when to use it and then making it happen, I did what I thought was correct according to what I could make out from the documenation, but to get unexpected results.

The point of all this ranting is that yes, now my behaviour has changed, I prefer to check the source code. BUT, if the documentation was better, I'd much prefer using that to learn the packages. Good documentation describes the data structures, the purpose of all the elements, the intended usage of functions, the intended collaboration between classes, and so on. PEAR needs more and better documentation!</description>
		<content:encoded><![CDATA[<p>I wish I could read the &#8220;End User&#8221; documentation for PEAR packages. </p>
<p>But I have been burnt with this approach many times because it turns out the documentation is missing key information is or is frankly inaccurate.</p>
<p>So I have to read through the source code for myself and decipher what&#8217;s going on and sort of guess at how the original author meant for the class or classes to be used.</p>
<p>The worst documentation is where the funtion name and parameters are described but not in enough detail. Bad documentation fails to describe the datastructures which a function is supposed to accept. And bad documentation doesn&#8217;t explain how the function uses the data structure to achieve the purpose of the function, this means you don&#8217;t know what parts of the data structure you can change and what you can&#8217;t.</p>
<p>It is too risky to trust the documentation on PEAR because over time I have found the documentation doesn&#8217;t match the actual operation. The problem with this is that it makes it difficult to know what your doing wrong if the program isn&#8217;t working as expected.</p>
<p>The packages I use mainly are DB, DB_Table, Date, Mail, Mail_Queue, Validate, Auth, QuickForm, QuickForm_Controller and that&#8217;s about all I can think of right now.</p>
<p>This sounds like a rant and it is. I had hoped that PEAR would save me some time and headaches but it made projects more risky because the documentation was insufficient. Instead of being able to just plug in and go, I had to experiment with the code. Instead of simply learning how and when to use it and then making it happen, I did what I thought was correct according to what I could make out from the documenation, but to get unexpected results.</p>
<p>The point of all this ranting is that yes, now my behaviour has changed, I prefer to check the source code. BUT, if the documentation was better, I&#8217;d much prefer using that to learn the packages. Good documentation describes the data structures, the purpose of all the elements, the intended usage of functions, the intended collaboration between classes, and so on. PEAR needs more and better documentation!</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Vincent</title>
		<link>http://www.sitepoint.com/blogs/2004/02/25/how-do-you-learn-how-to-use-a-library/#comment-53</link>
		<dc:creator>Chris Vincent</dc:creator>
		<pubDate>Wed, 31 Dec 1969 19:00:00 +0000</pubDate>
		<guid isPermaLink="false">1287825651#comment-53</guid>
		<description>&lt;p&gt;I think it was Einstein who said, "Examples aren't just a good way to teach; they're the *only* way to teach."&lt;/p&gt;

&lt;p&gt;Examples are the easiest way for me to learn a library.  They should be very simple examples, with as little outside code as possible.  Of course, examples coupled with tutorials are all the better.&lt;/p&gt;

&lt;p&gt;I can usually learn easily enough from API docs, but the problem is, they serve better as references than as guides.  A reference lists all the calls and classes, while a guide lists possible uses and explains what calls and classes to use.&lt;/p&gt;

</description>
		<content:encoded><![CDATA[<p>I think it was Einstein who said, &#8220;Examples aren&#8217;t just a good way to teach; they&#8217;re the *only* way to teach.&#8221;</p>
<p>Examples are the easiest way for me to learn a library.  They should be very simple examples, with as little outside code as possible.  Of course, examples coupled with tutorials are all the better.</p>
<p>I can usually learn easily enough from API docs, but the problem is, they serve better as references than as guides.  A reference lists all the calls and classes, while a guide lists possible uses and explains what calls and classes to use.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Joe W.</title>
		<link>http://www.sitepoint.com/blogs/2004/02/25/how-do-you-learn-how-to-use-a-library/#comment-54</link>
		<dc:creator>Joe W.</dc:creator>
		<pubDate>Wed, 31 Dec 1969 19:00:00 +0000</pubDate>
		<guid isPermaLink="false">1287825651#comment-54</guid>
		<description>&lt;p&gt;f., a., c., b., usually in that order.  I usually will look at the source code if I need to use the library in a way that isn't explicitly in the examples and then look for confirmation in the API docs.&lt;/p&gt;

</description>
		<content:encoded><![CDATA[<p>f., a., c., b., usually in that order.  I usually will look at the source code if I need to use the library in a way that isn&#8217;t explicitly in the examples and then look for confirmation in the API docs.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Jim Reverend</title>
		<link>http://www.sitepoint.com/blogs/2004/02/25/how-do-you-learn-how-to-use-a-library/#comment-55</link>
		<dc:creator>Jim Reverend</dc:creator>
		<pubDate>Wed, 31 Dec 1969 19:00:00 +0000</pubDate>
		<guid isPermaLink="false">1287825651#comment-55</guid>
		<description>&lt;p&gt;"f" then "a", then "d", then "b", then I either give up or do a little "c" before giving up.&lt;/p&gt;

</description>
		<content:encoded><![CDATA[<p>&#8220;f&#8221; then &#8220;a&#8221;, then &#8220;d&#8221;, then &#8220;b&#8221;, then I either give up or do a little &#8220;c&#8221; before giving up.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Michal Stankoviansky</title>
		<link>http://www.sitepoint.com/blogs/2004/02/25/how-do-you-learn-how-to-use-a-library/#comment-56</link>
		<dc:creator>Michal Stankoviansky</dc:creator>
		<pubDate>Wed, 31 Dec 1969 19:00:00 +0000</pubDate>
		<guid isPermaLink="false">1287825651#comment-56</guid>
		<description>&lt;p&gt;Well... All of the above, depends on how sophisticated the class is. I learned how to use the PEAR's Date class be reading the source code. DB class had a nice documentation with examples, so I chose that. First steps when I was learning Smarty were reading through the quick start with examples in manual... So it is not always the same.&lt;/p&gt;

</description>
		<content:encoded><![CDATA[<p>Well&#8230; All of the above, depends on how sophisticated the class is. I learned how to use the PEAR&#8217;s Date class be reading the source code. DB class had a nice documentation with examples, so I chose that. First steps when I was learning Smarty were reading through the quick start with examples in manual&#8230; So it is not always the same.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: beetle</title>
		<link>http://www.sitepoint.com/blogs/2004/02/25/how-do-you-learn-how-to-use-a-library/#comment-57</link>
		<dc:creator>beetle</dc:creator>
		<pubDate>Wed, 31 Dec 1969 19:00:00 +0000</pubDate>
		<guid isPermaLink="false">1287825651#comment-57</guid>
		<description>&lt;p&gt;In no particular order: a, b, d, f, and i (thanks to your books).&lt;/p&gt;

&lt;p&gt;I'd have to say I read source code of a class ONLY when I'm curious about how it achieves it's results, or I wish to extend it.  API Docs are great, but as Chris noted, make handier references than learning tools.  Again, agreeing with Chris, examples usually lead to the highest clarity in the shortest amount of time.&lt;/p&gt;

&lt;p&gt;g: Pair programming&lt;/p&gt;

&lt;p&gt;Pardon my ignorance, but what's this?&lt;/p&gt;

</description>
		<content:encoded><![CDATA[<p>In no particular order: a, b, d, f, and i (thanks to your books).</p>
<p>I&#8217;d have to say I read source code of a class ONLY when I&#8217;m curious about how it achieves it&#8217;s results, or I wish to extend it.  API Docs are great, but as Chris noted, make handier references than learning tools.  Again, agreeing with Chris, examples usually lead to the highest clarity in the shortest amount of time.</p>
<p>g: Pair programming</p>
<p>Pardon my ignorance, but what&#8217;s this?</p>]]></content:encoded>
	</item>
	<item>
		<title>By: platinum</title>
		<link>http://www.sitepoint.com/blogs/2004/02/25/how-do-you-learn-how-to-use-a-library/#comment-58</link>
		<dc:creator>platinum</dc:creator>
		<pubDate>Wed, 31 Dec 1969 19:00:00 +0000</pubDate>
		<guid isPermaLink="false">1287825651#comment-58</guid>
		<description>&lt;p&gt;Yeah, I always learn by example, then quite often, a nice read through the souce to see where and why things work.&lt;/p&gt;

&lt;p&gt;After that if there's good supplied documentation I'll give it a quick browse (who reads the manual anyway ;) hehe).&lt;/p&gt;

</description>
		<content:encoded><![CDATA[<p>Yeah, I always learn by example, then quite often, a nice read through the souce to see where and why things work.</p>
<p>After that if there&#8217;s good supplied documentation I&#8217;ll give it a quick browse (who reads the manual anyway ;) hehe).</p>]]></content:encoded>
	</item>
	<item>
		<title>By: okrogius</title>
		<link>http://www.sitepoint.com/blogs/2004/02/25/how-do-you-learn-how-to-use-a-library/#comment-59</link>
		<dc:creator>okrogius</dc:creator>
		<pubDate>Wed, 31 Dec 1969 19:00:00 +0000</pubDate>
		<guid isPermaLink="false">1287825651#comment-59</guid>
		<description>&lt;p&gt;In order: &lt;/p&gt;

&lt;p&gt;c: Reading the source code&lt;br /&gt;
b: API docs (such as that generated by phpDocumentor or the PHP manual)&lt;br /&gt;
a: Examples package with the code&lt;br /&gt;
e: Guessing method names (with IDE help) and parameters.&lt;br /&gt;
d: Any packaged documentation (such as tests and READMEs)&lt;br /&gt;
f: Online tutorial (e.g. those on Sitepoint or a developers WIKI)&lt;br /&gt;
i: Book chapters&lt;br /&gt;
h: Print magazine articles&lt;br /&gt;
g: Pair programming&lt;/p&gt;

</description>
		<content:encoded><![CDATA[<p>In order: </p>
<p>c: Reading the source code<br />
b: API docs (such as that generated by phpDocumentor or the PHP manual)<br />
a: Examples package with the code<br />
e: Guessing method names (with IDE help) and parameters.<br />
d: Any packaged documentation (such as tests and READMEs)<br />
f: Online tutorial (e.g. those on Sitepoint or a developers WIKI)<br />
i: Book chapters<br />
h: Print magazine articles<br />
g: Pair programming</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://www.sitepoint.com/blogs/2004/02/25/how-do-you-learn-how-to-use-a-library/#comment-60</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Wed, 31 Dec 1969 19:00:00 +0000</pubDate>
		<guid isPermaLink="false">1287825651#comment-60</guid>
		<description>&lt;p&gt;f: Online tutorial (e.g. those on Sitepoint or a developers WIKI)&lt;br /&gt;
a: Examples package with the code&lt;br /&gt;
c: Reading the source code&lt;br /&gt;
b: API docs&lt;/p&gt;

&lt;p&gt;so keep on your good work on Sitepoint :o)&lt;/p&gt;

</description>
		<content:encoded><![CDATA[<p>f: Online tutorial (e.g. those on Sitepoint or a developers WIKI)<br />
a: Examples package with the code<br />
c: Reading the source code<br />
b: API docs</p>
<p>so keep on your good work on Sitepoint :o)</p>]]></content:encoded>
	</item>
</channel>
</rss>
