Generalization can be tricky, thinking at a higher level, as opposed to one specific example, is something that we've been having to learn as we realize that we can create programs that can help solve many instances of different, but similar problems. One of the types of ADT's we've talked about in length is stacks.
Stacks are pretty nifty as they will only allow items to be placed on the top and removed from the top, which can be very useful for a variety of problems one will encounter in their computer science career. Some real world examples would include: tracking functions calls, or even tracking visited pages in google chrome or firefox.
The most important thing to note when talking about ADT's is that if you're looking to create one, DONT FOR THE LOVE OF GOD focus on the details, but focus on, what can I do with this stack? How can I use it to the best of my advantage and for what kinds of problems? Because by not worrying about the details, you could then implement your stack or other ADT in a different language. Though I don't see the immediate benefit, I'm sure as I progress, I will learn and appreciate these little nuggets of abstraction more and more.
I mean, look at Trees. We've just begun to dive into their functions, but I can already tell that these will become very useful for future projects and have a very large potential for possible future problems that we will encounter in this course as well as in the future.
No comments:
Post a Comment