Live data from Hacker News

Why we love Scala at Coursera

tech.coursera.org

111–120 of 184 posts

Re: Why we love Scala at Coursera

#111
post #79

Earlier quoted context omitted.

"Combining for-comprehensions with composable futures makes asynchronous concurrency look like straightforward synchronous code." I would really enjoy seeing this in Java.

I'd like to see the Scala code too. I've played with both and in the end, both codes are pretty complex, just complex in different ways. It's a complex problem with a lot of edge cases and tricky error cases that need to be handled properly, which is where the elegance of the language or the programming paradigm usually goes down the drain. I'd like to see a fully functional snippet of code that gracefully handles er…

for { a Use a Future + \/ monad.

Re: Why we love Scala at Coursera

#112
post #42

Earlier quoted context omitted.

I asked someone in the know, and apparently Paul Phillips is always like that. He has an interesting background -- was a pro poker player for a while.

Also happened to be the guy who wrote the most Scala code on the planet, and he quit Typesafe last year.

> Also happened to be the guy who wrote the most Scala code on the planet

I love the way he assumes that. I think he may be surprised to learn the sheer scale of some production Scala systems which aren't part of the Scala class library or compiler.

Besides, he put together a list of obscure corner cases that no practicing Scala developer actually seems to care about.

Re: Why we love Scala at Coursera

#113
post #7

All of the praise here for scala can be applied, verbatim, to Java itself. Some of the concerns are no different than Java (UTF-8), or are actually not a problem there (intellij IDE vs eclipse). While the comparison to dynamic languages is valid, this is a rather shallow discussion of scala itself.

No, not really.

Re: Why we love Scala at Coursera

#114
post #8

What is the point of articles like this? I'm not trying to be snarky; I really am trying to understand why a company would go out of its way to advertise the technology its using. Sometimes we see blog posts from devs at companies (often pretty senior) who write things like "We went with Clojure, and we've been really happy." That's clearly a geek-to-geek thing. But what is this? I mean, it's also geek-to-geek, but i…

When I first approached writing this article, I had a hard time. We have learned a lot from other companies sharing their experiences and we wanted to give back. We are doing this now because we think we have enough content to regularly write posts that will be interesting to other developers. Although we are very interested in open source projects and giving back, open source projects require significant amounts of time and energy (something at a huge premium). Because of this, we have instead adopted a policy of open source snapshots (see the README at: https://github.com/coursera/js-libraries-snapshot) for code contributions, as well as sharing what other lessons we have learned through other channels. I have spoken at AWS re:Invent, as well as written about other successes at betacs.pro, my personal blog.

As for your warfare speculation, I am happy to say it is just that. We have not had any warfare whatsoever here at Coursera. That simply is not our style. Instead, we tried out a variety of different programming languages. Through organic internal growth, we have come to adopt Scala and Play! not because of a decree but because we have found it helps us get the most done quickly, and reliably.

Re: Why we love Scala at Coursera

#115
post #61

"Refactoring a statically typed language is easier than refactoring an interpreted one; modifying existing PHP, and even Python, is a difficult chore that engineers shy away from because modifications are likely to create more bugs than they fix." Over the years I've worked pretty deeply with both static (C++/Java/Scala) and dynamic languages (Python/Ruby). I simply don't agree. The biggest thing that contributes to…

> Logic errors are generally independent of type issues

Eh ... what?! Is that some kind of joke?

https://en.wikipedia.org/wiki/Curry%E2%80%93Howard_correspon...

Re: Why we love Scala at Coursera

#116
post #61

"Refactoring a statically typed language is easier than refactoring an interpreted one; modifying existing PHP, and even Python, is a difficult chore that engineers shy away from because modifications are likely to create more bugs than they fix." Over the years I've worked pretty deeply with both static (C++/Java/Scala) and dynamic languages (Python/Ruby). I simply don't agree. The biggest thing that contributes to…

I've only used static languages and therefore never had to make unit tests. Unit tests should exists for certain business rules, not every line of code.

...sorry to have to ask, but this was sarcasm, right?

Re: Why we love Scala at Coursera

#117
post #97

I enjoyed reading this article, but does anyone who doesn't already understand what they're saying understand after reading something like: "Play's reactive core and asynchronous libraries (e.g. WS) integrate seamlessly with other powerful concurrency primitives in the ecosystem such as Akka’s actors. Combining for-comprehensions with composable futures makes asynchronous concurrency look like straightforward synchro…

A for-comprehension from our production code:

  for {
    createResult  
That code asynchronously updates both ElasticSearch and Neo4j. Those functions all return Scala futures containing JSON values. First the new object is created in Neo and then the index in ES is updated accordingly. This is in a controller action in a Play project where it's critical to keep everything non-blocking. If everything is successful, Play returns a 201 result to the requestor, otherwise there are error handling functions elsewhere that kick in.

Re: Why we love Scala at Coursera

#118

Earlier quoted context omitted.

All unit test assertions can be caught by a type checker.

Assuming you are sarcastically dismissing typed language defenses, as if people promoting typed languages have the position that tests are not necessary.

No, I'm simply stating the fact that there are type systems capable of encoding assertions.

Re: Why we love Scala at Coursera

#119
> Refactoring a statically typed language is easier than refactoring an interpreted one

Compiled vs interpreted is very different than dynamically typed vs statically type! Yes, I can't name any statically typed language that is interpreted (or that has an interpreter actually used in production, to be more exact), but we're still talking about different things.

I guess this is some kind o "semantic typo", but... really? Am I supposed to trust the opinion of whoever wrote this?!

Re: Why we love Scala at Coursera

#120
post #8

What is the point of articles like this? I'm not trying to be snarky; I really am trying to understand why a company would go out of its way to advertise the technology its using. Sometimes we see blog posts from devs at companies (often pretty senior) who write things like "We went with Clojure, and we've been really happy." That's clearly a geek-to-geek thing. But what is this? I mean, it's also geek-to-geek, but i…

many reasons:

1. "a company" is not monolithic entity, it's a collection of people. a lot of the people at coursera are clearly scala enthusiasts, and blog posts about how well your (especially non-mainstream) language worked for you are a popular way of participating in the programming community. likewise, someone with decision making power decided that posting articles like this on the official company blog was part of the culture they were trying to foster at coursera (or, alternatively, that the company is small enough that people just collectively decided that it would be a nice idea for developers to do that).

2. even viewing it in pure utility terms for coursera-as-an-entity, it makes a lot of sense to encourage scala adoption. the economics of open source make it so that the more people are invested in your particular ecosystem, the better it works for everyone.

3. as other people have pointed out, it makes a great hiring advertisement for people who like using scala and want a job where they can do that. also, tying in to point 1, it advertises coursera as the sort of company where developers can post articles like this to the company blog, which implies a company culture that values both its developers and their "do things the right way" mentality.

Post reply on HN