Re: A Little Programming Fun... Contest!
- Posted by jeremy (admin) Dec 03, 2010
- 1196 views
I've created a Mercurial repo for contest submissions. Submissions should not be made directly to this repository. They should still be made directly to me. I will submit all submissions to the repo once the deadline has past.
However, in the repo there is a program that some may be interested in. This is the first version ever and it will probably change w/time, but you can use it to know exactly how your program will be scored in regards to lines of code. It's name is token_count.ex and is in the root directory.
You do not need to have Mercurial in order to download this program. It can be accessed directly via:
hg:contest/raw-file/default/token_count.ex
BTW... as a general note, the original statement said that programs would be scored based on non-comment lines of code. This has changed slightly due to fairness. One person could write the entire program on a single line to win the LOC points. This is not fair and should not be encouraged. Thus, instead of scoring on lines of non-comment code we will be scoring on the number of tokens. An example:
integer a = add(1, 1)
Tokens in the above program: 9
- integer
- a
- =
- add
- (
- 1
- ,
- 1
- )
Those tokens could be spread across 5,000 lines and it would still be 9 tokens. Like wise, you could have a 5,000 line program and right before submission put it all on one line. It no longer matters as 1 line or 5,000 lines, it will be the same token count.
Jeremy