AI が理解可能な命名規則
変数や関数をAIが理解可能な方法で命名します。GitHub Copilotの 背後にある AI は大規模言語モデルベースで、本質的に自然言語モデルなので、自然言語としてコードを理解します。適当な命名は提案の質を落とす可能性があります。
Description
Example
# This may confuse whether "dictionary" refers to a book or a data type dictionary =# sample list of dictionaries in the library, like "Oxford" and "Cambridge" library_dictionaries = ["Merriam-Webster", "Oxford", "Cambridge"]from typing import List # A clear and specific variable name with type hinting list_of_dictionaries_in_library: List[str] = ["Merriam-Webster", "Oxford", "Cambridge"]
Exercise
Further Learningのチェックリスト
Last updated