Learning Scala, feeling discouraged [closed]

I’m coming from a Java background and trying to learn Scala. At the moment I’m feeling pretty overwhelmed, there seems to be so much more to learn with Scala, so many different ways of doing the same thing.

I was wondering if anyone has any advice on where to start, and how long it took them to feel reasonably competent in the language?

Even little things like for loop comprehensions seem really powerful but it’s just another piece of syntax you need to remember!

5

I’ve been where you are, and almost gave up a few times. While by no mean an expert Scala developer, I feel I now have a firm grasp on the language – certainly enough for it to have thoroughly poisoned my relationship with Java.

The first thing I did was spend a few weeks playing around, reading various blogs and introductions to the language. That was a mistake, I didn’t learn (or at least understand) much that was useful, and felt entirely out of my depths.

The second thing was to spend some time working out problem that were technically simple but forced me to explore specific aspects of the Scala syntax on my own:

  • 99 Scala Problems
  • Project Euler

While this did not turn me into an expert overnight, it gave me enough familiarity with the language that it didn’t feel quite that impossible anymore.

With that boost in confidence, I finally did what I should have started with: get Programming in Scala by Martin Odersky, and attempt to read an entire chapter every couple of days. It’s a well written and comprehensive book, and if you already have a sound programming background, should not prove too daunting. There’s no need to make your first read too painful: skip the parts marked as optional, make sure you understand the concepts but don’t get bogged down in the details (in particular, I feel that the chapters on collections are overkill and can be skimmed). Knowing that a concept exists and where to read a comprehensive explanation of how it works is a tremendous help.

An alternative to reading the book is attending the Coursera class – it’s much less comprehensive, but covers most of the crucial points and is broken down into manageable, logical units. On the other hand, I don’t know whether it’s possible to access the lessons once the class is complete, and I also found that I was much less engaged while listening to someone (even someone as obviously smart and knowledgeable as Martin Ordesky) than when reading a book.

Another issue with Scala is the amount of vocabulary you’ve got to ingest – by-name parameters? for-comprehension? closure? If you feel overwhelmed by this, I found that a good mixture of the Scala Glossary and targeted stack overflow searches helped me out a lot (seek out answers by Daniel Sobral and Travis Brown). In fact, I went so far as to create an Anki deck with the glossary, and feel it was a big help.

Finally, this is probably obvious, but code, code, code. Find a side project you can work on, even if it’s something trivial. What I did was write a very simple Amazon crawler that would send me a tweet whenever an author I was interested in released a new book. It took longer than it probably should have, but this is when I fell in love with the language.

If you get that far, you’ll probably need no further help, but a good suggestion, once you’ve come to grasp with the language, is to delve deeper in the underlying concepts. You’re familiar with OOP, try to read up on functional programming – I can say with absolute certainty that it will blow your mind. Functional Programming in Scala should be released soon(ish), but the early access edition is already excellent. Another answer suggests Functional Programming for Java Developers, which I’m not familiar with but am inclined to believe is good (when has an O’Reilly book not been worth at least skimming?).

I hope this didn’t get too long winded and obvious, and honestly wish you the best. Scala has its faults, but it’s a wonderful language and will take your brain in directions you never knew existed. And I’ll be looking for your “Learning Haskell, feeling discouraged” in a year 🙂

Scala is a very different way of thinking to Java, so don’t be discouraged! I’d probably start with Functional Programming for Java developers so that you can get into the functional way of thinking.

Is there a Java and/or Scala user group near by? It’s always easier to learn a new language with a colleague.

Best of luck and keep persevering at it!.

1

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật