пятница, 15 декабря 2017 г.

"When Cultures Collide" by Richard D. Lewis - take #1

Just for myself, quotes from this great book.

Truth
"For a German and a Finn, the truth is the truth. In Japan and Britain it is all right if it doesn’t rock the boat. In China there is no absolute truth. In Italy it is negotiable."
 Contract
"To a Swiss, Scandinavian, American or Brit, a contract is a formal document that has been signed and should be adhered to. Signatures give it a sense of finality. But a Japanese businessperson regards a contract as a starting document to be rewritten and modified as circumstances require. A South American sees it as an ideal that is unlikely to be achieved but that is signed to avoid argument."
 Silence
“Those who know do not speak; those who speak do not know,” says an old Chinese proverb.
 Jokes
"In the United States, particularly, sarcasm, kidding and feigned indignation are regarded as factors that move the meeting along and help get more done in less time."

четверг, 14 декабря 2017 г.

Negotiations: One-Text Procedure

(From "Getting to Yes" book by Roger Fisher and William L. Ury)

Third party required.

  1. collect true interests of the negotiation parties on one sheet of paper
  2. prepare draft proposal and present to parties for criticism
  3. update proposal due to received feedback
  4. repeat from step 2 till no more critical ideas received
This gets to the point where all negotiation parties can say Yes or No.

Elements of Programming by A. Stepanov and P. McJones

You should not read this book.

I mean, not like other regular books, - from 1st page to last one. This book is good to read from table of contents. Look at it, pick up an interesting topic, and read it. And when you will encounter ununderstandable things - refer to first pages. These pages at the very beginning of book contains definitions and terms. This is a way I have enjoyed "Elements of Programming" and found it very useful.

вторник, 5 декабря 2017 г.

"Getting to Yes" book by Roger Fisher - marginalia


Negotiations and making agreements. Reading "Getting to Yes" in English and a little list of quotes to highlight ideas:

"How to get to yes without going to war"
"Negotiation as a field for academic and professional concern"
"Like it or not, you are a negotiator"
"Focus on interests, not positions"
"Separate the people from the problem"
"Participants are problem-solvers"
Use planning stage to generate ideas before negotiation will take place. This is about preparing a list of acceptable options.
During discussion stage it is good to come and understand the interests of other part.

"To find your way through the jungle of people problems, it is useful to think in terms of three basic categories: perception, emotion, and communication."

понедельник, 27 ноября 2017 г.

Cool book: Python for kids, in Ukrainian

This book is really cool for kids. Say no to Basic & Pascal at school labs! There is a Python and it is kind of fun. This book in Ukrainian language and it is amazing. It is easy to read and have a great big font.


Link to it: https://starylev.com.ua/python-dlya-ditey

вторник, 7 ноября 2017 г.

First 300 of "The Black Swan" by N. Taleb

Some summary (or recall) for pages #201-300.

Interesting fact #1 - Map is not a reality, even if someone will sit long time and look at it.

Interesting fact #2 - Small unknown pieces of data can impact a lot. Say we sure at 99,9% percents at first approximation. But after all iterations (it may be a lot of it to take in account all possible "actors/influencers" in system) - it may result 99,9% measurement error.

Interesting fact #3 - Fat Tony is cool, he lives by his wits.

пятница, 6 октября 2017 г.

First 200 pages of "The Black Swan" by N. Taleb

Actually this is summary for pages #101-200.

Interesting fact #1 - Hidden witnesses - we know how things are going only from "survived" witnesses/victors/heroes. And so why don't take in account % of losers.

Interesting fact #2 - Relying on fortune to much is bad strategy. Someone decide he is unique/lucky all the time.

Interesting fact #3 - To feel better - constant (even "micro") positive influences/purchases/news are better than One Big. And vice versa in case of negative - better to get One Big Bad issue. And not -$1 every day.

Interesting fact #4 - Better to always be prepared to minimize influence of Black Swan.

суббота, 30 сентября 2017 г.

Prime factors and RSA

So actually getting prime factors is not an easy task. And so why we rely on RSA and similar algorithms.

Now spend 5 minutes and read about:
a) Shor's algorithm: Wikipedia
b) IBM qubit experiments: Experimental realization of "Shor's quantum factoring algorithm using nuclear magnetic resonance"

And final part is comes from the google guys, who played with D-Wave processor. They have proved it is real thing and can compute: "What is the Computational Value of Finite Range Tunneling?"

In 2016 D-Wave have announced 2000-Qubit system and several sources says it is in fact 1k of qubits is good to deal with RSA.

четверг, 3 августа 2017 г.

First 100 pages of "The Black Swan" by N. Taleb

So it is interesting book, really. Just trying not to fall asleep reading it.

Interesting fact #1 - Lebanon is not part of the Near East, Lebanon is The Mediterranean’s

Interesting fact #2 - people likely tend to be more stressed loosing money (87'' black monday as an example). And even war is something less stressing.

Interesting fact #3 - Black Swan (capitalized) not a bird. It's unpredictable event with big influence, positive or negative. Financial, technical, cultural, social, no matter.

пятница, 28 июля 2017 г.

Internet of Things - Amazon tools and Python

Recording of my lightning talk on Pacemaker conference.

Covered high level of Python SDK for IoT services. To start it is no need for actual device even. Amazon gives an option to use grammatically emulated IoT device. This may be your python script, Flask application and so on.


пятница, 21 апреля 2017 г.

Ubuntu 6.10 under VMware Fusion

Occasionally found old Ubuntu 6.10 CD disk in my desk. These was sent for free some years ago by Canonical. I have used it as a tea cup holder for some time :)
And now just wonder does it still works and how this Ubuntu 6 used to look like.
Running it under VMware Fusion 7 results in freeze. One option helped me - in Compatibility I set hardware version to 7 (and removed camera and SATA cd from VM).

пятница, 17 марта 2017 г.

Async Python: real men, threads and twisted

Here is recording of my presentation on Pacemaker conference about asynchronous Python stuff: jobs, workers, twisted, threads and subprocesses. It is in Ukrainian language, and presentation itself is in English. Enjoy :)


среда, 8 марта 2017 г.

NDB admin panel for Google App Engine

Used github to find rain repo to answer someone's question. And noted NDB Admin repo (https://github.com/vsergeyev/ndbadmin). If you use Google App Engine with Python, it may be worth to look. It build with Django/Flask in mind.
One picture is better than page of words:

Or live Demo: http://ndbadmin-live.appspot.com/

Usage is straightforward, add Meta subclass into your Model definition.
Something like this:
class Item(ndb.Model):
    name = ndb.StringProperty()

    class Meta():
        def __init__(self):
            self.order_by = Item.name

Rain effect in Lua/Corona

Just noted comment on my old YouTube tutorial with sample of rain effect.
Code and original post was on my old blog, so. Thats cool it is a copy on github:
https://github.com/vsergeyev/Rain

So enjoy.


It is quite simple to use rain in your Corona SDK game:

local rain = require("rain")

rain.new(group, {})


Pause rain
----------

rain.pause()


Resume rain
-----------

rain.resume()

среда, 18 января 2017 г.

Wiki templates for HTML/JavaScript web app

This may be useful when one have legacy Wiki-formatted content and want to put it on new HTML layout/application.

As a starting point used wiki2html parser from Remy Sharp.

Here is quick working example on JSFiddle https://jsfiddle.net/v77s1d2x/


So to make this works, structure your HTML page for Wiki template in some kind of:

<div id="content">
    ... media wiki content ...
</div>

<script type="text/javascript">
    var content = document.getElementById("content");
    content.innerHTML = tohtml(content.innerHTML);
</script>

This may save a tons of time and be used to embed media Wiki blocks wherever you need in your web application.