littlelogs

Keep a social journal of your work progress as you make and learn things.

May 2017

rhitakorrr
rhitakorrr

Tonight I started working on the #MidnightMurderParty reader again. It was a bit of a rocky start as an error in the back-end prevented me from testing my front-end code. I ended up debugging #Ruby—fun since I don’t really know Ruby—and after some fumbling and frustration, fixed the problem.

Interactive links are now supported. I plan to add one more feature tomorrow, and then the reader is done aside from testing and small enhancements.

larouxn
larouxn

おはよう、心配しない、これは短いログだけ。

(Good morning, don’t worry, this is only a short log.)

Just wanted to stop by to mention that @rhitakorrr and I merged the new PureScript editor into master and deployed to both #MidnightMurderParty staging and production last night. Ran into a strange Postgres vs SQLite difference based bug and had to drop databases and what not due to some model refactoring but overall it was a pretty straightforward deploy considering the change was +2000 lines. Anyway, this our new language breakdown (20.3% PureScript, Elm is 52.2%, Ruby 5.3%): languages

じゃね (See ya later) ✌️

rhitakorrr
rhitakorrr

Finished the #MidnightMurderParty editor with @larouxn tonight. Google login is in place with session-based auth for our endpoints—way better than sending a raw string! Also fixed the automatic release date generation, which was buggy and slow for no good reason. Still no luck getting the backend auth to work on my Windows machine, unfortunately. Lost a couple hours installing certificates, updating gems, uninstalling and reinstalling #Ruby, etc. to no avail. Oh well.

larouxn
larouxn

こんばんは, just a quick update here from the #MidnightMurderParty backend team, aka, me. We (@rhitakorrr and I) have successfully setup frontend to backend Google auth validation with built-in validation that it’s either @rhitakorrr or I logging in as well as session storage to store said auth status which we then use for our authenticated endpoints that we hit up after login. No more server side yaml key and (unencrypted) browser cookie garbage for us! 🙃

The backend is done, for now and thus, I will move on to writing MMP animation soundtrack v1.1 next, taking into account @rhitakorrr’s awesome feedback. 🎹

rhitakorrr
rhitakorrr

As it turns out, my CSS styles were bad but not beyond reuse. Finished the UI and worked with @larouxn on authentication. Login verification on the server with a Google id_token now works—well, on Nick’s machine at least. Apparently my Windows machine is missing some certificate, so I have to comment out the auth code locally still. But that’s a problem for another night.

For tonight, I’m happy to say that the #MidnightMurderParty editor front-end is in perfectly usable shape, leaving a few days to work on auth with Nick, tweak some things, and play some Dark Souls III before I have to get to work on the reader again.

rhitakorrr
rhitakorrr

I was supposed to finish the #MidnightMurderParty editor UI tonight, but I got distracted and spent 5 hours making a type system for my Google API FFI. The API code now has two main types, Gapi and AccessToken.

These types then contain (sort of) other types. For example, an access token retrieved with the “drive.readonly” and “email” scopes will have the type AccessToken (driveReadOnly :: DriveReadOnlyScope, email :: EmailScope) where DriveReadOnlyScope and EmailScope are also types. This way I can prevent passing an access token without the right set of scopes into an API call on the type level; it becomes a compiler error instead of a runtime error!

The Gapi type tracks functions involving Google’s gapi variable such that the compiler will stop me from using features I haven’t set up yet. A completely set up Gapi type for this app looks like: Gapi (auth2 :: Auth2 Ready, filepicker :: GooglePickerObject).

Way cooler than a UI. 😁

rhitakorrr
rhitakorrr

Four hours of messy CSS and long compile times later, I’ve done the entire UI for the ChapterSync module of the #MidnightMurderParty editor. One more module to go, but it’s probably the one that will need the most complicated styles. Hoping I can reuse some of the styles I made tonight, but the CSS is such a mess that a lot of it probably isn’t easily reusable. That’s the price of working fast, I guess. Can’t wait to be done with UI, though; I want to get back to stuff that isn’t awful!

larouxn
larouxn

👋 こんにちは littlelogs 🌊. As @rhitakorrr stated in his last log, I gave a talk of #MidnightMurderParty this past week. Last Thursday I broke down, to the best of my ability and memory, the history and learnings of MMP to a sizeable group of Shopify employees, both in-house and over the livestream. presentation_slide

Also, we’re planning on finishing up MMP, everything except story, within the next month or so, woo!

rhitakorrr
rhitakorrr

After a weekend gaming binge (my brother got me Dark Souls III, ‘nuff said), I just got back to coding. Last week, @larouxn gave a dev talk at his job about #MidnightMurderParty and what we’ve learned from doing this project. He sent me the slide deck, and when I got to the last slides, I saw it said that we planned to finish by June. I messaged him and said, “We planned what?” First I’d heard of it.

But I’m all for deadlines, so mid-late June is our goal. We had a meeting to roughly plan out how to tackle it. Week 1: Finish editor. Week 2: Update reader. Week 3: Integrations & testing. Week 4/5: Extra features, more testing, bug fixing, and pad time for whatever we horribly underestimated the complexity of.

I was tempted to play Dark Souls tonight, honestly, but managed to not get distracted. Good thing, too, because adding all the functionality I wanted to the editor’s main dashboard took all night.

rhitakorrr
rhitakorrr

Got the #MidnightMurderParty editor back in working condition! As I thought, tonight was dedicated to entirely rewriting the #JSON encoding/decoding using #PureScript Argonaut. Mostly, it was pretty simple—just a lot of rewriting—but I did run into one super sneaky “gotcha!” right at the end. For some reason, my encoding was leaving out a field, no matter what I was encoding.

"secretKey" := secretKey
~> "data" := postData 

This was leaving out the "data" field, for example. I only figured out what was wrong because, after the server got mad at me for sending bad data (or no "data", rather), I dumped my other JSON to the console and dug through the keys until I spotted the correlation. Whichever field was encoded last just didn’t get encoded at all.

Turns out the fix was simple:

"secretKey" := secretKey
~> "data" := postData
~> jsonEmptyObject

Yup, just slap an empty JSON object onto the end of the extend (~>) chain, and it works.

rhitakorrr
rhitakorrr

Upgraded the #PureScript version for the #MidnightMurderParty editor tonight. I tried the upgrade on Sunday on my Ubuntu laptop, but nothing was working out. The upgrade went much more smoothly tonight on my Windows desktop. Go figure. In any case, PureScript is now an #npm dependency instead of a global install, and I’ve added a build task in #gulp. Still working on adapting the code since all the #JSON encoding/decoding stuff has been changed around in this version of PS and VS Code is being finicky after the upgrade.

rhitakorrr
rhitakorrr

Took a break from the #MidnightMurderParty editor UI to work on some cool type stuff. In short, I wanted to display the date/time in my local time but communicate with the server in UTC, but I never wanted to send my local time back to the server by accident. I made that distinction in the type system such that the compiler will never let me write code that will send a LocalChapter to the server or use a ServerChapter in the editor.

Also finished the CC critique I was writing. Came out to about 2000 words, so I hope some of them were useful. ☺

rhitakorrr
rhitakorrr

Missed my daily #writing in the morning again and had to move it into the afternoon. On the bright side, I just wrote the words “The end came three weeks later…” into this never-ending story, so I’m coming up on the finish line of the first draft finally.

Someone on CritiqueCircle messaged me yesterday telling me that the third revision of their own #shortstory was up for review and asking if I’d crit it again (I critiqued both previous versions of the story). I agreed and gave it a read today. The story has quintupled in length since the first version, but I think the leap in quality was even bigger. I’m pretty proud to be able to say I helped it come from where it started to where it is now, to be honest. Unfortunately, I only got 1/4 of the way through critting the revision tonight. I had hoped to do 1/2.

Did some more style work on the #MidnightMurderParty editor tonight. I like how streamlined it’s turning out.

rhitakorrr
rhitakorrr

Finished up some smaller features of the #MidnightMurderParty editor, fixed some bugs, did a good amount of code clean-up (looking at the code no longer burns my eyes), and got started on the UI (which does still burn my eyes). Unfortunately, CSS and UI design are my least favorite parts of web development (right up there with cross-browser), and I suspect I’ll be on that for a couple days. But who knows? Maybe it’ll go quickly.

Daily #writing continues to go well. My current #shortstory is 34 single-spaced pages long, which I suspect is no longer a short story. 😅

rhitakorrr
rhitakorrr

Missed my #writing this morning and had to shift it to after work, which knocked out any free time I’d planned between tasks (I’m writing this on commercial breaks of the new BCS episode).

More work on the #MidnightMurderParty editor tonight. I’d hoped to get more done than I did, but I got stuck on a bug for an hour, only to find out that I’d typed the wrong variable name earlier in the code. In any case, syncing a chapter from Docs now works, wrapping up the core functionality. Now comes a lot of smaller features, code cleanup, and prettying up the UI.

I got tired of #2Do not having a web interface, so today I started experimenting with #Trello as my todo list/planner app. The only thing it’s missing that I care much about is start dates, which I think I can manage with some creative Power-Up usage.

Anyhow, show’s over. Onto the next task!

April 2017

rhitakorrr
rhitakorrr

Worked on the #MidnightMurderParty editor some more. I rigged up the front-end with the back-end finally. I’d started that last night but got stuck on mismatched types, cursed at the language for a little, and gave up. Today, I looked at it again, saw the issue immediately, and fixed it. Sometimes it helps to take a break… and sleep.

Wiring up the #AJAX requests revealed a lot of bugs in my #JSON encoding/decoding—the code I wrote at the beginning of the month when I was just starting with #PureScript. Here’s a photo of me from way back then:

After much head-scratching and cryptic errors, I got it all working and now have an ugly/barebones CMS. I can add (from Docs), delete, reorder, and edit chapters. Next is finishing the module that will let me sync an existing chapter with Docs, then mostly cleanup and UI.

Finished Camp #NaNoWriMo at ~14,000 words.

rhitakorrr
rhitakorrr

Time for a mega, 3 weeks #laterlog. [1/2]

I just finished a dev session on the #MidnightMurderParty editor, so I’ll start there. When I started learning #PureScript earlier this month, it was all confusion, overwhelming UI library choices, and packages that were lacking. Simultaneously learning this language and developing an application in it has been quite the ride.

But it’s been fun. The learning curve was (and still is) much steeper than #Elm’s, but as I learn this language, I’m coming to appreciate how much freedom its complexity gives me. The massive boilerplate which is rampant in Elm code hardly exists here, from what I’ve seen, because most of it gets abstracted away.

I’ve now gotten most of the old editor screens coded (though not fully #functional, ha-ha) and have added some new features, namely Google login and Drive Filepicker, so I no longer have to download a Docs file, open it in a text editor, copy the HTML, and paste it into the editor. I just pick a file in the editor and go.

rhitakorrr
rhitakorrr

Finally got the #JSON encoding and decoding working for the #MidnightMurderParty editor. I’m finding that, while I really enjoy #PureScript as a language, the packages are lacking. I think #Elm has it beat so far in the useful docs and full-featured packages department, even if Elm is a much weaker language.

Tonight I finished adding audio to the MMP promo animation—at least as much as I’m going to be able to do before I have music to work with. Simulating movement through a room by automating the volume and panning of two clock-ticking clips with different amounts of reverb/EQ was fun. One for close to the clock, one for in another room, and a lot of tweaking.

I’m also a little ahead of my Camp #NaNoWriMo goal, which isn’t too impressive since I only committed to 10,000 words this month, but I have been writing nightly. My next goal is to shift my writing to the mornings again. I really like writing in the morning, but I don’t like waking up very much at all.

rhitakorrr
rhitakorrr

I’ve been primarily working on 3 things this week:

  • PureScript Editor. The old #MidnightMurderParty editor (my custom CMS) was written in #Elm 0.16 and is basically unmaintainable since 0.16 is so different from the newer versions. I’ve been looking for an excuse to learn #PureScript for a while, so I’ve been rewriting the entire editor in that. I’m still just trying to get JSON decoding working, though.
  • MMP Promo Animation. The promo animation for MMP is done, and now I need to soundscape this whole thing. I started editing with OpenShot, but that can be summed up in one word: Crash. I’m now using Blender as my video editor. So far, I really like it. While I pair up SFX with the video, @larouxn is working on the music. It’s coming along pretty nicely.
  • Camp NaNo. I set my Camp #NaNoWriMo goal for the month to 10k words. I’m trying to finish one #shortstory, write another, and maybe get some MMP writing in there as well!
larouxn
larouxn

Small-ish #MidnightMurderParty update here. We have left our previous VPS host, DigitalOcean, in favour of Linode. DigitalOcean may be shiny and nice looking and all but when it comes down to it, we just need a 1GB RAM, 1 CPU, SSD box with reasonable data caps, and some tasty Ubuntu 16.04 LTS. At Linode, we’re able to do this for $5 a month. At DigitalOcean, it was costing us $10 a month. Super small servers and small prices but hey, 50% cheaper is 50% cheaper. 😊 The whole setup on Linode took me about 2 hours last night. The box provisioning steps could’ve been a tad clearer but after that it was just SSH for days, so, natural as can be.

Other than that, I’ve begun attempting to score some ambient horror tunes for the upcoming MMP promo animation. Should be interesting.

March 2017

larouxn
larouxn

👋 Hey littlelogs, it’s been a while. Almost two months actually! Well, all that #MidnightMurderParty talk of automated deploys and such that @rhitakorrr and I have taken part in over the past many months… year now even… well, deploys are gone. Automated deploys that is. It took me about a year to realize that this project is small enough that I could simply write a 5 line bash script to accomplish everything a humongous, frustrating Capistrano process was doing.

Automated deploys are dead and the repo and servers have been subsequently cleaned up quite a bit. Furthermore, now we’re able to update! Ruby 2.4.1 was released yesterday… we’re running it in both staging and production. Also, we upgraded to Puma 3.7.1 which provides some nice DDOS protection-esque functionality. We’re lean, not mean, up to date, and moving forward once again. 😅

Other stuff, I wrote a short six song EP in about a day and a half earlier this month. If you’re interested, you can check it out here: http://bit.ly/ottawa-ost

rhitakorrr
rhitakorrr

I started scheduling my todos in a calendar (inspired by @Kraahkan) to stop myself from putting them off for “productive” things I didn’t mean to be doing. I added a recurring “Writing” entry every morning before work to encourage both daily writing and getting up earlier. This means that staying up all night and waking up late don’t cut into work time; they cut into my writing time. So far, it’s kept me from staying up too late for no reason, and all my todos have been getting done.

Since my last log, I’ve:

February 2017

rhitakorrr
rhitakorrr

2 for 2 on #MidnightMurderParty development tonight! Both issues I tried to fix last night are now resolved. Turns out there was an issue with deploys, and the code wasn’t actually going live (I only noticed this tonight because an obvious behavior change worked locally but not on the live server). One of the fixes from last night didn’t need any adjustment; the other I completely rethought and came up with a better solution overall.

rhitakorrr
rhitakorrr

0 for 2 on #MidnightMurderParty development last night. I’m down to browser-specific fixes at this point, and solutions are (a) dependent on other people deploying and testing things for me and (b) mostly guesswork. This slows down my ability to dev tremendously. Out of the two fixes I coded up last night, neither worked, which is kind of a bummer. Using some alerts, we managed to figure out the error message thrown by one of the issues (getting error messages from mobile browsers is a pain). My guess about the error was right, but somehow my solution didn’t fix it. Still not sure why.

On a brighter note, I once again submitted a #shortstory I’ve been trying to get published to a contest and expect to hear back about another one within the next couple days. I never really have high hopes for publication, but I definitely won’t get published if I don’t keep trying, right?

rhitakorrr
rhitakorrr

As of yesterday, the #Elm game engine started to look like an actual engine instead of a mess of #ECS code mixed with half a game implementation. I plan to use this for later optimizations. It originally started as an extension of #MidnightMurderParty, but I think at this point it’s just become its own project. I should think of a name for it.

Changes I made on the engine tonight:

  • When initializing a game, the user can now issue a Cmd before providing the engine with the game data. This allows for basing the game data on HTTP requests and such, which I intend to use for MMP to retrieve JSON from a database as content is released.
  • With a bit of extra type magic (there’s already plenty going on), I got the engine tracking which system (as in Entity-Component-System) is currently running, along with some extra data about the system. I also added a function that will allow running one system from within another and restore the original context when the nested system finishes.
rhitakorrr
rhitakorrr

I’ve spent the last few days working on an engine for text-based games in #Elm, the goal being to use this engine to code the #MidnightMurderParty interactive segments. Turns out, modeling a game engine in a purely functional, strictly typed language is tricky. Since game objects have different properties and behaviors, modeling them as the same type (so they can be stored in a List or Dict) isn’t really straightforward.

After some research, I decided to go with an Entity-Component-System (ECS) approach, which has been a challenge as the first time I’d heard about such a pattern was on Friday. Since then, I’ve written some terrible code, refactored many times, and only now have something that looks promising enough to move forward with. There’s still a lot to figure out (cross-entity/component messaging, for example), but at least now I have an idea of how this might work.

rhitakorrr
rhitakorrr

I might have called the #MidnightMurderParty countdown page complete a little early as I spent tonight editing it and adding stuff to it. Changed styles, added social media buttons, added Google Analytics, etc. But now I think it’s safe to actually say it’s done.

Closed a bug report from the beta as well since we can’t seem to reproduce it anymore and can’t test my fix. We’re merging the fix anyway (after a cross-browser test to make sure it doesn’t break anything else) as an extra layer of security. Will have to keep an eye out for that bug, though.

rhitakorrr
rhitakorrr

I added a short blurb as well as some testimonials by the characters in the story to the #MidnightMurderParty countdown page. I’m hoping that between that and the animation which will be included on the page, it will give potential readers a pretty good idea of what MMP actually is and attract the right following. I’m still waiting for some feedback on the design, but for now, I’m calling it and saying the countdown page is complete.

rhitakorrr
rhitakorrr

Did some more work on the #MidnightMurderParty release countdown page. Added a #MailChimp form for people who want to be notified upon release and fixed a lot of styles on the page to be more responsive.

I still want to include something that makes it really clear what MMP actually is. Last time I released this project, a lot of people thought it was a family-friendly murder mystery and shared it as such. It’s not, and that did nothing good for reader retention. I’m thinking of coming up with a concise blurb like on the back of a book; the trick will be making it lighthearted and fun while also being clear about the content. But that’s an issue for the morning.

rhitakorrr
rhitakorrr

Over the weekend I did a lot of work on #MidnightMurderParty.

  • Saturday. Got together with my cousin who recorded the voice line for the promo animation with me. Did a lot of audio editing to combine the best takes (unfortunately, the best take of one part had some room echo in it—my fault for changing the mic position without thinking—so that made the editing take forever, and I’m not even sure it’s done). Sent that off to the animator. Also had a meeting with @larouxn to go over bugs brought up in the beta and lay out a plan from here to 1.0.
  • Sunday. I was supposed to go to my cousin’s Sweet Sixteen today, but I unexpectedly got snowed in—should have checked the weather yesterday, I guess. I spent the last 8 hours fixing beta issues, reviewing the animation, and developing a “Coming Soon” page complete with countdown. All in all, MMP is coming along nicely.
rhitakorrr
rhitakorrr

I’m putting aside my goal of finishing the #hakyll_portfolio_blog by Saturday as a couple things just came up that I didn’t expect:

1) The #MidnightMurderParty animation timeframe suddenly got accelerated, so the animation needs to be completed within the next 4 days. This means, among other things, that I have to dedicate more of my time to being available for quick feedback and have to orchestrate getting the voice line recorded.

2) The For Honor beta just came out, and, frankly, I just really want to play it while it’s still free.

That said, I still plan to work on the blog, just not as much as I initially intended.

Tonight, I also got feedback on the current animation, scheduled a time to record that voice line so I can get it to the animator by the end of Saturday, and wrote a #shortstory (flash fiction).

rhitakorrr
rhitakorrr

Somehow I managed to waste most of the day and still get a lot done.

  • Spoke with my cousin about voicing a character for the #MidnightMurderParty promo animation. We’re meeting sometime this week to record the line, which is really exciting.
  • Made a bunch of commits to the #hakyll_portfolio_blog:
    • Changed the way URL fixing is handled to not rely on post-processing the page.
    • Added an RSS feed to the site.
    • Restructured the Config record to better handle reading in multiple config files.
    • Refactored the Contexts module to more easily handle all the various parameters needed to generate a Context. For example, to generate the Context for a post, I used to have to write something like postCtx tags categories <> configCtx config <> defaultCtx, but after doing some mconcats and introducing a new record, I can do something like postCtx contextParams and it does all of the above. Pretty neat!
rhitakorrr
rhitakorrr

Spent the whole night playing with different comment system widgets because I’m getting tired of Disqus (guests can never figure out how to leave a comment, and I don’t blame them; Disqus makes it so hard to find the submit button for a guest). I couldn’t find anything to suit the needs of #MidnightMurderParty any better, though, since I need the AJAX thread loading Disqus has. While Widget Pack has that too, its admin interface seems weaker than Disqus’s, and it bundles a star-rating system in with the comment stream, which I don’t want. Couldn’t find a way to disable it, but maybe I’m missing something.

On the bright side, my #hakyll_portfolio_blog does not need AJAX thread loading, so tonight I installed IntenseDebate on there. For the functionality it does have, it’s behaving faster and more reliably than Disqus, which is nice.

rhitakorrr
rhitakorrr

I’ll make this a quick post since it’s late. Since the #MidnightMurderParty beta is now in progress, I’ve shifted gears a bit and started working on my #hakyll_portfolio_blog again. Really, I restarted it from scratch since the first version was a mess. Maybe I’ll be able to launch a minimal version before the MMP beta ends–that’s my hope, anyway. Other than that, I started reading my third book of the year and got some #writing done on a #shortstory.

January 2017

rhitakorrr
rhitakorrr

Fixed both of the remaining #MidnightMurderParty front-end bugs with one tiny commit!

My suspicions were correct: when I had to mess around with the renderer after Chromium broke itself, I accidentally regressed some code. The bugs didn’t become apparent until I zoomed the page to 175% in Chrome (or did anything in the mess that is Firefox), so it took a while to notice, but the fix was simple once I guessed the problem.

The column-width property doesn’t support percentage values, so to make it dynamic, I manually alter a stylesheet with #regex. Prior to the Chromium fix, the width and height were set this way as well, but then I changed them to 100% since that seemed less sketchy than live-editing more of a stylesheet. Apparently, that was even sketchier and caused the bug. Changing it back to the way it was fixed the offset pages bug (which I was trying to fix) and somehow magically fixed a different bug in Firefox (not complaining).

I also added some stuff to the testing doc.

larouxn
larouxn

In the never ending story that is the development of #MidnightMurderParty, not really, it’s getting close, @rhitakorrr pinged me yesterday afternoon with a double request. Firstly, he wanted an end point at which he could receive the release date of the next unreleased segment of the story. Thirty minutes later, give or take, /api/next was born. Simple enough.

Unfortunately, the second request was to figure out why the hell unreleased segments (release date falls after today) were appearing in the reader. That was a fun little bug to figure out. Turns out I was only checking the release dates for chapters, not every entry within a chapter. Woops. 😛 The release bug was somewhat simple to fix but the resulting refactoring took quite a bit more time and brainpower.

Also, I locked down the Gemfile after witnessing Puma bump to 3.7.0 and break deploys… no thank you. 😅 🔒 Locked down. 🔒

rhitakorrr
rhitakorrr

Yesterday was a mess. What was supposed to be two quick commits for #MidnightMurderParty and the rest of the day off became a 5-6 hour dev session where I discovered some pretty nasty bugs, at least 3 of them fairly serious front-end issues. @larouxn had to create a new endpoint on the back-end for one of the features I was working on, and while I was testing that, I found out that our release scheduling wasn’t working properly either (it was releasing content that wasn’t yet scheduled to be released; I’ll leave that log to Nick).

Long story short, I did close the last two #GitHub issues, but now I have to spend tonight fixing bugs in the most volatile part of the application and hopefully not introducing new ones in the process. So much for not fiddling with it until after the beta test!

Older