GeekTech

Tuesday, June 19, 2007

First concept in programming

Here it goes. In programming, and in real life, humans and situations are unpredictable. That's why programming is all conditionals (if- statements) Even a subroutine is a conditional because it says, if Command1 is clicked then perform the following procedure. So here's an idea to write some sort of new language based off of C++, or .NET or some form of popular programming language. Instead of using conditionals and "Ifs", use "When". I'm just going to call it anticipationals. (You can probably guess where I came up with that). By making a computer understand anticipationals, the cpu can anticipate when a sub routine is about to fire. This is handy when used in large programs like Microsoft Office or even in complex Operating Systems.

So think about having a computer logically anticipate what the user is about to do and fire a subroutine before it is actually called. Obviously the indicators would have to be programmed. Say for example, there is a simple form with one Command Button on it. Now the subroutine is set to make the cpu first find a random integer and then display a corresponding message that is programmed into the code. So the subroutine now does all of this when Command1 is clicked.

Now lets change the subroutine from If Command1_Click to When Command1_Click. For this example lets say that the computer anticipates it's click when the cursor comes within fifteen pixels of Command1. When this is true, the subroutine is fired. The computer finds a random integer and finds the corresponding message, but it does not display the message box. Now all of this is stored as variables, say I. I is still kept in RAM until another anticipational is fired then I is rewritten. But if the mouse does not move, I remains the same. WHEN the mouse clicks, not IF, but it is going to, when it does, the subroutine is complete and the message is displayed faster than what it use to take.

Now a subroutine that simple really does not take that long to process, especially with dual and quad core processors. But think about a very large application that takes forever to load. Say Microsoft Word. That can take some time, but if the operating system is sure based on proximity of the pointer to the icon and application size (meaning it won't pre-fire for small applications which wastes time and resources) then think about how much faster computing will be.

Anticipationals are similar to conditionals, yes, but they have many differences as well. This might just be one useful idea that could be used in the next language.
posted by Brice Helman at 11:43 PM

1 Comments:

I'm liking the idea so far, just there is one problem that I can spot very clearly. Have you seen the movie "The Terminator?" Well these anticipationals sound a lot like taking steps towards a "Sky-Net" type computer. Of course, I am just paranoid because computers always seem out to get me. So it is best to just ignore my ramblings about self-aware computers.

-Storm-

Friday, June 22, 2007 1:31:00 PM  

Post a Comment

<< Home