The only case that I still prefer handwriting is doing math. It's much easier for me to write out equations and "explore" things with pencil and paper over using a program. That said, I normally find that having something like Mathematica or a Julia notebook open in addition to pencil/paper is the best combination. One tool for drafting and thinking, and another tool for testing my ideas out.