Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Homework for developers . . .

  • 30-11-2008 6:46pm
    #1
    Registered Users, Registered Users 2 Posts: 190 ✭✭


    Hi All

    I'm currently in the middle of a correspondance programming course (vb.net, SQL, asp.net)

    I'm on a section about inheritance and polymorphism and am getting my head around them. However in the course work there's a section to "ask a developer about the following things" Well I don't know any developers so thought I'd ask here, I'd appreciate all and any replies:

    1. Is inheritance generally understood by programmers?

    2. Is inheritance widely used?

    3. What limitations if any restrict it's use?

    4. Is polymorphism generally understood by programmers?

    5. Is polymorphism widely used?

    6. Does vb.net assist in the use of polymorphism and how?

    7. What limitations if any restrict it's use?


    Apologies for the long post, to be honest I think it's a bit daft that we're asked to speak to developers given that this is a correspondance course so we wouldn't really be in a college to do so. I intend reading what I can on the web and try get the answers that way but thought I might as well ask here too.

    Appreciate your time

    gerryR


Comments

  • Closed Accounts Posts: 995 ✭✭✭Ass


    I both, A LOT!

    I'm currently programming a rts version of Asteroids at the minute with a lot of different unit types and there are a lot of cases where my classes will inherit from base classes and such. In fact, most of my classes inherit from a base class.


  • Registered Users, Registered Users 2 Posts: 1,922 ✭✭✭fergalr


    gerryR wrote: »
    Hi All

    I'm currently in the middle of a correspondance programming course (vb.net, SQL, asp.net)

    I'm on a section about inheritance and polymorphism and am getting my head around them. However in the course work there's a section to "ask a developer about the following things" Well I don't know any developers so thought I'd ask here, I'd appreciate all and any replies:
    Seeing as you aren't picky, might as well throw my .02 in the ring...

    These questions are very very general questions to ask, without constraining them to a specific language or situation, and you'll need to bear in mind that everyone will come at them from a different angle but I'll do my best to answer generally.
    gerryR wrote: »
    1. Is inheritance generally understood by programmers?
    By programmers with exposure to the OO way of doing things, I think it would be quite well understood. It's a fairly fundamental part of OO design, and most modern OO language toolkits require an understanding of inheritance to make use of (eg, in Swing, you'll be extending a lot of library components etc).
    gerryR wrote: »
    2. Is inheritance widely used?
    In the OO world, yes. I don't know what percentage of software dev is OO these days, but it's probably quite a bit.
    Someone still working with assembly, or C (maybe embedded systems developers or mathematicians) mightn't use it, because it's not relevant to them, but most mainstream programmers are probably aware of it and use it in their languages.
    gerryR wrote: »
    3. What limitations if any restrict it's use?
    This is a very broad question, hard to interpret.

    Obviously, if you want to use inheritance, it'll be easiest if your language supports it.
    It's only really useful when you are in situations when you model is-a relationships between objects - but this occurs in a huge amount of domains and libraries.
    Erm, you can go crazy and use it too often; sometimes less design is more.
    There's other things that may be relevant here, like in Java you can't do multiple inheritance, where as in C++ you can - but I imagine that's not really what the question is getting at.
    gerryR wrote: »
    4. Is polymorphism generally understood by programmers?
    5. Is polymorphism widely used?
    Like above, it tends to be widely used and well understood in environments that support it - again, usually OO languages and environments.
    I think few programmers that are experienced with OO languages at all would have difficulty with understanding or using polymorphism.

    At the same time, in some languages, like C++, there's some situations where the effects of polymorphism are a bit obscure and not every programmer would understand them, but that's probably not what your really asking.
    gerryR wrote: »
    6. Does vb.net assist in the use of polymorphism and how?
    7. What limitations if any restrict it's use?
    I don't really know enough about vb.net to answer here; it supports OO; but the first question is a bit strange, if it said 'support' rather than 'assist' I'd be less surprised, but probably other posters know what specific features (of the development environment, perhaps?) are being looked for here.
    gerryR wrote: »
    Apologies for the long post, to be honest I think it's a bit daft that we're asked to speak to developers given that this is a correspondance course so we wouldn't really be in a college to do so. I intend reading what I can on the web and try get the answers that way but thought I might as well ask here too.

    Appreciate your time

    gerryR

    I'd imagine the purpose of the exercise was to get you dialoging with programmers about these areas, so maybe ask follow on questions if you are confused about anything.


  • Registered Users, Registered Users 2 Posts: 640 ✭✭✭Kernel32


    gerryR wrote: »
    1. Is inheritance generally understood by programmers?
    No.
    gerryR wrote: »
    2. Is inheritance widely used?
    Yes.
    gerryR wrote: »
    3. What limitations if any restrict it's use?
    Language support. Understanding when to use it and how to use it.
    gerryR wrote: »
    4. Is polymorphism generally understood by programmers?
    No.
    gerryR wrote: »
    5. Is polymorphism widely used?
    Yes.
    gerryR wrote: »
    6. Does vb.net assist in the use of polymorphism and how?
    Vb.Net as a .net language supports polymorphism.
    gerryR wrote: »
    7. What limitations if any restrict it's use?
    Language support. Understanding when to use it and how to use it.


    The point I am trying to make here is that a lot of developers use inheritance and polymorphism and at the same time don't understand it. They use it because it's a copy and paste language construct to them and the majority of programmers fall into this category.

    As an example a developer will inherit from an existing class simply because an FAQ tells them to in order to implement certain functionality. But they have no clue how to actually construct a class library correctly. The same with polymorphism. Many OO languages, Java, .Net etc have a base type all types inherit from, often simply called object. A programmer can create a method on a call that accepts a type object in it's parameter list. This is a form of polymorphism. It's often a very poor and lazy form but common none the less.

    So don't mistake the use of some particular technique by many developers as understanding of the technique.


  • Registered Users, Registered Users 2 Posts: 1,922 ✭✭✭fergalr


    Kernel32:
    You'd say programmers generally use inheritance and polymorphism but don't understand them - this seems a bit pessimistic to me - they aren't such hard concepts to get?

    Are you talking about programmers lacking a finessed understanding of when it's good design to use inheritance more or less, proper use of patterns etc, or are you talking about professional programmers lacking basic competence with elementary OO concepts?
    The latter has been pretty rare in my experience, especially with concepts that crop up as frequently as inheritance or polymorphism in modern Java programming?


  • Registered Users, Registered Users 2 Posts: 21,264 ✭✭✭✭Hobbes


    Why do you have to ask a developer to answer your own questions?

    Would it not teach you this?

    Also it is funny asking a developer what a programmer thinks.

    http://www.ericsink.com/No_Programmers.html


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 190 ✭✭gerryR


    @ Fergalr and Kernel32, thanks for you replies, its good to get as many opioions as possible so thanks again. I understand the questions were pretty vague.

    @ Hobbes, the chapter that introduced inheritance and polymorphisim was also the chapter that asked the question. This is the 1st time I came accross these terms so asking me if they were widely understood by developers (plural) wouldn't make any sence. As Kernal suggested, probably the point of the task was to get us asking questions of actual developers to get their thoughts.

    Maybe in a year or two if someone else asks the same question here I'll feel qualified to reply.

    gerryR


  • Registered Users, Registered Users 2 Posts: 1,922 ✭✭✭fergalr


    Also it is funny asking a developer what a programmer thinks.
    http://www.ericsink.com/No_Programmers.html

    Ah, come on, people generally use the terms interchangably...
    Surely that's quite a pedantic semantic distinction to bring up in this context?

    The page you mentioned specifically defines programmer, in the third paragraph: "For the purpose of this article, a "programmer" is someone who does nothing but code new features and [if you're lucky] fix bugs."
    It does this, because they are using a more specific meaning of 'programmer' than you'd generally hear. In general when people say 'programmer', they mean someone that also does code reviews, some docs, testing etc...


    That page even states that:
    In a small ISV, every developer is first and foremost a programmer.
    so it's completely reasonable to ask a developer what a programmer thinks, even by your nuanced terms.


    That page is trying to provide a simple piece of business advice, not provide a license to harpoon newbies who use generally interchangeable terms interchangeably.


  • Registered Users, Registered Users 2 Posts: 640 ✭✭✭Kernel32


    You could even say that a developer inherits from a programmer. And by asking a developer those questions the OP is using polymorphism.

    And ferglr, in my own experience of working with, managing, interviewing, hiring and firing many developers/programmers, the majority do basic lack competence with elementary OO concepts. I am feeling a bit pessimistic again these days as I am again forced to have to try and find decent resources which is very difficult. Hopefully once I do find a few diamonds in the rough I will feel more optimistic.


  • Registered Users, Registered Users 2 Posts: 2,152 ✭✭✭dazberry


    I'm with Kernel32 on this one. In general I find that people get the general idea of inheritance although good use of same is another story. Polymorphism I've given up trying to explain.

    D.


  • Registered Users, Registered Users 2 Posts: 1,922 ✭✭✭fergalr


    the majority do basic lack competence with elementary OO concepts.
    I'm with Kernel32 on this one. In general I find that people get the general idea of inheritance although good use of same is another story. Polymorphism I've given up trying to explain.

    That's mad; would have thought everyone picked this stuff up in 1st year in college, the idea theres professional programmers out there that have difficulty with such elementary concepts, never mind that they are plentiful, is very surprising - not been my experience, but fair enough.

    Ya hear that OP? Study those sections well, could come in useful in job interviews if Kernel32 and dazberry are on the money!


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 190 ✭✭gerryR


    fergalr wrote: »
    Ya hear that OP? Study those sections well, could come in useful in job interviews if Kernel32 and dazberry are on the money!

    Could be useful if Kernel32 is the one interviewing me :)

    Thanks again for the replies folks, very greatful!


  • Registered Users, Registered Users 2 Posts: 640 ✭✭✭Kernel32


    gerryR wrote: »
    Could be useful if Kernel32 is the one interviewing me :)
    Pray it never happens!

    I interviewed a guy last week for a junior to mid level position. I wasn't recruiting for the product dev team, this was more of a generalist role within the product implementation team. I was sent a candidate by one of our recruitment companies. He has a computer science degree(this is in the US mind you) and three years experience. Now granted all of his experience to date has been in non team environment doing more support level work, hacking scripts together and SQL scripts and the like.

    I have a very basic interviewing technique. If someone has a educational background in computer science I expect some basic level of understanding of OO. I don't expect wonders or even expect that they have applied to much of that knowledge at this point. If someone can't explain what a class is without referring back to a language, or what a class interface is without looking at me like a deer in the headlights then it's all over for me with that person.


    There are loads of programmers/developers like that being churned out of the system. Individually they can be productive in hacking things together and even look impressive to an employer who doesn't know how to judge good work except from looking at a UI. But to me they are worse than having no one at all.


  • Registered Users, Registered Users 2 Posts: 190 ✭✭gerryR


    Kernel32 wrote: »
    He has a computer science degree(this is in the US mind you) and three years experience.

    Apologies for going OT but is a degree a must have for any prospective employee you interview? Would it be in general?

    Thanks


  • Registered Users, Registered Users 2 Posts: 15,443 ✭✭✭✭bonkey


    fergalr wrote: »
    Kernel32:
    You'd say programmers generally use inheritance and polymorphism but don't understand them - this seems a bit pessimistic to me - they aren't such hard concepts to get?

    I guess it depends on what you mean by understanding them.

    Philosophical debates still rage as to when one should and should not use inheritence, polymopphism, and which is more appropriate than the other in situations where either/both could feasibly benefit a design.

    Many programmers - in my experience - tend to understand the basic ideas, but then implement (har har) these OO techniques by following relatively simple, dogmatic rules.
    Are you talking about programmers lacking a finessed understanding of when it's good design to use inheritance more or less, proper use of patterns etc, or are you talking about professional programmers lacking basic competence with elementary OO concepts?
    I guess it depends on what you call "basic competence" and what you call a "finessed understanding".


  • Registered Users, Registered Users 2 Posts: 640 ✭✭✭Kernel32


    gerryR wrote: »
    Apologies for going OT but is a degree a must have for any prospective employee you interview? Would it be in general?

    Thanks

    In general it's a pretty common requirement. For me it's not a requirement. In fact we deal with two recruitment agencies as well as direct hire and I specifically direct the agencies to not filter candidates based on education. I do it because I myself do not hold a degree. I am a self taught developer from my early teens with limited formal computer science education.


  • Registered Users, Registered Users 2 Posts: 1,922 ✭✭✭fergalr


    bonkey wrote: »
    Originally Posted by fergalr
    Kernel32:
    You'd say programmers generally use inheritance and polymorphism but don't understand them - this seems a bit pessimistic to me - they aren't such hard concepts to get?
    I guess it depends on what you mean by understanding them.
    Philosophical debates still rage as to when one should and should not use inheritence, polymopphism, and which is more appropriate than the other in situations where either/both could feasibly benefit a design.

    Many programmers - in my experience - tend to understand the basic ideas, but then implement (har har) these OO techniques by following relatively simple, dogmatic rules.
    Yeah, that's what I was getting at, in my next sentence; that I wouldn't be surprised to hear there's plenty of developers out there that don't have the deep understanding of when it's most appropriate to use the features in question; but that I would be surprised to hear that a lot professional developers don't even understand what the language features do at a basic level.
    bonkey wrote: »
    Originally Posted by fergalr
    Are you talking about programmers lacking a finessed understanding of when it's good design to use inheritance more or less, proper use of patterns etc, or are you talking about professional programmers lacking basic competence with elementary OO concepts?
    I guess it depends on what you call "basic competence" and what you call a "finessed understanding".

    I think what I meant by those terms was pretty obvious from the context I used them in - I was trying to say the same thing you just did - but to be more specific:
    * By basic competence, I mean that someone could explain what a language feature does, and give an example of it's usage. (I would have expected most professional programmers, even recent graduates, would be able to do this - in contrast to Kernel32's experience).
    * By finessed understanding, I mean that they would know when it is appropriate to use that language feature, rather than an alternative - in other words, a more sophisticated appreciate of the features role in well designed software. (I would have only expected more experienced programmers to do this).

    Minor nitpick: when you say 'which is more appropriate than the other', you might give a slightly confusing impression, as the choice isn't generally between using inheritance vs. using polymorphism - indeed (as I'm sure you are aware) the two frequently go hand in hand.


Advertisement