digitalmars.D.announce - dddb lightweight and simple key-value database
I just start yesterday with d, I write dddb a lightweight and simple key-value database for dlang build on top of std.json source and usage https://github.com/cvsae/dddb I'm waiting your comments
Mar 22 2018
On Thursday, 22 March 2018 at 15:34:28 UTC, aerto wrote:I just start yesterday with d, I write dddb a lightweight and simple key-value database for dlang build on top of std.json source and usage https://github.com/cvsae/dddb I'm waiting your commentsHi, well done! Your code is very concise, you could expand your database by adding tests and unit tests, that are a very important part of programming projects and widely supported in D. To get an example of possible test you can check this: https://github.com/damphat/kv-bash You can read about unittests in the D-Gems section https://tour.dlang.org/tour/en/gems/unittesting and the D wiki https://wiki.dlang.org/Unittest and also an article by Funkwerk https://dlang.org/blog/2017/10/20/unit-testing-in-action/ Also, it could be important to take care of error management in your program. What happens if the database stores an invalid json? What happens if I retrieve a key that is not in the database? You can read more about error handling and exceptions and scope guards here: https://tour.dlang.org/tour/en/basics/exceptions These are points that I hope can give you suggestion on how to further improve your code and abilities and hopefully continue learning D.
Mar 22 2018
On Friday, 23 March 2018 at 05:19:16 UTC, Fra Mecca wrote:On Thursday, 22 March 2018 at 15:34:28 UTC, aerto wrote:Thank you very much, i did some updatesI just start yesterday with d, I write dddb a lightweight and simple key-value database for dlang build on top of std.json source and usage https://github.com/cvsae/dddb I'm waiting your commentsHi, well done! Your code is very concise, you could expand your database by adding tests and unit tests, that are a very important part of programming projects and widely supported in D. To get an example of possible test you can check this: https://github.com/damphat/kv-bash You can read about unittests in the D-Gems section https://tour.dlang.org/tour/en/gems/unittesting and the D wiki https://wiki.dlang.org/Unittest and also an article by Funkwerk https://dlang.org/blog/2017/10/20/unit-testing-in-action/ Also, it could be important to take care of error management in your program. What happens if the database stores an invalid json? What happens if I retrieve a key that is not in the database? You can read more about error handling and exceptions and scope guards here: https://tour.dlang.org/tour/en/basics/exceptions These are points that I hope can give you suggestion on how to further improve your code and abilities and hopefully continue learning D.
Mar 25 2018