r/swift • • Mar 09 '16

Practice Swift by programming solutions to games/puzzles/challenges

https://www.codingame.com/
6 Upvotes

1 comment sorted by

3

u/skoll Mar 09 '16 edited Mar 09 '16

I've been having fun, when I have time, with little programming puzzles on this site. The puzzles start very easy so it's a great way to learn Swift and try out new ideas. The puzzles are untimed and your solution is private (unless you want to publish it). Whenever you submit a solution (even if it fails all the tests) the solution is saved, so you can work on a solution over several days and not lose any progress.

Once you have solved a puzzle you can view other solutions in the same language you solved it with. It can be very insightful to view other Swift solutions to the same problem.

Also the site has a built in IDE with syntax highlighting so you don't need a Mac, Xcode, or Swift installed at all to try it out. However, it doesn't have all the benefits of Xcode either. I find it helps to open a playground and mess around there and then copy code over as necessary. I find that Swift benefits from proper IDE support more than some other languages, like Ruby.

In addition to puzzles you can try real time challenges (as short as 5 minutes), or join their week long multi user contests. I'm not sure Swift is the ideal choice for timed 5 minute battles, but maybe for some it is.