D-7 <altijd in beweging>

Day to day life of a Perl/Go/C/C++/whatever hacker. May include anything from tech, food, and family.

2010年07月

http://xslate.org/

tokuhiromがざーっと雛形作って、あとはどかどかみんなでコミットしてたらいつのまにかできてたよ。
    このエントリーをはてなブックマークに追加 mixiチェック Share on Tumblr

geohash値を計算するためのモジュール、Geo::HashってのがすでにCPANにあるんだけれども、それのXS版Geo::Hash::XSを作ってアップしておきました。実は特に使うアテもないんだけど、目の前で開発が進んでたロケタッチでいざ使おうと思った時にあったらいいかなぁ、と思って現実逃避のために作りました。

もしご意見等ございましたらお気軽にどうぞ。
    このエントリーをはてなブックマークに追加 mixiチェック Share on Tumblr

えー、とうとう33歳になってしまいまして。

で思い返すに最近・・・そうですなぁ、ここ2年くらいですかね。なんだか急速に体の衰えを感じているのです。特に飯。どうもね満腹中枢と理性と内蔵の処理能力がいまいちシンクロしてないのです。

例えばお昼に出るじゃないですか。気分的にはお腹も減っていてそれこそ近所のもうやんカレーとか食べられるんじゃないかという感じなんですが、最近それをやってしまうともう後で膨満感で仕事にならない。他の店でも例えば昔はぺろりといけていた大盛り注文も最近は後で来るので食べられない。その食べてる瞬間はいける、と思うし実際完食まではできるんだけど、後でくるんだよなぁ・・・

まぁそんなわけでさすがに僕も馬鹿じゃないのでだんだんその事が分かってきて昼飯は今までと比べると軽めにしてみてうどんとか食べたりしてるわけですが、それでもやっぱり「あ、この店大盛りがあるんだ・・・」とか見てると腹のほうは「いけるいける、おまえ食えるぞ!」って言ってくるんですな。そこは理性でなんとか抑えるんだけど、なんか一抹の残念感というかなんというか・・・そういうものをもって店を出たりするわけです。で、歩いているとだんだんこなれてきて「あ、やっぱり大盛りにしなくてよかった」とかなるんで、まぁ最終的にはいいんですが。

とまぁこんな感じで、理性では「おれはもう大食いはできない」と分かっていても今までの癖で「まだ食える」と感じてしまうというちぐはぐな状態なわけです。

これからはなるたけ若人連中に食わせてそれを見て喜ぶ人になろうかと思います。
    このエントリーをはてなブックマークに追加 mixiチェック Share on Tumblr

去年相方に連れられて初めてPUFFYのライブに行きました。で、今年もなんかいつのまにやらどこからかチケットを手に入れてきたらしく、この間三軒茶屋の昭和女子大学人見記念講堂でのライブにも行ってきました。

あいにくの雨の中、満席状態。デビュー14周年とか言ってたけど、好きな人も多いんですなぁ。

正直自分はそんなにファンでもないので大盛り上がりはしないんだけど、でも一つだけ言いたかったのは、自分みたいに「え、PUFFYってなんちゃってアイドルくずれポップでしょ?」とか思ってると意外とライブではびっくりさせられるということ。

PUFFY達のトークとかもまったりしてていいんだけど、バックバンドがまぁなんというか、こういう言い方は失礼かもしれないけど「ちゃんとしたロックバンド」なんだよね。骨太ロックが聴けます。おかげでそんなにPUFFYファンじゃない自分も大変楽しかったです。あ、ちなみに別にPUFFY嫌いとかでもないんで。要はフツーの観客です。



ところでやっぱり「大人の席」が欲しいです。1人3万円くらい、4人席で10万円くらいでボックス席になってて、ビールの一杯も着く感じの席。遠くていいので、落ち着いてライブを見られる場所。そんなのがメタリカライブとかであったら絶対いく!

    このエントリーをはてなブックマークに追加 mixiチェック Share on Tumblr

以前ここで書いたTest::mysqldの仕組み、すこーしずつ毎回変えながら使ってる。今は継承はしてないが、まぁやってることはだいたい一緒。

で、テーブルのインデックスとか使ってるクエリとかを確認したいなーと思って、slow query logと general log をぼこっと出せるようにした。

    if (! $ENV{ TEST_DSN }) {
        my %my_cnf = (
            'skip_networking'     => '',
        );

        if ( $ENV{SLOW_QUERY_LOG} ) {
            $my_cnf{ slow_query_log } = 1;
            $my_cnf{ slow_query_log_file } = $ENV{SLOW_QUERY_LOG};
            $my_cnf{ long_query_time } = $ENV{SLOW_QUERY_TIME} || 0.1;
        }
        if ( $ENV{GENERAL_QUERY_LOG} ) {
            $my_cnf{ general_log } = 1;
            $my_cnf{ general_log_file } = $ENV{GENERAL_QUERY_LOG};
        }
        my $mysql = Test::mysqld->new(
            my_cnf => \%my_cnf,
        );

        if (! $mysql) {
            confess "Could not establish mysqld";
        }

        $ENV{TEST_DSN} = $mysql->dsn();
        $self->{_mysql} = $mysql;
    }
一回もう少しハードコードに近い形にしてみたんだけど、テストなので環境変数が一番楽だという結論にいたった。使うときはこんな感じ。ログの位置を絶対パスにしないと Test::mysqldが閉じると同時に消されるディレクトリに書き込まれるので要注意。

    SLOW_QUERY_LOG=`pwd`/slow_query.log \
    GENERAL_QUERY_LOG=`pwd`/general_query.log \
        make test
    このエントリーをはてなブックマークに追加 mixiチェック Share on Tumblr

新宿の地下にある某パン屋でよく朝食を食べてるのだけど、そこが最近「チキン南蛮パン」というものを発売した。結果は予想されてたんだけど、それでも一応チャレンジということで今日食してきたのだが・・・うーむ。

というわけで宮崎県人でもないが、いわせてくれ。

長いことチキン南蛮って唐揚げにマヨネーズだと思ってました。だって東京でチキン南蛮弁当って銘打ってるものってほとんどそうなんだもの。そしたら相方が「違うよ、それ全然違うよ!」って教えてくれ、その後宮崎の洋食小倉のチキン南蛮を食べる機会もあり、なるほど!と合点がいったのです。

衣は小麦粉+卵。鶏肉(個人的には鶏胸肉推奨)をそれで揚げたら、あついうちに南蛮タレにつけておく。ちなみに鶏肉は多分大きめのほうがうまいと思うけど、家だと難しいので普通の唐揚げっぽく一口大でよろしいかと。鶏胸肉だとパサつくと言う方は揚げ方がよろしくないのだと思う。鶏胸肉に限らずだけど、揚げ物は余熱で火を通すんですよ!それだけでだいぶジューシーになるはず。

南蛮タレは色々あるようだけど、砂糖、お酢、醤油(少量)、みりん、ケチャップあたりをいい感じに混ぜたものが一般的っぽい。タレはかなり甘く、かなり酸っぱい方がそれらしいと思う。

で、これが重要なんだけど、タルタルソース。マヨネーズじゃねぇぞ、タルタルソースだ。外食では滑らかなソースが出てくることが多いけど、家で作るなら野菜たっぷりのソースをおすすめする。キュウリやらタマネギやら、そして忘れちゃいけないピクルス。これらを小さく賽の目に切って、マヨネーズで和えるんだよ。この野菜が重要だ。なんせ揚げた鶏肉とマヨネーズだから、ここで野菜をたくさん入れておかないと重くなりすぎる。チキン南蛮はなんといってもこのタルタルソースにどれだけさわやかさを入れられるかがポイントだ。あ、忘れてた。ゆで卵も当然入りますね>タルタルソース。

キャベツ山盛りの上にチキンをのせて、野菜たっぷりタルタルソースをもっちゃりかけてやれば完成。あーいいねぇ。甘酸っぱくてキュウリがうまくていいねぇ。




・・・と、ふと今朝食ったパンのせいでかっとなって書いてしまったわけだが。

今朝食べたパンは甘酢っぱいタレがついてただけよかったが、タルタルソースとかは当然ないし・・・残念すぎた。というわけで、チキン南蛮と銘打つならちゃんと作ってくれ。じゃなきゃ唐揚げマヨネーズとか甘酢チキン揚げにしろ。

あー、うまいチキン南蛮食いたい。
    このエントリーをはてなブックマークに追加 mixiチェック Share on Tumblr

This is a meta-entry about the effort that Gabor Szabo is pushing for right now (grant request, blog entry). I'm writing on my blog because for the life of me blogs.perl.com doesn't accept my OpenID login, and somehow my MT account there was suspended. WTF. 

Anyways.

I'm the head director of Japan Perl Association (JPA), which is kind of similar to What Gabor is proposing, but not quite. I thought this story on how JPA came to be, things we had to do, and other considerations will shed some new light into the conversation.

Without further ado here goes:

OOPS, DID I JUST SAY THAT?

JPA originally came about when during a dinner after YAPC::Asia Tokyo 2008, I (Daisuke Maki a.k.a. lestrrat) blurted out "Hosting YAPC without a real organization sucks, let's make one!"

Of course, when you speak up, you get to do it. So Emmerson Mills and I started planning and executing the efforts to bring this organization to reality.

There was much that the Japanese Perl community could benefit from such and organization, but we had find the right raison d'etre, so that we could bring in enough people and organizations to the new entity.

MISSION STATEMENT

Well, actually the mission statement is on JPA site, but that's kind of a general, beautified-for-people-that-only-came-to-glance-at-it type of statement.

What this organization really aims for is to create an environment / atmosphere where corporations can hire more Perl engineers (easily). Basically, we want to convey this message:

 "Look (you corporations, employers), Perl is a serious language, and you can get stuff done with it. You also don't have to worry about legacy code, because we will make sure there are more Perl programmers"


That statement alone would just be some random guy saying that for the heck of it. We were going to either prove that the above was true, or make an effort to make those things happen.

So to be more convincing, we narrowed that what would be our goals:

(1) We need more exposure about the fact that serious companies uses Perl. A lot of people -- especially those that are learning about Perl -- still think that Perl is a CGI-ish, Web-ish language. Sure sure, we can use it for the Web, but we can also use it for tons of other things. And we need to tell them that there's evidence for it (i.e. that there are companies using it).

(2) We need to reach out to the (relatively) non-geeks and newbies. Let's face it: if you're a geek, you don't need our help. You know what's good for you, and you will probably pick up the right tool/language for the job in hand. Instead, we need to reach out for those people who are just learning about, or are just using Perl to get some daily duties done. We need to tell them that some stories are just FUD, or plain outdated. We need to tell them how to be lazy and productive with the language.

(3) We need a "local" voice. Just translating news, delivering maybe not all, but at least selected news about the language development and such, so that people who don't actively follow foreign tech news hear about what's going on.

(4) ... and finally. We need to have Perl look "official". Official in a sense that it's not just a handful of hackers doing what they want, when they want, how they want. Hey, I know how OSS goes, so I know that part of that statement will always be true, but the important thing here is how the general audience *perceives* Perl is.

For somebody with minimal technological background, having an official backer takes away a lot of uncertainty and doubt about our beloved tool. 

So then we knew who our target audience was: Corporations and non-hackers of Perl (people who just started, people who only use it because it's part of their job, or people who don't currently use Perl). 

Back in winter of 2008, I don't think I could articulate these messages, but still, I believe the gist of the above goals were there already. So based on that, we started on the next mission: $money


OPERATION IN THE REAL WORLD, AND $MONEY

After going back and forth between doing an NPO and a real company or some other choice, we decided to form a 社団法人 (probably called an "incorporated association" in English, but I'm not sure). I don't know how that translates in other countries, but it's somewhere between a company-for-profit and an NPO. 

An NPO in Japan can, but is limited in ways to, make a profit. Also, an NPO is eligible for some tax breaks but in general requires a LOT more paperwork that must be made public. The reasoning for this is that (1) an NPO is something for the general public, so you need to let everybody know what you're doing, and (2) if you get tax breaks, you're using other taxpayer's money, and therefore you need to let everybody know what you're doing (duh). That's a big blocker for us, because we don't have enough man power. More on that later.

On the other hand with a company-for-profit you're allowed to do what you want. It's a self-governing entity, so you can make your own decisions, do whatever you want --within the general rules of the law. However, a company-for-profit's entire reason to exist is to grow. After all, we just want a better environment for Perl. We're not trying to rule the world or anything. So this wasn't a great choice either.

That lead us to 社団法人. You get to be a self governing entity, you can make a profit, and you don't have to aim to be the next Microsoft or anything.

Having made the choice about the structure of the organization, the rest pretty much came as a no brainer.

JPA asks companies for some subscription fee to be a member. We calculated that, to keep hosting YAPC::Asia and our organization, we needed somewhere along USD 30K ~ USD 50K per year, so we used that estimate to calculate back how much we ask for companies. We currently have about 20 members. Some members pay more than the other, etc. You do the math.

Since our organization isn't a company-for-profit, we don't have the basic stated capital to base our initial activities on. So we decided to create a way to accept funds from our members. If you didn't know, fund in this context is sort of a loan without interest. JPA cannot, unless we somehow royally f*cked it up, keep the money as profit -- we must pay back when we can. So we worked with Mixi (one of the major SNS providers in Japan) to give us a base fund of USD 10K. JPA will not use that money actively, but instead we will keep it as a buffer so that our balance doesn't go negative.

That only covers the initial cost. We need to keep this organization running, so we need to have revenue coming in. Unfortunately for the time being we must rely on subscription fee for the bulk of the costs, but we have... yes, YAPC::Asia Tokyo! YAPC used to be a completely non-profit activity, but we're trying to generate somewhere around USD 5K to USD 10K per yea from it. Don't worry, we're not trying to sell you stuff (we learned our lesson form last year ;). We'll just simply cut costs where we can, and make the event a bit more attractive for non-hard-core Perl people, which should translated to more ticket sales. Anyway, that's a different story. Just saying that we do plan to make some money out of YAPC.

Also, we teach courses and charge people for it. This particular business hasn't really taken off, but then again we can't really keep it up if we had offers to teach courses every week. We all have day jobs. It would be nice if we can do this maybe once per month in the future -- that would give us room to grow.

BTW, when we incorporated JPA in the winter of 2008, I personally put in about USD 10K (of which JPA refunded about USD 5K) for this preparation. This is not to brag about it, but to state the fact that, damn it, you need money to make these sort of things become a reality. Dreams without a financial plan is like a building without a ground to stand on. I hate it, but it's a necessity.

THEN THERE WAS JPA

Anyway, so we planned those things out, I talked to a bunch of Japanese Perl Hackers, got in fights, I talked to more corporations, did a lot of legal munbo-jumbo... and there it was, Dec 26, 2008, JPA was born.

We waited until April 2009 (which is when most Japanese companies start their fiscal year) to "officially" announce the creation of JPA. We had a press conference, and made sure at least some people heard of us. I've been to many PM group meetings north and south of Japan, we held conferences, we started some online papers to market Perl, got involved with legal stuff when we needed to... etc. 

I believe currently we're still in "let our presence be known"-state. So I travel around Japan, telling people that JPA exists, and that Perl dying is a FUD. I believe these efforts are gradually paying off.

As for staff, we have 5 directors. Most daily chores are divided up between these directors. We currently don't have any paid staff. Accounting is managed by my real-life partner (I really want to compensate her for her great job, but I sweet talk to her instead of paying her for now). I don't think we can have a paid staff until our yearly revenue reaches somewhere around USD 100K -- but we still have long way to go.

We have YAPC::Asia Tokyo 2010 coming up this October. Our budget's on track, and we should make a slight profit this year. Oh, last year we had a completely dried out balance and the end of the fiscal year (the funds were safe -- I was really glad we decided to have that fund thing).

TODO, AND PLANS

This blog. I initially started writing about JPA in English to compare with Gabor's ideas, but this turned out to be a massive summary, which I really should write in Japanese as well. Japanese readers, yes it's coming. please hold

I personally hate to be the head honcho, as I'd rather be an unknown who do the dirty deeds behind the scenes, but I believe for the past year and half, JPA has been successful so far. There are a lot more things we should do, but just like any other non-$dayjob activity, I believe that doing what you can now, and gradually keep moving forward is the answer for long term success. 

However, I do believe that an actual fiscal plan,  clear targets, goals, and separation of concerns (i.e. we're not doing anything that TPF would do -- we focus on Japanese corporations and engineers) are required to make an organization like this active and successful.


Hope this story wasn't too boring. Happy Marketing Perl!
    このエントリーをはてなブックマークに追加 mixiチェック Share on Tumblr

このページのトップヘ