I used to do per project fees exclusively but I found that with certain jobs, mainly ones that involve a lot of drawn out unpredictable grind (like repairing broken circuit boards), hourly is much better for me. Different situations call for different solutions. I still charge per project for jobs that don't lend themselves to being measured with clocks. Oh, and just FYI: not all freelancers are programmers! In fact, some people do work that doesn't involve computers at all. True story.
And my post was not exactly geared to programmers either. Aside from the half sentence which says "when I am actually typing the solution into an editor" there is nothing programmer specific.