Does writing Good code take time or I am just slow?
But does writing good code take time and thinking or I am just slow?
But does writing good code take time and thinking or I am just slow?
In general, writing solid, production level code takes time. I have had developers throw up code that mostly works and can't understand why when I go to make it production ready it can take 10x longer to do it correctly. But even if you have lots of experience you will underestimate some tasks and they take you 3-4x longer then you expected.
Overall, the more time you spend in design the less time you are writing code. And the more tests you write (in general) the less you'll revisit code. Also, the smaller each chunk of work is, the better. I try to use the rule a function/method has to fit on a laptop screen view. Doing this means you keep each function/method doing only one thing and believe it or not will speed up your development not slow you down. There are those exceptions when the function is uber simple but maybe has lots of if/else for state transitions or something similar where with whitespace and comments etc the method is 2-3 pages.
The best programmers I've worked with design their programs to minimize potential bugs, and so they spend more time designing (of course) which is fun, and implementing a good design, which is also fun. They do end up with some bugs of course, but not nearly as many as with a poorly designed program.