|
|
|
|
|
by hiram112
3648 days ago
|
|
Learning through reading is one thing, but I've found that I never truly understand the concepts until I begin to write some code in a functional way. We have some Scala in my work environment. I had taken the course, read the book, and spent a little time writing some code, though as deadlines got tight, I would revert back to Java. It wasn't until I forced myself to write everything in Scala that some of the idiomatic patterns started to make sense. For example, an export job was timing out due to numerous synchronous calls to external services. I rewrote it using async Futures with flatmap and collect, and it was much faster. Even though I had read about Futures and their functional use a dozen different times, I realized I truly didn't understand them 'till I could apply them to a concrete problem I had. Also, Twitter puts out a lot of really good Scala stuff: Twitter school, Effective Scala, Finagle and Finatra, etc. TLDR; read the books while writing some code. |
|