<?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>words &#187; music</title>
	<atom:link href="http://www.pzed.ca/words/category/libraries/music-2/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pzed.ca/words</link>
	<description>what do you read, m'lord?</description>
	<lastBuildDate>Sat, 10 Dec 2011 00:45:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>music stuff, bookmarked for later</title>
		<link>http://www.pzed.ca/words/2010/03/09/music-stuff-bookmarked-for-later/</link>
		<comments>http://www.pzed.ca/words/2010/03/09/music-stuff-bookmarked-for-later/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 19:56:29 +0000</pubDate>
		<dc:creator>pzed</dc:creator>
				<category><![CDATA[libraries]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[web stuff]]></category>

		<guid isPermaLink="false">http://www.pzed.ca/words/?p=394</guid>
		<description><![CDATA[How to Digitize an LP Streaming audio on GNU/Linux Audacity Gnome Wave Cleaner icecast.org and many more software links at Wikipedia: List of Linux audio software]]></description>
			<content:encoded><![CDATA[<p><a href="http://internetarchive.wordpress.com/2008/06/19/how-to-digitize-a-lp/">How to Digitize an LP</a><br />
<a href="http://www.linux.ie/articles/streamingaudio.php">Streaming audio on GNU/Linux</a></p>
<p><a href="http://audacity.sourceforge.net/">Audacity</a><br />
<a href="http://sourceforge.net/projects/gwc/">Gnome Wave Cleaner</a><br />
<a href="http://www.icecast.org/index.php">icecast.org</a></p>
<p>and many more software links at Wikipedia: <a href="http://en.wikipedia.org/wiki/List_of_Linux_audio_software">List of Linux audio software</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.pzed.ca/words/2010/03/09/music-stuff-bookmarked-for-later/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>music librarianship books found at UGA</title>
		<link>http://www.pzed.ca/words/2008/02/01/music-librarianship-books-found-at-uga/</link>
		<comments>http://www.pzed.ca/words/2008/02/01/music-librarianship-books-found-at-uga/#comments</comments>
		<pubDate>Fri, 01 Feb 2008 22:02:56 +0000</pubDate>
		<dc:creator>pzed</dc:creator>
				<category><![CDATA[libraries]]></category>
		<category><![CDATA[music]]></category>

		<guid isPermaLink="false">http://www.pzed.ca/words/archives/2008/music-librarianship-books-found-at-uga/</guid>
		<description><![CDATA[Organizing music in libraries / by Brian Redfern Leddy has &#8211; ML111 .R4 1978 Systematic discography / by Lewis Foreman Leddy hasn&#8217;t Brian Rust&#8217;s guide to discography / by Brian Rust Leddy hasn&#8217;t Cataloger&#8217;s judgment / by Jay Weitz Leddy hasn&#8217;t Music librarianship at the turn of the century MLA technical reports no. 27 Leddy [...]]]></description>
			<content:encoded><![CDATA[<p>Organizing music in libraries / by Brian Redfern<br />
Leddy has &#8211; ML111 .R4 1978</p>
<p>Systematic discography / by Lewis Foreman<br />
Leddy hasn&#8217;t</p>
<p>Brian Rust&#8217;s guide to discography / by Brian Rust<br />
Leddy hasn&#8217;t</p>
<p>Cataloger&#8217;s judgment / by Jay Weitz<br />
Leddy hasn&#8217;t</p>
<p>Music librarianship at the turn of the century<br />
MLA technical reports no. 27<br />
Leddy hasn&#8217;t</p>
<p>Bibliographic relationships in music catalogs / by Sherry L. Vellucci<br />
Leddy hasn&#8217;t</p>
<p>Cataloging phono recordings / by Jay E. Daily<br />
Leddy hasn&#8217;t</p>
<p>Music librarianship : a practical guide / by E.T. Bryant<br />
Leddy has &#8211; ML111 .B83 1985<!--b040333e48bf337e23977877bdf057a0--><!--092057e9751dc328c7f91e2844d434cd--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.pzed.ca/words/2008/02/01/music-librarianship-books-found-at-uga/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Work &#8211; Expression &#8211; Manifestation</title>
		<link>http://www.pzed.ca/words/2008/01/31/work-expression-manifestation/</link>
		<comments>http://www.pzed.ca/words/2008/01/31/work-expression-manifestation/#comments</comments>
		<pubDate>Thu, 31 Jan 2008 18:35:13 +0000</pubDate>
		<dc:creator>pzed</dc:creator>
				<category><![CDATA[libraries]]></category>
		<category><![CDATA[music]]></category>

		<guid isPermaLink="false">http://www.pzed.ca/words/archives/2008/work-expression-manifestation/</guid>
		<description><![CDATA[What follows is an exact textual reproduction of slide 9 (with notes) from the Powerpoint Presentation Relationships in FRBR, by Dr. Barbara B. Tillett (FRBR Workshop, Dublin, Ohio, May 2, 2005). Here&#8217;s a link to the entire PPT file. Tillett is (or at least was, in 2004 when she wrote this booklet [PDF]) Chief of [...]]]></description>
			<content:encoded><![CDATA[<p>What follows is an exact textual reproduction of slide 9 (with notes) from the Powerpoint Presentation <em>Relationships in FRBR</em>, by Dr. Barbara B. Tillett (FRBR Workshop, Dublin, Ohio, May 2, 2005). <a href="http://www.oclc.org/research/events/frbr-workshop/presentations/tillett/FRBR_Relationships.ppt">Here&#8217;s a link to the entire PPT file</a>. Tillett is (or at least was, in 2004 when she wrote <a href="http://www.loc.gov/cds/downloads/FRBR.PDF">this booklet [PDF]</a>) Chief of the Library of Congress&#8217;s Cataloging Policy &#038; Support Office, Chair of the IFLA Cataloguing Section, a member of the Joint Steering Committee for Revision of the AACR, and more!</p>
<div class="frag">
<p style="color: #930;">Relationships &#8211; Work/Expression/Manifestation</p>
<p style="color: #009;  margin-left: 20px;">w<sub>1</sub> J.S. Bach’s Goldberg variations</p>
<p style="color: #090;  margin-left: 40px;">e<sub>1</sub> performance by Glen Gould in 1981</p>
<p style="color: #666;  margin-left: 100px; text-indent: -40px;">m<sub>1</sub> recording released on 331/3 rpm sound disc in 1982 by CBS Records</p>
<p style="color: #666;  margin-left: 100px; text-indent: -40px;">m<sub>2</sub> recording re-released on compact disc in 1993 by Sony</p>
<p style="color: #666;  margin-left: 100px; text-indent: -40px;">m<sub>3</sub> digitization of the Sony re-release as MP3 in 2000<br />
An expression then &#8220;is embodied in&#8221; a manifestation.  Notice that we are showing here a musical performance.  Music can be performed, but only when it is recorded do we have a manifestation.</p>
<p>Work 1 &#8211; J.S. Bach&#8217;s Goldberg variations.&nbsp;.&nbsp;.  is realized by the expression &#8211; that is, the performance by Glen Gould, which in turn &#8220;is embodied in&#8221; at least these 3 manifestations:</p>
<p>m1 &#8211; the recording on a phonograph record<br />
m2 &#8211; a re-release on a compact disc and<br />
m3 &#8211; a digitization on an MP3 file.</p>
<p>Implicitly the manifestations of the same expression have a sibling relationship to each other &#8211; that may be an equivalent content.
</p></div>
<p><!--548c275534c0841e2b28f0d3741886ab--><!--c21c4a647f3056415d7614b375f7278d--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.pzed.ca/words/2008/01/31/work-expression-manifestation/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>frbr and music recordings</title>
		<link>http://www.pzed.ca/words/2008/01/31/frbr-and-music-recordings/</link>
		<comments>http://www.pzed.ca/words/2008/01/31/frbr-and-music-recordings/#comments</comments>
		<pubDate>Thu, 31 Jan 2008 15:58:16 +0000</pubDate>
		<dc:creator>pzed</dc:creator>
				<category><![CDATA[libraries]]></category>
		<category><![CDATA[music]]></category>

		<guid isPermaLink="false">http://www.pzed.ca/words/archives/2008/frbr-and-music-recordings/</guid>
		<description><![CDATA[I&#8217;ve been reading skimming Bryant&#8217;s Music Librarianship: A Practical Guide, specifically the chapters on cataloguing and classification. This is in connection with a larger project that I&#8217;ve only mentioned here in passing. Perhaps one day I&#8217;ll articulate it fully, although my sense of what I&#8217;d like to do is still evolving to an extent. At [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been <del>reading</del> skimming <a href="http://www.pzed.ca/words/bibliography#bryant">Bryant&#8217;s <em>Music Librarianship: A Practical Guide</em></a>, specifically the chapters on cataloguing and classification. This is in connection with a larger project that I&#8217;ve only mentioned here in passing. Perhaps one day I&#8217;ll articulate it fully, although my sense of what I&#8217;d like to do is still evolving to an extent.</p>
<p>At any rate, there&#8217;s not a lot in Bryant yet that I feel want specifically to make notes on. He has a separate chapter on recordings, which is my area of interest, and so doesn&#8217;t discuss them in detail in the chapters I&#8217;ve skimmed. He makes the case, I think convincingly, that music materials are different from normal monographs and serials, presenting their own set of challenges. And although Bryant&#8217;s book is getting a little old (the second edition I&#8217;m reading was 1985; the first, 1959), I find myself anticipating <a href="http://www.loc.gov/cds/FRBR.html">FRBR</a>.</p>
<p>For the most part, library cataloguing practices are based on use. That&#8217;s to say that historically we have developed our catalogues based on direct experience, describing actual items in hand. You might say this is a bottom-up approach, building rich bibliographic resources one concrete entry at a time.</p>
<p>FRBR recognizes that, thanks to the historic development of our catalogues, we have learned and can apply a fairly sophisticated conceptual framework to the bibliographic universe. Sophisticated, but also relatively simple. From <a href="http://www.oclc.org/research/projects/frbr/">OCLC</a>:</p>
<blockquote><p>
FRBR conceptualizes three groups of entities:</p>
<ul>
<li><em>Group 1</em> consists of the products of intellectual or artistic endeavor (e.g., publications).</li>
<li><em>Group 2</em> comprises those entities responsible for intellectual or artistic content (a person or corporate body).</li>
<li><em>Group 3</em> includes the entities that serve as subjects of intellectual or artistic endeavor (concept, object, event, and place).</li>
</ul>
<p>The internal subdivision of Group One entities is important as well. FRBR specifies that intellectual or artistic products include the following types of entities:</p>
<ul>
<li><strong>the work</strong>, a distinct intellectual or artistic creation</li>
<li><strong>the expression</strong>, the intellectual or artistic realization of a work</li>
<li><strong>the manifestation</strong>, the physical embodiment of an expression of a work</li>
<li><strong>the item</strong>, a single exemplar of a manifestation.</li>
</ul>
<p>FRBR also specifies particular relationships between classes of Group One entities:</p>
<ul>
<li>a <strong>work</strong> <em>is realized through</em> one or more <strong>expressions</strong></li>
<li> &mdash; each of which <em>is embodied in</em> one or more <strong>manifestations</strong></li>
<li> &mdash; &mdash; each of which <em>is exemplified by</em> one or more <strong>items</strong>.</li>
</ul>
</blockquote>
<p>It&#8217;s at the end here, with the <em>work &#8211; expression &#8211; manifestation &#8211; item</em> relationships, that things get a little weird. In part, this is because for most &#8220;group one entities&#8221; the distinction between expression and manifestation is unclear. Shakespeare is often used as an example. Let&#8217;s do it bottom-up: we have in our library a number of items called &#8220;A Midsummer Night&#8217;s Dream&#8221; for whom an entity named &#8220;Shakespeare&#8221; is responsible. These items represent various editions by various publishers, and we would say that these editions are equivalent to manifestations. Now here&#8217;s where it gets tricky: if the edition is a manifestation, what would be considered an expression? Well, in this case, all these various print editions are most likely to be considered manifestations of a single expression, which might be called &#8220;Midsummer Night&#8217;s Dream as a play&#8221;. Seems redundant, I agree, but of course I chose this play for a reason: &#8220;Midsummer Night&#8217;s Dream&#8221; is also an opera, and this opera (based on the play) can be considered a different expression of the same work. So to reiterate from the top, down: Midsummer Night&#8217;s Dream is a work that has (at least) two expressions, &#8220;play&#8221; and &#8220;opera&#8221;. The expression &#8220;play&#8221; finds its embodiment in numerous manifestations in the various editions compiled and published over the years, and each of these manifestations is exemplified by any number of copies, or items.</p>
<p>Now it seems to me music materials lend themselves quite nicely to FRBR. Adaptations and alternate arrangements are common, and Bryant spends considerable energy discussing the challenges of cataloguing them. FRBR seems an elegant and simple solution, where each adaptation is viewed as an expression.</p>
<p>But the other thing that makes music materials fit nicely with FRBR is the work (pardon the pun) that has been done establishing authoritatively the identity of the works of the major composers. Take, for example, the <a href="http://www.jsbach.org/bwvlist.html">works of Bach by BWV number</a>, or <a href="http://www.mozartforum.com/koechel%20main.htm">Mozart by Koechel</a> (or Köchel; you see how quickly things get tricky with music description). It&#8217;s almost as though the FRBR notion of &#8220;work&#8221; was borrowed from music.</p>
<p>Now if only there were a universal authority database for musical works. Then, when, cataloguing a music item, you could simply point to the work and get on with your day. For now, I guess we have the <em>{deep breath}</em> <a href="http://drtc.isibang.ac.in/sdl/index.php/record/view/7678">Indexes to the established titles, variant titles, obsolete uniform titles, and work numbers in the Library of Congress Name-Authority File for the works of Bach, Beethoven, Brahms, Haydn, Mozart, Schubert, Tchaikovsky, Telemann</a>.<!--78b1bda243338f54d6ac3c7a936eb8cb--><!--867ea094ef7dea83745335dc707c2c87--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.pzed.ca/words/2008/01/31/frbr-and-music-recordings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL and PHP</title>
		<link>http://www.pzed.ca/words/2008/01/30/mysql-and-php/</link>
		<comments>http://www.pzed.ca/words/2008/01/30/mysql-and-php/#comments</comments>
		<pubDate>Wed, 30 Jan 2008 17:49:00 +0000</pubDate>
		<dc:creator>pzed</dc:creator>
				<category><![CDATA[libraries]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[web stuff]]></category>

		<guid isPermaLink="false">http://www.pzed.ca/words/archives/2008/mysql-and-php/</guid>
		<description><![CDATA[I learned some SQL a few years ago, and with a refresher find that it&#8217;s fairly straightforward. And of course the nice thing about scripting your queries is that you can test them until they&#8217;re correct, and then forget about them. Integrating this into PHP is still a bit of a challenge for me after, [...]]]></description>
			<content:encoded><![CDATA[<p>I learned some SQL a few years ago, and with a refresher find that it&#8217;s fairly straightforward. And of course the nice thing about scripting your queries is that you can test them until they&#8217;re correct, and then forget about them.</p>
<p>Integrating this into PHP is still a bit of a challenge for me after, what, a day-and-a-half of trying? Things to remember:</p>
<ul>
<li>Five basic steps to querying</li>
<ol>
<li>Open the database connection</li>
<li>Select the database (it seems to me these first two have been combined in PHP&#8217;s mysqli functions, but I&#8217;m using a slightly older text)</li>
<li>Run the query</li>
<li>Fetch the query results into an array</li>
<li>Format and print the results</li>
</ol>
<li>Steps one through three require error handling</li>
<li>The array that&#8217;s created in step three is an associative array in which the field name given in the query corresponds to the data returned. The array is processed one row at a time. There&#8217;s no need to include the table name, because the array corresponds to the query structure, rather than the table structure. This is easy to visualize if you think of the table that is displayed when a query is run from the mysql command prompt.</li>
</ul>
<p>So it&#8217;s fairly simple to generate a flat html table from data that exist across multiple database tables. I&#8217;d like to figure out how to generate not-so-flat data; for example, suppose (just suppose) I had a database in which a number of books are stored in one table, and their chapters are stored in another. I&#8217;d like an output that would list the book, then the contents, for each book. The simple approach described above won&#8217;t do it. Maybe in another day-and-a-half this too will seem simple, but right now I just can&#8217;t quite figure it out.</p>
<p class="cited">Williams, Hugh E. and David Lane. <em>Web Database Applications with PHP and MySQL.</em> Sebastapol, CA: O&#8217;Reilly, 2004.
<p/>
]]></content:encoded>
			<wfw:commentRss>http://www.pzed.ca/words/2008/01/30/mysql-and-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>a quick note</title>
		<link>http://www.pzed.ca/words/2008/01/25/a-quick-note/</link>
		<comments>http://www.pzed.ca/words/2008/01/25/a-quick-note/#comments</comments>
		<pubDate>Fri, 25 Jan 2008 14:28:44 +0000</pubDate>
		<dc:creator>pzed</dc:creator>
				<category><![CDATA[libraries]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[web stuff]]></category>

		<guid isPermaLink="false">http://www.pzed.ca/words/archives/2008/a-quick-note/</guid>
		<description><![CDATA[-&#62; means &#8220;is being passed to.&#8221; I&#8217;m sure I whipped right past this yesterday, but it makes sense to me now. The books I&#8217;m working through are both read to go to MySQL, but I don&#8217;t think I am. For most of the last two days I haven&#8217;t had access to the internet, so I [...]]]></description>
			<content:encoded><![CDATA[<p><code>-&gt;</code> means &#8220;<a href="http://us.php.net/manual/en/language.oop5.basic.php">is being passed to</a>.&#8221; </p>
<p>I&#8217;m sure I whipped right past this yesterday, but it makes sense to me now. The books I&#8217;m working through are both read to go to MySQL, but I don&#8217;t think I am. For most of the last two days I haven&#8217;t had access to the internet, so I put aside my music library reading to focus on the basics of PHP. These are, of course, related, and I soon have to get back the the music stuff. I want to keep at the PHP, though. It&#8217;s straightforward enough, but there are some conceptual aspects that I&#8217;m struggling with a bit, and I think another day&#8217;s immersion will do the trick.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pzed.ca/words/2008/01/25/a-quick-note/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>includes and functions</title>
		<link>http://www.pzed.ca/words/2008/01/24/includes-and-functions/</link>
		<comments>http://www.pzed.ca/words/2008/01/24/includes-and-functions/#comments</comments>
		<pubDate>Thu, 24 Jan 2008 20:55:14 +0000</pubDate>
		<dc:creator>pzed</dc:creator>
				<category><![CDATA[libraries]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[web stuff]]></category>

		<guid isPermaLink="false">http://www.pzed.ca/words/archives/2008/includes-and-functions/</guid>
		<description><![CDATA[includes the usefulness of reusing code should be obvious to everyone! require() and include() call code from a file the main difference is that if something goes wrong, require() will return a fatal error, include() will only give a warning data need not be passed to the include because it is inserted in the code [...]]]></description>
			<content:encoded><![CDATA[<h3>includes</h3>
<ul>
<li>the usefulness of reusing code should be obvious to everyone!</li>
<li><em>require()</em> and <em>include()</em> call code from a file</li>
<li>the main difference is that if something goes wrong, require() will return a fatal error, include() will only give a warning</li>
<li>data need not be passed to the include because it is inserted in the code and executed as if present all along (I think)</li>
<li>it&#8217;s a good idea to store include files outside the document tree, making them invisible to internet interlopers</li>
</ul>
<h3>functions</h3>
<ul>
<li>&#8220;A function is a self-contained module of code that prescribes a calling interface, performs some task, and optionally returns a result&#8221;</li>
<li>a library of user-defined functions can be stored in an include file</li>
<li>data must be passed to a function using a parameter (see &#8220;scope&#8221;, below)</li>
<li>user-defined functions must be declared, e.g.</li>
<p><code>&nbsp;&nbsp;function say_hi()<br />
&nbsp;&nbsp;{<br />
&nbsp;&nbsp;echo 'hi';<br />
&nbsp;&nbsp;}</code></p>
<li>function names can only contain letters, digits, underscores; cannot begin with a digit; and cannot be the same as an existing function name</li>
</ul>
<h3>scope</h3>
<ul>
<li>scope controls where a variable is visible and useful</li>
<li>variables declared inside a function are in scope from the declaration until the function&#8217;s end brace; this is <em>function scope</em>, the variables are <em>local variables</em></li>
<li>variables declared outside functions are in scope from the declaration to the end of the file, but not inside functions; this is <em>global scope</em>, the variables are <em>global variables</em></li>
<li>if a require() or include() statement is used within a function, function scope applies; if not, global</li>
<li>the keyword <em>global</em> can be used to give a variable defined within a function global scope</li>
<li>to allow functions to operate on global variables, use a <em>pass by reference</em>; the function receives a reference to the original variable, and any modifications performed on the reference are also performed on the original</li>
<li>a pass by reference is created by prefixing an ampersand to the variable name in the function&#8217;s parameter list</li>
<li>the <em>return</em> keyword can be used to stop a function, usually in response to some condition; return can also be used to return a value</li>
<li>it is possible to call a function recursively, but this seems dangerous and doesn&#8217;t appear to have many benefits</li>
</ul>
<p class="cited">Welling, Luke and Laura Thomson. <em>PHP and MySQL Web Development.</em> 2nd ed. Indianapolis: Sam&#8217;s, 2003.</p>
<p><!--922a7470102817acb849be3a13c2fccd--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.pzed.ca/words/2008/01/24/includes-and-functions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>arrays in php</title>
		<link>http://www.pzed.ca/words/2008/01/23/arrays-in-php/</link>
		<comments>http://www.pzed.ca/words/2008/01/23/arrays-in-php/#comments</comments>
		<pubDate>Wed, 23 Jan 2008 21:44:19 +0000</pubDate>
		<dc:creator>pzed</dc:creator>
				<category><![CDATA[libraries]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[web stuff]]></category>

		<guid isPermaLink="false">http://www.pzed.ca/words/archives/2008/arrays-in-php/</guid>
		<description><![CDATA[an array is a type of variable used to store a set of values (that much I knew) numerically indexed arrays are indexed numerically (!) starting at 0 an array can be initialized directly or an array can be created by copying from another array using the = operator an array can also be created [...]]]></description>
			<content:encoded><![CDATA[<ul>
<li>an <em>array</em> is a type of variable used to store a set of values (that much I knew)</li>
<li><em>numerically indexed arrays</em> are indexed numerically (!) starting at 0</li>
<li>an array can be initialized directly or an array can be created by copying from another array using the = operator</li>
<li>an array can also be created using data stored in a file, or in a database</li>
<li>loops are convenient ways to access numerically indexed arrays</li>
<li>an <em>associative array</em> allows the association of any key or index with each value</li>
<li>the <em>each()</em> function can be used to loop through an associative array</li>
<li>the <em>list()</em> function can be used to split an array into a number of values &#8211; I assume this corresponds to the number of associations</li>
<li><em>multidimensional arrays</em> are created by nesting</li>
<li>one advantage of associative arrays is that data can be accessed by the name of the key, which makes more sense than a simple digit</li>
<li>thus it is easier to identify and access a single value in a complex array</li>
<li>however, looping is simpler with numerically indexed arrays, so these will be preferable in some situations</li>
</ul>
<p class="cited">Welling, Luke and Laura Thomson. <em>PHP and MySQL Web Development.</em> 2nd ed. Indianapolis: Sam&#8217;s, 2003.<br />
<!--9df91f5471a0e38f447eb18402dca3c1--><!--2048f836ed42d98c4f057e660e0845d5--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.pzed.ca/words/2008/01/23/arrays-in-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>a mishmash of basic php</title>
		<link>http://www.pzed.ca/words/2008/01/23/a-mishmash-of-basic-php/</link>
		<comments>http://www.pzed.ca/words/2008/01/23/a-mishmash-of-basic-php/#comments</comments>
		<pubDate>Wed, 23 Jan 2008 16:40:39 +0000</pubDate>
		<dc:creator>pzed</dc:creator>
				<category><![CDATA[libraries]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[web stuff]]></category>

		<guid isPermaLink="false">http://www.pzed.ca/words/archives/2008/a-mishmash-of-basic-php/</guid>
		<description><![CDATA[literal is the term (noun) used to describe raw data, such as text variables and literals can be combined in output in two ways: variable names can be placed alongside literals within double-quoted strings, or single quoted literals can be concatenated with variables. The concatenation symbol is the period. this distinction occurs because php attempts [...]]]></description>
			<content:encoded><![CDATA[<ul>
<li><em>literal</em> is the term (noun) used to describe raw data, such as text</li>
<li>variables and literals can be combined in output in two ways: variable names can be placed alongside literals within double-quoted strings, or single quoted literals can be concatenated with variables. The concatenation symbol is the period.</li>
<li>this distinction occurs because php attempts to evaluate the contents of double-quoted strings, whereas single-quoted strings are not evaluated</li>
<li>found a nice discussion of the difference between GET and POST methods here: <a href="http://www.cs.tut.fi/~jkorpela/forms/methods.html">http://www.cs.tut.fi/~jkorpela/forms/methods.html</a></li>
<li><em>identifier</em> is a generic term for the names given to variables, functions, classes</li>
<li>php identifiers are case sensitive, and cannot begin with a digit (I haven&#8217;t quite figured out the use of $ yet)</li>
<li>php does not require variables to be declared before they are used</li>
<li>constants can be declared using the <em>define()</em> function</li>
<li>variables can have one of four types of <em>scope</em></li>
<ol>
<li>built-in superglobal variables are visible everywhere within a script</li>
<li>global variables declared in a script are visible throughout the script, <em>but not inside functions</em></li>
<li>variables used inside functions are local to the function</li>
<li>variables used inside functions that are declared as global refer to the global variables of the same name</li>
</ol>
</ul>
<p>I think this last should read &#8220;variables that are declared as global inside functions refer to the global variables of the same name&#8221;.</p>
<p class="cited">Welling, Luke and Laura Thomson. <em>PHP and MySQL Web Development.</em> 2nd ed. Indianapolis: Sam&#8217;s, 2003.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pzed.ca/words/2008/01/23/a-mishmash-of-basic-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I should just know this stuff</title>
		<link>http://www.pzed.ca/words/2008/01/22/i-should-just-know-this-stuff/</link>
		<comments>http://www.pzed.ca/words/2008/01/22/i-should-just-know-this-stuff/#comments</comments>
		<pubDate>Tue, 22 Jan 2008 21:28:04 +0000</pubDate>
		<dc:creator>pzed</dc:creator>
				<category><![CDATA[libraries]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[web stuff]]></category>

		<guid isPermaLink="false">http://www.pzed.ca/words/archives/2008/i-should-just-know-this-stuff/</guid>
		<description><![CDATA[but it never hurts to review: three-tier architectures: client(browser) &#8596; web server &#8596; database server database applications are stateful, http is stateless the browser is a thin client, but it is possible to pass some of the work to the browser; e.g. JavaScript can be used to validate data before sending to the web server [...]]]></description>
			<content:encoded><![CDATA[<p>but it never hurts to review:</p>
<ul>
<li>three-tier architectures: client(browser) &harr; web server &harr; database server</li>
<li>database applications are stateful, http is stateless</li>
<li>the browser is a thin client, but it is possible to pass some of the work to the browser; e.g. JavaScript can be used to validate data before sending to the web server</li>
</ul>
<p>I have a tendency to skim discussion of strings, variables, math, increments, expressions, operators.&nbsp;.&nbsp;.&nbsp;. Can&#8217;t I just look that stuff up? But I may need to think about character encoding and data entry. On to the object-oriented stuff:</p>
<ul>
<li>an <em>object</em> is a container in which data and functions can be <em>bound</em></li>
<li>a <em>class</em> is an object (?) that can be used to create many similar objects (it doesn&#8217;t help that the book I&#8217;m using keeps using the term <em>package</em> to describe the example of a class that is used&dagger;)</li>
<li>a <em>method</em> is a function that belongs to a class (or package); a method can be called on an object that has been created by the class</li>
<li>each specific object created by the class is an <em>instance</em></li>
</ul>
<p>&dagger; &#8211; It reads like this: An object is created by a package. A method (or member function) is called on an object. A method is provided by a package. The package in question is a class (aren&#8217;t all packages &#8211; should I just forget they ever said &#8220;package&#8221;?). An object created by a class is an instance. Now I get an example that shows me how to create a user-defined class that counts. There&#8217;s nothing like learning by doing. Back to class:</p>
<ul>
<li>variables defined within a class are <em>member variables</em>; functions, <em>member functions</em>.</li>
<li>&#8220;The class definition defines how data and functionality are actually bound together&mdash;member variables and functions take their meaning from the class of which they&#8217;re a part.&#8221;</li>
<li>class definitions can be placed in <em>include</em> files, the benefits of which aren&#8217;t listed in my text, but I imagine must include:</li>
<ol>
<li>efficiency: the class needn&#8217;t be written out every time it&#8217;s needed, saving time and bandwidth</li>
<li>uniformity: by having only one copy of a class that could be used by multiple programmes, we ensure that the class always functions in the same way</li>
<li>security: the class remains on the server, and I&#8217;m guessing this might make things a little more secure in some way. Or not. I just can&#8217;t finish a list after only two items.</li>
</ol>
<li>a <em>constructor</em> is a method that is called when an object is created, and can be used to set up the initial state of the new object</li>
<li>a <em>destructor</em> is a method that is called when an object is destroyed</li>
<li>destructor functions are useful for housekeeping tasks like closing the connection to a DBMS or saving user preferences to a file</li>
</ul>
<p>PHP also has <em>private members variables</em>, but it&#8217;s very rare that these ever become law.</p>
<p>I think I&#8217;ll save inheritance for tomorrow.</p>
<p class="cited">Williams, Hugh E. and David Lane. <em>Web Database Applications with PHP and MySQL.</em> Sebastapol, CA: O&#8217;Reilly, 2004.
<p/><!--fb940a4ccef16ccf4f149ed7a76e9c98--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.pzed.ca/words/2008/01/22/i-should-just-know-this-stuff/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

