Last weekend, the Clojure community experienced tremendous excitement in its power. In 48 hours it was required to write any web application. Teams up to 4 people, all code (besides libraries, of course), design and assets should be created from scratch during the competition.
Competition page: http://clojurecup.com/

')
rules
The jury plans to evaluate projects from the point of the average Internet user - classiness, completeness, efficiency. That is, they don’t want to delve into the whole beauty of the code or the usefulness of the library for the developer - mainly because the beauty of the code is a subjective thing, there are many applications, it is a long time to delve into it.
This simplifies life and complicates - it is clear what to strive for, however, making the completed product is much more difficult than making a basic version of a library. Roughly speaking,
ideally, it is necessary to finish not only the first 80%, which occupies 20% of the time, but also the last 20%, which occupy 80% of the time.
Organization
And although the organization began as something semi-marginal, the event quickly gained momentum. Almost all prominent figures of the Clojure community were called to the jury, almost all well-known Clojure-companies joined the sponsors.
The participants were provided with the full stuffing of services: a production server on DigitalOcean (1GB / 1 CPU Droplet), a repository and a project on Deveo and chat on FlowDock. Looking ahead, I will say that everything looks cool, but our team almost did not use anything to its fullest - there was no time, so we left the usual skype group chat, git, dropbox shared folder and manual launch through nohup on the server. If it were not for the tough time pressure, I would definitely like to touch and adjust everything.
Everything is organized quite harmoniously and automated to the maximum - there was a special during the competition. A page for the participants, on which it was marked with checkboxes, which of the required setup steps were completed, screenshots were automatically updated on the general list of applications and it was clear who the landing page looks like.
By the way, a curious fact: as the organizers calculated, source control repository type stats: Git 100%, Hg 0%, SVN 0%.
Prizes
The organizers approached the topic of prizes with humor. And if you can understand why the programmers of the Raspberry Pi Board or the One O'Reilly e-book, then we’ll say that Hammock Isleña (a hammock!) For the first place is a reference to the cult ones. Rich Hickey’s reports, in particular Hammock-driven development. By the way, for the first place give among other things One Leap Motion Controller, per member (all prizes per member). A complete list of all can be found here:
clojurecup.com/prizes.htmlTraining
Traditionally for such competitions, everyone promises to prepare for themselves and not prepare. There were three programmers in our team, I had a lot of serious experience with Clojure, and only I myself was prepared as the most responsible. Namely, I threw in a small prototype of the application in advance in order to imagine how the code, dataflow will be organized, what problems will have to be solved. This seriously helped, the code could not be reused, but I already knew how to make many important decisions at the start of the project. That is, there was no this amorphous porridge here, “but how are we going to do something,” but it was just clear how to do it, all that remained was to be done.
In retrospect, I understand that, for example, such a thing as a sprite editor could be found or done in advance. A fairly universal thing, so that it can be zapensorssy and use yourself. The WarMagnet team, for example, did this with Clojure binding to React (see
github.com/piranha/pump ).
Race
The main two days of competition were, in general, ordinary programmer everyday life. With the only exception that we put in a weekly amount of work in them, at least, we got a lot of thrills, we felt alive, we tried a lot of new and unusual things. For example, the sprites and backgrounds in our game are made from our processed photos. Sounds, although they are almost inaudible, but also :)
We used clojure + clojurescript, dommy on the client, regular stack (compojure, ring, http-kit) on the server. Client-server logic is present only in the lobby, the main code runs on the client.
Statistics:
ClojureScript 8 files, 729 loc
Clojure 2 files, 116 loc
Not much, but let me remind you, this is a working fighting game for two players, with three characters, collisions, an editor of sprites, a lobby, and we can interact with twitter api and a particle system.
Both Clojure and ClojureScript performed well as tools. The code is very fast to write, it is very compact, rectilinear and without unnecessary abstractions. There is always the opportunity to go down to the interop with the platform, that is, to jerk some native Java / JavaScript functions.
For fans of specific figures, the recent breakthrough in the speed of incremental compilation was very much in the topic, the project was rebuilt into cljs in 0.2 seconds. Generated production js-file is 46kb, which, I believe, a victory and more than a reasonable fee for such a rich platform, like Clojure, in the browser.
Errors
There was a lack of a 48-hour professional designer. I combined, my wife helped me a lot, but in the end the programming part suffered, and in the design we did not all. I am satisfied with something, but almost everything else requires, if not a skill, then stupidly more time to work out.
Planning a project in advance would also be very helpful. This would allow us to select individual parts (sprite editor, twitter api possible) with which you can come to the competition ready.
Victory
We strenuously restrained the mood to try all the tasty things that appeared in Clojure lately (datomic, core.async, frp), in favor of focusing on the task. ClojureScript was already new enough for us, and in order not to multiply the risks, we did not drag everything. We got a fan anyway, but we didn’t waste too much time on blunders with new unfamiliar things.
results
Of the 93 applications to the finish line, 35 have somehow survived. Among them are 6 todo sheets, 11 games and 18 other applications. The full list is
here .
We had a fighting game between two random twitter characters. Whom you want, that and put. It looks like this:



Here the author of the book The Joy of Clojure fights with his co-author and writes about it on Twitter:

And here is one of the working moments:

You can play here:
kick.clojurecup.com (do not judge strictly for quality, we can not fix anything now according to the rules of the contest).
It works only in Chrome (alas, as you understand, it wasn’t QA, the score went on for minutes), the buttons are not signed anywhere to create the feeling of old sega toys - “wow, how do you do it, which button do you press?”
Vote for us, honestly and disinterestedly, can and should be here:
clojurecup.com/app.html?app=kick .
Thanks to my colleagues for a great time! This is
ystrot , Alexander Poplavsky and Julia Prokopova.
If there is an opportunity - I strongly recommend hakatons.