Slashdot Mirror


Outstanding Objects (Developed Dirt Cheap)

Mark Leighton Fisher writes "Some readers might be interested in Outstanding Objects (Developed Dirt Cheap); or "Why Don't Developers Search the Literature?" It seems like I still see a lot of wheel reinvention going on, even with the wealth of code and information now available on the Net."

12 of 397 comments (clear)

  1. A few reasons by kin_korn_karn · · Score: 4, Insightful

    1) There's no pride in using someone else's code.

    2) GPL'd code can't be used in commercial apps (blah blah, technicalities, yeah yeah, just try to get it past your boss)

    3) If you're paid by the hour, what's the rush?

    1. Re:A few reasons by Xzzy · · Score: 5, Insightful

      4) Other's people's code is documented by monkies, if at all.

      5) Integrating foreign code can be more work than just writing it yourself.

    2. Re:A few reasons by corbettw · · Score: 4, Insightful

      "I work in a mixed Perl and Java shop...There's a distrust of public-domain software here...."

      What's there that doesn't make any sense??

      Your company doesn't trust "public-domain software", but codes in Perl??

      --
      God invented whiskey so the Irish would not rule the world.
  2. The catch-22 of code reuse by Cally · · Score: 5, Insightful

    If it's generic enough to be scratch your particular itch, you'll need to do a lot of work to implement the specifics of your case. If it's very highly specialised, you'll need to do a lot of work to adapt it to the specifics of your case.

    Given the choice, would you rather work on adapting someone else's code for your situation - or would you rather write your own from scratch?

    (it's a rhetorical question ;)

    --
    "None are more hopelessly enslaved than those who falsely believe they are free." -- Goethe
    1. Re:The catch-22 of code reuse by etcshadow · · Score: 4, Insightful

      This is honestly very often the case. I think that the best comprimise (from my own experience) is to take overly-flexible packages and write your own middle-layer that glues together the powerful but too flexible to be useful code with your own specific needs.

      Of course, the humor is that you find yourself writing wrapper layers for wrapper layers.

      --
      :Wq
      Not an editor command: Wq
  3. Maintaining Existing Software by TheFlyingGoat · · Score: 4, Insightful

    It's far easier for me to spend time recreating code that exists already than to hunt down what's out there, read the documentation, figure out what drugs the developer was on, and customizing it. I make use of perl modules and bits of code on Usenet, just to save time, but that's the extent of it.

    --
    You have enemies? Good. That means you've stood up for something, sometime in your life. --Winston Churchill
  4. There is a very practical reason by cpparm · · Score: 5, Insightful

    If your problem is trivial, it's faster to write your own code. If your problem is not that trivial, it takes a lot of time to try to understand someone else's non-trivial solution. More than it would take to write your own code.

  5. Re:legal issues by Anonymous Coward · · Score: 5, Insightful

    I develop in Delphi and I use a lot of stuff from the net (if you want to learn how to create reusable components, and use already made components, this is THE development environment, and there is even a free linnux version! and it is PAscal, not this joke of a language called C or C++).

    anyway, as I work that way (for my company), I then get nailed down by the legal team because most stuff on the net doe not have a licence attached to it, or has a wrong licence, or the company wants to kee 100% copyright on stuff, but we can not contact the authors or something like that.

    ie: if you develop for a company, you do not have the choice, you have to re-invent the weel (or hide it from your superior and legal teams). what a shame....

  6. Why developers don't reuse by LinuxParanoid · · Score: 4, Insightful

    I'm not sure I that the 3 reasons Mark Fisher gives for lack of code-reuse are the main issue. Usually I think programmers are just too lazy to search. I had one predecessor that I always suspected had this disease. I've noticed in myself at times too. Usually you think that if you (re)write it, it'll be easier than trying to understand someone else's code (often but not always, you are wrong. :).

    That said, let me pass on a little practical story. Having built solutions myself that were quick and dirty, for version 2.0 of a recent project I worked on, I decided to dump most of my code and try building on an existing, well-known open source project in my area. I've spent 4-6 weeks trying to take a well-known piece of open source code that performs a similar function better than my quick&dirty approach. I'm not finished, but with the deadline past and with significant obstacles remaining, I'm really questioning my well-intentioned attempt at re-use.

    So let me toss out some more reasons why developers may not "search the literature":

    1) the (time)-cost of doing the search,
    2) the cost of figuring out the implementation details of what you do find so that you can effectively use it (which can be anything from understanding perl module documentation to understanding the concepts behind lex/yac or some protocol),
    3) the time/development-cost of integrating the open source codebase into your codebase; this includes porting or handling dependency chains
    4) the risk that, because of some detail that you won't understand until you fully invest in #2 (above), it may end up that this tool you are reusing actually doesn't solve your problems for some unexpected underlying implementation reason (something you can avoid if you fully develop your own solution with methods you *know* will work)
    5) the risk of choosing the wrong alternative (e.g. picking one templating system out of the dozen alternatives that then gets orphaned)

    I'd like to reuse code more, but rationally there are a bunch of reasons why I don't do more. These need to be addressed more satisfactorily for more code sharing to flourish.

    --LP

  7. Re:Simple explanation by vladkrupin · · Score: 4, Insightful

    It's because all us developers think our way is the better way :P

    No, it's because re-inventing the wheel is a lot easier than customizing someone else's utra-cryptic-spaghetti-coded "wheel".

    For instance, I was just looking a good SMTP AUTH solution (aka roaming SMTP) that would integrate well into our customized version of qmail. There were a few solutions that almost did the job, but not quite, while offering a ton of extra bloat that we didn't need. A few hours and a hundred or so lines of C code later I had a working solution. Yes, I re-invented the wheel, but it was a whole lot quicker than figuring out and fixing someone else's code, and without all the bloat attached.

    My point: Often re-inventing the wheel is good, and sometimes is the only way to go.

    --

    Jobs? Which jobs?
  8. Re:Library bloat by kma · · Score: 4, Insightful

    Do I _REALLY_ want to pull in libpng and libSDL just to do this?

    Yes.

    What kind of risks does pulling these libraries in add to my project?

    The risk that you will hit a bug in the library. Which is much smaller than the risk that there will be a bug in your one-off k-spiff png display engine (hence, OOKSPDE).

    How much will this bloat my code?

    It will bloat your code by the additive inverse of the code size of your OOKSPDE. The user already has the library on their disk. If it is dynamically linked to your executable, they pay nothing to use it.

    Will users be confused from the different versions of these libraries?

    Would you rather they lose data because your broken OOKSPDE doesn't handle transparency properly?

    Turns out it's usually simpler, easier, and less risky to just roll your own.

    It sounds like you either have a delusionally high estimation of your own abilities relative to those of your library-writing peers ("Of course the code I write will be faster, more correct, and less bloaty than the specialised code that those people who really understand the problem and spend time solving it well!") or you place very little value on your time. Oh well. Have fun writing png-frobbing code for the rest of your life.

  9. learning to read? by technoCon · · Score: 4, Insightful

    when programmers are taught to a computer language, we're taught to write. When everybody else is taught any other kinda language, they're taught to read. If I learn Russian, I'll read great literature.

    Trouble is twofold.
    1) we con't have a corpus of great computer code we can show folks howto read.

    2) reading code is most often associated with Maintenance and maintenance programmers aren't highly regarded.

    call it NIH.