11 ms·
Scala School
- MojoJolo 13y agoIf you guys really into Scala, I really recommend trying Finagle (https://github.com/twitter/finagle https://github.com/twitter/finagle). It was also created by Twitter. It was a lightweight HTTP server and client for Scala. It's my favorite. With just a "single" line of code, you can create an HTTP server in Scala. I usually combine it with Rogue (https://github.com/foursquare/rogue https://github.com/foursquare/rogue), an "ORM"-like for MongoDB. I used Finagle and Rogue to build a fast and lightweight REST API.
- atto 13y agoReactiveMongo (http://reactivemongo.org/ http://reactivemongo.org/) is coming alone nicely as well, and has some great non-blocking and reactive features.
- smrtinsert 13y agoAs someone getting into scala, where can I find the list of top available libs? For clojure I just browsed github, but I feel there probably is some resource out there I'm missing.
- gtani 13y agothis is a pretty good blog, but it's best to ask on mailing list or IRC if googling cant find something http://notes.implicit.ly/ http://notes.implicit.ly/
- MojoJolo 13y agoWhat I love about Scala is that all (most, if not all) libraries built in Java can also be used. This includes those awesome apache libraries. For Scala written libraries, here's a link to Github page: https://github.com/trending?l=scala https://github.com/trending?l=scala
- mikegagnon 13y agoWhenever possible I avoid using Java libraries in Scala. Scala and Java have very different programming styles, which are codified in the APIs for libraries. You lose the benefit of Scala style when you are forced to program against a Java library.
- cgag 13y agoFor clojure, these are good: http://www.clojuresphere.com/ http://www.clojuresphere.com/, http://www.clojure-toolbox.com/ http://www.clojure-toolbox.com/, http://clojure-doc.org/ http://clojure-doc.org/
- terhechte 13y agoDoes it support Swagger now? For my last implementation, I wanted a good automatic API documentation, and I'd rather have the client code in a generated way, and of the three Scala microframeworks that I had a look at, only Scalatra had kinda solid Swagger support. Neither Spray nor Finagle did. Though in hindsight the Swagger release in the current Scalatra is a bit old and thus it has tons of bugs and issues that are fixed in current Swagger but I found it impossible to just update Swagger.
- brown9-2 13y agoI believe that Twitter tends to define their services as Thrift interfaces, which forms it's own documentation for the application rather than having to crawl through code to find which REST URL endpoints are being listened to. I could be wrong but I think Finagle reflects this in that Thrift is more of a first-class citizen than REST (although I'm sure the latter is possible).
- lmm 13y agoFinagle doesn't tend to be so well integrated with the rest of the ecosystem - IIRC there isn't even a scala 2.10 release out yet. I'd recommend spray (http://spray.io http://spray.io ) if you want to do async http in scala. (That said, I do think the twitter scala style guide is very good: http://twitter.github.com/effectivescala http://twitter.github.com/effectivescala )
- theatrus2 13y agoFinagle and "util" both have 2.10 builds available. As for bridging Twitter Future with (now) Scala Future, that should be coming soon, once the execution context stuff is squared away.
- SubMachinePun 13y agoHow do Rogue and Casbah stack up against each other?
- rit 13y agoVery differently (I'm the original author of Casbah, though I gave up maintainership a few months ago when I joined Typesafe). Casbah was always created to be a straight MongoDB driver, with no ORM features. It has no dependencies on "external" projects other than the MongoDB Java driver, so that you can use it where-ever and write standard queries. It has been awhile since I played with Rogue, so forgive any mistakes but the big one: Rogue is specifically built as an ORM, with integration into Lift. Really, you are going to use Rogue vs. Lift to accomplish very different tasks. There is Salat (https://github.com/novus/salat https://github.com/novus/salat), to provide ORM features on top of Casbah. Pick which tool works best for your use case! I happen to think quite highly of Rogue as well, as there are some tremendously impressive features in it including detecting potential Table scans. Rogue is fairly well battle tested on the Foursquare systems, and the authors are both very, very good at what they do.
- eranation 13y agoFew other great learning resources for Scala: - a "JSFiddle" like editor for Scala: http://scalakata.com http://scalakata.com - Interactive tours: http://scalatutorials.com/tour http://scalatutorials.com/tour, http://www.scala-tour.com http://www.scala-tour.com, http://www.simplyscala.com http://www.simplyscala.com - Learn Scala in X minutes: http://learnxinyminutes.com/docs/scala/ http://learnxinyminutes.com/docs/scala/ - Typesafe Activator: http://www.typesafe.com/activator http://www.typesafe.com/activator - Official docs of course: http://docs.scala-lang.org/ http://docs.scala-lang.org/
- tmarthal 13y agoPeople are doing all sorts of great things with Scala. Scala Notebooks, which can be classified as a learning resource https://github.com/n8han/scala-notebook/ https://github.com/n8han/scala-notebook/ - It is an in-work conversion of iPython notebooks using d3 instead of matplotlib. Another great analysis resource is Saddle, a scala data munging library (analogous to pandas, around the 0.8 revision). http://saddle.github.io/ http://saddle.github.io/
- MojoJolo 13y agoI would also like to add: - To manage dependency, use SBT (http://www.scala-sbt.org/ http://www.scala-sbt.org/). - For IDE, I recommend Scala IDE (http://scala-ide.org/ http://scala-ide.org/).
- applecore 13y agoStarting out, it makes sense to just "write Java in Scala", and gradually introduce the advanced concepts of Scala as you learn them. That way, you can be immediately productive.
- catnaroek 13y agoThat way you can delude yourself into thinking you are productive, because you are writing code immediately. However, productivity is not to be measured by the number of lines of code; rather, by 1. the amount of actual functionality implemented, 2. the elegance of the design (which saves time refactoring later on).
- lmm 13y agoIt's easy to forget the value of delivering functionality immediately. It's all too easy to spend a long time on an elegant design that doesn't actually serve business needs. I like to follow an agile approach where if something can't deliver value in 2 weeks then it's not worth doing (or, more likely, needs to be split into smaller pieces). That's plenty of time to learn enough Scala to be more productive than you were in Java, even though it will take months or years to learn the full language.
- catnaroek 13y agoLearning a new programming language is an intellectual, exploratory endeavor, even if it might result in adopting that language for future programming projects. Writing software professionally is a pragmatic engineering job constrained by non-intellectual considerations such as customer expectations (and lack of knowledge thereof) and limited availability of resources (time, money, skills, etc.). Suggesting that both activities should be approached the same way is a huge mistake.
- lmm 13y agoI learnt scala very effectively simply by delivering a program in it at my day job. I'm not sure about "should", but in my personal experience I've found that the best way to learn.
- mikkelewis 13y agoIt's worth mentioning that I got into Scala because of Akka. Amazing features like remote actors, supervision and more. I also appreciate how active the project is :) https://github.com/akka/akka https://github.com/akka/akka
- kclay 13y agoAkka is great I just launched an app into beta with Play( websocket game) and Akka , currently I'm trying to get a hang of the clustering features so I can distribute my connections out.
- karavelov 13y agoI am learning Scala last couple of months. Twitter scala page is really nice for starting up. Another place with discussion of more advanced topics I find useful: http://danielwestheide.com/scala/neophytes.html http://danielwestheide.com/scala/neophytes.html
- joshz 13y agoCoursera has a class as well. Martin Odersky tweeted a while ago about a possible advanced course in the fall but it doesn't look like it's happening yet. http://www.coursera.org/course/progfun http://www.coursera.org/course/progfun
- pramalin 13y agoI finished the course when it first came out last year. This appears to be the third session of the same class. I'm also eagerly looking for an advanced course. I used Scala in "Algorithms: Design and Analysis, Part 1" programming problems. Even as some algorithms are described in recursive style, using tail recursive implementations fail for large data sets and I have to fallback to imperative styles with lots of mutable data structures to complete the assignments. A Scala based algorithms course would be very useful.
- arms 13y agoThis looks great. My favorite resources are those that assume prior programming knowledge and aim to get the reader up to speed quickly with the specifics of the language, not programming in general. If anything, I think I'll start studying pattern matching :)
- rlbaker 13y agoI've been interested in venturing into Scala but have not found a good resource for getting a development environment setup. Should I be using an IDE or will sbt/Sublime be sufficient?
- mikegagnon 13y agosbt + sublime is certainly sufficient. I program in Scala all day long. I know many developers use the IntelliJ IDE.
- ssmoot 13y agoYou'll level up much faster with an IDE (IMO). Ensime in Sublime is kinda pointless I think since it only updates on file change. The REPL and SBT integration is nice. I use Sublime for quick examples in Scala, or as a VIM alternative for larger projects (as opposed to my main editor like with Ruby). For most of my Scala work I use IntelliJ though. The lack of half-decent theming in Eclipse and Preferences/Settings being all over the place really puts me off ScalaIDE personally. Going from Zero to Code in IntelliJ and SBT (on OSX) is pretty trivial. Given a command-line "Hello World" with a traditional Maven layout: First, install IntelliJ, navigate to "Plugins" under preferences and install the Scala plugin. Now make sure you have Homebrew installed (http://brew.sh http://brew.sh) $ brew update $ brew install sbt --devel # currently 0.13.0-RC5 $ cd ~/src/ $ mkdir hello-world $ cd hello-world $ mkdir project $ echo "sbt.version=0.13.0-RC5" | tee project/build.properties $ cat <<EOS | tee project/plugins.sbt resolvers += "Sonatype snapshots" at "http://oss.sonatype.org/content/repositories/snapshots/" addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.5.0-SNAPSHOT") EOS $ cat <<EOS | tee build.sbt name := "hello-world" version := "1.0-SNAPSHOT" EOS $ mkdir -p src/main/scala $ cat <<EOS | tee src/main/scala/Whatever.scala object Whatever extends App { println("Hello World!") } EOS $ sbt > compile > gen-idea > run And there you go. It could be simpler if we were having a LOC competition, but this is actually very close to the exact setup I use for projects day in and day out, including getting a jump on the next version of SBT and best-practicey stuff like setting the SBT version in build.properties. If this were a Play app, you might have a "project/plugins.sbt" that looked something like this (to get a jump on the upcoming Scala 2.10 version of Play, that integrates with SBT 0.13.x): // Comment to get more information during initialization logLevel := Level.Warn resolvers := Seq("Maven Central" at "http://repo1.maven.org/maven2/", "Typesafe Snapshots" at "http://repo.typesafe.com/typesafe/snapshots/", "Typesafe Releases" at "http://repo.typesafe.com/typesafe/releases/", "Sonatype snapshots" at "http://oss.sonatype.org/content/repositories/snapshots/") addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.2.0-M2") addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.5.0-SNAPSHOT") This just adds a few more common resolvers you might use for dependencies, and locks you to the latest Play milestone snapshot. You can pretty much otherwise copy/paste files/folders from a sample Play app, like you might see with the Typesafe Activator for example. Good luck!
- pkinsky 13y agoI've finished Martin Odersky's Scala Course. I've built a few small play2.0 apps. I've used Scala to solve ~20 Project Euler problems, and I'm fiddling around with parsers and scalaz. However, all the Scala positions I've found are looking for engineers with experience using Scala in production. How can I make that jump? Are there any opportunities out there for junior engineers who are proficient in Scala?
- jorgeortiz85 13y agoSend me your resume: jorge@foursquare.com
- pkinsky 13y agoThanks, sent!
- deleted 13y ago[deleted]
- efuquen 13y agoDo you live in NYC? The place I'm working at now was looking for some people, not necessarily with production Scala experience. Not sure if they're still looking, but first off you would have to be living the greater New York area :-)
- eranation 13y agoIf you are in the UK, let me know...
- pkinsky 13y agoI'm on the other side of the pond, sadly.
- chiurox 13y agoIf finding a Scala position in the US (I assume) is already this difficult, here in Brazil it's infinitely harder. I guess our startup is one of the very few that has a fairly large system in production running on Scala, Play, and Akka. It's next to impossible to find people with experience yet alone experience in production. The key is to find people genuinely interested in learning.
- hayksaakian 13y agosorry to nitpick, the unicode didn't render properly on chrome stable, windows 7 "From ∅ to Distributed Service" otherwise quite interesting
- pavanred 13y agoBookmarked, I needed this, very helpful. Thanks.
- stickhandle 13y agoTimely. I'm interested in scala. Would love a couple opinions from those in the know ... (1) As a (very) experienced java guy, what's really the best learning approach: comparative? clean slate? I'd "like" to do Odersky's course, but I can't commit to scheduled tasks; (2) A minimal framework seems like a good idea to me - rather than Play!, what do folks think about Scalatra as a starting point?
- wiradikusuma 13y agoif you want smoother transition, try my approach: code with Java style (OOP, imperative) but using Scala syntax. once you're familar with the new syntax, naturally you will wonder, "this seems clunky, there's got to be a way to do this the Scala way". and you'll start googling "how to do X in a list" etc. to lower the bar, don't use framework. i even coded http://ngajakjalan.com http://ngajakjalan.com (one of my projects written in Scala) without framework, just plain servlet+JSP. again, eventually you'll think, "i keep doing the same thing, there's got to be some library out there already doing this for me", and start exploring.
- campnic 13y agoI've been looking for examples of applications built with scala and akka that I can learn from. I've built small, toy-ish stuff but I feel I learn a lot by looking at examples. Any have any recommendations?
- user1241320 13y agoafter years of java coding, i started following the scala "trend" but had no chance of actually using it where i used to work. nonetheless, i did coursera's odersky course and started using it here and there for (very little) personal projects. with that in my toolbelt i was able to find the job i now have. they were using scala/akka/play (but also scalding and other stuff) and they were okay with somebody with little experience but willing to commit to it. i accepted and now have spent 4 months away from java and diving into scala and i just love every bit of it (even SBT that at first looked very little interesting).