Lessons i have learnt while working **45
# using the Datetime.now is something bulls**t.. just get the datetime.now in utc format & convert back to your time zone.
Why ??
So that you are safe and make sure the created date, optin date are same as your time zone regardless to the server time..
# if two things doing same job but slightly different way, then try to use a single class library
Why ??
So that you dont need to change the code for every single time & at every single place.
# Think before hardcoding anything in ur code.. Just use config files for system values & resource files for messages.
Why ??
Bcos, u dont know when these values will get change. You dont think so, but it will happen.. May be bcos of the grammer/type error.. Or may be the requirement chane or... something else change lah.. btw its good for change management too..
# Please clear the SESSION/VIEWSTATE values, after it serves it purpose and also at the inital page_load
Why ??
You will be freaked out.. when user/test is done with the session & click the back button do some s**t things and break your code..
# using the Datetime.now is something bulls**t.. just get the datetime.now in utc format & convert back to your time zone.
Why ??
So that you are safe and make sure the created date, optin date are same as your time zone regardless to the server time..
# if two things doing same job but slightly different way, then try to use a single class library
Why ??
So that you dont need to change the code for every single time & at every single place.
# Think before hardcoding anything in ur code.. Just use config files for system values & resource files for messages.
Why ??
Bcos, u dont know when these values will get change. You dont think so, but it will happen.. May be bcos of the grammer/type error.. Or may be the requirement chane or... something else change lah.. btw its good for change management too..
# Please clear the SESSION/VIEWSTATE values, after it serves it purpose and also at the inital page_load
Why ??
You will be freaked out.. when user/test is done with the session & click the back button do some s**t things and break your code..