Programming hints and tips

Creating your own tools

The first decision you have to make when creating your own tool is whether to use a compiled language (like C) or a scripting language (like AWK). Each has its advantages, depending on the tool you need.

If the tool will be used for small jobs and may need to be changed frequently, especially by people not familiar with it, then a scripting language is usually better. If the tool is going to be used in exactly the same way hundreds of times, or if it must run fast (either because it is handling a large file, or because it does something in real-time), then a compiled language is the better choice.

AWK is a scripting language which is ideal for use by C programmers. It was originally written by C programmers, and they kept the syntax similar between the two languages. While the differences may be enough to cause you headaches when you start programming in AWK, they are, for the most part, small enough that any C programmer can read AWK code with almost no learning.

AWK's text matching and handling capabilities make it an excellent language for analyzing debugging traces and log files. Because it is a scripting language, you can easily change the script as you determine more exactly what you need to know. A side benefit of using a scripting language is that it will run on any platform, and it can be easily understood and modified by other users.

Recently, I started accumulating notes about how I use AWK and I will soon be posting some of the scripts I have written. You can borrow Awk Words from my bookshelf, or help yourself to my AWK scripts.

Want to:
Read more from the soapbox
- Read Awk Words.
- Look at my AWK scripts.
- Read Robert's Rules Of Coding.
- Go back to the front gate.
- Visit another wagon.

Make a product that even an idiot can use, and only an idiot will want to.
Page maintained by Rob.