tag:blogger.com,1999:blog-132896972024-02-08T03:24:44.104+02:00Martin Vahi veebilogMartin Vahihttp://www.blogger.com/profile/12072649570880032285noreply@blogger.comBlogger33125tag:blogger.com,1999:blog-13289697.post-77975091960496358902012-12-26T11:50:00.002+02:002012-12-26T11:50:40.666+02:00Blog Migration NoticeAs of December 2012 this blog has moved to <a href="http://martin.softf1.com/">http://martin.softf1.com/</a> .Martin Vahihttp://www.blogger.com/profile/12072649570880032285noreply@blogger.com0tag:blogger.com,1999:blog-13289697.post-73655171592153601692012-08-04T18:30:00.001+03:002012-08-04T18:30:44.509+03:00How to Minimize the Number of Conversion Functions<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbEMlQ_iiy-esksHFdmjOH60oyeXGh03T_4cTPoGmDJh6w8eEPzGkTs9dxsmWqtcvWUoJ-yoHy8PKotGCMzodQfLdEW2ep8O4a2XG8cuVQPfiyrJIlo_RJUXgxu76tpu-mwc0Q3w/s1600/2012_08_04_daisy_chaining_conversion_functions_mvveebilog.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img alt="The solution: take a circle, place units (km/h, m/s, miles per hour, etc) as points to that circle and add an arrowhead to each of the arcs, essentially converting the arcs to directed edges of the graph." border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbEMlQ_iiy-esksHFdmjOH60oyeXGh03T_4cTPoGmDJh6w8eEPzGkTs9dxsmWqtcvWUoJ-yoHy8PKotGCMzodQfLdEW2ep8O4a2XG8cuVQPfiyrJIlo_RJUXgxu76tpu-mwc0Q3w/s1600/2012_08_04_daisy_chaining_conversion_functions_mvveebilog.jpeg" title="" /></a></div>
<br />
<br />
<br />Martin Vahihttp://www.blogger.com/profile/12072649570880032285noreply@blogger.com0tag:blogger.com,1999:blog-13289697.post-50535706388914789172011-04-07T08:00:00.010+03:002011-04-07T18:07:48.764+03:00Ahead-of-time ComputingIf a problem is not parallelizable, but the computation is extensive enough for the hardware to fail to complete it on time in a single thread, then probably the only way to implement a soft-real-time system is to calculate the answer before it is needed.<br />
<br />
The time spent on computation, data transfer, etc., introduces a latency between an input and the output.<br />
<br />
In general, whenever there is a latency between an input data and the output data and the parallelization of the computation does not decrease the latency enough, the next thing to try, probably in conjunction with the parallelization, is the ahead-of-time computing.<br />
<br />
The idea is that one calculates a whole bunch of answers in parallel and later, when the actual input data is known, picks the answer, the output, that has been derived from the input that is closest to the real input. The rest of the answers are discharged, thrown away.<br />
<br />
As of April 2011 I haven't tried it yet, but may be the ahead-of-time computing could be used for speeding applications up even on single-CPU systems. On single-CPU systems one would perform the ahea-of-time computation in the background, in a low priority thread. Tasks that can be run in the background, for example some of the game artificial intelligence and just-in-time compilation, seems to be good candidates for the ahead-of-time computing, because they are not that time critical.<br />
<br />
One might even offload some of the background computation to computers on a local area network. If most of the computation results get thrown away anyway and there's not even a guarantee that the bunch of the ahead-of-time calculated answers contains a usable answer, then it does not matter, if some of the answers in the bunch are not found, completed, calculated, on time. That entails that even old-ish and slow-ish computers can contribute to the speed of an application that runs on a modern computer, provided that their computational power to electric power ratio is acceptable.Martin Vahihttp://www.blogger.com/profile/12072649570880032285noreply@blogger.com0tag:blogger.com,1999:blog-13289697.post-86702464009289897222011-02-11T06:01:00.013+02:002011-02-21T11:27:11.490+02:00How to Bootstrap a Threading APIThis article is not intended to be a full-blown tutorial. It is meant to be a relatively concise set of notes, quick reference, with some rehearsal to get the reader's mind to the "track".<br />
<br />
Just like any <a href="http://mathworld.wolfram.com/BooleanFunction.html">Boolean logic</a> operation (read: digital circuit) can be assembled from <a href="http://mathworld.wolfram.com/NOT.html">Boolean inversion</a> and <a href="http://mathworld.wolfram.com/Conjunction.html">conjunction</a>, all of the threading API, except the pausing and awakening of sleeping threads, can be assembled if a thread-blocking sleep function exists and a mechanism for forking threads exists.<br />
<br />
Once the sleep and fork exist, the rest is all subject to subjective taste, except the pausing and awakening of sleeping threads. The remaining part of this article is just one, somewhat inefficient and largely improvable, version of "the rest".<br />
<br />
To create a threading API that does not support the pausing and awakening of sleeping threads I add 2 things:<br />
<br />
1) critical sections<br />
2) thread collision detection<br />
<br />
The critical sections are used for maintaining consistency of the values of a set of variables.<br />
<br />
For the sake of rehearsal, or getting "in the mood": if the set of variables consists of an organism type and its coating, let's say, organism==giraffe, coating==fur, then if the set gets updated to a parrot, i.e. first organism:=parrot, and after that coating:=feathers, then before the value of the coating is updated, there's a situation, where organism==parrot, but the coating==fur. It's better that no thread reads the inconsistent values of the pair, (organism,coating), before the whole pair has been updated and that's where the critical sections become useful.<br />
<br />
Thread collision detection is for handling edge-situations, where no thread has yet locked the critical section, but more than one thread wants to enter it.<br />
<br />
To allow the capabilities of multi-CPU hardware to be leveraged as much as possible, one should avoid putting the threads to a wait, idle, state. To minimize the waiting time of threads, one wants to maximize the number of threads that can concurrently access the shared set of variables, i.e. one wants to allow as many threads to concurrently enter the critical sections as possible. One way to do that is to use 2 types of critical sections:<br />
<br />
A) critical section for only reading<br />
B) critical section for reading and writing<br />
<br />
<br />
The idea is that it's OK for more than one thread to concurrently read the same set of shared variables, as long as there's no thread writing to the set of shared variables at that very same moment. On the other hand, no thread should be reading the set of shared variables while some other thread is writing to them. Neither should there be more than one thread concurrently writing to the set of shared variables.<br />
<br />
At the implementation level it means that each set of the shared variables has 2 locks: one set and released by the read-only critical sections and the other set and released by the read-write critical sections. Both of the critical section implementations read both of the locks.<br />
<br />
One possible way to implement the thread collision detection is like this:<br />
<br />
<pre>b_done=false
while(!b_done)
i_lock++
if(i_lock==1){
enter critical section
i_lock--
b_done=true
} else {
i_lock--
sleep some semi-random time
} // else
} // while
</pre><br />
The sleeping time of different blocked threads has to differ, preferably change at every iteration, because otherwise they might collide with each other at every iteration, resulting an infinite loop. One way to assure the sleeping time difference is to use some semi-random numbers. This entails that a programming language can have guite functional threading support without having a statistically proper rand function.Martin Vahihttp://www.blogger.com/profile/12072649570880032285noreply@blogger.com0tag:blogger.com,1999:blog-13289697.post-1659048753100952232010-10-11T01:38:00.002+03:002010-10-11T01:52:24.276+03:00Programming Language Support to Succinct CodeIn general, a programming language determines a general idea (semantics), how input data is transformed to output data, and a syntax, the rules how the the contemplation that adheres to the general idea, is written down. APIs don't usually determine syntax, but they do determine semantics.<br />
<br />
Leaving a long introduction to aside, the point of this blog post is to point out that in addition to the number of compulsory semicolons, commas, braces, keywords, etc. the succinctness depends heavily on the statistical profile of the code. The number of characters that a construct, let's say, loop clause, function declaration keyword, call to some API subroutine or operator, etc. contributes to an application code depends on the number of times the construct is used in the application.<br />
<br />
For example, a code that is written in <a href="http://www.maplesoft.com/">Maple</a> or <a href="http://www.wolfram.com/products/mathematica/index.html">Mathematica</a> probably has considerably more calls to various symbolic calculation routines and statistics routines than software that controls industrial robots or runs a customer self service web site. This means that an inefficient, clumsy, API of more "complex" math routines does not have much of an impact on the succinctness of the code of the web application, but it has heavy impact on math intensive data analysis related code.<br />
<br />
The conclusion is that one can not assess the succinctness support of a programming language or API without actually measuring the usage frequencies of its different parts in an "average" real life application.<br />
<br />
Secondary conclusion is that API-s have to be updated, changed, after they have been in use for a little while and more is known about their "real life usage".<br />
<br />
Third conclusion is that if some party comes up with some new technology, programming language, API, etc., then the aiding capability of that technology probably depends on the application domain. It's a bit like comparing antibiotics with a pain killer: taking a pain killer to treat infection might not give as good results as the antibiotics would give and vice versa.Martin Vahihttp://www.blogger.com/profile/12072649570880032285noreply@blogger.com0tag:blogger.com,1999:blog-13289697.post-41979913665695937012010-09-25T18:13:00.007+03:002014-09-04T19:37:22.849+03:00How to Differentiate Oneself in BusinessActually, as of September 2010 I don't know a firm answer to that question, but I think that the contemplation that leads to the hypothesis is probably inspiring.<br />
<br />
Suppose we compare passenger cars that fit 2 to 5 passengers. Almost all of them have a staring wheel, 4 tyres, they're more or less of the same size and get the passengers from point A to point B. Usually they all get the job done, technically speaking, they're practically all the same, just switch the car on and drive. In an average non-highway commuting route the cars have roughly the same speed. Probably the skills of their development teams are also equal: an engineer from one of the companies can probably move to another company and be able to handle the job after about a year of learning.<br />
<br />
However, obviously, there is a very big difference between Fiat, Mercedes, BMV, Toyota and Ferrari, despite the fact that they're all just cars that take roughly the same amount of fuel and get their passengers from point A to point B. <br />
<br />
My hypothesis is that one way to differentiate something is to differentiate it in style, bias, not functionality or technically fundamental properties(i.e. a flying car or an amphibious car). There are different ways of achieving the same goal and there's always the matter of taste. It doesn't make sense to argue that apple juice is somehow better, more innovative, more effective, more functional, etc., than pear juice, but the two definitely differ and people have their preferences.<br />
<br />
If the hypothesis held, the conclusion for me would be that even though I'm just an "average" software engineer/developer/whatever-nice-name and even though it probably is possible to find some other person that has at least as good or much "better" (whatever that means) skill set than I have, I can differentiate myself by the style of my software. For example, I can create software that solves a common problem that is already solved by my "competitors", but I can target people with certain habits or preferences, just like BMV and Toyota do it with their products.<br />
<br />
Actually, it is also extremely simple to come up with totally UNIQUE products, ideas, by taking something that already exists and giving it A BIAS. On can just pick anything one likes and quite randomly pick some field, let's say, gardening, military, medical aid, etc., and combine the two. Probability that a thing like this already exists on the market, is pretty low or if it's not low enough, combine something existent with 2 biases in stead of 1, etc.<br />
<br />
Examples:<br />
scissors -> gardening scissors,<br />
tongs -> nut crackers,<br />
cup -> coffee cup.<br />
<br />
What regards to the business success of unique things, then that's probably subject to marketing and trial and error. After all, even the usefulness of cellphones was considered questionable at their early days. At early days of computing very few could imagine, how a house-wife or a teenager uses a computer, a personal one even, or that a granny needs a strong, military grade, cryptography for paying her utility bills from her living room, over a computer network.<br />
<br />
For a halve joke I point out that what I've been describing in my current post is in line with the saying that every great scientist stands on the shoulders of giants. (I'm not a scientist, but development work is what software developers do.)<br />
<br />
<br />
++++++++++++++++++++++++++<br />
<br />
Added in May 2013: <a href="http://youtu.be/3MDmlKV3jzI?t=17m28s">"Everything has been Done!</a>
<br/><br />Martin Vahihttp://www.blogger.com/profile/12072649570880032285noreply@blogger.com0tag:blogger.com,1999:blog-13289697.post-23726863808370628682010-09-21T04:02:00.001+03:002010-09-21T04:08:30.670+03:00About Domain Specific Algorithms and Software Development LaborThe point of this blog post is to claim that by inventing new programming languages it is not possible to eliminate the labour of describing domain specific algorithms.<br />
<br />
For example, an assertion that a file that does not exist, can not be written to, holds regardless of programming language. It is possible for the language designer or library author to make sure that the file is automatically created, if it does not exist, but this is already a labour of describing a domain specific algorithm.<br />
<br />
Another example is matrix multiplication. A programming language with its semantics determines the notation, i.e. multiply(a,b) or aTIMESb or a.times(b) or whatever, but someone, be it the hardware designer, programming language designer or a library designer, has to describe the essence of the matrix multiplication at least somehow. The various kinds of implementation details and optimizations do not change the fact that someone has to do actual development labour to get the multiplication to work.<br />
<br />
In practice it entails that whenever a new programming language is designed, a new "standard library" is created, the very same work of describing the domain specific algorithms has to be done all over again, unless the previous descriptions are reused.<br />
<br />
From intuitive point of view, and yes, according to my personal subjective taste and impressions, software development productivity depends a lot on the notation and semantics of the programming language. As of 2010 I believe that the preferences for a programming language (read: preferences for notation and semantics) is subjective and depends on the chooser's background.<br />
<br />
By noticing that most programming languages that are in use in 2010, share a subset of common basic data types, namely arrays/vectors, hashtables, whole numbers, rational numbers, boolean values, I have a hypothesis that a probably withstandable, but imperfect, solution to the reuse and the notation-switch problem is to share memory space (the common data structures) between different programming language implementations. A program would start in one language, then, without exiting, switch to another programming language and then switch to whatever other programming language. The programming language switch regions might, probably would, contain data structure mapping code.<br />
<br />
A vague, raw, preliminary, syntax example, where a hashtable named "symbolspace" is reserved in all language implementations:<br />
<br />
<pre># We'll start in Ruby
s=(4+5).to_s
LANGSWITCH to PHP
$s_output='The answer is'.$symbolspace['s']
echo $s_output
LANGSWITCH to JavaScript
s3="From PHP we've got:"+symbolspace('s_output')
document.write(s3)
</pre><br />
I believe that the .NET and Java virtual machines allow that sort of functionality, but it won't work out socially, because Java got acquired by Oracle, .NET runs practically only on Windows (no, in 2010 the <a href="http://en.wikipedia.org/wiki/Mono_(software)">Mono</a> won't do) and in the end many projects, like Haskell, Python, Perl, etc., have their mainstream implementations on "bare C or C++", not to mention the extra work that it would take to port them and how a single virtual machine implementation would limit developer creative freedom. May be a solution is a set of automatically inserted, language specific, library calls that dump and load the values of the common data structures to and from something like the <a href="http://memcached.org/">Memcached</a>. <br />
<br />
I'll update/modify this article, if I have changed my mind on this or made a working implementation of the Memcached biased solution. So, this blog post will probably be modified.Martin Vahihttp://www.blogger.com/profile/12072649570880032285noreply@blogger.com0tag:blogger.com,1999:blog-13289697.post-89422272322570141242010-09-13T08:30:00.002+03:002012-11-03T16:54:25.736+02:00Array Indexing by SeparatorsIn the case of arrays and strings one often needs to extract a sub part of them.<br />
<br />
If one uses the indices of the virtual separators between and at the "edges" of the array elements in stead of the indices of the array elements themselves, one can eliminate conditional statements that check indices for critical values at the "edges" of the array.<br />
<br />
Explanation by an example:<br />
<br />
<pre># Array indices: 0 1 2 3 4
array=["H","e","l","l","o"]
# Separator indices: 0 1 2 3 4 5
# 0 1 2
GetSubarray(["H","e"],0,0)==[] # 0-0=0
GetSubarray(["H","e"],0,1)==["H"] # 1-0=1
GetSubarray(["H","e"],1,1)==[] # 1-1=0
GetSubarray(["H","e"],1,2)==["e"] # 2-1=1
GetSubarray(["H","e"],2,2)==[] # 2-2=0
GetSubarray(["H","e"],0,2)==["H","e"] # 2-0=2
GetSubarray(["H","e"],2,2)==[] # 2-2=0
GetSubarray([],0,0)==[] # 0-0=0
</pre>
<br />
The thing to notice is, how it is possible to mark empty intervals, including the start edge of the string and the end edge of the string, by using the very same 2 indices that describe a substring start and end positions.
<br />
<br />
A more permanent version of this post resides <a href="http://urls.softf1.com/a1/krl/frag4/">here</a>.Martin Vahihttp://www.blogger.com/profile/12072649570880032285noreply@blogger.com0tag:blogger.com,1999:blog-13289697.post-75132231894115590352010-07-25T03:25:00.004+03:002014-10-31T22:06:02.004+02:00The Meaning of LifeAs of July 2010, I've come to a conclusion that the ultimate meaning of life, for me at least, is to have as much fun, entertainment, as possible. The amount of fun is equal to a <a href="http://mathworld.wolfram.com/DefiniteIntegral.html">definite integral</a> of fun-power over time. The fun-power is never negative, but it is zero before birth and after death.<br />
<br />
Why is that? Well, think of what would one do or want to do, if one could live forever and have perfect health all the time and one could just change one's capabilities, mental and physical, to whatever one wants to, except to remove the capabilities changing capability? What's left then? Entertainment and nothing else and the loss of fun and loved people around me would decrease the amount of entertainment. (Loss does not always have to mean death or "destruction". One does lose every-day objects without destroying them.)<br />
<br />
So the way to maximize fun is to prolong one's life and to increase the fun-power. People differ in how they try to achieve that. For instance, some find it most efficient to rob or kill or just tease, if no one is capable of dying. Others find it beneficial to have an environment where everyone tries to treat others the way they self want to be treated. The idea being that one can better maximize one's own fun by not attending in a <a href="http://mathworld.wolfram.com/Zero-SumGame.html">zero-sum like game</a>, where the increase of one's own fun entails a decrease of someone else's fun. So, it takes quite a theory and skill to be happy in a paradise. :-) <br />
<br />
<br />
<iframe width="560" height="315" src="//www.youtube.com/embed/d_Ew1vRCdCw" frameborder="0" allowfullscreen></iframe>
<br />
<br />
<br />
++++++++++++++++++++<br />
<br />
Update at 2013_04_27: There exists "<a href="http://martin.softf1.com/g/yellow_soap_opera_blog/the-meaning-of-life-version-2">The Meaning of life, Version 2</a>".<br />
<br />
<br />
<br />Martin Vahihttp://www.blogger.com/profile/12072649570880032285noreply@blogger.com0tag:blogger.com,1999:blog-13289697.post-71249265704668514932010-07-20T01:37:00.002+03:002010-07-20T01:40:53.664+03:00The Core of Software DevelopmentIn the context of this article a computer program is a <a href="http://mathworld.wolfram.com/Function.html">function</a> and a "description" means "function description". The computer program as a function gets some input, from wherever, and it produces some output, to wherever in whatever form. So, practically all of the time that software developers spend, is spent on the name of creating that function description.<br />
<br />
Summary of the previous section: software is a function description, being a productive software developer means <a href="http://mathworld.wolfram.com/OptimizationTheory.html">minimizing</a> the time spent on creating the function description. That's the reason, why I speak of functions in this post. :-)<br />
<br />
A function can contain a mixture of calls to other functions and to oneself. To minimize the time spent on the assembly of the function description(read: to be a more productive software developer), one aims to minimize the following parameters:<br />
<br />
<br />
A) number of functions to describe;<br />
B) <a href="http://mathworld.wolfram.com/Mean.html">"mean"</a> number of function calls within a single function;<br />
<br />
<br />
The point B also covers "simple things" like <a href="http://www.cplusplus.com/forum/general/2666/">assignment operators</a>, <a href="http://mathworld.wolfram.com/Multiplication.html">multiplication</a>s, <a href="http://mathworld.wolfram.com/Addition.html">addition</a>s, etc.<br />
<br />
As we do not live in the world of infinitely fast<a href="http://plato.stanford.edu/entries/turing-machine/"> Turing Machine</a>s, additional conditions of memory usage patterns, bandwidth usage patterns, "outer memory" access patterns, <a href="http://plato.stanford.edu/entries/computability/">algorithm complexity</a>, hardware speed, energy consumption, sizes of various memories, etc. apply, but as of summer 2010 I believe that it really helps to keep the points A and B in mind while doing practical software development. Software design patterns, which in the end migrate from "pattern" status to programming language specification, are just fine-grained, time-dependent, details of the craft.<br />
<br />
Cheers!!!Martin Vahihttp://www.blogger.com/profile/12072649570880032285noreply@blogger.com0tag:blogger.com,1999:blog-13289697.post-19656128053438348142010-03-02T11:35:00.003+02:002010-03-02T12:16:05.194+02:00JavaScript Closure by an Example<pre><br />function func_c() {<br /> var s_c1 = ' the word "funcy" means ';<br /><br /> function func_b() {<br /> var s_b1 = "http://www.urbandictionary.com/define.php?term=funcy";<br /><br /> var func_a = function() {<br /> var s_a1 = 'According to the <a href="'+ <br /> s_b1 + '">' + s_b2 + '</a>' + <br /> s_c1 + s_c2 + s_this;<br /> return s_a1;<br /> } // func_a<br /><br /> var s_b2 = "Urban Dictionary"<br /> return func_a;<br /> } // func_b<br /><br /> var s_c2 = ' actually "trashy", but ';<br /> var ff_a=func_b()<br /> return ff_a;<br />} // func_c<br /><br />var s_this = 'it sure sounds like "dirty" in a sexual context.';<br />var fun = func_c();<br />var s_sentence = fun();<br />document.write(s_sentence);<br /></pre><br /><br />The example can be executed online over <a href="http://writecodeonline.com/javascript/">here</a> and it outputs a string <br /><br /><i>According to the <a href="http://www.urbandictionary.com/define.php?term=funcy">Urban Dictionary</a> the word "funcy" means actually "trashy", but it sure sounds like "dirty" in a sexual context. </i><br /><br />The thing to notice is how the variables, s_b1,s_b2,s_c1,s_c2,s_this are available to the function func_a, even when the func_a is called outside of the func_c. According to <a href="http://msdn.microsoft.com/en-us/library/bb250448(VS.85).aspx">Justin Rogers</a> that can cause memory leaks.Martin Vahihttp://www.blogger.com/profile/12072649570880032285noreply@blogger.com0tag:blogger.com,1999:blog-13289697.post-12627606301333184372010-02-20T01:16:00.005+02:002013-09-20T11:03:09.272+03:00About Physical Appearance, Clothing, hair Style and Preferences for sex Partners and Business PartnersThis post probably just shows my stupidity and lack of <a href="http://en.wikipedia.org/wiki/Social_intelligence">social intelligence</a>, but I am, what I am. So, in the evening of February, 19'th, 2010, I just wondered about 2 things. Well, may be 3 things, depends on how to look at it. <br />
<br />
Firstly, why is it that even though I'm not that interested in sex and disqualify anyone, who is not able to provide me a stunningly intelligent conversation or does not leave me an impression that I can rely on his/her intelligence and understanding of the limits of this world, I still pay a great deal of attention to the physical appearance of him/her? <br />
<br />
Like, I try to imagine, how he/she would be in bed, how I would cope with him/her in bed and that's with leaving sexual compatibilities like fast versus slow, etc, to aside. To me it seems that if I'm primarily looking for a sole-mate, then physical appearance shouldn't matter, but the fact is that it does matter. Actually, it even matters with my own case, but that's a different story, which can be handled by fixing the shortcomings, and I do take an assertion that before one loves anyone else, one has to love oneself, for granted.<br />
<br />
The second thing that I started to wonder, is that why I still do not have my hair colored to blue, like the Estonian flag colour, and then have my pony-tail coloured black and white, giving blue-black-white, like the Estonian flag colours? One of the thoughts that might occur is that I won't "live it up", or, in Estonian: "kanna seda välja". Well, I think that that's not an issue, because I can be just like I am: dead-serious and deep-sceptical most of the time, without smiles, giving scary looks that are colder than ice, and then, suddenly, laugh from my heart so that people that drive by or whom I walk by, give me shy, but sincere, smiles. Strangely, I guess that the answer to this, the second, issue, is that I'm afraid that people might jump to conclusions that are not favourable to me and that might limit my possibilities to communicate with them in a manner that is favourable to me. Think business. Currently it seems to me that I have to get my business going well before I can afford such personal expressions. (NB! I guess that I just said it all. :)<br />
<br />
Well, all in all, I came to a thought that the physical appearance (think of wearing a huge <a href="http://en.wikipedia.org/wiki/Swastika">swastika</a> on a back and front of ones T-shirt or drawn to the sides of ones' car) and physical interaction (like, sexually, but also "innocent" hugs, pats, etc.) is part of communication. As of 19.02.2010 that thought gives quite a new meaning to <a href="http://en.wikipedia.org/wiki/Semiotics">semiotics</a>. To me it seems that the semiotics is all around us all the time, like <a href="http://en.wikipedia.org/wiki/Applied_art">applied art</a>. One might even call it "applied semiotics", or, may be, I don't know, <a href="http://en.wikipedia.org/wiki/Applied_Semantics">applied semantics</a>? Semiotics in the context of hair dresses might be quite interesting. Or cars, the may-be-third thing that I started to wonder about. I mean, it does make a difference, if one rolls to or from a business meeting with a beetle, Harley-Davidson, limo or a tuned BMV.<br />
<br />
<table><tbody>
<tr>
<td><a href="http://upload.wikimedia.org/wikipedia/en/6/6e/VWSedanintorreon.jpg"><br />
<img src="http://funlab.softf1.com/mv-veebilog/blog_illustrations/2010_02_19_semiotics/VolkswagenBeetle.jpg" style="border: 0px;" /><br />
</a></td>
<td><a href="http://en.wikipedia.org/wiki/File:2003_HD_XL1200C_Anniversary_Edition.jpg"><br />
<img src="http://funlab.softf1.com/mv-veebilog/blog_illustrations/2010_02_19_semiotics/HarleyDavidson.jpg" style="border: 0px;" /><br />
</a></td>
</tr>
<tr>
<td><a href="http://en.wikipedia.org/wiki/File:2003-2008_Rolls-Royce_Phantom_01.jpg"><br />
<img src="http://funlab.softf1.com/mv-veebilog/blog_illustrations/2010_02_19_semiotics/Rolls-Royce_Phantom_01.jpg" style="border: 0px;" /><br />
</a></td>
<td><a href="http://www.carsandtuning.org/wp-content/uploads/2006/10/bmw-e30-1.jpg"><br />
<img src="http://funlab.softf1.com/mv-veebilog/blog_illustrations/2010_02_19_semiotics/bmw-e30-1.jpg" style="border: 0px;" /><br />
</a></td>
</tr>
</tbody></table>
<br />
<br />
The next thought from here is marketing. As a matter of fact I started to see ordinary, every-day, communication astonishingly differently during a series of marketing lectures that were part of a introductory business course that was held within the <a href="http://www.mk.ee/">Mainori Kõrgkool</a> and conducted by Mrs. <a href="http://www.mk.ee/?pg=73&pg2=oj_info.php&oj=00000001269">Aet Kull</a>. Aren't we doing marketing duering dates? As a matter of fact I've been comparing job interviews with (blind) dates since at least 2004. I find them remarkably similar.<br />
<br />
In the context of this post, namely, "applied semiotics" point of view combined with my likes and dislikes, I find the George Michael's video, "Fast Love", very interesting.<br />
<br />
<br />
<iframe width="420" height="315" src="//www.youtube.com/embed/kQVWYu4BdMo" frameborder="0" allowfullscreen></iframe>
<!--
div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/hlHp814kr5w?feature=player_embedded' frameborder='0'></iframe></div
-->
<br />
<br />Martin Vahihttp://www.blogger.com/profile/12072649570880032285noreply@blogger.com2tag:blogger.com,1999:blog-13289697.post-38012235898310700632010-01-23T04:05:00.016+02:002010-01-23T05:06:50.033+02:00My Personal Programming Skills Enhancement Strategy Since January 2010 till ... I Come up With some Better ideaIn the end source code is a series of bits that tells the computer, what to do. No matter, what the methodology, be it functional, OO, logic, procedure oriented, etc.<br /><br />So, putting those 2 claims together, I'm looking for a NOTION, how to EXPRESS myself as concisely as possible, while keeping the rule set as simple and concise as possible. After I've figured that out (there are probably very many different possibilities), I can start to think about the compromises that are probably needed in order to use the currently existing technologies. For instance, I will probably need to use JavaScript for browser side software development, PHP for server side development, C++ for systems programming, etc. <br /><br />So, it's a conquest for language development. And, by the way, doesn't the real, natural, languages pose exactly the same problem? As of January 2010 I think that they do. <br /><br />It seems to me that predicate logic is quite inspiring, if just something similar could be defined for cases, where OO or loops or conditional sentences are used. May be one key-phrase is also “order-sorted logic”, whatever that means. (As of January 2010 I still need to learn the “order-sorted logic” stuff.) <br /><br />So, finding a concise way to express myself is definitely something that I as a programmer need quite direly. I think that I'm not going to make it successfully without that knowledge, but the programming language that I have tried so far, mainly Ruby, C++, Java, Delphi, JavaScript, PHP, but also Prolog, a little bit of Haskell and Clean (and a bunch of others that I've just tasted a little bit), just “don't cut it”. I don't know Scala yet, but according to the introduction it seems to be just another morphism of the existing OO and functional technologies.<br /><br />Now, one thing that I definitely do know is that the size of vocabulary that I'm able to remember is limited. This infers that the most concise solution, where one just assigns one number to a whole program or code block, is not usable by me. <br /><br />The search for a solution is probably by trying to manually translate an existing, production, system to that concise version and to see, what constructs there exist. Practically, one tries to do some very wild refactoring, identify the common parts, etc., but without the limitation of a concrete syntax, as the syntax is the one that is being searched for. Also, for every part of the production system, one also analyzes the REASON, why the code segment is necessary, why it has been written in the first place and is it possible to just eliminate the reason, refactor the “reason” out of the code or to do the search for common parts in the context of the “reasons”. For instance there's no reason to install light switches to lights that are in places that do not receive any light from windows and are lit up by energy saving LED light bulbs.<br /><br />It seems that the ideal specification for the new language is something that is not laborious to implement in the currently existing programming languages. It should be something like the ProgFTE specification. May be some kind of an interpreter that can be very easily and efficiently implemented in JavaScript, PHP, Ruby, etc. and then the software that has been written in that new languages can run truly everywhere. IN PRACTICE. For example, the Java runs only in places where the Java language developers have taken the great effort to port it to. I, for instance, do not always have the luxury of choosing a programming language by myself, because due to the amount of labor my software, very often, has to interface with some legacy parts or just parts that have been written by others or even by myself. Typical cases: GUI, network, sound, hardware access, file access, image file format reading, etc.Martin Vahihttp://www.blogger.com/profile/12072649570880032285noreply@blogger.com0tag:blogger.com,1999:blog-13289697.post-34075911737693420142009-12-13T19:39:00.000+02:002009-12-13T19:40:36.619+02:00About knowledge transfer in High-schools and UniversitiesAs of December 2009 I think that it all should conform to the <a href="http://brainrules.net">Brain Rules</a>, which can be followed if everyone learns in a place, where one wants to and at a time when one wants to. For example, a home environment probably provides such possibilities. To be more explicit, if people are mentally active at different times of a day, then a lecture at a given, fixed, time of day definitely ignores some of the student's biological needs.<br /><br />People also differ in their background, which means that feature X needs a more in-depth explanation to student A and feature Y might need a more in-depth explanation to student B. Therefore, there is a need for private, personal, consultations. On the other hand, a common material is a good thing to start with, because it provides a seed for the consultation sessions and the learning process in general. Usually that common material is in a form of a lecture, lecture notes, or some literature. <br /><br />It's also a fact that people forget. According to the brain rules, repetition is good, but that does not say, that people do not forget things, if they do not work on the things. It's also known, from practice, that males are better at doing things when they do one thing at a time. As a matter of fact, the switching of activity can be quite unpleasant to some of them, me included. (I also know other people that have had similar observations about themselves.) So, for at least some of the males it makes sense to let them learn one subject at a time. That, of course, does not conform to the testing schedule that assumes that a student has to learn one certain part of the material by a few certain tests in the midst of semester. <br /><br />I believe that a simple and cheaply implementable solution to the testing issue would be that there is one special classroom with 2 security guards. The classroom is open every workday from morning to evening and anyone in the school or university can come there either by first reserving a time-slot or just by dropping by, if there are any free seats available. One of the security guards, who can be even an elderly lady with thick glasses, prints out the test questions and applies a timestamp and her/his personal stamp to the test. From that moment onwards, the student has a given amount of time to perform the test within that classroom, without using his cellphone or laptop. One of the security guards makes sure that the cellphones, nor laptops are used. When the student is ready with the test, he/she hands the test back to the old-lady security guard, who then applies a second timestamp to the test and later, at the end of her work day delivers all of the tests to different lecturers for evaluation. This way, any student can take any test at any time he/she is ready for taking it. The only requirement imposed to the student might be that all of the tests have been passed by the end of the semester. The professor, lecturer, benefits from that system, because he/she is freed up from the dull and boring activity of sitting in the classroom while students take their tests. <br /><br />What regards to the lectures, then those might be just made available for download and all that the lecturer, professor, has to do, is to provide personal consultation and evaluate the tests. <br /><br />Well, may be someone might even start to provide the services of such a testing-center to multiple private, or even public, universities, schools, private educators. The old-lady security guard might be even some pensioner, who can watch soap operas while there's no one asking for or handing in a test.Martin Vahihttp://www.blogger.com/profile/12072649570880032285noreply@blogger.com0tag:blogger.com,1999:blog-13289697.post-56813280418111408612009-12-13T15:07:00.018+02:002013-05-20T03:49:09.222+03:00One Thought About the Transhumanism and NazismAs the <a href="http://en.wikipedia.org/wiki/Standing_on_the_shoulders_of_giants">future relies on the standing on the shoulders of giants</a> and as the software development has demonstrated that one of the prerequisites of keeping the amount of labor in a feasible limit is by recombining previously completed components, it's no wonder that I do not always have much to add. So, some of my articles, starting with this one, are a combination of citations and a small amount of my own thoughts. And yes, I know, that many people HATE video, photo and sound based citations, but they have an option not to read my posts. I think that a person's time IS equivalent to a part of that person's LIFE. <br />
<br />
Well, here it goes. First, I think that the following video explains the political and social aspects of artificial intelligence, without applying the percentage of non-informing SciFi mystification that tends to be added to the topic in many technology popularization texts.<br />
<!-- embed id=VideoPlayback src=http://video.google.com/googleplayer.swf?docid=1079797626827646234&hl=en&fs=true style=width:400px;height:326px allowFullScreen=true allowScriptAccess=always type=application/x-shockwave-flash> </embed-->
<iframe width="420" height="315" src="http://www.youtube.com/embed/ri9CFs6x-MQ" frameborder="0" allowfullscreen></iframe>
<br />
<br />
As of December 2009 it seems to me that it is <a href="http://dictionary.reference.com/browse/racism">racist</a> to apply <a href="http://www.democracynow.org/2005/10/25/john_conyers_on_rosa_parks_she">segregation laws</a> to that highly intelligent machines, because humans, tehcnically, are not better and the distinction is purely based on the difference in “species”.<br />
<br />
As of December 2009 I personally love the idea of <a href="http://en.wikipedia.org/wiki/Cyborg">cyborgs</a>, because humans can't survive in cold winter without clothing, I.e. self-enhancements, tools. Drugs, <a href="http://en.wikipedia.org/wiki/Joint_replacement">artificial joints</a>, glasses, <a href="http://en.wikipedia.org/wiki/Hearing_aid">hearing aids</a>, are, according to my view, exact examples of cyborgization. If evolution takes thousands of years, then cyborgization is something that one can use before dying. For instance, if <a href="http://www.newscientist.com/article/dn3488-worlds-first-brain-prosthesis-revealed.html">brain prosthesis</a> become stable enough and the computing technology miniature and mature enough, then I hope to have brain enhancement. I believe that it does not hurt if the thinking part of the brain has more computational power than currently can fit into the skull.<br />
<br />
And, in that light, the artist called Haddaway has a darn good song: <br />
<br />
<iframe width="560" height="315" src="http://www.youtube.com/embed/xyaGQPjXGyE" frameborder="0" allowfullscreen></iframe>Martin Vahihttp://www.blogger.com/profile/12072649570880032285noreply@blogger.com0tag:blogger.com,1999:blog-13289697.post-10147180987986551172009-10-05T03:58:00.011+03:002013-01-03T08:14:13.443+02:00Programmer Friendly text Exchange (ProgFTE)(This is edited version #7 of this post.)<br />
<br />
There are 2 versions of the ProFTE specifications. As of January 2013 the most up to date version is the <a href="http://martin.softf1.com/g/n//a2/doc/progfte/index.html">ProgFTE_v1</a>. The rest of the text in this blog post describes the ProgFTE_v0, which originates from 2009.<br />
<br />
<hr />
<br />
<span class="Apple-style-span" style="font-family: raudrohi_fontfamily_monofur, monospace;"></span><br />
<h2 class="c1" style="text-align: center;">
ProgFTE Specification Version 0 (ProgFTE_v0), which is superseded by <a href="http://martin.softf1.com/g/n//a2/doc/progfte/index.html">ProgFTE_v1</a></h2>
<br />
<br />
For short: each key-value pair of a hash-table is encoded as:<br />
<br />
keyAsText|||ValueAsText|||<br />
<br />
The text versions of the key-value pairs are concatenated and one can even use JSON/YAML/XML/almost-whatever strings for the value part, except that one also has to make sure that neither the key, nor the value, contains the literal “|”. This can be overcome by replacing the “|” within the keys and values with some string (one calls it hereafter: pillarSubstString) that does not occur within the keys and values. <br />
<br />
For decoding, one has to write a function that BISECTS a string at the first occurrence of a search-string. In this case, the search-string is the “|||”. For example, bisect(“simpler|||than|||XML|||”,”|||”) would output a PAIR that consists of string “simpler” and string “than|||XML|||”. <br />
<br />
The reason, why "|" is replaced in stead of the "|||" is that if a key or value contains "|" or "||" as its suffix (one omits the analyzing of the prefix case for now), one ends up with <key or value without suffix>|||| or <key or value without suffix>|||||, which makes the finding of the "|||" problematic.<br />
<br />
So, all in all, the format is:<br />
<br />
NumberOfKeyValuePairs|||pillarSubstString|||key1AsText|||value1AsText|||key2AsText|||value2AsText|||etcOtherKeyValuePairs<br />
<br />
The number of key-value pairs is prefixed to avoid the counting of the “|||” at deserialization.<br />
<br />
The reason, why the separator string is "|||" in stead of the more space/traffic efficient "|" is that the "|||" is easier to read during debugging and the "|" and the "||" already have historic meanings in software development.<br />
<br />
The main benefit of this format is that one can implement it in different languages with relatively little amount of work. That includes exotic languages, self made, domain specific languages, that do not have extensive XML or JSON or other "mainstream" format libraries available. An example application is a website, where the server side has been written in PHP or Java and the client side has been written in JavaScript (keyword: AJAX) or some JavaScript based <a href="http://www.biwascheme.org/">Scheme</a> dialect.<br />
<br />
The secondary benefit comes from the comfort of using hashtables.<br />
<br />
--------<br />
<br />
Update on 22 December 2011<br />
<br />
Actually, the format that is described in this post, is in use in the real world and has worked without problems, but unfortunately that's pure luck, because the format(ProgFTE_v0) is flawed and I have a new, improved, specification in the works. (Update on 03 January 2013: the new specification is called <a href="http://martin.softf1.com/g/n//a2/doc/progfte/index.html">ProgFTE_v1</a>.)<br />
<br />
If (Hash.new)["nice_key"]="Cariba|" and the pillarSubstString=="baba", then the ProgFTE is<br />
<br />
<pre>1|||baba|||"nice_key"|||Caribababa|||
</pre>
<br />
There is an issue, how to reverse-translate the "bababa" part of the "Caribababa". Should it be "Cari|ba" or "Cariba|".<br />
<br />
The good news is that one can distinguish the old version of ProgFTE, the one described in this blog post, from the new one and simply improve the ProgFTE libraries of the real world application, without any need to convert saved data. The old version, the one in this blog post, always starts with a number, but the new version always starts with a letter "v", like "v<format_version>". I'll update this blog post after I have shipped the new version.<br />
<br />Martin Vahihttp://www.blogger.com/profile/12072649570880032285noreply@blogger.com0tag:blogger.com,1999:blog-13289697.post-42942611579010988982009-08-17T06:51:00.011+03:002013-04-28T05:21:48.991+03:00JavaScript __LINE__ and “this” SubstitutesLeaving a longer explanation to aside, the following code demonstrates, how to overcome the absence of the __LINE__ and the proper semantics of the “this” in the JavaScript.<br />
<br />
<pre>function niceclass(){
var self_public_=this; // Yes, that's the first "innovation".
this.a_public_field='whatever';
function a_private_method(){
document.write('Public fields value is:'+self_public_.a_public_field);
}
this.a_public_method=function(){
try{
a_private_method();
} catch (err){
// If all of the methods have try-catch-s with
// Globally Unique Identifiers Copy/Pasted from
// http://www.guidgenerator.com/ , then
// it's possible to find out the faulty region even
// when the JavaScript does not have the __LINE__ support.
throw "GUID== ba6e3063-9438-42a4-a041-e8fd635fb4c5"+
"\nerr=="+err+"\n------------------------\n";
} // catch
} // this.a_public_method
} // niceclass
window.onload=function(){
var v1=new niceclass();
v1.a_public_method();
v1.a_public_field='Another value';
v1.a_public_method();
} // window.onload</pre>
<br />
For the sake of correctness, I have to give credit to the <a href="http://www.quirksmode.org/js/this.html">http://www.quirksmode.org/js/this.html</a> and the <br />
<a href="http://jspro.org/">http://jspro.org/</a>. Of course those were not the only sources, but as of August 2009 I found them to be the best that I could find.<br />
<br />
++++++++++++++++++++++<br />
<br />
Update at 2013_04_27:<br />
Tools for debugging and editing GUID-marked JavaScript reside within the BSD-licensed <a href="https://github.com/martinvahi/mmmv_devel_tools/blob/master/mmmv_devel_tools/src/mmmv_devel_tools/GUID_trace/COMMENTS.txt">GUID_trace</a> package, which is part of the <a href="https://github.com/martinvahi/mmmv_devel_tools/tree/master/mmmv_devel_tools">mmmv_devel_tools</a> package.<br />
<br />
The GUID_trace package components assume that GUID-s are surrounded by either double quotes or single quotes, like<br />
<pre> </pre>
<pre>GUID=="ba6e3063-9438-42a4-a041-e8fd635fb4c5" </pre>
<pre>GUID=='ba6e3063-9438-42a4-a041-e8fd635fb4c5'</pre>
<br />
<br />Martin Vahihttp://www.blogger.com/profile/12072649570880032285noreply@blogger.com0tag:blogger.com,1999:blog-13289697.post-2160288391633498102009-08-03T07:59:00.008+03:002009-08-03T08:10:44.463+03:00About the Feasibility of Hydrogen as a Gasoline ReplacementAccording to my calculations, if one compares gasoline and energetically identical amount of hydrogen, then the price of a gasoline forms about 86% of the price of the hydrogen provided that only <a href="http://www.energia.ee/index.php?id=2245&L=1">green electricity</a> is used for producing the hydrogen and that there are no energy losses within the hydrogen production process. <br />The price of energetically equivalent amount of jet fuel, kerosene, forms about 90% of the price of the hydrogen. <br /><br />Conclusion: both, in the case of cars and flying machines, the green electricity based hydrogen seems to be economically feasible, but unfortunately it would still be too expensive to make it affordable to have helicopter based ambulances in regular use. For example, a 300km two-way flight with the <a href="http://www.eurocopter.com/site/en/ref/Characteristics_99.html">Eurocopter AS365</a> seems to cost at least about 200 Euro-s.<br /><br />The good news is that if someone figures out a way, how to decompose water by using solar energy and some microbes or chemical reaction, then the hydrogen based aviation might become affordable. :-)<br /><br />The <a href="http://www.wolfram.com/products/mathematicahomeedition/">Mathematica</a> notebook source: <br /><pre><br />(* All of the following calculations are about one litre of gasoline.*) <br /><br />Needs["Units`"];<br />litersPerGallon = 3.78541 Liter/Gallon;<br />cubicMetersPerGallon = litersPerGallon/(1000*Liter)*Meter^3;<br /><br />(* http://www32.wolframalpha.com/input/?i=gasoline *)<br /><br />gasolineEnergy = 47.73 *10^6 Joule/Kilogram;<br />gasolineDensity = 0.735*10^6*Kilogram/(1000*Meter^3);<br /><br />gasolineEnergyPerCubicMeter = gasolineDensity*gasolineEnergy;<br />gasolineEnergyPerLiter = (gasolineEnergyPerCubicMeter*Meter^3)/(<br /> 1000*Liter);<br />eurosPerKroon = 1/15.7 *Euro;(* www.seb.ee *)<br /><br />greenElectricityUnitPrice = 1.8*eurosPerKroon;<br />gasolinePriceLiter = 15*eurosPerKroon<br />gasolineEquivalentElectricitySalesUnits = (<br /> gasolineEnergyPerLiter*(1*Liter))/(3600000 *Joule);<br />gasolineEquivalentGreenElectricityPrice = <br /> gasolineEquivalentElectricitySalesUnits*greenElectricityUnitPrice<br />ratioGasoline = \<br />gasolinePriceLiter/gasolineEquivalentGreenElectricityPrice<br /><br /><br /><br />dollarsPerKroon = 1/12*Dollar; (* www.seb.ee *)<br /><br />eurosPerDollar = eurosPerKroon/dollarsPerKroon;<br /><br />(* http://www32.wolframalpha.com/input/?i=kerosene *)<br /><br />keroseneDensity = (0.819*10^6*Kilogram)/(1000*Meter^3);<br /><br />(* http://hypertextbook.com/facts/2003/EvelynGofman.shtml *)<br /><br />keroseneEnergy = 42.8*10^6 Joule/Kilogram;<br />keroseneEnergyPerCubicMeter = keroseneDensity*keroseneEnergy;<br /><br />(* http://www.nyserda.org/energy_information/nyepg.asp <br />http://www.iata.org/whatwedo/economics/fuel_monitor/index.htm<br />*)<br />kerosenePricePerGallon = (5*Dollar)/Gallon*eurosPerDollar;<br /><br /><br />gasolineEquivalentKeroseneMass = <br /> gasolineEnergyPerLiter/keroseneEnergy*(1*Liter);<br />gasolineEquivalentKeroseneVolume = gasolineEquivalentKeroseneMass/<br /> keroseneDensity;<br />gasolineEquivalentKeroseneVolumeGallons = <br /> gasolineEquivalentKeroseneVolume/cubicMetersPerGallon;<br />gasolineEquivalentKerosenePrice = <br /> gasolineEquivalentKeroseneVolumeGallons*kerosenePricePerGallon<br />ratioKerosene = \<br />gasolineEquivalentKerosenePrice/gasolineEquivalentGreenElectricityPrice<br /><br /><br />(* http://www.eurocopter.com/site/en/ref/Characteristics_99.html *)<br /><br />eurocopterAS365Power = 700*10^3 Joule/Second;<br />eurocopterAS365Speed = 269000/3600*Meter/Second;<br />distanceFromHospital = 300*10^3 Meter;<br />flightDistance = 2*distanceFromHospital;<br />flightTakeoffsAndLandingsDuration = 15*60*Second;<br />flightDuration = <br /> flightDistance/eurocopterAS365Speed + <br /> flightTakeoffsAndLandingsDuration;<br />flightDurationInHours = flightDuration/(3600*Second)*1.0*Hour<br /><br />flightEnergy = flightDuration*eurocopterAS365Power<br />flightEnergyPriceElectricity = <br /> flightEnergy/(3600000*Joule)*greenElectricityUnitPrice<br /></pre>Martin Vahihttp://www.blogger.com/profile/12072649570880032285noreply@blogger.com0tag:blogger.com,1999:blog-13289697.post-47698955200374051392009-07-06T04:44:00.026+03:002014-10-31T22:01:22.502+02:00About Caring for OthersThis posting is a mixture of some of my beliefs and some thoughts. One of their common denominators is that as of July 2009 I believe them to be true. I will probably think differently in the future.<br /><br />So called axioms or, in a laxer context of this posting, <a href="http://www.anxiety-and-depression-solutions.com/insight_answers/Automatic_Thoughts.php">automatic thoughts</a>:<br /><br /><span style="font-style:italic;">Different people mostly differ in their <a href="http://www.itl.nist.gov/div897/sqg/dads/HTML/objective.html">objective function</a></span><br /><span style="font-style:italic;"><br />People always use their most up to date version of their objective function, even if the objective function contains some inherent random variables.</span><br /><br /><span style="font-style:italic;">When people agree to participate in a transaction, they act only according to their own objective function. (The way the Noam Chomsky <a href="http://www.democracynow.org/2009/7/3/noam_chomsky_on_crisis_and_hope">put</a> it: if 2 people perform a transaction, let's say, one person sells another person a car, then the 2 parties only care about their own profits and do not take to account the cost of the transaction to third parties.)</span><br /><br /><span style="font-style:italic;">Money is just one, though very important, type of currency out of many.</span><br /><br /><br />Some implications, which seem to match with observations:<br /><br /><span style="font-style:italic;">In business people do not mind participating in transactions, where the other side has a terrible disadvantage. An example: whenever there's enough people in a bad enough situation to find a sweatshop a viable working environment and if sweatshops are legal, sweatshops will emerge. </span><br /><br /><span style="font-style:italic;">Love is not free. Sometimes some part of it can, indeed, be payed with money, but just like one has to repay a bank loan in Estonia in Euros, while the local currency is Kroon, one has to pay for love with a fine company and physical attraction.</span><br /><br /><span style="font-style:italic;">In the case of employee-employer and buyer-seller relationships there are cases, where the selling side does not expect to receive only money. For example, in some cases respectful treatment is also expected, in addition to the money.</span><br /><br /><span style="font-style:italic;">Hunting of animals, including humans, does not constitute a murder as long as the hunted do not enforce themselves. (Illustrations: deer hunting, the slaughter of Iraq citizens by united states army and security forces, civilian deaths of United States drone attacks in <a href=”http://en.wikipedia.org/wiki/Pakistan”>Pakistan</a>, the holocaust imposed by the Israeli army to the people within the <a href=”http://en.wikipedia.org/wiki/Gaza_Strip”>Gaza Strip</a> in 2009, fishing, etc.)</span><br /><span style="font-style:italic;"><br />Even people at noticeably honored positions, for example, university professors, don't mind stealing and deceiving in a way that is even worse than that of common pocket thieves. (I won't name anybody, but I know one such case really well.)</span><br /><br /><span style="font-style:italic;">What I think that is useful or harmful for the other person probably differs from his or hers own view, because his or her objective function probably differs from mine. (I have also noticed that my views have a much greater match with the views of those people, who have somewhat similar background, let's say, that of other programmers, physicists. For some reason the decisions of people with economics background tend to seem the craziest to me. That is to say, for some weird reason biologists and philologists tend to be much more similar to me than economists.)</span><br /><br />One of the questions that might be of interests at the notion of those statements is:<br />What is to be wanted from a truly true and affectionate lover? <br /><br />This question has been inspired by an erotic story, where a daemon changes to a passionate lover and a true companion of its disenchanter, while requiring human sperm to stay alive.<br /><br />From the love perspective there's also a question that if there were a robot, like in the movie <a href=”http://www.imdb.com/title/tt0118583/”>Alien Resurrection</a>, with technical ability to attend one's daily life, i.e. shopping, sports, leisure, work, etc., and the robot had comparable or greater intelligence than that of fellow humans, then why should someone fall into love with another human in stead of that robot?
<br /><br />
<iframe width="420" height="315" src="//www.youtube.com/embed/S1myB44Tjiw" frameborder="0" allowfullscreen></iframe>
<br /><br />
A side-note: As of July 2009 I still find the movie, Alien Resurrection, inspiring. I think that it is one hell of a well done movie in multiple contexts. May be it's because it somewhat summarizes my career, interests, goals and desires (provided that the violence part of the movie is skipped)?Martin Vahihttp://www.blogger.com/profile/12072649570880032285noreply@blogger.com0tag:blogger.com,1999:blog-13289697.post-60404894289193905942009-06-15T22:02:00.017+03:002009-06-15T22:47:18.188+03:00About the Alternative to Knowing EverythingThere's a saying, at least in Estonia, that the one, who knows everything about everything, knows nothing at all. <br /><br />I actually tended to agree with that saying, but, unfortunately, the situation, where I am currently(June 2009), sounds like: “Know everything or become an asocial and die.”<br /><br />The controversial part is that if one works for one company, becomes specialized in the set of skills, technologies, that are needed at that given position, and then the company reduces staff, goes to bankrupt or just changes business directions, it's next to impossible to find another company, where the acquired skill set is relevant. Specially in a small place like Estonia, where the number of companies is relatively small. As of 2009 there's about 10 companies of each type: banks, security firms, robotic engineering companies, universities, fine hospitals, etc., with an exception of web development companies and consumer product marketing firms.<br /><br />One might think that, great, one learns web development and one has a secure future. However, I don't think that that's the case, because before the web boom, the type of applications that are now implemented as web based software, i.e. all sorts of business automation related software, was written in Delphi, C++, using Microsoft Foundation Classes, etc. Therefore, I think that it's not possible to say that the things that the businesses currently pay for, are the ones that they will pay for in the future. In another words, if I make an effort to become a top notch web developer, I'll be exactly in the same position, where I am today: I acquired a set of skills, became really good at it, and after getting sacked, for whatever reason, I have difficulties finding a job, where I can say that I'm the top notch specialist for You. <br /><br />Leaving a long contemplation to aside, I have an urge to bring in a question, what would the job market look like, if machines were much more ample at mental activities, let's say, at jobs that human programmers do nowadays? What would happen to people, in a social context, who do not use brain implants, enhancements, if some other people did use brain enhancements? I mean, the ones that don't, probably will not have any chance at the job market, or will they?<br /><br />So, in order to be in a different situation after, let's say, 30 years from now, I have to change something in my strategy. <br /><br />Programming takes a hell of a lot of effort and time, and I want to be at least payed reasonably for making this effort. For example, at one of my positions, at a company that I intentionally will not name here, I learned one programming language from ZERO to an expert level within 3 months, in addition to the company specific technologies and standards. Then the company just sheds about half of its staff. Leaving one small project to aside, all of the development work was halted and obviously there was no need for a brand new programmer, who has been with the company for just about 4 months. And yes, from my perspective, it really seemed that I did not have such a rough times even at the university examination period, as I had while working at that company. I did not receive even a lay-off compensation, because they sacked me literally at the very last day of my trial period. (Actually the story is a little bit more complicated. The CEO got also sacked and the new CEO applied structural changes and applied the layoffs and even that's not all of the story.)<br /><br />Anyways, the idea is that I know, from my personal experience, that I am capable of learning new technologies and relatively quickly. The described example is not the only example, but I'll skip the description of other cases here. However, coming back to the brain enhancements example, quick is not quick enough. One has to go faster in order to earn a living. As specializing only to a single technology for 5+ years (as requested in many job adverts) is unfeasible, one can only convince potential customers to accept results based pricing. The opposite would be hourly or monthly wage. But this means that one still has to be capable of doing the job at an expert level, which brings me to a question: how do I manage to do that?<br /><br />Well, the answer is: I don't know. However, it seems to me that I don't stand a chance, if I don't figure that one out. There are no brain-enhanced competitors in the real world, but the job market of today's economic situation seems to impose plain human programmers to a situation that seems to be quite similar to the one, where the brain-enhanced competitors do exist.<br /><br />May be I'll post something to my blog, if I come up with something along those lines of life.Martin Vahihttp://www.blogger.com/profile/12072649570880032285noreply@blogger.com0tag:blogger.com,1999:blog-13289697.post-63063063687668408942009-06-09T03:28:00.010+03:002009-06-09T04:42:41.862+03:00Sex and Drugs and Rock and RollWell, this is my first blog-posting in English. The reason, why I switched from Estonian to English, is that almost nobody ever reads my blog anyway. I thought that I might make this blog a bit more useful by writing it in English. Besides, almost everyone in Estonia can read and speak English anyway.<br /><br />So, sex. Well, I'll come to that later, but for now, I'll keep to the drugs part. I started to wonder, what does Google pop up, if I feed it with a name of a drug that one of my doctors prescribed me. Rivotril. I found out, besides that the drug is somewhat toxic, as expected, that it has a "halfe life" ranging, according to various sources, from 18 hours to 80 hours.<br /><br />According to my practice, that data is nonsense. I take it at the evening and feel well, fresh, in the morning, and it relaxes my muscles about 30 minutes after I have eaten it, but, yet again, I'm not a drug developper, nor a doctor.<br /><br />I started to wonder, how long does it take for that poison to get out of my body. Considering a fact that I visited gym 2 days earlier, did not jog after the gym, and had a really good night sleep with exceptionally nice, and erotic, dreams, there should not be any reason, why I am not at my best at jogging. However, I think that I was not at my best at jogging today.<br /><br />So, considering that the halfe life varies, it's no use of drawing just a line that shows the amount of drug left in the body. It takes 2 axes: time passed since administration and drug halfe life. For halfe life in range 18h to 80h and time since administration between 0h and 100h (==about 4 days), one gets the following "picture":<br /><br /><img src="http://funlab.softf1.com/mv-veebilog/blog_illustrations/2009_06_09_drug_halve_time.jpg" /><br /><br />So, no wonder that I missed the "tone" today. The conclusion: it makes sense to use the drug not more than once a week and it should be administered at the evening of a day, when exercises took place. The administration timing aims to use the training interval for drug decay.<br /><br />About the sex part, well, forget it, but what comes to the Rolling part, then it's not recommended to drive a car, when under the influence of that drug. Some sources claim that Rocking with alcohol intensifies the effects of the drug, so I guess that alcohol based Rocking is not recommended either. Cheers!<br /><br />Here's the <a href="http://www.wolfram.com/products/mathematica/index.html">Mathematica</a> source for the above image:<br /><pre><br />initialAmount = 1;<br />famount[hours_, halfeLifeInHours_] := initialAmount/2^(hours/<br />halfeLifeInHours);<br />Plot3D[famount[hours, halfeLife], {hours, 0, 100}, {halfeLife, 18,<br />80}]<br /></pre>Martin Vahihttp://www.blogger.com/profile/12072649570880032285noreply@blogger.com0tag:blogger.com,1999:blog-13289697.post-22544014071008245912009-06-01T21:43:00.006+03:002009-06-01T22:22:49.351+03:00Üks, tõenäoliselt loll, mõte energia ja mateeria teemal ning natuke lobajuttu matemaatikaalaste töövahendite teemalTunnistan, et Mai 2009 seisuga ei ole ma veel endale ei Einstein'i teooriaid ega Schrödinger'i võrrendeid selgeks teinud (jättes praegu kõrvale teema, et kas ma selleni üldse küündin), kuid mul on vaikselt, juba vist keskkooli ajast saadik, kummitanud peas, mõnikord, jalutades, taevast pilvi vaadates, mõte, et võibolla on mateeria hoopis ruumis kokku surutud energia. Keskkooli füüsika tunnis ju käidi välja Einstein'i kuulus võrrand, E=m*c*c.<br /><br />Ülikoolist mäletan, et footoni energiat sai välja arvutada, teades tema sagedust. Samas,<br />kui võtta eelduseks, et footoni liikumise kiirus on vaakumis C, saab välja arvutada footoni "pikkuse", eeldusel, et ta koosneb vaid ühest võnkest.<br /><br />Minu amatöörlik, ketserlik, esmaspäevaõhtune, mõte on, et võrdleks füüsikute poolt väidetavat prootoni "suurust" sama "pikkuse" footoniga ja siis arvutaks footoni "pikkuse" järgi välja tema sageduse, ning siis paneks selle sageduse füüsikute poolt väidetavalt kehtivasse footoni energia arvutamise valemisse, saades sedasi võrreldava footoni energia ja siis avaldaks Einsteini valemist, E=m*c*c, footoni "massi" ning siis võrdleks toda footoni hüpoteetilist massi(ma mäletan, võibolla valesti, mingit füüsikute väidet, et footonitel massi ei ole) füüsikute poolt väidetava prootoni massiga, mis peaks enam-vähem ühilduma vesiniku aatomi massiga, sest elekroni mass pidavat aatomite massist vaid väga tühise osa moodustama.<br /><br />Kui need massid klapiks, siis oleks minusugusele, Einsteini teooriaid mittetundvale inimesele, see maailm tsipa intuitiivsemalt tajutav.<br /><br />Muideks, kogu selle ürituse inspiratsioon seisneb selles, et mul õnnestus omandada <a href="http://www.wolfram.com/products/mathematicahomeedition/?gclid=CO6Y8Ly86ZoCFcED3godfW0jCQ">Mathematica 7 Home Edition</a> litsens ning <a href="http://www32.wolframalpha.com/">WolframApha</a> otsingumootor näib igasugu äraunustatud, ning ka veel mitteõpitud, koolitarkuse ülesleidmisel päris hea abivahend olevat.<br /><br />Aga, ega siis midagi. Siin on mu Mathematica töölehe kood, Copy-Paste tegemiseks:<br /><br /><pre><br />c = 299792458 Meter / Second;<br />electronCharge = (1.6021765*10^(-19))*Coulomb;<br />(* The PhysicalConstants` gives the proton mass in MeV. *)<br /><br />protonMassEnergy =<br />ParticleData["Proton", "Mass"] *10^6*electronCharge *Volt ;<br />protonRadius = (9*10^(-16))*Meter;<br />protonDiameter = 2*protonRadius;<br />plancConstant = 6.626069*10^(-34)*Joule*Second;<br /><br />fFrequency[wavelength_] := c/wavelength;<br />fPhotonEnergy[wavelength_] := fFrequency[wavelength]*plancConstant;<br /><br /><br />Manipulate[fPhotonEnergy[prd], {prd, 1.6*10^(-15), 1.7*10^(-15)}]<br /><br />ourPhotonEnergy = fPhotonEnergy[protonDiameter]<br />protonMassEnergy<br />ourPhotonEnergy/protonMassEnergy<br /><br />ourPhotonEnergy2 = fPhotonEnergy[1.6*10^(-15) Meter];<br />ourPhotonEnergy2/protonMassEnergy<br /></pre><br /><br />Ja tulemus: prootoni diameetri suuruse üksiku võnkega footini energia on 1.10358*10^(-10)J ning prootoni mass energiaks ümber arvutatuna 1.50328*10^(-10)J ehk footoni energia moodustab prootoni energiast 73%. Minu meelest, polegi paha, eriti kui arvestada, kui umbmääraselt prootoni raadius antud on.<br /><br />Näiteks, kui kasutada prootoni raadiuseks Wikipeedias antud 1.6*10^(-15)meetrit, siis on footoni energia juba umbes 83% prootoni "massist". Aga jah, paistab, et selles valdkonnas mulle veel intellektuaalseid harjutusi jätkub. Selleks, et mõõtmistega seonduvaid ebakõlasid kontrollida, peaks ma vist juba materjaliteadust oskama, mida ma ei ole õppinud. Seega, jätan need vesiniku aatomid esialgu sinna paika ja mõtisklen, õpin, pigem, kuidas matemaatiliselt tekivad meremeestele hirmu tegevad asjad, mida inglise keeles nimetatakse "Rogue Wave".<br /><br />Muidugi, huvi pärast võiks mõni päev välja mõelda mudeli, kus seisulaine ei liigu "2 seina vahel", vaid moodustaks oma "põrgetega" kera. Näiteks, tekib küsimus, et mis tingimustel on vaid osa kera pinnast põrgetega kaetud ja millal on kogu kera, "matanalüüsi mõttes pidevalt" põrgetega kaetud.<br /><br />Ah jaa, muideks, naljaga pooleks võiks ju rääkida ka sonarite tehnoloogiast teada olevate ultraheli-lainete massiosakestele iseloomulikest omadustest. Vähemalt mingi analoogia näib ultraheli-lainetel ju, vähemalt väliselt, <a href="http://en.wikipedia.org/wiki/Crookes_tube">katood-kiirtega</a> olevat. :-)<br /><br /><br />Üldiselt, kommentaar Mathematica 7 kohta on, et mul on selle Linux versioon ja see Debiani peal täitsa toimib. Aeg-ajalt küll variseb kokku, kuid mitte nii tihti, et see kokkuvarisemine eriti tööd segaks.<br /><br />Samas, mis Wolfram'i litsensipoliitikasse puutub, siis see on küll minu meelest viidud absurdini.<br />Konkreetne näide on nende otsingumootori FireFox'i otsirea litsensist, kus on öeldud, et seda otsirea pluginat võib kasutada vaid mitte-kommerts eesmärkidel. Teisisõnu öeldes, lähed nende lehele, saab küll tööasjus valemeid meelde tuletada, aga läbi FireFox'i otsirea ei tohi. Absurd.<br /><br />Ma siin küll ei ütle kust, aga teine näide on nende akadeemilised litsensid. Need on täiesti mõttetud. Sisuliselt on nii, et kui soovite asja väga rangelt vaid õppimiseks ja hobiks kasutada, siis tohib kodukasutaja litsensi osta ja kõigil ülejäänud juhtudel tuleb sõna otseses mõttes 10 korda suurema hinnaga (==40kkr) Proffessional litsens osta. Nende tasuta allalaetav Player või Viewer on ka täiesti mõttetu, sest vähegi keerukam tööleht ei ole sellega interaktiivselt vaadatav. Tasulise Player'i eest tahavad aga umbes sama suurt hinda kui kodukasutuse litsensi eest (~4kkr). Õnneks on siiski töölehte võimalik koos väljaarvutatud piltidega HTML-i eksportida ning interaktiivsetest asjadest ekraanivideosid teha.<br /><br />Aga noh, teisest küljest jällegi, Mathematica on siiski tõesti hea kraam. Kuigi, isiklikult arvan, et suuremahuliseks numbrinärimises ta seoses igal võimalikul hetkel analüütiliste lahenduste ksutamisega ei kõlba. Teistpidi jälle, asjadega katsetamiseks on väga oluline, et kasutatakse just analüütilisi lahendusi, sest see elimineerib ära palju numbriliste ebastabiilsustega seonduvaid probleeme, võimaldades keskenduda numbriliste arvutuste spetsiifiliste küsimuste asemel käsil olevale probleemile. Vähemalt selline on minu senine, 2009. aasta kevadine, kogemus.<br /><br />Näiteks <a href="http://www.gnu.org/software/octave/">Octave</a> korral tekkisid mul ühel juhtumil numbriliste arvutustega seonduvad probleemid. Konkreetselt rääkides, kui lineaarvõrrandisüsteeme lahendada kasutades <a href="http://mathworld.wolfram.com/LinearSystemofEquations.html">pöördmaatriksi leidmist</a>, siis võib juhtuda, et tavalised ujukoma arvutused ümardavad esialgse, matemaatiliselt mittesingulaarse, maatriksi singulaarseks, muutes sedasi võimatuks pöördmaatriksi leidmise ja seeläbi ka pöördmaatriksi leidmisel põhineva võrrandisüsteemi automatiseeritud lahendamise.<br /><br />Ise kodeerides on lahenduseks absoluutse täpsusega ratsionaalarvude kasutamine, näiteks kasutades <a href="http://gmplib.org/">GNU MP</a> teeki, kuid seda teeki ma ei soovita, sest ta on C++ poole pealt väga problemaatiliselt kodeeritud ning teda on ka suht ebameeldiv kompileerida.Martin Vahihttp://www.blogger.com/profile/12072649570880032285noreply@blogger.com0tag:blogger.com,1999:blog-13289697.post-90744572533282081052008-09-21T00:21:00.003+03:002008-09-24T23:30:55.402+03:00Eneseteadlikkusest ja vabast tahtest 2008. aasta Septembri seisuga<div style="text-align: justify;">Antud artikli eesmärk on tutvustada ühte hüpoteesi, milleni<br />ma jõudsin 2008. aasta Septembris vaadates Interneti vahendusel<br />John Searle'i poolt peetud <a href="http://video.google.com/videoplay?docid=-4887379527411665519&q=john+searle&total=90&start=0&num=10&so=0&type=search&plindex=0">loengut</a> ja Hod Lipson'i poolt<br />peetud <a href="http://www.youtube.com/watch?v=lMkHYE9-R0A">ettekannet</a>.<br /></div><br /><div style="text-align: justify;">Lühidalt öeldes on minupoolne definitsioon selle loo kirjutamise hetkel järgmine: <span style="font-weight: bold;">X on "eneseteadlik", kui ta </span><br /><span style="font-weight: bold;">loob ise X tegevuse tulemuste hindamise funktsiooni, mille väärtus kajastab tulemuse kasulikkust X-le.</span><br /></div><br /><div style="text-align: justify;">Näiteks Hr. Hod Lipson'i poolt ettekandes demonstreeritud robot<br />ei kvalifitseeru minu poolt toodud definitsiooni kohaselt<br />eneseteadlikuks, sest tulemuse hindamise funktsioon (mida rohkem<br />robot edasi liigub, seda suurem hinne on) oli arendajate<br />poolt ette antud.<br /><br />Muud mõttekäigud, mis tollest hüpoteesist selle tõele vastavuse<br />korral järelduvad, jätan igaühe enda teha, aga et seda järelduste<br />tegemist tiba suunata, kohe ennetavalt mõnedele järeldustele<br />oponeerida, käin välja järgmised väited:<br /><br /></div><ul style="text-align: justify;"><li>Enesetappu sooritavad inimesed on eneseteadlikud.</li><li>Inimesed saavad lähtuda vaid enda teadmistest. Juhendajad ja õpetajad saavad vaid välja käia ideid, millest inimene siis ise valib, mille kasulikkuse üle inimene, õppija, ise otsustab.</li><li>Inimesel Y ei ole võimalik täita teise inimese, Z, käsku ilma, et ta lähtuks vähemalt mingil määral oma teadmistest. Vastupidisel juhtumil peaks inimene Z absoluutselt kõik detailselt ära tegema, mistõttu inimese Z poolne käsu andmine muutub mõttetuks, sest Z tuleb tolle käsu täitmise aitamiseks teha ära absoluutselt kõik need samad tegevused, mis tal tuleb ära teha siis, mil ta inimese Y'ga üldse tegemist ei tee.<br /></li></ul><div style="text-align: justify;">Minu viimasest abi-väitest, muideks, järeldub, kuidas tellijana või kliendina saada tellimuse täitjalt võimalikult head tulemust: ühtegi sellist asja, milles tellimuse täitja oskuslikum, kogenum, on, ei tohi talle ette dikteerida, sõltumata sellest, et ollakse kliendina kuningas. (No, seda välja öeldes riskisin nüüd küll oma nahaga, aga ma ei ütle miks. :-)</div>Martin Vahihttp://www.blogger.com/profile/12072649570880032285noreply@blogger.com2tag:blogger.com,1999:blog-13289697.post-52649440250548977902008-06-18T22:09:00.025+03:002008-06-18T22:50:59.306+03:00Korporatiivsete tulemüüride toimivusestSelle artikli eesmärk on tõestada väide, et kui korporatiivse tulemüüri taga olev kohtvõrgu arvuti ARK saab läbi tulemüüri arvuti ART alla tõmmata ARK poolt valitud HTML-lehekülgi ARK poolt valitud serverarvutilt ARS, siis vähemalt ühel juhtumil ei ole tulemüüril ART võimalik kohtvõrgu arvutit ARK takistada info üleslaadimisel.<br /><br /><br /><span style="font-weight: bold;">Tõestus:</span><br /><br /><br />Olgu ARK'lt ARS'ile saadetava paketi suurus üks bitt ning olgu iga pakett tähistatud unikaalse järjenumbriga K. Kuna ART ei takista ARK'l serverilt ARS lehekülgi alla laadimast, sõltumata lehekülje HTML-faili nimest, siis saab ARK küsida serverilt lehekügi, mille nimetus on kujul a_K_M.html, kus K on paketi järjenumber ja M on 1, juhul kui ARK saadab ARS'ile biti, mille väärtus on 1, ning 0, kui ARK saadab ARS'ile biti, mille väärtus on 0. Kuna ARS saab logida, milliseid faile talt on küsitud, siis saab ta oma logifailist kätte bitijada, mille ARK talle saatis.<br /><br /><br /><span style="font-weight: bold;">MOTT.</span><br /><br /><br /><span style="font-weight: bold;">Mõtte edasiarendus:</span><br /><br />Kuna ART edastab ARK poolt ARS'ilt küsitud leheküljed ARK'le, siis on ühendus ARK ja ARS vahel mõlemasuunaline.<br /><br />Lihtsamal juhul saab seda ühendust alustada vaid ARK, kuid viis, kuidas cron-i-sarnase programmi abil sellest kitsendusest enam-vähem üle saab, on kirjeldatud all pool.<br /><br />Kui kahe arvuti vahel on olemas mõlemasuunaline võrguühendus, siis ülejäänu on vaid kummagi arvuti peal jooksvate rakenduste kirjutajate fantaasia küsimus.<br /><br /><span style="font-weight: bold;">Taustinfo:</span><br /><br />Ma ei ole selle mõtte originaalautor ja, kes veel pole ära tabanud, siis ülalpool olevat asjaolu saab kasutada korporatiivsetesse võrkudesse paigutatud tagauste tööpõhimõttena. Serverisse ARS saab paigaldada vastava dünaamilise veebi tarkvara, näiteks Java servleti, ning kui on piisav füüsiline juurdepääs kohtvõrgu arvutile ARK, näiteks nii, nagu on ühel tavalisel töötajal (ja võibolla ka korporatiivse ja mõne välise, näiteks kodu või hotelli, arvutivõrgu vahet füüsiliselt käivasse läpakasse väljaspool korporatiivseid ruume installitud tagaukse omanikul), siis osutubki korporatiivne tulemüür mõlemat pidi läbitavaks ehk kaotab info salajas hoidmise kontekstis oma mõtte täielikult.<br /><br />Toimuva, vähemalt osaliseks, logimiseks tulemüür siiski sobib, sest võrguliikluse mahtu saab ta mingil määral, osadel tingimustel, mõõta ka siis, kui kasutatakse steganograafiat.<br /><br /><span style="font-weight: bold;">Näidisrakendus:</span><br /><br />Linuxi kasutaja kirjutab oma Crontab'i, et iga 5 minuti järel tõmmatakse tööle skript S1. S1 kasutab programmi wget serverist HTML-lehekülgede allatõmbamiseks, kontrollib allatõmmatud HTML-leheküljel oleva teksti signatuuri ning kui see klapib, siis tõmbab selle teksti mingi skriptina tööle, näiteks BASH skriptina, suunates skripti väljundi tekstifaili, signeerides tolle tekstifaili ning saates tolle tekstifaili sisu HTML-lehekülje blanketi abil serverile tagasi.<br /><br />Loomulikult võib, et mitte öelda, on soovitatav, kasutada krüptimist, sest lihtsamal juhul võib igaüks veebiserverilt sinna üles laetu alla tõmmata ja seda vaadata.<br /><br />Teine osapool, see, mille taga kasutaja istub, näiteks kräkkeri arvutis jooksev skript S2, kontrollib aeg-ajalt, kas vastus on serverile laekunud. Kui vastus on serverile jõudnud, tõmbab S2 selle serverilt kräkkeri arvutisse alla, kontrollib signatuuri ja signatuuri klappimisel kuvab vastuse ekraanil.<br /><br />Ongi terminalisessioon olemas --- läbi, väidetavalt, ideaalselt ühesuunalist liiklust võimaldava korporatiivse tulemüüri...<br /><br /><span style="font-weight: bold;">Lihtrahvalik, märksa lihtsustatud, selgitus:</span><br /><br />Oletame, et inimese A on käes lõngakera, mille ots on inimese B käes. Kui inimene A lõnga tagasi ei keri, siis inimene B saab lõnga inimese A käest vaid ära tõmmata ehk lõng liigub vaid ühes suunas: inimese A käest inimese B kätte. Kuigi inimene B ei saa inimesele A lõnga anda, on inimesel B võimalik inimesele A lõnga tõmbamise ajastamise abil morse koodis sõnum saata, mis on aga juba oma olemuselt info edastamine. Lõng on nende andmete analoog, mis liiguvad korporatiivses võrgus oleva arvuti poolt tellituna Internetist korporatiivsesse võrku sisse, näiteks Neti otsimootori serverist kohtvõrgu arvuti ekraanile.<br /><br /><span style="font-weight: bold;">Natukene PR'i ehk avalike suhete korraldamist:</span><br /><br />Oma naha säästmise huvides ütlen ka otse välja, et ma pean siiski oma tööandja poolt ette kirjutatud, ettevõtte sisesest, arvutivõrgu kasutamise reeglistikust kinni, siin artiklis kirjeldatud tagauksi oma, ega töökaaslaste, arvutitesse ei pane, jne.<br /><br />Samas, aususe huvides ka mainin, et antud artikkel oli paljuski ajendatud sellest, et ühe mu tööandja IT-osakonna üks tubli inimene raius nagu rauda, et nemad teevad oma tööd hästi ja nende poolt hallatavast tulemüürist ikka väljastpoolt ilma VPN'ita ükski töötaja firma kontori võrku sisse ei saa. Lubasin, et IT-osakonna poolt loa saamisel ja nendega koostöös tõestan neile vastupidist, kui vastavate skriptide kirjutamiseks aega saan.<br /><br />Seega, selle artikli korral on tegu väikest viisi omamoodi semuliku nügimise ning kaikavedamisega. :-D. Elame-näeme, kas ma selle demo ka teoks teen, aga seda artiklit siin kirjutades on mõttes üks Linuxi konsooli sessioon. Nad lubasid selleks mulle oma tulemüüri taha ajutiselt ühe Linuxi masina üles panna. :-D<br /><br />Kuigi mulle küll mitmed Hr. Rein Langi ettepanekud meeldivad, välja arvatud Delfi Eelnõu, siis arvan, et igaks juhuks tuleb siiski ära mainida, et Hr. Rein Langil ei ole mõtet antud artikli peale ventiili-eelnõud (mis see tulemüür siis traditsioonilise ettekujutuse järgi muud ikka on, kui vaid andmete ventiil) algatada, sest minusugune algaja ei ole turvaküsimustes praktiliselt millegiga kursis.<br /><br />06.2008 seisuga tean üldrahvalikest asjadest vaid seda, et kui ID-kaarti saadetakse signeerimiseks dokument läbi musta kasti, näiteks läbi kontrollimatult keerulise süsteemi, milleks minu meelest kvalifitseerub ka Linux, sõltumata tema avatud koodist, siis ei või iial kindel olla, millisele dokumendile tegelikult allkiri antakse või kui mitu ja millele too must kast tegelikult otsustab ID-kaardilt allkirja küsida, eriti kui ID-kaardi PIN-kood ka läbi tema, s.t. läbi Windowsi või Linuxi arvuti, saadetakse.<br /><br />Kui arvutist ei suudeta igasugu pahavara, näiteks usse ja viiruseid, ära hoida, siis miks peaks suudetama rohkem kontrollida seda, mida nood viirused seal arvutis signeerimistarkvaraga teevad?Martin Vahihttp://www.blogger.com/profile/12072649570880032285noreply@blogger.com1tag:blogger.com,1999:blog-13289697.post-47014172796607640462007-08-05T01:10:00.000+03:002007-08-05T01:37:51.867+03:00Lihtkodanik:"Palun kas saaks vähem reklaami?" Hansapank:"Ei saa, reklaam on informatiivne."Lugu seisneb selles, et kui ma palusin hanzaneti keskkonnas pangateate vahendusel, et ehk saaks vähemalt minu vaatest vähemalt mõned reklaamid ära kaotada, tuli vastus: "Reklaam on informatiivne."<br /><br />No see on ju lausa mõnitamine. Minumeelest oleks viisakas siis vähemalt otse välja öelda, et meile on lihtsalt äriliselt kasulik oma muusikat lasta nii kõvasti ja nii kaua, kuni see kõigil kummitama hakkab ja nad seda kaasa hümisema hakkavad. Konkreetne kirjavahetus minu ja Hansapanga vahel, mis toimus pangateadete vormis, oli järgnev(reavahetuste asukohad on ajaveeb lehele parema äramahtumise huvides minu poolt muudetud):<br /><table style="color: rgb(51, 51, 51);" class="normal" align="center" bgcolor="#ffffff" border="0" cellpadding="2" cellspacing="1" width="100%"><tbody><tr><td class="bg-light" align="right" height="25" valign="center" width="10%"><b>Kuupäev</b></td> <td class="bg-light" colspan="1" height="25">10.06.2007 16:11:19</td> </tr> <tr> <td class="bg-light" align="right" height="25" valign="center" width="10%"><b>Teema</b></td> <td class="bg-light" colspan="1" height="25">muu</td> </tr> <tr> <td class="bg-light" align="right" height="25" valign="top" width="10%"><b>Sisu</b></td> <td class="bg-light" colspan="1" height="25"><pre>Miks mulle pakutakse teist samasugust krediitkaarti,<br />kui mul üks juba on?<br /><br />Lugupidamisega,<br />Martin Vahi<br /></pre></td></tr></tbody></table><br /><br /><table style="color: rgb(51, 51, 51);" class="normal" align="center" bgcolor="#ffffff" border="0" cellpadding="2" cellspacing="1" width="100%"><tbody><tr><td class="bg-light" colspan="1" height="25"><br /></td> </tr> <tr> <td class="bg-light" align="right" height="25" valign="center" width="10%"><b>Kuupäev<br />Teema<br /></b></td> <td style="vertical-align: top;"><br /></td><td style="vertical-align: top;"><br /></td><td style="vertical-align: top;"><br /></td><td class="bg-light" colspan="1" height="25">10.06.2007<span style="font-weight: bold;"></span>16:17:59<br />muu<br /></td> </tr> <tr> <td class="bg-light" align="right" height="25" valign="top" width="10%"><b>Sisu</b></td> <td style="vertical-align: top;"><br /></td><td style="vertical-align: top;"><br /></td><td style="vertical-align: top;"><br /></td><td class="bg-light" colspan="1" height="25"><pre>Palun kas Te võiks öelda(kirjutada), kuidas<br />on võimalik neid reklaame Hanza-net'i<br />keskkonnast vähemaks saada. Kunagi oli vähemalt<br />võimalik pakkumise leheküljel vajutada nuppu<br />tähendusega "tänan, ei soovi", aga praegu on<br />see võimalus kah ära kadunud.<br /><br />Mind isiklikult häirib selline agressiivne<br />reklaam. Kui lisada siia veel asjaolu, et ma ei<br />saa öösiti seoses Hanza-neti tehniliste<br />iseärasustega kontoväljavõtteid vaadata, siis<br />mu kiusatus Hanzaneti asemel midagi muud kasutada<br />järjest kasvab. Siiamaani ei ole ma saanud<br />Hanzanet-ist ära kolida vaid põhjusel, et mul ei<br />ole veel ID-kaarti. Mulle isiklikult meeldiks,<br />kui ma saaksin jääda mugavustsooni ja Hanzanet<br />KASUTAJASÕBRALIKUMAKS(!!!) muutuks.<br /><br />Lugupidamisega,<br />Martin Vahi<br /></pre></td></tr></tbody></table><table style="color: rgb(51, 51, 51);" class="normal" align="center" bgcolor="#ffffff" border="0" cellpadding="2" cellspacing="1" width="100%"><tbody><tr><td class="bg-light" align="right" height="25" valign="center" width="10%"><b>Kuupäev</b></td> <td class="bg-light" colspan="1" height="25">10.06.2007 16:43:11</td> </tr> <tr> <td class="bg-light" align="right" height="25" valign="center" width="10%"><b>Teema</b></td> <td class="bg-light" colspan="1" height="25">RE: muu</td> </tr> <tr> <td class="bg-light" align="right" height="25" valign="top" width="10%"><b>Sisu</b></td> <td class="bg-light" colspan="1" height="25"><pre>Austatud Martin Vahi<br /><br />Hanza.neti keskkond on kõigile klientidele sama<br />ülesehitusega. Üks osa sellest kesskonnast on<br />pangapoolsed või meie koostööpartnerite pakkumised.<br />Kõiki pakkumisi ei ole võimalik eemaldada, nimetatud<br />pakkumised on informatiivsed ning kuvatakse avalehel<br />või ülevaadete valikus "pakkumised" all. Muude<br />pangatoimingute puhul antud pakkumisi ei näidata.<br /><br />Küll aga on võimlik eemaldada personaalsed pakkumised,<br />selleks palume saata meile uue panga teatena millistes<br />pakkumistest soovite hanza.netis loobuda.<br /><br />Lugupidamisega<br />Merlin Juurikas<br />klienditoe osakond<br /></pre></td></tr></tbody></table><br /><br /><br /><table style="color: rgb(51, 51, 51);" class="normal" align="center" bgcolor="#ffffff" border="0" cellpadding="2" cellspacing="1" width="100%"><tbody><tr><td class="bg-light" align="right" height="25" valign="center" width="10%"><b>Kuupäev</b></td> <td class="bg-light" colspan="1" height="25">10.06.2007 16:45:10</td> </tr> <tr> <td class="bg-light" align="right" height="25" valign="center" width="10%"><b>Teema</b></td> <td class="bg-light" colspan="1" height="25">RE: muu</td> </tr> <tr> <td class="bg-light" align="right" height="25" valign="top" width="10%"><b>Sisu</b></td> <td class="bg-light" colspan="1" height="25"><pre>Austatud Martin Vahi<br /><br />Püsimaksega krediitkaardi reklaami puhul on<br />tegemist on informatiivse pakkumisega, mis kuvatakse<br />kõikide hanza.neti kasutajate pealehel.<br /><br />Lugupidamisega<br />Merlin Juurikas<br />klienditoe osakond<br /></pre></td></tr></tbody></table>Martin Vahihttp://www.blogger.com/profile/12072649570880032285noreply@blogger.com5