Reddit reviews Functional Programming in Scala
We found 19 Reddit comments about Functional Programming in Scala. Here are the top ones, ranked by their Reddit score.
We found 19 Reddit comments about Functional Programming in Scala. Here are the top ones, ranked by their Reddit score.
This is all well said, and reinforces a fundamental philosophical point that is rarely discussed explicitly: you can view developers as interchangeable cogs and adopt a marching hordes "more is better" "HR" strategy, or you can adopt a "we need the right people to judge what the right technology is, do what we must to convince the best to join us, and develop a culture of ongoing learning both internally and externally." We at Verizon OnCue (for whom I obviously do not speak, right?) are keenly aware of the challenges Jim mentions, with an engineering staff of well over 200 people, and having made big commitments to Scala and the Typelevel stack, including especially scalaz and scalaz-stream. We've open sourced some of our work; we run reading groups on Functional Programming in Scala; we host meetups; we present our work at conferences, etc.
What we don't do is introduce scalaz into the codebase so we can use the
WriterT
monad transformer to add logging to our request/response pipeline. For one thing, we wrote Journal for that. For another, the FP community is moving away from monad transformer stacks (see also the previous paragraph's last link).So yes, Jim has identified a problem... just not with Scala or scalaz.
I feel like Functional Programming in Scala is the obvious answer here.
I've posted this before but I'll repost it here:
Now in terms of the question that you ask in the title - this is what I recommend:
Job Interview Prep
Junior Software Engineer Reading List
Read This First
Fundementals
Understanding Professional Software Environments
Mentality
History
Mid Level Software Engineer Reading List
Read This First
Fundementals
Software Design
Software Engineering Skill Sets
Databases
User Experience
Mentality
History
Specialist Skills
In spite of the fact that many of these won't apply to your specific job I still recommend reading them for the insight, they'll give you into programming language and technology design.
Io lavoro come sviluppatore ormai da diversi anni, anch'io non laureato (o meglio, laureato lo sarei, ma in un ambito piuttosto distante dall'informatica).
Le difficoltà maggiori all'inizio le ho incontrate quando si trattava di andare un pelino oltre al "giocare col lego" con linguaggi e framework (rigorosamente di alto livello): i fondamentali di come funzionano le reti e i protocolli, le strutture dati e gli algoritmi. Il primo ambito sto ancora cercando di approfondirlo bene, per strutture dati e algoritmi all'epoca mi consigliarono Introduction to Algorithms e devo dire che mi ci sono trovato abbastanza bene, seppure l'ho trovato noioso da seguire.
Mi è tornato relativamente più utile approfondire i linguaggi funzionali. Il classico in tal senso è Purely Functional Data Structures, ma a me è piaciuto di più Functional Programming in Scala.
The feedback about "jargon for development" can be solved by going through some books cover to cover, making sure you understand the theory, and implementing the exercises. I understand that feedback to mean that the person who gave the feedback believes there is too high a chance you will inflict damage on the codebase by making decisions not grounded in solid theory.
Examples of titles that are classics and widely known:
Algorithms (4th Edition): https://www.amazon.com/Algorithms-4th-Robert-Sedgewick/dp/032157351X (there is an accompanying coursera course).
Code Complete: https://www.amazon.com/Code-Complete-Practical-Handbook-Construction/dp/0735619670/ref=sr_1_1?s=books&ie=UTF8&qid=1469249272&sr=1-1&keywords=code+complete
Clean Code: https://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882/ref=sr_1_1?s=books&ie=UTF8&qid=1469249283&sr=1-1&keywords=clean+code
Functional Programming in Scala: https://www.amazon.com/Functional-Programming-Scala-Paul-Chiusano/dp/1617290653/ref=sr_1_2?s=books&ie=UTF8&qid=1469249345&sr=1-2&keywords=scala
Learning Python: https://www.amazon.com/Learning-Python-5th-Mark-Lutz/dp/1449355730/ref=sr_1_1?s=books&ie=UTF8&qid=1469249357&sr=1-1&keywords=learning+python
Effective Java: https://www.amazon.com/Effective-Java-2nd-Joshua-Bloch/dp/0321356683/ref=sr_1_5?s=books&ie=UTF8&qid=1469249369&sr=1-5&keywords=java
Haskell Programming From First Principles: http://haskellbook.com/
I included multiple languages as well as language-agnostic ones. Functional programming is the near-to-medium term future of software engineering, and most languages converging towards that as they add functional features.
I don't think bootcamp is required. Learning how to learn is the most important thing. If you get into these books, lose track of time, and feel "aha! that's how these things that I previously thought were unrelated are actually the same thing!", and are able to keep it up for weeks, then that is a good sign that you can get to where you want to be.
I wouldn't be scared of functional programming or Scala. If you've been writing PySpark jobs then you're probably using Python in a functional way itself. From the testing I've done with Spark and Scala it's almost impossible to not write functional Spark jobs as that's how Spark is designed. I would equally say a lot of Scala devs probably aren't using Scala in a purely functional way anyway.
I say just get stuck in using Spark/Scala based on your PySpark knowledge and see how far you get. If you get stuck and feel you need a cleaner understanding of functional programming / scala, try this book:
http://www.amazon.co.uk/Functional-Programming-Scala-Paul-Chiusano/dp/1617290653/ref=sr_1_3?ie=UTF8&qid=1451992580&sr=8-3&keywords=scala
Functional Programming in Scala and a few others.
I'm not sure what you are asking for is possible. The difficulty is that you need to somehow express a type signature that is impossible to express in other languages, and there is no pseudocode convention for the concept! You could look at, say, the implementation of
sequence
, and know that it works forMaybe
,Either
, and lots of other data types that come equipped with aMonad
, but that implementation and type signature is going to be greek to you if you don't know Haskell. So basically, you just have to "trust" that it is a similar sort of thing to other abstractions likeIEnumerable
or whatever--it saves you from having to duplicate code.IMO the benefits of monads and other abstractions only become clear after you've used and written enough functional libraries to really feel the code duplication problem solved by monads and their ilk. Until that point, it's difficult to grok. I know this isn't all that satisfying. :(
I co-wrote a book on Scala and we decided to hold off on even mentioning monads until more than halfway through the book, instead focusing on getting the reader lots of practice with the functional style using concrete examples. By the time we finally do introduce abstractions like monads, the reader had lots of concrete examples and (we hoped) a gut feeling for the code duplication problem that needed solving. I think this worked reasonably well for people, but even then it is still a bit of leap!
Kotlin in Action seems to be the best reviewed on Amazon. I believe that anything specific to Android and Kotlin is not necessary since they're separate things that will convert pretty seamlessly. As for learning Kotlin, I'd recommend the Kotlin reference and good ol' google for any questions you might have. For a tutorial type series, Kotlin koans seems to be the best bet.
I personally came from Java then Swift within the last year. Kotlin so far has just been trial and error but not terribly difficult. If you want to buy a book to help with Kotlin, I'd do the koans series then buy something for functional programming. Possibly Functional Programming in Scala or the Java book from the same publisher. I've read a lot on functional programming and some stuff on lambda calculus. Outside of picking up haskell, just programming it the best you can and learning some of the basics from something like the funfunfunction series then build from there. Books can tell you theory but program design comes from experience.
EDIT: One thing that hasn't been inherently obvious so far was lambda expressions in Android. They seem like a powerful way to get things done effectively. Make sure you're using them when it seems appropriate.
Read books! Implement small projects.
Underscore.io recently open-sourced all of their books. Essential Scala is quite good imo: http://underscore.io/books/essential-scala/
Another great book is Scala for the Impatient, but it's more of a crash course in scala than a book on FP in scala.
If you want a great book on functional programming as an idea, 'Functional Programming in Scala' is great. It's not really a book on how to program in scala, but more of a general FP book which happens to be in scala. Many of its ideas can be translated into C#.
Underscore.io's other book, Advanced Scala With Cats is good too, but imo should wait until you've read 'Functional Programming in Scala'.
I think you're entirely correct about this. There is definitely a lot of value in being precise in our words. Paul is an exceptional writer - very experienced and accomplished in writing with great precision. His book about functional programming is one of the best books I've ever read, period. Believe me, he understands your point very well.
However, this kind of writing is not fun and we end up sacrificing true innovation for the sake of "correctness". I've spent a lot of time blogging. All of the high-traffic posts I've written received the same kinds of nitpicking that Paul is writing about. I've noticed that I now spend a lot more time revising my words - and with each revision the words become tamer and tamer until there's often no real substantial content left. At this point, the joy of writing is gone and it feels impossible to explore the interesting topics that make programming fun. Often I don't even post my writing because the painful thought of the unsubstantial nitpicking feels like a bigger burden than the joy that comes from expressing the ideas.
I wonder how many great ideas never made it into the public light due to fear of this type of nitpicking. I understand the quality impact of nitpicking, but I often wonder if the cost is greater than the value.
I liked https://www.amazon.com/Functional-Programming-Scala-Paul-Chiusano/dp/1617290653 and https://underscore.io/books/advanced-scala/
Underscore has other free books too.
I did what I could from those books , wrote Scala and then went back to the those books. Haskell is cool too. I've found it pretty hard even though I'm comfortable in Scala. There's r/Scala too
Absolutely, it's a very clean and easy to use language. It is object oriented and functional which allows someone who has never done functional programming to ease themselves in. Before I started learning scala I only knew python so it was nice that brackets and semicolons weren't really necessary. Higher-order functions are fantastic. /u/bananaboatshoes brings up a good point that scala builds on the jvm so it's usability is the same as java. It also allows you to use java libraries in scala pretty easily. Once you have learned scala going back and picking up java is fairly easy if you find it necessary.
 
I'll see if I can't conjure up a few resources.
Scala website
The book I read
A good book on functional programming
 
I hope this all is formatted correctly I'm fairly new to commenting on reddit.
*Edited my formatting
I highly recommend this book by two of my friends. One of the big problems when learning FP from an imperative, stateful background is that the "why"s aren't adequately explained, and when you only know just a bit of FP but haven't gone all the way down the rabbit hole things look uglier than they are. This book does an excellent job of handling both.
best book
Yup, you're right! It looks like MDN recommends
+
overconcat
for performance reasons, but both are functionally equivalent.And thanks for the kind words, they mean a lot!
The one book that really helped me was Functional Programming in Scala, I can't recommend it enough. It takes a very 'exploratory' approach, and has lots of exercises which are very helpful.
Scala was probably the best language for me to learn fp in, since I had lots of experience with JS & the syntax is very similar to it, hope that helps!
http://www.amazon.com/Functional-Programming-Scala-Paul-Chiusano/dp/1617290653
http://www.manning.com/bjarnason/
(ebook)
US beginner here
In general jobs are better in big cities than in rural areas. Look in places like Paris, Berlin, etc. In addition, keep in mind that a lot of companies don't know how to hire Scala developers. They list insane amounts of Java experience as a prerequisite thinking that a Scala developers is a glorified Java developer when in fact it's different. That being said, the good ones will actually care if you know functional programming. Start with the basics - core language
https://github.com/aashack/programming_in_scala_2nd/blob/master/Programming%20in%20Scala%2C%202nd%20edition%20(Artima%2C%202011%2C%200981531644)(1).pdf
Functional Programming
https://www.amazon.com/Functional-Programming-Scala-Paul-Chiusano/dp/1617290653/ref=sr_1_1?s=books&ie=UTF8&qid=1467346928&sr=1-1&keywords=functional+programming+in+Scala
From then people tend to go either toward big data (Spark, Scala wrapper for Hadoop) or toward web dev (Akka, Play). Big data pays more, lol. If you're getting a masters degree, the big data tests don't actually need you to know much Scala - just be able to solve simple programming puzzles. If you need to do ground up backend infrastructure with a team (like with actual design patterns and scalaz and what not), actually getting a job is hell because all the senior devs take up the jobs and if you want them you have them you impress the hell out of your interviewer (at least I had to) and also your interviewer has to be open minded (if they say something like "5+ years Java for Scala position", you're screwed). Java jobs are easier to find, and you don't have to travel to big cities, but they pay less.
Async programming is just programming using the Future Monad, but with the boilerplate of the Future Monad removed.
​
For me to understand it, I first understood what a Monad is, then I understood how a future or promise (async) is a Monad. In my opinion, the most thorough way to learn what a Monad is is by learning functional programming such as https://www.amazon.com/Functional-Programming-Scala-Paul-Chiusano/dp/1617290653 . The very short explanation is that a monad is a chain of computations. The chain typically looks like this:
​
Foo.andThen( someLambda andThen ( someLamdbda and Bar ) )
​
Basically, the "andThen"'s continue the chain of computation and the chain typically ends with an "and" or something to that effect instead of an "andThen". The async keyword in say JavaScript (there is a library for it in Scala) just hides the boilerplate so you don't have to write "andThen andThen andThen"
​
I don't know if you'll understand this, but I made a video explaining it in Scala a while back:
​
Monads in Scala: https://youtu.be/mXUze0vH-PQ
Futures in Scala: https://youtu.be/JPbeFZn3OV0
​
From this series that I made: https://www.youtube.com/playlist?list=PLXcr3tdUCbQb6zjN6kw4s20joId2jygUe