Live data from Hacker News

Why we love Scala at Coursera

tech.coursera.org

61–70 of 184 posts

Re: Why we love Scala at Coursera

#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 refactorability has nothing to do with type safety. Instead unit test coverage, by a mile, is the thing that makes code easy to refactor. In my experience issues of type safety are rare. The same types of bugs are going to crop up in Scala, Python, Java, or even Fortran unless you have tests to help you discover those issues.

I've long felt that type safety is largely a solution to a problem that doesn't really exist. Not in a hugely meaningful way at least. Logic errors are generally independent of type issues, and as such it is code quality and unit test coverage, more than any specific language feature, that lead to highly flexible (and therefore refactorable) code.

Re: Why we love Scala at Coursera

#63
post #27

It's good to see Scala getting some love after all those "i hate scala" rants (many of which seemed to be written by people who haven't spent much time with the language). We're using it at work for essentially all new development. Although I have complaints, I can't think of another language or environment that I've used that's been so satisfying and free from overall irritation. In practice, we don't get code that'…

They looked at it once, couldn't understand it, and smashed their screen.

Re: Why we love Scala at Coursera

#64
post #56

Earlier quoted context omitted.

We've had the same experience with Scala. It's the most enjoyable language I've ever coded in. We switched away from Java for most new development a while back already. The anti-Scala rants are just confusing to us. Most of the people complaining just seem to be random non-Scala developers recycling other peoples' criticisms.

I hear Java people say "I love scala" a lot. I do not hear people coming from other environments saying this.

At a guess, base rate fallacy and typing. The java community is huge, so even a small percentage of happy scala converts translates into a large absolute number. People from dynamic languages (Ruby, Python) are probably averse to Static Typing which puts them off.

Re: Why we love Scala at Coursera

#65
post #27

It's good to see Scala getting some love after all those "i hate scala" rants (many of which seemed to be written by people who haven't spent much time with the language). We're using it at work for essentially all new development. Although I have complaints, I can't think of another language or environment that I've used that's been so satisfying and free from overall irritation. In practice, we don't get code that'…

We've had the same experience with Scala. It's the most enjoyable language I've ever coded in. We switched away from Java for most new development a while back already. The anti-Scala rants are just confusing to us. Most of the people complaining just seem to be random non-Scala developers recycling other peoples' criticisms.

I've gone Ruby->Java->Scala->Java->Scala over the last five years.

Scala was terrible two years ago. All the tools were broken, and every point release broke binary compatibility, so that jar dependency hell was amplified immensely.

Now, there's things I don't like, but it all mostly just works. It seems like this started around 2.10. So I just appreciate a language that is more expressive than Java, with all the things I like about the jvm.

Re: Why we love Scala at Coursera

#66
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…

> The biggest thing that contributes to refactorability has nothing to do with type safety. Instead unit test coverage, by a mile, is the thing that makes code easy to refactor

Type Safety is Unit Test Coverage.

Typing is a statically checked test of correctness of your program.

Languages like C give static typing a bad name. Types are not things like 'float', 'int', 'double'. Types are 'degrees', or 'radians'. Types are 'buy', or 'sell', 'price' or 'yield'. Types guarantee that your code executes as you expect, and prevent you from writing incorrect code in the first place.

Is it 100% effective? No. But there's a reason that high level statically typed languages (Scala, Haskell, OCaml) usually work correctly after they compile.

Re: Why we love Scala at Coursera

#67
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…

Because the engineers are in charge.

Coursera was founded by programmers and is dominated by programmers.

I'm not saying that's always a bad thing - Google is dominated by engineers and it is an engineering company.

But I have been surprised by how few people (zero, from what I can see) they have hired who specialize in education and learning, which I thought was the business of Coursera.

Re: Why we love Scala at Coursera

#68
post #25

the whole "live reload" capability of play is a gimmick because in real life making a code change in a medium to large project is like watching grass grow - every change you make takes minutes to compile and reload.

SBT 0.13.2 will ship with a smarter incremental compiler: https://github.com/sbt/sbt/issues/1010

This avoids pessimistic recompilation in many cases, in particular when editing the routes files in Play.

Test results:

https://gist.github.com/jroper/6374383

Re: Why we love Scala at Coursera

#69
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.

Re: Why we love Scala at Coursera

#70
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…

> The biggest thing that contributes to refactorability has nothing to do with type safety. Instead unit test coverage, by a mile, is the thing that makes code easy to refactor Type Safety is Unit Test Coverage. Typing is a statically checked test of correctness of your program. Languages like C give static typing a bad name. Types are not things like 'float', 'int', 'double'. Types are 'degrees', or 'radians'. Types…

> usually work correctly after they compile

I still don't buy in to this trope.

Q: What is true of every single bug in production?

A: It passed both your type checker and your tests.

Post reply on HN