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

Unmaintainable Code

Options
  • 27-07-2000 3:55pm
    #1
    Registered Users Posts: 16,413 ✭✭✭✭


    Hobbes evil deed reminded me of this:
    http://mindprod.com/unmain.html

    One relevant exerpt:
    When documenting, and you need an arbitrary name to represent a filename use "file ". Never use an obviously arbitrary name like "Charlie.dat" or "Frodo.txt". In general, in your examples, use arbitrary names that sound as much like reserved keywords as possible. For example, good names for parameters or variables would be: "bank", "blank", "class", "const ", "constant", "input", "key", "keyword", "kind", "output", "parameter" "parm", "system", "type", "value", "var" and "variable ". If you use actual reserved words for your arbitrary names, which would be rejected by your command processor or compiler, so much the better. If you do this well, the users will be hopelessly confused between reserved keywords and arbitrary names in your example, but you can look innocent, claiming you did it to help them associate the appropriate purpose with each variable.

    Since most of my work at the moment involves porting C [1] I am not sympathetic to people who code like this... frown.gif

    Al.

    They wrote it in Germany, so misspelt English variable names and German comments galore!!

    --

    amdsoft.com



    [This message has been edited by Trojan (edited 27-07-2000).]


Comments

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


    I actually normally write in English words.

    So reading the script makes sense straight off.

    eg. DataFileName

    If I have to abbreviate I use 3 word conventions (like AS/400 does smile.gif). MS had a document somewhere which listed off loads of defaults.

    eg. fleData = file name, flh = File handle.



  • Registered Users Posts: 16,413 ✭✭✭✭Trojan


    That sounds nightmarish Hobbes, I wouldn't like to be maintaining or porting that... perhaps you get used to it? Hmm ...

    Any of you (C/C++/Java) use Hungarian Notation in real code? What do you think of it?

    Al.

    --

    amdsoft.com



    [This message has been edited by Trojan (edited 29-07-2000).]


  • Registered Users Posts: 332 ✭✭spod


    Originally posted by Trojan:

    Any of you (C/C++/Java) use Hungarian Notation in real code? What do you think of it?

    a joke.


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


    I agree with spod tongue.gif

    As for my eariler post what I mean is everything is English sounding, so you can pretty much read off what it's doing just by the varibles alone.


Advertisement