Git Product home page Git Product logo

Comments (7)

ConjuringCoffee avatar ConjuringCoffee commented on August 15, 2024 2

Thanks for the contribution, but... 😉

Please use English for issues, pull requests, and discussions. Due to the wide-spread presence of English as a second language, SAP uses English as its common language to facilitate cross-culture communication.

from styleguides.

mariomuellergermany avatar mariomuellergermany commented on August 15, 2024

Done ! :-)

from styleguides.

larshp avatar larshp commented on August 15, 2024

and the title?

from styleguides.

mariomuellergermany avatar mariomuellergermany commented on August 15, 2024

Done

from styleguides.

pokrakam avatar pokrakam commented on August 15, 2024

The online help also provides some good guidance on when to abbreviate and when to remove vowels.

See under Descriptive Names:
You should avoid using abbreviations as name components wherever possible. Exceptions to this rule are abbreviations that are usually used instead of the complete term, such as GUI or XML. However, if the use of certain abbreviations cannot be avoided due to restricted space, you should initially use common abbreviations.

If no common abbreviation exists, you should proceed as follows: Vowels are omitted, unless they are the first letter of the word. They are of minor significance for the recognition value. If a word starts with a double vowel, both letters are kept for ease of recognition (for example, outbnd as the abbreviation for outbound instead of otbnd). If further abbreviations are required, you can replace double consonants with single consonants. Even after this step, the word is generally still recognizable.

Or in German here

from styleguides.

larshp avatar larshp commented on August 15, 2024

#253

from styleguides.

bjoern-jueliger-sap avatar bjoern-jueliger-sap commented on August 15, 2024

I think the suggestion in the guide is actually correct, but as so often not sufficiently explained. Here's my take on how getting rid of unimportant words makes more sense than abbreviating vowels.

For instance, in languages with unrestricted identifier length (which is, uh, all languages that aren't ABAP...), it's common to have long unit test names of the form given_X_when_Y_then_Z, where X, Y, Z can be quite elaborate identifiers themselves.

This obviously doesn't work in ABAP, but is the variant gvn_x_wn_y_thn_z, where x, y, z, are the vowel-reduced forms of X, Y, Z, really what we consider the correct and readable solution? I think it isn't - in this case it's much better to encode one of the three given/when/thens into the name of the test class, and the rest into the name of the test method. Then we have 60 characters to work with, which gives much more breathing room to not have to resort to consonant messes. And if the convention is given_X=>when_Y_then_Z, then we might as well omit part of this and just choose X=>Y_then_Z.

This is my interpretation of the "start with the unimportant words" suggestion - we got rid of the given and when without losing information or readability. In other common cases, such "unimportant" words are often get_ (is there really any danger of someone having a harder time interpreting data(customer_name) = customer->name( ). than data(customer_name) = customer->get_name( ).?) or repeating the name of the type in the method name (customer->set_customer_name( name ). is not better than customer->set_name( name ) .. If someone names their customer object instance in a way that they can't see it's a customer, that's their naming problem, not mine.)

Of course, you might not have any such unimportant words and still hit the character limit. In that case, I agree the vowels will have to go :)

from styleguides.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.