Udacity Restaurant App, Front End Version: The Agony (and the Thrill of Finishing)
I spent a good week and a half (that seems to be the pattern) on this restaurant review app and last night, after having my computer slow chug because I had both vampires Chrome and Slack at my neck (they hate this old POS I’m using) and gaslight me into thinking “this is how it’s gonna end, huh?” because SHIT WOULDN’T WORK…I said fuck it and turned the thing in. And it passed. I just wanted feedback but it passed.
Reflections on the month:
The Promises and AJAX sections were okay. NYT API would not load with fetch for some reason but I learned enough that I thought I was ready for the service worker/progressive web apps section. That part was mildly entertaining but ultimately not helpful. I wasn’t at the “you can figure this out” level they assumed I was. I wish it had been a more pared down example so you could see things more clearly.
So I read articles and watched videos. When I thought I had it, my attempts at caching the page still failed. I got all sorts of red errors: promise failed, uncaught error, you didn’t give .respondWith() what it likes, failed to fetch. Too much to remember at the moment. I looked around and no one else seemed to be having this problem. I asked in Slack and got crickets and “clear your cache.” What the hell do you think I’ve been doing each time?” I felt like the person that calls internet customer service and they say this to get you off the phone because the queue is high.
I used boilerplate service worker code to try and get things to work and it still failed. I went to Firefox and it seemed okay and I wasn’t getting the errors but at this point I didn’t trust it. The simulated offline mode wouldn’t pull from cache, but actually turning off my wifi seemed to work. The madness was setting in. And my inner self telling me I was no good and why do you even try.
I finally copied and pasted someone’s fetch event that just passed and looked at it to see what made it different than what I was doing. I don’t feel like Udacity emphasized the whole cloning a response thing. So I ended up using a basic version of the cache event request and response to get it running. The last two days were a beatdown.
I get lost in the chaining process (What did it return? What do I name this so I remember wtf it is?) I’ve got some third party material to look at so I can try to nail this but the clock is ticking so I can’t dwell on it just now.
On the CSS/accessibility front, there was the map not behaving issue that I wrote about here, then trying to figure out how to label and what to label for a screen reader. I’ve still not gotten it down pat but apparently less is more. I did learn to use Chromevox a little better, which will be useful when I get really old because I was born nearsighted and don’t expect the good times to last.
Also my skip link wouldn’t show up. Even though it’s the first link on the page and I added the anchor and all that, Chrome skipped it. I got a person in Slack and the classroom to try it and they said it worked. So I wasn’t crazy, this thing is fucking with me. I know how things get parsed. I’m a logical, reasonable person that hasn’t done anything wrong besides trust the equipment.
That’s when I threw my hands up and turned it in. I was over it and figured I would at least get some feedback on where to troubleshoot. But it worked fine, they said.
I still don’t know what Chrome’s problem is. I got rid of some extensions I don’t use even though I had no issue like this before this week. I dumped my browsing data, I flushed my DNS. I think I’ll just use Canary and Firefox for dev and let regular Chrome play in the corner.
So this version of hitting the project wall was pretty awful. But I lived. So if things don’t work like you know they should, get someone on the outside to test it. You might have to wait a while but someone will do it eventually. If they don’t ask again until they do. If they still don’t, fuck ’em. They weren’t on your side. Then you might have to find another computer to run it on so you have a control to check against. But don’t torture yourself like I did. If you don’t have any regular code buddies or anything this can be easy to slip into.
It’s over now. I started the React part, just the first section, to give myself a break and to keep moving forward so hopefully I can finish. Now I can get into that and hope it makes more sense than that last bit did.
