Early to Bed

February 2nd, 2020
sleep

Sleepy

It seems I've fallen into a bad sleeping pattern that's happening week after week. I'll catch up on sleep on the weekend and stay up later than normal, and sleep in a few hours later than I do during the work week. When it comes time to fall asleep the night before I have to go back to work, I'm wide awake. Last night, I was trying to get to sleep until after 1 AM and was completely wired. If I had known I was going to be awake so late, I would have taken advantage of the time and gotten some work done, but instead I just laid there trying to pass out to no avail. I then had to get up this morning at 5:30 and work for 10 and a half hours. It was brutal. I wasn't that tired at work; in fact, I had a lesson halfway through the day and it was one of my better lessons I've taught. However, I got home, ate some dinner, did a few chores around the house, and got my hugs and kisses from my daughter, and it kicked in like a ton of bricks. I was able to get in a solid hour and a half of studying before I passed out at the wheel. I fell asleep for about 10 minutes, but actually went directly into a dreaming state, which is strange for me. Typically, when I fall asleep, I don't go into a deep sleep for at least an hour or two; it takes me a long time to get fully unwound. I woke back up and actually felt really refreshed, so I got a little more work in, but I think I need to stay on top of my sleep for the week.

difficult

I'm still working on the Maximilian Schwarzmüller's React Native - The Practical Guide on Udemy. This course is only about 30 hours long, but it seems to be taking me longer than some 50 hour courses have taken. Whenever I've been working on this course, I'm completely exhausted and overwhelmed after a couple hours, and have to put it down to save my sanity. I feel like I'm complaining a lot about this course, but I'm only trying to convey the facts. This course is incredibly intensive, and is not something anybody else should take lightly. You will learn a lot, but the level of difficulty is really high. I think this is the 8th or 9th course I've taken on Udemy, all by Colt Steele, Stephen Grider, Andrei Neagoie, and Maximilian Schwarzmüller, and nothing even compares to the level of difficulty of this course. I think the difficulty is really derived from the speed at which we are moving through this content. Oftentimes in this course, Max will take you through a project that will revisit concepts you've learned along the way, which is great for reinforcing these concepts, but I think I would appreciate it if he took more time explaining these concepts and less time flying through the code. I'm glad I took this course, but I think I would have had a much better time starting with Stephen Grider's React Native course and then moving on to this course, which I will likely be taking next.

react

Yesterday, I finished up with adding the form for creating and editing products to add to the shopping app, which turned out to be a ton of code. Our form screen ended up being almost 200 lines long, most of which was business logic. This was mostly due to the fact that we used useReducer instead of Redux for the form and kept that within the file. This was an interesting approach to form creation, and not one I had done in the past. In the last course I took on React, Stephen Grider's course, we went over forms at length using Redux. The approaches are very similar, and useReducer actually looks really similar to what Redux ends up looking like. As far as readability, I think I like how Redux looks better than useReducer, but I can see the value in the convenience. Today, we moved on to setting up a database to hold these products, instead of storing them in an array of dummy data, held within the app. This way, if we create or edit a product, the data will persist instead of being dropped every time the app is reloaded. For this, we used the realtime database that is part of Firebase. I've worked with Firebase on several occasions now, and this has actually turned out to be one of the easiest configurations I've had to deal with. Overall, Firebase has some quirks and its own learning curve, but it's not that tricky and has some great features. Since we already had so much code written for the actions we wanted to take in Redux for creating, editing, and deleting products, it was only a matter of converting these into asynchronous functions and adding the configuration for Firebase. It wasn't completely trivial, but it also wasn't nearly the hardest thing we've done to this point. I still have a little more to go before finishing this module, but I think it will have to wait until tomorrow, as I'm hitting the sack early tonight.

Until tomorrow!

Created by Sam Thoyre, © 2019