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
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Unmaintainable Code

  • 27-07-2000 2:55pm
    #1
    Registered Users, Registered Users 2 Posts: 16,414 ✭✭✭✭


    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, Registered Users 2 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, Registered Users 2 Posts: 16,414 ✭✭✭✭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, Registered Users 2 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, Registered Users 2 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