Posts

Possible Loss of Fraction in C#

I had written some code in C# to try to account for possible fractions that looked something like this: double columnCountDividedBy2 = numberOfColumns / 2; In the above example, numberOfColumns is declared as an int. I thought that, because I was assigning the result to a double, I would get a fractional number if numberOfColumns divided by 2 was not a whole number. However, what was happening was that the fraction was being dropped. ReSharper was also giving me a warning message, "possible loss of fraction". The reason why (which I have to smack myself now for not realizing) was that, even though I was assigning the result to a double, I was still dividing two integers . Adding a decimal point and zero to the second number of my equation, as shown below, solved the problem: double columnCountDividedBy2 = numberOfColumns / 2.0;

A Star Beyond Time (Ilia's Theme)

Image
Even though I'd been on a bit of a Star Trek kick lately, I happened across this by chance -- a friend shared it with another friend on Facebook, and it showed up in the "Most Recent" section of the main page. When I first saw the post I thought it was a video with the theatrical track, which is a nice instrumental, but that's not what this is. I guess this was the single version (yes, they released a single version). Oh dear. I'm glad I decided to click "Play" before assuming it was the theatrical version and commenting with "I love this track". Oh, the humanity. And did they really need to include the phrase "Star Trek" in the lyrics? Oh, it hurts, it hurts... Enjoy the pain! Even though I'm posting this here, I have yet to sit through the whole thing (though YouTube resumed where I'd paused the track when I clicked on the link to view it directly on YouTube to get the embed code -- how nice of them. :/)

Happy 80th Birthday William Shatner

Image
I've been on a bit of a Star Trek kick lately, and on my drive in this morning I was considering writing a bit about it here on my blog. And then I learned that today is William Shatner's 80th birthday, so that pretty much convinced me that it had to be done. I'll be writing in more depth a bit later, but for now, here is a video by Maurice LeMarche, a voiceover actor (along with one of his Futurama cast mates), instructing us all on the intricacies of sounding like William Shatner. Enjoy!

Found On The Web: Hello?

Image

Classic Comic Series: What If?

Image
Lately I've been on an old comic book kick, reading a lot of old issues from the 60s, as well as some from the 70s and 80s. I don't care at all for the current state of comic books, but I love the old stuff. Recently I read the 2nd issue of Marvel's What If? series. This series would take an alternate history approach by proposing what would happen if certain key moments in the Marvel Universe had occurred differently, or if a character had been different in some way. They brought the series back a few times, but it's the original issues from the late 70s to mid 80s that I enjoy the most. What strikes me as I read these old issues is how much attention was given to accurately portraying the original histories of the characters. For example, in the issue pictured above, elements from the first Hulk comic are incorporated. It's not that they modified the Hulk's origin in general terms: they actually used specific dialog and characters from his first issue. Having...

Music Review: The Transformed Man by William Shatner

Image
I have long been a fan of that which is unintentionally funny, but before I go any further, let me state, with absolute seriousness, that there is more to this album than that. I'd heard the stories. The reputation of this album, and in-particular, Mr. Shatner's renditions of Mister Tambourine Man and Lucy In The Sky With Diamonds , proceeded itself. My first real exposure to it was when I was about 20 and found a copy of it on CD, paired with a slightly-truncated copy of Leonard Nimoy's Two Sides of Leonard Nimoy on the same disc, at my local indie music store. I was ecstatic and bought it immediately. Turns out, unbeknownst to me at the time, it was a bootleg -- mastered off of vinyl records no less! But despite the not-so-great quality, it delivered. Now, around the time I first picked this up, I was attending night classes downtown to become a computer programmer. I'd carpool down there three nights a week with my friend Ed, one of my oldest and best friends, and ...

Old Comic Books

There's something to be said for the simple things in life. As life becomes more hectic and complicated, I find myself looking for those simple things to find solace and relaxation in. When I need to wind down, I like to have something simple to find some enjoyment in. The taoist book "Tao Te Ching" mentions teachers who "teach without teaching", and during my early twenties, I had two friends, Ed and Rob, who did just that. From them, I learned an appreciation for the simple things in life, not through anything they said or told me, but through their example. I soon learned to appreciate the simple things myself, and from time to time (when I have time), I put this to practice to take a break from all the commotion in life. One of those simple pleasures for me is old comic books, specifically those from the '60s through the mid '80s. I'd probably enjoy comics that are even older, but haven't read any that I know of. This isn't to say that c...