Tuesday, October 27, 2009

Genealogy

One of my many hobbies is genealogy. Over the years, I've sampled many of the various software tools for tracking genealogical information, and while each has their good features, none of them really provide everything you need. I've been part of various mailing groups that have discussed better ways of storing such data, have seen some interesting attempts, but still feel that there's room for improvement.

Perhaps Wave is suitable?

Genealogy is inherently hierarchical - people have children. Replies fill this role nicely. The other relationships, marriage and siblings, are another matter. Wave blips can be at the same "level", so we can perhaps use that to represent a marriage. But if we have a number of children under a parent (most likely their mother, for biological reasons), then they, too, will be at the same "level", so will look like they're spouses, not siblings. And adding those siblings' spouses just complicates the issue even more.

So perhaps individuals can't be represented as blips, but instead relationships should be. The Wave would contain a blip for each marriage, and a blip for each parent-child relationship. Sibling relationships would be assumed/deduced. The question then is how are the individuals represented? As replies to top-level blips? Perhaps, but individuals can appear in more than one relationship -- their own child-parent relationship, as well as their marriage(s). Does Wave support links between blips? I don't know quite yet. Do we link to a completely different Wave? That gets unwieldy if every individual is its own Wave.

Okay, so we haven't figured out this quite yet. Do we abandon the idea? Not quite yet. It was, in fact, the other bits of genealogical research that first came to mind when I started playing with Wave.

Citations are a big part of responsible genealogy. It's one thing to record the relationships that you discover through your research, but recording your sources is very important, not only for yourself, to verify data and reaffirm old research; but also for others to whom you provide research results -- they should be able to trust your information, and being able to look up your sources goes a long way to that. Source notes can simply be replies to the data itself, whether it's a claim about a relationship, the date of it, or any information recorded about an individual.

Along those lines, conflicting data can also be recorded via a reply, such as birthdates that disagree, or even birthdates that agree from differing sources, helping to provide extra proof or confirmation of one possibility over another. This is more of a research tool than a research result; it allows you to keep track of every possibility mentioned, to help you match up with other discoveries.

Suppositions, too, can be recorded as blips, with the reasoning behind them attached as one or more replies. This is much more preferable to adding a relationship or data that was based on supposition into data without marking it as such, which I've found in my research; you find some data with which you want to leap to a conclusion, and then find someone else's research that also reached that conclusion: that's a false confirmation of your own conclusion, and thus you feel justified in making the conclusion. And if you yourself don't mark it as just a supposition, but instead just add this "fact" to your own data, you, too, are going to further this false confirmation if your genealogical data goes public. Most genealogical software doesn't support marking facts as supposition, and thus Wave can contribute to genealogical research in this manner.

And finally, to-do lists and general research notes are another good candidate for replies, letting the researcher make a note of future research directions based on an individual or relationship, or overall notes about websites to reference, contacts made, and overall notes about your research path.


I'll be investigating whether Wave can be utilized for the genealogist's new tool, but as I do, I'll be thinking of that aspect of Wave that I didn't even touch on -- the collaborative nature of Wave, which would allow multiple researchers to contribute to one single body of genealogical data.

Friday, October 9, 2009

Using Google Wave

I've been playing around with Wave, mostly on my own, trying out different ideas about the nesting of the different blips. Granted all I know about using it is the WYSIWYG nature of the web client and the 80-minute video about it at Google I/O, so perhaps I'm missing something...

It works fine for the obvious use of Wave, which is a multiuser conversation, with nested (and media-rich) responses. As I try to bend Wave to other uses, I'm finding it not so flexible, which might be the client itself, or the Wave system overall. One idea that I'm trying is using Wave as a rich document, using replies as nested blocks under headings, subsections, etc.

One problem I've found is that you cannot reply (as a nested reply) to the most-recent blip; it changes the reply into a "continue this thread" type of blip instead of nested under that specific blip. Additionally, if you want to reply ahead of other replies, you cannot: the "insert reply here" inserts it after all other replies to that blip. I'll admit that, for the sake of a conversational flow, this makes sense -- I shouldn't be able to reply after someone else, yet have it appear before theirs. But is this just a client restriction, or something that just isn't allowed in the Wave protocol? Not being able to insert anywhere takes away a range of potential uses for Wave, which would be too bad.

I'm still waiting for Developer access to Wave, so I can try some Gadget and Robot development. But perhaps until then, I should poke into the protocol a little more to see exactly what I'll be able to do.

Friday, October 2, 2009

Wave language

Of course, after thinking about a Wave compiler, I started thinking about what language might be interesting to try this with, trying to think about how you would handle code across multiple source files (is a Wave a source file, a Workspace or a Project?), and how difficult different languages would be to implement. But what if, instead, you designed a new language (because you can never have enough), one that was designed to be written within a Wave, designed to run within a Wave, and was Wave aware?

Not having looked into the Wave protocol yet, I don't know how references to different blips inside a Wave work, nor how references to a Wave is done in general. But if blips were functions, or code blocks, contained within other blips that were modules, a Wave compiler for this language would inherently understand the layout of the code within the Wave.

I would expect that a language that lived within a Wave would be a very "web" language, one that used Waves as core data structures, that output HTML, used CSS, and was DOM-aware in the language. In fact, the execution environment might be a Wave itself, which is seeded with the initial code and then the Wave itself is both the execution environment and the input/output environment. It would be a terrific environment for self-modifying code.

It's likely this language wouldn't have a Wave compiler so much as a Wave interpreter, something that read and executed the Wave on the fly instead of actually outputting anything in p-code, byte code, or machine code. This would be, in the Wave way, a robot which was part of the Wave, keeping track of its own "program counter" but letting the Wave environment keep track of data. The types of applications that this language would allow ... well, I'm not sure: it allows for "multiplayer" (not meaning to necessarily imply a game) applications where the users can "catch up" to what's happening at any time just by looking at the Wave, since it will present the current state of the application at any time.


Of course, a lot of the ideas that come to mind for collaborative applications -- a calendar, say -- are also doable with a Gadget inside a Wave, and don't require Yet Another Programming Language, nor a robot to help. But ideas like these aren't borne of necessity, they're a technical exercise that, perhaps, get turned into something useful.

Now I wonder if I could turn this into a Master's thesis...

Wave compiler

While getting ready for work this morning I had Wave on the brain, And while thinking about the revision control idea, and how a robot might act upon the changes near-instantly, that got me thinking of other tools that might act immediately upon changes being made.

What if your code editor edited a Wave instead? Many code editors have the Intellisense idea, where it will help you out with the parameters in the function you just mentioned and automatically close your parentheses, brackets and curly-braces for you -- all features I personally hate. Some people like them, though, and you could have such functionality in a Wave robot, watching your edits as you go and helping out. If you pause after typing

MyFooFunction(

it might guess that you have completely forgotten the parameters for the function, and will attach a reply to that function, having the parameter values supplied underneath the line you're editing. As soon as you close the function, the robot would remove the hint and let you get on with your coding. It could also help out with the closing of the function call or a block of code...

In fact, it could be constantly compiling your code for you, checking for undefined variables, syntax errors, type mismatches...

It would have to be aware of where you are in your code, what you're currently writing; it shouldn't complain about half-written statements, unclosed code blocks, etc., if the user is still working on them, but lines that have been typed previously, finished with a definitive carriage return or semicolon, could be fair game for reporting errors. These errors might be represented as highlighted code using markup (colours, underlining, etc.) or with reply blips attached to the problem instruction, variable or statement. These markups would be removed as soon as the user goes to tend to them.

A full-fledged compilation system might maintain a different blip in the Wave where it dumps all compilation errors, lint warnings, etc., in case the user wants to tend to bugs that the compiler isn't brave enough to report quite yet, unsure if it's being too hasty. Hell, depending on the type of application, the output could, if the code successfully compiles, be placed within the Wave.

And none of this touches on the idea of multiple humans working on the code at the same time.

Revision Control

One of the first Wave ideas I had, while watching Google I/O presentation on Google Wave was to use it as a revision control system, allowing for reverting through the playback mechanism of Wave, and for simultaneous editing if a Wave client was used as the code editor. Later in the presentation, they mentioned this idea, and I wasn't surprised that I'd be the only person to think of it.

It's still in mind though, because here at work, we have a host management system, written in XML/XSLT, created by me. This concentrated all of the various data associated with hosts (network addresses, hostnames, usernames, etc.) into a single place, instead of across a half-dozen files, in various directories, on various hosts. This system, too, lives under revision control, to ensure those who edit it aren't colliding their changes. Presently, I'm rewriting the system into a Python/YAML system, for reasons of speed, sustainability and readability.

But as Wave is opening up, I picture this system using it, where a single Wave contains all of the data about all of our machines: multiple users can be editing this data at the same time, seeing each others' "presence" in the Wave as we're doing it, and a robot could watch the Wave and crunch the data when it detects that things have changed, immediately.

Of course, I doubt I'll be able to push a Wave solution here at work, at least, not until Wave takes over the world, but it's a nice idea...

Thursday, October 1, 2009

What, another one?

Yes, another blog... I've decided to start playing around with Google Wave, but couldn't decide if I should have a blog JUST about that, or about programming in general, or about things-that-aren't-already-covered-by-other-blogs. So for now, it's in this blog, and will either get its own blog, if I stick with Wave and have lots to say about it, or will just take over this one, if I find I've got nothing else to say.