Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Articles
Recherche: 

Hierarchical To-Do List
Hilmar Zonneveld, March 1, 2003
Introduction One common task in programming is to keep track of what problems are pending. For this purpose, I use a "hierarchical to-do list": a list of items, each of which can have sub-items. All you need is Microsoft Word. Alternatives are available as freeware or shareware, but in t...

Introduction

One common task in programming is to keep track of what problems are pending. For this purpose, I use a "hierarchical to-do list": a list of items, each of which can have sub-items.

All you need is Microsoft Word. Alternatives are available as freeware or shareware, but in this article, I will concentrate on Microsoft Word.

The material in this article applies to programmers using any language. Moreover, keeping a list of things to do is very useful outside the programming world.

The need of a to-do list

For the remainder of this article, I will suppose that you do programming work.

A beginner in programming might easily concentrate on the - obviously important - technical details, how to make things work at all, how to make it easy to use, how to make the program fast, and how to make the program look good - and forget about other, equally important, details. One of these details is simply to keep a list of things to do.

The result of working like this is easy to guess. The programmer, consulting with the end-users, or testing the program by himself, will see that something needs to be done, but he might easily forget this later, until somebody reminds him, or he stumbles on the problem again.

Therefore, I strongly suggest that when you consult with the end-users, clients, or whoever else has to give important input on the program, you always take a sheet of paper with you. As soon as the consultation makes it clear what exactly is required, you write it down. If something requires additional consultation, write that fact down, too.

Then, when you are back at your computer, copy your notes to your hierarchical to-do list, as explained later in this article. As soon as you have some spare time, organize this list, especially by priorities. You might also want to organize by other criteria, for instance, departments (that is, keep everything related to the Sales Department together), or by dates (for instance, a certain activity may have a deadline, or you may need to repeat some maintenance task every week or month).

Also, when testing your program, you might see some strange behavior that needs to be investigated, or some nice option you want to add for the user. Write everything down in your hierarchical to-do list.

Write down every small detail, whether it is urgent or not, and whether you think you will have the time to do it within the next two days, or only in one or two years. Otherwise, if you don't write things down, you will forget many of them.

The hierarchy

Imagine what file-management would be like if you didn't have folders and sub-folders. You would have thousands of files in a single huge list.

Instead of this, with modern computers you can keep groups of related files together in a folder. You can group folders, once again, into higher-level folders. Thus, you can see the list of only those files that are relevant for a particular topic, for instance, "class libraries of my accounting system".

Similarly, with a to-do list, it helps to group related items into higher-level items.

Step-by-step example

The following steps will create a sample hierarchical to-do list, for a programming job.

  • Open Microsoft Word. As far as I know, almost any version will do.

  • In the menu, select "View | Outline". Note that an additional toolbar appears: the Outline toolbar.

  • Type Consult with users.

  • Press ENTER and TAB, and then type Accounting.

  • Press ENTER, and then type Sales.

  • Press ENTER and SHIFT-TAB, and then type Pending errors.

  • Press ENTER and TAB, and then type Error message, when starting form "Clients".

  • Press ENTER and TAB, and then type Find the cause.

  • Press ENTER, and then type Solve it.

  • Press ENTER and SHIFT-TAB, and then type Report "pending debts" produces wrong results.

  • In the Outline Toolbar, click on "1". This will hide everything, except the main entries (entries of level 1).

  • Click on the line "Pending errors", and press the "+" in the toolbar (or use the "+" sign on the right side of your keyboard). This will open sub-topics under "pending errors", but only one level.

  • Press the "+" key again. This will open another level.

  • Save your file for later reference.

The following screenshot shows the expanded outline:

And here, you see a partially expanded outline:

Available options

Single-clicking on the "+" sign to the left of a text will select an item and all of its sub-items. Some actions, like changing the level or moving up or down, will affect everything you select.

The Outline Toolbar has the following buttons:

  • The first button, "Increase Level", changes the selected text to a higher level (more to the left). Equivalent to Shift-Tab. For this command and the next, you can also drag the "+" or "-" to the left of the text, with the mouse, to the right or to the left.

  • The next button, "Decrease Level", changes the selected text to a lower level (more to the right). Equivalent to Tab.

  • The next button is not relevant for our purposes.

  • The next two buttons, "Move Up" and "Move Down", will move the selection further up or down. Very useful to exchange items. You can also drag the "+" or "-" sign, to the left of an item, up or down.

  • The next seven buttons, with numbers from 1 to 7, will show all the items up to the selected level. For instance, clicking on the "2" will show all top-level items, and their sub-items, of level 2, but hide all other levels (levels 3-9).

  • The remaining buttons are irrelevant for our purposes.

Working with Style

The hierarchical list will not print as you see it on the screen in outline mode. You have to switch back to normal ("View | Normal"), to see how it will be printed.

To provide the same indentation as you see in Outline View, you have to change the definition of styles "Heading 1", "Heading 2", etc. This will also affect the fonts you see on screen.

The quick way to change a style is as follows. Select a paragraph which has a certain style (for instance, "Heading 2" - a paragraph of the second level in the outline), and do some change - for instance, change the left margin, or do some changes to the font. Click in the text area of the "Style" selector (the first item in the "Formatting" toolbar - to the left of the font name), and press ENTER. The default option now asks you whether you want to redefine the style to reflect the changes done to the paragraph. Press ENTER once more, to confirm this.

Some technical explanations

If you know Microsoft Word well, you will have noticed that I am "abusing", so to speak, the Outline mode, in the sense that I am using it for something quite different from what it was originally intended for. Specifically, I am creating a document which contains only "header" styles, that is, titles and subtitles, but no normal text.

Word allows only 9 levels of headers, therefore, the outline is also limited to 9 levels.

Alternatives to Microsoft Word

Not all word processors have the outline feature. For instance, the freeware StarOffice 5.2 has the menu commands for an outline mode, but it doesn't work correctly.

You can create an outline with indentation in any word processor or text editor, but then you can't collapse the entries.

You can use Windows Explorer, and create your notes as a folder structure. This has some limitations, too: You have to add special characters for correct sorting, and you are restricted to relatively short notes.

Some outline programs are available as well. You can search sites like www.download.com for words like "outline".

Visual FoxPro programmers can also program something themselves, using a treeview. For a quick start, you can directly use, and later adapt, the treeview sample, in the Visual FoxPro samples.

Conclusion

Keeping track of things to do is an important part of computer programming, or of many other tasks. Being able to organize this information hierarchically can keep you even better organized.

Hilmar Zonneveld, Independent Consultant
Hilmar Zonneveld works in programming since 1986, using dBASE, FoxPro and Visual FoxPro. He is available as an independent consultant. He currently works as a programmer at Bata Shoe Organization; also as an instructor at Cisco Networking Academy. You can contact him through the Universal Thread, or, via e-mail, at hilmarz@yahoo.com. Personal Web page (mainly in Spanish): www.geocities.com/hilmarz.
More articles from this author
Hilmar Zonneveld, May 1, 2003
An audit-trail is a record of who did what changes, and when. In Visual FoxPro, this can easily be accomplished through triggers. I hinted at the possibility of doing an audit-trail, in my article on triggers - now, as a reaction to questions in the Universal Thread, I want to present a sample...
Hilmar Zonneveld, December 6, 2001
(The latest update contains minor edits only.) Five easy and fun ways to get yourself into trouble with inheritance. A frequent source of problems in OOP is called "breaking inheritance". This document briefly describes what inheritance is, how it applies to properties and methods, and how it ...
Hilmar Zonneveld, July 1, 2002
Introduction Buffering is a feature in Visual FoxPro that allows us to give the user "undo" and "save" capabilities. In the old FoxPro 2.x days, programmers either didn't provide this capability, or edited memory variables, and copied information between these variables and the table fiel...
Hilmar Zonneveld, October 6, 2005
Due to a recent Windows security fix, users can no longer access a CHM file on a server. The table of contents appears, but the individual pages are replaced by error messages. Access to CHM files in specific folders can be explicitly allowed through special registry settings.
Hilmar Zonneveld, July 20, 2001
(The last update contains minor edits only.) The idea is to have several controls on a form controlled with an array. Thus, you can quickly go through all the controls on the form, managing the array. The sample code included will help you get started quickly. You can easily adapt it to manage...
Hilmar Zonneveld, September 1, 2002
With Automation, you can control all aspects of Excel, Word, or other programs that provide this feature, from Visual FoxPro. In this article, I will concentrate on Excel. Its purpose is to provide a starting point, especially for people new to automation. Introduction With automation, you bas...
Hilmar Zonneveld, October 7, 2005
This is a step-by-step tutorial to show inheritance, specifically in Visual FoxPro forms, as a guidance for people who are not familiar with inheritance in general, or who don’t know how to implement it in Visual FoxPro. The basic idea of inheritance is that all your forms, or several of your for...
Hilmar Zonneveld, May 30, 2004
The code shows how to quickly obtain the greatest common factor, and the least common multiple. Both functions are used when manipulating fractions, among others. Several methods are possible; the method usually taught in school involves prime numbers, but this code will execute much faster (and it ...
Hilmar Zonneveld, November 1, 2006
A standard requirement in a production system, or in systems for cost calculation, is to add up all the raw materials for a number of finished articles, to get the total cost, or simply to purchase the materials. In this article, Hilmar outlines how to do this with multiple levels of intermediate ar...
Hilmar Zonneveld, August 1, 2002
Overview The purpose of this article is to give an overview of normalization. Basically, normalization refers to having an efficient table structure. I will not discuss the famous "first to fifth normal forms" - if you want that information, enough texts exist about it in other places (search sit...
Hilmar Zonneveld, November 8, 2001
The following function will open any document, with its default association (the same application that will be called when you double-click on the file, in Windows Explorer). Use it to open a text-file, a Word or Excel document, an image, etc., with an external application.
Hilmar Zonneveld, May 1, 2002
Introduction This document explains the meaning of primary key, foreign key and candidate index in Visual FoxPro. A discussion of natural and surrogate keys (keys visible, or not visible, to the end-user) is included, including the advantages of each approach, as well as different methods for o...
Hilmar Zonneveld, January 1, 2003
Continuing my series of introductory articles, this article presents an introduction of a simple yet powerful programming concept: recursion. Introduction "To understand recursion, you must first understand recursion." "To make yogurt, you need milk and yogurt." If you are not accustomed...
Hilmar Zonneveld, December 1, 2002
Introduction This article presents an introduction to coding shortcuts in Visual FoxPro - when to use them, and when not to. Notes on coding in general This article is about coding shortcuts; however, I should first emphasize that making the code as small as possible is usually not the number...
Hilmar Zonneveld, July 20, 2001
Rushmore Optimization can help make queries much faster. However, "Full Rushmore Optimization" is not always a desirable goal. "Partial Optimization" is sometimes much faster. It is often believed that to speed things up, you need to have as many indices as possible. This article explains that so...
Hilmar Zonneveld, June 7, 2002
If you need to check elapsed time with seconds() or a datetime value, this function allows you to display the elapsed time in a human-readable format, that is, hours:minutes:seconds, instead of the total number of seconds. Just pass a number of seconds as a parameter.
Hilmar Zonneveld, April 1, 2002
SQL is a standard language used to manipulate databases. Several of the SQL commands are integrated into the Visual FoxPro language. Select This is a very flexible command, used to select data from a table, or from several tables. This command has options to get totals from several record...
Hilmar Zonneveld, August 1, 2003
In this article, I will show several ways to manipulate text-files. Knowledge of these methods is often important to import and export specific formats. Some of the techniques can also be used to work with files of any content; however, this article will concentrate on text-files. When ...
Hilmar Zonneveld, June 1, 2002
The purpose of this article is to show how to use some aspects provided by the Visual FoxPro database engine, to control our data. Indices Perhaps most readers already know indices; anyway, I find it convenient to include a brief summary of the topic, since this is a requisite to understan...
Hilmar Zonneveld, November 1, 2002
A help file can be used either for interactive help, or as an online manual. In this article, I will give an overview over creating help files in the new help format (CHM), for Visual FoxPro 6 and later. This article is introductory and assumes no prior knowledge of the Help Compiler, or of HTML cod...
Hilmar Zonneveld, February 1, 2003
Introduction Any real-world application will sooner or later misbehave. It is important to be able to find those problems. Visual FoxPro's built-in debugger can help a lot to find out why your program doesn't work as you thought it would. Most of the material in this article applies to Visual...
Hilmar Zonneveld, May 1, 2006
This article is an introduction to VisioModeler. This is a free CASE tool, that can help you design your database, in the process sharing the information with the client in a visual, easy-to-understand, format.