Saturday, November 29, 2008

Python Graphs ---- GO!

Martin, you sly dog.

The idea was thus: build a graphical graph-building application. You can make nodes and make connections between them and drag them around to check planarity and stuff. Maybe even read values in them or something. In Turing.

I challenged him to make it in Python and use the experience to learn Python. I know Python to the extents that I can read it and if you asked me to write something I could bumble around for a while and produce it - ie. I don't know it very well at all.

So now I have accepted my challenge to Martin, and am creating the program. It's one I've wanted to make for a while, but I was thinking I'd dive back into my C graph implementations. Why not just make a new graph library though, eh?

So let's plan this crap out. (Warning: Now entering intensely rambly incomprehensible mode ... project planning)

Situation: I'm learning Python with the intent of developing a user-interactive graphical application that presents and manipulates representations of graphs.

  • I don't know Python that well.
  • I don't know how to do graphics in Python.
  • (Same vein) I don't know how to do window-level UI with Python.
  • I don't have a Graph Library for Python.
  • I don't have a List library for python.
  • 99 Bricks (a joke)
  • Learn Python better (I can do this along the way)
  • Learn about pygame (gives me graphics+window-level UI)
  • Build a linked list adt.
  • Build a Graph adt.
Refactored/ordered Tasks:
  1. Build a Linked List ADT using Python.
  2. Follow some tutorials and make some simple pygame apps.
  3. Build a Graph ADT using Python.
  4. Make the UI I want, sans graph stuffs.
  5. Plug the graph stuffs into the UI.
Cool. Next up: Subtasks!

Build a Linked List ADT using Python:
  1. Write out an ADT spec (can be simple and concise, just make one).
  2. Read some stuff on classes/object creation/destruction in Python.
  3. Read some more in-depth stuff about python's Pass-by-X system. (I don't know if it uses pass by value or pass by reference, .. and I don't have an immediate appreciation of what the differences are going to mean to me. If I thought about it, I'd get there, but I'm restricting that thought because I need to research this anyway, and keep on task. And be longwinded.)
  4. Write a simple sample class and then test it out.
  5. Write a LinkedList type according to my spec or simplified.
  6. Debug.
  7. Much Rejoicing

Okay! That's a good enough start for now. I'll come back and post.append() later on once I've done all this. I'll post up my ADT and any relevant stuff.

No comments: