Slashdot Mirror


Organizing Source Code, Regardless of Language?

og_sh0x queries: "I'm looking for a source of information dedicated to organizing source code. I see a lot of books and other resources covering syntax and various syntax-related philosophies, but I can never seem to find a good resource for organizing source code in general. For instance, at what point do you split that massive source file into multiple files? At what point do two functions approaching similar functionality need to be merged, despite the cost of digging through the source and making changes to call the new function? These are problems that plague many programming languages. Are there such resources that cover these issues?"

1 of 59 comments (clear)

  1. Database normalisation rules. by oliverthered · · Score: 3, Interesting

    Databases and code should be designed in a similar way, for more or less the same reasons. If all the refactoring book people have been recommending seem a bit extreme (even the word refactoring sounds extreme to me, a bit like downsizing grrrr....).

    Try getting a simple DB design book that goes through a normalisation process, it should make for a lighter read.

    Then think about how to apply the process to software(a bit of light thinking)

    The first couple of steps are something like

    separate everything out into discrete chunks

    look at 'keys' and 'indexes' (in source code they are design patterns, data structures the things that tie the chicks together).

    You don't need a 1000 page bible, you need a ten pages of guide lines and good practices and a bit of brain power.

    --
    thank God the internet isn't a human right.