Hitting Blocks

February 16th, 2020
bindings

Getting Unstuck

I had a ridiculous day at work today and it took everything out of me. After having the last 2 days off and enjoying some nice time with my daughter, I was thrown back into the frying pan for a 10 and a half hour shift of mayhem. This was the busiest day we've had on the books all year, and actually the busiest day I've worked since I've gotten to my club in the last 3 years, outside of tournament days. Actually, it went pretty smoothly and we had no issues all day; time actually flew by and it was overall a pretty positive day. We do have a crazy schedule for the week ahead, with tournaments every day from Tuesday through Sunday, meaning we are going to be grinding our teeth by the end of it. The actual day of the tournament typically runs fairly smooth, since our new team of the last year is much more proactive about setting things up beforehand, but the lead up to the tournaments is usually a hectic mess, and since we will be running other tournaments while getting prepared for the next tournament, it's going to be a mess. It's not something new to us, but it will be taxing on all of us. Until then, we have our usual ladies' clinic tomorrow, which has been going really smoothly, and then we will start preparing for the mess that awaits us in the coming days.

busy

After this crazy day today, I got home and my eyes would barely focus. I've moved into some more complex concepts in Andrew Mead's The Modern GraphQL Bootcamp on Udemy, and the challenges that are baked into the course have become a lot harder than they were in the basics section of the course. I appreciate the ramp up and welcome the challenge, but I think it was just on the brink of what my brain could take this evening. We bring something different to the table every day, and some days are better than others. The fact is, after today's fiascoes, I'm in need of some good old sleep. But, to feel like I'm still staying on track, I need to put in at least some work every day, regardless of how I'm feeling. I'm not sick anymore, or at least not nearly as sick as I was, so I don't have that as an excuse. I'm just tired, and that's just part of trying to make this career change. There are going to be days where I just don't have as much to give because of the schedule I'm under, and there will be others where I can put in some extra time to make up for the rough days. I need to at least put in some time every day, though, for the sake of making and maintaining good habits. It's a slippery slope, and one missed day can turn into a week, and then all of a sudden it's a lot more difficult to get back on that horse.

breakthrough

In the first video I watched this evening, I hit a challenge question right off the bat that left me staring blankly at the screen. Last night, Andrew introduced the concept of creating bindings with Prisma, to be able to call mutations and queries as methods and use asynchronous code to create these. We went over how to do this with Promises using .then last night for creating posts and updating posts. Today, he introduced how to do this using async/await. He showed us how to write the same code as we did last night for creating posts, and then the challenge was to convert the code for updating posts into async/await syntax. I was left scratching my head. I think part of the issue was that I didn't have the lecture from last night fresh in my head, but the main issue was my lack of focus for the night. My temptation was to give in and skip ahead to the solution, but I decided I wasn't going to do that. I realized the real learning going on in this course lies with hitting these blocks and working through them, so that's what I was going to do. I beat my head against the wall for a solid half-hour before I finally came up with some code. It produced an error, but I read through the error, found the issue, fixed it, and voila, I completed the challenge. This was empowering. Instead of celebrating, I moved on and finished a few more videos without hitting anymore of these blocks and got into a good groove. We learned about the directive for changing the relation between different typedefs, so that if we deleted a user, it wouldn't give us an error. As our code stood, if you tried to delete a user with comments or posts associated to their user, an error would occur because the comments still existed and, thus, would no longer have a valid user. With cascade, you can delete a user and all of their posts and comments will be deleted as well, so no error will occur. I just have a couple more parts to this module before we move on to authentication, but I think they're going to have to wait until tomorrow, when hopefully I'll have a clear head to work with.

Until tomorrow!

Created by Sam Thoyre, © 2019