Hacker News new | past | comments | ask | show | jobs | submit login

I'm guessing that moving from C++ to C++ (i.e., a rewrite in the same language) would also have helped a lot.



Actually that particular C++ was very well written. It had been written by a single very disciplined person over 3 years, following a lot of very strict conventions.

So, no it was not really messy in there. But it was big and memory leaks are hard to find.

The main problem is that there was some low level funky stuff happening that we didn't have a good grip on. The guy who wrote it thought it would be great to optimize the code in some ways, but clearly overdid it.


We did/are doing exactly the same thing with great results in the same areas!

> The guy who wrote it thought it would be great to optimize the code in some ways, but clearly overdid it.

I feel that C++ is a language that entices decent developers to try and 'optimise'. We have the same issue in some of our lower level stuff including pointer arithmetic and other 'optimisations' that might have saved a couple of kb/mb of memory 20 years ago when the code was written but today only makes the code difficult to read and to modify.


> The guy who wrote it thought it would be great to optimize the code in some ways, but clearly overdid it.

But then I suppose a rewrite would undo those optimizations and solve the problems.


Well, that is as long as we don't introduce other leaks in the rewrite.

Our team is mostly made of mathematicians and business-focused engineers, so for us C++ was somewhat inappropriate.

My point is trading a little bit of performance for a lot of clarity and safety was a good move.


There is a lot of safety features in C# that are not present in C++, so a rewrite in C++ would probably have helped. However the same class of errors that was a problem in the old codebase are still present.


I'm guessing that moving from C++ to C++ (i.e., a rewrite in the same language) would also have helped a lot.

I'd guess that a same-language rewrite would have helped a lot for any non-trivial project mentioned in this Ask HN.




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

Search: