Add metric to help assess awareness of init script customizability #95
Conversation
@daviwil @maxbrunsfeld: What do y'all think of this approach to measuring awareness/approachability of customizing the init script? This approach has some drawbacks as noted in the pull request body, and I'm wondering if there's a different approach that you can think of that might be a better fit. |
Yeah, it's going to be difficult to get a highly accurate idea of whether they're actually using using their customizations. I think it's enough to know that they have an init.js file in their Atom folder because it shows they at least went that far. I also like the idea of logging when the user saves a change to their init file in Atom. Would it make sense to have two data points, one for merely having an init.js file and one for interacting with it in the editor? I'm thinking of the case of a user who has an existing init.js file stored in a .dotfiles repo that they've customized a while back and don't actively make new edits to it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks great! So happy that we're getting some new and meaningful metrics added now 🙏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, @jasonrudolph! Thanks for tackling this.
If we want to know if users are using custom commands, we could track that as well. We are already sending an event for each command. If we can generate a list of known, non-custom commands, we can filter the custom ones from that list on the back end. Something to discuss with telliott27, anyway.
package.json
Outdated
@@ -19,7 +19,8 @@ | |||
"fs-plus": "^3.0.0", | |||
"grim": "^2.0.1", | |||
"node-uuid": "~1.4.7", | |||
"telemetry-github": "0.0.11" | |||
"telemetry-github": "0.0.11", | |||
"temp": "^0.8.3" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: should temp
be a dev dependency? It looks like it's only used in tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great!
As a possible future enhancement, we could report the number of commands that are defined every time an init script is loaded. I think this would require adding three new event APIs to core: atom.onWillLoadUserInitScript
and atom.onDidLoadUserInitScript
(emitted here), and atom.commands.onDidAddCommand
(emitted here).
If we did that, I think it'd even be possible to report a metric every time the user executes a command that was defined in their init script.
@daviwil: I think we'd see that all users have an init script present on disk. The first time you run Atom, it creates your Atom home directory and populates it with a handful of default files, including
@annthurium @maxbrunsfeld: I dig it! Those things are definitely on my wish list as we look ahead to future enhancements. 🤞 |
🤦♂️ I ls'ed my ~/.atom folder and my eyes were expecting to see |
I updated the pull request body to describe the verification process. |
Description of the Change
Building on the updates in #90 and #94, this pull request continues our quest to better understand the awareness and approachability of Atom's "hackability."
Atom's hackability comes in multiple forms, and the init script (i.e.,
~/.atom/init.coffee
or~/.atom/init.js
) is arguably the most powerful form of customizability, and it's a great sandbox for trying out customizations that could eventually graduate into a full-fledged package. The Flight Manual describes the steps for customizing the init script, but we don't currently have a way of knowing whether that translates into users actually performing any customization. To assess the awareness and approachability of customizing the init script, this pull request adds a metric to report an event when the user changes their init script.Equipped with this information, we'll be able to assess the effectiveness of our efforts to increase the awareness and approachability of init script customization. For example, does updating the welcome guide's description of the init script increase or decrease the percentage of users that customize their init script?
Design
Implementation-wise, this pull request watches for the user's init script to get opened in a TextEditor in Atom. Any time that TextEditor is saved, we record an event indicating that the user has changed their init script.
Alternate Designs
init.coffee
, this approach would wrongly conclude that an existing user has customized their init script when they have an unedited local copy of the old default init script. 🙈Possible Drawbacks
Verification Process
init.coffee
andinit.js
are supportedinit.coffee
file, and verify that auserInitScriptChanged
event is recordedinit.js
file, and verify that auserInitScriptChanged
event is recordeduserInitScriptChanged
event is recordeduserInitScriptChanged
event is recordedATOM_HOME=/tmp/some-nonstandard-dir
), edit and save your init script, and verify that auserInitScriptChanged
event is recordedTODO