all tags

Pages tagged with "Scala":

Give Me Smarter Objects

18 Jun 2018 , tagged: Scala, OOP, Object Oriented Design, Code Smells, Refactoring

A coding exercise I do once in a while is writing Battleship. It’s a fun little exercise, comes with a slew of interesting decisions, and every once in a while I do this exercise with a candidate as part of the interview process. It’s always exciting to see what other developers come up with. Today I was doing the exercise and I contemplated on the primitive obsession code smell that always seems to creep into my code and saw a beautiful way to apply the extract class refactoring that very succinctly shows how nice object oriented programming can be.

read more →

null, Software Design, and Scala's Option

26 May 2018 , tagged: Scala, Software Development, null, TypeScript, Go, Golang

For the past year or so I’ve been writing a lot of Scala and fallen in love with its Option type and how it allows me to avoid nulls. I reflected on null, why they are bad, and how optional types allow you to write more expressive code. What is null? Most programming languages have the concept of null (or nil) that represents the absence of a given value or object.

read more →