Click here to Skip to main content
15,887,371 members
Articles / Web Development / HTML
Article

Design of a .NET brain dump for the forgetful software engineer

Rate me:
Please Sign up or sign in to vote.
2.12/5 (7 votes)
14 Dec 200413 min read 77.1K   1K   60   10
Capture, storage, query, and transformation of quick notes and drawings before any actual design or programming.

Brain Dump to PostIt

Introduction

If you want to read about the code without first getting some background, go to the section called using braindump.

This article is a work in progress, with examples of C# using XML, Forms, networking, database, and web. Over time I will add sample designs in C# for .NET. The code for this article uses a portable subset of C# and .NET as available in Microsoft .NET 1.1 SDK, DotGNU Portable.Net (see included build.sh and run.sh for Linux), and Mono (not quite managed to get it to work yet). I chose C# for this project as it has a solid and extended API (XML, networking, GUI), and allows easy access to almost all platform services (database, web). The mind maps in this article have been generated with FreeMind. The mind maps shown here are included in the demo download above.

Map of braindump

To get a competitive edge, or to just simply be able to work, a software engineer usually develops her own set of software design and programming tools, macros, and libraries. Very little in the way of design and documentation is usually produced, and the items are in various stages of development and debugging. This is the garden shed (or the attic) of the programmer.

The main problems are:

  1. How do I find anything when I need it?
  2. How do I remember the purpose, design and implementation of the items?
  3. How quickly can I transform these things into products and documentation?
  4. What are the criteria for removing and deleting obsolete items?

These issues are compounded by the multiple incarnations of similar ideas on multiple platforms using different programming languages, over a number of years (and therefore different API versions).

And this is not made any easier by the number of tools out there which are commonly in use:

  • Yellow notes for the desktop; multiple Windows application, that look like the real PostIt (TM) notes.
  • Graph / map of concepts and objects; mixture of freely positioned labels joined by lines drawn in Visio, or ViewYourMind / FreeMind / MindManager.
  • Databases; including card databases on palmtops and mobile phones.
  • File systems; forests of folders and files.
  • Document management systems; multitude of projects, versions, notes, hyperlinks.

Background

Brain Dump Specifications.

It all started when reading about Lucy the robot and the book Growing up with Lucy.

What if I wrote software that matched the way the brain works, as opposed to train my brain to operate like a computer? That is the classic "make the computer work for me instead of me working for the computer".

It should be possible to design a piece of software that is "brain-friendly" and that would be used just before software development tools (the IDE products of Microsoft and Borland for example). This program would capture and allow the exploitation of "usable quick notes and drawings". Finally, most software packages are aimed at a specific class of users (beginner, expert, office worker, software engineer); this present project is aimed at the "forgetful programmer".

Brain-Friendly

In a traditional professional IT environment, software is written for a specific purpose and is used for years in a single static incarnation. This is not suitable for proper mind mapping. A linear fixed Wizard-based brain capture approach will fail to do its job. A brain dump compatible mind mapper shall:

  • allow a large number of different thinking techniques that prompt the user for some of her thoughts (short notes), as well as drawings; here enters De Bono (and others), for example see Lateral Thinking.
  • let the user edit the properties of her captured thoughts (text or drawings) and add interpretations.
  • generate some meta-data (or universal notation) to allow universal translation of the brain dump to other objects (part of a new product for example).

Thought prompts

To get the most of our her brilliant ideas, the software engineers needs a variety of "capture techniques" (or thinking methods, as per De Bono and others). These can be implemented in software with Wizards, constrained "games" (see modern FPS where the scenarios are forcing the gamer to follow a preset path), or mind map capture tools.

For example, if you take any of the existing mind map programs, a "brain dump" compatible version would be configured to allow entries using any of De Bono's techniques (if the "De Bono" mode is selected).

In the case of the "Thinking Hat" technique, for any given root node (the brain section being dumped), there would be only six sub-nodes (the six thinking hats). During the entry phase only one of these sub-nodes can be active at any time, and in a chosen order. These entry constraints are a crucial thought process that rely on wearing only one hat at a time, in the sequence suited for the goal sought after.

Another feature is the addition (and removal) of constraints. In the example of design of a manufacturing factory, additional - non-legally required - constraints can be added, such as environment protection, use of organic non-GM materials, sound proofing. During overall cost analysis, the full supply chain gets drawn into the mind map, and although not all of these artificial constraints need to remain, they guide the thinking process towards a cheaper factory design. This shows that dumping your brain can be aided by setting additional constraints.

Conversely, removing constraints (although they are real and unavoidable), can help formulate a non-obvious design, when you can clearly see a solution to a problem, but lack all - or some of - the middle bits. Usually during the initial design phase, some people are tempted just to leave it for somebody else to solve:

#include <miracle.h>

Removing - temporarily - all the constraints can help finding all the intermediate steps in a design, and then when adding the constraints back in, one often realises that these constraints need not have been removed in the first place.

This shows that dumping your brain can be aided by not putting the constraints first, as these might obscure ideas that are in your brain but would "shy away" in the presence of what can look like obstacles.

This is the first step of raw capture. Some initial post-processing (embellishment) is then often a good idea to prepare the brain dump for final transformation into a product.

Property Sheets for mind map nodes

Once captured, the gems of creativity can be given a score card (quality factor), a position in a story line (logical / philosophical precedence, not necessarily sequential in time), a set of constraints (or limiting / blocking ideas, concepts, or examples of failed implementations), as well as a set of relevance indicators to link each idea with all the others (by adding all estimates using multiple hops from one node to the other, or by having each idea connected to all the others).

Then a mind map GUI (like FreeMind, see above) would always show the most relevant ideas first (a bit like Internet Explorer "Back" button's history, but as graph instead of a list).

At this point, the brain dump is ready for a last step: standardisation.

Meta-data and universal language

When trying to solve a problem, or write a new piece of software, the mind is sometimes capable of seeing the solution, even before it is practically designed and coded. Coming up with a design and an implementation is usually a transformation process that starts with the solution in the programmer's mind, and then she puts it down on paper. Some of this can be automated (or farmed out to other people), but only if her notes can be understood and read in the right context.

In the simple case, the mind map is written in English and the meta-data (proto UML types for example) are in English as well. This makes easy the transformation of mind nodes into initial UML diagrams and initial coding template wizards.

However, for most of the planet, the brain dump process is done in a language other than English. Software engineers who currently write the software for PC components (motherboard BIOS is one good example), probably think and design in traditional Chinese. Translating a mind map written in Chinese into a computer programming language for universal use (i.e. sharing with other people) usually means writing all the docs and actual code in English.

Any brain dump compatible mind mapping tool should therefore allow its data (brain dumps) to be coded using pre-defined meta-data attributes that can be internationalised. This will allow the transformation of brain dumps to virtually anything (Word/Excel/Project automation, data-warehousing feed or data mining control, English query configuration, UML pre-generation, C# basic class template wizards, etc...). During the translation process, all selected mind map nodes need to receive a translation into English, which can then be fed back into the brain dump (if not already present).

Even when translating from native English to application-specific English (jargon for example), this translation phase will be required. More often than not, initial vocabulary (Longhorn for example) gets modified by marketing (or users) just before product release.

A brain dump in this ready-to-use state is composed of annotated quick notes and drawings (or 3D models, probably with physical characteristics).

Usable Quick Notes and Drawings

The main inspiration for this section is the Microsoft Data Transformation Services and English Query, as introduced by SQL Server 7 (and 2000). DTS lets the user design data transformation diagrams (that can be executed). English Query helps design a mapping between the English language and database fields. A nicely packaged brain dump can therefore automatically be transformed into a database (DBMS, OLAP, or XML) and then be mapped into English for further queries.

For drawings, a vector format is required, or a 3-D file format (such as VRML files with inline behaviours and physical parameters). Example of drawings that can evolve into a product: Leonardo Da Vinci's blueprints, captured as 3-D models, exported to a CAD package, finally used by an engineer to build a prototype.

All this well-formed data can now be used to give a very specific form of help to a software engineer designing and coding new products: provide in-context and appropriate hints. The programs can be seen as "reading the programmer's mind", or at least anticipating / predicting the structure and naming of UML diagrams and C# code templates.

Forgetful Programmer

Target audience and user of this project: software engineer with bad memory (mind too full with full API specifications and entire UNIX command line manual pages, not mentioning individual part numbers for computer equipment). Any such person's brain will produce, over time, and sometimes in the same sentence, contradictory concepts, good and bad ideas, realistic and idealist plans. Any software that captures these set of thoughts must accept the whole, without any hindrance (no IDE red/green underline, no compiler warning/errors, no run-time exceptions such as "idea referenced an invalid concept, dumping core...").

However during the design and coding phases (not the scope of this article), the contents of the brain dump can be used to complement the existing IDE's code completion with "structure and naming completion".

Using Brain Dump

This is a sample design that uses the braindump idea.

Before we start to look at the code, a few general notes on coding style and goodies.

  • Documentation comments using the slash star star notation (not slash slash slash).
  • Documentation file created by csc /doc in filename_doc.xml (see build.bat included in braindump_src.zip)
  • Internet contributed stylesheet for C# doc (no doubt you can use better ones from this site ;-))
  • Interface definitions are used to allow for future extensions or different implementations (some of the COM recommendations for interface design are used here).

There are five stages in the design:

  1. Brain capture.
  2. Captured brain contents storage.
  3. Captured brain query.
  4. Captured brain transformation.
  5. IDE extensions (for UML design and C# implementation).

Brain Capture

This is different from AI (or expert systems), as this does not assume that the brain being captured is expert or coherent. Capturing a brain should also allow contradictions, and should not comment on the brain dump, nor deform the original thinking. What it does though is facilitate the birth of ideas, and allow the annotation and sorting of notes and drawings.

Code: Graph GUI for Notes and Drawings

C# .NET Forms, labels freely positioned on scrollable panel, linked by lines and arrows.

The specification is for:

  • A brain-friendly capture of ideas, in any order, with or without any obvious logic in the order of the capture. For example, VYM and FreeMind impose a single root node (main thought) and each sub-node can have multiple sub-nodes; however this is a tree structure, not a graph (circularities are not allowed).
  • Nodes (ideas, thoughts, quick notes, drawings) can be either standalone, or root (any number), or linked with an arbitrary number of other nodes.
  • Each node can have one or more parents.
  • Choosing between a parent link and a sub-node link is entirely a subjective choice from the brain being captured.
  • Different possible node layouts need to be available, with at minimum a low-key view with very few nodes on screen (to mimic the apparent very shallow capacity of the brain's immediate short-term memory).

For this article, I have chosen an expandable design (based on interfaces):

  • A main IBrainDump interface that exposes the API of any brain dump application (or form).
  • IBrainDumpView for all views (capture, storage management, query, transformation).
  • IBrainDumpCapture for capturing views.
  • IMindMap for capturing views that present nodes (ideas, etc...) in a mind map, similar to that of VYM/FreeMind...
  • IMindMapLayout to layout the mind map.
  • IMindNode for nodes (ideas, thoughts, quick notes, drawings) in a brain dump view.

The sample implementation (see attached source ZIP file) has the following classes:

  • BrainDump the main demo class, containing the Main method.
  • MainForm a System.Windows.Forms.Form implementing IBrainDump.
  • Various utility classes to implement menus and toolbars.
  • MindMapPanel, a System.Windows.Forms.Panel, implementing IMindMap.
  • MindMapLayout an object implementing IMindMapLayout.
  • MindNode a System.Windows.Forms.Button implementing IMindNode.

First pass:

  • User interface; main menu, toolbar, mind map area (panel with buttons), tooltips and context menu.
  • Coding style; sub-classing of GUI elements.
  • See file in attached braindump_src.zip; braindump.cs.

Captured Brain Storage

XML (text files) and database. The mind maps generated by FreeMind are XML files (but with file extension .mm instead of .xml). This code sample will load the XML data and display it on a .NET Panel as labels (editbox when clicked) and lines / arrows.

Code: XML load and save, database

C# .NET XML, database creation, management, access. Coming soon...

Captured Brain Query

Network and web, English query, OLAP cube, data mining.

Code: XML query, database query and reporting

C# .NET XML, database SQL query, web. Coming soon...

Captured Brain Transformation

DTS, cleaning, archiving, obsoleting (deleting). Also change management, assessment of risks, visualisation of consequences.

Code: multi-threading, external program calls

C# .NET threads, external OS interface (Windows, Linux), portable code, internationalisation, multi-platform support. Coming soon...

Points of Interest

C# for .NET allows me to show my ideas in a portable fashion, and lets the reader compile, run, test, benchmark and judge by herself. Although a reasonable amount of software needs to be written, the task is made easier and manageable by the exploitation of existing high level APIs and services (most notably COM-based Microsoft SQL Server). This article has been written using an iterative process using the ideas and tools described in the article.

Proposal for extension to existing IDE's code completion to allow "structure and naming completion" will be made, perhaps the subject of another IDE extension article.

History

  • 2004/12/17, some cleanup, added resources and version info.
  • 2004/12/16, layout work almost complete, line drawing still to do.
  • 2004/12/13, more work on inital GUI, almost there (layout and line drawing still to do).
  • 2004/12/11, fixed spelling mistakes, added a bit more code.
  • 2004/12/10, added preliminary contents (first demo file, no source code yet).
  • 2004/12/09, wrote title and keywords.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here



Comments and Discussions

 
Generalbrain dump for improvement memory Pin
imaginaryplaymate16-Dec-08 2:07
imaginaryplaymate16-Dec-08 2:07 
QuestionWell, how soon is coming soon? nT Pin
ingo.ahrens8-May-07 20:23
ingo.ahrens8-May-07 20:23 
AnswerRe: Well, how soon is coming soon? nT Pin
User 157580011-May-07 4:53
User 157580011-May-07 4:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.