Маниакальный веблог » Разноеhttps://softwaremaniacs.org/blog/category/uncategorized/2020-12-31T16:20:44.650439-08:00ManiacИван Сагалаев о программировании и веб-разработкеhttp://softwaremaniacs.org/media/sm_org/style/photo.jpgStatus update: 2020
2020-12-31T16:20:44.650439-08:00https://softwaremaniacs.org/blog/2020/12/31/status-update-2020/Pretty sure I'm in the minority on this one, but this year was actually a good one for me! One of the best in a while, to be honest… Pandemic There's nothing good about this, and we all could do without it. But even then, being introverted probably helped me ...
<p>Pretty sure I'm in the minority on this one, but this year was actually a good one for me! One of the best in a while, to be honest…</p>
<p><a name=more></a></p>
<h2>Pandemic</h2>
<p>There's nothing good about this, and we all could do without it. But even then, being introverted probably helped me to fare better than most with the whole sitting at home thing. Also, nobody of my family and friends had died or had any severe health problems. So I'm filing it under the "could be worse" category.</p>
<h2>Job</h2>
<p>Unlike many, many people who lost their jobs this year I actually got a new one. I was lucky enough to wrap up my interviewing and even do an onboarding week in New York in the first week of March, right before the quarantine. I distinctly remember a conversation with the manager of my favorite breakfast place in NY about the virus: she was worried, and I was completely dismissive about the severity of the thing, saying that it's going to be gone soon like another flu, and the probability to catch it was really low. Yeah… Didn't take long to realize how wrong I was!</p>
<p>So anyway this is now my third job in a row where I'm working remotely from West coast on a New York based company :-) This time it's <a href="https://www.datadoghq.com/">Datadog</a>. Dealing with Python, TypeScript, React, Kubernetes, etc. Nothing out of the ordinary. But going from a household with no income to having two people with income obviously sweetens the deal quite a lot!</p>
<h2>highlight.js</h2>
<p>It was a long process, but now it is fair to say that maintenance of the library is finally out of my hands. I still own the domain name and do occasional merges and fixes to the site code which <a href="https://github.com/joshgoebel">Josh</a> asks me to, but I'm so very glad the project hasn't died with me losing the interest!</p>
<h2>Hobby project</h2>
<p>This is something that makes me really, really happy. After quite a few years of hiatus I made enough time to go back to programming something for myself. Not nearly as regular as I'd like to, but it is happening, and it's immensely satisfying! This time it's an Android app (<a href="https://softwaremaniacs.org/blog/2020/04/14/on-kotlin/en/">in Kotlin</a>, of course), and the one I wanted to make for myself for more than 5 years: a shopping list. It may sound totally lame but I don't care :-) And I'll definitely blog about it in some more details.</p>
<p>One thing that made it possible is that our school has smoothed out the remote learning process enough so that me and my wife don't have to babysit our 3-rd grader through the day. She does everything mostly by herself, so we have time to actually work during the day and I, consequently, have time to do other stuff in the evenings.</p>
<h2>Running</h2>
<p>This was the best year ever, literally! After recovering from yet another of innumerable injuries in the beginning of the year I'm back to running fast, and setting personal bests on both <a href="https://runkeeper.com/user/isagalaev/activity/1655232366">6</a> and <a href="https://runkeeper.com/user/isagalaev/activity/1657131263">13</a> miles. This is probably in part <a href="https://mastodon.social/@isagalaev/105375753211442724">due to the new running shoes</a>, too.</p>
<h2>Board games</h2>
<p class="picture right"><a href="https://www.flickr.com/photos/isagalaev/50101396818/in/dateposted/"><img src="/media/blog/game-bookshelf.jpg"></a></p>
<p>We used to play board games a lot with different friends and colleagues back when we lived in Moscow, but after everyone moved everywhere we pretty much only played once a year when we visited our oldest friends for the New Year celebration.</p>
<p>But this year we realized our kid is old enough to be interested in board games, so we went big on that and dedicated a whole room to it! We dug out the old games we hauled with us from Russia and we bought some new ones. And now we have some family fun most nights. I have to say, our girl is scary good at Munchkin!</p>
<p class=strong><strong>С Новым Годом!</strong>Server upgrade 2020
2020-07-28T12:57:01.310807-07:00https://softwaremaniacs.org/blog/2020/07/28/server-upgrade-2020/Regular readers of this blog have probably noticed that it is now served from a different IP address… Okay, okay, I'm kidding! This blog doesn't have any regular readers, of course. Anyway, what I'm trying to say is that I recently spent quite some effort to move all my stuff ...
<p>Regular readers of this blog have probably noticed that it is now served from a different IP address… Okay, okay, I'm kidding! This blog doesn't have any regular readers, of course. </p>
<p>Anyway, what I'm trying to say is that I recently spent quite some effort to move all my stuff — <a href="https://softwaremaniacs.org/">softwaremaniacs.org</a>, <a href="https://highlightjs.org/">highlightjs.org</a>, their supporting databases and, most importantly, my personal email — to a new and shiny <a href="https://www.linode.com/">Linode</a> instance under control of an up-to-date Ubuntu.</p>
<p>Here's the (heavily compressed) war story.</p>
<p><a name=more></a></p>
<h2>Ding!</h2>
<p>It all started with an email from <a href="https://letsencrypt.org/">letsencrypt</a> politely telling me my client software (certbot) must be too old as it uses an obsolete version of their protocol, and it's going to break when they drop support for it. Little did I know at that moment just how hairy a <a href="http://catb.org/jargon/html/Y/yak-shaving.html">yak</a> I was staring in the eyes…</p>
<h2>Steps and stumbles</h2>
<ul>
<li>
<p>Try upgrading the package via <code>apt</code>: no new versions available for this version of Ubuntu (I think it was 18.04).</p>
</li>
<li>
<p>Try upgrading Ubuntu (long overdue) via <code>do-release-upgrade</code>: no more versions of Ubuntu available for the 32-bit architecture.</p>
</li>
<li>
<p>Reach to Linode support asking why my 64-bit machine tells me it's 32 bit: get a few useful pointers revealing that my system is in fact a Frankenstein's monster: a 32-bit kernel with a 64-bit userspace. (By the way, Linode has the best support team!)</p>
</li>
<li>
<p>Figure there's no way to upgrade the mess in place: need to provision a new machine and build all the services from scratch moving data from the old machine. Django apps, HTTP configs, Postgres databases and all the mail.</p>
</li>
<li>
<p>Fire up a new instance, wait weeks for "when there's more time" to deal with it (you know how that ends).</p>
</li>
<li>
<p>Meanwhile, software running highlightjs.org really needs an upgrade to support its new release process (it's always node.js for some reason): realize I can do it relatively easy on the new server without touching softwaremaniacs.org (thinking of migrating mail gives me headaches).</p>
</li>
<li>
<p>Move entire highlightjs.org stuff in a semi-manual process, switch DNS, wait for the traffic on the old instance to die down in a day. Now I have two servers: really need to find more time to finish the transition!</p>
</li>
<li>
<p>Move entire softwaremaniacs.org stuff in a semi-manual process, but don't switch DNS: I can't just move my mail server in a similar way because unlike mostly read-only Web apps, I will have to be accepting mail on both hosts while DNS is expiring.</p>
</li>
<li>
<p>Anyway, need to set up a mail server on the new instance: turns out <code>mail-stack-delivery</code> package is not supported anymore. If you didn't know, <code>mail-stack-delivery</code> was a brilliant package maintained by Canonical that installed all packages needed for a personal mail server and then went ahead and <em>wrote all the configs for you</em>.</p>
</li>
<li>
<p>But fret not, there's now the <code>mail-server</code> <a href="https://askubuntu.com/questions/252056/should-i-use-tasksel-tasks-in-apt-or-install-regular-metapackages">task</a>, ostensibly doing the same: alas, it actually only installs <code>postfix</code> and <code>dovecot</code> but doesn't configure <em>anything</em>.</p>
</li>
<li>
<p>Work up courage to read the <a href="https://arstechnica.com/information-technology/2014/02/how-to-run-your-own-e-mail-server-with-your-own-domain-part-1/">3-part personal email howto on ArsTehnica</a> which I had opened in my browser for the past 80 years or so: realize it's opinionated, complicated and in places outdated (but still a good resource for orientation).</p>
</li>
<li>
<p>Educate myself on "postfix", "dovecot", "Maildir", "sasl", "starttls", "spamassassin", "milters", "sieve", "fail2ban", "spf", "dkim": I guess I now know why Canonical doesn't want to support an out-of-the-box solution anymore.</p>
</li>
<li>
<p>Set up mail, test the hell out of it by using my local <code>/etc/hosts</code> to point softwaremaniacs.org to the new server.</p>
</li>
<li>
<p>Set up a temporary relay from the old server to the new one: realize postfix is not okay with relaying mail to another postfix that <em>thinks it has the same name</em>.</p>
</li>
<li>
<p>Pretend the new server is called <code>new.softwaremaniacs.org</code>, switch DNS, wait for traffic on the old one to die down.</p>
</li>
<li>
<p>Finally successfully install <code>certbot</code> on the new server, obtain new certificates. They were about to expire in just two days!</p>
</li>
<li>
<p>Shut down the old server. RIP.</p>
</li>
</ul>
<h2>Outcomes</h2>
<ul>
<li>
<p>I now have a cleaner, simpler setup which I understand. My quarantined spam now ends up in a regular mail folder (before, I had to SSH onto the machine and dig through some obscure file names). </p>
</li>
<li>
<p>My outgoing mail has a better chance of reaching its destinations (but it's still an ongoing fight). </p>
</li>
<li>
<p>My mail server doesn't use weird custom ports, so it's easier to set up mail clients.</p>
</li>
<li>
<p>I'm getting less spam.</p>
</li>
<li>
<p>My certificates are not in the immediate danger of expiring.</p>
</li>
<li>
<p>My Python code is now using all the 3.8-isms I want! I even refactored quite a bit of site code, just for fun.</p>
</li>
</ul>
<h2>Next</h2>
<p>I feel like I need to write my own mail server setup guide… Oh well…Status update: 2018
2018-12-29T22:12:59.723581-08:00https://softwaremaniacs.org/blog/2018/12/29/status-update-2018/Hey, I almost managed an entire calendar year without a post! Not that I was ever adhering to any notion of schedule here, but I have to admit that lately I miss blogging more and more. It was nice to have a not-insignificant voice and be able to make some ...
<p>Hey, I almost managed an entire calendar year without a post! Not that I was ever adhering to any notion of schedule here, but I have to admit that lately I miss blogging more and more. It was nice to have a not-insignificant voice and be able to make some difference with things I used to care about, and still do.</p>
<p>Let's see if I can revive some activity here. No promises, of course…</p>
<p><a name=more></a></p>
<h2>Blog</h2>
<p>First of all, I did a slight restyling of <a href="/blog/en/">this blog</a>. It now uses a non-standard font face, the front page lost both the "Recent comments" section and the "Essential topics". I plan to bring the latter back when I figure out how I want it to look and devise an algorithm that would keep it filled with something interesting without me maintaining it by hand. Other plans include reworking categories, comments and simplifying the whole bilingual machinery.</p>
<p>But all of that is secondary. For now I'm happy that anyone coming to a post from an external link can see when the post is written and who wrote it.</p>
<h2>Work</h2>
<p>2018 wasn't a fun year for me at all. I had to quit my job at Shutterstock due to it turning more or less to shit, and even though I was lucky enough to be picked up by the people who quit before me to work at another company, AlphaSights, I'm still painfully trying to decide what I want to do with my professional life in the future. I'm a bit tired of being stuck in senior engineering roles where I can't really influence any strategic decisions. Also, being picky about morality, not wanting to commute every day and wanting to keep my hobbies limits my options pretty significantly. Capitalism sucks :-)</p>
<p>But hopefully I will resolve these problems one way or another before spiraling down into depression.</p>
<h2>Family</h2>
<p>My family is wonderful, can't wish for anything better, really!</p>
<p class="picture center"><a href="https://www.flickr.com/photos/isagalaev/41712958835/in/dateposted/"><img src="/media/blog/DSCF3590.jpg"></a>Status update: 2016
2018-10-26T17:39:01.073538-07:00https://softwaremaniacs.org/blog/2016/11/20/status-update-2016/I thought I'd post something for no reason… We're still living in Washington state, I'm still into programming, with much the same hobbies as before. However these days I actually work for money. The company is Shutterstock, and I'm a resident "refactorer" on one of the teams in Search. So ...
<p>I thought I'd post something for no reason…</p>
<p><a name=more></a></p>
<p class=right><img src="/media/blog/DSCF2812.jpg"></p>
<p>We're still living in Washington state, I'm still into programming, with much the same <a href="http://softwaremaniacs.org/about/en/">hobbies</a> as before. However these days I actually work for money. The company is <a href="http://www.shutterstock.com/">Shutterstock</a>, and I'm a resident "refactorer" on one of the teams in Search. So for the last few months I mostly write and re-write Python code. Which feels <em>scarily</em> comfortable. Scare is due to me understanding that from the point of view of self-development feeling comfortable is a road to nowhere. But I'm not scared too much, as it has only started and I'm constantly thinking of how to make my work life more difficult. I've been missing that for the past few years.</p>
<p class=left><img src="/media/blog/2016-07-30_05-00-41.jpg"></p>
<p>My employment is somewhat unusual because the company, though gladly accepting remote workers, still adheres mostly to New York working hours which results in a funny schedule for me living 3 hours later from it. So I enjoy doing my groceries on weekdays, and running, and an occasional beach trip! Work is work though, and it inevitably took time out of other things, and since my other priorities (also inevitably) lay with my family, the things I chose to sacrifice are <a href="http://softwaremaniacs.org/blog/category/rust/">Rust</a> and <a href="https://highlightjs.org/">highlight.js</a>. </p>
<p>The latter isn't actually <em>dead</em> though, thanks to the established contributor community providing patches at a rate no one of the core team has any hope to keep up with, and to the well-greased <a href="https://highlightjs.org/api/release/">release process</a>.</p>
<p>Speaking of which… The latest release of highlight.js was the first after a pretty long streak of completely automatic successful deployments which… didn't. The reason for it being me having updated the code of both highlightjs.org and softwaremaniacs.org to something resembling a current century setup. Projects are now running in their virtual environments, both use Django 1.10 and Python 3 (yes, I don't have Python 2 code on my server anymore). I took some cues from <a href="https://12factor.net/">The 12-factor App</a>, and my settings are less insane now. Also, the server can now survive reboots without assistance. And I moved it from London to US Easts coast, which is faster for me.</p>
<p class=right><img src="/media/blog/DSC_0013.JPG"></p>
<p>What else… Tried working on a Mac, didn't like it. There are <strong>two</strong> Thinkpad X1s on my desk right now! Both running Ubuntu. Started and paused learning guitar (again). I own a Les Paul if you're interested… Drive a car with a stick-shift, a Ford Fiesta ST. If you're a car nut, I advise you to indulge yourself with the new gig of Clarkson's and Co — <a href="https://www.amazon.com/The-Grand-Tour-Season-1/dp/B01J94A5GQ">The Grand Tour</a>. I watched the first episode with a happy grin on my face from the start to the very end! Also, it's good it's on Amazon, and I don't need to hunt torrents or buy some stupid subscription with a lot of TV I don't need. Disappointed with the Trump thing as everyone I know… in my echo chamber. But no despair, democracy should work out in the end!</p>
<p>As usually, hope to return to more or less regular writing… but who knows if and how. See ya! On being 36
2014-10-20T23:06:19.826000-07:00https://softwaremaniacs.org/blog/2014/10/20/on-being-36/This quote has made my day. Frédéric de Villamil in his Docker review: If I was still 25, the whole production would most certainly be full dockerized. At 36, I’m more reluctant to change everything for the latest hype. Not that I’ve became old and boring. But I’ve enough experience ...
<p>This quote has made my day. </p>
<p>Frédéric de Villamil in his <a href="https://t37.net/is-docker-ready-for-production-feedbacks-of-a-2-weeks-hands-on.html">Docker review</a>:</p>
<blockquote>
<p>If I was still 25, the whole production would most certainly be full dockerized. At 36, I’m more reluctant to change everything for the latest hype. Not that I’ve became old and boring. But I’ve enough experience to think twice before giving myself the opportunity to work 24/7 during 3 days to fix what I’ve just broken.</p>
</blockquote>
<p>Yes, that's why.HTTPS on highlightjs.org
2014-08-18T11:33:11.665000-07:00https://softwaremaniacs.org/blog/2014/08/08/https-highlights-org/I finally followed the crowd and got an SSL certificate for highlightjs.org. The canonical read on the issue seems to be "Private By Default" by Tim Bray. However, Tim's piece is somewhat theoretical, so I took some additional real-world perspective on Hacker News. The process wasn't terribly difficult, though whenever ...
<p>I finally followed the crowd and got an SSL certificate for <a href="https://highlightjs.org/">highlightjs.org</a>. The canonical read on the issue seems to be "<a href="https://www.tbray.org/ongoing/When/201x/2012/12/02/HTTPS">Private By Default</a>" by Tim Bray. However, Tim's piece is somewhat theoretical, so I took some additional real-world perspective <a href="https://news.ycombinator.com/item?id=8146670">on Hacker News</a>.</p>
<p><a name=more></a></p>
<p>The process wasn't terribly difficult, though whenever something involves config files problems are pretty much expected. Here's my experience.</p>
<h2>Products</h2>
<p>Apparently SSL comes in the form of branded products. For small-to-medium sites there seems to be two alternatives called PositiveSSL and RapidSSL which you can buy from quite a lot of places for wildly different prices. I ended up purchasing mine from my domain name company, <a href="https://namecheap.com/">Namecheap</a>. But <a href="http://www.ssls.com/">SSLs.com</a> sells them even cheaper, and I don't see anything wrong with it. I probably should've gone with them but I was to deep into my research and lost track of them.</p>
<p>The difference between PositiveSSL and RapidSSL is negligible, and there's no definitive answer to which is the best. It boils down to:</p>
<ul>
<li>PositiveSSL is cheaper.</li>
<li>PositiveSSL comes in the form of several files ("chained certificates") that you have to put manually into one file for your Web server's consumption. RapidSSL is apparently a single file.</li>
<li>RapidSSL works for a single domain name, PositiveSSL also works for the variant with "www.". (By the way, a wildcard variant that works for *.domain.name is about 10 times more expensive.)</li>
</ul>
<p>I didn't care for any of the technical differences so I went with the cheaper option.</p>
<h2>Registrations, activations, etc.</h2>
<p>After you buy your certificate the vendor usually provides a clear instruction for a multi-step setup process that involves among other things:</p>
<ul>
<li>
<p>Generating some stuff on your server to tell the certificate provider for whom to generate a certificate. This is called "CSR".</p>
</li>
<li>
<p>Getting a signed certificate in exchange for the CSR.</p>
</li>
<li>
<p>Putting the certificate somewhere on your server and pointing a Web server to it.</p>
</li>
</ul>
<p>My hosting provider — <a href="https://www.linode.com/">Linode</a> — has a good documentation for <a href="https://www.linode.com/docs/security/ssl/obtaining-a-commercial-ssl-certificate">generating a CSR</a> and a somewhat excessive one for <a href="https://www.linode.com/docs/security/ssl/ssl-certificates-with-nginx">setting up nginx</a>.</p>
<h2>Config caveats</h2>
<p>The docs say that "in some cases" you will have to concatenate a chain of certificates into a single file. This is exactly what you have to do with PositiveSSL. You get the whole of 4 files: a "root" certificate, two "intermediate" certificates and the one for your site. You can ignore the root one, as your system most probably already has it. And you combine the rest into a single file. The docs only mentioned having to combine two files instead of three but apparently my particular certificate chain was longer.</p>
<p>On the nginx side, most googleable guides tell you to simply add SSL-specific lines into your server's section:</p>
<pre><code>server {
server_name highlightjs.org;
listen 443 ssl;
ssl_certificate /path/to/combined.crt;
ssl_certificate_key /path/to/private.key;
# ...
}
</code></pre>
<p>This won't work for two reasons:</p>
<ul>
<li>
<p><s>First, if your followed the instruction for generating certificates, you made them visible only to the root user and thus unreadable to nginx. I corrected this by chgrp-ing them to "www-data" and chmod-ing to 640.</s> The root-only permissions work fine, I just messed up some other thing at that moment. Disregard.</p>
</li>
<li>
<p>Another problem is that trying to access your server via plain HTTP results in an infinite redirect to itself. To fix this you have to explicitly tell nginx what to do: either add <code>listen 80;</code> to the server's section to serve it both ways, or, as I did, unconditionally redirect plain HTTP requests to HTTPS:</p>
<pre><code>server {
listen 80;
server_name highlightjs.org;
return 301 https://highlightjs.org$request_uri;
}
server {
server_name highlightjs.org;
listen 443 ssl;
ssl_certificate /path/to/combined.crt;
ssl_certificate_key /path/to/private.key;
# ...
}
</code></pre>
</li>
</ul>
<p>I also wanted to redirect "www." prefix to the canonical URL for both protocols, so I needed another section:</p>
<pre><code>server {
server_name www.highlightjs.org;
listen 443 ssl;
ssl_certificate /etc/ssl/private/highlightjs.org.combined.crt;
ssl_certificate_key /etc/ssl/private/highlightjs.org.key;
return 301 https://highlightjs.org$request_uri;
}
</code></pre>
<p>It should refer to all the SSL stuff to support HTTPS. Though I have no idea why it works automatically for HTTP too :-).</p>
<p>And that was it.Девятый
2014-05-04T13:29:17.962000-07:00https://softwaremaniacs.org/blog/2014/05/04/nine-years/Моему блогу сегодня исполнилось девять лет, и я по случаю завёл себе нового лохматого яка, которого собираюсь теперь стричь: Хочу снова стать знаменитым! Больше блогить Выбрать время (сделано) Блог выглядит несолидно Комментарии архаичны Заменить OpenID на что-нибудь современное Убрать легенду Маркдауна WYSIWYG? Внешний вид устарел Переработать первую страницу Переработать архив ...
<p>Моему блогу сегодня исполнилось девять лет, и я по случаю завёл себе нового <a href="http://sethgodin.typepad.com/seths_blog/2005/03/dont_shave_that.html">лохматого яка</a>, которого собираюсь теперь стричь:</p>
<p><a name=more></a></p>
<ul>
<li>Хочу снова стать знаменитым!<ul>
<li>Больше блогить<ul>
<li><s>Выбрать время</s> (<strong>сделано</strong>)</li>
</ul>
</li>
<li>Блог выглядит несолидно<ul>
<li>Комментарии архаичны<ul>
<li>Заменить OpenID на что-нибудь современное</li>
<li>Убрать легенду Маркдауна</li>
<li>WYSIWYG?</li>
</ul>
</li>
<li>Внешний вид устарел<ul>
<li>Переработать первую страницу</li>
<li>Переработать архив</li>
<li>Перетащить /about/ на индекс, сделать английский дефолтным</li>
<li>Связать русские и английские версии статей взаимными ссылками</li>
<li>Обновить визуальный стиль</li>
</ul>
</li>
<li>Инструменты устарели<ul>
<li>Обновить Django, переехать на Python 3<ul>
<li>Загасить /forum/ и /soft/, убрать scipio, упростить /sanestat/</li>
<li>Проапдейтить оставшийся код</li>
</ul>
</li>
<li>WYSIWYG редактор постов, вид джанговской админки не мотивирует меня писать</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<p>На закуску — моя любимая цитата прошедшего года:</p>
<blockquote>
<p>Time is not something you have, time is something you make</p>
</blockquote>Желаю…
2013-12-31T11:55:31.229000-08:00https://softwaremaniacs.org/blog/2013/12/31/i-wish-you-9/Это был долгий и интересный год, в котором я узнал о себе много нового: быть папой оказалось непросто. И, в общем-то, вполне ожидаемо, что за год я написал в блог всего четыре поста, только два из которых были про программирование. Впрочем, в последние месяцы я таки смог вернуться к программированию ...
<p>Это был долгий и интересный год, в котором я узнал о себе много нового: быть папой оказалось непросто. И, в общем-то, вполне ожидаемо, что за год я написал в блог всего четыре поста, <a href="http://softwaremaniacs.org/blog/2013/01/14/bobuk-screencast-review/">только</a> <a href="http://softwaremaniacs.org/blog/2013/01/17/bobuk-screencast-refactoring/">два</a> из которых были про программирование. Впрочем, в последние месяцы я таки смог вернуться к программированию и вообще технологиям. Посмотрим, как оно дальше пойдёт.</p>
<p>Итак, желаю:</p>
<dl>
<dt>Новым родителям</dt>
<dd>Перестать ждать, когда свободное время вернётся само, а вместо этого научиться его планировать.</dd>
<dt>Стартаперам</dt>
<dd>Оставаться верными себе и не забывать, что главное — настойчиво делать что-то полезное и интересное, а не просто следовать за модой.</dd>
<dt>highlight.js</dt>
<dd>Вырасти и стать самым лучшим средством раскраски синтаксиса.</dd>
<dt>Блогерам</dt>
<dd>Не забывать, что то, что вы пишете, важнее того, где вы это пишете, и как оно выглядит. В этом смысле ничего не изменилось.</dd>
</dl>
<p>С наступающим и наступившим всех Новым Годом!Курица по-плаховски
2013-09-14T16:59:27.801000-07:00https://softwaremaniacs.org/blog/2013/09/14/chicken-plakhov/Это блюдо называется у нас в семье курицей "по-плаховски" вслед рецепту Андрея Плахова, который мне несколько лет назад показала жена. Недавно, заинтересовавшись готовкой, я этот рецепт форкнул и слегка подхачил. Больше маринада В оригинальном рецепте не указано количества курицы, но я на двоих делаю приблизительно полкило куриных бёдер (это без ...
<p class=center><img src="/media/blog/chicken-plakhov.jpg" width=100%></p>
<p>Это блюдо называется у нас в семье курицей "по-плаховски" вслед <a href="http://plakhov.livejournal.com/2682.html">рецепту Андрея Плахова</a>, который мне несколько лет назад показала жена. Недавно, заинтересовавшись готовкой, я этот рецепт форкнул и слегка подхачил.</p>
<p><a name=more></a></p>
<h2>Больше маринада</h2>
<p>В оригинальном рецепте не указано количества курицы, но я на двоих делаю приблизительно полкило куриных бёдер (это без костей). Грибов беру поровну с курицей. На это количество мне пришлось и увеличить количество маринада, и изменить соотношение: я беру по 4 столовые ложки соевого соуса и апельсинового сока. В конце готовки иногда добавляю немножко чего-то одного, если по вкусу кажется, что не хватает.</p>
<h2>Тёртый имбирь</h2>
<p>Я немножко усложнил вкус маринада, добавив туда тёртый имбирь, из 5 см кусочка примерно. Очень традиционная в азиатской кухне штука, и делает вкус ярче. Можно натереть ещё зубчик чеснока, но я пока не понял, нравится ли мне результат. Ещё как-то поэкспериментировал с мёдом. Это тоже традиционно, но мне здесь не понравилось.</p>
<h2>Сгущение</h2>
<p>Ещё мне хотелось сгустить маринад, чтобы он "обволакивал" кусочки. Для сгущения можно добавить чайную ложку крахмала или столовую ложку муки, но вместо этого я придумал интересный хак!</p>
<p>Гарниром сюда я всегда делаю рис, а сам по себе рис — это довольно много крахмала. Поэтому я даю рису покипеть в воде подольше (у меня это 8 минут вместо 6 для риса басмати), и его белый крахмальный отвар я как раз и заливаю в сковородку сразу после маринада. Потом это всё спокойно минут 15 кипит и тушится. Готовым считается, когда маринад превращается в тягучий вязкий соус.</p>
<p>К слову, эти самые минут 15 тушения — тоже важная штука, в это время кусочки курица и грибов собственно и промариновываются, тут спешить не надо. Крахмальной воды для этого нужен примерно стакан.</p>
<h2>Вешенки или шиитаке</h2>
<p>Поскольку блюдо имеет японские корни, я как-то попробовал в нём грибы шиитаке вместо вешенок. Мне понравилось больше, потому что дало более сильный вкус <a href="http://ru.wikipedia.org/wiki/%D0%A3%D0%BC%D0%B0%D0%BC%D0%B8">умами</a>. Но жена, вот, предпочитает вешенки… Чередуем :-).</p>
<h2>Приправленный рис</h2>
<p>Последний штрих — это приправление готового риса цедрой лайма, соком лайма (чуток), мелко нашинкованной кинзой и солью с перцем. Очень хорошо сюда подходит. Это совсем не я придумал, это из книжки <a href="http://www.amazon.com/Jamies-Food-Revolution-Rediscover-Affordable/dp/1401310478">Food Revolution</a> Джейми Оливера.Восьмой
2013-05-04T19:39:14.696000-07:00https://softwaremaniacs.org/blog/2013/05/04/eight-years/Начиная этот пост, я посмотрел на такой же годичной давности, и понял, что собираюсь написать примерно то же самое: в блоге затишье, но ему стукнуло восемь лет :-). Впрочем, в июле прошлого года я постарался начать писать почаще, и у меня это неплохо получалось — ровно до тех пор, как ...
<p>Начиная этот пост, я посмотрел на <a href="/blog/2012/05/04/seven-years/">такой же годичной давности</a>, и понял, что собираюсь написать примерно то же самое: в блоге затишье, но ему стукнуло восемь лет :-).</p>
<p>Впрочем, в июле прошлого года я <a href="http://softwaremaniacs.org/blog/2012/07/02/fighting-procrastination/">постарался начать писать почаще</a>, и у меня это неплохо получалось — ровно до тех пор, как я оказался занят заботами о новорождённой дочке. И сколько продлится нынешняя пауза, я не имею понятия, потому что это мой первый такой опыт. И очень интересный, надо сказать!Желаю…
2012-12-31T03:05:44.144000-08:00https://softwaremaniacs.org/blog/2012/12/30/i-wish-you-8/Теперь уже можно сказать, что самое главное желание, которое я себе загадал в прошлом году, сбылось — у нас появилась дочка! И это, конечно, самое главное событие, как бы банально это ни звучало. Потому поздравления в этом году имеют домашний оттенок: Дочери Быть лучше нас, достичь больше нас, наслаждаться жизнью, ...
<p>Теперь уже можно сказать, что самое главное желание, которое я себе <a href="http://softwaremaniacs.org/blog/2011/12/31/i-wish-you-7/">загадал в прошлом году</a>, сбылось — у нас появилась дочка! И это, конечно, самое главное событие, как бы банально это ни звучало. Потому поздравления в этом году имеют <em>домашний</em> оттенок:</p>
<dl>
<dt>Дочери</dt>
<dd>Быть лучше нас, достичь больше нас, наслаждаться жизнью, как мы!</dd>
<dt>Домоседам</dt>
<dd><a href="http://www.jamieoliver.com/us/foundation/jamies-food-revolution/recipes">Полюбить и научиться готовить.</a></dd>
<dt>Новым друзьям и коллегам в Штатах</dt>
<dd>Обосноваться!</dd>
<dt>Друзьям в Москве</dt>
<dd>Выбраться к нам в гости.</dd>
</dl>
<p>У нас тут до Нового Года ещё больше двадцати часов, поэтому, у кого раньше настанет, предупредите, если в этот раз с ним будет чего не так :-).Scientists, engineers and teachers
2017-11-05T12:47:16.583140-08:00https://softwaremaniacs.org/blog/2012/08/08/scientists-engineers-teachers/While working with people who write code I keep noticing three vaguely defined but nonetheless distinct "roles", or "styles of thinking", or "behavioral patterns", or "skill sets" — I don't really know how to call this classification per se, but I came up with a descriptive name for each class. ...
<p>While working with people who write code I keep noticing three vaguely defined but nonetheless distinct "roles", or "styles of thinking", or "behavioral patterns", or "skill sets" — I don't really know how to call this classification per se, but I came up with a descriptive name for each class. </p>
<p>I wonder if other people had similar impression.</p>
<p><a name=more></a></p>
<h2>Scientists</h2>
<p>Scientists research the field before starting to write code, devise a mathematically correct solution and then try to implement it as true to the model as possible. Along the way they don't care about readability, maintainability, performance or architectural beauty and usually end up with a mathematically correct spaghetti code. Which is not to say that it is immediately usable because scientists hate to work around ugly real-world cases that don't fall perfectly into their model.</p>
<p>Their understanding of things is based on scientific proof rather than on intuition which allows them to solve extremely complex problems where human intuition doesn't work well.</p>
<p>They are good at math and seriously consider it a perfectly understandable language to explain their solutions to others.</p>
<h2>Engineers</h2>
<p>Engineers work by iteratively cooking up an imperfect but working solution and improving it watching how it behaves. They consider the solution "correct" when it complies to tests covering an arbitrary subset of use cases. Though they actually use the word "correct" as a shorthand for "ready to be made even more correct". Likewise, when they say "all" or "nobody" they usually mean "most" and "few".</p>
<p>To work with the notion of correctness as a <em>process</em>, rather than a <em>state</em>, they care very much about programming languages, tools and coding methodologies to produce beautiful maintainable code.</p>
<p>While trying to explain their solutions to others they tend to drown in the details of implementation precious to their heart, losing the big picture and skipping reasoning.</p>
<h2>Teachers</h2>
<p>Teachers aren't as fluent in the realm of formal logic as scientists are, nor can they achieve the magical level of craftsmanship endemic to engineers. They are usually content with the broad understanding of how things work and quickly lose interest in endless refinement of a product to perfection, preferring instead to learn something new.</p>
<p>The unique skill of teachers is empathy — the ability to step into another person's shoes and understand how they think. This makes them able to explain things to other people, as well as understand explanations made by scientists and engineers. They are good at teaching (obviously) but also at writing documentation, talking on behalf of the team and <a href="http://softwaremaniacs.org/blog/2012/07/19/hiring-wrong/en/">hiring people</a>.</p>
<p>Teachers posses a specific feeling of how much they can get sloppy with facts and deviate from truth to achieve better understanding of their explanation.</p>
<h2>Random corollaries</h2>
<ul>
<li>
<p>An ideal start-up team consists of a scientist and an engineer whose strengths and weaknesses complement each other very well. They don't need a teacher from the start simply because there's no one to teach yet.</p>
</li>
<li>
<p>A team of scientists starts building a system with a barely useful but already complicated implementation, while a team of engineers starts with a simple ("lightweight") code base that mostly works but probably has drastic data-loss bugs all over the place. Both teams evolve their systems: scientists make it easier to use while engineer cover remaining use-cases. Over time their systems become pretty much functionally equivalent but engineers still have the advantage in that their system becomes usable sooner.</p>
</li>
<li>
<p>Scientists are invaluable to engineers because they can prove that something just can't exist and save engineers from desperately chasing an unrealistic ideal. A good example is a <a href="http://www.julianbrowne.com/article/viewer/brewers-cap-theorem">CAP theorem</a> that finally relieved engineers from trying to build 100% consistent and 100% available distributed systems. They probably still need teachers to explain this to management.</p>
</li>
</ul>
<h2>Mixing of skills</h2>
<p>As in role-playing games, these roles are by no means mutually exclusive: they are inclinations rather than limitations. A really experienced scientist can be a better engineer than a "natural" engineering rookie.Where's that future everyone is talking about?
2012-08-03T08:31:05.943000-07:00https://softwaremaniacs.org/blog/2012/08/02/where-is-that-future/I'm guilty of it myself… But sometimes I feel this supposed "future" is a little bit farther than I'd like it to be. I can't tell any device to remind me to turn on my noisy dishwasher when I finished watching TV. Nothing is going to boil my kettle 5 ...
<p>I'm <a href="https://twitter.com/isagalaev/statuses/20118182555553793">guilty of it myself</a>… But sometimes I feel this supposed "future" is a little bit farther than I'd like it to be.</p>
<ul>
<li>I can't tell any device to remind me to turn on my noisy dishwasher <em>when I finished watching TV</em>.</li>
<li>Nothing is going to boil my kettle 5 minutes before I get up to be ready for the morning tea.</li>
<li>Neither my car, nor my phone can build my navigation route through a gas station when I'm low on gas.</li>
</ul>
<p>It's especially disappointing when you know that we're actually <em>almost there</em>…</p>
<p><a name=more></a></p>
<h2>Dishwashers and TVs</h2>
<p class="picture right"><img src="/media/blog/apple-tv.jpg"></p>
<p>OK, it's not about a dishwasher, actually. The problem of it being noisy is best solved by having a silent dishwasher (most of them now are) that's able to turn itself on in the dead of the night or when nobody's home and use just enough water and detergent to do the job. But that's not the point. The point is that I want every device in the house to have a two-part API: a set of actions, akin to Android Intents, and a set of events, that they would broadcast to every other device through the network, akin to Linux DBus. And I want my phone or a tablet in a dock on the wall to communicate with those.</p>
<p>What I don't want, is a limited slow expensive centralized house-centric device that would lock me into appliances from a single vendor which will never update their software. Though this is exactly what usually happens <em>before</em> an alternative solution using open protocols is mature enough to be usable.</p>
<h2>Boiling a kettle</h2>
<p class="picture right"><img src="/media/blog/nest-thermostat.jpg"></p>
<p>A similar thing is already happening: the <a href="http://www.nest.com/">Nest</a> thermostat tries to warm up or cool down your house before you wake up or get home from work. But it determines those times <em>statistically</em>. And it <a href="http://www.amazon.com/review/RA3CGM9WKSW47/ref=cm_cr_pr_viewpnt#RA3CGM9WKSW47">sucks</a> for many reasons, one of them being that many people just don't live by a schedule. And you know what? My phone already knows <em>exactly</em> when I'm going to get up. I can easily imagine a "Start breakfast" button alongside the usual "Snooze" and "Dismiss". My phone also knows when I'm leaving work and how long it would take to drive home.</p>
<p>All this useful knowledge is sorely underused.</p>
<h2>Navigating through a gas pump</h2>
<p class="picture right"><img src="/media/blog/myford-touch.jpg"></p>
<p>This one is probably the easiest. It doesn't require a universal event/intent API, it just a matter of my car talking to my phone a little bit smarter than it is now. My Ford Fiesta can already ask Pandora in my phone to thumb-up a song when I say so. It shouldn't be that hard for it to inform my phone about immediate MPG and the amount of fuel left (it actually can do that, just not out of the showroom). Then Google Navigation could use it to plan and update the route.</p>
<p>But I'm afraid it's not going to happen any time soon. Because car makers seem to fancy the idea that <a href="http://www.youtube.com/watch?v=WyBO32jz7Vg">the car itself should have brains</a> and should control your phone, your house and "the cloud". </p>
<p>It'll never work. </p>
<p>A company whose core expertise is making cars will never achieve the level of quality at which software ecosystems are designed and produced at Apple, Google or Microsoft. When Apple and Google do photo realistic 3D maps, a typical in-car satnav features an ATARI-style graphics, slideshow frame rate and a baroque on-screen keyboards that make you wonder if you get to you destination faster by not bothering with entering the address.</p>
<p>Please, guys, just make your car a reliable appliance with rich and open APIs and let programmers do the rest!</p>
<h2>When?</h2>
<p>Future is almost here and we'll get there eventually. But people charging us money for getting there just insist on making the way longer.Microsoft Surface
2014-01-18T00:20:56.721000-08:00https://softwaremaniacs.org/blog/2012/07/06/microsoft-surface/Среди первых — в основном, одобрительных — реакций на представление Microsoft Surface меня заинтересовало то, что некоторые выражались в том духе, что, мол, никаким iPad-киллером он не выглядит, и вообще не очень понятно, кому такая штука может быть нужна. У меня же такого вопроса не возникло совсем, и целевая аудитория ...
<p>Среди первых — в основном, одобрительных — реакций на представление <a href="http://www.microsoft.com/surface/en/us/default.aspx">Microsoft Surface</a> меня заинтересовало то, что некоторые выражались в том духе, что, мол, никаким iPad-киллером он не выглядит, и вообще не очень понятно, кому такая штука может быть нужна. У меня же такого вопроса не возникло совсем, и целевая аудитория кажется очевидной. </p>
<p>Попробую проартикулировать.</p>
<p><a name=more></a></p>
<p class="picture right"><img src="/media/blog/ipad-knees.jpg"></p>
<p>Если вы обычно пользуетесь iPad так, как это показывается в рекламе — полулёжа, держа его на коленках, браузя веб — то в Surface увидеть смысл и правда трудно. Железо — <a href="http://blog.laptopmag.com/ipad-vs-microsoft-surface-tablet-specs-compared">сравнимое</a>, а то и похуже (что там с батарейкой, почему цифры не названы?) Windows RT или Windows 8 могут быть сколь угодно красивыми, но мобильных приложений под них сильно меньше, чем в AppStore. Обложка-клавиатура? Не так уж и часто она нужна, чтобы это давало ощутимое преимущество. Так в чём смысл?</p>
<p>Дело в том, что Surface придумали не для вас. Его придумали для людей, которые хорошо себе представляют, почему iPad им не подходит. Это нынешние пользователи лаптопов, которым нравится иметь полнофункциональную ОС, где работают любые приложения, и которые набирают много текста, будь то активная переписка, написание статей в журналах или программирование. Однако проблема со многими современными лаптопами в том, что они в некоторых вещах сильно проигрывают таблетам: у них нет GPS, нет кучи датчиков, они, как правило, заметно тяжелее и больше, и батарейку едят гораздо сильней, даже когда не делают ничего умного. Например, в качестве игровой машинки таблет выглядит куда как интересней.</p>
<p>Вот эту задачу Microsoft, по-моему, и пытается решить. </p>
<p class=strong><strong>Surface — это не таблет с прилепленной клавиатурой, а рабочий лаптоп, агрессивно избавленный от традиционных недостатков, который время от времени может служить и таблетом.</strong></p>
<p>Угадали ли они с задачей, есть ли такая ниша на рынке, и насколько она велика — никто не знает (хотя многие думают, что знают). Поиск ниш между условно телефонами и условно настольными лаптопами происходит уже какое-то время и только расширяется. Пионером был Asus Eee PC, потом был iPad, потом вагон практически одинаковых Android-таблетов, накрывающих все размеры от 5" до 11", здесь же "ультрабуки" а-ля MacBook Air. Здесь же и незаметная до сих пор группа трансформеров таблет-лаптоп, в которую и пришёл Microsoft (и всех разогнал™). Показательно также, что и Surface выдан нам в двух вариантах: "более таблет" с Windows RT и "более лаптоп" с Windows 8.</p>
<p>Думаю, года через три мы будем куда лучше представлять, какие идеи оказались удачными, а какие нет. К слову, я сам болею за "ультрабуки". С дешевением Flash-памяти и развитием облачных решений смысла в тяжёлых ноутбуках почти не осталось. В то же время, такой "хлипкой" штукой, как Surface, кажется, неудобно будет пользоваться без стола. Я вот прямо сейчас "активно использую клавиатуру", сидя в кресле с лаптопом на коленках.</p>
<p>Кстати, во время представления Surface Стив Балмер <a href="http://www.engadget.com/2012/06/18/microsoft-major-announcement-livelog/">сделал одно историческое заявление</a> (в 4:18):</p>
<blockquote>
<p>Мы полагаем, что любое взаимодействие человека и машины можно сделать лучше, если
каждый его аспект, железо и софт, рассматриваются вместе.</p>
</blockquote>
<p>Прекрасно работающий результат этого подхода уже давно ярко демонстрирует Apple. Microsoft с PC так не работала <em>никогда</em>, отдавая производство всего железа OEM-производителям. Те же давно и настойчиво демонстрируют, что делать что-то красивое, инновационное и качественное им сильно менее интересно, чем производить ворох цветного ширпотреба и "сегментировать потребителей" на всё более оторванные от реальности группы.</p>
<p>Правда, то, что Microsoft сделала сейчас, больше похоже на то, что Google делает с Андроидом, выпуская периодически штучные "референсные" устройства, на которых производители должны равняться. Впрочем, мне кажется, что это не сильно работает у Google, и не заработает у Microsoft. И если им хочется что-то делать хорошо, то в итоге придётся <strong>всё</strong> делать самим. (Эх ещё бы в Canonical то же осознали…)Борьба с прокрастинацией
2013-05-04T19:23:21.860000-07:00https://softwaremaniacs.org/blog/2012/07/02/fighting-procrastination/С момента, как я перестал регулярно ходить на работу, прошло довольно много времени. И хотя пауза мне была очень даже нужна, она дала и отрицательный эффект — я отвык работать головой. Многим, наверное, знакомо это состояние, когда все благие намерения и чудесные идеи наталкиваются на невидимую стену бессилия заставить себя ...
<p>С момента, как я перестал регулярно ходить на работу, прошло довольно много времени. И хотя пауза мне была очень даже нужна, она дала и отрицательный эффект — я отвык работать головой. Многим, наверное, знакомо это состояние, когда все благие намерения и чудесные идеи наталкиваются на невидимую стену бессилия заставить себя начать это делать, как только садишься к компьютеру. И вместо этого сидишь и тупо браузишь интернет целыми днями.</p>
<p>Сегодня я начал с этим бороться.</p>
<p><a name=more></a></p>
<p>Каждый будний день я выделяю себе два часа (с 3 до 5, если кому интересно), в которые буду заниматься написанием постов в блог. Задача не сложная, но всё же вполне себе творческая. Надеюсь таким образом заново приучить мозг включаться периодически в работу и концентрироваться на одной задаче хоть сколько-нибудь продолжительное время.</p>
<p class="picture right"><img src="/media/blog/dcdnet-plan.png"></p>
<p>Способ вряд ли нов, и у него, может быть, даже есть какое-нибудь умное название, я не выяснял. Я лишь знаю, что это неплохо работает персонально для меня. Весной 2006 года, когда я работал над <a href="http://dcdnet.ru/">dcdnet.ru</a>, я написал себе почасовой подробный план, работал каждый день по 4 часа, и каждый вечер подправлял план в соответствии с тем, что сделано, и с тем, какие новые знания о задаче появились. В общем, всё как у Спольски в "устаревшей" <a href="http://www.joelonsoftware.com/articles/fog0000000245.html">Painless Software Schedules</a>.</p>
<p>Это был один из самых продутивных периодов в моей профессиональной карьере. А соответственно, и один из самых приятных, потому что нет для программиста большего кайфа, чем наблюдать реальные результаты своей работы. </p>
<p class=note><small>Также этот опыт убедил меня, что люди, утверждающие, что творческую работу планировать невозможно, либо просто серьёзно не старались этого делать, либо не так уж и хороши в своём деле, как думают. Впрочем, это совсем отдельная тема…</small></p>
<p>"Побочным" результатом моего усилия должны стать собственно новые посты. Конечно, они не будут появляться каждый день: некоторые требуют куда больше двух часов на написание. Но черновиков у меня завалялось достаточно. Про MS Surface, про судьбу OpenID, про то, как Facebook ломает веб, про ролевые модели карьеры технаря, про найм программистов, а также надо, наконец, написать завершающую ретроспективную статью для "<a href="http://softwaremaniacs.org/blog/category/primer/">Учебника</a>". </p>
<p>Посмотрим, как оно выйдет :-).Седьмой
2012-05-04T23:56:25.605000-07:00https://softwaremaniacs.org/blog/2012/05/04/seven-years/В блоге у меня всё довольно тихо последний год, поэтому вместо полноценного юбилейного поста считайте это просто техническим объявлением о том, что блогу сегодня минуло семь лет. Ура! Я вполне доволен текущим состоянием дел, когда у меня есть место, куда можно иногда написать что-то, что кажется достаточно важным. А бо́льшая ...
<p>В блоге у меня всё довольно тихо последний год, поэтому вместо полноценного юбилейного поста считайте это просто техническим объявлением о том, что блогу сегодня минуло семь лет. Ура!</p>
<p>Я вполне доволен текущим состоянием дел, когда у меня есть место, куда можно иногда написать что-то, что кажется достаточно важным. А бо́льшая часть моей менее значимой онлайн-активности происходит сейчас в <a href="https://twitter.com/isagalaev">Твиттере</a>.</p>
<p>Однако, я всё же хочу спросить у вас одну вещь. Как вы относитесь к идее оторвать отсюда собственную систему комментирования и оставить в качестве средства реакции только внешние ссылки и личные email'ы? Кажется, сейчас это модно…Hacked retweet spam
2012-03-23T12:05:30.387000-07:00https://softwaremaniacs.org/blog/2012/03/23/hacked-retweets-spam/This morning I woke up to find that someone or something has retweeted spam messages on behalf of my Twitter account. Some of my followers alerted me about it (thank you!) and here are my thoughts on suggestions as to what might be the reason: This is not a personal ...
<p>This morning I woke up to find that someone or something has retweeted spam messages on behalf of my Twitter account. Some of my followers alerted me about it (thank you!) and here are my thoughts on suggestions as to what might be the reason:</p>
<p><a name=more></a></p>
<ul>
<li>
<p>This is not a personal or even targeted attack since many people were affected and some of the victims are silent accounts with no tweets (apart from those from spammers) and only a handful of followers.</p>
</li>
<li>
<p>I'm pretty sure it doesn't have anything to do with third-party app access since all the retweets were marked in the Twitter UI as coming from "web". I'm inclined to believe this field since it is derived from the authorization method (a browser cookie or an app's client_id) rather than provided by the user.</p>
</li>
<li>
<p>If this would be a CSRF vulnerability then it would have worked at the time when I was clicking or visiting something on the Web. However all (or at least 3 out of 4) retweets happened when I was sound asleep. As was my laptop, for that matter.</p>
</li>
<li>
<p>I never submitted my Twitter password to any web site apart from Twitter itself. Here you have to take my word for it but I'm pretty sure on this one. The only exceptions would be the official Twitter app for Android and Ubuntu's Gwibber that as far as I know only exchanges the password for an OAuth token and doesn't keep it further.</p>
</li>
<li>
<p>The only working hypothesis I have right now is that my password was stolen from some other hacked service that was storing passwords in clear text. I know that sharing passwords between services is a bad practice but it's how it is. </p>
</li>
<li>
<p>Another thing supporting this hypothesis is that after I changed the password spam has stopped. I can't verify if it happened anywhere else after that.</p>
</li>
</ul>
<p>The Twitter itself is silent on the issue and I don't know whom to ask about it. Their <a href="https://support.twitter.com/groups/33-report-a-violation">Report Violation</a> page seems to be designed to educate people how to leave them alone.Lumix GH2
2012-02-12T04:41:00.626000-08:00https://softwaremaniacs.org/blog/2012/02/11/gh2-vs-g1/As a birthday present this year I upgraded my old and proven G1 to the new and powerful GH2. I've got the G1 3 years ago (also as a birthday present from my wife) and it was the first µ4/3 camera on the market. Though it was a promising system ...
<p>As a birthday present this year I upgraded my old and proven <a href="http://www.dpreview.com/reviews/panasonicdmcg1/">G1</a> to the new and powerful <a href="http://www.dpreview.com/reviews/PanasonicDMCGH2/">GH2</a>. </p>
<p class="center picture"><img src="/media/blog/m43.png"></p>
<p>I've got the G1 3 years ago (also as a birthday present from my wife) and it was the first µ4/3 camera on the market. Though it was a promising system most of its potential wasn't realized at that time. It had only two basic lenses and the performance in low light was lousy. But since then the system has come a long way.</p>
<p><a name=more></a></p>
<h2>Testing low light performance</h2>
<p>The main reason why I wanted the GH2 was a new 16 megapixel Panasonic sensor that should have fixed low light performance. While the old sensor was barely able to produce a good picture at ISO 800 the new one promised a perfectly acceptable image at ISO 1600 and a somewhat bearable — at ISO 3200.</p>
<p>Let's see (click for full images):</p>
<figure class=center>
<a href="/media/blog/g1-iso3200.jpg"><img src="/media/blog/g1-iso3200-thumb.jpg"></a>
<figcaption>G1 at ISO 3200, 100% crop</figcaption>
</figure>
<figure class=center>
<a href="/media/blog/gh2-iso3200.jpg"><img src="/media/blog/gh2-iso3200-thumb.jpg"></a>
<figcaption>GH2 at ISO 3200, 100% crop</figcaption>
</figure>
<p>These two images have been shot in a fairly dark room with a tele 45-200 lens at the maximum zoom at the widest possible aperture of 1/5.6 and the slowest shutter speed of 1/13 sec at which I'm still able not to blur the picture while shooting from hands. </p>
<p>All in all I'm pretty impressed with the level of detail that GH2 can manage in these extreme conditions.</p>
<h2>Real-world difference</h2>
<p>Granted, the previous example, while good for demonstration, is not very real: I could "fix" the problem by just turning on the light in the room :-). However I can remember a couple of recent situations where I really could use a more sensitive sensor.</p>
<p>Look at this <a href="https://twitter.com/#!/isagalaev/status/111507007231639553/photo/1">shot from the latest DjangoCon</a>. It's blurry because it's hard to shoot moving people from a long distance using 1/6 sec shutter speed. If I could shoot at ISO 3200 back then I could afford a much more forgiving 1/30 sec.</p>
<p>Another example is this whole <a href="http://fotki.yandex.ru/users/jim1537/album/129885/">Christmas lights set</a>. I was shooting from a moving car and anything slower than 1/50 sec was guaranteed to be blurry. And at this speed and ISO 800 all pictures were hopelessly underexposed and required a huge amount of post-processing. And even after that they're still full of noise.</p>
<h2>Other improvements</h2>
<p>I've only played with GH2 for half a day and didn't do any serious shooting but I already love some new things about it:</p>
<ul>
<li>both the viewfinder and the LCD screen are more responsive and have bigger resolution</li>
<li>choosing the focus point by touching the LCD screen is super convenient</li>
<li>focusing speed is much faster</li>
<li>it can shoot HD video with either the built-in or an external microphone</li>
</ul>
<h2>Why not Nikon/Canon/Sony… whatever DSLR</h2>
<p>Judging by <a href="http://www.dpreview.com/reviews/PanasonicDMCGH2/">the review at dpreview.com</a> GH2 is pretty similar in quality to, say, Nikon D7000. The price is similar too. But for me the decision was simple: I already have three µ4/3 lenses and changing just a camera body was way cheaper than buying similar lenses for the new system.Желаю…
2011-12-30T23:16:32.191000-08:00https://softwaremaniacs.org/blog/2011/12/30/i-wish-you-7/Чем дольше я сижу в своём "творческом отпуске", тем меньше мне хочется думать про компьютеры. И это чудесно! Поэтому моё ежегодное поздравление будет сегодня совсем не связанным с профессией. Россиянам Победить! Американцам Успешно провести Гран-При Техаса. Автопроизводителям Больше электрических машин, хороших и разных. Всем людям компьютерных профессий Хорошо отдохнуть. … ...
<p>Чем дольше я сижу в своём "творческом отпуске", тем меньше мне хочется думать про компьютеры. И это чудесно! Поэтому моё ежегодное поздравление будет сегодня совсем не связанным с профессией.</p>
<dl>
<dt>Россиянам
<dd>Победить!
<dt>Американцам
<dd>Успешно провести Гран-При Техаса.
<dt>Автопроизводителям
<dd>Больше электрических машин, хороших и <em>разных</em>.
<dt>Всем людям компьютерных профессий
<dd>Хорошо отдохнуть.
</dl>
<p>… и есть ещё одно желание личного характера, которое я, с одной стороны, не могу не загадать, а с другой — и опубликовать его нельзя. Поэтому пусть оно останется тайным и секретным :-).</p>
<p>С Новым Годом!Демократия и выборы
2011-11-27T21:22:02.226000-08:00https://softwaremaniacs.org/blog/2011/11/27/democracy-and-elections/Пост навеян дискуссией в Твиттере на тему "ну и за кого же из этих уродов голосовать". Дискуссии в Твиттере редко бывают понятными, а тема мне кажется достаточно важной и интересной, чтобы про неё поговорить подробно, даже учитывая, что я никогда тут не писал о политике. Я постараюсь изложить по-русски и ...
<p>Пост навеян дискуссией в Твиттере на тему "ну и за кого же из этих уродов голосовать". Дискуссии в Твиттере редко бывают понятными, а тема мне кажется достаточно важной и интересной, чтобы про неё поговорить подробно, даже учитывая, что я никогда тут не писал о политике.</p>
<p>Я постараюсь изложить по-русски и применительно к современным российским реалиям то, что сам осознал достаточно недавно, прочитав пост <a href="http://www.tbray.org/ongoing/When/200x/2003/02/23/Democracy">Democracy</a> в блоге Тима Брея.</p>
<p><a name=more></a></p>
<h2>Демократия</h2>
<p>Демократии в том виде, как её объясняли мне в школе и институте — как политическое управление через выяснение мнения большинства — не бывает. Это не специфично для российского общества и не связано с тоскливыми философствованиями о какой-то нашей особой несчастной судьбе. Это просто вытекает из логики. </p>
<p>Политическое управление — сложная деятельность, и эффективно ею заниматься можно только профессионально. У большинства избирателей для суждения о том, как рулить страной, просто не хватает интеллекта, а у остальных — не хватает данных, времени на анализ и средств контроля. И даже примерное направление развития страны невозможно выбрать, основываясь на чтении предвыборных программ партий, потому что они просто не могут быть сколько-нибудь реальными. Невозможно планировать вещи такого масштаба на такой срок — спросите любого честного менеджера.</p>
<p>Поэтому единственный инструмент демократии, который реально имеет смысл (и который, собственно, оправдывает её существование, как политического строя) — это возможность проголосовать <em>против</em> политики, которая массово не устраивает общество в данный момент, сменив её на следующую случайную политику. В отличие от программ на будущее, про реалистичность которых мы не можем ничего знать, мы очень хорошо знаем, как мы живём последние несколько лет, и в состоянии сделать простой выбор: нравится или нет.</p>
<h2>Кого выбирать</h2>
<p>На грядущих выборах все, кому не нравится политика Единой России, имеют возможность проголосовать против неё (даже несмотря на фальсификации — про этот момент много пишут, и я склонен считать, что это не бесполезное занятие). Что смущает — это то, что голоса, например, за КПРФ или ЛДПР фактически всё равно отходят к ЕР, потому что "они договорятся", и становится непонятно, что делать.</p>
<p>Ну во-первых, кроме КПРФ или ЛДПР есть "более оппозиционные" партии, типа СР и Яблока. Да, они тоже могут вызывать собственные формы аллергии, но идея о том, что они будут не глядя продавать свои мандаты ЕР, мне не кажется очевидной. Но суть не в этом. Повторюсь, мы не выбираем будущий баланс сил в Думе, мы выражаем недовольство политикой ЕР. Даже если все голоса за КПРФ будут в итоге работать на ЕР, профессиональным политикам будет понятно, что это голоса <em>против ЕР</em>.</p>
<p>Почему это важно? Потому что политики всегда находятся в зависимости от общества. Даже в России, где угроза отстранения от власти в результате прямых выборов устранена, существует угроза нарваться на общественное неподчинение, забастовки и в итоге — революцию. Этого можно не опасаться, пока поддержка партии находится на уровне 60%, 50%, 40%… Но при уровне поддержки в 20% скрыть это от людей невозможно. Поэтому независимо от того, какие итоги будут опубликованы официально, важно прийти и проголосовать, чтобы самим тем, кто считает, было понятно, что надо начинать бояться. Это единственный оставшийся бескровный способ.</p>
<p>Другими словами, выбирая альтернативную партию, не нужно думать очень глубоко, какую именно. Можно проголосовать из любых личных побуждений: симпатии, наименьшей антипатии, ожиданий о прохождении барьера, нонконформизма. Всё это будет иметь реальный смысл только через двое-трое выборов, когда мы научимся голосовать против и избавим себя от аномалий вида "коррумпированная партия 10 лет у власти".</p>
<p class=note><small>Комментирование к этому посту закрываю, потому что боюсь большого наплыва неадеквата, и совсем не хочу с ним возиться. Вы всегда можете написать свой пост или написать мне личное письмо.</small>