Two modes of coding

Building and crafting.

Building is the mode you go in when you just need to put something up that works. That could be a prototype, it could be a tiny feature, it could be the starting point of something that will be big but it is not yet or it could also be that super critical bug in production that needs to be stopped now and speed is the main factor.

Crafting is for when you do have a vision and this is something important. The api is important, or the performance is important, or the reliability is important - heck, maybe all of these are important.

When crafting you approach it carefully. You think through how to split things up, you think through how to test it out (maybe you even start with tests), you think about the results, etc. Careful code. When crafting you are going for a nice round result. As few rough edges as absolutely possible.

When building you are focused on being done. There is a need to put something out there, even if it has a rough edge or two.

When crafting the focus is on getting something right. No rough edges allowed.