photo of Michael McLennan

Michael McLennan's
Menagerie of Applications

I love to build tools! Here are some screen snaps of recent projects. All of these programs were written with Tcl/Tk. Some were written with [incr Tcl], some with custom C/C++ extensions.

Consult my resume for other details about my background.

CAD Tools
Here are some of the Computer-Aided Design (CAD) tools that I've developed for integrated circuit design at Bell Labs.

zoom in
Panorama Plotting Tool
Panorama is a plotting tool for radio frequency (RF) applications in analog circuit design. This tool creates Harmonic Balance graphs and Smith charts used in RF analysis. Signals are loaded into the main window and selected from a spread-sheet style display. Signals can be plotted in a new window or added to an existing window via drag-and-drop operations. Users can interactively zoom, pan, and identify data points within a plotting window.

zoom in
Celerity Status Monitor
Celerity is a state-of-the-art simulator for analog circuit design. Typical simulations are run in batch mode and may take hours--or even days--to execute. I developed this tool to display the current status of a job. At any point, users can start the tool, connect to an existing job, and determine exactly how far it has progressed. They can look for errors in input files and see plots of outputs as they're being generated (so-called "marching waveforms").

This example shows a DC operating point (".dc op") being run as part of a transient simulation (".tr") within a loop (".loop"). The error is decreasing, so the DC operating point has almost converged. Clicking on .tr or .loop brings up a status bar showing how far that part of the simulation has progressed.


zoom in
SEQUAL Simulator
SEQUAL is a simulator for ballistic quantum transport in semiconductor heterostructures. I developed this simulator while in graduate school at Purdue, and I created a graphical interface for it at Bell Labs.

The window in the lower-left corner lets you build up a description of a device as a stack of material layers. The device shown has two AlGaAs layers (shown in dark blue) that act as tunneling barriers for electrons. The window on the right shows the conduction band profile of this device under bias. Red lines indicate resonant energies where the transmission of electrons is enhanced. The window in back shows a plot of transmission as a function of energy, along with the printed output from the simulator.


zoom in
TCLP Simulator
TCLP is a 2D interconnect capacitance simulator for integrated circuit design. Users can "sketch" the material layers and metal runners in a cross-section of their circuit. Capacitance values are queried by clicking and dragging between any two runners.

TCLP has an interactive command language. Users can attach dimension arrows to their drawing and manipulate sizes by setting Tcl variables. Users can also attach meters to measure capacitance values between runners. In this snapshot, the user has looped through several values of a dimension h0, and has printed the capacitance value in the meter c0, in this case measuring the capacitance to ground.

Tcl/Tk Extensions
I developed the following extensions while working on various Tcl/Tk applications. These extensions are written in C language and linked into the wish executable.

zoom in
[incr Tcl]
[incr Tcl] is an object-oriented extension of the Tcl programming language. I started working on it in 1992 as my own Tcl/Tk code was getting out of hand. By itself, Tcl is a great language for small scripts, with less than 5,000 lines of code. Beyond that, the mess of procedures and global variables makes code difficult to maintain.

[incr Tcl] was invented to augment Tcl in the same way that C++ augments C. It provides a way to group related procedures and their associated data into a class definition. This helps programmers organize their code into modules, making it easier to maintain.

[incr Tcl] is currently used by thousands of developers worldwide, and it has been incorporated into dozens of interesting applications.


zoom in
Cipher
The Cipher extension supports encrypted scripts for Tcl/Tk. I developed this extension when my management expressed concern about releasing "source code" for our Tcl/Tk projects. Instead of shipping Tcl/Tk scripts in plain text form, we can encrypt them, making it harder for competitors to steal our code.

The Cipher extension has three commands. cipher encode creates an encrypted version of an ASCII file. cipher decode returns the contents of an encrypted file. And cipher source executes an encrypted file. As shown in the snapshot, hello.cph is an encrypted file. Humans have trouble reading it, but Tcl has no problem executing it via cipher source.

Teaching Examples
I'm coauthor of the Effective Tcl/Tk Programming book published by Addison-Wesley, and I contributed 2 chapters to the Tcl/Tk Tools book published by O'Reilly & Associates. I've developed the following applications in conjunction with these books and some other training courses that I've written.

zoom in
Electric Secretary
The Electric Secretary is a daily calendar and appointment manager. I developed it as an example client/server application for the Effective Tcl/Tk Programming book.

When the client program (shown here) starts up, it opens a socket to the server and downloads appointments for the current user. Days with appointments are marked with a small pencil icon on the calendar. Clicking on a particular date brings up a list of appointments in a Tk text widget. The appointments can be edited and stored back on the server.

The client/server architecture turns this simple calendar into a powerful groupware application. Clients can look for scheduling conflicts among a group of users on the server. If an empty slot is found, an appointment can be added and broadcast to the other users in the group.


zoom in
CoffeeShop
The CoffeeShop is a debugging environment for the lab exercises in a training course that I developed. The course, entitled Object-Oriented Programming with [incr Tcl], teaches how to use an object-oriented extension that I developed for the Tcl programming language. During the lab exercises, students develop a base class CoffeeMaker, a derived class AutoCoffeeMaker, and separate Coffee objects.

Before the CoffeeShop was developed, students would test their code by typing in commands to create objects and invoke their methods. The CoffeeShop provides the same interactive command line, but adds graphics and a whole lot of fun! When each object is created, a graphical representation pops up. Each object has a picture, some buttons to invoke its methods, and some gauges to monitor its internal state. Students can watch attributes such as Temperature and Quality fluctuate as a function of time, as the coffee loses its freshness.


zoom in
Robot Programming Environment
I built this robot application the weekend before a recent Take Our Daughters To Work day. I had to teach the fundamentals of programming to a roomfull of teenage girls. I gave them a robot that would understand some basic commands (forward, backward, left, right, and so forth) and had them navigate the robot through a room full of obstacles to reach the Mountain Dew bottle. They could type the commands into the text area or click on the shortcuts along the left side of the window. As they ran their program, they could see each line of their program highlighted, and they could watch the robot move about as each line was executed. All the while, they learned about program flow, procedures and conditional statements.

zoom in
Drawing Editor
I developed this drawing editor for the Effective Tcl/Tk Programming book to show off various features of the Tk canvas. The tool bar on the left contains tools for selecting items, drawing rectangles, ovals, and splines, and adding text annotations. In this snapshot, the selection tool is active and an animated border of "marching ants" encompasses the items currently selected.

zoom in
Catalog for Effective Tcl/Tk Programming
The Effective Tcl/Tk Programming book comes with a library of code examples that readers can use to develop their own applications. I wanted to make it easy for readers to browse through the examples and try them out. So I built this little catalog program.

On the left, the catalog has a hierarchical list of examples. Selecting an example brings up a description with a Run Demo... button. Clicking on the button brings up a separate, demo program. Clicking on the Demo Code tab brings up the code for the demo. Clicking on the Library Code tab brings up the library code discussed in the book.


zoom in
Solitaire
I built this Solitaire card game for an introductory Tcl/Tk course entitled Building Applications with Tcl/Tk. I wanted to show students that you can create production-quality applications like Solitaire with Tcl/Tk. This game has an animated timer, keeps track of good scores, and even has a "hint" mode that marks the cards that can be played in a light green color--all in less than 1000 lines of code!

I've made this Solitaire game available on the Web. If you have the Tcl/Tk Plug-in for Netscape or Internet Explorer, you can play Solitaire right in your Web browser.


zoom in
Checkers
I use this checkers game to teach client/server programming techniques in my Effective Tcl/Tk Programming course. Students build this game themselves during a series of lab exercises on the first day of the course. They start by writing the code to draw the checkerboard on a canvas. Then, they draw ovals for the checkers and add bindings to support movement on the board. Next, they interface the checkerboard to a text-based checkers game via a bidirectional pipe. Finally, they replace the pipe with a socket connection to a checkers server. The result is a groupware checkers program; one player moves a checker on his board, and the other player sees the move on the other board. Players can send messages back and forth via a "chat" area below their board.

zoom in
itkEdit
I built this simple text editor as an example for my course Object-Oriented Programming with [incr Tcl]. It's a fairly simple editor with the limited set of EMACS editing commands that are built into the Tk text widget. It has a split screen feature that lets you bring up several files at once and adjust their relative area on the screen. It will never replace a full-featured editor such as EMACS. But the interesting thing about this editor is that it was written in a few hours with less than 200 lines of code! Viva [incr Widgets]!
Tcl/Tk Consortium Web Site
I created these applets for the Tcl/Tk Consortium. These applications have a client/server architecture--each applet communicates with a data server running on the Consortium's home machine.

zoom in
Release Schedule
This calendar displays release dates and other important events for the Tcl/Tk development community. When the applet starts up, it connects to a server and downloads the list of special events. Dates with an event are highlighted in red. Clicking on a date brings up a description of the events on that day.

Another applet is used to add appointments to the calendar; however, access to this applet is carefully guarded.

If you have the Tcl/Tk Plug-in for Netscape or Internet Explorer, you can try the calendar for yourself.


zoom in
Online OusterVoting
At the Tcl/Tk conference each year, John Ousterhout polls the audience to determine new directions for Tcl/Tk development. This session has come to be known as "Ouster Voting." I developed this set of applets to support "Ouster Voting" among member companies on the Tcl/Tk Consortium Web site.

One applet is used to create new "Ouster Voting" surveys. Questions are added to a survey one at a time. In the current snapshot, the question "What platforms do you support?" is being added to the survey in the window on the left. Once a survey has been created and published, users from all over the Internet can respond, and their responses are tallied on the Consortium site. The window on the right shows an example of simulated responses, with bar graphs displaying numerical results and a listbox summarizing the write-in values.


zoom in
Membership Database
We're getting a lot of applications from companies that want to join the Tcl/Tk Consortium--so many that we were having trouble keeping track of them! So I built this little membership database. When the applet starts up, it connects to a server and downloads membership data. Records can be added or modified and sent back to the server for storage. The server is written in Tcl and stores the data in a gdbm database. Now, the officers of the Consortium can access the database from anywhere on the Internet and follow up on membership requests.
Just for Fun!
I wrote these programs just for the fun of it.

zoom in
JeoparTk
I was asked to provide the entertainment after dinner at the 5th Annual Tcl/Tk Workshop in Boston. I couldn't stand the thought of giving a talk and putting everyone to sleep, so I used software to build my escape. I spent the weekend before the workshop putting together this board for a customized Jeopardy game, complete with music and sound effects from the popular TV show. I brought it to the workshop, and after the dinner, I plugged my laptop into an overhead projector. I chose people at random from the audience, and they answered Tcl/Tk questions from the various categories on the board. Correct answers earned them prizes such as books, t-shirts, frisbees and playing cards.

zoom in
Registrar
A few years ago, I started offering training courses on Tcl/Tk. These courses have become quite popular, and early on I found myself spending a lot of time on the phone, registering people for the course. So I built this program to take over that responsibility.

The Registrar is an automated system for handling course registrations. Students can register for a course by using an online form or by sending a form via e-mail. In either case, their registration is automatically added to a database. If space is available, their registration is accepted, and they are sent details about the location and starting time for the class; otherwise, they are placed on a waiting list and notified that the class is full. The Registrar has been online for 3 years now and has saved me countless headaches.


zoom in
FlashBack
A friend of mine read an article about a flashcard system that was supposed to accelerate learning. In theory, you can commit bits of knowledge to your long-term memory if you see them repeatedly at certain intervals. The flashcard system provided a way to cycle through the cards and see the information at the proper intervals. Anyway, my friend wanted to use this system to learn French. He downloaded a French dictionary from the Internet, and I built this application for managing the cards.

In this snapshot, one of the cards is exposed. The user didn't know the word, so the program is showing its meaning in a pop-up window. This card will appear again and again until it becomes a permanent fixture in the user's memory.


Copyright © 1998 Michael J. McLennan. All rights reserved.