Intention

Use Box’s UI embed elements to show content created programmatically.

Task List

  • reclaim discarded Gateway desktop with Linux
  • download and install PyCharm
  • install nodeJS, npm, box CLI, screen cap app
  • git clone robertbryan.net code in project folder
  • install Box SDK for python
  • get authentication to work
  • write a python script that makes 10 Box folders
  • show embedded UI explorer boxes displaying folder content created programmatically

image

Observations

  • Investigating and learning is made more difficult by working with a development machine that is potato quality. I mistakenly installed node in my project folder. It took the IDE 25 minutes to index all 12K node module files.
  • Programmatically creating folders was much more complicated than embedding the UI elements from Box.
  • The most complicated part of creating folders with a script was Authentication and Authorization.
  • I spent a few hours trying to get JWTs to work. Finally settled for developer token authentication, which has drawbacks, but with the added value that I could get that to work.
  • I worked on this a few hours a day for four days.
  • I enjoyed almost every minute of it, learned the whole time, didn’t get stressed or frustrated.
  • Actually, it was the opposite. When I was stressed from other things, I worked on this to cool off.
  • My response to mistakes was different from in the past. I’m far less punitive and harsh with myself now.
  • I do more, “Oh, that’s not how that works.” and less, “You’re an idiot for not knowing how this works.”
  • Obsidian was a helpful tool for tracking sub-goals, plans, theories and notes without complicating the work.
  • I enjoyed changing direction, backing up, shifting approaches, looking for help, reading documentation, and writing little tests.

image

Someday Maybe

I have one more working day before at least two days of travel, maybe more. As soon as I can get back to this, here are a few things I’d like to investigate:

image

  • Use OAuth and JWT for authentication, store keys securely, use each supported scheme.
  • Use the other Box Embed UI assets. Make a working html page for each type.
  • Write Python scripts to use more of the Box API endpoint.
  • Do more with json responses, like lists of folders. (Delete the oldest subfolder in a folder, for example)
  • Use the SDK properly instead of writing everything from scratch.