I charge generally for the job as a whole based on its attributes, such as how long it will take (obviously), its difficulty, responsibility incurred (i.e if its someone elses code and I break it .... I'm in trouble, so this is high responsibility and I am accountable....makes my time worth...