Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / question about the 20 line challenge

Author
Message
Sleet
22
Years of Service
User Offline
Joined: 3rd Aug 2003
Location:
Posted: 4th Aug 2003 16:55
I figured I'd post it here insted of the 20 line challenge one cause I'm asking newbie questions and it really has nothing to do with the contest

um, why is it a 20 line challenge insted of a 500 command challenge? The rules state that the code has to be 20 lines or less and only 25 commands per line so that's 500 commands. Is there something special about putting 500 commands on 20 lines as opposed to 500 commands on 500 lines? Does it affect anything at all? Is 25 commands standard for 1 line of code so if I hear someone say "that game is over 4 million lines of code" I'll know that it's over 4,000,000*25 commands?

Don't laugh at me, the voices on the inside are already doing that.
spooky
23
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 4th Aug 2003 20:31
See here for explanation:

http://www.darkbasicpro.com/apollo/view.php?t=8761&b=11

(Look for Rich's comments and all will be clear!)

The programmer formerly known as sonic
the_winch
23
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 4th Aug 2003 22:19
Quote: "Is 25 commands standard for 1 line of code"


You wouldn't write actual code like a 20 line entry. It would be very difficult to edit and debug.
Sleet
22
Years of Service
User Offline
Joined: 3rd Aug 2003
Location:
Posted: 5th Aug 2003 01:36
well then I'm still confused why they would have a 20 line challenge insted of a 500 command challenge. You're going to end up with 500 lines of code with one command each for debugging purposes as you said so I'm still confoozeled. What is so special about 25 commands per line?

spooky
23
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 5th Aug 2003 03:53
Nothing! Rich (the main administrator of this forum) thinks it's cool to have programs in as least lines as possible. Everyone else thinks it is stupid! Originally, the limit was 20 lines, 5 commands a line, and was a better but everyone just made complicated formulas that were hundreds of characters long.

It has been said somewhere that it is easier to develop your program as one command per line (easier to debug, easier to insert commands, e.t.c.), and then post this version as well as a compacted multicommand per line program.

I like to split up the posted programs back to one command per line to learn how they work but it is very time consuming.

The programmer formerly known as sonic
ReD_eYe
23
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 5th Aug 2003 23:41
you obviously haven't heard of the 20 line expander spooky!, ages ago someone made a program that expands out code to make it readable, its very good! if you search you will probably find it

I have a website!!!
So go there: http://www.freewebs.com/darkb/index.htm
on second thought you probably shouldn't

Login to post a reply

Server time is: 2026-07-08 03:47:08
Your offset time is: 2026-07-08 03:47:08