Viola's story
Junior Software Engineer at Trayport on £41,000
Before Makers, I was working in advertising and telly with Charlie Brooker! I wanted to do something more objective and I felt I had not been challenged since graduating from Oxford. Makers made me realise that what I like to do is learn stuff so I just keep on learning. I don't see anything as scary anymore and I see it as an opportunity to learn.
Code sample
class Client
attr_reader :account
def initialize(account=Account)
@account = account.new
end
def deposit(amount)
process_transaction(amount, :credit)
end
def withdraw(amount)
process_transaction(amount, :debit)
end
def show_statement(order=:descending)
puts(account.compile_statement(order))
end
private
def process_transaction(amount, type)
account.balance = account.new_action(amount, type)
end
end
This code works nicely because it uses dependency injection and delegation to ensure that the Client class has a clear responsibility to understand an account, without becoming overly coupled to the Account class.
Want to hire developers like Viola?
Request a call