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

A question about code re-use

Options
  • 10-02-2009 12:37pm
    #1
    Registered Users Posts: 6,790 ✭✭✭


    Hi guys, perhaps you could share your thoughts with me about something.

    As part of an interview process I've been asked to implement a small application to test my programming skills. The application will revolve around an implementation of a fairly old and obscure part of Apple's Quicktime framework. There is little documentation available, except for an open-source sample application provided by Apple. I've examined this sample project and it does a substantial part of what I would need to achieve (but not everything). The specification also requires me to implement several features that would go above and beyond what this sample project does.

    My question is, to what extent is it acceptable to use this sample code in my own work, either widespread use of the classes or maybe just a rewrite of the bits I need, following the same class hierarchy and execution flow? To be clear: I'm not intending to plagiarise anything, everything I use would be credited/acknowledged - this sample code is, in effect, documentation for what I need to achieve, so whatever happens I will be doing something similar. But it would seem stupid to re-write the same thing from scratch just for the sake of re-writing it.

    So would it be acceptable to use the classes from Apple's sample project to some extent, fully acknowledging that I've used them? My instinct would be to take just the bits I need, doing a rewrite but effectively copying the overall design, class hierarchy, etc. After all the "examination" part of the project will be looking at my abilities elsewhere (e.g. nice UI design, clean coding style etc). Would appreciate anyone's insight here :)


Comments

  • Registered Users Posts: 7,182 ✭✭✭Genghiz Cohen


    Work smarter, not harder.
    Show that you can take someone elses code, with their coding standards and use it for yourself (Show working with other people is not a problem for you).


  • Closed Accounts Posts: 12,382 ✭✭✭✭AARRRGH


    Considering programming work is nearly always altering or adding to someone else's code, I would refrain from writing things from scratch.


  • Registered Users Posts: 2,931 ✭✭✭Ginger


    Or say like I would..

    Time & cost vs working product.. well I could do it on my but just refactored most of this code and appended the bits that we needed.

    You can spin how you like.. as long as you can justify your actions and have actually added to it

    For some reason a deceased unix lecturer springs to mind whenever I hear plagerise..


  • Registered Users Posts: 2,894 ✭✭✭TinCool


    I re-use my own methods and classes all the time when developing websites and databases (I develop in house web apps for the company I work for). There's no point in re-inventing the wheel if there's reusable code out there. Just as a small example, the majority of sites I develop have a reporting element to it. I have used an excel export method I developed a couple of years back in pretty much all my sites.

    TC


  • Registered Users Posts: 6,790 ✭✭✭cornbb


    Cool, just what I wanted to hear :) I reckon I'll basically copy the bits I need from the sample project - not a rewrite but not a copy/paste job either. Thanks guys.


  • Advertisement
  • Registered Users Posts: 605 ✭✭✭PaddyTheNth


    Echoing the others...if you have a good look at it and can't see any way to optimise their code, re-use it for sure, with attribution.


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


    If there isn't really a good reason to rewrite it - for instance the original hierarchy is badly flawed or dated, then there isn't really a reason to, and given that that doesn't seem to be the focus of their exam - what's the point?

    D.


Advertisement