Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I wanted to add something to this from recent personal experience.

I've worked with a few engineers recently who were keen - occasionally insistent - on coming up with an O(n log n) solution, or better, at design stages for a specific project. We were working on different parts of the platform (and in different dev environments) but essentially implementing the same thing.

For the implementation I tried to talk them into going with a simpler implementation that was O(n²) for the initial release, but they were adamant not to.

When it came to writing automated tests for the feature, I became aware of some edge cases that hadn't been considered during the design stages. We had another design meeting, updated the requirements, yadda yadda.

A day or so later I put the changes in for review and had them merged reasonably quickly. I later found out that the other group had to significantly rewrite their algorithm and write new tests from scratch, ultimately leading them to miss out on launching the feature at the same time as ours had been released.

The moral of the story? A good programmer knows _what_ the best algorithm is, but a good engineer knows _when_ a given algorithm is called for. Premature optimisation is, after all, the root of all evil.

I've since updated my version to coincide with their more performant version and rewritten a lot of my tests.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: