Improving Code Quality

When coding in an interview context or when presenting code on your Github profile, itโ€™s important to spend some attention on the following:

  • Basic code styling (Spacing, indentation, braces, etc)

  • Variable/method naming (prefix and spelling, clear naming)

  • Language conventions (e.g., using list comprehensions in Python or async/await/promises in Javascript)

  • Object-Oriented Design (encapsulation, scoping, class design, etc)

Common Checklist

Be sure to look out for the following things:

  • Try to make sure all whitespace and indentation is properly formatted and consistent throughout the code. Try using an โ€œauto-indentโ€ within your text editor or IDE for your language.

  • Avoid any misspelled words in any methods, variables, comments, etc. This demonstrates an attention to detail in your code.

  • Try to include at least a few comments in your code to explain intent on certain key code blocks.

  • Make sure to include some reasonable code organization into objects, methods. Avoid long blocks of complicated unorganized code.

Style Guides

There are many great style guides online, you can check a few suggested language-specific ones below:

If you are working in a different language, you can often find them many of these as top results for โ€œ[language] style guideโ€ on Google.