WordPress defines many useful functions. Rather than reinventing the wheel, you should take advantage of the core functions whenever possible. Of course, if the slick new plugin you're designing needs a better wheel, you're on your own, but at least you can take inspiration from the list of WordPress functions in the Function Reference list. Oh, and stop in and check out the WordPress Coding Standards, the guidelines for using PHP and programming code in WordPress.