March 2006 Archives
It's not often I go off on tech related rants on this blog. I mean, I haven't even posted my MySpace rant. I really should, though. I abhor what are commonly called 'social netowrking" sites. But that's not what I'm ranting about. I'm ranting about relational theory.
Those of you who are not tech savvy or could care less about thoery, please click here. Moving on...
Let's say you have a sales database. WIthin one of the tables, there are columns for the month and year a sale was made. Since month and year are both reserved keywords, you have named these columns post_month and post_year. Now, what datatype would you assign these columns?
I, for example, would have given tinyint (which covers values from 0 to 255) to post_month and smallint (which covers values from -32,768 to 32, 767) to post_year. Plenty of wiggle room on both, I'd say (though if you're still using the same database in the year 32, 767 you need to teach me your database design skills). int requires 4 bytes of space. Not a lot, really, but sales databases can get quite large so the more space we save, the better. There is also reporting to consider and adding indexes on date columns is a common practice. Smaller datatypes means smaller indexes. Now, let's say you're being forced to use SQL Server which, for some reason, doesn't support tinyint. No biggie. Both columns can be smallint which means they require a combined total of 4 bytes per row.
Those observant few will notice I am keeping track of these two colums as integers. There is no August-and-a-half nor is there one-third-1981. So, intgers are perfect. Right? Why, then, did I spend the better part of an hour today trying to figure out why a query similar to this:
select invoice, concat("-", post_month, post_year) as order_date, sum(gross_dollars) as total from sales group by invoice, post_year, post_month order by post_year, post_month
return me this result set in this order:
| invoice | order_date | total | |
|---|---|---|---|
| 0001 | 1-2002 | 123.45 | |
| 0345 | 10-2002 | 18.34 | |
| 0127 | 4-2002 | 478.48 |
I'll tell you why. Some assrag thought, for whatever ungodly reason, that a datatype of varchar(50) was fucking appropriate and, as we all know, when sorting in ascending order ASCII 11 comes before 4. Ultimately, thank God for SQL's cast function.
varchar(50)? What an ass...
...that you don't have anything to say?
These last few weeks have been so busy I haven't had a lot of time to myself. That time I have had has been spent writing an article for the online magazine Lost. Don't get me wrong, I'm ecstatic that as of April 3rd, 2006 I will be a published writer, but I'm definitely looking forward to having some time to just decompress. Words are hard.
Soon I'll get back to continuing on another artistic endeavor. Temporarily called "The Inebraitor: Origins," it's a comic about a guy who loves drinking, an activity whose very existence, at least in his universe, is threatened. They say write what you know, yeah? Well, I knows me some drinkin'!
I've also begun work on my Warhammer 40,000 Dark Angels army, 5th Company, tactical squads number 2 and some as-yet-undecided number. I still need an HQ unit, some heavy support, and maybe a couple of these guys before I can really start gaming. Anyone feeling saucy and in a gift-giving mood, feel free to buy me one of those. Assembling and painting tiny statues about 55mm high takes time and painting them is difficult, but entertaining and, in a way, relaxing. Still, it's creatively taxing.
Beside that, I'm still reading Dune, On Intelligence, The Diamond Age, On War, and a couple books on relational theory. I feel like I'm spreading myself too thin. I mean, Christ, it's past midnight and I'm up writing about how I have nothing to write about. Funny how that happens, he said smirkingly.
Is smirkingly an adverb, Marcia? If it's not, how do I petition for it to become one?
In the end, I feel like I have less and less to say here. This is, after all, my tiny, digital soapbox (gosh I love commas). I dislike letting it go without updates for long, but even more than that I dislike updating with nothing but fluff. "This is what I've been up to" kind of updates. In the end, I guess that's not as bad as I think. It's all something I have to say, really.
Esme: I like the peanut butter ones.Me: What!? Samoas are the best! It's like God came down from heaven and said, 'Hey. Listen, you messed things up with Jesus so I'm gonna give you Samoas and we'll see how that goes.'
This is a link to a fucking amazing mix. Download it now.
Listen. Love. Share.
Who gets ready to party at 1:10AM Sunday morning?
I do, motherfucker. I do.
I find this site somewhat amusing, if a little angry. It's annotated, but, still, I'd have to do my own research before I really agreed with all the "9 out of 10" and "10 out of 10" lists listed. Either way, fun to read in a teenage-angsty kind of way.
To Whom It May Concern,
I've been meaning to write for a while now, but I couldn't find the words. It seems a few of you are a bit scared by my friend Justin and his sense of humor. It bothered you enough to send him a cease and desist letter. It's currently under debate as to whether he really has the right to "fair use" or not, but, not being a lawyer, that's not really what I wanted to talk about. I wanted to say thanks.
You see, the other day I thought to myself, 'I get kidney stones, but what are kidney stones made of?' I thought that knowing the chemical composition of the stones would help me decide if I needed to change my diet somehow or if my body just naturally produced the chemicals in excess. So I broke out my 2000 year old science book. I was a little worried that there were only 4 elements listed much less chemical compounds, but I trusted that in the 2000 years since the book was written, no significant ideas had been formulated nor was anything discovered. I came to the conclusions, then, that the stones were comprised of earth and water and a little bit of fire (since there is often a stabbing pain that feels somewhat like fire when a stone enters your bladder). I was a little concerned because I don't remember eating any earth and I certainly have never eaten fire, but I drink water regularly.
At that point I became very concerned. My 2000 year old science reference had no definite answers for me! There's no way I could eat fire. What was the answer? What was giving me kidney stones? Would no one have an answer for me? I did what most people would do in situations like these. I checked my only trusted book on therapy: the Bible. Having attended Catholic school for the first 13 years of my education I have a New International Version Bible in my home. Similar to the science text I had just consulted, I was sure that throughout the 2000 years of history since the BIble was written in its original, now dead, language, that no one would have mistranslated it on purpose. If it had been translated and some error injected into the text, I'm sure it wasn't because royalty didn't like the way the BIble addressed, for example, divorce. So, I read for several hours trying to find an answer as to why I get kidneys stones.
In all the studying I did, I came to the conclusion that God gives me kidney stones because I have done something wrong. This greatly relieved me because in the 2000 years since He wrote the Bible (by way of the infallible Holy Spirit inspiring the human authors), I was concerned that God wasn't around any more. I mean, He hardly shows up as often nowadays as he did back in the times when the BIble was first penned.
So, I just wanted to say thanks. Thanks for bringing to light Justin's ridiculous and wholly inappropriate image. I wouldn't want people being foolishly misled to believe something that just isn't true.
-Matt
So, because n8 is tired of seeing Mr. Hugs (see previous entry) I have decided to do a kind of reverse blog entry. It goes like this: I give you a topic and you write a short reply, leaving it as a comment attached to this entry. Let's see how creative you can get.
The topic this time is sex. What follows is a lengthy list of names. Your job, intrepid reader, is to come up with what sex-related thing the name is for. An example, perhaps. Castellan Domingo and His Donkey: doing a member of Spanish royalty from behind.
It's that easy! Feel free to post as many times as you want, reuse names, and be creative. And now, the list:
Riding the Pipeline, The Colonel Sanders, Two Around the Campfire, Where's My Keyring?, Roger and Hammerstein's Golden Toity, Bastille Day, The Toasty Marshmallow, Great Caesar's Ghost, The Pundit, Shrinkwrapping, Counting the Satellites, The Wicked Pistol, Sundays in June, The Petulant Marmot, Retiring to Tierra del Fuego, Mining for Apples, It's Half-Past Three, The Jolly Rhonda, Poodling, The Smokey Barstool, The Angry Parrot, White After Labor Day, Remembering the Alamo, The Hipster, Parading for Sarah, Double Dolphin, Contain the Rage, Up What?, Training the Circus, Visitation Rights, The Time I Found a Quarter, Needling the Yarn, Gramma's Basket, Ein Hackbraten
Let's see what you've got.
