Learning music notes with Perl

So the other day I bought a MIDI2USB interface to my piano keyboard and as a programmer I was curious about sending back and forth those MIDI events. I decided to write a simple Perl game that can help to learn the music notes. The routine is simple. The random note is generated and printed out on the terminal (like D3), then you have to find that note on the keyboard and play it. If it matches you get ok, otherwise not ok. And so on. As always CPAN saved hours of my time.


Accessors are dangerous

So commonly used accessors (setters/getters) I think are dangerous when overused or used without a caution. Here is a quick list why.


Having fun programming is overestimated

A "web framework that makes development fun", a "fun way to program", a "fun introduction". I am tired of this fun programming. Development shouldn't be fun, if I want fun I go and play football with my friends.

Fun is an ephemeral emotion. I feel it right now, it doesn't have deep
roots. Doesn't really go anywhere, it doesn't feed me in a deep way. It
feels good, I like having fun... but it's different than joy.

-- Kent Beck "Ease at Work"

Fun is something that makes you feel happy for a short period of time but doesn't change you and/or improve your skills. What's the point of fun programming? Suppose I use a framework, library or a module. Should I have fun by using it? No. Instead it should bring a joy by being stable, understandable, flexible etc.

"Fun" is a bad smell for a project.


TDD Best Practices in Perl

In this article I've collected the best practices of TDD (Test Driven development) that help me in my work. I brought them together for the future reference, updates, sharing and discussion.


Reading Perl documentation: perlrun

Recently I reread perlrun and found amazing things I didn't know about. Maybe this can be interesting for somebody else too.


Back from BlackPerl 2011

On the first days of October (1-2) I was in Crimea (beautiful peninsula on the Black Sea). There was a beta version of BlackPerl workshop. We had not many people there but we had a lot of fun, presentations and even a small hackathon.


Translating PSGI specification into russian

We've started translating PSGI specification into russian https://github.com/vti/psgi-specs-ru. If you speak or know russian you are more than welcome to join. We use #ru.pm channel on irc.perl.org for discussions.


PocketIO - realtime applications for Plack

PocketIO is a SocketIO port from Node.JS to Perl. It allows you to write realtime web applications without worring about specific browsers features: from long-polling to WebSockets.

PocketIO is built on top of AnyEvent and Plack, runs smoothly on Twiggy. This way it can be easily combined with other nonblocking Plack apps.

PocketIO can be scaled using Redis pub/sub infrastructure.

Proved to work well in production with 100-150 simultaneous connections. Works just fine with TLS/SSL (via App::TLSme) too.

Check it out. On Github or now on CPAN.


PerlWeekly - Quality Perl links

I've joined http://perlweekly.com/ as soon as it was launched. And since then I've enjoyed the quality Perl links every Monday. Not too few, not too many, just the right amount of news to check if I missed something during the week.

Articles, discussions, videos, events... I wish it had the most interesting CPAN updates or new Perl projects. Some unique content would be nice too, like interviews or short stories.

Sing up here


Little gifts are true

After reading rjbs' post on Promoting little gifts I remembered various gifts that I received from the users of my modules. For example I received a ebook from Jens Gassmann for working on PocketIO and today I got a thankful note and a donation from http://privytalks.com, the website that uses the same PocketIO in production (scary!). Funny that I can use something that uses something I wrote.

It's always nice to receive thanks and gifts. Thank you!