Ugh! I just found out that I was charged for the New York Times Cooking website again. I keep telling myself I must save my favorite recipes and cancel the subscription. I have the NYT Cooking website open as a reminder to start archiving my favorite dishes. I even created a recipe folder on my desktop for this purpose and plan to use Notepad++ to document the recipes. I can’t simply save the web pages since I intend to cancel my subscription once I’m finished saving the recipes. Paying for it feels unnecessary, especially since I only use the website during the holidays—it’s a waste of money. It all adds up over time.
Tommy and I are considering the Paprika app for storing our recipes, and I find that idea quite appealing. After researching it, I believe it’s a solid choice. The app can sync across your phone, iOS devices, and laptop. However, if you want to sync it with Windows while using your iPhone, there’s a one-time fee for the Windows version. We’re uncertain if we’ll go that route, but we will explore our options.
Happy Monday! Today is shaping up to be quite nice. It’s a bit windy, and the temperature is around 65 degrees, but it’s not cold, which is great. We didn’t tackle the garage this past weekend, but there’s no rush; we’ll get to it eventually. My current desk is still holding up well, haha! To help alleviate the anxiety of dealing with the garage, I think we should approach it gradually. We’ll start by decluttering the trash and putting items away where they belong. I believe we can accomplish this!
On Saturday morning, Tommy and I worked out together. Tommy rode his bike while I focused on core and HIIT exercises. The HIIT workouts were intense, but they got my heart rate up! Afterward, we spent most of the day playing on the computer. On Sunday, I again worked out in the morning, concentrating on leg day with weights. Tommy did not join me for the morning session since he had a hockey game later that evening.
During the day, we decided to watch “Outlander,” and I have to say, it’s quite engaging. The storyline is captivating. “Outlander” is a historical drama television series based on the book series of the same name by Diana Gabaldon. It follows an English former World War II military nurse in Scotland who, in 1945, unexpectedly finds herself transported back in time to the year 1743.
What was I doing in coding? Oh, yes, we need to write a function that behaves like Promise.all(). Ok, Promise.all() is a method in JavaScript that takes an array (or iterable) of promises and returns a single promise that:
- Resolves when all the promises resolve, and gives you an array of their results.
- Rejects immediately if any one of the promises rejects, and gives you that error.
The assignment provided a hint suggesting the use of Promises in conjunction with the map() function. The map() function will be employed to iterate over the promises. I’ll return after I conduct a bit more research on this topic.
Oh! It’s time for lunch! We have some leftover turkey, so I think I’ll prepare myself a sandwich. A turkey sandwich paired with some grapes sounds like a good lunch.
Ok, this is what I have so far in coding:
function promiseAll(promises) { return new Promise((resolve, reject) => { const results = []; let completed = 0; }
We are in the process of creating a new Promise that we will eventually either resolve or reject. The `results[]` array will be utilized to store values at their corresponding indices. To keep track of how many promises have been completed, we will use a variable called `completed`, which we have declared with `let`. Unlike `const`, which cannot be updated or re-declared after its initial assignment, `let` allows for updates within its block scope. This means that a `let` variable, when declared within a function, is only accessible within that function. Each time a promise is resolved, the `completed` count will increment.
For the remaining implementation, I plan to use `Promise.all()`, a method that processes an array of promises concurrently, ensuring that all promises are resolved before proceeding. Additionally, I will likely incorporate a loop, probably an `if` statement, as I often find myself using the ‘if’ statement a lot. Even when I think I can use another kind of loop, I always seem to come back to the ‘if’ statement.
I’ve been reading about this for the past hour, and I’m starting to feel a bit fatigued. Haha! I just spilled some water on my desk, but I cleaned it up quickly. It wasn’t much, just enough to be a minor annoyance. Fortunately, it was at the edge of my desk, so nothing else got water on it. Since my desk leans a bit, the water did end up spilling on the floor. Now I’m enjoying some matcha tea, being extra cautious not to spill it, as that would be even more troublesome to clean up.
As for dinner tonight, I’m not quite sure what I’ll make. I’m sure something will come to mind. I’m interested in getting a mini printer to print small pictures, possibly sticker pictures, which I can use in my planner or journal. Tommy mentioned that he resizes pictures on his laptop before printing, so I think I’ll give that method a try.





