Wednesday, June 11, 2008

WITH ReportFolder (ReportName, Usefulness)
AS
(
SELECT R.ReportName
FROM Reports R
WHERE Usefulness = 10
UNION ALL
SELECT R.ReportName
FROM Reports R
INNER JOIN ClientsPerception CP
ON R.Usefulness >= CP.Usefulness
)
SELECT *
FROM ReportFolder

*** 0 Rows Returned ***

Tuesday, June 10, 2008

Hey Buddy, Let's have a code.

Hey buddy. I see you pretty much every day either coming into or leaving the parking garage. You're always driving a different car, but hey to each their own right? I can tell it's you anyway because you always seem to want to race me. We get to the top/bottom of the ramp, I go right, you go left. I can see you speed up to beat me to the end of the ramp. I gotta tell you, I'm impressed. No one can drive 5 mph faster than me like you can. I've also gotta say, I'm tired of racing. It's stressful dodging around all those people and motorcycles. I know being in front of me shaves 30 seconds off of your day, so here's the deal: Let's have a code. When you're behind me and want to go around, just honk your horn 3 times. I'll let you know I got the message by honking twice. Now, when I go left and you go right, I'll go really slow. That way you can go a normal (read safe) speed and not lose any time in your day. Anyway, I hope you're not too mad at me because I don't want to race anymore. I hope we can still be friends.

Friday, May 23, 2008

Why I'm Going to Fail My Intro to Java Course

The requirement was to sort an array using compound and nested if statements.

What I was supposed to write:
if(names[0].compareTo(names[1])<0){
    if (!(names[0].compareTo(names[2])<0)){
       temp
=names[0];
       names[
0]=names[2];
       names[
2]=temp;

       temp
=names[2];
       names[
2]=names[1];
       names[
1]=temp;
    }
    else if (!(names[1].compareTo(names[2])<0)){

       temp
=names[1];
       names[
1]=names[2];
       names[
2]=temp;
       }
    }
    else {
       if(names[1].compareTo(names[2])<0){
             temp
=names[0];
             names[
0]=names[1];
             names[
1]=temp;
          if (!(names[1].compareTo(names[2])<0)){
             temp
=names[1];
             names[
1]=names[2];
             names[
2]=temp;
       }
    }
    else {
       temp
=names[0];
       names[
0]=names[2];
       names[
2]=temp;
    }
}

What I actually wrote:
if(true==false){
    System.out.println(
"Compound if statement requirement");
}
else if (true==true){
    if (true==true){
       Arrays.sort(names);
//nested if statement requirement
    }
}

Thursday, May 1, 2008

Guide to Excel

Job Security

/* Job Security */
int main (){
    if(employmentStatusOfDeveloper()=="Active")
       launchApplication();/*Thanks for keeping me around*/
    else       displayPictureOfCatWithFunnyCaption();/*Sorry Guys*/
}