I for Interface

Coding Blocks – I for interface- Episode 1

Coding blocks podcast is presented by Joe Zack, Michael outlaw and Allen Underwood. I think I am really going to enjoy these podcast episodes because they began by talking about things that I could relate directly to. The three presenters started this episode by defining what an interface is to them. Although I have an understanding of what an interface is, hearing what is means to professional programmers gave light to some different ways of looking at what an interface is. My favorite was “ An interface can somehow be seen as the guard rail on the highway”. I think I “vibed” the most with this definition because that along the lines of what I see an interface to be. After several definitions, the question was then asked what the difference between an abstract class and an interface was. It was at this point that I realized I might have pushed the definition of an interface too far but luckily, this podcast straighten me out. The presented settled on the definition that an abstract interface contained more information and made allocations for storage unlike the interface, which just provided guides for what is to be implemented. The abstract class provided guides and instructions and also storage allocations for the type of data or information to be implemented. Wow!

Again the discussions progressed rapidly, it was discussed that an abstract class has to be inherited but an interface must be implemented. An abstract class can’t be instantiated but needs to be inherited. I thought this topic was very important because I recall the first couple of classes, we often found our selves lost in discussions to try and understand the differences and functionalities between these programing concepts. For best practices, it was mentioned that foregoing naming conventions in interfaces sometimes makes it easier to read and also utilizing underscores would group the abstract classes in the top of the file directories when looking at the directory tree structure. Also, they did advise to also prefix all interfaces that we create with an “I” so that everyone that looks at the program will know what it is. Didn’t know that was the standard in the real world.

“You can’t define constructor methods in an interface” – This means we can’t create an interface that informs the classes that are to implement the interface how those classes can be implemented. Again this is a confusing statement but by pondering on it for a few hours, it becomes pretty clear. Instead it makes sense to utilize a base class. Overall this podcast has a lot to be learned from it. They really emphasize on explaining technical concepts and terminologies. Will be posting a different episode next week.


Link – Episode 1



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s