What is the secret to becoming the greatest programmer in the whole wide world?

Pages: 1... 456
Dec 3, 2012 at 12:42pm
One does not simply like bananas!

Joke aside, I want to see your contribution, in the form of a "higher level" language's code solving this. I'm pretty sure Haskell or J could do it in a few lines, but if you're talking about Java...
Last edited on Dec 3, 2012 at 12:42pm
Dec 3, 2012 at 4:17pm
closed account (o1vk4iN6)
rapidcoder wrote:
Oh, looks like another contest who writes the longest and uggliest code for solving a trivial problem that can be coded in a few short lines in some higher-level language ;)


Who do you think makes it possible for you to be able to write in a few short lines ? Yo.
Dec 3, 2012 at 8:03pm

I'm pretty sure Haskell or J could do it in a few lines, but if you're talking about Java...


I didn't think about raw Java. I'd expect Java to be similar in verbosity to the STL version. Regarding collections STL finally got to the point of expressivity of Java, but can't beat modern Java i.e. Groovy, Clojure or Scala, or even Java with Guava.
Dec 3, 2012 at 10:33pm
I gotcha. So are you going to post some code, or not?
Dec 4, 2012 at 8:43am
rappidcoder:
Oh, looks like another contest who writes the longest and uggliest code for solving a trivial problem that can be coded in a few short lines in some higher-level language ;)


xerzi:
Who do you think makes it possible for you to be able to write in a few short lines ? Yo.


Here is my high level solution; 2 lines long. It doesn't get much more elegant than this.

1
2
#include <mylowlevelsolution>
int main() {breakCode();}

I'm willing to bet all of my money that nobody can write a shorter solution with Java.

My even higher level solution; 1 line!

./breakCode


Even shorter:
./b

Last edited on Dec 4, 2012 at 8:57am
Dec 4, 2012 at 9:01am
A shorter solution in valid Java code:

 
breakCode();



Oh, it is not complete? So is yours.
Last edited on Dec 4, 2012 at 9:02am
Dec 4, 2012 at 9:09am
Oh, it is not complete? So is yours.

How so?

A shorter solution in valid Java code:

You better obfuscate that so nobody steals it ;)

1
2
3
4
5
public class BreakCode {
    public static void main(string[] args) {
        l10100101();
    }
}

Last edited on Dec 4, 2012 at 9:21am
Dec 4, 2012 at 11:19am
rapidcoder wrote:
Oh, looks like another contest who writes the longest and uggliest code for solving a trivial problem that can be coded in a few short lines in some higher-level language ;)

Deliver!
Topic archived. No new replies allowed.
Pages: 1... 456