Somewhat Daily Mutterings http://www.samoht.com/weblog/gemcast.rb Somewhat Daily Mutterings http://www.samoht.com/gemcast_images/header_portrait.jpg samoht.com http://www.samoht.com/weblog/gemcast.rb <i>gem</i>cast needs RSS Support http://www.samoht.com/weblog/gemcast.rb/Programming/Projects/Gemcast/rss.html <p>Some time ago, I whined that I felt ignorant for not knowing what RSS is. I've done something about that, and now I realized that gemcast <i>must</i> be modified to provide an RSS feed. Somehow, it strikes me as profoundly arrogant to assume that anyone would syndicate my own personal RSS feed. But gemcast, to be taken seriously, still needs the capability so that others can make feeds available for their important stuff. Dang, maybe it's profoundly arrogant to assume that anyone will ever run gemcast, too. I can't win.</p> <p>Here's what I need to do to get there: <ul> <li>Generalize the template stuff so that you can have "named groups" of templates. These map to what blosxom calls "flavours", and I think I'll stick with that nomenclature (and anglo spelling). The default flavour will be configurable, but most folks will make that their web-browser presentation (HTML) templates. RSS will be an alternate flavour, meaning an alternative set of templates, and of course you'll be able to support different versions of RSS (not to mention different HTML, etc. layouts) with different flavours. <li>Take the CSS references out of the gemcast code, and move them into the HTML-based template(s). This is because files generated by gemcast are no longer always HTML. <li>Get permalinks (or at least single-entry views) working in gemcast so that RSS entries can contain links to the original entry, to be viewed in context. </ul> </p> BEA's New Dev2Dev and Download Center are Live! http://www.samoht.com/weblog/gemcast.rb/Miscellany/live!.html <p>At about 3:15am this (Friday) morning, <a href="http://www.bea.com">BEA</a>'s <a href="http://dev2dev.bea.com">Dev2Dev</a> and <a href="http://commerce.bea.com">Download Center</a> sites went live on our newly architected services, all in time for <a href="http://www.bea.com/content/news_events/events/eworld/2003/flash.jsp">eWorld</a> next week.</p> <p>It's very cool to see code that you've written or maintained finally running on a major public web site. If you're wondering what part I had in all this, it's a lot of behind-the-scenes stuff: the delegation of sign-ons to a centralized registration/sign-on server, and the maintenance of the single sign-on code that allows you to move from one BEA application to the next and stay signed on even though they're running on different WLS instances. To make a long story short: when you log into any BEA site you're executing code that I had a part in designing, writing, and/or maintaining.</p> <p>OK, enough bragging :-). </p> Goodness, Me? http://www.samoht.com/weblog/gemcast.rb/Miscellany/goodness_me.html <p>I just took the "How Evil Are You?" quiz. I did OK, I guess:</p> <center><a href="http://home.att.net/~slugbutter/evil/" target="new"><img src="http://home.att.net/~slugbutter/evil/good.jpg" border=1></a><br><a href="http://home.att.net/~slugbutter/evil/" target="new">How evil are <i>you</i>?</a></center> Organizing by File Dates Sucks http://www.samoht.com/weblog/gemcast.rb/Programming/Projects/Gemcast/file_dating.html <p>So, this morning I decided to move some of my files around to better fit my category taxonomy. I had written some stuff about the iPod, and decided to move those items from my main category down to the Music category. Simple, I thought, I'll just do the following:</p> <pre> cp `grep iPod *.txt` Music </pre> <p>I did a 'cp', rather than a move, in order to double-check that the results of the command worked. After that, I 'rm'd the files from the original location. Cool, no problem, I thought. I thought wrong. The files I copied now all had today's date, therefore, they sorted incorrectly into my weblog. Dufus!</p> <p> Fortunately this could be fixed with a bit of Ruby magic: </p> <pre> ruby -e 'File.utime(Time.local(2003, "Feb", 16, 0, 0, 0), \ Time.local(2003, "Feb", 16, 0, 0, 0), \ "filename.txt")' </pre> <p> Luckily, I'd written the entries fairly recently, so I could make a reasonable guess as to when they were composed. </p> iPod News http://www.samoht.com/weblog/gemcast.rb/Music/ipod_status.html <p>I've now burned 208 CDs to my PowerMac, and have maybe 75% of that number to go. My iPod has about 7G of space left. It ain't gonna hold it all :-(.</p> <p> I had a little fun with iTunes' smart playlist feature. A smart playlist is essentially a query into your iTunes library. So, you can create a dynamic playlist based on date, genre, artist, etc. and have that playlist automatically updated with whatever fits your criteria anytime music is added to your library. For example, I added playlists for 60s, 70s, 80s, etc. jazz and popular music, and a playlist I call "Acoustic Roots". </p> <p>The Acoustic Roots playlist automatically includes any music recorded by Gillian Welch, Tin Hat Trio, or Bill Frisell (the only Frisell albums I have fit into that category). I'm still not sure about having Acoustic Roots as a category - perhaps it would be better to just define a genre for that. That's the modeler in me - I'm always wondering if there's a better way to represent things. </p> Scary Yahoo Mail Bug? http://www.samoht.com/weblog/gemcast.rb/Miscellany/yahoo_mail_weird.html <p>I just saw the following at the top of my Yahoo Mail page.</p> <pre>Yahoo! | Welcome, tanyaberger [sign out - account info]</pre> <p>Scary, eh? The good thing is that the 'account info' link took me to my own profile page, not tanaberger's.</p> WTF is RSS? http://www.samoht.com/weblog/gemcast.rb/Miscellany/rss.html <p>I know I'm just a total idiot for not knowing all about RSS. I mean, it's as big as Jesus amongst the weblogging cogs, and I still don't know what it is, and what it can do for me. I must grok it, or be terminally even more uncool.</p> They Like Me... http://www.samoht.com/weblog/gemcast.rb/Miscellany/credit.html <p>Derek, over at radcap.com, <a href="http://radcap.com/dblog/dblog-archive/000293.php">credited</a> little ol' me with helping him get some traction with the data model for his DVD collection database, which was nice of him. If you ask me, he's come to an understanding of the basics of data modeling in an amazingly short period of time.</p> <p>While our political outlooks differ somewhat, his <a href="http://www.radcap.com">radcap.com</a> is a first-class site, and I check it out every so often..</p> Orange Dream Machine (*****) http://www.samoht.com/weblog/gemcast.rb/Miscellany/orange_dream.html <p>I've been in San Jose this week, and have been turned on to Jamba Juice (yeah, I'd heard of them before, but never had partaken). The store is right next to my hotel, and for the last four mornings I've treated myself to their Orange Dream Machine smoothie, with a fiber "boost". All I can say is, it's very tasty, <i>and</i>, my "movements" have been joyful and triumphant, if you get my drift (not that you asked).</p> Booger Wall http://www.samoht.com/weblog/gemcast.rb/Personal_Mythology/booger.html <p>So, there I am, in the restroom at work taking a whiz. My wandering eyes (wandering directly in front of me, thank you) fall on, of all things, a booger stuck to the wall. This is unreal to me. What twisted, tortured mind, in my theoretically professional workplace, would actually stick a booger to the restroom wall?</p> <p>Actually, I guess I shouldn't be that surprised, because there <i>is</i> a precedent. When I was at E&Y we had a similar bathroom wall booger-sticking incident. You'd go to take a whiz, and there before you would be someone's booger stuck to the wall, as if that's what it's there for. One of the more outraged guys on the team decided to take action and put up a post-it note sign saying essentially, "please Mr. Crazy Booger-sticker, don't stick your boogers to the wall. You are frightening those of us who are nearly civilized." As a response, the booger-sticker, with a well-developed sense of irony, stuck a booger to the sign. We are surely doomed.</p> Deploying and configuring <b><i>gem</i>cast</b> http://www.samoht.com/weblog/gemcast.rb/Programming/Projects/Gemcast/gemcast_instructions.html <p>Deploying <b><i>gem</i>cast</b> is pretty simple, really. It requires only that you have Ruby installed and a web server that can run CGI programs.</p> <ul> <li>Create a directory for the <b><i>gem</i>cast</b> CGI application and copy the *.rb files there. <li>Ensure that gemcast.rb has the proper execute privileges. <li>Configure your web server with a "script mapping" to the directory under which you've put the <b><i>gem</i>cast</b> script files. <li>Create a data directory somewhere where <b><i>gem</i>cast</b> will be able to see it. <i>It's probably easiest to just copy the data directory included with the <b><i>gem</i>cast</b> distro to wherever you want.</i> The data directory should have, at the least, a <i>templates</i> and a <i>css</i> directory, each with their appropriate content (read further). <li>Configure <b><i>gem</i>cast</b> with settings appropriate to your environment. This is done in the config.rb file. The file is fairly well-commented, so you shouldn't have much trouble there. <li>Configure your templates. There are currently three templates: <i>body</i>, <i>entry</i>, and <i>box</i>. Each relates to an element of your website's layout. <i>Body</i> represents the overall layout of your site's page(s). <i>Entry</i> and <i>box</i> represent the layout of individual weblog entries and sidebar boxes. Variables placed in the templates are replaced by gemcast when a given page is rendered. <p>The following variables are available in your body template:</p> <ul> <li><b>#{log_entry_content}</b> (this is log content after the entry content is generated and the entry template is applied) <li><b>#{category_content}</b> <li><b>#{sidebar_content}</b> (this is sidebar content after the sidebar content is generated and the sidebar template is applied) <li><b>#{breadcrumb_content}</b> <li><b>#{weblog_title}</b> <li><b>#{current_day}</b> <li><b>#{current_mon}</b> <li><b>#{current_yr}</b> </ul> <p>The following variables are available in your log entry template:</p> <ul> <li><b>#{entry_title}</b> <li><b>#{entry_text}</b> <li><b>#{entry_date}</b> </ul> <p>The following variables are available in your sidebar box template:</p> <ul> <li><b>#{entry_title}</b> <li><b>#{entry_text}</b> <li><b>#{entry_date}</b> </ul> </ul> Note to Self http://www.samoht.com/weblog/gemcast.rb/Music/artists.html <p>After quickly scanning thru a bud's MP3 collection, I find I need to look deeper into these artists: Can (specifically the album <i>Ege Bamyasi</i>, North Atlantic, Polvo (Sonic Youth-like?), Fugazi (I guess it's about time, eh?), Giant Sand, Howe, Spoon (made me think of Squeeze and Split Enz), Arab Strap, Slint (another one reminiscent of SY), and Loose Fur. He also turned me on to <a href="http://www.allmusic.com">AMG - All Music Guide</a>.</p> Travel Hacking http://www.samoht.com/weblog/gemcast.rb/Programming/Projects/Gemcast/newstuff.html <p>I decided to put my off hours to "good" work tonight by hacking a bit on <b><i>gem</i>cast</b>. I added recursive log entry collection, which means that a given weblog category displays all of its entries and all those of its subcategories. I haven't yet put in a "max entries" feature, so my top weblog page may end up a bit long for the time being. Also, I intend to make the category text for each entry into a link so that you can jump to that category.</p> A Couple of Articles on Scripting in the Business World http://www.samoht.com/weblog/gemcast.rb/Programming/scripting.html <p>Scripting is sometimes predicted to be the future of software development. After just a little time spent developing the weblog engine for this site, I can almost agree. Here are a couple of interesting articles on the topic: <ul> <li><a href="http://www.infoworld.com/article/03/02/06/06stratdev_1.html">InfoWorld: Shipping the Prototype</a> <li><a href="http://www.infoworld.com/article/03/02/13/07stratdev_1.html">InfoWorld: Refactoring the Business</a> </ul></p>