4 ms·
I appreciate that comment! I'd say mainly practice. Coming up with the design before writing what you plan. Once you have what you had in your mind or on pa
by alexpadula 2y ago
I appreciate that comment! I'd say mainly practice. Coming up with the design before writing what you plan. Once you have what you had in your mind or on paper you can then optimize and cutdown the fat. I've always done this. :)
- alexpadula 2y agoIt's pretty interesting how this design turned out, RocksDB for example I believe is well over 200,000 lines. I originally wrote it in GO, well the base of it: https://github.com/guycipher/lsmt https://github.com/guycipher/lsmt Then once I felt ok with what I had I took what I had in GO and painstakingly rewrote it to C++, (originally was gonna be C). Why GO first? I honestly write a lot more GO than C++ lately so I'm faster at writing in GO. Not to say I don't write C++. I've been writing code for 15+ years, C++ was one of my first languages at 14 years old, just haven't been writing it everyday. This project has changed that pretty dramatically!
- sitkack 2y agoSimilar! I learned C and C++ when I was 16, a very long time ago. I'll definitely be stepping through the code later. It has been over a decade since I did any C++, Rust is better fit for what I need now. I have used a GCd language in a similar manner on two projects, where I wrote version 1 in Python and then rewrote the production version in Java and for another project in C. If you know that the final project is going to be in the target language, you can kinda code in that style from the beginning. We coded in Java-lite Python and the translation was mostly mechanical, used the same integration tests. Version 1 is for figuring the problem out. Version 2 is for shipping it in production.
- alexpadula 2y agoThat's awesome. I'd appreciate that honestly. I tried to keep it very approachable. See Go is a procedural language like C, that's why I was gonna rewrite it in C once I had my design down. I felt like C++ was the best choice and what I wanted to truly continue with so I bit the bullet and committed with C++. I'm glad I did. As like you it's been awhile since I wrote C++ everyday or read it everyday but I do enjoy it. Very broad language, many ways to do things so, lots of research involved.