Week 27 – Arrays and Inheritance

This week it has been an interesting challenge. This is the first group assignment, and we’ve split the work the best way it makes sense. We’ve each have tried to make sure each part make sense and tried to best keep the work both even and collaborative. One of the best and most rewarding components is reviewing each other’s code. In a collaborative project, each person brings their own patterns and styles, and even with a style guide, it still means we need to agree on what works best for the team. I think we’ve struck a good balance on that right now and hopefully it will translate to better quality code as we communicate with each other.

In the past, both as a student and as a professional, I’ve worked a number of times with multi-dimensional arrays. Normally This arrays are not very large since they represent grids in some sort. However, I’ve had to deal with graphs that span several hundred columns and rows. Rows representing user levels, and columns that represent possible attributes, combinations, equipments, etc. This can be incredibly unwieldy and they’re not easy to manage. However, they remain one of the most efficient ways to access the data.

There isn’t an specific number that makes the specifically unwieldy. I’ve found that as long as the data makes sense and the array is properly organized, the arrays can be as large as they need be. However, even a small array of a dozen elements, that offers no predictability can be a disaster of a structure. I’ve found that it’s best when arrays don’t have gaps.

On a different note, inheritance is in great part the foundation to web development. Frameworks like Rails or Sinatra in ruby, or Leaf for PHP rely heavily on inheritance. To me, it’s both the hardest part to get right, but also the most useful. Proper abstraction can make a framework easy to use, and powerful. But in my experience I personally tend to get bogged down on the details, and either over abstract (trying to solve every problem on the parent class), or simply leave the full implementation to the children which defeats the purpose. which is what i’m most familiar with.

This is certainly one of the goals I’m hopping to reach by the end of this class. I want to at least get the proper foundations for this basic concepts. Some of it comes with experience, but it’s also very important to highlight the theory.

This entry was posted in CST-338, CSUMB. Bookmark the permalink.