I was introduced to real programming in the summer of 2000. Ah! WebObjects. I had done about 6 months of VB before that. Now, you know how VB is right? WebObjects (WO) was a refreshing change. True MVC. So well architected.
The problem was WO was my first real programming experience. And I was totally spoilt. Whenever I came across other technologies later, they seemed so badly done and so difficult to use that I never really let go of WO.
I still remember my first web app from the "Getting started with WebObjects" book. There was this simple app. One lesson I clearly learnt from that app was to use descriptive method names. There was a method name called (and bear with me on this):
addObjectToBothSidesOfRelationshipWithKey
Gosh, that was long!
It was a very handy method. For those of you familiar with object relationship modeling, you often have two sided relationships. For example, the class Developer may be related to the class Project. The class Project may also be related to the class Developer. Now, usually, while relating a project and a developer object, in code, you would need to manually set both sides of the relationship. WO (or rather Enterprise Objects Framework, WO's first cousin!) had this method that just did that saving the programming community roughly a million lines of code per year!
Just for kicks, if you come across a longer method name (in any language or framework, not your own program!) please let me know.
Comments
But the very reason I remember this method still is because of it's long descriptive name! So, I don't mind that at all.
removeObjectFromBothSidesOfRelationshipWithKey()
;)
ERXArrayUtilities -> filteredArrayWithFetchSpecificationNamedEntityNamedBindings
ERXExtensions -> addObjectToBothSidesOfPotentialRelationshipFromObjectWithKeyPath