Hacker News new | ask | show | jobs
by gruseom 5043 days ago
This is really well done. Surprisingly well done. Way better done than average.

I'll tell you how I'd like to use it. This may seem odd, but I'd like to be able to upload code that I'm interested in learning, and then type over it just like in these lessons - but not to speed up my typing, but rather for learning.

Writing is a unique channel for learning new things. (Reading is too, of course, but everyone knows that.) Even if you're merely reproducing keystroke-for-keystroke what someone else wrote, following in someone's footsteps helps the brain absorb new patterns and is particularly good for something one's a beginner at. If what you're copying is the work of a master, then you're absorbing really good patterns. I would totally use a tool like this for that purpose. It's a way of learning with one's hands.

But pure typing efficiency? That's hardly a way to become a better programmer, only a more prolific one, and more code is not what we need in this business.

So basically I wish I could subvert the purpose of your tool and send it off in a new direction. :)

3 comments

Thanks. I will give your idea some thought. A related offshoot I've considered is allowing companies to upload private code for employee onboarding. New programmers to the company can type through common code, get a feel for the libraries, coding standards, etc.
Man, that's a brilliant idea. I hope companies will use it!

Hey a few pieces of constructive criticism, I only did the Python lesson so I may have a skewed view though:

- your tool somehow collapses double newlines? in the example, after the import statements came a class definition, which are (as suggested in PEP8) separated by a blank line so I pressed Enter twice. But your program expected me to already type the 'c' of 'class' :(

- it skips comments. and not only comments, but also docstrings! docstrings are not just "comments that happen to be documentation" but actually proper python code and part of the program, they are not ignored like comments, but can be introspected. When I'm programming Python, I'm also typing docstrings.

- the example I got had me starting out by importing a whole load of modules that were particular to that project. for Python practice it would make more sense to practice typing imports of the standard library, or popular frameworks.

- You should try to figure out some way to incorporate the particular keyboard shortcuts, autocompletion and other typical code-editor features, because learning to use those properly gives enormous advances in efficiency. Does your program at least do auto-indenting? For other features it is more difficult since they are so different across editors.

Typing code is very bursty. It might not account for a large fraction of your programming time. But when you have to code up a function, waiting for hunt-and-peck to finish the job is infuriating for the same reason that waiting on your snail of a compiler is infuriating. No doubt there are zen masters who meditate mindfully on the meaning of each and every key stroke. I'm not that patient.
Well, that's a good point. When you do have to type, let it be accurate and fast.

But I'm too traumatized by nightmare memories of programmers cranking out code to take much solace in it :)

Absolutely agree, this is a really awesome side-use of this project. Great work!