This blog

I'm writing the blog in English because I type twice as fast this way than in Russian (yes I am improving...), and 90% of my friends and friends can read English any way. I answer comments in the same language they are posted.

I am trying not to post anything related to my employer, but if I do so, this expresses only my own views and does not represent an official position of my employer.

When I post about some technical topic which seems non trivial and is related to my employer's product, don't expect it to be inside information. If I post about it, it means that this info is already public. Usually I do not post any personal information or anything that is related to my family.

All photos are mine, and I allow anyone to copy, change, do anything you please with them. I don't post "friends only".

Useful tags are: software , idea , Deutschland, readlog, freediving and trip report

my work 20 years ago

20 years ago I started working for Nortel as a contractor. One of my first assignments was to write a script in C to automatically stress test creating tons of entries in a pre-SQL database (developed in 70s) that was storing a cellular network configs.

The database mixed data with code processing it, so each config had to be tested separately. The config I had to test was lawful intercept config. For every cell phone number that could be eavesdropped on, there should have been an agency name string and court order/secret order number attached.

So I added MI6 with secret order numbers beginning with 007, and KGB with secret order numbers beginning with 1937, and ran tests where most of cell subscribers were being listened to by KGB.

Daytrading question

Sometimes I gamble. Now is a great time for that, plenty of volatility. I don't use leverage so it is not very entertaining.

So far I like it, and earning a bit more than loosing on both ups and downs. But there is one thing that where I often err, and I am not sure why.
Here is my rookie question to more experienced traders:

I spend $1000 buying 100 shares at $10.00 each. In one hour, my sell price is at 10.05. I can close at $5 profit, but instead I move my stop loss to 10.02 and take profit to 10.10. In the following 10 minutes, price bounces between 10.03 and 10.09 few times, then it drops from 10.03 to 9.94. My stop loss is then triggered at 9.99, and I just lost $1 instead of earning $2.

The numbers above are not too fictional, small losses happen as described above with my trading style. I wonder if it is expected that the broker sells below my SL?

My stupid bug

I was recently working on a problem, where one of the performance metrics I measured was ~100x higher than expected. It is almost impossible to make a 100x optimization, unless something is severely broken...

In the end, it appeared to be my error. But it was not a measurement error, I triple checked my measurement code and it was correct.

The buggy part was printing the end result. I made a typo in printf format, "%ull" instead of "%llu", so it printed "ll" in the end. Then I mistook "ll" for "11" when reading, and this multiplied the result 100x. I was slightly curious why random performance readings always end with 11, but I still did not catch it. Only after I pasted the result to Excel to plot a graph I realized what went wrong.

This made it in my list of top 5 stupid programming errors I ever made :)

Coronavirus asymptomatic/immunity

I am following biorxive trying to find a publication about what makes asymptomatic covid carriers asymptomatic, or what makes people exposed to significal dose of the virus immune. So far most of articles are about treating the virus or managing patients in critical conditions. They are linked from my friends posts in lj, dw and facebook. Everyone is writing about CoVid now.

I have a first hand experience: my wife and me tested negative for antibodies. Why we tested? We did not have symptoms, but we were in contact with Covid19: 1.5 months ago my wife spent an hour in a small room talking with a colleague who was constantly coughing, and later he tested positive. Also in late March we spent 10 hours on a plane where half or the passengers were coughing.

We did not develop any symptoms - neither fever nor cough. There was still something.. I am a (lousy) freediver, and as swimming pools are closed, I can only train static apnoe. In late March my usual apnoe timing quickly went down from ~2m20s to ~40s. That was just a few days, and now it is slowly recovering at ~1m40s.

So what happened when we were exposed to the virus but didn't get sick? Was it not enough virus particles we inhaled or swallowed, so that they did not end up on ACE2 receptors they could invade? Was a result of a job well done by IgA2s? Or we had high IgG specific for another coronavirus and it still worked? I am sure I am missing couple of other options here, and my main question is what are these options, and what are the ways to increase the probability of these things to work.

On viruses

I was thinking about ergodicity in application to viruses like common cold, flue and like. I mean how "horizontal" probabilities (across population) correspond to "vertical" (temporal) probability for one person. I can only make experiments with one subject, so I performed two experiments.

1. It is said that flu vaccines make it highly unlikely to catch the current flue. Across population. My experiment was 7 vaccinated consecutive years and 9 unvaccinated (and counting). When vaccinated, I had flue 6 times, and when unvaccinated, got it once.
2. Usually common cold virus used to make my life uncomfortable for ~4-6 days. Three years ago I infected myself with a probiotic bacteria for nose, and after my immune system coped (that took ~5 days of high fever), I no longer have 4-6 days cold, now typical virus symptoms take just 2 days, and then I have ~5 days of bacterial symptoms that are much milder and do not interfere with my work and active life.

Obviously if it works for me, there is no guarantee that it scales.
I just wonder if second experiment interferes with first..

Amazon prices

Any idea why the same item on costs me 7% less than it costs my wife? We are using the same link, but see different prices... Of course I ordered it, but what the heck?