Live data from Hacker News

Scala School

twitter.github.io

21–30 of 77 posts

Re: Scala School

#21

Starting 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.

The danger of that approach is that, in my experience, it's more likely to turn someone away from Scala. At my last job, some of the engineers did write Java in Scala. In what I'm sure is not a coincidence, they were also the ones who disliked Scala the most, and felt that it was detrimental to our codebase. By not learning its differentiating features, all they saw was the burden of having two languages, library support, spotty IDE, painful Scala upgrades, etc. In fact, since I've left, I've heard that they are migrating a lot of the Scala back to Java; the effort is being led by those who never wrote idiomatic Scala. Again, I'm sure this is not a coincidence.

Re: Scala School

#22
This 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 :)

Re: Scala School

#23

Starting 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.

Pattern matching, immutability, option types, combinators, traits are not advanced features in Scala. They are fundamental concepts. To be productive in Scala, write in Scala. Otherwise, you will needlessly waste a huge chunk of your life, including having to go back and clean up your messes.

Re: Scala School

#24
I'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?

Re: Scala School

#25
post #24

I'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?

sbt + sublime is certainly sufficient. I program in Scala all day long. I know many developers use the IntelliJ IDE.

Re: Scala School

#26

Earlier quoted context omitted.

That 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).

...and the only way you learn how to write more elegant code is to start writing code...

In my experience, jumping straight to writing code results, if anything, in a huge mess. For anything more complex than proof of concept programs for specific language or library features, this quickly becomes unmanageable.

I have obtained much better results by first developing a nice logical model (not necessarily 100% formal, but at least rigorous enough to be amenable to formalization), and only then picking a programming language into which the model can be translated with a minimum amount of effort. In this regard, a good language is one that allows translating as many logical constraints as possible into statically verifiable constructs (such as types). The nice thing about static verification is that errors in the translation can be detected as soon as you make them. Heck, in some cases, even errors in the original conceptual design can be detected.

Scala is a better language than Java because its type system is so much more powerful. Using Scala as if it were Java nullifies this advantage, and leaves you only with the inconvenience of having to learn a new syntax. So, what is the point?

Re: Scala School

#27

Earlier quoted context omitted.

As 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.

What 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

Whenever 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.

Re: Scala School

#28
post #15

Earlier quoted context omitted.

That 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).

It'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 w…

Learning 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.

Re: Scala School

#29
I'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?

Re: Scala School

#30
post #29

I'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?

Send me your resume: jorge@foursquare.com
Post reply on HN