It’s the Variable Noob!

Posted on December 25, 2007

I’ve seen a lot of crazy code in the past few years but this one takes the cake. The project I was working several years ago was developed while the developers at my company switched to Java. I’m not sure if that excuses the following or not but it’s at least an attempt.

return (test == true) ? ((test != false) ? true : false) : ((test == false) ? false : true);

Just for the record this whole line equates to:

return test;

Hopefully the compiler is good enough to figure that out but even so it’s a lot of ridiculous confusing code to accomplish something pretty basic and fundamental to any language. The sad part is this line of code wasn’t just found in one place, I found it literally everywhere a boolean value was returned.

I wonder what I’ll find in a few years when I look back at code I wrote?

Never hire a colorblind electrician

Posted on March 14, 2007

What’s your fortune? apparently I’m supposed to ignore mine whatever that’s supposed to mean. We went to yangzee (or Wild Bar and Grill) for lunch today. As is typical we got fortune cookies afterwards. Mine read “Ignore Previous Cookie“. Strangest. Fortune Cookie. Ever.

Mr Coffee E-mailThis morning the coffee machine overflowed. I didn’t think much about it until I got the E-mail from Mr Coffee. Take a read. I didn’t know Mr Coffee ran java.

Read an interesting article about Windows Vista’s ReadyBoost. Pretty interesting. Also now that Windows Vista includes the ability to use Flash memory as a Cache there is talk about including built in Flash memory with new computers.

if you’re interested to see what is truth and what is fiction in 300 check out this article.

© Copyright Randy and Rachel’s Weblog • Powered by Wordpress • Using Detour theme created by Brian Gardner modified by Randy Aldrich