January 9, 2007
I found many developers even sometimes I do some code which could be possible at the database level. Why to format date at coding level when DATE_FORMAT function is available.
Developer should be careful enough to identify the cases where they can performes operation at database level. This will help to improve the overall performance and efficiency of your application.
I will be keep adding the tips about the same in this entry
If you want to format date by fetching it from database, you can use DATE_FORMAT function.
eg. SELECT DATE_FORMAT(now(), ‘%y’) FROM tableName
December 25, 2006
Smarty was one more things which was looking very egly no proper identetion, formatting, comments. No uniformity within the codes. I clean up most of the smarty templates, there are still some more which I will clean up this week.
In PHP, I clean up most part of PHP script, I feel very sorry that I didnt concetrated initially on my code which leads to this.
Some notes I took from this incident
-Always write good code, think before writing the code.
-Analyse it in every aspect, how it can help you in future.
-Is your code is easy to modify in future.
-Can I use the same code in other projects too.
I already started implementing this earlier but not on this project, that was mistake from my side.
But finally I am happy that I clean up many things last week.