Recurse Center, week 1

November 14, 2020 • 3 minutes

Today is the last day of my first week at Recurse Center. To avoid overloading the feeds of anyone who may be listening, I'm aiming for a weekly release schedule.

Goal for this week

Meet people! Get inspired by what they're working on! Get over beating myself up for not building stuff, and skip straight to building stuff.

Did it work?

Yes! Sort of. I did get some fun pair programming sessions done, met cool people, and added some new ideas to my backlog. So that part is a win. I did end up "cheating" and working on a feature request for PHPUnit, but I did intend for this to be a bridge to getting some code written, so the "cheating" is all part of the plan.

Working on PHPUnit was a breath of stale air, though. I can tell that the evolution of the code base has been hampered by how closely it cohabitates with the test cases people are writing. It's a solid case for composition over inheritance. Case in point: the TestCase class serves four purposes:

There's this weird circular thing where TestCase::run() creates a TestResult, uses TestResult::run() to invoke its own TestCase::runBare(), and all of this is somehow handled with state changes on the TestCase. Trying to reason about all of that is a pain. I have a bit of code written, but with so many unnecessary and poorly-defined layers, it's hard to figure out where the separation of concerns should lie.

So, I'm pretty happy with my new self-enforced rule of setting a project aside at the end of each week and starting on something completely new (and as different as possible) the following week.

Goal for next week

Frontend web stuff, specifically an in-browser command prompt. I've seen a few libraries that are designed to sit on top of actual tty terminals, for web-based ssh and so forth, but I want to be able to present a web interface with all of its discoverability while not losing the efficiency of a command prompt. An example of this in action is try.redis.io.

Roadmap:

  1. Allow the user to type text and press return to submit
  2. Respond to what the user typed
  3. Automatically scroll as the screen fills
  4. Refactor to provide a sane API for registering commands
  5. Implement more advanced text features (left/right arrows, backspace, delete, click to move cursor)
  6. Implement command history (up/down arrows, control+R)
  7. Add an API for autocomplete
  8. Add an API for clicking a link to autofill the command prompt
  9. Turn all of that into an npm library