Slashdot Mirror


Reuse Code Or Code It Yourself?

eldavojohn writes "I began coding for a project that had simple requirements for my employer — Web services and a test application for them. But requirements have been creeping, as they always do. Initially I had decided to use the Spring Framework with Hibernate. And I re-used a lot of libraries that made things simple and quick for me. The new requests coming in involve capabilities beyond those of the frameworks. Now, I used to be told that good programmers write code and great programmers reuse code. It's starting to look like I would have saved myself a whole lot of time if I had written the database transaction using JDBC instead of Hibernate — now that I'm married to this object model framework, some of this stuff doesn't look doable. So what is better for the majority of software projects out there: reuse code, or code from scratch? What elements or characteristics of a problem point to one option over the other?"

4 of 429 comments (clear)

  1. Yeah! by gbutler69 · · Score: 5, Funny

    I always write my own bootloader, device drivers, operating system, assembler, compiler, C-interface library, graphics libraries, hardware abstraction layers, collections, and algorithms first. Then I just write a thin layer on top of that to implement the desired functionality. Easy, peasy, japa-neasy!

    In my spare time, I grow my own grain, raise my own cattle, remove my own spleen and even generate my own electricity my peddling my home-made bicycle vigorously!

    --
    Over-the-top Response Guy! Giving "Over-the-Top Responses" since 1970.
  2. Re:The new requests coming in involve capabilities by chromatic · · Score: 5, Funny

    Any project should start with a complete specification of the final product.

    Slowly though, as they are IDIOTS!!! Did you find it out yet? They are MORONS!

    You're the liason between programmers and customers, because you're good with people. Did I get it right?

  3. Other Slashdot Articles... by raftpeople · · Score: 5, Funny

    On Wednesday we'll have: "I coded a project, and now it's all done, should I start another project?"

    Thursday's topic: "A lot of people around me use the tab key but I like to key in exactly 3 spaces for indentation, who's right?"

    And on Friday: "I...uuuuh...well....oh, have you ever hit refresh but the web page said it couldn't?"

  4. Re:It's knowing when by GXTi · · Score: 5, Funny

    If you're really dead set against replacing or rewriting any libraries, the only way to improve your odds is to use the biggest, oldest, kitchen-sinkiest, most bloatiest library you can find.

    And people call me crazy for embedding Emacs in everything I write!