The Mixcloud Countdown
I might have seen this before today, but the question mark following the number caught my attention this morning:
It’s seemingly a countdown of the number of mixes listened to on Mixcloud. It’s most likely going to one million. I have no idea what’s going to happen when it gets to one million. It’s also a great excuse to write something other than JavaScript.
I ran into this site last September reading an article on one of my favorite blogs. I don’t rave, don’t even dance, am not very stylish, and I don’t have the DJ lingo down. But I hope I’m the millionth listener, and am looking forward to seeing what happens.
Quote of the day
“I didn’t say whiteboy, I said whiteboard!”
[Response to a purposefully misinterpreted subject for a photo.]
Help from my friends and random people on IE8 Dynamic CSS?
To my five fans (to those reading that aren’t part of the fan 5 crew, my 5 fans are also good friends):
I have a bit of a dilemma in some web coding.
Problem: I need to be able to dynamically inject some CSS rules into a web page through JavaScript. (Long story why, I just do.) In all of my target browsers, various methods would work to inject CSS into a web page via JavaScript. IE8 does not like any of these previous methods. The only way I’ve found so far to get this to work in IE8 is the following hacktastic solution:
function hacktasticSolutionToDynamicCSSInjectionInIE8() {
var myCSS = "<style>.redText{color:#ff0000}</style>";
document.getElementsByTagName("body")[0].innerHTML += myCSS;
}
Using the method above to inject a stylesheet into the body tag via innerHTML so makes me want to gouge my eyes out. But it’s the only thing that seems to work in IE8?
Other things I’ve tried that have failed:
- Inject into the head element
- Inject into some other element within the body
- Use W3C element creation and appending methods
Anyone reading this who knows of a better solution than what I’ve done in the hacktastic function above?
Edit: 7/3/2009
Turns out in all my tests, Internet Explorer tends to provide a “free” stylesheet by default. The following code did what I wanted on all IEs, and everywhere else.
if ( document.styleSheets[0] && document.styleSheets[0].cssText ) {
document.styleSheets[0].cssText += cssString;
} else {
var style = document.createElement("style");
style.appendChild(document.createTextNode(cssString));
document.getElementsByTagName("head")[0].appendChild(style);
}
Polishing the Brass on the Titanic
Brent, my friend and one of the very cool people I work with, uses the saying in the subject of this post. He was the first one who said these words and that when said they registered in my mind. This happened a couple of months ago and I’ve been thinking about this ever since. To find a little background on the saying, I decided to do a Google to the rescue… well, not this time. I couldn’t find the origin of this saying, but I did find this great quote:
Fuck Martha Stewart. Martha’s polishing the brass on the Titanic; it’s all going down, man. ~Fight Club movie, screenplay by Jim Uhls, directed by David Fincher, novel by Chuck Palahniuk
I was thinking about this (the saying, not Martha Stewart) tonight on the bus ride home from Santa Cruz and I came to accept that, yup, I’m a guy that polishes the brass on the Titanic. Sure I freak out, I rant, I swear, I cuss, I act like a dirty old man… I have human flaws too numerous to mention.
Despite my flaws, the quality of life despite the overwhelming circumstances of life has started to matter much more to me than it used to.
Say a nuke is coming in from the country run by [Insert new media sensationalized despot here], and is going to explode all over me in a half hour, what am I going to do? I’m going to find my wife and nail her one more time and give her the best 3 to 14 minutes of her life.
Say global climate change really is real and every person on the planet just decides to buy a hummer. Who fucking cares, my ass gets on my bike, and with the help of my legs helps me roll my flabby belly to the office.
What does that mean in real life? It means the little stuff matters to me because the details are all that I have access to. It means somedays I don’t release a product and instead spend more than a day QAing things even though it’s not my job to do so. Somedays I massage my wife after her hard day in the office even when I’m the tired one. Or maybe I call my dad when he’s least expecting me to call and tell him yet another thing that I realized he was right about, and I was wrong about.
Ask yourself, when was the last time you heard someone get divorced over only one big mishap?
The little things matter, at least they do to me.
The Grass is Never Greener
I’ve been keeping these two links in my blog reader and watch the titles rise up as I click through the unread items over the passed week. The juxtaposition calms me.
Terminator Salvation (PC) Recalled
and
450 People Working on Assassin’s Creed 2
An odd pair of articles. At least I’m neither part of recalled software, nor am I lost in (what I consider) the crowd.
new blog name
I’m sure this will screw up search engines, but that’s fine because my five fans subscribe here, and everyone else just stumbles in by accident.
[Drum roll] Renaming of blog complete!
[Cheers! Applause! The sound of 10 hands clapping!]
