Chris Donnan : Programming - Brooklyn Style
software, trading, family, fun
Posted programming on Thursday, July 20th, 2006.
extreme_rant <<
Kill me please.
I am a Super Base Class. I am 6000 lines long. I have 150 ‘functions’ (I will not grace them by calling them methods). I also have 200 fields! I am sorta-kinda just like an old C program. The cool thing about it me - is that if you just inherit from me - you get all of my functions. Wow - isn’t inheritance awesome!
Kill me please.
Since the only way to use me - is to derive from me (I am cool and abstract) - I have proliferated greatly. I have more than 30 bastard children. Each needs maybe 1 method -er; function - but - they are all my kids anyhow. Some are doctors, some are lawyers, some are janitors. They each need some small part of me - as I am SUPER! I AM ALL!
Kill me - really.
I am very protective over my fields - they are all ‘protected’ - every field. After all - I want to share with my children! I am very open with my functions, but open to change too - all my methods are public AND virtual
Great!! I am just SOOOO flexible - it is great …. isn’t it?
AWESOME!
We ALL know the purpose of inheritance. It is so you can push ALL of the functions (functions are cool!) in your program down to the super base class - then - you just derive from it!! YES!! THAT IS IT!!
Since I have so many protected fields and so much code, so many fields, and I do SO many things. I like to have LOTS of side effects. This is a *really cool feature* I have. Since you can derive from me (as so many do) - you can also override my public members (remember they ARE virtual), there are just UNLIMITED possible states I can be in!!! I am the culmination of all possible side effects - and I am just - well - spontaneous. I do not really much like constraints, or guarantees. This is WAY too legalistic for a Super Base Class like me.
OOH OOH - here is another awesome feature…
Just to make it easier for my functions. I declare ALL of my variables at class level. Who needs to limit scope? Why bother. We are all friends here. I even leave around old friends. The functions we used to use. The variables we used to use. Since my variables are …around… I also think it is cool that I can sometimes use the same variables (fields - remember all class level fields) to do MANY MANY things. Why waste our friends - give them work since they are around.
One of my FAAAAVORITE things to do - is to reference ALL of my other quasi-super friends - via static references. We are all SOOO special - that we are ALL singletons. The net effect here is again reminiscent of a good-ole C program. We can use Object Oriented ’stuff’ AND STILL be procedural!!! Man are we awesome! GO GO GO GLOBALS - STATEFUL GLOBALS ROCK!!!
AAAAAAAAAAAARRRRRRRRRRGGGGGGGGGGGGGGGGGGHHHHHHHHHHH!!!!!!!!!!!!
-Chris (kill me)
PS - I am a windows form control - I provide ANY AND ALL SERVICES you may need! If you are elsewhere in the app - maybe not anywhere you ‘need’ a windows form control - STILL inherit from me!!!! I RULE — MMOOOHHAHAHAHAHAHA!!!!! ALL BOW BEFORE ME ….. SUPER BASE CLASS !!!!!
I AM SUPER (EVIL) BASE CLASS

2 Responses to “Super Base Class - I love inheritance”
Comment on this post below
You must be logged in to post a comment.
You can leave a response, or trackback from your own site.
















No one said that it would be cool working for your current client !!!!
Well, for the most part - I have been doing new work - which we all know is good. In any case - this week I have been killed by helping out another group - and it is not pretty! AARRGGHH!!! My consulting mantra is something like;
‘Sometimes you are the president, sometimes you are the janitor - either way - you are compensated well.’
-CD