Designing a Pattern that's different all the same

29 Nov 2018

When I first hear of desgin patterns, I think of are flowers. A great example is a sunflower, all of its little buds are independent but are so uniform together. Another example is having a bunch of lines and making a uniform, good looking picture. Things like a drawn star or even a really great sketch of a person can be drawn with only lines and still look great. My point is a design pattern is somehting that uses a very similar style to create or edit. My passion is video games and I see a lot of design patterns in all sorts of games. If you compare multiple games made by one company, you can distinguish a simlarity between all of them in looks, sounds, and content. But when you compare their games to another company then you will get totally different design. My last example are movies. Everytime I watch a Michael Bay movie it has this form of lighting that I see in no other movie. While Disney 3D animation movies have a very similar style between all the movies like the movement of characters, style of songs, etc. I find many similarities in the style of Moana and Frozen.

Design patterns in coding is the same way as the examples above. The way it’s formatted, why it’s formatted, and the purpose of the code. I think my style is to just get the task done with little consideration on making it better. If you tell me to make a factorial function, I would make it almost the same everytime. While someone might use a totally different method and format their code differently also. A great example of my coding design is trying to group things up like:

if (a > 0) {
  int b;
  a++;
  b += function(a) + b;
  return b;
}

I like to add spaces after terms but leave the last space untouched. I also have all the code lines one after another within an if, function, etc. Above is an accurate showcase of my coding design pattern. However, I would not be able to make a flower in my code, ever.