Hello, welcome back! So it’s now the last week of the backend block of bootcamp, and also the beginning of a week-long sprint! This sprint will be a chance to practice everything we’ve learnt so far on this block. It will consist of building a database containing articles and comments, a server and an API, which all together could function similarly to the backend of an online forum. We’ll begin by working as a pair, but then split up and complete the rest solo after a certain point.
The day started, as always, with our morning kata hour. I started a new set of katas this week that are more like puzzles, similar to the ones on Codewars, so I’m quite enjoying them. I highly recommend Codewars to practice your problem-solving skills by the way.
Today’s lecture was about database migration and the potential problems that could emerge when maintaining a large database over a long period of time. We learned about how the state of the database is altered after POST, PATCH, PUT and DELETE requests, so we learned how to set up the appropriate scripts to re-seed the database before every test. We also learned how to use Knex Schema Builder methods to design the structure of our database tables using knex methods, as opposed to creating everything with raw SQL. All in all, really helpful stuff and nothing too confusing today!
After the lecture, we then got paired-up and our task for the next couple of days is to build and seed our database together, then start the beginning of the API before going solo for the rest of the week. As always, I was paired with someone who I hadn’t really spoken to before, so I hoped we’d get along OK! We were both a bit nervous about the extent of the project too, but we’ll see how it goes!
The afternoon was spent setting up the database and we seeded the first two tables with data. The next two tables required us to manipulate the data in certain ways so we needed to write some functions to do that. We got started on these but we will have to complete them tomorrow because initially they weren’t the easiest things to wrap our heads around! However, I think we made a good start today.
Surprisingly I’ve not had any dreams about coding for the last few days now…I almost feel like something is wrong!
As a few of us were struggling with writing the data manipulation functions, we had a brief lecture today to give us some examples. That actually really helped, and I started writing some out before the lecture had even finished! I made plenty of notes too because I doubt I’ll remember what was running through my head if I look back at this after a couple of months! My buddy said he’d been struggling with the morning katas that involved data manipulation too, so we talked through the problems again and I explained my notes to him which seemed to help. I didn’t want either of us going away from this task feeling confused about things.
We spent the rest of the day using our new functions to seed the data to the other database tables. There were still some points where we got stuck, but the tutors are always only a Zoom call away, so we were never left hanging for too long. Some other people seemed to fly through this part and were already on to building the API at this point.
A word of advice: If you find yourself in this situation, try not to compare yourself to other people, although I am guilty for doing this at times. People naturally work at different paces and you don’t always know if other people have previous experience in certain areas. Don’t worry, just focus on your own work and making sure you understand it.
This week is starting to become a blur now. Of course I was paying attention to today’s lecture, but I’ve already forgotten what it was about…good job there are plenty of notes I can look at later!
Anyway, as a pair, we finally reached the point of creating our server and API. This was fine as we’ve done a few similar projects now, so there was plenty of reference material to help us along. We created the first endpoint for the API which involved getting a list of all of the article topics from the database. All of the endpoints needed to be fully tested, so we ensured we tested all the possible happy and sad paths, which took us until the end of the day. We actually hadn’t fully finished this by 5pm, so we Zoom called each other again and worked together for an extra hour. I really appreciated that my buddy wanted to do this while it was fresh in our minds. Once we both felt confident, we agreed to go our separate ways and we’d be working solo for the rest of the week.
I was looking forward to not being on Zoom as much today; it does get quite socially exhausting all day every day!
We didn’t have a lecture today; more of a Q&A session instead so we could discuss things we needed help with.
Then the day was mine to tackle building all the other endpoints on this API! Using these endpoints I would need to GET, DELETE, PATCH and POST information on the database. The different endpoints on the API were things like topics, users, articles and comments. For example, if you imagine articles posted on a forum, I should be able to get one (using something like the title), edit one, delete one, or post a new one. I needed to code the models and controllers that would be able to do all of these things, plus I needed to test everything extensively. So…it took me all day to figure out how to do a DELETE as I’ve never done one before! There was still lots to do and only one more day to work on it, but I resolved to just try and do as much as I could.
I was slightly tempted to keep working on the sprint until late, but I decided not to because I didn’t want to stress about it.
TGIF! Last day working on this sprint and last day of backend! There were no lectures or any Q&A things planned in today; we were just carrying on working by ourselves. I did have a one-to-one with my mentor tutor to discuss how I was getting on generally and I also got some useful feedback about my project.
Today was a busy day for everyone and it seemed like the tutors were helping people on Zoom all day. I did ask for help once, but I actually figured out the problem while I was waiting for help, so I was pretty proud of that! As I expected, I didn’t manage to finish everything by the end of today, but I did manage to PATCH (edit) an article, which was the main thing I wanted to practice today, as I hadn’t done this before. I am tempted to work on the project some more at some point, but I’m not sure when that will happen with all the other stuff I’m busy learning right now!
The day just flew by until 4:30pm rolled around, which meant it was time for us all have a chat on Zoom to finish off the week. I felt a sense of relief for finishing backend; I think I found it quite difficult at times because I’m a visual person and sometimes it was hard to visualise what my code was doing. I can’t believe how much I’ve learned though! I’m not sure how much of this information will be retained in my memory, but maybe I’ll be surprised when I come back to it again.
Next week is careers week, so we will be speaking to the careers team every day about different topics related self-promotion and job-searching. Also for the people who didn’t do the pre-course, it will be time to practice HTML and CSS and build a portfolio website. I already did this prior to bootcamp, but it will be good to practice these things again before starting the frontend block after careers week. I think I’ll tweak my website a bit too as I have some things I can update.
That’s enough for now though, I’m off out for cocktails!
I decided to take a break from coding this weekend as we’d worked really hard this week and I wanted to rest my brain…
Saturday - Not much to report! I just had a nice relaxing day to myself, dyed my hair and played games.
Sunday - I cuddled some alpacas.