RodionGork's blog

By RodionGork, 10 years ago, In English

Four months ago I asked about existence of algorithmic solution for "Color Cubes" game.

Now I created the challenge based on this game — the goal is to gain maximum points:

Color Cubes challenge

Click to see problem statements and live demo

Rules of the game are described in this exercise and here is also small playable demo to get better idea.

Here are current stats — you see that during last three days only three participants submitted successful solutions. Perhaps you will decide to join? Be sure, it requires only 10-15 minutes to write the simple code producing answer good enough to be submitted!

Challenge is not limited by any dead-line and no solution is going to be posted officially (though no one is restricted from discussing approaches)

Full text and comments »

  • Vote: I like it
  • +40
  • Vote: I do not like it

By RodionGork, history, 10 years ago, In English

Update

PLEASE NOTE this post have become slightly outdated. Nowadays we have more automated process. So I have just remove outdated technical details and added more contemporary links.

Uptodate info:

Here is the E-maxx site in English: https://e-maxx-eng.appspot.com

And still here is github project with article sources: https://github.com/e-maxx-eng/e-maxx-eng

To contribute one just needs to create PR in github, so generally one even may work in github web-interface for the whole process. Detailed instructions are here https://e-maxx-eng.appspot.com/contrib.html

Older text follows below


Preface

Non-zero amount of users have suggested translating E-Maxx Algo to English. As far as I know some people even started translating in their blogs, though I'm not aware of any attempt seeing great advance and evolution.

This comment suggested to attempt to do this in collaborative manner using github.

I've created a project and pushed few files here. My idea is that we can write or improve articles in Markdown format (you know it since it is used in posts/comments on CF) using pull-requests here (at least at beginning).

The results are converted HTML pages and hosted at the google appengine website.

Remaining is removed to decrease bewilderment

Full text and comments »

  • Vote: I like it
  • +73
  • Vote: I do not like it

By RodionGork, 10 years ago, In English

I was somewhat surprised to learn that besides Pi Day celebrated on the 14-th of March we have Pi Approximation Day celebrated today, on the 22-th of July.

Don't be surprised, both link lead to the same page.

I'm curious, whether it is possible to invent the day for another well-known approximation 355 / 113? Well... It could be the 113-th minute of the 355-th day of the year — something closer to astronomic time notation...

Full text and comments »

  • Vote: I like it
  • +16
  • Vote: I do not like it

By RodionGork, 10 years ago, translation, In English

How to generate combinations of K elements chosen from the set of size N where some elements are duplicates? For example:

[1, 1, 2, 3, 3, 3]
choosing subsets of size 3 we have:
[1, 1, 2]
[1, 1, 3]
[1, 2, 3]
[1, 3, 3]
[2, 3, 3]
[3, 3, 3]

Somewhat clumsy algorithm could be derived from simple generation of combinations without repetitions — however its "clumsiness" make me hesitating and I'm interested whether more nice approach exists. Regretfully "Combinations with Repetitions" on the web mostly refer to another problem (if I got it right) where the number of repetitions for each element is unbounded.

Thanks in advance for hints / links!

Full text and comments »

  • Vote: I like it
  • +2
  • Vote: I do not like it

By RodionGork, 10 years ago, In English

CodeAbbey — is the site which I'm building in my spare time. It is basically a problem set targeted for beginner programmers.

Hope you'll like its archaic design yelling "bring back the internet of mid 90-s!!!" — just a joke, probably I'll be able to improve it in future :)

Functionality is after the manner of ProjectEuler:

  • user reads the problem statement;
  • along with it he/she receives input data (usually randomized);
  • these data should be processed (so usually user will write some program) to get answer;
  • answer is submitted along with source code (this is optional) and checked by server.

Users are ranked according to number of problems solved (more precisely according to sum of points gained for these problems).

After solving the problem one can see other people's solutions, and probably, can learn something from them.

Among the recent additions there were two new classes of problems — brainfuck puzzles which require user to submit valid brainfuck code which is tested on server — and challenges for which users can gain less or more points depending on how optimal the answer is.

I would be glad to receive ideas / suggestions or criticism — and even more I would be glad to cooperate in some way with authors of programming related blogs or people who like inventing problems and puzzles.

Full text and comments »

  • Vote: I like it
  • +74
  • Vote: I do not like it

By RodionGork, 10 years ago, In English

Sorry if this was already announced here, but two great events are at hand and probably some users are still unaware:

Google Code Jam 2014 — Qualification round starts on April 11 and is 27 hours long so people from any timezone can participate.

TopCoder Open 2014 / Algorithm — initial rounds are taking place on 5-th, 12-th and 26-th of April.

TopCoder Open 2014 / Marathon — first round starts on 9-th of April.

Full text and comments »

  • Vote: I like it
  • +49
  • Vote: I do not like it

By RodionGork, 10 years ago, translation, In English

Congratulations to all enthusiasts of Java!

Code sample:

List<Widget> widgets = ... ;
int sum = widgets.stream()
    .filter(MyClass::isRed)
    .mapToInt(w -> w.getWeight())
    .sum();

public static boolean isRed(Widget w) {
    return w.getColor() == RED;
}

Lambdas and references to methods — and moreover — the tons of strange and not easy to understand things — inside classes like Stream, Collector, Consumer, BiConsumer etc. :)

Full text and comments »

  • Vote: I like it
  • +77
  • Vote: I do not like it