First time posting.
I know this is a very generalized question, sorry for that, I don't know how to more appropriately word this.
I've noticed a tread, a pattern in methods, it seems in almost all methods, for example, in Java (haven't programmed much in other languages although I would imagine it's the same) the method seems to share a general pattern in their creations.
It's something on the order of: - Create local variables to store/copy things from instance variables - Create a loop to iterate through things - Create a series of if statements/conditions, possibly accessing premade methods - Check for any sort of possible exceptions/problems along the way - Return the desired output of the operations from the above
And all the other aspects such as polymorphism, recursion, interfaces, inheritance seem to be conceptual features/additions to the codes performance and functionality
Is this true? I know that each method is unique and a special combination of the above is probably require. Generally speaking do most methods follow a pattern? Is there a better way of writing out the above list, in a more formal way?
Thank you, I appreciate you taking the time to read this post.