11 ms·
Scala School
- partycoder 11y agoI have heard that Twitter is now moving away from Scala.
- nolite 11y agoAny source ? Any idea why?
- murph 11y agoI work at Twitter. No, we're not. Probably just some rumor.
- reubensutton 11y agoI think he may be confused with LinkedIn
- deleted 11y ago[deleted]
- deleted 11y ago[deleted]
- sulam 11y agoIt was considered at one point, but the main proponent for one JVM language has left the company and even before that there was strong support for keeping Scala on the list of production languages.
- airless_bar 11y ago> the main proponent for one JVM language Hey, I'm interested in that! What proponent? What language? If it was Raffi Krikorian would you mind having a look at https://en.wikipedia.org/wiki/Scala_%28programming_language%29#Criticism https://en.wikipedia.org/wiki/Scala_%28programming_language%... and perhaps update it?
- sulam 11y agoI was not a first party to the discussion, but what I heard is that Alex Roetter had asked the most senior engineers to consider strongly whether or not it would be better to have one JVM language. Twitter pays a polyglot tax and Scala's tool chain is clearly not as mature as Java's. In the resulting discussion, though, even engineers that primarily wrote systems in Java wanted to keep Scala as an option. I had one conversation 5 years ago with Raffi about which language something should be built in. He advocated strongly for me doing it in whatever I felt made the most sense. I think this is typical of his management style -- which is to establish goals and let the people responsible for achieving those goals work out how to do it. Raffi had left the company by the time the JVM standardization discussion happened.
- airless_bar 11y agoThanks!
- saryant 11y agoThat would be news to me and I work there.
- pcx 11y agoLearning Scala is such a pain. Either you follow a large book completely and master it across several months/years or go through overly complicated online guides and get discouraged. I understand it's a large, advanced language, but the community has to seriously work on making things a bit easier for beginners like me. Just look at how easy it is to learn Go or Rust, their official tutorials are amazing and free on the web. Here is what worked for me to learn the basics well: I started off with the book 'Scala for the Impatient', the first half of the book is freely available. I then used Scala School as a list of topics and researched on each using Google. StackExchange has some amazing answers that helped me a lot. Free part of Scala for the Impatient: http://fileadmin.cs.lth.se/scala/scala-impatient.pdf http://fileadmin.cs.lth.se/scala/scala-impatient.pdf
- chuwy 11y agoI agree about painful learning curve for Scala. Problem I think in very divergent community and in different approaches for a every single problem (unlike for example Python or Go): OOP vs FP, Typesafe vs Typelevel, scalaz vs cats, Cake Pattern vs sanity. There's a also a problem that most powerful Scala techniques are there "by accident" [1] and unlikely will (or should) appear in official guides. Also I disagree that "Scala for impatient" is good book for start. It make me feel Scala is dump of random unrelated features, it's very easy to disappoint. However, despite all above I think Scala is definitely worth to invest some time. It made all other learning curves (for languages, techniques, concepts) more flatten. [1] https://meta.plasm.us/posts/2015/07/11/roll-your-own-scala/ https://meta.plasm.us/posts/2015/07/11/roll-your-own-scala/
- squimmy 11y agoI'm aware it's probably not intentional, but you describe Scala as being eclectic, and then immediately criticize Scala For The Impatient for presenting it as eclectic! However, I do feel like you're right. For instance, the section on XML literals probably should have been avoided, since that feature doesn't fit nicely with the rest of the language and most of the time isn't necessary to know.
- 11y ago
- Zaheer 11y agoMy biggest problem with Scala is that it's too powerful. Reading code I've written weeks or even days later is painful. Conciseness is not always good.
- joshlemer 11y agoIn what ways does Scala you've written end up being unreadable just days later? I honestly find that Scala code is some of the simplest and easiest to reason about of any language. Writing Scala has honestly been such a joy, it's easy to refactor, easy to read and write, and I almost never miss something -- if it compiles, Scala code is usually correct I find.
- rtpg 11y agoI think that, if you're not super aware of most of the features of Scala, that it can be confusing to understand what certain syntax means (implicits are a big one!) Just the infix operator syntax plus implicits can lead to stack trace confusion all around And try understanding some of the type signature funkiness! It can be difficult I definitely think that Scala is a harder language than most to grasp, if only for the feature support not seen since C++
- lmm 11y agoScala's infix operator syntax is very mechanical. Much easier than e.g. Python where you have to remember whether a * b desugars to a.__times__(b) or a.__star__(b) or something else. The IDE support for those and for implicits is very good these days. The type signatures can be complex but only when you're doing complex things with them - if you stick to doing the kind of things you'd do in another language you'll get similarly simple types. You're absolutely right that the native stack traces are poor, but you can use tools that understand them better, e.g. Takipi.
- jinst8gmi 11y agoWell written Scala code is fantastic to work with, but it does take some practice and judgement to write well structured readable code. If you're having trouble reading your own code days later perhaps consider the way you're using the language. I'd strongly recommend reading http://www.lihaoyi.com/post/StrategicScalaStylePrincipleofLeastPower.html http://www.lihaoyi.com/post/StrategicScalaStylePrincipleofLe... if you're have trouble reading your own code.
- bsaul 11y agoare there any other big company relying on scala for their core infra ?
- mewwts 11y agoWe do at Schibsted: http://www.schibsted.com/ http://www.schibsted.com/.
- joshlemer 11y agoWalmart, EnerNOC, Verizon, LinkedIn, Hootsuite, Coursera, Foursquare, Meetup.com, Nitro, Workday, AirBnB, there's quite a lot..
- Cyph0n 11y agoImpressive list.
- argonaut 11y agoMost of those companies use a bunch of technologies, Scala being only a small part of their stack. Only a few of those companies use Scala as their main language.
- joshlemer 11y agoIs it really common for companies to have a single dominant language though? It seems that most companies have their eggs in four or so baskets.
- argonaut 11y agoYes, totally. I'm talking about their core language. LinkedIn's core language is Java. Google's main languages are C++ and Java. Pinterest is mostly Python. Quora's core is Python. Stripe's core is Ruby.
- _snydly 11y ago
- gamapuna 11y agoCan anyone recommend a good scala based open source project which gives a flavor of how to write good/effective scala
- joshlemer 11y agohttp://www.squants.com/ http://www.squants.com/ seems like a great library for studying, since it's inherently intuitive, self contained, well documented, and exposes a terrific api.
- rahilb 11y agotwitter/util is very well written, and useful. After that you could look into the spray.io source: it is quite complex, but the API it exposes and how extensible it is is amazing... They also coined the _magnet pattern_ which is pretty cool, and probably less abused than the cake pattern.
- lmm 11y agoDo you want basics or advanced? At the moderately fancy level, Spray is great - any time you're using a directive, you can just click through in the IDE and see the implementation of what it actually does. And Doobie is a tour-de-force for advanced type constructs. At a more basic level a lot of Twitter's own libraries are straightforward readable code (e.g. Scrooge is one I've patched a bit myself), though coupled to the Twitter stack of Finagle/Scalding/etc. that you probably don't want to use.
- SriniK 11y agoCurious question, anyone here using Scala for Android development?
- brakmic 11y agoAFAIK, there's not much Scala in mobile Dev in general.
- psynapse 11y agoThe company I am contracted to has an Android app written in Scala.
- flurdy 11y agoI spoken to many that have made Android apps with Scala but none that have pushed them to the appstore as the final binary is always quite big even for simple apps.
- Nutomic 11y agoI wouldn't say that's true. I have an app written in Scala [1], and the apk is just 4 MB. Sure, that's more than a comparable Java app, but many apps reach 20+ MB due to graphics anyway. [1] https://play.google.com/store/apps/details?id=com.nutomic.ensichat https://play.google.com/store/apps/details?id=com.nutomic.en...
- lmm 11y agoI've written some basic android apps for my own use in Scala. There's a bit of a mismatch with the android API (which is very much oriented towards traditional-Java mutable objects and one-thread-per-thing style) but I still find it nicer to work in Scala.
- mclifton 11y agoI'm about to release an app (will probably publish a beta today - https://invotes.com https://invotes.com), and it actually works quite well. The compile times are probably a bit slower than a standard java project, but not bad - something like 5-30 seconds depending on if it's a full rebuild. I use android-sdk-plugin with SBT along with Scaloid. Wrestling with proguard to hide appropriate warnings can be a little bit of a pain, but even with no prior Android knowledge I was able to figure everything out. Everything works as expected. There are a few minor issues where Java expects null and that's not normal Scala style, but other than that, nothing important to speak of. My binary builds to 4-5mb.
- sheldor 11y agoA well known resource (albeit a bit outdated); however I'm genuinely curious why is this on the front page of hacker news. I thought at first that it's been updated to some 2.1X version but, judging by the github repo, it hasn't been touched for years.
- rco8786 11y agoAlso expected this to be an update or something. Strange.
- brakmic 11y agoThe Dark Side for Beginners ;)
- diimdeep 11y agoIsn't scala dying ?
- century19 11y agoWhy do you think so? Spark is booming, and Scala is the most used language for Spark applications. Lots of other very active open source projects (e.g. Kafka, Akka, Mesos) are written in Scala.
- romankolpak 11y agoWhat makes you think that?
- jinst8gmi 11y agoAs someone who's seeing plenty of Scala uptake around me that's a rather surprising claim with no supporting evidence. These days I'm writing 90+% of my code at work in Scala. Indeed.com job data suggests that the answer to your suggestion is an obvious "No": http://www.indeed.com/jobtrends/scala.html http://www.indeed.com/jobtrends/scala.html
- incepted 11y agoThis graph shows that Scala grew from 0.02% market share to 0.08% in the last four years. The fact that it's at 0.08% after more than ten years in existence should be a concern for anyone interested in learning it.
- merb 11y agoWhat I hate about Scala School is that they are still using Twitter Future's and not Scala Future's, that could be aweful for Beginners.
- softinio 11y agoThe Scala school course has not been updated for a long time. I am not sure its a good resource anymore.
- hythloday 11y agoTwitter's Futures were developed when Scala's Futures weren't tail-recursive (and so not really production-quality). There's probably an item on the roadmap to port Finagle to using scala.concurrent.Future but I doubt it's high priority. The two support the same set of operations in any case - I doubt it'd be a huge problem for a beginner to translate one to the other.
- sidcool 11y agoI recently gave a talk on basics of functional programming. I have observed Scala syntax comes easier to people than Haskell or Clojure.
- ikurei 11y ago(Somewhat off-topic, sorry) This book does an interesting thing: > For each chapter (and occasionally for individual sections), I indicate the experience level. The chapters progress through levels A1, L1, A2, L2, A3, L3. The number is the expertise level, from junior to expert; A stands for Application developer, L for Library developer. I often find myself unsure about wheter a book or text is intended for the kind of user I am for whatever the topic is. Skimming through a book trying to identify what parts you should focus is not always easy. Do you know of other books that do this kind of thing?
- randomThoughts9 11y agoI find this schema, promoted if I'm not mistaken by Martin Odersky himself, as one of the biggest marketing blunders possible as far as programming languages are concerned. You keep telling developers that they are not good enough but they should rest assured that some smarter people are working on the problem and they'll come back with the answers. When in reality, I think that all developers, when using a library, would like to think that they could have written it themselves, it they would have had the time or the interest.
- jowiar 11y agoMy biggest challenge with (learning) Scala and the Scala community is that it feels like nobody is actually shipping software, or advocating for making shipping software easier. And that's a shame, because Scala is language I love for writing a few dozen lines of code, and expressing a domain concept. It's a fantastic language for solving a homework problem set (and it's origins may be part of the reason why). But every library feels like it was concocted as a search for purity with zero attention given to the user experience. The community is badly missing a DHH or Kenneth Reitz -- someone saying: "Ok, it's cool that we have this academic purity stuff and all that, now let's get serious about shipping software, and making tools that help people ship software." It's not that this view needs to dominate a community, but right now it's thoroughly unrepresented in Scala land.
- kailuowang 11y ago> nobody is actually shipping software What about Spark, Kafka and Akka? I actually think the Scala community is working very hard to improve user experience, it's just that they don't do in the expense of soundness. As a ruby -> Scala developer, I don't miss DHH.
- jowiar 11y agoSpark is interesting, and is probably the most pragmatic focus in Scala land. On the Akka side: Try picking up Akka-HTTP and use it to write an API client (which seems like something one would do with an HTTP library). There are lifecycle issues that are undocumented, and it really feels like this wasn't a considered use case throughout the entire development process. I don't necessarily think DHH is right on everything, or even most things. But I do think it's valuable having a voice saying: "Does this help us ship" or "We're adding this feature because it's solving a real problem we encountered multiple times during the development of real software, and it would be nice to have a standardized solution".
- akavi 11y agoTwitter? Foursquare? Linkedin? (Also my old company, PagerDuty. Wee bit lower profile than the other three, admittedly.)
- taude 11y agoI was learning Scala at one point. I was reading Atomic Scala [1] (I'm a big fan of Bruce Eckel as I learned Java from one of his earlier books, and some C++ before that). And I also took the Coursera Course from Martin O on functional reactive programming with Scala. I don't remember what is was actually called... I'm still into alternative languages that run on the JVM...however I went and learned Go Lang in a weekend and it meets a lot of my needs for building out newer services. Also, for my team the overhead of learning another JVM language (we already use Groovy quite a bit) didn't seem worth it in the end, even though I was a bit of a fan of the Scala idea for a few months. I might still learn Scala some day, but we're not even on Java 8 at my current job, and that would alleviate a lot of my current Java grievances.... [1] http://www.atomicscala.com/ebook/ http://www.atomicscala.com/ebook/
- vorg 11y agoDon't let your experience with Apache Groovy put you off upgrading to a new JVM language. I learnt Clojure after using Groovy for a few years -- Groovy 1.8 was the last version I used. I then looked at Haskell, and now I'm using Go.
- Negative1 11y agoMaybe I'm in the minority on this but I felt this guide by twitter was poorly written. It has good coverage but concepts were just not explained very well. The way I learned was reading from front to back "The Scala Programming Language" by Martin himself and starting a new project completely in Scala (which I'm launching soon). I'm sure that's not the best approach for everyone but using Scala in a practical environment in an idiomatic way really helps ground the concepts which can at first seem intimidating and difficult to comprehend. Mastery is a whole other story... p.s. I recommend Scala Cheatsheet if you are just learning: http://docs.scala-lang.org/cheatsheets/ http://docs.scala-lang.org/cheatsheets/
- denisftw 11y agoScala for the impatient is a 400 page book that essentially teaches the syntax :) I can recommend a drastically less time-consuming algorithm: 1. Watch a 1-hour video that teaches HelloWorld-stuff in Scala: https://www.youtube.com/watch?v=DzFt0YkZo8M https://www.youtube.com/watch?v=DzFt0YkZo8M 2. Then read first 45 pages (free sample) of my book https://leanpub.com/modern-web-development-with-scala https://leanpub.com/modern-web-development-with-scala