DEV Community

Cover image for Creating a database from scratch with Node.js - Day 17
Luis Felipe Ciochetta
Luis Felipe Ciochetta

Posted on

Creating a database from scratch with Node.js - Day 17

Hello folks!

Quick update on the database project:

I have refactored every single one of my statement functions.

I am reading the book "clean code" right now and I am really liking the ideas there, so I have spent some hours today just refactoring my functions.

I am now checking for errors using try catches and throwing exceptions instead of returning errors, the code is indeed a lot cleaner.

I am also trying to respect the "each function should do one thing" principle, so I am breaking down some giant functions into many little functions and trying to keep each function dealing with one abstraction level.

So yeah, I do not have anything flashy to show off today, just did some good old refactoring

Thank you for reading

If anyone wants to read the code or play around with the project, this is the repository for the database >

GitHub logo ciochetta / learndb

Database project I've created for learning purposes

and for the parser >

GitHub logo ciochetta / lql-parser

parser for my database project

Discussion (0)