Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Scala at Mind Candy

1,083 views

Published on

Shown at Scala Days 2012

Published in: Technology

Scala at Mind Candy

  1. 1. Scala at MindCandy Sean Parsons & Mark Baker @seanparsons @markltbaker
  2. 2. Who are we?
  3. 3. Who are we?
  4. 4. Why we chose ScalaFamiliarity with the JVM.Transforming collections, Guava is still a bit ofa blunt tool.Static types are cool.Of the non-Java JVM languages seemed tohave the bigger community.Commercial Support
  5. 5. How we used Scala - Services (1)
  6. 6. How we used Scala - Services (1)
  7. 7. How we used Scala - Services (2)
  8. 8. How we used Scala - Services (2)User: 1
  9. 9. How we used Scala - Services (2)User: 1 Game
  10. 10. How we used Scala - Services (2)User: 1 Game News
  11. 11. How we used Scala - Services (2)User: 1 Game News BFFs
  12. 12. How we used Scala - Services (2)User: 1 Game News BFFs GameDB
  13. 13. How we used Scala - Services (2) Feed: 7User: 1 Game News Feed: 8 Feed: 9 BFFs GameDB
  14. 14. How we used Scala - Services (3)
  15. 15. How we used Scala - Services (3)User: 7
  16. 16. How we used Scala - Services (3)User: 7 News
  17. 17. How we used Scala - Services (3) Feed: 7User: 7 News
  18. 18. How we used Scala - Services (3) Feed: 7User: 7 News Users
  19. 19. How we used Scala - Services (3) Feed: 7User: 7 News Users GameDB
  20. 20. How we used Scala - Services (4)Simpler designUnfiltered & AkkaScalacheck is a lifesaverUsed the appropriate paradigm
  21. 21. Now the story from Tools...
  22. 22. Why Scala for ToolsFewer dependenciesEasy to distribute toolsLots of useful Java libsMove from Python "felt good"XML / Pattern match featuresLanguage Scalability
  23. 23. How we used Scala - Tools (1)REPL investigationsQuick ScriptsSetup Tool Play-based websites
  24. 24. How we used Scala - Tools (2)private val HudsonColorRegex = new Regex(""".*"color":"(w+)".*""")private def jenkinsBuildStatus(build:models.AutomatedBuild):String = { val hudsonUrl = build.url + "/api/json" val result = scala.io.Source.fromURL(hudsonUrl).getLines().mkString val HudsonColorRegex(color) = result color match { case "blue" => GOOD case "red" => BAD case "aborted" => BAD case "disabled" => DISABLED case "grey_anime" => UNKNOWN // build has not run yet... case _ => unknownStatus("cant match jenkins build status color of: " + color) }}
  25. 25. How we used Scala - Tools (3)getCachedFileSizes(path, revision) .groupBy{ _.size / groupByBytes } .map { case (group,files) => group -> files.size } .toList .sorted .foreach { case (group, count) => data.addRowFromValues( humanGroupSize(group * groupByBytes, groupByBytes), new Integer(count)) }
  26. 26. Our Scala Experience
  27. 27. Our Scala ExperienceMigration from dynamic languagesClean expression of algorithms – What, not HowImmutability and Actors = Scale!The REPL
  28. 28. Our Scala Experience
  29. 29. Our Scala ExperienceTraining - lots of syntax to learnNew language & New paradigmsTools maturityCompiler errors
  30. 30. Our Scala ExperienceTraining - lots of syntax to learnNew language & New paradigmsTools maturityCompiler errorsStill learning about maintenancebehaviour
  31. 31. Future of Scala at Mind Candy
  32. 32. Future of Scala at Mind Candy Tools Scripts Services Training
  33. 33. Were hiring!tech.mindcandy.comEmail:markb@mindcandy.comsean@mindcandy.comTwitter:@markltbaker@seanparsons

×