My Car

29 Nov 2018

Before starting to learn software in college I thought of it as only continuous long lines of characters with no spaces. So I asked around for a more definitive explanation of what programming uses and how it was done. Then when I spoke to one of my cousins, she said to think of it as more of a car. Specifically, imagine how to make a car.

Designing my car

To design a car you need to have a frame to shape the car, you also need the windows, tires, and door, and most importantly you need the engine. Basically they result into three different patterns (structural, creational, and behavioral) that you need to program. The frame, or structural pattern, lays out the functionality or path that objects can follow. While creational patterns, like the windows and tires, may just be different classes but they relate together to become one object. Finally the engine (behavioral pattern) makes the objects all communicate together to function as one.

Another amazing thing is that the pieces make something strong together, but when seperated they can still serve as reusable second hand parts to fix other cars. These pieces are similar to design patterns which are reusable solutions to common problems in software.

Driving my car

I have recently used a function called map, which helps me with my software engineering course’s final project. The map function is also like one of the cars pieces, it can be used to produce multiple results. It comes from the Javascript underscore library along with other similar functions. It mainly works by mapping values as a list into a new array. I have used it in accessing each club info in the club collection and display each clubs image, name, website, description, contact and interest areas.