PH33R MY IDIOCY

Mar 17, 2005 21:47

This is what a shitty programmer I am: it takes me this much redundant code just to check and see if there are any null spots in an array ( Read more... )

Leave a comment

Comments 6

cthulhu_x March 18 2005, 04:52:40 UTC
Oh God the curly braces!!!!

Curly braces make me die

Reply


Helpful hint gemini6ice March 18 2005, 05:10:48 UTC
You don't have to do ==null

NULL counts as a false boolean, so if student[0] is null:

if(! student[0])
full= FALSE

In fact, I'm not 100% about this upcoming idea, but maybe even:
false = (student[0]) && (student[1])...

Reply

Re: Helpful hint soundpicturebox March 18 2005, 05:11:54 UTC
Holy shit, really?

Teacher might catch me on that one, though, since we're technically not allowed any outside help and haven't learned that.

But shit, that makes things so much easier.

Reply

Re: Helpful hint gemini6ice March 18 2005, 05:18:16 UTC
You're not allowed to google for help on assignments? That's sucky. I have to do that all the time. Heh.

Maybe your teacher doesn't grade the assignments? Many CS classes have hired graders. I get to look at 150 web pages for CS101 in April. And I get paid 600 bucks to do it. Woohoo!

Reply

Re: Helpful hint gemini6ice March 18 2005, 05:26:05 UTC
I just tested my 2nd idea. Totally works.

Reply


. sapphon March 18 2005, 06:47:08 UTC
That is the most ridiculous thing I have ever seen.

-Connor

Reply


Leave a comment

Up