вівторок, 28 травня 2019 р.

Reflection on the "The Computer As Medium"

This was inspired by my question to Mark  Miller on Quora regarding software as semantic modeling. One of the blog posts which he gives me as response was "The computer as medium", areas which ticks me was "Expanding the idea".

When I read it it feels like exactly my thoughts on the subject which I tossing around in my head, but yours for sure was very structured and logical. I do not have discipline to write my thoughts on the subjects which is interesting to me, but looks like now it is a time for that. I will try to explain my thoughts on the subject first, and then I could criticize it, since it is why they still floating in my mind. I have a feeling that they are wrong in some small details. My style would be more like written thesises how I view the problem.
1. Software development is business development initiative.
2. Software development very often is exercise in the automation of existing business processes which are human oriented. or developing assistive technologies which are helping existing personell produce better output. Sometimes software is just copying working culture with all inefficiencies in it. My former boss like to tell me, "We automate bardak". I learn later to not follow that path, but I still see that pattern in a lot of government projects in post-USSR countries. Create of effective software system hard on that market, since if stakeholders does not understand how some more effective system operate, it is possible implement that subsystem only up to understanding of this particular person.
3. During working with business oriented people, it was hard fill the understanding gap between technical talk and business talk. I end up with taking analogies from real world which are well known to my interlocutor. I usually describe software model using interactions from real-world which has similar constraints, at least I think so. When I trying to select model, I select models which when reduced could have same number of important actors, and if interactions could be described using math, the analogy process will produce similar equations. At least this is my hope. I do not think in equations for sure, but if different systems has small number of parameters which controlled in similar manner and with similar boundaries it will behave in similar way. Again this may be my wishful thinking.
4. People are dumb. What I actually mean is that people operating software system has limited capacity for learning. Individual people has different learning capabilities. This is mean that you could not have design of the system which could not be absorbed in reasonable time by key stakeholder, otherwise you will have tensions during design phase which effective "understanding" slow down to manageable for participants speed. In worst case you will have you will have organizational problems later on, if "slow" stakeholder has not enough political weight in organization.
5. People are dumb (2). People make mistakes. So design of software process should accommodate for errors, and allow for their corrections. I personally see 2 solutions for that - make process foolproof, and make process understandable by business process operators so they would fix errors themselves. This forces me to become interested in Control Theory, but I do not yet reach that destination.

Below would be more conclusions driven in one specific direction, based on previous observations.
6. When organization reach some size, all software in it become less relevant and just supplement existing business operations. And likely you could not improve software process without affecting the business process, and better control whole business process, to not disrupt it operations, and as such software is just minor part of human-computer interactions.
7. For business there was no problem to think about humans as resources. I do not want to follow that simplistic view, but rather slightly expand it. People is just another computational device with different characteristics for processing and IO. I do not think about it from ideological view, but rather in seek for the framework which could describe humans and computers in uniform fashion, to be able to form from these components models for existing business processes and their side-effects. If you have idea what discipline study that, it would be interesting to look onto that.
8. Given how much I talk about people in the description of software engineering, if apply engineering approach, it more likely lead to SociologyEngineering and EconomyEngineering. Because either people, or money. This is unpleasantly gives me associations with Post-Truth(ability to government influence opinions on mass scale), Hype Driven Software (self-fulfilling prophecies) + Uber-issues(where gig-economy influence how people work). This is maybe already SocioCAD (Facebook experiments) and EcononomyCAD(Fight for Unicorns by VC).

This does not answer other important areas of software which more sane, for example professional software.
9. This software more operated and developed in different way, in a way which more closer to my personal ideals, where more knowledge is put in the software system and system become more and more sophisticated over time, capturing a lot of domain knowledge in the system.
10. Such software is more complex and targeted to more sophisticated audience. It follows different practices and may allow himself to be more complex then regular business software. Want to note, that some business software become more sophisticated if there culture in the company which could maintain that level of sophistication.

Now I completely off the rails, as usually then start collecting my thoughts, so what's below closer to metaphysical discussion then reasonable thoughts.
11. Questions now for me is that software if it is a medium, is like exoskeleton for computational/thought processes inside humans, i.e. it is expanded ability of humans to thought, or it is more like a tool. I will try to explain what's the difference. All of that is living on a spectrum for me. Different world objects treated by people differently in how far they appear as part of human, and if they are living organisms, or non-living objects.
12. What if we can make software operate like prosthetic, or software always would be a tool which is no way cannot augment our thought process.

13. In addition to #7, would be good to think about mathematical model which could describe as a spectrum following objects: self, humans in the tribe, intelligent living objects (pets and enemies), non-living object, processes in the nature.
14. What's I trying to bring in this post is that software limitations could be actually limitations of human hardware which should be accounted in the design of software and as it loops again to #8 with SocioCAD idea.

Now since I regain my ability to return back to original discussion on using software as semantic modelling, I would like to ask questions:
15. Let's assume that using software we find way to model some semantic, how this would be different from existing way to model world using words and books. One difference which I see is that these kind of "books" allow knowledge to be directly applied to real-world. This is drastically different from way people use books.
16. If modelling semantic using software would be able to have side-effect in real-world why most people would not see software are real-world object? In the business world I already see software seen as some sort of effective machine tool which helps doing business.
17. I see how software could be seen as some sort of meta-science where we could attempt to describe or model how some industries works, and then based on that applied models create smaller off-springs which would be more manageable for specific organizations, but is there any domain experts which can do that kind of work in the world. We have example right now when global organizations create classification data, and then these data mutated in the industry according to understanding of the people who use data. I'm talking specifically about medicine, based on my experience,but this is should be applied to any domain where a lot of people working.
18. How your semantic modelling would account for probabilistic business processes, like these to which AI could be applied?
19. Semantic of what software should model?
20. When model would be created, what kind of factors this model would be able to predict? Money? Real-world effect in terms of products created? Utilization of people? Requirements for the users of software?
21. And more importantly, why Software Languages not just mere languages with specific population and culture associated with people speaking in that languages?
22. What if children can become bi-lingual where second language would be software language?

середу, 7 березня 2018 р.

What is Deep Learning technique really is and on what it is based?

Looking Stanford video with explanation of Deep Reinforcement Learning.
Initial thought is that they just explain me reinforcement learning + some critic techniques which correct already learning method.
There some links that suggests that I somewhat on the right track.
Here examples that such techniques are very dated. At least initial research from 199X. See here for list of publications

Examples in the Internet, from Stanford mostly related to Computer Vision. In that area all tasks very parallelizable (See Gaming as the driver for GPU, now image recognition tasks)
Neural Networks (NN) very easily parallelizable on GPU. So I understand why they are used in Deep Learning, but that's too simple to be breakthrough. NN itself looks for me like generalized polynomials.

This is what my common sense told me. But, since this is not mine strong area of knowledge, I don't trust my instincts here. I suspect me have some errors in my logic by lacking of knowledge. Maybe breakthrough is that they actually take well known pieces which was moderately working earlier and glue them together, and suddenly synergy effect + GPU magic make things works.

Other possibility, that I should look not on Stanford video, but on other peoples lectures.

Now my question is my following understand correct:

We have two agents which learn using reinforcement loop. One agent act as a actor which perform actions. Second act as a critique. All reward functions, and policy functions could be represented as NN.

четвер, 4 січня 2018 р.

Принципы обработки действий клиента

Каждое действие пользователя на сайте, будь-то нажатие не кнопку или переход по ссылке сейчас старается выполняться с помощью JavaScript на стороне браузера. Так как не всегда браузер может выполнить JavaScript, или например он еще не полностью загружен, то есть резон обеспечивать дублирование данного действия на сервере, например путем использования HTTP заголовка Content-Type.

Для стандартных запросов клиента будет использоваться Content-Type: text/html, который будет всегда возвращать HTML клиенту, для инициированных со стороны JavaScript запросов можно использовать Content-Type: application/json для получения JSON данных.

Примером может быть следующая страница: например у нас есть форма где мы используем автодополнение для заполнения города и есть кнопка которая запрашивает получение статистики по населению города.

Это реализовано примерно следующим образом - HTML форма где есть текстовое поле где вводится город и кнопка (input type="submit"). После загрузки страницы подгружается JS файл который подключает автодополнение для поля города. Нажатие на кнопку отправляет AJAX запрос, который дополнительно проверяет название города, и наличию статистики и в случае успеха возвращает статистику населения по городу, или в случае ошибки введенных данных возвращает сообщение об ошибке.

Все это отлично работает пока у клиента хороший интернет, или он часто посещает сайт и JS файл у него оказывается в кеше браузера. В случае если пользователь первый раз посещает форму, то в зависимости от скорости его интернета, вполне вероятно что он может успеть заполнить форму и нажать кнопку отправки до того как автодополнение будет полностью сконфигурировано, в результате выполнится обычное действие браузера по обработке HTML формы. В зависимости от того как настроена HTML форма это может выглядеть для клиента как
а) бездейстией (атрибут action не установлен)
б) отображение JSON ответа (форма настроена на отправку AJAX запроса)
в) обновление страницы (форма просто делает запрос на саму себя, и сервер это никаким специальным образом не обрабатывает)
я привел наиболее типичные ошибки, но разумеется могут быть и другие комбинации, как переход вообще на другую страницу из-за плохого копипаста.

Кроме плохого интернета, подобное действие можно выполнить при выключенном JavaScript в браузере, или если в коде произошла ошибка, и часть вашей программы не инициализировалась корректным образом.
Так или иначе, ни одно подобное поведение не сильно приятно пользователю сайта, и плохо влияет на его лояльность к продукту. Потому есть резон настраивать обработку форм таким образом, чтобы клиент получал максимально логичный результат, и если уже нажата кнопка запроса на форму, то сервер должен уметь обрабатывать такие запросы корректно.

По сути у нас получается 2 вида запросов - машино-читаемый и человеко-читаемый. В нормальном режиме работы приложение использует машино-читаемый формат запросов, например используя JSON, а в случае возникновения проблем, возвращаясь к человеку-читаемому формату HTML. Для поддержки этих двух сценарием можно использовать или два разных приложения, каждое из которых умеет работать со своим форматом, или попробовать использовать такую возможность формата HTTP  как указание формата содержимого - заголовок Content-Type. Тогда один и тот же адрес ресурса может обрабатывать оба формата.

Например отправка Content-Type: text/html приведет к управлению навигацией клиента полностью на стороне сервера, и будет использовать HTTP Status Code 302 совместно с Location: /redirect-url для перенаправления клиента на нужную ему страницу, которая и отобразит нужные ему HTML. В случае передачи Content-Type: application/json сервер возвращает JSON ответ и управление навигацией происходит с помощью JS на стороне клиента.

вівторок, 29 березня 2011 р.

Problems with Elastic Fox in FF4

 I was happy to know that Firefox team push new, 4-th version of FF which works faster and support HTML5 and many other great features. But unfortunately this release have one very small disadvantage - ElasticFox does not show background for pages. That's nothing wrong with FireFox itself, but because ElasticFox is used in my dayly job, and I already tweak ElasticFox earlier, I was decide fix this small quirck, which really annoys me.

Obiviously problem was easy to fix - you have to just add one line to the CSS which comes with ElasticFox and set non transparent background for the tag popup. That's all! :)

Short list of steps:

  1. Close FireFox.
  2. Open your FireFox profile, which is located in the %APPDATA%\Mozilla\Firefox\Profiles\ folder.
  3. Navigate to extensions\{2204c510-88f3-11db-b606-0800200c9a66}\chrome subfolder inside your profile.
  4. Make a backup of your ec2ui.jar and rename ec2ui.jar to ec2ui.jar.zip
  5. Inside archive, extract ec2ui.jar.zip\skin\classic\ec2ui\ec2ui.css file and add line
    popup { background-color: white; border: 1px solid threedshadow; }

    to the end of CSS file.
  6. Pack modified file back to ec2ui.jar.zip
  7. Launch Firefox and check how ElasticFox looks like. :)
Hopefully this is helps.

четвер, 18 листопада 2010 р.

Adding support for new instance types in Elastic Fox

Recently Amazon announce new instance types, but don't add support for these types in the ElasticFox. At least these changes not
Maybe you are interested too in adding support for t1.micro and
clustered version of instance types (cc1.4xlarge, cg1.4xlarge) to your
ElasticFox.

Here the steps you could do to enjoy working with ElasticFox and new Aamzon features:
  1. Close FF. Check that firefox.exe is gone from process list
    Kill if it will stay too long after closing FF.
  2. Go to C:\Documents and Settings\Application
    Data\Mozilla\Firefox\Profiles\
    Go inside XXXXX.default folder. This actually your FF profile.
  3. Than go deeper in the
    extensions\{2204c510-88f3-11db-b606-0800200c9a66}\chrome
    This folder should have file ec2ui.jar to ec2ui.jar.bak
  4. Make backup of the file
  5. Change extension to ZIP. Unpack ZIP archive to ec2ui_patched folder.
  6. Go to ec2ui_patched\content\ec2ui
  7. Open newinstancesdialog.js in your favorite JS editor. This is a
    file that represent New Instance dialog in ElasticFox.
  8. In the init function found block
    // Add the instance sizes based on AMI architecture
    if (this.image.arch == "x86_64") {
        typeMenu.appendItem("m1.large", "m1.large");
        typeMenu.appendItem("m1.xlarge", "m1.xlarge");
        typeMenu.appendItem("c1.xlarge", "c1.xlarge");
        typeMenu.appendItem("m2.xlarge", "m2.xlarge");
        typeMenu.appendItem("m2.2xlarge", "m2.2xlarge");
        typeMenu.appendItem("m2.4xlarge", "m2.4xlarge");
    } else {
        typeMenu.appendItem("m1.small", "m1.small");
        typeMenu.appendItem("c1.medium", "c1.medium");
    }
    
    Replace with following
    // Add the instance sizes based on AMI architecture
    if (this.image.arch == "x86_64") {
        typeMenu.appendItem("m1.large", "m1.large");
        typeMenu.appendItem("m1.xlarge", "m1.xlarge");
        typeMenu.appendItem("c1.xlarge", "c1.xlarge");
        typeMenu.appendItem("m2.xlarge", "m2.xlarge");
        typeMenu.appendItem("m2.2xlarge", "m2.2xlarge");
        typeMenu.appendItem("m2.4xlarge", "m2.4xlarge");
        typeMenu.appendItem("t1.micro", "t1.micro");
        typeMenu.appendItem("cc1.4xlarge", "cc1.4xlarge");
        typeMenu.appendItem("cg1.4xlarge", "cg1.4xlarge");
    } else {
    typeMenu.appendItem("m1.small", "m1.small");
        typeMenu.appendItem("c1.medium", "c1.medium");
        typeMenu.appendItem("t1.micro", "t1.micro");
    }
    
  9. Package content of ec2ui_patched folder as ZIP archive.
  10. Rename ZIP archive with patched version to ec2ui.jar and place it inside C:\Documents and Settings\\Application Data\Mozilla\Firefox\Profiles\\extensions\{2204c510-88f3-11db-b606-0800200c9a66}\chrome
  11. Launch FF and enjoy support for new instance types in ElasticFox.

вівторок, 28 вересня 2010 р.

Making work SAS 9.2 and Oracle 11

I have to make SAS talk to Oracle today. I'm not very familiar with these products yet, and I was very unhappy that SAS 9.2 don't want work with Oracle client 11.2.

I made a quick search and not found anything valuable that could help me from the first site.
I take a look at the log file and found that module sasora, which SAS/ACCESS used to communicate with Oracle, could could not load libclntsh.9.so. Do search what the it is and found that this is library from Oracle Client version 9.

Who know who is wrong Oracle developers which does not have common library which could be reused across different version of client, or SAS who make direct link to Oracle 9 client library and since when didn't update sasora, to match with new versions. Who cares? This thing happens and I have to figure out how to solve that.

I try find how to install Oracle client version 9, but didn't found it on official Oracle website. For sure maybe this installation exists somewhere in the Oracle Download Center, but seems that this is very aging version and Oracle try to forgate about it. So I do the same, cross finger and create libclntsh.so.9.0 as soft link to libclntsh.so.11.1.

So far, so good.

Quick and Dirty Fix:


function fix_sas2ora_link()
{
  ORA_HOME=/usr/lib/oracle/11.2/client64
  ln -s ${ORA_HOME}/lib/libclntsh.so.11.1 ${ORA_HOME}/lib/libclntsh.so
  ln -s ${ORA_HOME}/lib/libclntsh.so.11.1 ${ORA_HOME}/lib/libclntsh.so.9.0
}
Be very careful with such type of fixes, as nobedy know what happens.
Since I need this working today, I made decision leave with that.

Then couple hours after that I found on the SAS support forum page where described how to made quick fix that in more clean way.
http://support.sas.com/kb/37/613.html

Hurray, no need for dirty fixes any more.
Hopefully this is helps.

четвер, 16 вересня 2010 р.

Install CMake 2.6/2.8 on Fedora 8 in EC2 environment

I'm working with EC2 environment on public AMI that has preinstalled Fedora 8. Little bit old, but for most tasks, that I do, this is more than enough.

Week or two ago, I have to build C++ module, developed by third-party and place it to the EC2 instance. This module use CMake 2.6 for building, but EC2 environment has only CMake 2.4 as latest version that available through standard Yum repositories. Currently (as of September 2010) available version 2.8 of CMake, but I choose stick with version which source code required. This was mostly client requirements. After hour or so trying put downloaded package to standard location for binaries and documentation, I wrote small script, which hopefully would be helpful for others.

Here the content of script that do the job and install 2.6 version of CMake that available from CMake download page

Version for installing 2.6

#!/bin/bash

# Download CMake package
wget http://www.cmake.org/files/v2.6/cmake-2.6.4-Linux-i386.tar.gz
# Extract content of archive
tar -xf cmake-2.6.4-Linux-i386.tar.gz

chmod 755 cmake-2.6.4-Linux-i386/bin/*

# Copy files to target location
cp cmake-2.6.4-Linux-i386/bin/* /usr/bin/
cp -R cmake-2.6.4-Linux-i386/doc/* /usr/share/doc/
cp -R cmake-2.6.4-Linux-i386/man/* /usr/share/man/
cp -R cmake-2.6.4-Linux-i386/share/* /usr/share/

# Cleanup original archive and extracted files
rm -f -R cmake-2.6.4-Linux-i386
rm -f cmake-2.6.4-Linux-i386.tar.gz


Version for installing 2.8

#!/bin/bash

# Download CMake package
wget http://www.cmake.org/files/v2.8/cmake-2.8.2-Linux-i386.tar.gz
# Extract content of archive
tar -xf cmake-2.8.2-Linux-i386.tar.gz

chmod 755 cmake-2.8.2-Linux-i386/bin/*

# Copy files to target location
cp cmake-2.8.2-Linux-i386/bin/* /usr/bin/
cp -R cmake-2.8.2-Linux-i386/doc/* /usr/share/doc/
cp -R cmake-2.8.2-Linux-i386/man/* /usr/share/man/
cp -R cmake-2.8.2-Linux-i386/share/* /usr/share/

# Cleanup original archive and extracted files
rm -f -R cmake-2.8.2-Linux-i386
rm -f cmake-2.8.2-Linux-i386.tar.gz



P.S.
Still not very familiar with Linux, so if you know best way of arrange files to standard Linux locations other then copying and setting permission, please let me know.
Any feedback are welcome.