Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Unmaintainable Code

  • 27-07-2000 03:55PM
    #1
    Registered Users, Registered Users 2 Posts: 16,415 ✭✭✭✭


    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,415 ✭✭✭✭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