|Keep It Simple, Stupid|
Re7:PDF::Create Questionsby dragonchild (Archbishop)
|on Apr 09, 2003 at 17:40 UTC||Need Help??|
You are not understanding what the lines of code are going to do. You're trying to randomly come to a solution that will work long enough for you to tell your manager the problem is solved. While this problem-solving method has merit, especially if you're not a programmer by trade, it most definitely ... lacks completeness.
First, you have to stop writing code. Yes, this means that you need to step away from the computer.
Next, take a minute and actually attempt to understand what you're trying to do. Write it out on paper or a whiteboard or something. Lay out every single step, both in terms of business logic and then translate those business steps into programming steps. There will be a N to M relationship between them.
At this point, look at the tools you have (PDF::Create, for example) and see what the documentation says for how to do something. If there is a language construct you don't understand (like Perl OO, for example), pick up a copy of an appropriate book (Damian's OO Perl or the Camel book) and learn the necessary language features.
Now, at this point AND ONLY THIS POINT are you ready to actually write any code. Not only will you know what you want to write, but you'll also know how to write it. Syntax errors will become a thing of the past (other than typos).
If this sounds like overkill - that's because this is repeatable, provable applications development. Not HaX0r1SiNg.
Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.
Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.