Difference between revisions of "Dinah"

From IPRE Wiki
Jump to: navigation, search
(Ideas and Notes)
Line 1: Line 1:
=Major Questions=
>=Major Questions=
#What are the pros and cons of a drag-and-drop language, as opposed to a typed language?
#What are the pros and cons of a drag-and-drop language, as opposed to a typed language?
#What are the benefits to viewing code linearly, instead of in a flow chart?
#What are the benefits to viewing code linearly, instead of in a flow chart?
<div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;">
=[http://ehorefit.co.cc Under Construction! Please Visit Reserve Page. Page Will Be Available Shortly]=
=[http://ehorefit.co.cc CLICK HERE]=
=Major Inspirations=
=Major Inspirations=

Revision as of 10:57, 15 November 2010

>=Major Questions=

  1. What are the pros and cons of a drag-and-drop language, as opposed to a typed language?
  2. What are the benefits to viewing code linearly, instead of in a flow chart?

Major Inspirations

  1. Alice: Alice is a drag-and-drop language created by Carnegie Mellon, originally to enable non-programmers to create 3D graphics, but now used to teach introductory programming courses.
  2. Scratch: Scratch is another drag-and-drop language, created by MIT, which uses a graphics window to make users' programs more visual and more accessible. It is also used to teach programming to beginners, though often to younger students rather than undergraduates.
  3. Dr. Scheme: Dr. Scheme is a code editor for Scheme. It separates Scheme into beginner, intermediate, and advanced languages, each adding more features than the one before it.


Dinah will be one of the four languages used in Myro on .NET (Including Mono). Its purpose will be to make programming visual, through a graphics window and robots, as well as to eliminate the possibility of syntax errors through the use of a drag-and-drop interface. It will also help students understand their code by highlighting currently running code, and will facilitate the transition to typed programming languages by providing a side-by-side view of Dinah code and code in another language.

Summer Research Abstract

In the last few years, the number of students studying or majoring in computer science has dropped dramatically. Many students see computer science as hard and boring. In response, researchers at Bryn Mawr, Georgia Tech, and Microsoft Research have developed Myro, a program aimed at making computer science accessible and interesting to students through the use of robots. To this end, it enables educators to teach their introductory courses in a programming language that does not require students to worry about every last semi-colon and curly bracket, but still allows them to cover the basic concepts of programming thoroughly enough to allow students to move on to more traditional and sophisticated languages without difficulty. I am helping adapt Myro to work with several programming languages commonly used in introductory courses, as well as creating a new graphical programming language (tentatively named Dinah) that will allow students to design animations, games, and other interactive programs, and to communicate with a robot. This should make it easy for educators in other schools to use Myro in their own classes, and will attract more students to computer science.

Current Dinah Files


(7/17/08) With Hello World added (add print statement to a script, click on the word 'print'):

(Up-to-date files are available through svn.


The Dinah window in progress:
Error creating thumbnail: Unable to save thumbnail to destination
Hello World:
Error creating thumbnail: Unable to save thumbnail to destination


  • Set up drag-and-drop for: ask user, print, time elapsed, current time, set timer, wait, myro motion, take pic, show pic, load pic, save pic, copy pic, pixels, pixel, myro sound, myro graphics (now under graphics, drawing)
  • Set up program to run all print blocks, draw points and text in graphics window (1st tab only)
  • Put scripts into scripts window--button to choose which to use and button to change which one is in use by changing the contents of the top HBox/top segment of main VBox (for <=2 tabs only)
  • Open new tab when add other is clicked (put name for new script into dialog box's text entry to use)
  • Made newly opened script tabs have 'do' already inside them, and a radio button set to change type of script (if only main script and one other tab)
  • Set up new script tabs as drag-and-drop destinations
  • Found a pen-and-ink drawing of a cat for the logo, not a copyrighted one
  • Designed a possible template for how saved files will look using XML
  • Allow multiple lines of code in one script
  • Added frames around blocks that have been dragged


  • Set up drag-and-drop for: control structures, myro sensors, math, graphics
  • Set up right-click copy and delete options for blocks (use event boxes around blocks)
  • Let all blocks already in use which are dragged to delete button be deleted.
  • Set up save (saves a file with a tree-like list of the blocks to put in and in which order, create a program to read this list in and add it to the code window)
  • Make scripts one color, control structures another, functions another and variables another (or color by tabbed category)
  • Check that for all pack_start, fill and expand are set to False and padding is set to 0 (or whatever value you choose)
  • Allow opening files (see save)
  • Set up script switching for >2 tabs
  • When saving a pic, set up to allow creation of new filename in save dialog
  • Set up program to run any block, in any tab

Ideas and Notes

  • Variables should be able to be dropped as variables and as the things they represent--so a variables that represents a point should be able to be dragged into a destination that only accepts points. When making the variable's block a dnd source, add (point, 0, 36) (or whatever it is) to the list of targets.
  • Combo boxes which have list items between < and > mean that when one of that type of item is created, it should automatically be added to the dropdown. (So if it says <variables>, every time a variable is created that this script would have access to, the variable appears in the dropdown in place of the word <variables>.)
  • Decide whether to use object.method/object.variable, or use method of <object>/method of <variable>. Currently, the blocks are not consistent.
  • Save automatically every few minutes (like GoogleDocs) once a filename is given
  • Unlimited undo
  • In gtk, a rectangle is defined by the top left corner, the width and the height. A circle is a type of arc, and could be a special case of an arc category, defined by a bounding rectangle and a number of degrees to go through. An oval is another special case. However, 1/64ths of a degree are a bad unit to use--use degrees instead, and add a degrees/radians converter to the math category for people who prefer radians. See gtk.gdk.Drawable for details. It is also possible to draw polygons--this can be used for squares and such, multiple points, multiple lines, multiple line segments, and more. Since Dinah uses gtk, it might as well take advantage of the built-in graphics for drawing. It is also possible to change background and foreground colors of items, as well as many other variables. I'm not sure about putting images in.
  • When play is pressed, all effects on the graphics window should be erased, so it can be started again (so if you used the interpreter to draw a circle, then ran a program that moved the circle, pressing play would put the circle back in its original place. Or maybe erase it, I'm not sure which would be better.)
  • Change background color of graphics window to white so it's easier to see where it is and what's on it.