Best Practices in Programming - Drupal Training Curriculum for Drupal Companies

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
You are viewing a wiki page. You are welcome to join the group and then edit it. Be bold!

Back to Drupal Training Syllabus

Best Practices in Programming

Code readability is a universal subject in the world of computer programming.

Learning Objectives

Learner will be able to code using the Drupal coding standards. His/ her code will be readable as text reading (to an extent)

Course Content

  1. Coding standards

  2. 'Code is also written for humans to read, not only for computers to execute'
    - Erki Lindpere.

    In the drupal development environment, a developer should follow Drupal coding standard.
    Points to cover :
    * Indentation
    * Comment
    * White space
    * Control structures
    * Naming conventions

    More reads : https://www.drupal.org/coding-standards

  3. Understand the requirement clearly

  4. It is the responsibility of the developer to understand the requirement clearly before starts development. There is no wild card game of guess or assume, that may lead to something that is entirely opposite to client's need.
    http://free-thinking-cap.blogspot.in/2011/10/points-of-view.html

  5. Consider others when you do anything

  6. This is one important aspect to consider while coding. Code should be human readable.
    http://blog.wurkit.com/expert-of-professional

  7. Code Quality

  8. Once the developer starts to follow the Drupal coding standards, code quality will be good.
    http://drupal.org/coding-standards/docs – API documentation and commenting standards.
    http://drupal.org/node/2497 – SQL coding standards
    http://drupal.org/node/223584 – Drupal mark-up style guide
    http://drupal.org/node/302199 – CSS coding standards
    http://drupal.org/node/172169 – Javascript coding standards

  9. The rule of 30 minutes

  10. When the developer cannot find a solution for 30 minutes of research, get help from others. It is not advisable to waste time.

  11. Acknowledge emails

  12. Develop a habit of acknowledging to all the requests or mails. This will build a rapport.

  13. Art of following up

  14. While working in an environment where multiple priorities are set, it is necessary to follow up properly to get the work done.
    There are a couple of aspects that need to be kept in mind.

    1) Follow up action has to be initiated with adequate time between two actions
    2) Maintain the gentleness through wise choice of words
    3) Use a combination of mediums (project tracker, face to face, phone, email). The ideal way would be to a phone call or face to face meeting, followed up immediately with an email.

  15. Read code

  16. Familiarity with the code helps to find solution faster. By reading code, developer will learn to write good code.

  17. Try to up-to-date in technology

  18. Follow technology closely. Watch what is happening in drupal, html, css, web-development or what is happening in software as a whole.

    Drupal planet is a good place to start with : http://drupal.org/planet

    Useful websites

    http://css-tricks.com/
    http://www.codinghorror.com/blog/
    http://arstechnica.com/
    http://lifehacker.com/
    http://techcrunch.com/
    http://www.wired.com/
    http://mashable.com/
    http://slashdot.org
    http://xkcd.com/

Reference

http://www.slideshare.net/zyxware/code-quality-aesthetics-functionality-...

http://code.tutsplus.com/tutorials/top-15-best-practices-for-writing-sup...

Exercise

Exercise on Best Practices in Programming

Next » Drupal Overview