home support FAQ resources services partners contact us contact us
 Web Application Previous  Next  
 Tutorial

Planning time isn’t necessarily proportional to a project’s size. As an example, think
about a search algorithm that you have to design.The application doesn’t have to do
more than basically crawl through a heap of information, extracting data according to
a set of rules. Let’s say that the data is already there, so setup and output won’t require
a lot of effort.The application will spend most of its execution time in its main
searching loop.The loop probably won’t even take more than 100 lines of code, but
choosing or designing an optimal algorithm for an optimal loop could easily take a
whole day.This little loop might be the most substantial part in your design phase,
while on the other hand you may create projects with a few thousand lines that have
been thoroughly planned in less than a day.

Similarly, let’s say you need a little script that lists all files in a directory.You could
hack it quickly so it would perform just this specific task, listing all files in a specified
directory.You wouldn’t have to worry about it anymore—the problem’s solved and
you can move on to other tasks, leaving your snippet behind. But another strategy
might be to take into consideration that at a later point—maybe even in a completely
different project—you’ll probably need a similar tool again. Just hacking directory
listers over and over when you need one, each for its specific task, would be a waste
of time.Thus, when first encountering such a situation, you should think about it.You
could create a separate module from the directory lister, allowing it to list different
directories, optionally recursing subdirectories, eventually even accepting wildcards.
You might create a bulletproof little function that would handle most special cases
and also handle everyday demands to a directory lister just perfectly.With this latter
method, after a few projects you would have a library of solid tool functions that you
could reuse safely and rely on, and that sometimes might strip down development
time significantly.
Previous  Next  
Link Partners: Asia florist, Flowers to India, Hong kong flowers, Site submit, Cheap web hosting, China florist, Japan florist