This week was the last week in the Back-End block of the Northcoders bootcamp, this week focused on taking everything we had learnt in the previous 2 weeks and applying it to create a working back-end of a project. I also had my first code review this week, which went really well and it was great to get feedback on what to improve and what was going well.
We'd previously been shown how to do asynchronous functions using Promises and then blocks, so this was all about learning how to write asynchronous code in a different way. I've definately found async await easier to read then Promises which has made them easier to work with for me but I have from myself accidently mixing the two together a bit!
This section focussed a lot on how to error handle our database queries more indepth, we used tools like pg-format for formatting query strings and also error first functions with the idea of passing those errors out of our database interactions into the different error handling middleware we created.
It was great to be able to reuse errors across db queries to help keep my codebase clean, and learning about extra error handling also helped with trickier errors for tables with forgien keys.
Towards the end of the week we' learned how to host a PSQL DB and express server using Heroku. It was great to finally be able to understand how to put something I've made out there for other people to see and not just be something that is running on my laptop.
Unlike most weeks where we've had a lot of new information introduced to us in quick succession, this week was all about rounding off our understanding and applying to the back-end of a project that we will make the front-end for in the coming weeks. So with that in mind I reflected back on previous code and notes of my own to apply to this week's project!
The documentation has been great to use to sense check my queries and make sure they're doing what I'm intending, especially with more complex queries.
The docs for the node-postgres modules are also fantastic, especially for getting small code snippets from and double checking my syntax is correct.
They're in here everyweek but the folks at Nortcoders really do a great job with the notes. Just going back over the notes that have been written for us is fantastic, because there's been several times where I've gone back and re-read the notes ina completely new light, and that clarity is great.