A diff shows what changed between the old version and the new one. The visual language is simple and consistent everywhere.
READING THE MARKS
4 files changed +47 -12
src/payments/schedule.js
- if (day > daysInMonth) {
- skipPayment(id)
- }
+ if (day > daysInMonth) {
+ scheduleFor(lastDayOfMonth(month))
+ }
---------------------------------------------
MINUS / RED the old version, removed
PLUS / GREEN the new version, added
No mark unchanged, shown for context
+47 -12 means 47 lines added, 12 removed. A changed
line counts as one of each - so a small edit to many
lines can look larger than it is.
You Don't Need to Understand the Code
In that example you don't need to know JavaScript to see what happened: something that used to skip a payment now schedules it for the last day of the month instead. The variable names carry most of the meaning, and on a well-written codebase that's usually true.