Digital Paint Discussion Board

Digital Paint Community => Other Stuff => Topic started by: jitspoe on June 09, 2007, 04:40:58 AM

Title: Here's a game for you: Guess how many lines of code/script...
Post by: jitspoe on June 09, 2007, 04:40:58 AM
... went into the global login system.

This includes C/C++, PHP, MySQL, and menu scripts.  It also includes some of the server list, ban list, and cheat detection since it's all interelated.  It does not include external libraries I compiled (such as gcrypt).  Just code that I personally wrote.

Closest guess gets a low player ID number on the new database.  Only 1 guess per person.
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: ViciouZ on June 09, 2007, 06:52:39 AM
4928
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: T3RR0R15T on June 09, 2007, 07:54:31 AM
23585
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: KnacK on June 09, 2007, 08:09:01 AM
65536

( I still want 666 as my player id )
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: bitmate on June 09, 2007, 09:05:53 AM
50000

(Still wanting ID #8)
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: Cobo on June 09, 2007, 09:39:57 AM
1500

EDIT: When will the game end?
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: Zorchenhimer on June 09, 2007, 10:53:49 AM
100,000
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: lekky on June 09, 2007, 11:00:14 AM
49,000
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: b00nlander on June 09, 2007, 11:50:54 AM
6,768

nice idea :) 
you should do some more games like that, hehe

and I agree with cobo that you should announce a final date :)
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: Olbaid on June 09, 2007, 11:55:38 AM
7777

I want #7!!!!
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: y00tz on June 09, 2007, 12:13:53 PM
Considering the average Microsoft programmer does 14k in a year, I'm betting in the GLS you have... 34002 in it.

*crosses fingers for #42*
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: Nitroboy on June 09, 2007, 12:20:45 PM
34,001, lol.


Idk what number I want, but under 100
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: Smokey on June 09, 2007, 01:01:54 PM
15,050
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: MosheD on June 09, 2007, 01:26:20 PM
8000
Title: _
Post by: P!nk on June 09, 2007, 01:29:00 PM
Post removed
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: Matze on June 09, 2007, 01:59:51 PM
44.444
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: IronFist on June 09, 2007, 02:14:27 PM
4999
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: Spook on June 09, 2007, 02:17:58 PM
70000
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: Y2J on June 09, 2007, 02:52:49 PM
93,428
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: Razr on June 09, 2007, 02:58:16 PM
130,385
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: magalhaes on June 09, 2007, 02:59:40 PM
7
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: Eiii on June 09, 2007, 03:10:28 PM
8500
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: XtremeBain on June 09, 2007, 04:29:55 PM
6332

Remember to omit my GBL code from the count ;)
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: nightryder on June 09, 2007, 07:03:29 PM
7341
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: y00tz on June 09, 2007, 07:27:09 PM
Closest guess gets a low player ID number on the new database.

He's clever, notice how he said 'low'.. it's not relative to anything.  5,000 could be low to him... :P
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: bitmate on June 09, 2007, 07:31:09 PM
Considering the live database will start at around #3000, low will mean something like 0<x<3000. ;)
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: KnacK on June 09, 2007, 11:48:41 PM
"Come one down!! You're the next contestant on " Guess the number of lines of code!!""

/me plays the theme song to "The Price is Right" in the background.
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: MaDMaN on June 10, 2007, 04:11:40 AM
19342
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: loial21 on June 10, 2007, 09:41:02 AM
666
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: Playah on June 10, 2007, 09:50:48 AM
6500
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: Termin8oR on June 10, 2007, 03:30:37 PM
2,500

Low cause they are interrelated.
Title: _
Post by: P!nk on June 10, 2007, 04:31:54 PM
Post removed
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: Fyre on June 10, 2007, 06:39:37 PM
3456
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: Zorchenhimer on June 10, 2007, 09:27:41 PM
So, when does this end?

This is the thread that never ends
It keeps going on and on my friend
Some people started posting
Not knowing what it was
...

:D
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: Eiii on June 10, 2007, 09:42:09 PM
Jits tends to lock neverending threads. :<




Jerk. No one uses the RSS feed anyway!
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: TinMan on June 10, 2007, 09:54:07 PM
666
LAWL
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: T3RR0R15T on June 11, 2007, 06:44:11 AM
Jerk. No one uses the RSS feed anyway!
I use it :P
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: magalhaes on June 11, 2007, 08:49:32 AM
To win we have to guess the exact number?
smart way to dont give low id numbers to anyone;)
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: Edgecrusher on June 11, 2007, 08:50:20 AM
2

First one and the others.
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: S8NSSON on June 11, 2007, 10:09:02 AM
I guess a lot depends on how you structure your programming, and if you are including comments in your calculation.

You can structure simple if statements to be different line lengths:

1) one line
 if(argument)do this;

2) four lines
if(argument)
 {
 do this;
 }

There are several other variations as well.

It's hard to omit comment count from a line count unless you have some way to remove comments.

intermixed sounds like a lot of checks and balances.
I'll throw it up there kind of high.

235,467
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: blaa on June 11, 2007, 10:16:22 AM
17
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: jitspoe on June 11, 2007, 08:14:03 PM
Game ends some time after I've finished coding the GLS, lol.  I'll probably let it run for a week or two.  As for my coding style, it's very compressed in PHP:
Code: [Select]
code;
code;
if (1 line) {
code;
}
code;
if (more) {
code;
code;
}
code;

C is a bit more padded:
Code: [Select]
code;
code;

if (1 line)
code;

code;

if (more)
{
code;
code;
}

code;

I don't really use comments that much, and they're often tagged onto the end of a line of code, not on their own.  I will just be counting linefeeds, so whatever that count ends up being is what guesses will be compared against.  And just to clarify, the prize is a sub-3000 ID number.
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: WarWulf on June 12, 2007, 11:12:51 AM
127,420
Title: _
Post by: P!nk on June 12, 2007, 11:45:36 AM
Post removed
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: ashkenaz on June 12, 2007, 01:19:51 PM
500894 lines or limes  ;D either way


#999
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: Apocalypse on June 13, 2007, 06:23:46 PM
654321
I want #12
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: jitspoe on June 14, 2007, 04:00:06 PM
Oh, one last question. Are you going to just randomly clear the login database thing? Or will you give us a bit of warning? Then we have a chance of getting #3000 :D
I'll just stealthfully switch over to the live database.  I don't want to set a specific time or anything, or everybody will be pounding the login server at once and it'll probably get shut down for email spamming. :P
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: Cobo on June 14, 2007, 04:48:44 PM
Server shutdown for email spamming? Yeah right, like that could happen.

:P
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: Apocalypse on June 14, 2007, 08:17:49 PM
Server shutdown for email spamming? Yeah right, like that could happen.

:P
Yeah it could if all 5000 something registered, registered again in one day.
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: Cobo on June 14, 2007, 08:19:29 PM
</sarcasm>
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: Apocalypse on June 14, 2007, 08:20:17 PM
I know that would be funny though.
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: jitspoe on June 15, 2007, 03:08:07 PM
I know that would be funny though.
Not really.
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: Apocalypse on June 15, 2007, 06:27:27 PM
Well of course not if it happened to you but just seeing all the people fighting for numbers and then email being messed up because of it lol :P
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: Cobo on June 15, 2007, 07:12:39 PM
Well, it would be a little ironic if the people had to wait like 3 months just because they were too anxious to register :P
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: DaRkNeSS on June 16, 2007, 06:34:33 PM
130,000
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: webhead on June 19, 2007, 11:17:12 PM
550
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: Krizdo4 on June 20, 2007, 10:46:22 PM
3457
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: TinMan on June 20, 2007, 10:49:01 PM
It's good to not use many comments. If you can't comeback later and understand what you were doing then you did a bad job at it.
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: Cobo on June 20, 2007, 10:51:02 PM
Actually, it's good to use comments all the time.
Title: _
Post by: P!nk on June 20, 2007, 10:58:17 PM
Post removed
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: Cobo on June 20, 2007, 11:10:33 PM
Haha! XD
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: atmays on June 20, 2007, 11:20:00 PM
500000
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: lekky on June 21, 2007, 09:36:56 AM
Actually, its good to use self-describing code, ie method names, variables etc. If you can read through your code and understand it without comments it means you have successfully added functionality in a non-complex manner. Comments are useful for those times when a complex implementation is necessary.
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: Ace on June 21, 2007, 10:42:28 AM
1 :P
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: T3RR0R15T on June 28, 2007, 12:34:49 PM
And the winner is...
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: DaRkNeSS on June 28, 2007, 01:53:33 PM
Who won?
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: Ace on June 28, 2007, 03:29:27 PM
come on tell us.....im dyin here
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: SmPeR on June 28, 2007, 05:29:30 PM
im gonna have to say: 1 long continuous line.
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: jitspoe on June 28, 2007, 08:04:52 PM
Ace already guessed that.

Hm, anybody know some good tools for counting lines? :)
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: Spook on June 28, 2007, 08:11:50 PM
the human brain
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: Smokey on June 28, 2007, 09:02:42 PM
Ace already guessed that.

Hm, anybody know some good tools for counting lines? :)
Hmm, Make a PHP script that parses files and explodes each file by \n
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: Cobo on June 28, 2007, 09:26:07 PM
Notepad++/VS + a calculator.
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: Eiii on June 28, 2007, 09:29:58 PM
Shouldn't your IDE do that? :P
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: jitspoe on June 28, 2007, 09:50:58 PM
It can... for some of it.  I have other things on linux, on the server, etc.  I was just hoping for a lazy man's approach.  Can vim count lines?
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: play3r1 on June 28, 2007, 10:41:36 PM
Eiii, the string was a grenade pin.

He's another I made up:

Two ghost are talking:

Ghost 1: "How did you die"?

Ghost 2: "I was going bunjee jumping by myself; but I'm the type of guy that is very cautious and can point out any mistakes. So, I set up the bungee rope and checked it for any flaws, and had a back-cable in case it didn't work. So I went over everything and tested it with a sand bad; it worked fine. So, last step, I put it around my neck and jumped!"
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: Cobo on June 28, 2007, 10:43:07 PM
Huh?
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: Krizdo4 on June 28, 2007, 11:11:17 PM
How about a nice helpful shell script?

Quote
#! /bin/sh
# for each $1
# diff $1 $1.old |grep -c '> '
# next
# echo result
                                                                                                                                               echo 3457                                                                                 
#// End of file

man grep:
  -c, --count               only print a count of matching lines per FILE

If you want a count of all the lines of a file you can:
cat filename |grep -c ''
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: Ace on June 28, 2007, 11:12:06 PM
play3r1 what the hell r u talkin about
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: KiLo on June 28, 2007, 11:35:00 PM
Again I swear play3r1 you had something like this in another thread.
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: Zorchenhimer on June 28, 2007, 11:40:38 PM
Notepad++/VS + a calculator.

Just open it up in Notepad++, go to the bottom, read the last line number, then add that to the other files' (there is more than one, right?) length.
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: webhead on June 29, 2007, 01:00:40 AM
ah, n++ ... good stuff it is.
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: Cobo on June 29, 2007, 01:25:29 AM
Visual studio counts the lines too.
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: bitmate on June 29, 2007, 06:57:52 AM
... and the winner is ....
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: SmPeR on June 29, 2007, 07:00:11 AM
the winner is me cuz i said so..:) :P
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: jitspoe on June 29, 2007, 01:24:58 PM
Ok, I'll start off with a vote tally:
ViciouZ - 4928
T3RR0R15T - 23585
KnacK - 65536
bitmate - 50000
Cobo - 1500
Zorchenhimer - 100,000
lekky - 49,000
b00nlander - 6,768
Olbaid - 7777
y00tz - 34002
Nitroboy - 34,001
Smokey - 15,050
MosheD - 8000
P!nk - 2,100
Matze - 44.444
IronFist - 4999
Spook - 70000
Y2J - 93,428
Razr - 130,385
magalhaes - 7
Eiii - 8500
XtremeBain - 6332
nightryder - 7341
MaDMaN - 19342
loial21 - 666
Playah - 6500
Termin8oR - 2,500
Fyre - 3456
TinMan - 666
Edgecrusher_CRO - 2
S8NSSON - 235,467
blaa - 17
UNiBoNGeR - 127,420
ashkenaz - 500894
Apocalypse - 654321
DaRkNeSS - 130,000
webhead - 550
Krizdo4 - 3457
atmays - 500000
Ace - 1
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: Apocalypse on June 30, 2007, 01:04:57 PM
Just tell us who won!
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: KiLo on June 30, 2007, 02:26:19 PM
He doesn't know he's trying to count the lines now.
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: Apocalypse on June 30, 2007, 02:43:43 PM
Oh I see.
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: bitmate on July 01, 2007, 01:15:15 PM
Counting them one by one... LOL.
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: Apocalypse on July 01, 2007, 07:53:27 PM
Wow that will only take ooohh let me see..... a week! :P
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: jitspoe on July 02, 2007, 02:33:06 PM
All right, here's what's on the server side of things (mostly php, but some C for the UDP master and login server, couple hundred lines of SQL to generate the tables as well):
4426 lines
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: bitmate on July 02, 2007, 02:40:50 PM
ViciouZ won, I think.
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: T3RR0R15T on July 02, 2007, 02:44:01 PM
4426 lines on the server side only
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: ViciouZ on July 02, 2007, 03:05:28 PM
darnit, that was close... I've lost. (probably)
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: Apocalypse on July 02, 2007, 03:08:32 PM
Looks like I lost unless their is 649845 more.
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: Playah on July 07, 2007, 10:58:31 AM
jits we're waiting....
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: b00nlander on July 07, 2007, 12:24:14 PM
and I'm not gonna pay for a low ID when I know I still could win this :D :D
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: jitspoe on July 10, 2007, 12:26:26 AM
Here's what's in the client (Mostly C code, a few lines of menu script):

4120
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: ViciouZ on July 10, 2007, 02:31:44 AM
Congratulations to Eiii
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: Eiii on July 10, 2007, 02:51:55 AM
Is there any more code? I was expecting a final count when it was done, so don't congratulate me just yet. :P
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: jitspoe on July 10, 2007, 04:18:10 PM
There's still the game code.
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: Apocalypse on July 10, 2007, 05:34:09 PM
Please be 645775 more.....
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: y00tz on July 10, 2007, 05:43:53 PM
Please be 645775 more.....

Haha :P

Someone correct me if I'm wrong, but there will have to be 3500 lines or more left for the next peron (15000) to win.  Odds are still pretty good for Eiii.
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: jitspoe on July 11, 2007, 07:03:34 PM
All right, enough teasing.  1495 is what I have for the game code.  I think that's everything now.
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: Eiii on July 11, 2007, 07:46:46 PM
If that is indeed all, then the total is 10041 lines of code. I think I still win, then. >_>
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: jitspoe on July 11, 2007, 08:15:35 PM
If that is indeed all, then the total is 10041 lines of code. I think I still win, then. >_>
Looks like it.  Pick your number.
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: lekky on July 11, 2007, 08:23:37 PM
Eiii, pick 10041 =D
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: jitspoe on July 11, 2007, 08:33:51 PM
Already taken.
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: Eiii on July 11, 2007, 09:21:05 PM
I think I'm missing whatever joke goes with 10041.
I was going to choose 3111, but I like 3 more. 3, please?
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: jitspoe on July 11, 2007, 10:35:56 PM
Congrats, Eiii, you're now the proud owner of ID number 3.  I think 3111 would have fit you better, but whatever you want. :)  See PM for details.
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: Eiii on July 11, 2007, 10:38:58 PM
<3
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: y00tz on July 12, 2007, 01:06:55 AM
Congratulations Eiii. :D
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: Apocalypse on July 12, 2007, 04:38:34 PM
Dang it I was 644280 off lol congrats though eii.
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: ashkenaz on July 17, 2007, 12:26:06 AM
congrats         (lucky %#&*@#)  lol jk
Title: Re: Here's a game for you: Guess how many lines of code/script...
Post by: Corporal Perez on July 17, 2007, 03:50:10 PM
53,691
Title: _
Post by: P!nk on July 17, 2007, 04:01:41 PM
Post removed