week three

Rich
Makers
Published in
2 min readApr 30, 2020

--

this week i have continued working on the Makers Academy mastery-learning curriculum, still focussing on understanding Ruby. however, my main focus has been on object orientated programming which i will talk about shortly.

as week three comes to an end, i have noticed in myself that i am working and learning in a different way to the last. i can see this in the results i achieve. whats changed? well, i have slowed things down. in my previous life i worked as a recruiter, which in reality is a fast paced, time kills deals, always be closing environment, so i learnt to work at speed to get things over the line. this does not work when learning how to program.

Makers emphasise that learning to program is not about getting the answer straight away if stuck, but to find things out for yourself. it’s about teaching students how to work autonomously, using additional resources, asking your peer for help, trying things out and even using Google(!). Makers do not give you the answer to the problem, instead they teach you how to find the answer.

so, object orientated programming (OOP), what is it? over the last few weeks i have been able to get my head around variables, control flow, looping and iteration but struggled with the concept of OOP. but i think i get it. OOP allows me to organise and re-use my code allowing me to not repeat myself: DRY (don’t repeat yourself). i can achieve this by using the concept of objects and classes. what are these?

a class (classification) is like a factory that produces objects to which we can then encapsulate data and behaviour to. for example if you think of a bicycle factory, that would be the class, a bicycle would be the object, its colour and size would be its data and changing gears or breaking would be the behaviour.

we call data attributes and behaviour methods in OOP. considering this concept, we can allow objects to interact with each other depedant on the desired outcome of the program. essentially an object is an empty entity and we need to assign something to it to function. here i have created the class Band with two methods inside of it (apparently George Harrison said a guitar makes a wah wah noise.) this blog explains Ruby classes in more detail.

See you next week!

if you enjoyed this post please clap or share for others to view. i read so many blogs in preparation for my career transition and they really helped.

as i write this post, i am listening to:

George Harrison — Wah Wah

--

--