Hey everyone! I am new to programming. I just finished an exercise problem to print christmas song "12 days of Christmas" from jumping into c++. I felt happy and all, having solved the problem. But then I realized that I had taken about 1 and half hour to think the approach, write code and debug the code. I also realized my each previous exercises had taken similar amount of time.
Such repetitive pattern of taking long time is now bugging me. So seriously want to know in general, if this is normal or am I really taking way too much time? Should I pace myself to think problem faster.
Things to know:
1. I am into c++ for last 5 days.
2. to know about the complexity of problem I was stuck with(for reference to estimate normal time required), here is my code I wrote( [b]in 1 and half hour[\b]): ( cpp.sh/2cmc )
Any kind of suggestion or even ways on how to pace myself would be highly appreciated.
You will become quicker with practice. Becoming fluent in any language takes practice. With programming this is even more true, because you are also learning how to piece apart problems and solve them. Some patterns will begin to emerge while you practice, and eventually you will most likely see the same patterns later in your programming career. Writing good, readable, and maintainable code can take longer than the more usual quick and dirty approach. Stick with C++ for another month of practice, and that code you did for this christmas song will be even easier.
Also, eventually some code that you write can be re-used in other projects. For example if you write code that multiplies two matrices, that could be re-used in several different math projects.
If you have been into programming for just five days, a complete turnaround time (think the approach, write code and debug the code) of an hour and a half is fine.