Blogs and Stuff
Intellectual plumbing and 100% toll free.
Floyd Mayweather may be the pound-for-pound best fighter in boxing, but my apartment is likely the bit-for-byte champ when it comes to having the most electronically decorated dwelling space within my complex. With a staggering amount of electricity flowing through the veins that power this little corner of my world, it's no surprise that I have to occasionally make some sacrifices to keep things working. Sometimes it's trying out new things, other times I roll the dice and break something, and more frequently than not, I find myself just purchasing new toys. When it comes to these activities, it's always a game of chance and sometimes like a boxing match between me and my digital opponents in the other room. Sometimes I'm the recipient of that right hook, other times I'm the deliverer.
Four score, and one decade ago I began my quest to develop the next iteration of this website. As many of you know, it's been in development for quite a while. In fact, last year around this time I was just venturing into the development of the blog section of which this fine mangling of words was crafted. It's been quite a journey, but I think it's about ready for initial release. Yes, release! I mean I will be placing this site on 'www' instead of 'ruby'. Consider it my present to all of you who have patiently been awaiting (or persistently asking about) the expected release date for the site. Although there is nothing definite at this point, it is certainly looking promising.
As many of you may already know, I am a Digg.com junkie. In fact, many of the articles and other information I read on the regular basis originate from articles posted on Digg. One of the cool features that Digg has is something known as Digg Spy. When you navigate your browser of choice to that page, it provides a real-time view into activity on Digg.com, such as stories being submitted or 'dugg'.
Well, I thought that was a pretty nifty idea so I spent about 8 hours applying that same idea to the Music section of this website. The music section of this site contains a 'Recent Tracks' menu on the left hand side of the page. Using some RJS and the periodically_call_remote() helper method in RoR, I managed to slap something together that works. Really, it does work, at least in Safari, Firefox, and my favorite...Internet Explorer.
Now, let me explain how this works. Let's say you find yourself somewhere in the Music section of this site. If a song is played while you are on a page, that menu will automatically flash yellow and fade away. It automatically checks every 60 seconds.
I actually stayed up until 6am this morning trying to work out the kinks. For the most part, I had it all working around 2am last night. Between 2-6am, I was in the rubyonrails IRC channel trying to track down a bug with the Effect.Highlight function. You see, the menu would be updated and flash yellow just like I wanted it to, but then I would lose the :hover functionality where the element changes to a white background when hovered over.
Long story short, I ditched the Effect.Highlight function and went with Effect.Appear with some other RJS'ish stuff that gets the same thing done. Alright, that's all the new features I can code up this weekend, if there are any bugs, please lemme know.
Although the title might imply that this is a blog dedicated to Mazda's 'Zoom zoom' campaign, I'm sorry to inform you, it is nowhere close. In fact, the only campaign this geek has been heading up is the 'why can't all browsers do the same thing' campaign. Heard of it?
I'll tell you what, my new saying for web development is '3 browsers and 12 hours later'. I've been working on this new little feature that emulates the iTunes Music Store's 'New Releases' section. Basically, it displays a few albums and you can click left or right to display more of them. There is this soothingly smooth scroll across the screen that I thought would be nothing more than some fiddling with the Prototype javascript library. Riiggght...easier said than done!
I've been writing Rails test code for what feels like the last century. Unit tests, functional tests, integration tests...ick! I finally managed to get it up to about 1.3 lines of test code to every line of production code. Now that I've hit that point, I figured a change in coding behavior was necessary.
For quite some time, I've been using my own AppleScript code to do a HTTP POST to a certain web service on my site. Yeah, I guess this worked, but it wasn't quite as slick as I would have liked. There were a few plugins available, but nothing to useful. Now Playing is a useful iTunes plugin written by Brandon Fuller and was previously only available for the Windows platform. It provides a number of features, one of which was what I mentioned above, however, until now, it hasn't been available for OSX.
I've had a crazy couple weeks. Two weeks ago was one of my good friend's bachelor party and last week was my sister's wedding. As I opened awakened my laptop from sleep mode on Saturday morning, I browsed to this site and realized that I had been neglecting development for a few weeks, the primary reason for such neglect was the fact that Rails 1.1.x hasn't hit the stable branch on Gentoo. Oh, but wait, did that really matter?
Well, not really. You see, I do all my web development on my laptop. At the press of a few keystrokes, I can replicate all my laptop code to the production website...oh how I love rsync and Textmate. I also use a hunk a burning software called Locomotive, which kindly bundles all the necessary packages (e.g., Ruby, Rails 1.1.x, RedCloth, etc) necessary for my web development into a single self-contained application.
For some of you, this might be a blessing in disguise, but I've been patiently delaying my website development in lieu of the new Rails 1.1.x release. Why a blessing? Well, considering I'm constantly seeking feedback on the site when I have my development cape on, it's probably a relaxing break from having to hear me ask, 'What do you think of this?'...'How about that, should I change the color?'....so on an so forth.
Rails 1.1.x is a big release for Ruby on Rails developers. One of my favorite features I'm looking forward to abusing is the integration testing. Integration testing allows you to create tests that span multiple controllers and actions. Prior to this feature, you were not easily able to test multiple controllers and actions.
For the past few years, I've had SDSL 768/768 from my ISP. I could run services (e.g., mail server, jabber server, web server, etc) and have a static IP address. It had worked flawlessly. A few weeks ago, my provider mentioned that they now had an ADSL package (3mb/768k) for less money and with all the same advantages (e.g., static IP address and services allowed).
On the surface, the upload speed didn't change, but the download speed was significantly faster. What could it hurt, let's give it a shot, right? Ehhhh!!! For those of you not familiar with PPPoE, it stands for Point-to-Point Over Ethernet. Previously, my connection was direct in that it didn't require PPPoE nor a username/password to connect. Things changed quickly though.
Courtesy of a massive hardware failure, I embarked on a journey about 6 months ago to move from a Windows infrastructure to a LAMP infrastructure for the ePartment54 website. The language of choice on Linux was obvious at the beginning, PHP of course. PHP wasn't that much different than anything else I had programmed in, but I quickly learned it got ugly real fast.
Sorting through the gobs of code which was my initial stab at a PHP version of the site, I decided to adopt something that was being hyped in the programming community...Ruby on Rails. To my surprise, it was a kind language that preferred a framework that forced you to do the right kind of things instead of allowing you to make a mess of it. It uses an MVC architecture which stands for Model, View, Controller.
Let me start out by drawing your attention to the left. Strange, yet fascinating little image, huh? I always try to include some kind of interesting ey candy with each blog and depending on my mood, some are better than others. Actually, the real reason I do it is to make sure I didn't break any of the upload functionality with the latest update, but shhhh, don't tell anyone! In this case, that cartoon character's facial expressions were almost identical to mine as I struggled to figure out how to make this 'Popular' section work as planned.
When I first constructed the database tables for the blogs, I made an error in the design. I had initially created a column called views thinking that I could use that column to decipher the most popular blogs for the month, year, and of all time. Umm, does anyone think there is something wrong with that logic? Well, duh!

