Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (32.67 KB, 2 trang )
< Day Day Up >
Maximizing the Testing and Debugging Process
There's no denying that testing and debugging is part of every programmer's life, but that
doesn't mean that it has to be an awful and overwhelming experience. Before we discuss
some of the tools that Flash provides to test and debug a project, here are some general
guidelines to follow as you build your project:
•
Plan. Don't approach a project until you've created a basic outline of how it should
work. You can't reach your end goal if you don't know your final destination.
•
Test everything. Never assume that something works—even if it seems a trivial
part of your project. All it takes is one mistake to bring your movie to a screeching
halt.
•
Test often. Don't wait until your project is nearing completion—test at every
opportunity. It's much easier to isolate problems if you know your movie was
working five minutes ago.
•
Fix bugs in an orderly fashion. Don't attempt to fix a bunch of bugs at the same
time. It's best to fix one or two problems at a time and then test after each. After
all, you don't want to create any new bugs in the process.
•
Avoid quick fixes. Maybe you're aware that a bug exists, but you're not sure why.
In an effort to save time, you may decide to attempt a quick fix or workaround,
rather than tracking down the problem. This kind of coding always costs more
time in the long run. Take the necessary time to track down the culprit.
•
Comment your code. It's a fact of life: many beginning coders just don't like using