Ubertweek/mobile-developer-challenge — pull request #3 by cbrandolino (2013-01-14 07:06:42+00:00)
Title: Mobile developer challenge solution.

Good morning Tweek team; here is my solution to the challenge.

Allow me to explain some of my choices.

### Reusability

I decided to make the program reusable. The `MovingBox` object can be initialized with any two square block-level elements, the inner one having absolute positioning and containing four directional buttons. It will work independently from the boxes' dimentions, and can be used more than once in a page.

### Separation of concerns

I refrained from touching the css file for anything concerning the animation itself. Style properties necessary for the animation are handled in the javascript.

### Animation method

I opted for css transitions, since:

* I never used them before and wanted to learn how they work, particularly events-wise;
* They seemed like a nice, clean solution for only animating one or two properties.

Feel free to take a look at [camvas](https://github.com/cbrandolino/camvas) or [local audio visualizer](https://github.com/cbrandolino/local-audio-visualizer) for some `requestAnimationFrame`-based examples of mine.

### Style and comments

In doubt, I went for Crockford's.

I'll write an application letter in the next 15 minutes.

Have a nice week,
Claudio Brandolino.