News for hackers. Stuff that matters.

Silly code comments you've left to yourself

# MD5 TESTING - Adding time salt to passwords won't work, it isn't reversible!

echo 'MD5(): ' . md5(date('ymdHis', time()) . 'password-is-yummy-salty-safety-' . $pw);

A very silly, what-the-hell-was-I-thinking-when-I-wrote-this note to myself.

( 12 comments | 8 points | on HN )
Re:Silly code comments you've left to yourself by DarrenStuart on Friday December 28, 2007 @06:37AM (#93178)
// [-:) (:-[

I still don't know what I meant but I think I was just doodling.

Re:Silly code comments you've left to yourself by ambiversive on Friday December 28, 2007 @10:27PM (#93399)
Vaguely sexual.. strangely arousing..
Re:Silly code comments you've left to yourself by DarrenStuart on Saturday December 29, 2007 @09:39AM (#93480)
lol, you need to unplug more :p
Re:Silly code comments you've left to yourself by staunch on Friday December 28, 2007 @08:53AM (#93191)
I can't think of any silly comments from my code right now, but I have a new one for you :-)

  # ...your computer really doesn't care if you seperate the password from the nonce with a dash; it's a computer, not a 2nd grade teacher[1]
  echo 'MD5(): ' . md5(date('ymdHis', time()) . 'password-is-yummy-salty-safety-' . $pw);
1. http://www.matasano.com/log/958/enough-with-the-rainbow-tabl...
Re:Silly code comments you've left to yourself by matth on Friday December 28, 2007 @03:52PM (#93309)
My computer also doesn't care if I put a space between each concatenation operator, but I do. :)
Re:Silly code comments you've left to yourself by marcus on Friday December 28, 2007 @11:10AM (#93214)
Actually using time as an additional salt is a very healthy practice, just make sure you store the time you use.

It reduces collisions.

Re:Silly code comments you've left to yourself by sohail on Friday December 28, 2007 @12:56PM (#93242)
You might as well use random salts.
Re:Silly code comments you've left to yourself by daltonlp on Friday December 28, 2007 @04:59PM (#93326)
# Locked and loaded. Data structures assembled. Cry havoc and let slip the dogs of multi-pass rendering.
Re:Silly code comments you've left to yourself by ptn on Saturday December 29, 2007 @12:57AM (#93421)
I can't remember a silly comment right now, but I do remember that, because I couldn't think of anything better, I named one of my variables "charlie" . It wasn't a serious program though and that wasn't an important variable either. Still, I then read it and laughed.
Re:Silly code comments you've left to yourself by edu on Friday December 28, 2007 @06:19PM (#93343)
/ the bomb! /

just before an error-prone piece of code. My colleagues had a laugh when they found it. Since then, now I mark the "dangerous zones" with:

  /*** here be ASTEROIDS ***/
Re:Silly code comments you've left to yourself by brlewis on Friday December 28, 2007 @11:20PM (#93408)
I have a page on ourdoings.com that only I use, for the purpose of crediting users. (I've been given cash a few times, and I credit bug-finders.) Just now I added functionality to impersonate a user. The success message is:

You feel like a new person.

Re:Silly code comments you've left to yourself by kashif on Friday December 28, 2007 @02:35PM (#93291)
My silliest yet...

#TODO: