[Company Logo Image]   Experts make life easier!

   Soft9000.com Page Set Contents Contact Us The NOJ Project
Downloads Services Technologies News Blog

Soft9000.com
noj-Tech
Unix2DOS

Join our Link Exchange!

Check out:

Cookpedia

 

The Neat Odd Job Library

Because some tools need to be written now!

11/24/2003 -- By R. A. Nagy.

We all have them. They happen in the best computing environments: Those Neat Odd Jobs that you would like to develop, but you simply do not have the time.

We all know the kind of programming problems - Things that are too large or complicated for batch files and scripts, but need to be done none the less. Things like removing temporary files in a directory tree. Dynamically updating your web site. Collecting and analyzing server logs without loosing event detail.

After analyzing the millions of lines of code that he has written to solve his Neat Odd Jobs, R. A. decided to collect the most useful classes together into a single namespace.

The "Standard NOJ" Namespace

And so the stdnoj namespace was born. In general, the stdnoj namespace is a collection of directory, file, string, array, and Internet services that R. A. has created over the years. While far from being complete, these classes represent decades of software creation. Several classes (most notably the string and array classes) pre-date the C++ standardization efforts. So if you know what it is like to have a compiler that beaks when you use STL and other more recent C++ innovations, you will appreciate the fact that the stdnoj namespace is based upon POSIX and the standard library. Interfaces that remain available on the absolute largest set of modern and classic C++ compilers and operating systems anywhere!

We encourage you to examine and use these classes in your own commercial and part-time software creation activities in the spirit of the MIT license.

Tools To Use

In order to demonstrate how to use the stdnoj namespace, many tools are included. Here are a few that you might find useful both as an example of the stdnoj namespace, as well as a tool you might want to use.

HeaderConvert

"C++ has been around for a long time... C has been around even longer. Indeed, in a time when changes in Java and .NET can make you feel like you need to 'rewrite it or die', many C and C++ users like to boast that they have been using their programs for decades without change. I sure do.

Unfortunately, while we might be quick to boast about how static the C / C++ language can be, in 30 years some changes must take place..." [read more]

[source code]

Blastit!

The first tool is called "Blastit". As its name implies, Blastit is a tool designed to recursively descend a WIN32 or POSIX file system to locate and remove unwanted files. Part of the commercial FileSpy tool.

 [source code]

HttpDb

The next tool is called HttpDb. Httpdb is a programmable command line tool useful for managing and querying HTTP logs from an uncomfortably large collection of sites. (Warning: The motto of this tool is "disk space [and processing power] is cheap.") 

[source code]

LogCollect & more

Finally, LogCollect demonstrates a task-oriented FTP capability. The purpose of this tool is to demonstrate how you can use WIN32 to allow you to retrieve FTP log files to your workstation, as well as to back them up to your web site.
At this point you might rightly ask "If you library is designed for POSIX and WIN32 use, why does LogCollect only work on WIN32?" - The answer is simple: Because there was simply no need to make it work on POSIX at the time! 

[source code]

The NOJ Philosophy

Indeed, the omission of an ftp implementation for POSIX helps us introduce the central theme that is usually part of any tool developer's mindset: When adopting a tool centric mentality, there is usually little time to do it all from scratch. You do what will get the job done... and that as efficiently as possible.
Because of the lack of time and need to not spend a lot of time designing and testing, the philosophy of the object oriented tool developer should encourage the encapsulation of any reliable resource, even if that resource is platform specific.

Thou !(Shalt) ... ?

So far from being a sin, NOJ developers feel that if a tool that we wrote is good enough for us, then we can safely leave the implementation of a class on another platform to another developer to implement, as they require. You should feel comfortable deferring the implementation of a class on another platform to someone else --The ultimate value of a healthy Open Source Community.

Conclusion

When taken collectively, the command-line tools demonstrate a frequently used, but relatively small subset of the classes available in the stdnoj namespace. However, as Neat Odd Jobs that R. A. has set about to tackle in his spare time, you might also find them to be useful tools in your environment. Feel free to download, use and improve the stdnoj namespace as your time permits.


Postscript - An Invitation to Contribute

We encourage you to share your C++ source code with the rest of us. If you would like to share what you come up with, feel free to contact me directly -- We would love to add your name and tool to this page as you share your NOJ solution with the rest of us!

May the source be with you... Always.  :)
 

-R. A.

 



 
Please contact us if you have any questions or comments about this web site.