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

Pages: 1... 456
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
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.

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.
I gotcha. So are you going to post some code, or not?
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
A shorter solution in valid Java code:

 
breakCode();



Oh, it is not complete? So is yours.
Last edited on
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
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