Weekly Programming Contest

Greetings my fellow spongineers! Recently Iv’e become quite addicted to code-golfing challenges, so I decided to make my own golfing contest on the Sponge Forums. I also saw another one of these topics on the forums but it was inactive and lacked a good description and guidelines. There is unfortunately no programming section of the Sponge forums so i’m just gonna keep this in the off topic section for now.

I’ve unfortunately had to suspend updates to the Weekly Programming Contests to due a lack of support, and lack of time on my part. Regardless, I will still be active on the Sponge forums and around the community.

Some Information on the Contest:

  1. All the challenges are CODE GOLF which means that you try and make your program have as few bytes as possible. The winner is the person whose source code solves the problem in the fewest number of characters.
  2. WHITESPACE COUNTS but you can compress your code using tools like this: http://codebeautify.org/javaviewer. Be nice though and also post a readable version of your code as well, so others don’t have to format it in an IDE!
  3. All submissions must be written in JAVA to ensure fairness, but nice solutions in other languages are welcome even though they will not count
  4. Each week I will close the existing challenge, post the winner down below, and open a new one at the same time
  5. Each challenge will be posted a separate thread, with this one acting as a hub, to find the current challenge, view older ones, and post suggestions for the contest
  6. Some of the challenges might have solutions elsewhere on the internet and I can’t prevent you from copying other peoples’ code but it ruins the point of the contest which is to have fun
  7. For ease of communication, I will often use the word import to refer to any direct use, through imports (static or not) or fully qualified class names, outside outside of the current class.

Rules:

  1. The submission with the fewest number of characters wins
  2. You must post the character count with your submission or it will not count
  3. Imports are allowed unless otherwise noted and they do not count towards code length.
  4. If imports are allowed, the use imports within the standard Java API ONLY are permitted unless an external library explicitly stated otherwise to be allowed for that specific challenge.
  5. If imports are not allowed, means the use of any class, in any way shape or form outside of the java.lang, package is prohibited.
  6. Static imports are never allowed
  7. All methods must be static and have a public access modifier
  8. If you win by finding a way to shorten someone else’s code, you will be given the win, and they will receive an honorable mention

Also, watch out because if I can think of a sorter solution than the winner… Well, my submissions count too :stuck_out_tongue:

Leaderboard:

7 @jus1in
3 @eah
2 @dags
2 @Saladoc
1 @CodeCrafter47
1 @kmecpp
1 @simon816

Challenges:

Week 18 2/28/16: Square Roots - Winner: (In Progress)

Week 17 2/21/16: Integer Combinations - Winner: @dags

Week 16 2/14/16: Boolean Satisfiability - Winner: @jus1in

Week 15 2/7/16: Substring Index - Winner: @dags

Week 14 1/31/16: Shortest Substring - Winner: @jus1in

Week 13 1/24/16: Longest Palindrome - Winner: @eah

Week 12 1/17/16: Array Clumps - Winner: @eah

Week 11 1/10/16: String Permutations - Winner: @jus1in

Week 10 1/3/16: Basic Calculator - Winner: @CodeCrafter47

Week 9 12/27/15: Levenshtein Distance - Winner: @eah

Week 8 12/20/15: Array Modes - Winner: @jus1in

Week 7 12/13/15: Longest Sequence - Winner: @jus1in

Week 6 12/06/15: Longest Substring - Winner: @kmecpp

Week 5 11/29/15: Isomorphic Strings - Winner: @Saladoc

Week 4 11/22/15: Binary Strings - Winner: @Saladoc

Week 3 11/15/15: Longest Prefix - Winner: @jus1in

Week 2 11/08/15: Anagram Checker - Winner: @simon816

Week 1 11/05/15: Sorting Arrays - Winner: @jus1in

1 Like

This sounds like an awesome idea! May I suggest two things:

  1. White-space should not count towards character limit, its not particularly a good program if we can’t read it
  2. Perhaps the first challenge could be a (fully functional) program (with a main method and all that) that reads the amount non-white-space characters in a file?

EDIT: Also, when talking about the “bytes” of the Java program, are we speaking in terms of source or compiled?

Thanks for the suggestions! Hopefully I answered your questions in the revised post. I also already had an idea for first challenge, Iv’e posted it here: [Week One] Programming Contest - Sorting Arrays

It would be interesting to see more challenges like the sorting one where there are many possible methods to do the same thing, but in these cases there is no one clear best for fewest characters.

Yeah, sorry about that. I didnt really think the first one through. The challenge ends in a couple days though so ill be sure to have a better one for week two.

The challenge for week two has been posted! Check out the challenge Here. The winner for last weeks challenge was @jus1in!

Congratulations to @simon816 for winning last weeks challenge!

The challenge for week three has been posted Here

Congratulations to @jus1in for once again winning the weekly programming contest!

The challenge for week four can be found Here

Congratulations to @Saladoc for winning week four of the programming contests!

The challenge for week five can be found Here

Congratulations to @Saladoc for winning week five!

The challenge for week six is posted Here

Congratulations to me! (@kmecpp) for winning my own programming contest!

The challenge for week seven is posted Here

@kmecpp No link…

The next challenge has been posted and I’ve updated the reply!

Congratulations to @jus1in for winning week seven!

The next challenge will be posted shortly

Congratulations to @jus1in for winning week eight!

The challenge for week nine is posted Here

The last two weeks were week 7 and 8, not 8 and 9.

Are you sure? The current week is nine, correct?

1 Like

Well so @jus1in already won week nine as well! In two hours! Without posting anything! … Congrats xD
:wink: :wink:

2 Likes

I see now :stuck_out_tongue_winking_eye: I think I fixed everything

1 Like

Congratulations to @eah for winning week nine!

The challenge for week ten is posted Here