Archive for July, 2011

Browse My Computer: Integration with a database.

27 July 2011

Too Serious

In this phase of the project, I have somewhat fallen prey to the purveyors of SERIOUSNESS.

I apologize.

Creating a machine system that can be used with the same sort of ease and effectiveness as a good mental system is not easy. And though many are working on it, you could almost say it’s stupid. Why try to perfect a machine system when we have a mental system that already works so much better? All the mind really needs is a few “tweaks” and it could replace all these stupid machines entirely!

These are the sort of thoughts that go through the head of a Scientologist working with MEST technologies. The sense that there are other games probably much more worth playing, if only one could gain access to them, becomes very palpable after listening to the whole PDC plus the Phoenix Lectures!

But working with computers does give one some insight into how mental systems were developed in the first place… An insight many IT professionals undoubtedly miss.

Why Use a Database?

If the ultimate goal is to really have the file system and its contents become the database, why bother to develop a separate one?

The simple answer is that I’m just not that close yet. I have too many lessons to learn about how data can be linked together before I can try applying a relational model directly to my files.

And this has a lot to do with what some people call “semantics.”

Semantics: study of the meanings of speech forms, or contextual meaning.

In semantics, the correct concept for the word “hot” depends on the context it is used in. This is particularly true of acronyms or simple symbols that have no real meaning, but could mean almost anything depending on their context.

And so it is necessary in an information system to link some data, or a name for it, to a context. And that linking is accomplished mechanically (or mathematically, you could say) using a relational database.

Database Technologies

The world has settled on a basic system for communicating with database management software called “SQL.” According to ANSI, the letters S-Q-L no longer stand for anything. They are just traditional letters used to describe the most common way for communicating to database management systems.

I actually learned about databases on a “non-relational” (or “flat file”) system called Lotus 1.0. It was a great system, and it had commands, but they weren’t SQL, even though they were similar.

Access is a commonly-used Microsoft database application that also doesn’t use SQL. Except that it really does. It just tries to hide it all from you. To do this it comes up with all sorts of clever graphical ways to help you write SQL without realizing it. I think it’s better just to learn SQL.

Unfortunately, each major database management system on the market implements SQL a little differently. So you have to learn how to use it for each different DBMS you use. Bummer.

A “real” relational database implements ways to define the relationships between its various tables. This is cool but makes system development a bit more complicated. MS SQL Server is a good example of this type of system. Oracle is another. MySQL on the other hand, started out without this capability. It is available from Oracle in an open source version and thus is the only good DBMS within my reach. It is very widely used in web-based applications.

Web-Based Database Applications

The way the web works totally enforces on the application developer the client-server model used by all modern DBMS software. So you can use your application to enforce your table relationships, rather than programming them into the tables themselves.

In order to do this, you populate a menu control in a form with data from the table that links to the field that you will use that form to fill. Follow?

So if I have a table that links a name to an occupation (I do), then I fill that table from a form that contains a list of all the possible names (from my table of names) and all the possible occupations (from my table of occupations).

In my particular case, I also have a third linking field: Context.


Context is a way to simplify a relational system. This makes for some interesting possibilities. For example, people know me, if they do, by my name, Larry. But that name, even it were unique in the set of all known proper names (which of course it isn’t) is actually being used to refer to at least three separable things, or distinct contexts. It refers to my body. When my body dies, “Larry” will be “dead.” But it also refers to my mind, or to the idea of Larry. And when my body dies, that idea will continue on. On top of that, it is being used as a temporary moniker for ME. The being currently known as “Larry.” And when that body dies, that being will go on and pick up a new body and begin inventing a whole new idea of “Larry”. Except that the idea will have a new name attached to it. (See what happened to James Leininger for an example of what happens when you get a name you’ve had before.) The bodies are only related by me having occupied them. The ideas are related by their potential continuity in my own mind, and the beings are related by being the same.

So I give Larry the context of “be-human” which signifies that we are only talking about the current being-mind-body complex and what it can manage to remember about itself. If I were treating only the subject of my body, which I normally would not in my particular system – might in a medical system, then that data would be in context “be-animal.” I also have a context for beings, though I don’t use it much, as data in this area is thin and unreliable. It is called “be-free.” And so it goes.

Class versus Object

In computer programming we have the terms “class” and “object.” A class defines a framework that can be used to create a unique object. This concept is useful so I have implemented it in my system.

As it turns out, in the world of biology we almost always talk about classes and seldom about objects. Each blade of grass is an object, but who cares? They are almost impossible to tell apart and there isn’t much utility in thinking of them as separate. So from the grand scheme of biological phyla down to every distinct species and variation, it’s still all classes we are talking about; no objects involved at all. On the other hand, I consider a distinct person to be an object.

Classes are subject to great overarching theories about this that and the other thing. But it can take just one object to prove all those theories wrong. So I try to keep objects and classes separated in my system, except to link each object to the class (or classes) which supposedly define all its basic actions and characteristics.

Classes exist in a hierarchical system. Each lower class inherits the actions and characteristics (methods and attributes) of its parent classes. I wanted to store this data in just one table. That table, using words as it does (one could make a graphical database; would be an interesting exercise) also requires a context field. I decided, after studying object-oriented programming a bit, that I would only need four other fields in this table: parent (a name gotten from a table of names), aspect (just a few choices relating to graph theory), type (corresponding roughly to the parts of speech) and name (gotten from that same table of names, or words, really).

The hierarchy can only be extracted from this table by relating names and parents within the same context. In this application, “context” “language” and “thought system” are seen to almost equate, which is one of the interesting results of doing this. This rough conceptual equivalence, by the way, has been noted in psycho-linguistics. Look up the work of Lera Boroditsky.

Filling the Tables

I had two important tables to fill, and that is a work in progress.

I wanted to base their contents on the actual contents of my computer, and I remembered a great little freeware application called YourDir that can create a text listing of every single file path on your computer, or various subsets of this, so I used that to make my context list. It’s an odd list. It has about 500 entries.

In a similar manner I filled my list of proper names (objects – almost all human individuals).

I have yet to attack my list of names, which will be the longest. It could easily have 100,000 entries. But if I make it that big I will have to find ways to limit the number of choices that come up in my form for filling in the linking table.

But with a list of proper names and contexts done, I figured I was ready to start linking those names to categories, in this case, occupations (or “hats”). The first words, then, in my long table of words, describe occupations.

Writing applications (in PHP) to fill a linking table with data to be linked is not super-simple. But I did have the code I wrote for my school assignments along with what I did on my last job, so it wasn’t too bad. This is a whole subject that we just started to touch on in my programming classes. There are methods you can use to help you design a web application of this type. I have not found it written up anywhere, so I am developing it as I go along.

One thing I have noticed about programmers is their tendency to go straight from the head to the computer. It’s a very direct approach, but it can waste a lot of time. I would never think of building an electronic circuit without sketching it out first. But I have not found a programming analog to the electronic engineer’s schematic. There is the “program flow chart.” But I seldom see it used by programmers. And it is really only good for demonstrating logical algorithms. What we really need is a graphical way to show how functional blocks are attached together, just like they do in electronics schematics. I’m working on it.

What If #2: No Internet Infrastructure

27 July 2011

Two Different Scenarios

There are two basic ways that a computer could lose its access to the internet.

The first way is by physical damage to the connection. This a the “disaster” scenario. The infrastructure itself is built to supply redundant connections. That was one of its original design criteria. However, the end user with a connection using telephone wires, other communication cabling, or a wireless connection via a cell or wimax tower does not benefit from that level of redundancy. That user is relying on the smooth operation on all the equipment and lines between his device and the internet backbone. He (usually) pays for the privilege (?) of having access to this infrastructure, and has tended to assume that it will never fail him. But is this true?

This leads to the second possible failure scenario: The user gets blocked, or banned, from the system. If you had something you wanted to communicate to a lot of other people, but someone in some position of control over the internet infrastructure disagreed that you should be allowed to communicate that data, you could theoretically be “ordered” off the internet. Though this scenario seems less likely to happen, it is something that those who recognize that an information war exists in our society see as a distinct possibility. So far it has mostly happened only to major information providers (like Google) in regions that are very sensitive to what information is available to citizens (such as mainland China).

Two Different Infrastructure Paradigms

1. Centralized. One way to provide services to the public is via a centralized system. This is a very traditional approach and conforms to certain basic laws of organization and control. We have centralized government, centralized banking, centralized power distribution, water distribution, mail distribution, sewer systems, etc. And the original computing model was also centralized. The central computer in a system was known as the “mainframe.” The primary argument in favor of this model is that it is “more efficient.” The unspoken but clear corollary to this argument is that it provides the controller of the system with a measure of control over all those who rely on it for their survival.

2. Distributed. It is known by other names, including “decentralized.” The concept here is one of self-sufficiency. To the extent that survival systems become less centralized, the organism, in theory, becomes more robust. A portion of it can be damaged without threatening the survival of all the other portions.

We see both these models used in nature. A unit organism usually runs on centralized systems. But the community can be organized in a very distributed manner. Traditionally, this model has been seen as inconsistent with “advanced” social organizations. However, the robustness that it can provide, particularly in times of hardship, is a persuasive reason to make a place for it.

Peer-to-Peer Networking

On PC Authority’s Australian site, Paul Nesbitt wrote an article entitled “Is Mac the future of computing?” (May 31, 2010). In it he stated:

When the 21 year old Steve Jobs introduced the Apple II in 1977 at the West Coast Computer Faire in San Francisco, it was more than just a piece of hardware; it was the embodiment of an idea that computing should be personal, autonomous and programmable. In other words, your computer was yours to do with as you pleased.

The introduction of the personal computer into our society lead to an explosion of computer use. Today this has gone so far that many of us would not be able to operate – might even be open to physical harm – if it weren’t for our personal computing devices.

But in the beginning the personal computer created a need to develop a whole new method for connecting computers together so that they could communicate with each other. And out of this came peer-to-peer networking. In an “old style” network, the mainframe controls all network functionality. It was called the “host” or the “server.” The connected consoles were “dumb” terminals. They were the “clients.”

With the introduction of personal computers, it became desirable to create a system that would allow a PC to be either a host or a client, as needed. This system is called “peer-to-peer” networking. It is a system that allows for a lot of communication and provides for very little security of the data being communicated or of the devices being used in the network.

While this system worked great for a small group or office, it was not popular in the corporate world. There the stakes were a lot higher, and that meant access control and data security. In this “modern” world, the trend towards a centralized computing paradigm has almost completely overtaken the distributed model started by the personal computer. On the “consumer” level it is assumed that no one really cares about these factors, as they are all basically invisible in the average “user experience.”

However, the personal computing movement remains alive, if not that well, in these “modern” times. And the distributed peer-to-peer computing paradigm still exists and can still be implemented on a personal computer. This allows for the possibility of an “unofficial internet” coming into existence. What is most important to us, in terms of survivability in a disaster or in a police state scenario, is that such a network could be used to stay in communication in the event of loss of access to the centralized infrastructure.

Basic Elements of a Distributed Computing System

1) Independent, preferably mobile, power source. Half of this power system is the rechargeable battery. Most of us have devices that run on these. The other half of this power system is an off-grid source of electricity. Few of us have access to this technology. The most obvious choice for this application is solar power, though there are other possibilities. Obtain a good portable panel!

2) Communication system based on electromagnetic waves or similar. We are assuming that you will not have wires available to transmit across. Walkie-talkies have been in use for years, and this is the same basic idea. You need some sort of transceiver that can send and receive some sort of energy-based wave with information encoded into it. The technology is out there, but other than wifi, which does not have a good range, it is not inexpensive. It includes both radio and laser solutions. It is not usually a “snap” to transmit computer network packets using equipment that is not specifically designed for this purpose. So this area is in need of development.

3) Computing device loaded with the proper software. Personal computers with a real operating system and plenty of hard disk space for programs are better choices for this work than small mobile devices. This computer will need, minimum, web server software that can listen on Port 80 and serve up a file in HTML or TEXT format upon receiving a proper request. It also needs the client software (browser) and the protocol stack (TCP/IP) but those are virtually universal these days.

Fallback Systems

I was just at a briefing where I learned that the Mormon church uses a network of ham radio operators to stay in touch when regular comm lines fail. Ham radios can work on a car battery and are still quite common. Citizens band (CB) is about the same thing. “Hams” have been important resources in many recent disasters.

However, if the disaster is not too widespread, chances are that cell phone or wimax services will remain operational. Regular wired phone lines may even continue to operate. They are designed to switch to battery operation if central power fails.

Ordinary AC electricity is the most likely service to be interrupted in the event of a disaster. That’s why it is wise to have battery-operated alternatives, including ways to recharge the batteries. A working automobile can also charge batteries via its own electrical system if you have the proper adapter.

In the police state scenario, power is not so likely to be the problem. So having access to an alternative communication device becomes critical in this case.

The ultimate alternate communication technology is telepathy, which is an ability we all have, but would require considerable effort to return to use.