\documentclass[12pt]{article}
\usepackage{doublespace,fullpage}
\usepackage{epsfig}
\usepackage{wrapfig}

\begin{document}
\title{Creating a Drawing Program with an Advanced Gui Interface}
\author{Kelly Geoghegan}
\techlab{Computer Systems}
\teacher{Mr. Latimer}
\maketitle
     
\begin{abstract}
       This project creates a drawing program that is simple to use but not 
       limited in its capabilities.  The final product will be a user-friendly
       drawing tool kit for the computer animator in which the user can, for
       example, create and manipulate circles, squares, and triangles etc. on a 
       blank canvas.
\section{Introduction}
	This project touches a vairety of subjects, including Python, drawing programs, and
	making a GUI (graphic user interface) as intuitive as possible.  By addressing the 
	problems of understandability in computer programs and fixing them through an simple
	but effective tool kit, the project offers a user-friendly alternative to confusing drawing
	applications.  The questions presented by this project include which organizational tactics can best
	streamline and simplify a GUI interface, whether Python is the best language for the task, and
	what sort of coding is required to make a functional drawing program.
\section {Background}
	The first Python book was first written in 1995, when the newborn 
	language had almost no recognition and no support. By 2001, dozens 
	of books had been written with more on the way. Python has expanded 
	at lightning speed, and conservative estimates site as many as 300,000 
	current Python users worldwide. This versatile language has been used 
	for everything from Yahoo's on-line maps to the animation in the 
	latest Star Wars movie. The unique features of Python are its interface 
	capabilities and utilities, along with its portability. Such qualities 
	make Python a logical choice for computer graphics programming and 
	anything involving the Graphical User Interface (GUI).
\section {Theory}

The task of making technology intuitive, sometimes called Human Factors
studies, is vital in our more and more technologically based culture.  
As computers evolve and take on a more prevalent role in day-to-day
life, they must be ever more understandable to the average user but
without compromising their capabilities.  My project is a step in that
direction.  There are a variety of goals which I tried to meet in order to
help make my GUI easier to understand.

The goals of my GUI include:
 
\par Precision
\par Compactness
\par Ease in writing and reading
\par Speed in learning
\par Simplicity (for error reduction)
\par Ease of retention over time

Higher level GUI goals include:
\par Close correspondence between reality and the notation
\par Convenience in carrying out manipulations relevant to the users' tasks
\par Compatibility with existing notations
\par Flexibility to accommodate novice and expert users
\par Expressiveness to encourage creativity
\par Visual Appeal

Python is flexible enough to accommodate all of these needs for the computer programmer. 


\section{Workplan}
Using the resources of the Computer Systems Tech. Lab, such as Python Tutorial books and internet access,
I worked alone on my project.  Materials, or tools used in the creation of this project include a computer, the programming 
language Python, the text editor Nedit, and the actual code of the program.

As my objective was to create an easy to use drawing program, I went through a series
of steps to reach that goal.  My first task was to pick a language that would give me all of the tools I needed to make
my drawing program.  I went through a series of tutorials and languages, including
Java, C++, Tkinter, and finally Python.  Once I selected a language I went about learning
the language and experimenting through a series of sample programs (see appendix A).  My
investigations into various Python capabilities gave me the background I needed to start
programming my GUI, but I was not ready to begin coding yet.  First I had to research
methods for making the GUI understandable (see Background).  I then started coding and set
up my Frame and toolbars according to the GUI goals (see appendix B and C).
My project is currently a canvas with a toolbar on the side.  Eventually the
buttons on the toolbar will control various activities on the canvas, but the
project has not yet progressed that far.  I am using a Python tutorial book to
build my inventory of usable Python widgets.  In the end I expect a program
that will let the user draw, manipulate, and animate pictures.  I will test my
program for intuitiveness by measuring the amount of time it takes the average
user to complete a given task.  

\section{Procedure}
The procedure for testing the effectiveness of the project is as follows:
 The program will be completed
 Users will be asked to sit in front of the open program
 Users will be given a task (i.e. draw a pink circle) and no instructions
 A control group will be given written instructions on how to complete the same task
 A timer will measure all responses and report in seconds
 The results will be statistically analysed to see whether there is any difference between the times of the
 experimental group and the control group.

\section{Discussion}
	The Python language is somewhat different from C++ (the language with which I am most familiar) in
	that it has fewer syntax requirements.  Coding in Python is more like writing a story than
	writing out equations, and the commands are free of semicolons, excessive parenthases, and declarations.
	Truly, Python is a very high-level language.  On the other hand, the
	process of programming in Python is almost like doing recursive programming.  
	
	The way in which I programmed my project included the use of various widgets built into
	the Python language.  These widgets most notably include Buttons, Frames, and Canvases.
	The basic organization of my project included a background Frame upon which I packed buttons
	to the left and a Canvas widget to the right.  The class in which I programmed the Buttons
	was called the Panel class, the Canvas was in the Easel class, and all were called from the Base class.
	The final command in my program, which shows the recursive part of Python, is 
/begin{verbatim}
if __name__ == '__main__': base().mainloop().  When organizing my program I had to trigger 
	everything with events.  The "mainloop()" 
/end{verbatim}
function 
	keeps the base Frame updated and waits for any events like mouse clicks or keystrokes.
	One way in which the recursive nature of Python makes it worse than C++ is in the method for calling 
	class functions.  In my program I tried to call an easel function (DrawCircle) from inside
	the Panel function.  The final effect would be that when the Panel buttons received an
	event, that event would trigger a call to make the easel perform the task.  For example,
	by clicking the 'Circle' button, the Circle function in Panel would call easel.DrawCircle.
	In easel.DrawCircle the code for actually creating the circle on my Canvas would be
	executed.  Unfortunately, somewhere along the line the chain of events got kinked.  When
	I pushed on the 'Circle' button, triggering an event, panel.Circle would call easel.DrawCircle,
	but the actual circle would never show up.  It was at this point that I remained halted
	over a period of many weeks, and eventually halted altogether.  Despite contacting members
	of a Python mailing list, with the help of Mr. Latimer, I never found an answer to my problem.
	
\section{Results and Conclusions}
	I learned quite a bit from this project in both formal and informal ways.  Formally,
	I now know the steps I should take to design better GUIs in the future.  The stratagies
	and the plans for organization will help me with web-pages, projects, and GUI designs
	for the rest of my life.  In another formal light I learned how to program in Python, and
	learning a second programming language has given me a new perspective on coding in general.
	I think that learning a third or fourth language will be easier now that I have a foundation
	in two languages and a broader means of comparison.  Informally I picked up quiet a bit too.
	The process of research, of finding one's own answers to one's own questions, has been 
	quite an experience.  I learned the necessity of time optimization, the importance of 
	seeking out one's own sources of information, and the need to set smaller goals which
	progressively lead to a final product.  I enjoyed the times when I discovered
	something on my own, but important, too, was realizing when I couldn't find a solution on
	my own and that I must sometimes ask for help.

	In the end I decided that while Python is a good language to use for creating a drawing program,
	the difficulties I experienced were a result of two things: 1) Python is not set up in
	a way that makes manipulating classes easy and perhaps I should have reorganized the structure
	of my program 2) The tutorials I used were not geared toward the sort of project I was 
	doing and I would have to learn more Python, possibly from different sources, 
	in order to get my project to a more functional level.
	



\section{References}
	 Lutz, Mark. <u> Programming Python. </u> 2nd Ed. O'Reilly & Associates,
	 Inc. Sebastopol, CA: March 2001.
	 
	 http://java.sun.com/docs/books/tutorial - Java Tutorial
	 
	 http://www.gtk.org/tutorial - Gtk+ Tutorial
	 
	 http://www.dci.clrc.ac.uk/Publications/Cookbook - Tcl/Tk Cookbook Tutorial
	 
	 http://www.pythonware.com/library/tkinter/introduction - Python/
	 Tkinter Tutorial
	 
	 http://www.research.ibm.com/ninja/#techreports - NINJA Tech Paper

	Mr. Latimer, Computer Systems Lab - my teacher and mentor throughout this project
\end{document}
