5 Lines of Code that Saved almost 5 hours of work

It sounds like; I have written some magic piece of code. But it isn’t. I have used my basic programming skills to kill almost 5 hours that almost going to be wasted and could have made me even more tired.

Have you created a program for yourself?

All you guys, who chose programming as their career path, might have learned programming to create a program that is helpful to deliver a project.

We all programmers are in the path, where we only see deliverables to be delivered. Well that is actually a good thing.

But have you thought of creating something new out of your daily deliverables. Yep, you need to create a program for yourself. Some piece of code that you always do to optimize the performance of the program.

Well the code I have written that helped me formatting a lot of pages for my book. First I thought I would write an application that would generic enough to help me any time. Then I thought I have no time to do that and finish the formatting.

Then I thought of writing a piece of code that would run in debug mode to give me the output I need.

Well the above piece of code, uses the StringBuilder class and the magical string.Format() method.

I used to change the Chapter index and the number of files I need, then change the double or triple digit values based on the number of file. The string formatting trick for displaying values with 2 digits or 3 digits also paid off.

I am telling you this, to try out something like this in your daily life. This way you could tell yourself that I used code for your own benefit too.

Finally thanks for reading. Keep doing the good work. Keep trying…

Like me on Facebook.