Archive for June, 2006

New Blogging Initiative

As the years have gone on (shit, that makes me feel old), my average number of posts per month have really gone down. Back in the day, OwlManAtt.com would have absolutely hilarious rants posted each day. Content flowed like [soy] milk and honey. It wasn’t very good, but it existed.

But time passed. I slowed in my relentless blogging deathmarch. These days, OwlManAtt.com only sees updates when I release something (usually crap). The only reason I’ve had so much activity as of late is because I’ve been cross-posting my Syndicate press releases.

I’d like to end that, so I am starting up my new blogging initiative. I intend to have at least four posts a week. What they are about does not matter. Who reads them does not matter. The purpose is to get me to write more again. I haven’t been doing it nearly enough as of late (and as such, I’ve been suffering from NaNoWriMo withdrawl). And as Amy Hoy pointed out, this sort of shit breeds ideas.

So for the indefinite future, I’ll fucking find something to write about, just for the sake of thinking and writing about it.

Soo. To begin!

Ruby Quick Reference

While working on a new thumbnailer to replace the Automatic Thumbnail Production Unit MXX-3005.0, I came across a kickass Ruby ‘quick reference’, similar to the InVisible Ruby on Rails Reference that I love oh so much.

Ryan Davis’ Ruby QuickRef.

Log

I feel the need to point out Mister Gormley’s posting of the classic Log commercial from Ren & Stimpy (mirrored locally to save MSB’s bandwidth).

Ah, log…

I’ve finally gotten around to fixing the RIGHT JOIN bug in my SQL paper. I also added a brief note on INSERTs with SELECTs in them. Revisiting a classic…FOR THE SYNDICATE!

Calgary, Alberta (Yasashiisyndicate.org) - Syndicate member Nicholas Evans has updated and re-released his world-reknown ‘Introduction To SQL‘ tutorial under the Yasashii Syndicate’s flag this morning. This paper provides complete beginners a guide to writing queries for relational databases (MySQL is used throughout the paper). It was originally released in Q3 of last year.

MySQL
MySQL is the world’s most popular open-source RDBMS. Maintained by MySQL AB, a Swedish-based company, MySQL is available both under the GNU General Public License, but also offer it under a more flexible license if people are willing to pay. It is used widely throughout the world, with most hosting providers offering MySQL over Oracle or PostgreSQL.

About The Yasashii Syndicate
The Yasashii Syndicate, otherwise known as the Gentle Syndicate, is an organization dedicated to its execution of The Sekrit Plan. The Sekrit Plan’s goals, to outsiders, seem strange and mysterious. To syndicate members, however, The Sekrit Plan makes perfect fucking sense.

For more information about the Yasashii Syndicate, please see yasashiisyndicate.org/about.

Introduction To SQL

REXML, The Ruby XML Parser

Recently, I had a rather frustrating experience with REXML, the XML parser that Ruby >=1.8.4 (and probably older versions, too) ship with. My problem was the extravagently shitty documentation its maintainers provide. This ‘documentation’ is a big tutorial which is unclear on many things.

So, in an effort to help the next hapless programmer who is desperately Googling for some REXML help that isn’t retarded, I will provide you with the following.

# Load REXML
require 'rexml/document'

# Parse our XML
document = REXML::Document.new(some_xml_string)

# Iterate through the root of the document.
# NOTE - I AM NOT USING 'EACH' - SEE BELOW
document.elements[1].each_element do |element|
  # We can access the children of our element
  # with The elements[] array. Same goes for
  # attributes - user attributes[].

  puts element.elements['author']
end

The ‘each’ thing is what got me - each_element loops through and gives you something usable, while each goes through and returns REXML objects with the XML still in them. For example, each would give me ‘ . . . ‘. From there, you cannot use the elements or attributes arrays to get to the children.

« Previous PageNext Page »