Since Brent Simmons discussed the Omni Swift Bikeshed Club we've been running something similar at work. Every few weeks we've set an optional task that our iOS developers work on for around a week in their spare time at work, then we all get together at a coffee shop and discuss our implementations, what were the biggest challenges, and sometimes compare performance based on one or more metrics.
The performance comparison is just a bit of fun, as the main goal is to get more practice using Swift, and learn from each other in the process. I think this has been really useful for myself and the team. Everyone has got something out of taking part, and its been interesting to see how similar or different each approach to the same task has been.
We try and keep the tasks small enough that no one is flogging themselves to complete them — but with enough meat that it feels worthwhile, and a bit of a challenge. Comming up with something to do hasn't been easy, so some tasks have been very focused around our work, but I'd like to share three of the other tasks that we enjoyed incase they're of use to other groups.
Cows and Bulls
Read these instructions and implement code to play the game. We didn't implement a separate server or do any networking, we just had a separate server class and ensured it didn't know much about the client, just how to be asked and repond to guesses.
For an extra challenge we compared implementations based on number or guesses and execution time (lower is better).
Hot Hand
Read these instructions and implement code to prove the hypothesis. When working through this task we added the extra challenge of fastest run.
Epsilon Greedy
Read this blog post and:
- Implement a class that can run an epsilon-greedy trial
- Create an app or unit tests that exercise your class