3 ms·
> We can no longer just feed the substring of render that we want to print right into abAppend(). We’ll have to do it character-by-character from now on. The m
by z3t4 4y ago
> We can no longer just feed the substring of render that we want to print right into abAppend(). We’ll have to do it character-by-character from now on.
The more functionality you add to a program, the more complicated and slower it becomes. You can add optimizations and abstraction layers. But the best way to write a bug free and efficient program is to keep it small and simple.
If you do need those functions though, you can make your life easier by writing tests before implementing a feature. For example before writing the code that colors numbers, write a test that checks if numbers has a color, and a test that measure the time it takes to render a line - and have it fail if it becomes significant slower.
So as an exercise you could write a test for each step in the tutorial.