It turns out that the Unix abstraction of a "file" is very powerful. While it makes sense to do one thing and do it well, the part about "acting on files" seems a little out of place. In my own words: programs do one thing, do it well, and act on files. ![]() When Unix was invented at Bell Labs, it was imbued from the beginning with a design philosophy. This means that it runs on (or can be ported to) operating systems that provide a Unix C runtime environment. The first thing to know about this C program is that it's a Unix command-line tool. Grab your favorite beverage, editor, and compiler, crank up some tunes, and let's write a mildly interesting C program together. ![]() In this article, I'll name some things and manage some complexity while writing a small C program that is loosely based on the program structure I discussed in " How to write a good C main function"-but different. I contend that this is largely true with the addition of "and sometimes it requires drawing boxes." It has often been said that the art of computer programming is part managing complexity and part naming things.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |