<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    
    <title>Coffee|Code : Dan Scott - Programming languages</title>
    <link>http://www.coffecode.net/</link>
    <description>Caffeinated Librarian Geek</description>
    <dc:language>en</dc:language>
    <generator>Serendipity 1.5.5 - http://www.s9y.org/</generator>
    
    

<item>
    <title>File_MARC 0.6.0 - now offering two tasty flavours of MARC-as-JSON output</title>
    <link>http://www.coffecode.net/archives/231-File_MARC-0.6.0-now-offering-two-tasty-flavours-of-MARC-as-JSON-output.html</link>
            <category>Coding</category>
            <category>PHP</category>
    
    <comments>http://www.coffecode.net/archives/231-File_MARC-0.6.0-now-offering-two-tasty-flavours-of-MARC-as-JSON-output.html#comments</comments>
    <wfw:comment>http://www.coffecode.net/wfwcomment.php?cid=231</wfw:comment>

    <slash:comments>1</slash:comments>
    <wfw:commentRss>http://www.coffecode.net/rss.php?version=2.0&amp;type=comments&amp;cid=231</wfw:commentRss>
    

    <author>dan@coffeecode.net (Dan Scott)</author>
    <content:encoded>
    &lt;p&gt;I&#039;ve just released the PHP PEAR library &lt;a href=&quot;http://pear.php.net/File_MARC&quot;&gt;File_MARC&lt;/a&gt; 0.6.0. This release brings two JSON serialization output methods for MARC to the table:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;toJSONHash() returns JSON that adheres to Bill Dueber&#039;s proposal for the array-oriented MARC-HASH JSON format at &lt;a href=&quot;http://robotlibrarian.billdueber.com/new-interest-in-marc-hash-json/&quot;&gt;New interest in MARC-HASH JSON&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;toJSON() returns JSON that adheres to Ross Singer&#039;s proposal for an object-oriented JSON format (I could only find a sample at &lt;a href=&quot;http://gist.github.com/511752&quot;&gt;this paste&lt;/a&gt; - not sure if there&#039;s a broader description anywhere, but really -- who needs it?)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
The JSON formats should be useful for developers who don&#039;t want to have to deal with the overhead and sluggishness of a MARC parsing library (yes, File_MARC, I&#039;m looking at you) just to deal with MARC data. Both formats are round-trippable and compact, which is why I chose to support them.
&lt;/p&gt;
&lt;p&gt;
The use of the &lt;a href=&quot;http://php.net/json_encode&quot;&gt;json_encode()&lt;/a&gt; function bumps the minimum PHP version requirement for File_MARC up to 5.2.x from 5.1.x, which kind of sucks, but given that PHP 5.2.0 was &lt;a href=&quot;http://php.net/releases/&quot;&gt;released in 2006&lt;/a&gt;, I think it&#039;s worth it.
&lt;/p&gt;
&lt;p&gt;
You can install File_MARC using the &#039;pear&#039; command on most environments as follows:
&lt;/p&gt;
&lt;p&gt;&lt;tt&gt;pear install File_MARC-beta&lt;/tt&gt;&lt;/p&gt; 
    </content:encoded>

    <pubDate>Sat, 14 Aug 2010 15:10:38 -0400</pubDate>
    <guid isPermaLink="false">http://www.coffecode.net/archives/231-guid.html</guid>
    
</item>
<item>
    <title>Moving from Figaro's Password Manager (FPM) to KeePassX</title>
    <link>http://www.coffecode.net/archives/224-Moving-from-Figaros-Password-Manager-FPM-to-KeePassX.html</link>
            <category>Android</category>
            <category>Python</category>
    
    <comments>http://www.coffecode.net/archives/224-Moving-from-Figaros-Password-Manager-FPM-to-KeePassX.html#comments</comments>
    <wfw:comment>http://www.coffecode.net/wfwcomment.php?cid=224</wfw:comment>

    <slash:comments>6</slash:comments>
    <wfw:commentRss>http://www.coffecode.net/rss.php?version=2.0&amp;type=comments&amp;cid=224</wfw:commentRss>
    

    <author>dan@coffeecode.net (Dan Scott)</author>
    <content:encoded>
    &lt;p&gt;I&#039;m one of those people who actually keeps different passwords for every site and service I use. So far I&#039;m up to over 400 passwords, so I&#039;m dependent on a password manager. For a long, long time I have used &lt;a href=&quot;http://fpm.sourceforge.net&quot;&gt;Figaro&#039;s Password Manager (FPM)&lt;/a&gt; (and &lt;a href=&quot;http://kedpm.sourceforge.net/&quot;&gt;KedPM&lt;/a&gt; and most recently &lt;a href=&quot;http://als.regnet.cz/fpm2/&quot;&gt;FPM2&lt;/a&gt; as continuations of FPM), but now that I have an Android smartphone on which I can browse without wanting to die, I&#039;ve been itching to get access to my passwords on that. I noticed that &lt;a href=&quot;http://www.keepassdroid.com/&quot;&gt;KeePassDroid&lt;/a&gt; was available, and that &lt;a href=&quot;http://www.keepassx.org&quot;&gt;KeePassX&lt;/a&gt; would work on my desktop. I just had to get from FPM&#039;s password export format to one of KeePass&#039;s import formats. It turns out that nobody had made that particular leap before (or hadn&#039;t shared their conversion script).&lt;/p&gt;
&lt;p&gt;Thus... I bring you the &lt;a href=&quot;http://gitorious.net/fpm-to-keepass-converter&quot;&gt;FPM to KeePass converter&lt;/a&gt;. A straightfoward Python script licensed under the GPL v3 that does a passable job of converting an FPM XML export to a KeePass 1.x or 2.x XML import file. It worked for me, and that&#039;s all that I needed; but maybe it will work for you, too.&lt;/p&gt; 
    </content:encoded>

    <pubDate>Fri, 28 May 2010 15:14:07 -0400</pubDate>
    <guid isPermaLink="false">http://www.coffecode.net/archives/224-guid.html</guid>
    
</item>
<item>
    <title>Seven things</title>
    <link>http://www.coffecode.net/archives/185-Seven-things.html</link>
            <category>Personal</category>
            <category>PHP</category>
    
    <comments>http://www.coffecode.net/archives/185-Seven-things.html#comments</comments>
    <wfw:comment>http://www.coffecode.net/wfwcomment.php?cid=185</wfw:comment>

    <slash:comments>5</slash:comments>
    <wfw:commentRss>http://www.coffecode.net/rss.php?version=2.0&amp;type=comments&amp;cid=185</wfw:commentRss>
    

    <author>dan@coffeecode.net (Dan Scott)</author>
    <content:encoded>
    &lt;p&gt;I was tagged by &lt;a href=&quot;http://pooteeweet.org/blog/1402&quot;&gt;Lukas&lt;/a&gt; for the &quot;7 things&quot; meme, and meant to do something about it, but I&#039;ve been kind of preoccupied with the new baby and the sprinting toddler and work. Anyway, it seems like a heck of a lot more reasonable than the evil Facebook&#039;s &quot;25 things&quot; meme, so I&#039;m going to take a few minutes to try to play along.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;I was an early riser until I was around 15 or 16 years old and discovered the surrealists. At that point, I began experimenting with sleep deprivation as a means of stimulating my prose and poetry. This is also when I began drinking coffee. After about a month, I was no longer capable of being an early riser--and the fruit of writing experiments was, uh, not too impressive.&lt;/li&gt;
&lt;li&gt;Rather than going directly to university after high school, I elected to take what is now termed a &lt;em&gt;gap year&lt;/em&gt;. No trips to Europe for me, though; the goal was to refine my bass-playing and music-reading skills and head to a post-secondary music program. I recorded a few prog-rock tracks in a studio with a fantastic couple of guys (hey Pete and Mike!), but ultimately didn&#039;t put enough effort into my bass to carry out the plan. Let me assure you that a year of working night shifts at a convenience store in the entertainment district of a small city is &lt;u&gt;not&lt;/u&gt; a waste of time; I can&#039;t count the number of experiences that I&#039;m thankful for having had during that time.&lt;/li&gt;
&lt;li&gt;Although I roast and grind my own coffee, I&#039;m not a coffee snob. In fact, I possess almost no sense of smell and I suspect that my sense of taste is limited in comparison to most people, and I&#039;m quite happy to drink diner coffee. I cannot stand the taste of Starbucks coffee, however.&lt;/li&gt;
&lt;li&gt;The first time I was able to run a full kilometre without walking was when I was eighteen. Since then I&#039;ve run a couple of 5K races and and a &lt;a href=&quot;http://www.coffeecode.net/archives/79-Im-not-as-sore-as-I-thought-I-would-be.html&quot;&gt;sprint duathlon&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;I&#039;m pretty sure I was destined to become a systems librarian. When I was 10, I used to hang out at the local college&#039;s computer room until the students would log me onto a completely restricted Gandalf mainframe account so I could pretend to be Matthew Broderick in WarGames. My first real job, when I was 14, was as a &quot;computer page&quot; at the Barrie Public Library Children&#039;s Annex. It was my responsibility to oversee the use of the bank of Commodore 64s that the library made available to children, luring them in with games but requiring them to complete their allotment of educational software first. Oh the power.&lt;/li&gt;
&lt;li&gt;I occasionally wrote reviews for random CDs that came into the campus newspaper office. Nobody else wanted to review this orange CD called &lt;em&gt;Tragic Kingdom&lt;/em&gt; by some West-coast band, so I took it on. I gave it a savage review; I wasn&#039;t impressed with faux-ska and couldn&#039;t stand the lead singer&#039;s voice. Six months later No Doubt&#039;s &quot;SpiderWebs&quot; was in high rotation on every radio station in North America (look, folks, that song is repetitive enough without being played twice an hour!). I&#039;m sure that my negative review still gnaws at Gwen Stefani today as she weeps bitterly in her platinum mansion.&lt;/li&gt;
&lt;li&gt;In grade one, my report card read &lt;em&gt;Dan is too critical of his classmates.&lt;/em&gt; In my defence, if they weren&#039;t so stupid--come on, sound it out buddy--I wouldn&#039;t have been critical. Okay, not much of a defence.&lt;/li&gt;
&lt;li&gt;I am not a very demanding friend. I (almost) never call, (almost) never write, and (almost) never visit. Okay, scratch that: I&#039;m a crappy friend. Most of my close friends found out that we were expecting a second child only through Lynn&#039;s Facebook account. I called one couple shortly after Arik was born and his quasi-namesake (one of the Eric&#039;s in our life who bring honour to the noble name) asked me after a few minutes: &quot;So, uhh... did we &lt;em&gt;know&lt;/em&gt; that you were expecting a baby?&quot;. No, no you didn&#039;t, and that&#039;s not your fault. Man I suck.&lt;/li&gt;
&lt;li&gt;I&#039;m really good at arithmetic.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
Link your original tagger(s), and list these rules on your blog.
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Share seven facts about yourself in the post — some random, some weird.&lt;/li&gt;
&lt;li&gt;Tag seven people at the end of your post by leaving their names and the links to their blogs.&lt;/li&gt;
&lt;li&gt;Let them know they’ve been tagged by leaving a comment on their blogs and/or Twitter.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Wow, that was fun. Lemme see, I&#039;m going to break the rules and just tag two people: &lt;a href=&quot;http://blog.evermeet.cx&quot;&gt;Helmut&lt;/a&gt;, because he&#039;s one of the only other people who worked on the ibm_db2 PHP driver out of passion rather than as a job assignment. And &lt;a href=&quot;http://rc98.net&quot;&gt;Gabriel&lt;/a&gt; because I like his style.&lt;/p&gt;
 
    </content:encoded>

    <pubDate>Mon, 09 Feb 2009 00:56:35 -0500</pubDate>
    <guid isPermaLink="false">http://www.coffecode.net/archives/185-guid.html</guid>
    
</item>
<item>
    <title>Oooh... looks like I've got (even more) work cut out for me</title>
    <link>http://www.coffecode.net/archives/148-Oooh...-looks-like-Ive-got-even-more-work-cut-out-for-me.html</link>
            <category>Coding</category>
            <category>PHP</category>
    
    <comments>http://www.coffecode.net/archives/148-Oooh...-looks-like-Ive-got-even-more-work-cut-out-for-me.html#comments</comments>
    <wfw:comment>http://www.coffecode.net/wfwcomment.php?cid=148</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.coffecode.net/rss.php?version=2.0&amp;type=comments&amp;cid=148</wfw:commentRss>
    

    <author>dan@coffeecode.net (Dan Scott)</author>
    <content:encoded>
    &lt;p&gt;
PHP is getting a &lt;a href=&quot;http://www.colder.ch/news/01-16-2008/30/new-datastructures-in-spl.html&quot;&gt;native doubly-linked list structure&lt;/a&gt;. This is fabulous news; when I wrote the &lt;a href=&quot;http://pear.php.net/File_MARC&quot;&gt;File_MARC&lt;/a&gt; PEAR package, I ended up having to implement a &lt;a href=&quot;http://pear.php.net/Structures_LinkedList&quot;&gt;linked list class&lt;/a&gt; in PEAR to support it. File_MARC does its job today (even though I haven&#039;t taken it out of alpha yet), but due to its reliance on userspace data structures it&#039;s an order of magnitude slower than packages like &lt;a href=&quot;http://marc4j.tigris.org&quot;&gt;marc4j&lt;/a&gt; so it&#039;s not the best choice for processing hundreds of thousands of MARC records... today. It hurts a little that the &lt;a href=&quot;http://vufind.org&quot;&gt;VuFind&lt;/a&gt; project has to use a non-PHP solution for populating its Solr indices - although I&#039;m delighted that they have started using File_MARC for some on-demand processing.
&lt;/p&gt;
&lt;p&gt;
Now, when I get a chance (insert raucous mocking laughter here), I hope to be able to make File_MARC use splDoublyLinkedList  and see how it fares with 500K records. Should be good fun! After that, it just needs to be taught how to convert MARC8 to UTF-8, and we&#039;ll have ourselves a fully featured standard MARC package for PHP.
&lt;/p&gt; 
    </content:encoded>

    <pubDate>Wed, 16 Jan 2008 22:30:14 -0500</pubDate>
    <guid isPermaLink="false">http://www.coffecode.net/archives/148-guid.html</guid>
    
</item>
<item>
    <title>FacBackOPAC: making Casey Durfee's code talk to Unicorn</title>
    <link>http://www.coffecode.net/archives/119-FacBackOPAC-making-Casey-Durfees-code-talk-to-Unicorn.html</link>
            <category>Coding</category>
            <category>Python</category>
    
    <comments>http://www.coffecode.net/archives/119-FacBackOPAC-making-Casey-Durfees-code-talk-to-Unicorn.html#comments</comments>
    <wfw:comment>http://www.coffecode.net/wfwcomment.php?cid=119</wfw:comment>

    <slash:comments>3</slash:comments>
    <wfw:commentRss>http://www.coffecode.net/rss.php?version=2.0&amp;type=comments&amp;cid=119</wfw:commentRss>
    

    <author>dan@coffeecode.net (Dan Scott)</author>
    <content:encoded>
    &lt;p&gt;For the past couple of days, I&#039;ve been playing with Casey Durfee&#039;s &lt;a href=&quot;http://extranet.spl.org/code/code4lib2007.zip&quot;&gt;code&lt;/a&gt; that uses Solr and Django to offer a faceted catalogue. My challenge? Turn a dense set of code focused on Dewey and Horizon ILS into a catalogue that speaks LC and Unicorn. Additionally, I want it to serve as both a proof of several technologies (Solr for faceted searching and Django as a Web application framework) to my colleagues and as a reasonable backup catalogue for when our main catalogue fails (as it all too often does).&lt;/p&gt;
&lt;p&gt;I emailed Casey today to tell him that I had a number of patches to contribute as a result of my experiments. It turns out that he&#039;s not really interested in pursuing this particular project much further, so he gave me his blessing to take his throwaway code and do whatever I want with it. Thus, the emergence of the &lt;a href=&quot;http://code.google.com/p/fac-back-opac/&quot;&gt;FacBackOPAC&lt;/a&gt; project on code.google.com. If there&#039;s a grant out there for worst project name ever, this project&#039;s in the running... Anyways, I have contorted Casey&#039;s code so that it supports both Dewey and LC, and with a bit more torture it should be flexible enough to support both Horizon and Unicorn.&lt;/p&gt;
&lt;p&gt;Right now I&#039;ve twisted it all the way to meet my Unicorn needs and consequently have broken Horizon support, but it won&#039;t take much to make it support Horizon again - or any other ILS, for that matter. The main requirement is that you have to be able to get your MARC records and holdings out of your ILS. A secondary requirement is to know how to create links to detailed item views in your current catalogue, because this thing does not yet have any current awareness about item status.&lt;/p&gt;
&lt;p&gt;There. My itch has been scratched for the time being. Go play with the &lt;a href=&quot;http://code.google.com/p/fac-back-opac/&quot;&gt;FacBackOPAC&lt;/a&gt; project -- I even have (very) rough documentation on how to get the pieces installed andthe MARC records indexed, although you&#039;ll have to dig through the source in the Django catalog tree to overcome some hardcoded strings and URLs for the time being. Don&#039;t worry, pulling that hardcoded stuff out of the templates is high on the list of priorities.&lt;/p&gt;
&lt;p&gt;So, a huge thank you to Casey for freeing this code and making this possible. For something he considers throwaway code, I&#039;ve learned a lot from walking through it and making it start to meet my needs. I hope it helps you, too!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update 2007-03-18:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Edited links to point to the FacBackOPAC project page, rather than the wiki (which is subject to change, and which did -- breaking the dang links in the original version of this story. Argh!) 
    </content:encoded>

    <pubDate>Thu, 15 Mar 2007 02:06:35 -0400</pubDate>
    <guid isPermaLink="false">http://www.coffecode.net/archives/119-guid.html</guid>
    
</item>

</channel>
</rss>
