From: RDA on 29 Jul 2010 19:32 So I had a phone interview not so long ago and it was going quite well, but then the interviewer asked "What are the 3 rules of object oriented programming?" and I was at a loss. I said "Well, I can explain what OOP is...but I'm not sure I know what 3 rules you're talking about..." Does anyone?
From: Ben Pfaff on 29 Jul 2010 19:51 RDA <roy.anderson(a)gmail.com> writes: > So I had a phone interview not so long ago and it was going quite > well, but then the interviewer asked "What are the 3 rules of object > oriented programming?" and I was at a loss. I said "Well, I can > explain what OOP is...but I'm not sure I know what 3 rules you're > talking about..." Encapsulation, inheritance, and polymorphism are principles or aspects of OOP. I guess in some sense those are rules. -- Ben Pfaff http://benpfaff.org
From: Pascal J. Bourguignon on 29 Jul 2010 19:54 RDA <roy.anderson(a)gmail.com> writes: > So I had a phone interview not so long ago and it was going quite > well, but then the interviewer asked "What are the 3 rules of object > oriented programming?" and I was at a loss. I said "Well, I can > explain what OOP is...but I'm not sure I know what 3 rules you're > talking about..." > > Does anyone? No, nobody does. There are rules, but mores than three, and nobody agree on what rules makes OO. -- __Pascal Bourguignon__ http://www.informatimago.com/
From: Richard Heathfield on 29 Jul 2010 19:58 RDA wrote: > So I had a phone interview not so long ago and it was going quite > well, but then the interviewer asked "What are the 3 rules of object > oriented programming?" and I was at a loss. I said "Well, I can > explain what OOP is...but I'm not sure I know what 3 rules you're > talking about..." > > Does anyone? I don't know about *the* three rules of OOP, but *my* three rules are: 1) OOP is not a silver bullet; 2) a single class hierarchy is a recipe for disaster; 3) don't try to shoehorn every OOP concept and language feature into every program. -- Richard Heathfield <http://www.cpax.org.uk> Email: -http://www. +rjh@ "Usenet is a strange place" - dmr 29 July 1999 Sig line vacant - apply within
From: BGB / cr88192 on 29 Jul 2010 20:42 "Richard Heathfield" <rjh(a)see.sig.invalid> wrote in message news:vOydnc9xaN8MiM_RnZ2dnUVZ8nednZ2d(a)bt.com... > RDA wrote: >> So I had a phone interview not so long ago and it was going quite >> well, but then the interviewer asked "What are the 3 rules of object >> oriented programming?" and I was at a loss. I said "Well, I can >> explain what OOP is...but I'm not sure I know what 3 rules you're >> talking about..." >> >> Does anyone? > > I don't know about *the* three rules of OOP, but *my* three rules are: > > 1) OOP is not a silver bullet; > 2) a single class hierarchy is a recipe for disaster; > 3) don't try to shoehorn every OOP concept and language feature into every > program. > yep, agreed... there are basically several of the major things which annoy me about many OO projects. I will add to this: always using a single class per file is annoying. sometimes, the class is very large, and options such as partial classes (in C#) make sense; other times (much more commonly), the classes are very small, and it makes sense to lump them together (it causes much annoyance to have many source files each with maybe only 10 or 15 lines...). granted, the downside here is Java, which by design enforces this little practice...
|
Next
|
Last
Pages: 1 2 3 Prev: Rapid development of desktop-like web apps Next: Position data interpolation |