Today I worked a tiny bit on the mob coding app, had a fun brainstorming and resource-sharing session with friends (I discovered lots of cool new stuff, my favorite being Glitch!), pair programmed on learning the basics of React, learned how to make a GitHub app, saw old friends and made new friends at the Fullstack LA meetup, and tired myself out at the rock climbing gym with another friend late at night!
Real-time notes
9:32am: Let’s just dive right back in. (I’m tempted to do a personal check-in right now, but I have a feeling it might be better to just dive right into programming and see how I feel before I dwell on writing about how I feel.) So yesterday, before I put this project aside and went to enjoy the July 4th festivities for the rest of the day, I had finished my main refactoring task and I was amazed that it mostly still worked, even though I practically rewrote the entire app! But there are still bugs. I solved a couple little ones, and the next one that I still need to fix is this: “something isn’t updating correctly when the current player disconnects, and the countdown timer isn’t updating correctly when new players join.”
Like I wrote yesterday, I already know what’s causing that second bug. When I refactored the turn timer state and logic, I accidentally broke it again; since the server needs to send an up-to-the-millisecond update to the clients, I need to do that dynamically! So instead of saving a timeRemaining
variable, I still need to save the timestamp of the next turn change and calculate nextTurnTimestamp - Date.now()
each time I need to send that piece of data to the clients. Time to un-refactor my code!
9:47am: Ah, it would be so much easier if I could just send the timestamp to all the clients! Hmm, maybe I can. I have a feeling I made another incorrect assumption here about timestamps and syncing. First I’ll have a glass of water or herbal tea (I’m going to experiment with delaying my caffeine today, in the hopes that I can take a better nap this afternoon), and then I’ll look up how timestamps work. I have a good feeling that this will actually work, and that I just made an incorrect assumption earlier! (That does seem to be the main theme with this refactoring project: I made a lot of assumptions that were simply incorrect, and I’m always surprised at how long it can take me to finally question them.)
9:57am: Yup, Unix time is the number of seconds that have elapsed since 00:00:00 January 1st, 1970 in Coordinated Universal Time (UTC). So it already encodes a particular time zone: the one considered “the primary time standard by which the world regulates clocks and time”! That’s an interesting rabbit hole right there. I’ll make a note of it in my “gathering string” section of this blog post, haha. Anyway, for my purposes, this should work fine. Woohoo, problem solved! I’ll switch everything over to use timestamps wherever possible. Once again, what in the world was I thinking?! I don’t know why I ever thought I wouldn’t be able to send timestamps around. After all, I’ve worked with dates and timestamps in databases plenty of times! Ah well, moving on.
10:10am: Woohoo, fixed! I’m going to get up and move to sit next to my friends who just arrived for some coworking today.
…
10:50am: Well that was a long chat break, but well worth it! I have quite a few new things to check out, like Glitch and the “no backend” movement/philosophy and GitHub integration tutorials and more!
11:44am: Wow, I spent all this time just exploring more cool links and projects and brainstorming ideas with my friend. How fun! I’m in a really good mood now, excited about lots of possibilities and reminded that the world is full of awesome people building awesome things to help other people be awesome and build more awesome things and so on and so forth for infinite awesomeness! Also, I finally had a little caffeine. (Just green tea, but it helps.)
12:02pm: Now experimenting with running the Hoodie example app inside Glitch! I love that Glitch has a Google Docs style collaboration feature, GitHub import/export, and even a working console to access stuff on the server! So cool! I definitely want to use this in our meetups now! Well, time for a lunch break soon.
…
1:25pm: Back from a nice walk and lunch break with friends, and now I’m just sipping more tea, sending out some emails, confirming that my library books aren’t overdue, and planning some events and updating my calendar and my notes. Then we’ll probably do some pair programming!
…
5:18pm: After a fun brainstorming session, generating lots of ideas for projects and new things to learn, we settled on reviewing the basics of React, since we both wanted to try that out anwyway. It was fun! We got the sample code working in Glitch so we could both type in the same code editor! This is probably my new favorite web app! But before all that, we explored an interesting topic that’s very new to me: “universal” JavaScript, running the same code on the server and on the client.
Universal JavaScript and server-side React links:
-
NextJS for universal React apps – their getting starting tutorial looks good too!
-
Watch this talk: “Next.js: Universal React Made Easy and Simple” by Guillermo Rauch
-
Article on “Server Side React”
Cool stuff! After learning a bit about that and relearning some React basics, our friend shared his new tutorial with us: Building a GitHub app in Node.js! We just finished the tutorial, and I have to say, I’m amazed at how easy that was! Now I’m super excited to experiment with a bunch of GitHub apps for Learn Teach Code! I’d also love to use it with the mob coding app in some way, but even cooler would simply be a way to automate inviting people to our GitHub organization! I’m not even sure what I want to use it for yet, but I’m excited now that I know it exists and it’s so easy to use!
Wrapping up: After a power nap and a bite to eat, I went to the Fullstack LA meetup with my friends and had a good pair programming session with a new acquaintance, and I especially enjoyed solving that Pangram problem from exercism.io together! I learned a new technique for solving those types of problems! Then I walked home and went rock climbing from about 10pm to 11pm with another friend – just long enough to get really tired out! It was great! Overall, this turned out to be an amazing day – and to think, I started the morning feeling anxious and thinking it would be a difficult day to get through. Silly me. I’m glad I pushed through it, because if I had given in and left the office early, I never would’ve learned all those new things or had a chance to brainstorm with friends.
Gathering string
-
The story behind Unix time and Coordinated Universal Time (UTC) and the problem with leap seconds and the Y2k38 problem all sounds interesting! I want to learn more about it sometime!
-
Check out Glitch, which is like CodePen but with a backend for you to use very easily! My friend who is really involved in the open source software community loves it; he was so excited when describing it to us, I feel excited right now after just hearing about it!
-
Try using Glitch in our next meetup, and tweet @glitch with examples or photos of our community using it! See if I can get something featured in their “Learn to Code” section of the Glitch homepage!
-
Add to list of possible dream jobs and companies to keep an eye on: Fog Creek Software, the company behind Stack Overflow, Trello, and now Glitch!
-
Project idea: Try making a Slack bot, since it’s easy to test out now using this starter kit on Glitch!
-
Check out the work of Jenn Schiffer, who works at Fog Creek and made the Make 8-Bit Art web app!
-
Watch this talk: “A Cartoon Intro to WebAssembly” by Lin Clark
-
Check out Lin Clark’s personal site Code Cartoons and especially her “Cartoon Intro to Redux”!
-
Add to list of possible dream jobs: Whatever it is Lin Clark does at Mozilla, because she gets to play with lots of cool technologies and create tutorials and cartoons and talks to teach other people about them!
-
Watch this talk: “Programming Across Paradigms” by Anjana Vakil (my friend suggested it!)
-
CSS Grid Garden game made by the same guy who did Flexbox Froggy! Check out the source code too!
-
Check out Thomas Park, the guy behind Flexbox Froggy and CSS Grid Garden and more, who’s starting his own company or something called Codepip
-
Business idea: start our own code or CS education game company! (My friend suggested this half-jokingly, but hey, maybe we should!)
-
Project idea resurfaced: a computer science intro course like NAND2Tetris but gamified, in the style of Flexbox Froggy and other educational web app games like that!
-
Project idea resurfaced: a programming or Git and GitHub tutorial that uses GitHub integrations to simulate a team collaborating on a project with you, using bots and continuous integration with testing frameworks to provide helpful feedback and tips! There could be various “missions” with challenges like resolving merge conflicts to teach how GitHub works in a real-world setting, in a way that’s much more scalable than trying to get lots of people onto real teams with mentors. (Or this setup could be used for real teams with mentors, but just add an extra bit of structure and guided curriculum!)
-
Ask my friend about GitHub apps (previously called integrations) because he said he knows them like the back of his hand, and I think he’s also working on making their tutorials better!
-
Same friend also mentioned the noBackend philosophy: “an approach to decouple apps from backends, by abstracting backend tasks with frontend code.”
-
Another friend reminded me about the now cli, a JavaScript command line emulator, which I heard of a while ago – apparently now it’s part of a much larger project!
-
Learn about universal Javascript, see links in this blog post on that topic!
-
Review my friend’s tutorial Building a GitHub app in Node.js, share any feedback via a pull request, and experiment with building GitHub apps to use with our meetup!