James's story
Interviewing at Financial Times
Before I joined Makers, I was working as a financial analyst at Amazon. I got to see developers get to do very cool stuff and I wanted to be part of it. After graduation, I took 6 weeks off to go and code on my own and learn Clojure and went to lots of meetups and got to know the developer community.
Code sample
class Journey
MINIMUM_FARE = 1
MAXIMUM_FARE = 6
def initialize
@entry_station = nil
@exit_station = nil
end
def start(station)
@entry_station = station
end
def finish(station)
@exit_station = station
end
def fare
complete? ? MINIMUM_FARE : MAXIMUM_FARE
end
def complete?
@entry_station && @exit_station || @entry_station.nil? && @exit_station.nil? ? true : false
end
end
I chose to showcase this code because it demonstrates encapsulation (the internal variables are never revealed) and clear method naming. There are no surprises in this code - it will be easy for a subsequent developer to understand exactly what is going on, at a glance.
Want to hire developers like James?
Request a call