<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>Vyacheslav Matjukhin</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/vyacheslav_matjukhin/" />
    <link rel="self" type="application/atom+xml" href="http://blogs.perl.org/users/vyacheslav_matjukhin/atom.xml" />
    <id>tag:blogs.perl.org,2009-11-03:/users/vyacheslav_matjukhin//310</id>
    <updated>2013-05-06T20:48:14Z</updated>
    <subtitle>A blog about the Perl programming language</subtitle>
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type Pro 4.38</generator>

<entry>
    <title>/usr/local/bin rant</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/vyacheslav_matjukhin/2013/05/usrlocalbin-rant.html" />
    <id>tag:blogs.perl.org,2013:/users/vyacheslav_matjukhin//310.4637</id>

    <published>2013-05-02T14:55:00Z</published>
    <updated>2013-05-06T20:48:14Z</updated>

    <summary> So, imagine you&apos;re a CentOS user, and you want to install a CPAN module into the system. Let&apos;s say you want to install cpanm. You get the root shell with sudo -s. You enter: cpan App-cpanminus. And then you...</summary>
    <author>
        <name>Vyacheslav Matyukhin</name>
        <uri>http://berekuk.ru</uri>
    </author>
    
    <category term="cron" label="cron" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="path" label="path" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="ubic" label="ubic" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/vyacheslav_matjukhin/">
        <![CDATA[<p>
So, imagine you're a CentOS user, and you want to install a CPAN module into the system. Let's say you want to install <a href="https://metacpan.org/release/App-cpanminus">cpanm</a>.
</p>
<p>
You get the root shell with <code class="none">sudo -s</code>.<br>
You enter: <code class="none">cpan App-cpanminus</code>.<br>
And then you enter: <code>cpanm --help</code>... and oops:
<pre><code>[root@localhost vagrant]# cpanm --help
bash: cpanm: command not found
</code></pre>
<p>
WAT?
</p>
]]>
        <![CDATA[<p>
What just happened is that <code class="none">cpan</code> installs scripts into <code class="none">/usr/local/bin/</code>, and <code class="none">/usr/local/bin/</code> is not in the root's <code class="none">$PATH</code>.
</p>
<p>
I don't think CPAN toolchain is to blame here. But I think that if you can't run the software you just installed, something somewhere is horribly wrong.
</p>
<p>
But wait, there's more.<br>
There're several different ways to get the root shell:
<ol style="margin-left: 10px">
<li><code>sudo -s</code></li>
<li><code>su -</code></li>
<li><code>su</code></li>
</ol>
</p>
<p>
Let's see...
<pre><code class="none">[vagrant@localhost ~]$ sudo -s
[root@localhost vagrant]# echo $PATH
/sbin:/bin:/usr/sbin:/usr/bin

[vagrant@localhost ~]$ su
Password:
[root@localhost vagrant]# echo $PATH
/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/vagrant/bin

[vagrant@localhost ~]$ su -
Password:
[root@localhost ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

</code></pre>
</p>
<p>
The first one, <code class="none">sudo -s</code>, uses the <code>secure_path</code> option from <code class="none">/etc/sudoers</code>.
</p>
<p>
The second one, <code class="none">su</code>, inherits the current user's environment.
</p>
<p>
And the third one, <code class="none">su -</code>, is the same as <code class="none">su -l</code>, makes the shell a login shell, which resets the environment, so that it's the same as if you'd login with the root account initially.
</p>
<p>
But wait, it gets worse. Let's try cron:
<pre><code class="none">[root@localhost ~]# crontab -l
* * * * * perl -E 'say $ENV{PATH}' >/tmp/cron.path

[root@localhost ~]# cat /tmp/cron.path
/usr/bin:/bin

</code></pre>
</p>
<p>
Cron is the reason I wrote this post in the first place. The most popular complain about my <a href="https://metacpan.org/release/Ubic">Ubic</a> these days is that it doesn't start services after the reboot. That's because Ubic bootstraps services on reboot with the crontab, which doesn't include <code class="none">/usr/local/bin/</code> (because there are many ways to setup Ubic, e.g., with perlbrew, so I didn't want to make any assumptions about the user's environment).<br>
I'm giving up. I'm just going to <a href="https://github.com/berekuk/Ubic/commit/bdf2b74a18b2c5a495d17a103867e6e0c04e15d3">always add /usr/local/bin to $PATH</a> if it's not already there.
</p>
<p>
BTW, <code class="none">sudo -s</code> $PATH issue is more RedHat-family specific, but <code class="none">cron</code>'s $PATH issue is not, as far as I know.
</p>
<p>
But why? What's the reason for all this? Is it for the sake of security? Can there really be such a program that's safe to keep in /usr/local/bin, accessible to all users, but not to the root? Really?
</p>
<p>
<a href="http://xkcd.com/1200/">
<img src="http://imgs.xkcd.com/comics/authorization.png" title="Before you say anything, no, I know not to leave my computer sitting out logged in to all my accounts. I have it set up so after a few minutes of inactivity it automatically switches to my brother's." alt="Authorization">
</a>
</p>
<p>
PS: I know, I know, everyone should use <a href="http://perlbrew.pl/">Perlbrew</a>. I agree, but don't forget to <code class="none">source $HOME/perl5/perlbrew/etc/bashrc</code> everywhere, especially in your crontabs.
</p>
<p>
<table><tbody><tr valign="top"><td align="right" width="45"><a href="http://questhub.io/perl/quest/517ff62229f5d1582300001c" target="_blank"><img alt="pp+1.png" src="http://blogs.perl.org/users/neilb/pp%2B1.png" style="padding: 0 10px 0 0; margin: 0; position: relative; top: 5px;" width="37" height="20"></a></td><td valign="top" align="left">If you enjoyed this blog post, you could give me a +1 on the <a href="http://questhub.io/perl/quest/517ff62229f5d1582300001c" target="_blank">questhub for it</a>.</td></tr></tbody></table>
</p>
<script type="text/javascript">  var _gaq = _gaq || [];  _gaq.push(['_setAccount', 'UA-35747472-3']);  _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })();</script>]]>
    </content>
</entry>

<entry>
    <title>Play Perl is a Startup</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/vyacheslav_matjukhin/2013/04/play-perl-is-a-startup.html" />
    <id>tag:blogs.perl.org,2013:/users/vyacheslav_matjukhin//310.4499</id>

    <published>2013-04-04T21:58:00Z</published>
    <updated>2013-04-04T21:59:32Z</updated>

    <summary> Yep. I&apos;m leaving my daily job at Yandex in 2 months to see how far I can take the concepts behind http://play-perl.org/. I spent 7 years at Yandex, it&apos;s pretty much the only job I ever had. I never...</summary>
    <author>
        <name>Vyacheslav Matyukhin</name>
        <uri>http://berekuk.ru</uri>
    </author>
    
    <category term="playperl" label="play-perl" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/vyacheslav_matjukhin/">
        <![CDATA[<p>
Yep.<br>
I'm leaving my daily job at Yandex in 2 months to see how far I can take the concepts behind <a href="http://play-perl.org/">http://play-perl.org/</a>.
<p>
I spent 7 years at Yandex, it's pretty much the only job I ever had.<br>
I never participated in any startups.<br>
I have no idea what I'm doing :)<br>
But I really want to try.
<p>
Here are the slides I showed at Moscow.pm meetup today:
<script async class="speakerdeck-embed" data-id="b015b0607f9c01301b3c22000a8c4174" data-ratio="1.33333333333333" src="//speakerdeck.com/assets/embed.js"></script>
<br>
(I'm not sure how comprehensible they are without the talk, though.)
<p>
What this means for the Play Perl future:
<ul>
<li> Source code stays open (for now; I'm not making any promises, but don't see reasons to close it either.)</li>
<li>Service stays free. (I have several ideas about monetization. None of them include ads or require payments for the current functionality. And I promise none of them are evil.)</li>
<li>I have a big incentive to take this beyond the Perl community, to the other open source communities, at least. Maybe to non-programmer communities too. I'm planning to do this as soon as possible.</li>
</ul>
<p>
In the meantime, it's been 1.5 months since my <a href="http://blogs.perl.org/users/vyacheslav_matjukhin/2013/02/play-perl-sign-in-with-email.html">last post</a>, so here are some new features Play Perl got:
<ul>
<li>tags!</li>
<li>comment likes;</li>
<li>reward circle, displaying the number of points you're going to get on quest accomplishment;</li>
<li>"quest completed" modal box;</li>
<li>lots of frontend optimizations and other minor improvements.</li>
</ul>]]>
        <![CDATA[<p><script type="text/javascript">  var _gaq = _gaq || [];  _gaq.push(['_setAccount', 'UA-35747472-3']);  _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })();</script></p>]]>
    </content>
</entry>

<entry>
    <title>Play Perl: Sign In with Email</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/vyacheslav_matjukhin/2013/02/play-perl-sign-in-with-email.html" />
    <id>tag:blogs.perl.org,2013:/users/vyacheslav_matjukhin//310.4377</id>

    <published>2013-02-24T22:15:00Z</published>
    <updated>2013-02-24T22:15:20Z</updated>

    <summary> Starting from today, you can sign in to Play Perl using email, even if you don&apos;t have a twitter account. (It won&apos;t ask you for password; it uses Mozilla Persona.) Quick recap: Play Perl is a new social and...</summary>
    <author>
        <name>Vyacheslav Matyukhin</name>
        <uri>http://berekuk.ru</uri>
    </author>
    
    <category term="playperl" label="play-perl" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/vyacheslav_matjukhin/">
        <![CDATA[<p>
Starting from today, you can sign in to <a href="http://play-perl.org">Play Perl</a> using email, even if you don't have a twitter account. (It won't ask you for password; it uses <a href="https://developer.mozilla.org/en-US/docs/Persona">Mozilla Persona</a>.)
</p>
<p>
Quick recap: <a href="http://play-perl.org">Play Perl</a> is a new social and gamified website for Perl developers, where people can declare their open source plans and get points for completing them. I launched it 2 weeks ago.
</p>
<p>
This week was much slower than the last, due to me being back to my daily job from vacation. Still, I managed to get more than a 100 commits in, including:
<ul>
<li>the ability to unclaim quests, moving them into a <a href="http://play-perl.org/explore/unclaimed">global "up-for-grabs" pool</a></li>
<li>the ability to abandon quests without removing them</li>
<li><a href="http://play-perl.org/api/event/atom">RSS</a> for the <a href="http://play-perl.org/feed">global news feed</a></li>
<li>4 separate explore sub-tabs</li>
<li>performance optimizations</li>
<li>many refactorings, html improvements, bugfixes and new bugs, as usual</li>
</ul>
</p>
<p>
Also, thanks to the awesome <a href="http://play-perl.org/player/creaktive">creaktive@</a>, Play Perl got a favicon. And then, thanks to the awesome <a href="http://play-perl.org/player/neilb">neilb@</a>, it got another one :)
</p>]]>
        <![CDATA[<p><script type="text/javascript">  var _gaq = _gaq || [];  _gaq.push(['_setAccount', 'UA-35747472-3']);  _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })();</script></p>]]>
    </content>
</entry>

<entry>
    <title>Play Perl is more popular than rt.cpan.org!</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/vyacheslav_matjukhin/2013/02/play-perl-is-more-popular-than-rtcpanorg.html" />
    <id>tag:blogs.perl.org,2013:/users/vyacheslav_matjukhin//310.4326</id>

    <published>2013-02-14T17:25:00Z</published>
    <updated>2013-02-14T17:26:02Z</updated>

    <summary> Sorry for the eye-catchy title, but seriously, number of Play Perl quests created in 1 week since its launch: $ curl -s &apos;http://play-perl.org/api/quest&apos; | jq length 197 rt.cpan.org tickets created after 2013-02-07: 128 (no idea how to add a...</summary>
    <author>
        <name>Vyacheslav Matyukhin</name>
        <uri>http://berekuk.ru</uri>
    </author>
    
    <category term="playperl" label="play-perl" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/vyacheslav_matjukhin/">
        <![CDATA[<p>
Sorry for the eye-catchy title, but seriously, number of <a href="http://play-perl.org/explore">Play Perl quests created in 1 week since its launch</a>:
<blockquote>
$ curl -s 'http://play-perl.org/api/quest' | jq length<br>
<b>197</b>
</blockquote>
</p>
<p>
rt.cpan.org tickets created after 2013-02-07: <b>128</b> (no idea how to add a permanent link to its search results).
</p>
<p>
Some other stats:
<ul>
<li>282 players</li>
<li>200 comments</li>
<li>309 likes</li>
<li>1,349 unique visitors</li>
<li>28,222 page views (half of them are probably mine)</li>
</ul>
</p>
<p>
New features <a href="http://blogs.perl.org/users/vyacheslav_matjukhin/2013/02/play-perl-first-24-hours-and-the-power-of-likes.html">since my last post</a>:
<ul>
<li>Email notifications (if you have registered in the first few days, go to your settings and set your email!)</li>
<li>New <a href="http://play-perl.org/explore">Explore</a> tab</li>
<li>Players list is now <a href="http://play-perl.org/players">the leaderboard</a></li>
<li>Comments preview with client-side markdown engine</li>
<li>Comments and quests editing</li>
<li><a href="http://play-perl.org/quest/511670d26a03d9bc1d000009">Auto-highlighting CPAN module names</a> in comments</li>
<li>"Like" button in quest lists</li>
</ul>
Also, tons of JS refactorings and bugfixes, backbone and bootstrap upgrades, etc.
</p>
<p>
<a href="http://blogs.perl.org/users/david_mertens/2013/02/i-3-play-perl.html">Several</a> <a href="http://babyl.dyndns.org/techblog/entry/play-perl">people</a> <a href="http://enetdown.org/dot-plan/posts/2013/02/12/play_perl_is_a_game_changer/">wrote</a> some really nice posts about Play Perl. Go read them if you haven't already, they explain better why Play Perl is important than I do, with my non-native crude English writing skills :)
</p>
<p>
So, what's next?<br>
I think most important features to add next are:
<ul>
<li>the ability to add a quest directly to some kind of a quest pool (without taking on them personally and immediately);</li>
<li>the ability to <a href="http://play-perl.org/quest/511a26c33a5ec30507000038">join someone on a quest</a>;</li>
<li>the ability to abandon a quest, to pick up an abandoned quest, and generally move them between different states.</li>
</ul>
<a href="http://play-perl.org/quest/511a5f043a5ec3513d000002">Here's a relevant discussion on Play Perl</a> about how I see it working and why.
</p>
<p>
After all that, I'd love to finally get to the fun part: pre-scripted quests, especially for newbies (Example: "Pass a tutorial at <a href="http://perltuts.com/">perltuts.com</a>"; another example: "Solve 10 new <a href="http://projecteuler.net/problems">Project Euler problems</a> in Perl and publish them online"). I want to get at least one example of such pre-scripted quest implemented and see how it will work out in practice.<br>
And then after that, achievements.
</p>
<p>
Summing up: you guys are awesome, I didn't expect it to be so popular.<br>
Now go and play some more :)<br>
And don't forget that the final objective is to complete your quests and not just add them!
</p>
<p>
PS: I need help with desigining a <a href="http://play-perl.org/quest/511a25b53a5ec30707000045a">small Perl Raptor icon</a>. Anyone?]]>
        <![CDATA[<script type="text/javascript">  var _gaq = _gaq || [];  _gaq.push(['_setAccount', 'UA-35747472-3']);  _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })();</script>]]>
    </content>
</entry>

<entry>
    <title>Play Perl: first 24 hours and the power of likes</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/vyacheslav_matjukhin/2013/02/play-perl-first-24-hours-and-the-power-of-likes.html" />
    <id>tag:blogs.perl.org,2013:/users/vyacheslav_matjukhin//310.4298</id>

    <published>2013-02-09T18:02:42Z</published>
    <updated>2013-02-09T18:03:43Z</updated>

    <summary> This is fun. Maybe even too much fun, I didn&apos;t get enough sleep last night :) Hacking on a live website with real users is so much more interesting than developing it in a local sandbox. (I&apos;m developing and...</summary>
    <author>
        <name>Vyacheslav Matyukhin</name>
        <uri>http://berekuk.ru</uri>
    </author>
    
    <category term="playperl" label="play-perl" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/vyacheslav_matjukhin/">
        <![CDATA[<p>
This is fun. Maybe even too much fun, I didn't get enough sleep last night :)<br>
Hacking on a <a href="http://play-perl.org/">live website with real users</a> is so much more interesting than developing it in a local sandbox.<br>
(I'm developing and supporting a big website with >1M hits/day at my daily $job, but somehow it's just not the same.)
</p>
<p>
In the last 24 hours, I implemented:
<ul>
<li>open quests counter in /players list</li>
<li>News Feed with opened/closed quests and new comments</li>
<li>likes and comments counter in the quest list</li>
<li>several bugfixes and html/css improvements</p>
</ul>
I think that's more features than I've added in the last 2 months :)
</p>
<h3>The power of likes</h3>
]]>
        <![CDATA[<p>
Ok, it's 2013, I don't have to explain to you what likes are.
I'm sure you already know that likes are the great way to provide the quick, <abbr title="you don't have to make any choice about what to write">cheap</abbr>, visible feedback.<br>
What's (relatively) new is that play-perl uses likes for telling people what to do.
<a href="http://blogs.perl.org/users/david_mertens/2013/02/i-3-play-perl.html">David Mertens got this idea exactly right</a>.<br>
</p>
<p>
I had some experience with Agile/Scrum last year. One reason Scrum works well is because there's a single person (Product Owner) who prioritizes the tasks on the backlog and chooses what the team will work on next.<br>
But there can't be Product Owner in the open source software! Everyone works on whatever they want. So... we need a distributed process.<br>
In other words, <b>play-perl uses likes for distributed, collaborative prioritization</b>.
</p>
<p>
And then there are game points. The number of points (the badge in the <a href="http://play-perl.org/players">/players</a> list and in your profile) you get is equal to the number of the quests you finished, plus the number of likes you received.<br>
This means that:
<ul>
<li>like on an open quest is a promise of game points <b>if you complete this quest</b></li>
<li>like on a completed quest is "kudos" which is converted into one game point instantly</li>
<li>note that this is *not* a zero-sum game; like as much as you like!</li>
</ul>
</p>
<p>
One last analogy: imagine a social network which is optimized for the useful stuff that gets done, instead of the number of cat photos viewed and shared. Because optimizing for cats is exactly what Facebook does: they look at their page view statistics, run A/B tests, and choose the code which keeps people addicted for longer periods of time.<br>
Imagine what a real, *useful* social network could achieve.<br>
PS: Turning points mechanic into the zero-sum game would be a fun exercise. In the world where the <b>useful</b> social network took over the world, "likes" would be, like, the world currency... *evil laughter*. Ok, I'll show myself out.
</p>
<p>
PPS: "Likes" and collaborative prioritization is not the only idea behind play-perl. It's just the most obvious one, and the first one impemented. Check out <a href="https://github.com/berekuk/play-perl/wiki/DesignDraft">DesignDraft</a> to learn more about what's next.
</p>
<script type="text/javascript">  var _gaq = _gaq || [];  _gaq.push(['_setAccount', 'UA-35747472-3']);  _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })();</script>]]>
    </content>
</entry>

<entry>
    <title>Play Perl is online</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/vyacheslav_matjukhin/2013/02/play-perl-is-online.html" />
    <id>tag:blogs.perl.org,2013:/users/vyacheslav_matjukhin//310.4286</id>

    <published>2013-02-08T20:20:00Z</published>
    <updated>2013-02-08T23:09:56Z</updated>

    <summary> play-perl.org is up. It&apos;s a very, very early alpha. There are no achievements, no news feed (Upd: news feed is in), no pre-set quests, not enough quest metadata and almost no introductory texts. Still, I chose to release what...</summary>
    <author>
        <name>Vyacheslav Matyukhin</name>
        <uri>http://berekuk.ru</uri>
    </author>
    
    <category term="playperl" label="play-perl" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/vyacheslav_matjukhin/">
        <![CDATA[<p>
<a href="http://play-perl.org/">play-perl.org</a> is up.<br>
It's a very, very early alpha. There are no achievements, <strike>no news feed</strike> (Upd: <a href="http://play-perl.org/quest/5115641a4d2e3cf30b000009">news feed is in</a>), no pre-set quests, not enough quest metadata and almost no introductory texts.<br>
Still, I chose to release what I have now, because I want to start dog-fooding it myself, and because I want to see if anyone will care enough to try it.<br>
(Also, my self-inflicted deadline was February 1st; I wanted to launch it with more features, but other projects and procrastination got in the way, as usual.)
</p>
<p>
With that being said, here's what already works:]]>
        <![CDATA[<ul>
<li>Login with Twitter (more authentification methods will come in the future, starting with github)</li>
<li>*Very* basic and limited todo-list functionality: adding tasks and closing tasks</li>
<li>Likes and comments (with markdown support)</li>
<li>Awarding points based on the number of closed quests and likes</li>
</ul>
</p>
<p>
Also, thanks to the Backbone.js, it feels *extremely* fast (even while working on a single EC2 micro instance). I didn't know much about frontend technologies when I started, and Play Perl was/is a nice way to improve my Javascript skills.
<br>
Design part is still lacking, it's just a basic Bootstrap for now.
</p>
<p>
If you try it and think it has the potential, please comment here <a href="http://play-perl.org/quest/5112f9897a8f1d380b000003">or on Play Perl</a> which features you think would make it more valuable.<br>
I'm also usually on irc.perl.org at <b>#play-perl</b> and some other channels.<br>
<a href="https://github.com/berekuk/play-perl/wiki/DesignDraft">Here's my own early vision document</a> which explains why I think it's not just another bugtracker.
</p>
<p>
BTW, I spend *a lot* of time optimizing website for the quick start for potential contributors. If you'd like to help, you probably <a href="https://github.com/berekuk/play-perl#quick-start">can get an instance of Play Perl running on your computer in under 15 minutes</a> (most of which will be just waiting for it to install).
</p>
<script type="text/javascript">  var _gaq = _gaq || [];  _gaq.push(['_setAccount', 'UA-35747472-3']);  _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })();</script>]]>
    </content>
</entry>

<entry>
    <title>Lock::File - yet another file locking module</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/vyacheslav_matjukhin/2013/01/lockfile---yet-another-file-locking-module.html" />
    <id>tag:blogs.perl.org,2013:/users/vyacheslav_matjukhin//310.4208</id>

    <published>2013-01-16T23:28:10Z</published>
    <updated>2013-01-16T23:28:33Z</updated>

    <summary>I just uploaded a new module: Lock::File. I guess the main reason I&apos;m writing this blog post is because I feel guilty about it. There are SO MANY other similar modules. I wanted to review them all, neilb style. I...</summary>
    <author>
        <name>Vyacheslav Matyukhin</name>
        <uri>http://berekuk.ru</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/vyacheslav_matjukhin/">
        <![CDATA[<p>I just uploaded a new module: <a href="https://metacpan.org/module/MMCLERIC/Lock-File-1.00/lib/Lock/File.pm">Lock::File</a>.
<p>
I guess the main reason I'm writing this blog post is because I feel guilty about it. There are <a href="https://metacpan.org/module/MMCLERIC/Lock-File-1.00/lib/Lock/File.pm#SIMILAR-MODULES">SO MANY</a> other similar modules.<br>
I wanted to review them all, <a href="http://neilb.org/reviews/">neilb style</a>. I never found time to do it. Damn you, perfectionism.
<p>
I don't want to explain my issues with other modules here. I'm not sure if Lock::File is really much better than others, or if I'm just biased because I used it for years. You can look at Lock::File POD and decide for yourself.<br>
But I finally realised that I have too much <a href="http://blogs.perl.org/mt/mt-search.fcgi?blog_id=310&tag=stream&limit=20">unreleased code</a> and I've postponed its uploading to CPAN just because I didn't want to duplicate some existing code. Damn you, perfectionism.
<p>
In addition to that, <a href="https://metacpan.org/module/Ubic::Lockf">the copy of Lock::File, named Ubic::Lockf</a>, was bundled with Ubic for years.
<p>
And yet, I feel guilty. Sorry, guys.
</p>]]>
        <![CDATA[<script type="text/javascript">  var _gaq = _gaq || [];  _gaq.push(['_setAccount', 'UA-35747472-3']);  _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })();</script>]]>
    </content>
</entry>

<entry>
    <title>Perl community motivation survey - results</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/vyacheslav_matjukhin/2012/12/perl-community-motivation-survey---results.html" />
    <id>tag:blogs.perl.org,2012:/users/vyacheslav_matjukhin//310.4112</id>

    <published>2012-12-09T17:16:41Z</published>
    <updated>2012-12-09T17:41:50Z</updated>

    <summary> Perl community motivation survey is over. Thanks to all those who participated in it! Here are the results: berekuk.github.com/perl-motivation-survey/. The results contain various aggregated statistics, as well as the link to the raw data, so I&apos;ll spend the rest...</summary>
    <author>
        <name>Vyacheslav Matyukhin</name>
        <uri>http://berekuk.ru</uri>
    </author>
    
    <category term="motivation" label="motivation" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="playperl" label="play-perl" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="survey" label="survey" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/vyacheslav_matjukhin/">
        <![CDATA[<p>
<a href="http://blogs.perl.org/users/vyacheslav_matjukhin/2012/11/open-source-motivation-survey.html">Perl community motivation survey</a> is over. Thanks to all those who participated in it!</p>
<p>
Here are the results: <a href="http://berekuk.github.com/perl-motivation-survey/">berekuk.github.com/perl-motivation-survey/</a>.
</p>
<p>The results contain various aggregated statistics, as well as the link to the raw data, so I'll spend the rest of this blog post talking about my interpretations and my overall experience from organizing this survey.
</p>]]>
        <![CDATA[<h2>Interpretations</h2>
<p>
Overall, <a href="http://www.youtube.com/watch?v=u6XAPnuFjJc">mastery</a> (learning and creativity) and practical non-monetary goals ("improving the software I use") are the most important reasons for participating.<br>
Altruistic ideals ("moral satisfaction", "making world the better place") come second, and feedback comes third.<br>
Almost nobody cares about money, comparatively, as you could guess :)<br>
Of course, this order is not a general consesus, it's just different groups of people with different personalities.<br>
(And, of course, this is what people *say*, not necessarily what *really* drives them...)
</p>
<p>
"Comparing different groups of participants" section is fun.<br>
Note that confidence levels are not that high, though. Real scientific studies usualy require values much higher than 90%, and in real scientific studies you should decide on a hypothesis you're checking in advance.<br>
The only confidence level that goes higher than 99% is difference in "Getting praise" motivation for those who contribute often and not so often. Of course, it doesn't prove that people who like being praised become more regular contributors! Correlation doesn't imply casuation, and maybe they just receive praise more often.<br>
The results in this section are highly dependant on a chosen confidence level, on numerical estimates of motivation levels, and on how we break the data into subgroups. If you want to do it differently, <a href="https://github.com/berekuk/perl-motivation-survey/blob/master/process.pl#L320">you can hack process.pl script</a> yourself.
</p>
<p>
Several people added in "other reasons" section and in comments that they're motivated by fun.<br>
To be honest, I forgot to add "fun" as one of the reasons. But I'm not sure I would add it if I didn't forget.<br>
<a href="http://xeodesign.com/4k2f/4k2f.jpg">Fun is a complex concept</a>, and I've been looking for the *underlying reasons* for it in this survey.
</p>
<p>
What else...<br>
Everybody wants to contribute more, and most people are limited not just by the amount of free time. This is good news for my Play Perl project :)<br>
Community is old, almost half of the people have been involved for more than 10 years. Not so good, but <a href="http://yapc-surveys.org/html/ye2012-survey.html">we already know that</a>.<br>
</p>
<p>
<a href="https://github.com/berekuk/perl-motivation-survey/blob/master/process.pl">The script</a> I used to process the data is able to look for correlations between various reasons. I didn't include them in html report, because they're somewhat obvious and somewhat unreliable. You can see them in the <a href="https://github.com/berekuk/perl-motivation-survey/blob/master/results#L169">plain-text report</a>.
</p>

<h2>Experiences</h2>
<p>
This survey took much more of my time than I expected. I underestimated the amount of work required to process the data, to put it all together in html report, and a power of being constantly interrupted by new responses.<br>
With that being said, running surveys can be addicting and fun. If you, like me, like a feedback and can get frustrated by the lack of response to your blog posts, run a survey.<br>
Or maybe don't... I'm still fighting the desire to run a survey on the experiences of participants in the previous survey :) I have to get back to hacking on Play Perl!
</p>
<p>
I tried to make the data and the script that processes the data open and readable. If you're unhappy with the amount of information I extracted from the responses, feel free to <a href="https://github.com/berekuk/perl-motivation-survey">contribute to the report</a> and play with the raw data yourself.
</p>
<p>
Wufoo's forms are well designed and well protected from spam, but Wufoo's reports suck. I had to do all the work manually. At least they allowed me to export all entries in a tab-separated format.
</p>
<p>
Finding a good JS charting library turned out to be more challenging than I thought.<br>
<a href="http://g.raphaeljs.com/">gRaphaël</a>'s docs are too out of date.<br>
<a href="http://d3js.org/">D3.js</a> is too complicated for me and not really a charting library at all.<br>
In the end, I chose to use <a href="http://www.highcharts.com/">Highcharts</a>.
</p>
<p>
R was a good choice for calculating Student's t-test, but invoking it via qx(...) several hundred times is a bit slow. There's probably a CPAN module for that, but I forgot to check.
</p>
<p>
I'm still in doubts about whether I should publish CPAN ids. Better safe than sorry, I guess, so I'm keeping them hidden so far.<br>
I published almost all textarea comments, except those which looked like being personally adressed to me.<br>
</p>

<p><br />
<script type="text/javascript">  var _gaq = _gaq || [];  _gaq.push(['_setAccount', 'UA-35747472-3']);  _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })();</script></p>]]>
    </content>
</entry>

<entry>
    <title>Open source motivation survey</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/vyacheslav_matjukhin/2012/11/open-source-motivation-survey.html" />
    <id>tag:blogs.perl.org,2012:/users/vyacheslav_matjukhin//310.4077</id>

    <published>2012-11-28T23:49:50Z</published>
    <updated>2012-11-28T23:51:55Z</updated>

    <summary>Hi! Please fill this Perl community motivation survey. It&apos;s short and shouldn&apos;t take more than 2-3 minutes of your time. If you ever shared your software, commited a patch, reported a bug or wrote a blog post on Perl, your...</summary>
    <author>
        <name>Vyacheslav Matyukhin</name>
        <uri>http://berekuk.ru</uri>
    </author>
    
    <category term="motivation" label="motivation" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="playperl" label="play-perl" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="survey" label="survey" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/vyacheslav_matjukhin/">
        <![CDATA[<p>Hi!</p>
<p>
Please fill this <a href="http://berekuk.wufoo.eu/forms/perl-community-motivation-survey/">Perl community motivation survey</a>.
</p>

<p>
It's short and shouldn't take more than 2-3 minutes of your time.<br>
If you ever shared your software, commited a patch, reported a bug or wrote a blog post on Perl, your opinion matters.
</p>

<p>
The reasoning behind this survey:<br>
For the <a href="http://blogs.perl.org/users/vyacheslav_matjukhin/2012/11/play-perl-project.html">Play Perl</a> project to succeed, I need to figure out if there's a demand for this product, and which features will be more important. I've already spent a considerable amount of time thinking about it, and I'll share my ideas about why I'm doing what I'm doing after the survey will be over.
</p>
<p>
Of course I'm also going to share the aggregated results of this survey for everyone to meditate on.
</p>
<p>
By the way, Wufoo doesn't allow free accounts for users from my country, so I spent $15 on it. I guess I'm motivated enough :)<br>
So I hope we'll get enough answers, and PLZ RT.
</p>]]>
        <![CDATA[<script type="text/javascript">  var _gaq = _gaq || [];  _gaq.push(['_setAccount', 'UA-35747472-3']);  _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })();</script>]]>
    </content>
</entry>

<entry>
    <title>Play Perl project</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/vyacheslav_matjukhin/2012/11/play-perl-project.html" />
    <id>tag:blogs.perl.org,2012:/users/vyacheslav_matjukhin//310.4064</id>

    <published>2012-11-24T22:36:23Z</published>
    <updated>2012-11-24T22:44:41Z</updated>

    <summary> I want to launch a new website for the Perl community. I&apos;d say it&apos;s a social network, but the main purpose and the main measure of its success is getting stuff done. I&apos;d say it&apos;s a todo-list, but I...</summary>
    <author>
        <name>Vyacheslav Matyukhin</name>
        <uri>http://berekuk.ru</uri>
    </author>
    
    <category term="playperl" label="play-perl" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/vyacheslav_matjukhin/">
        <![CDATA[<p>
I want to launch a new website for the Perl community.<br>
I'd say it's a social network, but the main purpose and the main measure of its success is getting stuff done.<br>
I'd say it's a todo-list, but I want the list of tasks to be public and people-oriented, not project-oriented.<br>
Oh, and it's also going to be gamified.<br>
</p>
<p>
It's not ready yet. I have <a href="https://github.com/berekuk/play-perl">some code</a> and a pretty consistent development pace, and I think it's a doable project, and I think I need co-developers and early adopters to succeed.
</p>
<p>
But first, a bit of the backstory...
</p>
]]>
        <![CDATA[<h3>The story so far</h3>
<p>
In the June of this year, I was going to start <a href="https://github.com/berekuk/Ubic/issues/38">the big Ubic 2.0 refactoring</a>. Then came July and August, and I still was preparing to start coding. It's not that I didn't have enough time, I'm just lazy and procrastinate a lot.<br>
So, as a true procrastinator, I went meta and got this idea of a gamified system that would remind me that people care about what I do and motivate me and other people to do stuff.<br>
I soon figured out I probably couldn't do it alone, so I organized the hackathon at <a href="http://company.yandex.com/">Yandex</a>, recruited ~7 people for one day in September, and we put together the foundation of the project. We didn't do much in one day, but it forced us to think a lot about the underlying concepts, to write a <a href="https://github.com/berekuk/play-perl/wiki/DesignDraft">text explaining my vision</a>, and to build the infrastructure optimized for contributing.
</p>
<h3>What's happening now</h3>
<p>
I hacked on Play Perl on my own since the hackathon. (Except for the couple of weeks when I got robbed and beaten up in Moscow streets at night, and had to spend some time dealing with that...)<br>
I'm a newbie in the frontend technologies world, but Bootstrap and Backbone.js are cool and easy to use. I wrote a <a href="https://github.com/berekuk/play-perl/wiki/Release-Plan">release plan</a> today with the list of features that need to be completed before launch, and I estimate that even with my current pace of half-hour per day I can do it in 2-3 months.<br>
</p>
<h3>Contributors are welcome</h3>
If you'll read the <a href="https://github.com/berekuk/play-perl/wiki/DesignDraft">design draft</a>, you'll see that there's a long, long roadmap ahead. Long... and pretty cool if done right.<br>
So if you got this far and think this project is interesting, there's a lot of fun to be done :)<br>
I'm usually available on #play-perl at irc.perl.org, via email at <a href="mailto:me@berekuk.ru">me@berekuk.ru</a>, and, obviously, at <a href="https://github.com/berekuk/play-perl/issues">github issues</a>.
</p>
<p>
Some technical details:<br>
Thanks to <a href="http://vagrantup.com/">Vagrant</a>, the code is <a href="https://github.com/berekuk/play-perl#quick-start">really easy to obtain and run</a> on any platform!<br>
It uses Perl Dancer, MongoDB, Twitter Bootstrap, Backbone.js and Ubic.<br>
</p>
<script type="text/javascript">  var _gaq = _gaq || [];  _gaq.push(['_setAccount', 'UA-35747472-3']);  _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })();</script>]]>
    </content>
</entry>

<entry>
    <title>Vim highlighting question</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/vyacheslav_matjukhin/2012/07/vim-highlighting-question.html" />
    <id>tag:blogs.perl.org,2012:/users/vyacheslav_matjukhin//310.3547</id>

    <published>2012-07-13T23:24:25Z</published>
    <updated>2012-11-24T21:29:48Z</updated>

    <summary>Dear lazyweb, is there a highlighting scheme for vim which makes method calls more readable? Compare: How can I highlight either method calls or arrows between them? Also, shouldn&apos;t we patch the standard color scheme for perl now that direct...</summary>
    <author>
        <name>Vyacheslav Matyukhin</name>
        <uri>http://berekuk.ru</uri>
    </author>
    
    <category term="question" label="question" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="vim" label="vim" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/vyacheslav_matjukhin/">
        <![CDATA[<p>Dear lazyweb, is there a highlighting scheme for vim which makes method calls more readable?<br />
Compare:<br />
<img src="http://i.imgur.com/uSmc4.png"/><br />
How can I highlight either method calls or arrows between them?</p>

<p>Also, shouldn't we patch the standard color scheme for perl now that direct access to accessors is generally discouraged and lots of object-oriented code looks so monotonously blue?<br />
</p>]]>
        <![CDATA[<p><script type="text/javascript">  var _gaq = _gaq || [];  _gaq.push(['_setAccount', 'UA-35747472-3']);  _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })();</script></p>]]>
    </content>
</entry>

<entry>
    <title>Usability testing of CPAN modules</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/vyacheslav_matjukhin/2012/05/usability-testing-of-cpan-modules.html" />
    <id>tag:blogs.perl.org,2012:/users/vyacheslav_matjukhin//310.3299</id>

    <published>2012-05-26T10:31:18Z</published>
    <updated>2012-11-24T21:27:14Z</updated>

    <summary>Al Newkirk asked me to take a look at his Validation::Class module, and I did. But instead of asking for the directions or watching the screencast, I tried to figure it out from docs. And I took notes of my...</summary>
    <author>
        <name>Vyacheslav Matyukhin</name>
        <uri>http://berekuk.ru</uri>
    </author>
    
    <category term="opensource" label="opensource" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="testing" label="testing" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/vyacheslav_matjukhin/">
        <![CDATA[<p><a href="https://metacpan.org/author/AWNCORP">Al Newkirk</a> asked me to take a look at his <a href="https://metacpan.org/release/Validation-Class">Validation::Class</a> module, and I did.</p>

<p>But instead of asking for the directions or watching the screencast, I tried to figure it out from docs.<br />
And I took notes of my thought process.</p>

<p>The result is this gist: <a href="https://gist.github.com/2791412">https://gist.github.com/2791412</a><br />
And here's Al's answer: <a href="https://gist.github.com/2791581">https://gist.github.com/2791581</a></p>

<p>So I think it was an interesting experience, and I wish more people did this kind of thing.<br />
Because author can't enter the same river twice; once you're familiar with your project's concepts, you tend to lose the perspective on what will confuse a new user.</p>

<p>You don't have to be a good writer or an experienced developer to provide this kind of feedback. On the contrary, seeing the docs for the first time is what's important to make this process work.<br />
And the author probably won't blame you for being unreasonable -- how can he if you're admitting that you don't understand what's going on and you're just dumping your thought process?</p>

<p>I think if more people did this, opensource community would be a better place, and software/documentation quality would improve significantly.</p>

<p>PS: And if nobody is willing to do this for your project, take your friend who's not familiar with your software, sit right next to him and watch (silently!) how he suffers :)</p>]]>
        <![CDATA[<p><script type="text/javascript">  var _gaq = _gaq || [];  _gaq.push(['_setAccount', 'UA-35747472-3']);  _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })();</script></p>]]>
    </content>
</entry>

<entry>
    <title>Ubic - status report</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/vyacheslav_matjukhin/2012/04/ubic---status-report.html" />
    <id>tag:blogs.perl.org,2012:/users/vyacheslav_matjukhin//310.3139</id>

    <published>2012-04-22T19:20:00Z</published>
    <updated>2012-11-24T21:26:49Z</updated>

    <summary>It&apos;s been almost a year since my last Ubic post. So just a quick remainder: Ubic is a polymorphic service manager which makes creating daemons easy, while being extensible in a several different ways. (github; cpan). This post is going...</summary>
    <author>
        <name>Vyacheslav Matyukhin</name>
        <uri>http://berekuk.ru</uri>
    </author>
    
    <category term="ubic" label="ubic" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/vyacheslav_matjukhin/">
        <![CDATA[<p>It's been almost a year since my last <a href="http://blogs.perl.org/users/vyacheslav_matjukhin/2011/06/ubic-progress---manuals-easy-installation-cross-platform.html#comment-26635">Ubic post</a>.<br />
So just a quick remainder: Ubic is a polymorphic service manager which makes creating daemons easy, while being extensible in a several different ways.<br />
(<a href="https://github.com/berekuk/ubic">github</a>; <a href="https://metacpan.org/release/Ubic">cpan</a>).</p>

<p>This post is going to be pretty long.<br />
If the rest of it is tl;dr for you, but you have any opinion about what constitutes a perfect service manager / daemonizer tool, or about what would convince you to use one, please consider commenting anyway :)</p>

<h2>Technical improvements</h2>
The most important improvement was the addition of ini config files.
Now you can write this:
<pre>
# cat /etc/ubic/service/foo.ini
[options]
bin = sleep 100
</pre>
instead of this:
<pre>
# cat /etc/ubic/service/foo
use Ubic::Service::SimpleDaemon;
Ubic::Service::SimpleDaemon->new({
  bin => 'sleep 1000',
});
</pre>
This is important for reaching to people outside of perl community. But I'll get back to this a bit later.
(Of course, perl-style configs are not going anywhere.)

<p><br />
Ubic::Service::SimpleDaemon now accepts 'cwd' and 'env' options.<br />
There's still a lot SimpleDaemon <b>can't</b> do, but I'm considering renaming it to Ubic::Service::Daemon before it's too late.</p>

<p>Thanks to Dmitry Yashin, we got the proper <a href="http://www.freebsd.org/cgi/cvsweb.cgi/ports/sysutils/p5-Ubic/">FreeBSD port</a>.</p>

<p>And then there's some smaller stuff:<br />
<ul><li>Command-line ubic script now doesn't require '--force' when operating multiservices; this feature was annoying, so I removed it. (--force is still required for starting/stopping *everything*, though.)</li><br />
  <li>Dmitry Yashin helped to get rid of LWP::UserAgent dependency by implementing the tiny Ubic::UA http useragent;</li><br />
  <li>process guid (identifier which makes ubic pidfiles safer) calculation code was broken for a couple of releases, but I finally fixed it now;</li><br />
  <li>there was an annoying bug on ext4, which broke services after reboot because empty pidfiles were considered invalid (I hate non-transactional POSIX filesystem semantics...);</li><br />
  <li>finally, I butchered quite a few releases with stupid bugs and typos; now I know better and always upload trial releases first :) (cpantesters is great, even though it's a bit unstable lately);</li><br />
</ul></p>

<p><br />
There were also several releases of various Ubic::Service::* distributions:<br />
<ul><li>Yury Zavarin wrote <a href="https://metacpan.org/release/Ubic-Service-ZooKeeper">Ubic::Service::ZooKeeper</a> and <a href="https://metacpan.org/release/Ubic-Service-MongoDB">Ubic::Service::MongoDB</a> for running Zookeeper and MongoDB as services;</li><br />
  <li>I wrote <a href="https://metacpan.org/release/Ubic-Service-InitScriptWrapper">Ubic::Service::InitScriptWrapper</a> as a fun proof-of-concept for representing init scripts as ubic services (why would you want to do that? well, you would magically get your service monitored by the watchdog, at very least... also, colored command-line ubic script.)</li><br />
  <li>William Wolf uploaded <a href="https://metacpan.org/release/Ubic-Service-Starman">Ubic::Service::Starman</a> just two days ago. I've been very happy to discover it - this is the first time someone not from our Yandex team releases an Ubic::Service::* extension.</li><br />
</ul></p>

<h2>Marketing :)</h2>

<p>I couldn't go to YAPC::EU last year, so <a href="https://github.com/kappa">Alex Kapranoff</a> gave the talk about Ubic for me.</p>

<p>This year at <a href="http://act.perl.org.il/ilpw2012/">Perl Workshop in Israel</a>, Thomas Maier showed <a href="http://hayzer.github.com/ubic-presentation/">these slides</a>.</p>

<p>I myself talked about Ubic twice in Moscow - on <a href="http://devconf.ru/">DevConf 2011</a> (there were less than 10 people there, so I almost forgot about it).<br />
And then I gave the talk at my $job at <a href="http://yandex.com">Yandex</a>.<br />
Yandex is pretty big these days, and now there are 11 projects using Ubic, and even more are going to; there were just 4 a year ago (Hope I won't get fired for violating my NDA ;) ).</p>

<p>Another cool thing that happened: Dancer now <a href="https://metacpan.org/module/Dancer::Deployment#Using-Ubic">lists Ubic as one of the ways to create a service from an app</a>.</p>

<p><br />
All in all, I feel like this is still not enough :)<br />
There are just 5 people on irc.perl.org's #ubic channel, including me.<br />
There are no regular contributors besides me. (This is not a problem per se, but I usually hesitate to add features unless I'm going to use it or I know a user who's going to use it. Otherwise, it's just the dead code. <a href="http://producingoss.com/en/producingoss.html#getting-started">"Every good work of software starts by scratching a developer's personal itch."</a>).<br />
So what am I going to do about it?</p>

<h2>Where are we going now?</h2>

<p>There are two things I'm trying to achieve with Ubic:<ul><br />
<li>Providing the flexible and extensible platform;</li><br />
<li>Giving a useful functionality out-of-the-box.</li><br />
</ul></p>

<p>Ubic was always intended to be flexible and extensible. Earlier its single-line description was "flexible perl-based service manager". I recently replaced it with "polymorphic service manager".<br />
Replacing "flexible" with "polymorphic" is a minor change, removing "perl-based" from description is more important. It means Ubic can be used by people outside of perl community.<br />
And at Yandex, they already do.<br />
Our NodeJS guys use it and <a href="http://dailyjs.com/2012/03/29/unix-node-daemons/?utm_source=twitterfeed&utm_medium=twitter#comment-479891704">even try to promote it to Node community</a>. Our sysadmins use it and generally like it. We even rewrote some system init scripts with it. (rsync init script, for example - it died because of OOM sometimes, it was pretty annoying.)<br />
So, please recommend Ubic to non-perl folks you know :)</p>

<p>BTW, what does "flexible" mean?<br />
There are 3 aspects for it:<ul><br />
<li>ubic services are represented as perl objects which conform to Ubic::Service interface, but can have different implementations;</li><br />
<li>ubic service tree is <b>usually</b> populated by loading files from /etc/ubic/service/, but by using <a href="https://metacpan.org/module/Ubic::Manual::Multiservices">multiservices</a> mechanism it can be populated dynamically;</li><br />
<li>you can describe services with .ini configs, and can even implement your own config loaders (implement Ubic::ServiceLoader::Ext::js, describe services in js)</li><br />
</ul></p>

<p>Of course, Ubic still have to be extended in Perl.<br />
...Unless you bridge Perl-based Ubic API to some IPC API,using <a href="https://metacpan.org/module/Ubic::Service::InitScriptWrapper">Ubic::Service::InitScriptWrapper</a> or some other implementation. (Ubic started as LSB-compatible service manager, but that's not the main reason for its existence anymore. You could implement Ubic::Service analogue in JS, or in IPC but return status not via exit code but via stdout.)</p>

<p>There are many things you can do once all your services are accessible via common API:<br />
<ul><br />
<li>global watchdog (included in core Ubic distribution)</li><br />
<li>http ping service (included in core Ubic distribution)</li><br />
<li>html frontend with start/stop buttons (<a href="https://github.com/berekuk/ubic-web">here's an attempt to build such frontend</a>; unfortunately, its development is on indefinite hiatus right now)</li><br />
<li>decorating services with additional functionality (you can do it with inheritance/composition)</li><br />
<li>binding services from other service managers to ubic; Ubic::Service::InitScriptWrapper does this for init scripts, and we can try the similar approach for daemontools, upstart, etc.</li><br />
</ul></p>

<p>Of course, <a href="http://xkcd.com/927/">you can't just invent an API</a> and expect people to start using it.<br />
Nobody would adopt PSGI if there were no Plack; you have to provide some useful stuff out-of-the-box.<br />
So, without promising anything, here's a list of things I'd like to implement next:<br />
<ul><br />
<li>Lots of people ask me for <a href="https://github.com/berekuk/Ubic/issues/28">ulimit support</a> in SimpleDaemon;</li><br />
<li>Related to the previous point, some people get confused by ubic's user/group semantics (ubic calls setuid to user as soon as possible, not after forking to daemon's process); so, we need to <a href="https://github.com/berekuk/Ubic/issues/27">support the tranditional behaviour as well</a>;</li><br />
<li>I'd love to add Windows support one day, and then declare Ubic "the only cross-platform service manager"... unfortunately, my knowledge of Windows is lacking;</li><br />
<li><a href="https://github.com/berekuk/Ubic/issues/26">reload_signal option</a>;</li><br />
<li><a href="https://github.com/berekuk/Ubic/issues/24">parallel restart</a>;</li><br />
<li><a href="https://github.com/berekuk/Ubic/issues/30">ubic fix-permissions command</a>;</li><br />
<li>YAML configs (since ini configs allow only one level of options, and some SimpleDaemon options already require more (for example, 'env'))</li><br />
</ul></p>

<p>I'm also thinking from time to time about adding a common mechanism for adding additional functionality to services without explicit inheritance.<br />
Something like roles.<br />
For example: "do you want to restart your daemon when code changes? take Ubic::Service::SimpleDaemon and add Ubic::Middleware::CodeChange". Or you might want to restart on memory leaks. Or simply once in a while.<br />
We could then support such middlewares (wrappers? roles?) in ini/yaml configs, so that even non-perl users would use them.</p>

<p>Last but not least, I'm working on a proper website for Ubic.<br />
I'm not ready to show it to public just yet, but hopefully it'll be ready soon.</p>

<h2>Epilogue</h2>

<p>Summarizing:<br />
<ul><br />
<li>Ubic is not just for perl folks now; please recommend it to other people who might want to try it;</li><br />
<li>There are many features, but even more is to be done, and the main restraining factor right now is the number of active users and contributors (I don't want to add stuff just because someone <b>may</b> need it...).</li><br />
</ul></p>

<p>So I'll repeat my initial question once again: how do you think a perfect service manager should work? What would convince you to use one? Which important features are missing in Ubic right now?</p>]]>
        <![CDATA[<p><script type="text/javascript">  var _gaq = _gaq || [];  _gaq.push(['_setAccount', 'UA-35747472-3']);  _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })();</script></p>]]>
    </content>
</entry>

<entry>
    <title>Unicode rant</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/vyacheslav_matjukhin/2011/11/unicode-rant.html" />
    <id>tag:blogs.perl.org,2011:/users/vyacheslav_matjukhin//310.2436</id>

    <published>2011-11-13T21:42:45Z</published>
    <updated>2012-11-24T21:26:30Z</updated>

    <summary>People these days are saying that you should always decode your utf8 strings, enable utf8 binmode, etc. This is not true. I live in Russia, so half of strings I deal with contain cyrillic. 99% of the time they are...</summary>
    <author>
        <name>Vyacheslav Matyukhin</name>
        <uri>http://berekuk.ru</uri>
    </author>
    
    <category term="rant" label="rant" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="unicode" label="unicode" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/vyacheslav_matjukhin/">
        <![CDATA[<p>People these days are saying that you should always decode your utf8 strings, enable utf8 binmode, etc.<br />
This is not true.</p>

<p>I live in Russia, so half of strings I deal with contain cyrillic.<br />
99% of the time they are not decoded.<br />
And you know what, it's fine.</p>

<p>Here is the problem with decoded strings:<br />
<code><br />
$ perl -MEncode -E 'my $a = "абв"; my $b = "где"; say $a.decode_utf8($b)'<br />
Ð°Ð±Ð²где<br />
</code><br />
If you concatenate two strings, either both of them must be decoded, or neither of them.<br />
You can't mix two styles.</p>

<p>So there is no way to migrate gradually to unicode in existing project if it's large enough.</p>

<p>But 99% of the time you don't need decoded strings at all.<br />
And when you actually need them, simple wrappers are enough:<br />
<code><br />
sub lc_utf8 {<br />
    my $x = shift;<br />
    $x = decode_utf8($x, 1);<br />
    $x = lc($x);<br />
    $x = encode_utf8($x);<br />
    return $x;<br />
}<br />
</code></p>

<p>Well, of course that depends on the tasks you solve in your code. If you use regexes with /i or do complex linguistic stuff, you need decoded strings and 'use utf8' <a href="http://stackoverflow.com/questions/6162484/why-does-modern-perl-avoid-utf-8-by-default/6163129#6163129">and all the other crazy stuff tchrist wrote about</a>.<br />
In all other cases... not really.</p>

<p>If you choose to use decoded strings everywhere, you have to always worry about all your inputs and outputs: set binmode for each filehandle, decode output from databases and other I/O modules, etc.<br />
I'm not sure if it's worth it.</p>

<p>Anyway, important thing that I wanted to say is: if you're a CPAN module author and your module does some I/O, for example it's HTTP library, or maybe JSON serializer/deserializer, <strong>don't make the choice for me</strong>. Let me use byte strings, at least as an option.</p>]]>
        <![CDATA[<p><script type="text/javascript">  var _gaq = _gaq || [];  _gaq.push(['_setAccount', 'UA-35747472-3']);  _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })();</script></p>]]>
    </content>
</entry>

<entry>
    <title>Ubic progress - manuals, easy installation, cross-platform</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/vyacheslav_matjukhin/2011/06/ubic-progress---manuals-easy-installation-cross-platform.html" />
    <id>tag:blogs.perl.org,2011:/users/vyacheslav_matjukhin//310.1912</id>

    <published>2011-06-27T22:44:57Z</published>
    <updated>2012-11-24T21:26:03Z</updated>

    <summary>(For those people who don&apos;t know about it yet - ubic is a flexible, powerful, extensible perl-based service manager. Something like upstart or daemontools, but better.) So. Lots of cool stuff happened in last few months. First, ubic is now...</summary>
    <author>
        <name>Vyacheslav Matyukhin</name>
        <uri>http://berekuk.ru</uri>
    </author>
    
    <category term="ubic" label="ubic" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="yapc" label="yapc" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/vyacheslav_matjukhin/">
        <![CDATA[<p>(For those people who don't know about it yet - <a href="http://github.com/berekuk/Ubic">ubic</a> is a flexible, powerful, extensible perl-based service manager. Something like upstart or daemontools, but better.)</p>

<p>So.<br />
Lots of cool stuff happened in last few months.</p>

<p>First, ubic is now cross-platform and runs on *bsd, Mac OS X and pretty much any posix-compatible OS out there (no Windows yet, sorry).</p>

<p>Second, installation is now as easy as possible. Just do "cpanm Ubic && ubic-admin setup", and you are done. (Pass "--batch-mode" to setup command if questions annoy you). It's even possible to install ubic in home folder without root access and use it with perlbrew or whatever you like. Even on shared hosting, if you have the ability to edit crontab there.</p>

<p>Third, 1.30 release finally got <a href="http://beta.metacpan.org/module/Ubic::Manual::Intro">some</a> <a href="http://beta.metacpan.org/module/Ubic::Manual::Overview">new</a> <a href="http://beta.metacpan.org/module/Ubic::Manual::Multiservices">manuals</a>. They are far from perfect, but I believe they are much better than old PODs with which it was pretty obscure for new user to figure out where to start.</p>

<p>So.<br />
If you didn't try it earlier, because of incomplete docs or complicated installation procedure, now would be a good time to try again.<br />
If this is the first time you heard about ubic, it's also a good time to try it.</p>

<p>Join us at irc.perl.org/#ubic if you have anything to say, I'm always greedy for any kind of feedback :)</p>

<p>PS: There will be the <a href="http://yapceurope.lv/ye2011/talk/3401">talk on Ubic</a> on YAPC::Europe this year. I won't be there, but <a href="http://search.cpan.org/~kappa/">kappa</a> will tell you everything you need to know. Don't miss it.</p>]]>
        <![CDATA[<p><script type="text/javascript">  var _gaq = _gaq || [];  _gaq.push(['_setAccount', 'UA-35747472-3']);  _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })();</script></p>]]>
    </content>
</entry>

</feed>
