Playing With Time, Part 2

After a load of work, the repetition functionality is up and running!

In Formation news, I passed my Graphs benchmark on Monday after taking it twice (because I just had a feeling I could hack it that second time, and I did). This cleared out my graph-related practice problems for the week, and since I already had a fairly light schedule for the week, it opened up yesterday and today completely.

Which means — loads of time to work on BrainReps! Or maybe not loads, exactly, since I still have stuff to do. (A couple dentist appointments, a recruiter screen, same old same old.)

Enough time, though, to knock out the meatiest portion of BrainReps thus far: the POST functionality to change the review date after reviewing the fact.

Today’s (and yesterday’s) Work

I got most of it knocked out yesterday, including some more styling and — very exciting — an emoji rating system. Towards the end of the day I finally set to work on applying the emoji rating to change the date of next review and, after a modest amount of struggling, got it!

Or not. I shut the lid of my laptop, thought for a second about what I’d just achieved, and realized that I’d only managed to provide the user the ability to move up one tier. That’s it. Not up two, not back one, not all the way back to daily.

I had more work to do.

So this morning, after finishing my Morning Pages and before the kids woke up, I decided to just crack through the rest of the work.

It took a hot second, a refresher on switch statements (because why not!) and Ye Olde debugging breakpoints in the console, but I really did get it this time!

I will say, the easiest the about the entire process was manipulating time. You can just literally add a specified number of days to your Date(), which you can see below in the mess that is calculateNewReviewDate — I just added the tier to the reviewDate by using setDate() and getDate(). Not bad at all.

Here’s the code I ended up with:

Work For Tomorrow

I have reached the biggest piece of work that I’ve been semi-avoiding: rendering each fact individually and only loading the next one after an emoji rating has been clicked.

I am not sure how I will do this. I also want to create a progress bar for the bottom; there’s got to be something out there that I can plug-and-play, right?

We’ll see. We shall see.

(In the meantime, wish me luck! Said recruiter screen is in a half hour, and I’ve got a prescreen call for the Military Spouse Fellowship Program tomorrow! As Olaf would say: All good things, all good things.)

2

mins
read

Begin typing your search above and press return to search. Press Esc to cancel.