Skip to content

one-hour clojurescript mini-hackathon of the week: Reagent app for dice rolling

License

Notifications You must be signed in to change notification settings

werelax/hourly-dice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

One hour clojurescript mini-hackathon

This is a really simple app for simulating dice rolls. You can configure your roll adding as many dice as you need and selecting its colour and sides (4, 6, 12 or 20), roll them and then see a log with your last 10 rolls. This app is part of a series of exercises I've been doing to get some familiarity with reagent and with clojurescript in general. The objective of this mini-hackathons is to finish a simple app in one hour, from 0 to a working version. I had to try several times to achieve it (starting from scratch on every attempt).

As you can see if you read the commits, I tweaked the app a bit after the first hour fixing the HTML and little bugs or doing some refactoring. That's OK by my rules. If you finish your app in one hour, then you can spend as long as you like playing with it and improving it ;)

My experiences so far with this exercise

It's incredibly effective. Hard to believe. Working on such a tight schedule sharpens your skills with the mundane tasks like creating a new project, setting up the environment, integrating the HTML, etc,... Which are the kind of chores that don't get much practice in the day to day work.

It also helps with the assimilation of the most used commands and functions and reduces the documentation trips, as well as automating a lot of architectural patterns, like component boilerplate.

I've noticed another, unexpected side effect. As I mentioned, I've had to try several times until I actually managed to finish the project in one hour. I've been working one hour a day for several consecutive days, each time starting from scratch (well, starting from lein's reagent template). And I've notice a very strong psychological reluctance to do the same work all over again. I'm more than happy to push against that barrier, because I see it as the major cause behind the forsaken and poorly maintained code littering every big project. We (human beings? programmers? lazy people?) don't like to re-solve already solved problems, even if there is a strong reason to do it.

Do you recommend it for other people?

Absolutely. If you want to master your tools and get fast with the repetitive chores or automate the most common patterns so you can write them without having to make the same little decisions over and over, this is definitely a great way to achieve it. It will also enhance your ability to code in turbo-mode, where every minute matters and must be invested wisely, and stretch your concentration endurance.

But this exercise alone is not enough. There is a big part of your skill set that will be not improved with this exercises. Everything related with good practices or deep knowledge of your language, which require slow and reflexive thinking, must be learned by other means. On the other hand, solving the same problems many times will allow you to approach it from different angles and test different techniques, so I guess the exercise will give you the opportunity to compare different schools of thought if you want to. Which is great even if the environment is not the most realistic.

Will you do more exercises like this one?

Oh, yes. Many more. And not everyone of clojurescript. I'll keep doing this one-hour mini-hackathons for they have proved their usefulness. There are many, many tools and processes and libraries and techniques around us that demands regular sharpening ;)

About

one-hour clojurescript mini-hackathon of the week: Reagent app for dice rolling

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published