Day 1009 : Ship 'Em Out

HIPHOP and CODE - Aug 13 - - Dev Community

liner notes:

  • Professional : Started the day trying to find a solution to the blocker that I ran into yesterday. In this application I'm building, it shows you steps to get a task completed. It will show you a step with some code, you copy and paste the code where it tells you in an in-browser editor and you refresh the page and the application will show you the next step. Last week, I built a proof of concept using hard coded value and got it working. Yesterday, I migrated the application to another platform so I can use a server to get the data I previously had hard coded. The problem that I ran into was that since the values were not hard coded and instantly available but came later after making a call to an endpoint, some of the conditional statements I used to determine what step to show, were not satisfied because by the time the values came back from the server, my code to determine the step had already ran with the values being undefined. I needed to figure out a way to have my code run after the call to the server was done.

Normally, no problem, just put some code in the fetch call that once the promise is complete and I get the values I need, run my code to determine what step to show. The issue is that I can't really modify the fetch call or any code because the application is kind of like a tutorial and I can't just put code that is used to run the tutorial in the code that has nothing to do with what the people are supposed to be learning. Basically, the user should only see the code needed to get the task done for the tutorial, not the behind the scenes code needed to run the tutorial. At least not have them mixed together.

So after racking my brain, reading a bunch of documentation and blog posts, and trying all sorts of code for like a day, this morning I came across Performance Observer API: https://developer.mozilla.org/en-US/docs/Web/API/PerformanceObserver
I had heard of it before, and I think I may have even used it to track events or something, not sure. Turns out that one of the things you can observe are fetch calls. So I set up an observer and when a fetch all is made (there's only one), then I run my code to determine what step should be shown. Had to make a couple of other tweaks, but got everything working.

Also had a couple of meetings today. One was with my manager so I was able to show them the application I just mentioned and walked through the tutorial to show how it would work and got some feedback. I also got them to use another demo application I made last week to showcase a new feature. I added some UI elements and information to it the last time they saw it and I wanted to make sure that it clear what everything was doing. They did everything I expected and had no issues. Cool. Going to clean it up, push it to the code repository and make it deployable for others to try it out and give me any more feedback. Going to write a blog post about the new feature and get that published in the next couple of weeks. Not a bad day.

  • Personal : Went through some tracks for the radio show last night. Worked a little on my side project. I even spent some time trying out different solutions to fix the issue I was running into with my work application then fell right to sleep.

A large, green tree with a thick trunk and many branches stands against a blue sky with some white clouds. The tree has many green leaves. The ground is covered in a green grassy field. The sun is shining through the branches of the tree and casting shadows on the ground. The location is Tree of Life, Nicaragua.

I'll probably do much of the same as last night, go through tracks and work on my side project. Also, Google has announced a new foldable phone. I have the previous version and really like it. It looks like this new version improves in the areas that I am interested in. Going to go through some reviews and see if I want to put in an order. I can get a pretty good trade-in value for my phone (it's in really good condition), plus some other additional offers if I order by a certain date. I have a few days to make a decision if I'll preorder and they will ship 'em out in September. I normally skip at least one generation before I pick up a new device, but it looks like they really made a large jump in this new version. We'll see. Going to complete my step goal, eat dinner, and get to work.

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .