I want to add all Cash On Delivery fee
Rs.50 without use any extension.
For your question you don't want extension so try this code
For those who are still searching for extra cod fee you can use this free module https://github.com/PHOENIX-MEDIA/Magento-CashOnDelivery. I'm using the same module also for extra fee on Card swipe on delivery.
I have implemented this in my website and it works perfect.