Skip to content

Instantly share code, notes, and snippets.

@adnanced
Last active October 24, 2018 14:38
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save adnanced/11e9bb1d4abba1b2ecd953deab168683 to your computer and use it in GitHub Desktop.
Save adnanced/11e9bb1d4abba1b2ecd953deab168683 to your computer and use it in GitHub Desktop.
Scala school questions
  • Scala syntax

    • How well do you know Option/Try/Either/Future types from Scala standard library?
      • I don't use them
      • I use them, but I don't see clear benefits
      • I use them and understand the benefits, but I struggle with them
      • I fully understand why we use them and have no problems with them
    • How do you get and combine values from those types mentioned above?
      • I don't
      • I use map/flatMap most of the time
      • I try using for-comprehension most of the time
      • I fallback to match/case (arrow) pattern matching when it's getting more complicated
    • How often you use implicit parameters
      • Whatever those are...
      • I use them to change the way my functions are executing their logic
      • They only bring unclarity and can be dangerous, so I just pass values explicitly
      • I always mix them up with other implicits
    • Context bounds are something related to...
      • syntactic sugar for implicit parameter on specific type
      • something that is related to class inheritance
      • domain driven design, not Scala
    • I feel that immutable variables/collections are...
      • solving some problems with multithreading, but are bringing other problems
      • only the way functional programming works
      • only slowing me down, I would rather use mutable variables/collections
      • simplifying the reasoning and predictability of my applications as well as easier parallel processing
    • Which benefits do you see in lazy evaluation?
      • Pure functional programming would be impossible without it (ignoring the-end-of-the-world)
      • Except making code more complicated, not much
      • I use them sometimes for better performance and to pass functions as arguments
    • How often do you end up using Future[Either[Error, T]] in your application?
      • I'm not familiar with it
      • Why using Either when you can throw exceptions?
      • I want to use it most of the time, but getting values from them is tedious
      • I use something equivalent or better with the help of functional libraries
      • I use them together with monadic transformers
    • Do you use ADT in your applications?
      • Never
      • I've heard about it, but I'm not using them much
      • I use it whenever I can
    • Are you familiar with concept of higher-kinded types?
      • Not really
      • Yes, and I'm using it as much as possible to make my code more general
      • Yes, but I rarely have a need to think about it
  • FP concepts

    • Do you use some libraries for functional programming (cats, scalaz)?
      • I use them in production
      • No, but I know about them from books or articles
      • I tried them on my own, but not on production code
      • Never heard about them
    • Do you know what pure function is?
      • I'm not really sure
      • Yes, and I write all my functions as pure functions
      • Yes, but I find hard accepting that concept in real applications
    • Do you think that Future[T] from standard library is referentially transparent?
      • Of course, it is
      • Nope
      • I don't know what is referential transparency
    • Are you using typeclasses in your daily business?
      • Yes!
      • I think I do
      • I've heard about them, but don't use them
    • Are you familiar with concepts of monoid, functor, applicative and monad and why do we have them?
      • No, I don't
      • They are too confusing for me
      • Yes and yes
      • Only in theory, didn't use them in practice
    • Does any of following terms ring a bell for you: monadic transformers, free monad, tagless final, IO monad
      • Yes, all of them
      • No, I'm not into those things
      • Yes, but not all of them
  • General

    • How many tests usually fail when you refactor one function which is not used a lot in the project?
      • None
      • One or two
      • Many of them
    • When I'm designing my application, I create classes that...
      • are containing data and functions that are working with that data
      • are containing only data, functions for that data is defined elsewhere
      • are containing everything related to this entity
    • Which approach you take to test functionalities that are using external libraries (AWS SDK for example)?
      • I just mock all of them
      • I wrap everything related to them in separated classes and mock them
      • I dockerize the service or add a library in project that emulates that service
      • Something else
  • Tooling, patterns and libs

    • play framework questions?
    • Which JSON library do you use most of the time?
      • Play JSON all the way down
      • Circe
      • Some Java library
      • Something else
    • Which mocking library do you use most of the time?
      • mockito
      • ScalaMock
      • Because of tagless final I never or rarely use it
    • Did you ever use shapeless library?
      • I'm not familiar with that library
      • Yes
      • I rarely find a reason for it
  • Free text fields:

    • What are your biggest pain points when you're working with Scala?
    • What would you expect from a Scala school?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment