Today was another day of creating tutorials for students, but I also got to learn a couple new little things. My entire afternoon was taken up by a long nap and an eventful doctor appointment, which I’ll write about another time. But overall I’d still call it a good day. Once again, no time for organizing my notes, so here they are as a real-time log:
8:16am: Got up nice and early today, and even though I was up late again, I actually feel relatively awake right now! Definitely will need a nap or a siesta today though. The biphasic sleep experiment continues, apparently! Anyway, time to start my day. I’m at a coffee shop now with a sugary iced coffee in hand, wearing a sweatshirt and a jacket because they’re blasting the AC in here, probably to encourage me not to stay and work here for too long. Picking up right where I left off last night: an intro to setting up user login with GitHub’s API and Firebase Authentication!
8:31am: Side note: I was looking up tmux (terminal multiplexer) and after checking if I could run it on Windows somehow, I found this: Bash on Ubunut on Windows! With that, you can use most Linux command-line tools on Windows without needing a virtual machine! So cool! OK, back to what I was doing. All this because I took a screenshot of my command line, haha.
8:37am: Jumping from one rabbit hole to another, I’m now reading about the file URI scheme because I wanted to identify and explain exactly why I need to run my app in a local web server in order to test it with the GitHub authentication API. At first I thought it was because of CORS, and maybe that’s also involved here, but I think the reason is much simpler: a file URI points to a file on the local filesystem, so as a link on the web, you don’t really know where it’ll actually point to! Or phrased another way: a file URI is not a location on the internet, not a valid web page!
Hmm. But maybe that doesn’t get to the heart of it, either. I’m not sure how to find the answer I’m looking for! Maybe I’ll post on Slack about this. (And while I’m there, I’ll take care of a couple other unrelated things for an upcoming meetup and answer a couple messages.)
8:53am: I just remembered about another side project I really wanted to work on: a more structured collaborative note-taking app to encourage more of our meetup study groups to take notes about what they did at each meeting! But that’s for later, haha. Right now, I’m looking through GitHub’s documentation on setting up and registering OAuth apps.
Links that I probably want to include in my instructions:
- GitHub’s guide to Registering OAuth Apps
- Direct link to Register a New OAuth Application on GitHub
- About Scopes for OAuth Apps
- About Authorization Options for OAuth Apps
9:10am: Couldn’t stop myself from digging for a satisfying answer to my question about linking to file URIs from a remot web page. But it’s been long enough, so I’ll give up for now and just try to write something short myself.
9:43am: Finally managed to condense my current understanding into a short paragraph, after a lot of rewriting. I don’t know if sleepiness is making me super detail-oriented right now, or if I’m normally always like this! But I’m frustrated with my own lack of understanding here. But I’m moving on. Yet another rabbit hole: OAuth and authentication! How can I introduce this huge topic very quickly, with just enough detail that it doesn’t feel like a total mystery, but not so much detail that it’s overwhelming? I’m already feeling a little overwhelmed myself right now. Hmm. Let’s collect a couple links and definitions.
Intro to OAuth notes and links:
What is it in a nutshell? OAuth is an open protocol that lets you give certain apps permission to interact with other apps that you use, without needing to enter your password for all of them!
Actually, that’s all I found for now. I don’t want to spend too much more time on this right now, so I’m going with “good enough!” and moving on.
10:37am: Time flew by again! I’m still not as focused as I’d like to be, but at least this is an opportunity to catch myself each time my mind wanders off. I finished reviewing, testing, and writing the steps for setting up the app with GitHub and Firebase. Now I’m looking at the Firebase Authentication API. I forgot that it’s so easy! Just a couple of functions to log in the user.
11:01am: Couldn’t stop myself from doing a bit more writing and rewriting. I also got a response from a very knowledgable friend on Slack, which gave me an idea to test later: I should try registering my app with GitHub using a file URI, but with the host specified and pointing at my computer’s IP address! I wonder if that would work. (Either way, I know it isn’t a good idea though. lol.)
11:09am: Distracted by messages on Slack. I need to take a quick bathroom break now too I think, so hopefully nobody will steal my stuff!
11:25am: Back from a quick break and conversation with two guys sitting next to me at the coffee shop who happen to be software developers who work at the same company as one of my friends! That was fun. OK, where did I leave off…
Next Firebase Authentication questions and topics:
Should I suggest using
signInWithRedirect? I guess I’ll stick with the former for now.
Where did I find out about
onAuthStateChanged? Oh, from this Firebase auth video. Should I suggest using that listener function, or just use Promises? Leaning towards the former for this one too.
signOutfunction is easy to use, but it does return a Promise. I probably won’t mention that though!
12:30pm: Posted the almost-completed homework, phew! It certainly helps to have a daily deadline! Time for a lunch break now with friends at my usual coworking space.
7:26pm: After lunch, I hopped on the Metro just in time to get to my doctor appointment, which went well I guess… but that’s for another blog post! It was much more emotional and exhausting than I anticipated, so I went straight home afterwards to regroup. Then I took another epic nap, woke up and finally returned to the coworking space where I left my laptop. Now I’m hanging out with a couple friends and trying to get back into work mode, even though my brain is elsewhere. But I know that focus returns with enough practice. First, I’ll reply to a couple student questions that I had missed earlier.
7:42pm: Today I learned (#TIL woohoo!) some more Git commands for working with remotes, like how to change the URL of a remote. (I think I used to just remove them and recreate them entirely, which I now know is a very clunky solution!) OK, questions answered, did a little reading, now back to finishing up those instructions for Firebase authentication. Headphones on and time for some electronic music to help me focus!
8:05pm: Reviewing the documentation for the Firebase User object, I decided to give the students a mini scavenger hunt style challenge to identify the properties they’ll need to access from that object. Tech docs scavenger hunts are becoming one of my favorite activities to do at our meetups, because it’s such a big part of programming that all the popular tutorials tend to gloss over!
8:24pm: I decided to break down the steps even further to give an example comparing the
textContent property against the
innerHTML property, before asking students to just take it on faith and copy-paste from the instructions. It takes longer this way, but I’m hoping it’s worth it!
8:35pm: Almost done, but I’m going to take a quick break to have a bite to eat and then walk back home.
10:41pm: Back home, trying to get back to focusing on this after I was upset for a while, talking about today’s doctor appointment and giving in to my anxiety about hypothetical future doomsday scenarios. I want to stick to my goal of keeping these notes focused on learning things though, so I won’t write any more about that. Long story short, I’m having some trouble concentrating because of my emotions (my main obstacle most days), but I want to try again. I’m still wide awake after that long nap, so I may as well see if I can get some work done, or at least explore some topics I’m curious about as a way to cheer myself. So, where did I leave off? Oh right, the last couple of steps.
11:18pm: I finished writing the last steps, including a shorter recap of how to make a pull request, and I tested the code one more time – all working as expected! Now I’ll just read it over one more time, make any minor changes, and update every copy of the issue so everyone has the latest changes.
12:05am: Finally all done! I got caught up with making some other small changes. OK, time for a midnight snack and then sleep!