|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Announcements
Chapters
Services
Feature Zones
|
IntroductionIf 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.
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:
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:
BackgroundBrain 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-FriendlyIn 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:
Thought promptsTo 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 nodesOnce 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 languageWhen 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 DrawingsThe 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 ProgrammerTarget 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 DumpThis 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.
There are five stages in the design:
Brain CaptureThis 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 DrawingsC# .NET Forms, labels freely positioned on scrollable panel, linked by lines and arrows. The specification is for:
For this article, I have chosen an expandable design (based on interfaces):
The sample implementation (see attached source ZIP file) has the following classes:
First pass:
Captured Brain StorageXML (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, databaseC# .NET XML, database creation, management, access. Coming soon... Captured Brain QueryNetwork and web, English query, OLAP cube, data mining. Code: XML query, database query and reportingC# .NET XML, database SQL query, web. Coming soon... Captured Brain TransformationDTS, cleaning, archiving, obsoleting (deleting). Also change management, assessment of risks, visualisation of consequences. Code: multi-threading, external program callsC# .NET threads, external OS interface (Windows, Linux), portable code, internationalisation, multi-platform support. Coming soon... Points of InterestC# 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
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||