Skip to content

Instantly share code, notes, and snippets.

@darkiri
Forked from adnanced/scala-school-questions.md
Last active October 24, 2018 16:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save darkiri/63c86a3f03217c5e705b5325709c1db1 to your computer and use it in GitHub Desktop.
Save darkiri/63c86a3f03217c5e705b5325709c1db1 to your computer and use it in GitHub Desktop.
Scala school questions
  • Scala syntax 5 questions - should be enough (?), there are question for beginner, intermediate and more advanced stuff. If not enough, more possible themes: type tags, dependent types...

    • How well do you know Option/Try/Either types from Scala standard library?
      • I heard about 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 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
    • 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
    • Are you familiar with 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 know what pure function is?
      • I have heard about such concept
      • Yes, and I often apply pure functions in real application
      • Yes, but I find this a very generic concept, which I couldn't easealy apply in real applications
    • I feel that immutable variables/collections are...
      • solving some problems with multithreading, but 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
    • Do you use ADT in your applications?
      • I don't know what 'ADT' is
      • I've heard about it, but nor sure why it should matter
      • I use it whenever I can
    • What do you think of the Future[T] from standard library?
      • It works just good
      • I heard about some objections against Futures, but it does not matter in real life
      • I heard about some objections against Futures, but don't know any better tools
      • I prefer other tools, which are referential transparent
    • 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

    • Are you using typeclasses in your daily business?
    • Yes!
    • I think I do
    • I've heard about them, but don't use them
    • 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
    • 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