|
|
|
|
|
by js2
2665 days ago
|
|
Why have all the single-use constant strings instead of using the corresponding literals in-place? It’s additional lines of code and doesn't help readability/maintainability (there's already one unused const - EVENT_NAME_HIDE_IF_SHOWN). Additionally, the code mixes string literals with constants: fields.AddString(L"AddSubtractMode", isAddMode ? L"Add" : L"Subtract");
LogTelemetryEvent(EVENT_NAME_DATE_ADD_SUBTRACT_USED, fields);
But then it doesn't use constants where it might make sense, when a string is used more than once. e.g. the literal string "WindowId" is used a dozen times.Separately, I question whether anyone looking at the telemetry on the backend. In my experience, developers add this stuff because they think it will be useful, then it never or rarely gets looked at. A telemetry event here, a telemetry event there, pretty soon you're talking real bandwidth. |
|