/GoogleCodeJam

My attempts at Code Jam, first commit will be of the tried solutions, following commits will be of corrections to the wrong and incomplete questions and beautifying the code.

Primary LanguageKotlinMIT LicenseMIT

Gabryel's Google Code Jam 2017

What is this mess?

My attempts at the 2007's Google Code Jam.

Why is it a mess?

Sometimes it will be a mess because:

  • It is my first time trying to really use Kotlin to solve a problem;
  • As I am greatly used to Java and it procedural style, it was too my first try to really do something more functionally, and as sometimes when we use tools that we don't completely understand, the result can be sub-optimal;
  • Sometimes I was not on my best state of mind(and awakeness, sincerely) and on the pressure of solving those problems in two and a half hours, sometimes I did some things that I would not be really comfortable to do usually;
  • I have much left to learn. Simple as that.

Why am I doing this?

I am to be a developer as good and as open source as I can be. One of the first steps is to show my code to the world. As a friend of mine(Hello, Mauricio) says, I am a little too afraid of sharing my code with people, as I never think it is good enough, and so I never really interact with anyone. Think of this as a first step to train myself to be a better developer, as small as it is.

Structure?

On the src/ folder we will have the different rounds as different packages. Inside them I will have the code from my answers, in different states of completeness, followed by a README on the package explaining what I did on the problem, why and how could it be better.

How will I make it better?

The first commit will be of the tried solutions, following commits will be of corrections to the wrong and incomplete questions. As I try to better my solutions, I will come to make the promised READMEs on the previous section. Maybe I will try to solve even the phases I didn't qualify to? I don't know yet.

How to run?

Well, sincerely I had some problems compiling Kotlin, so I used IDEA to compile and run the code and then pasted the input and copied the output to another file.

Really?

Yes, totally inelegant, but I did what I could with the time I had. I promise that I will learn to do all the steps on my own next time... If it will help to redeem myself, there was a time that I really got to run it on the terminal, the command was something similar to:

java [compiled class file] < [input file] > [output file]

Maybe next commit I will probably make a better version of it, promise.

Credits