I'm not a programmer. Could you estimate how much more comple/ how much longer it takes to implement quicksort?
Otherwise, my point is that this is often good because, when begining projects, management can lack perspective of how the project will actually get done. Having a "draft" version that is planned to be scrapped lets you decide where optimisation is necessary, see future bottlenecks more clearly, and thus you can set a better foundation for the actual project.
And if it's possible to make that version say 20x or 100x faster than a V1 of the final project, I think the insight gained is worth it.
Edit0: Sometimes you even learn that it's a bad idea at all - better to learn that quickly and start over.
Edit1: After a cursory read, it seems quicksort it as simple as it gets in execution, being very few lines of code. But I'm also reading that in production code, quicksort is just part of the custom sorting algorithm that should be written for the specific database it's being applied to. If that's the case - using quicksort is the vomitting. i get what you mean "without thought about optimization"...some optimization expected, but heavily weighted towards rapid execution and low complexity.
Sorry, I'll try to elaborate. What you described can work _sometimes_. If a particular feature is isolated from everything else, and if the optimization step is a couple of tweaks that can be done later on, sure.
However, the dangers of applying this tactic indiscriminately are:
1. Version 2 is postponed, and a lot of dependencies on Version 1 appear. After a while, moving from V1 to V2 becomes a herculean effort, you have to do heart surgery while the heart is beating.
2. There may be nothing in common between V1 and V2. Implementing bubble sort gives you no insight into quick sort; you literally have to start from scratch. This may be acceptable if there's urgency in delivering a solution as fast as possible, but in my experience most companies have the time to do it right but choose not to (or don't know any better). Also from experience, it would be nice if people understood that it may not be so simple to "just optimize it later", and that it would be better to spend a little bit more time in the beginning of a project to consider how to foundation of the project will scale in the future.
Otherwise, my point is that this is often good because, when begining projects, management can lack perspective of how the project will actually get done. Having a "draft" version that is planned to be scrapped lets you decide where optimisation is necessary, see future bottlenecks more clearly, and thus you can set a better foundation for the actual project.
And if it's possible to make that version say 20x or 100x faster than a V1 of the final project, I think the insight gained is worth it.
Edit0: Sometimes you even learn that it's a bad idea at all - better to learn that quickly and start over.
Edit1: After a cursory read, it seems quicksort it as simple as it gets in execution, being very few lines of code. But I'm also reading that in production code, quicksort is just part of the custom sorting algorithm that should be written for the specific database it's being applied to. If that's the case - using quicksort is the vomitting. i get what you mean "without thought about optimization"...some optimization expected, but heavily weighted towards rapid execution and low complexity.