Programmers dictionary/lexicon for non native speakers

后端 未结 9 852
自闭症患者
自闭症患者 2021-02-12 20:47

I\'m not an English speaker, and I\'m not very good at English. I\'m self thought. I have not worked together with others on a common codebase. I don\'t have any friends who pro

相关标签:
9条回答
  • 2021-02-12 20:50

    This is an issue that I run into as well, even as a native English speaker. As a programmer, I often find that I need to find a descriptive word for a class, variable, function, etc. I often find myself asking a friend or coworker what verbage they would use by explaining my idea, carefully excluding any words I myself have considered as a possible choice for the class/function/variable name so as not to inhibit their creativity.

    It seems to me that the English Language & Usage site proposal over at Area51 is a good place to ask such questions as "What would you call a class (or thing) that does this, this and that, and has properties x, y, and z?

    0 讨论(0)
  • 2021-02-12 20:51

    Could be an unorthodox suggestion, but I would recommend studying English more deeply (I am also a non-native speaker).

    Expose yourself to as much English as possible! Watch movies, read English fiction, listen to technical podcasts.

    Mind you, if you really want to deepen your knowledge of English, you're probably not going to learn a lot watching "Transformers". On the other hand, diving into Ulysses probably is not a good strategy either.

    If you're feeling adventurous, you could always get a subscription to the New Yorker magazine. It'll do things to you - yes this is flamebaiting. :P

    0 讨论(0)
  • 2021-02-12 20:54

    It will come with time and experience. Above all attempt to (like @Mike A says) document things until the code becomes clearer and try to be consistent.

    0 讨论(0)
  • 2021-02-12 20:55

    The Jargon file will help with the more obscure references people will give in the industry.
    http://catb.org/jargon/html/go01.html

    Other than that..finding good names for your variables/classes/etc is hard. Often times, it's harder than actually solving the problem. Here's a good resource for some common design pattern names people like to use: http://en.wikipedia.org/wiki/Design_pattern_%28computer_science%29

    Examples:
    AbcFactory
    XyzBridge

    0 讨论(0)
  • 2021-02-12 21:01

    If you can't find the "Programmer's Dictionary" you're looking for, start one. Post a new question: "What entries are missing from this Dictionary for English-as-a-Second-Language-Programmers?" and seed it with 10 or 20 words/definitions you've already discovered. Once posters have suggested enough additions, move it to a a wiki somewhere and keep accepting contributions. You might end up creating a valuable resource.

    0 讨论(0)
  • 2021-02-12 21:10

    How about using your native language? Of course (like for me as an Austrian) some letters may not be allowed - but who cares if there is Mörder or Moerder (Murder) in the class name :)

    Or (as I do) use a dictionary like dict.cc or something else. I do - think what the class does - it manages game session (for an example) so it will become GameSessionManager.

    Abbreviations are (at least for me) a problem - but what I've learned from other code - event native speakers use different abbreviations. And if the class is called GameSessionMgr or GameSessionMngr doesn't make a difference.

    Your are not writing books or some kind of "english poem" where spelling, grammar and... counts.

    You write code - and if you follow "your sepcial rules" - you and others will (after some time) be able to understand you code and class names.

    0 讨论(0)
提交回复
热议问题