The day of 25th of July 2008 was my Name day.
It was really the hottest name day since ages...
Thank You for all best wishes from You.
I needed recently a parallel processing of multiple
threads in a specified maximum number of slots in Java.
I also needed to connect with acceptance of an incoming call.
Let us consider how to approach the subject...
I create a class object for a socket connection java.net.ServerSocket:
java.net.ServerSocket serverSocket = new ServerSocket(port);
where "port" is the port number on which we want to open the socket
I look forward to getting a connection, and I get
the class object (java.net.Socket):
java.net.Socket socketConn = serverSocket.accept ();
For each connection call I create a new thread
(socketConn is a thread’s variable) that it supports.
This can be a class object that inherits from java.lang.Thread
or implements the interface java.lang.Runnable.
I apply the appropriate queue and synchronizing
objects in order to reach the purpose ...
private Thread t;
public synchronized void start() {
stopping = false;
if (t == null) {
t = new Thread(this);
t.start();
}
}
public synchronized void stop() {
stopping = true;
}
public void run() {
try {
ServerSocket serverSocket;
serverSocket = new ServerSocket(port);
while (true) {
Socket socketConn = serverSocket.accept();
host = socketConn.getInetAddress().getHostName();
doRequest(socketConn);
socketConn.close();
}
} catch (IOException e) {
logger.show("IOException: " + e + "\n");
} catch (Exception e) {
logger.show("Exception: " + e);
}
}
And what about connections in our brains?
A human mind is fascinating, isn't it?
Especially the human thinking and memory
management system. In my opinion,
a human mind is like a perfect tree with dynamic
and controlled "network" connections.
We can learn and "feel" a little
bit of it by programming of digital machines,
which can simulate some aspects of human
mind functionality.
I really felt it when I touched the capability
of the Object Oriented Programming (OOP)
and Unix systems, first time in my life. I have
realized that the model of structure of
human thinking has two levels: the layer of words
and the layer of their meaning. Next
I have learnt the model of deep structure of
human language.
I was disappointed when I discovered that the
simple neural networks and simple genetic
algorithms did not use "a human thinking"
and any kinds of data associations.
In general they use only statistical forcing rules
(called "brutal force") and
there is no secret in it. But in practice, it runs
well and it can help solve the problem,
so there is a "magick" in it!
A very interesting experience for me was
a discovery of learning technology
of Neuro-Linguistic Programming (NLP)
"philosophy" by self-testing
it on my own mind... But the most fascinating
one for me always are C++ and
Java languages. That is why I am the SCJP
(J2SE 5.0) certified, SCWCD (J2EE 1.4)
certified.
Short-term and long-term human memory
system have to use some kinds of visual
and voice (audio) internal symbols and patterns
in order to manage it well. So I have
had to learn the Hidden Markov Models (HMM)
and Viterbi algorithm to understand
the acoustic modelling, the voice patterns
and the speech recognizing by machines.
A human mind also is fascinating, because
of capability of recording all the ideas
and information of our life and whole our
civilisation in books or digital data
in computer systems or libraries. Our brain also
is kind of storage and distributed back-up
system, that can have the redundant but
asymmetrical functionality.
The "tree" of such knowledge flow,
data libraries, databases of experience
(e.g. like Google forums!), ideas, designers life
and programmers passions allow to design
machines that can reach another planets
today (Sejourner and Pathfinder on Mars)!
A human mind also is so interesting, because
it has hidden structure like an onion,
and it is secret like an Nordic iceberg.
But the most fascinating, in my opinion,
is complex data mining and "metadata"
mechanism. We cannot reach
roots of this tree yet. This is a magic tree...
So we cannot understand a human mind yet,
but we can use it like a black box
and create a visual "virtual life" systems
(e.g. Second Life, LSL, Linden
Script Language) and for example, we can go
there to the virtual cinema (or watch it
with YouTube)...
So, an artificial chain of "superStrings"
called "tags" can create a virtual,
multidimensional and fractal view of another world.
I am curious of the future of such
our own, personal "another life" window,
which is similar to the personal "small Matrix"
system. One aspect is very interesting: the
future of real education and real information
services in such artificial world. There are many
chances in it... for imagination consumers.
This what we write, talk or listen is a kind of extension
of our physical connections in our brains.
Yes, the human mind is my passion.
:-)
Welcome to my personal site at http://grathor33.110mb.com
I have decided to stop blogging at the same time in Polish
and English on my twin blogs, where my fun started
in 2007 (only http://kdabrowski.blogspot.com is my current blog):
http://kjdabrowski.blogspot.com
http://grathor33.blogspot.com
No comments:
Post a Comment