Posts Tagged Database Connection

Programming tips

  • Name your functions and variables with meaningful names so that people will understand the function or variable just by reading it’s name. If a function return best selling product, name it like get_best_selling_products().
  • Do a lot of comment for your code, especially if you are working in a team. By commenting you are making other peoples life more easy.
  • Make your function small where you can see all code for that function in one screen without scrolling. When the function is getting bigger than your screen, its time to split it into smaller function.
  • If your chunk of code is often use, then create a function for it so every part of your application can call this function. An example of this is database connection and query.
  • Put your javascript code and css style in different file. Save your javascript as .js file and your css file as .css file.

, , , , , , , , , ,

No Comments