Tag: code

コードレビューを研く

Vaidehi JoshiさんのCrafting Better Code Reviews記事の翻訳です。

人間と技術の関係はいつの時代でも単純や楽には決して言えない。特に技術を作る人にくると、それが明らかになる。私自身も、職業でコードを書く人として、もっともコードレビューの際に痛感する。

開発の人は作業をアートに近い目線でみて(そういうところは美術作家などのクリエーターと同様)、自分のコードへの愛着が非常に強くなりがちだ。開発はエゴを捨てるべきと、自分のコードだけじゃなくて見る機会があるマージ待ちコードはすべてしっかり見るべきだと言われる。書いたコードをみてもらうのも、同僚のコードをみるのも、スバラシイコト™でやるべきことだって。推奨されるそんな習慣を身につけてちゃんとやっている人も少なくはない。


Clementine DBus changes with Ubuntu 17.04

My #nowplaying poster for Clementine stopped working with the upgrade to Ubuntu 17.04 Zesty. After short debugging with D-feet it turned out that there were some changes to the way it interacts with DBus – which is, I guess, also the reason why it can be controlled properly through the Media menu now.

However, I was (am) totally ignorant re: DBus, so figuring out how this pretty complex system worked, in one hour, still slightly tipsy, past 2am, was not exactly a simple task. Though it was still faster and easier than getting vsftpd to work properly (sober and early afternoon), as there I just gave up and apt-get purged it.


#nowplaying, now with Mastodon and Clementine

Once upon a time I made a Python script that posts the music playing in Banshee (Ubuntu) on Twitter. Times have changed and now I use Clementine to listen to music, furthermore I jumped the Mastodon bandwagon too, so I wanted my script to toot too, not just tweet.


MeCab for MySQL on Ubuntu Xenial

I was looking at fulltext search options when I found out that there is a Japanese language-specific plugin to make indexing more meaningful. Japanese doesn’t have word-delimiting spaces, so fulltext usually has a very hard time with it. MeCab uses a dictionary approach to that, in contrast to n-gram which just splits up words into equal sized bits.

Let’s check my MySQL version first… Apparently I have 5.17, which supposedly comes shipped with MeCab. Except it doesn’t, if you use Ubuntu, because apparently dependency rules for the universe repo don’t let them include it. Which is a huge pain in the ass, since I now have to look for the libpluginmecab.so file myself, and finding it wasn’t exactly an easy task.

Sure I’m not very well versed in the workings of open source dev communities, so I’ve got no idea where I’m supposed to look. I figured that if they can’t include that plugin file in the repo, then they might make it available elsewhere. I found it eventually in the community package .deb for the server, so I tried naively just extracting it and putting it in my plugins folder (which is /usr/lib/mysql/plugin/ in my case).


Hyperproxy

What I wanted to achieve: be able to play KanColle while visiting my family in Hungary, without all the geolocking hassle. There is an update scheduled for the time I’m gone, so I can’t avoid reloading the game. Which means that I need a VPN or proxy in Japan so that DMM won’t block me out.

Plan: set up a Raspberry Pi box behind my router and use that as proxy.


Munkamenet

Nyár óta “dolgozunk” egy projekten egy japán barátommal. Ő nagyon lelkes, és nagyon nem ért hozzá. Engem ugyan érdekel, de tizennégy órás munkanapok mellett van jobb dolgom is a szabadidőmben, mint PHP-ban tízezer sorokat írni.


Scale

I spent Sunday afternoon planning a system. It’s a social network-kind of thing, and I was a bit caught off guard by its scale. It seemed so simple and doable at first, but the further I progressed the larger the whole started to seem.

Then again, this is no new experience. I remember days when I’d naively believe I could write a complete blog engine in a week, and then just procrastinate instead. The procrastination part was the result of feeling lost due to the utter lack of planning, meaning I had to improvise fundamental structures that should’ve been laid down first when I was already in the higher spheres.

With the project I was working on it’s more about the sheer scale of it all, and that I don’t really know how to write it all down in a form that can show all the connections between various objects, how said objects relate to data and how the front-end is generated from them.

To put it short: it’s fun. But it’s not easy.


Comments

In case anyone out there cared, comments are back now. The Entropy theme I picked didn’t support them by default, so I ported a barebone version of the comment section from the Twenty Fourteen theme.


Finding yourself

The past few days I’ve tweaked little this and that in the Entropy theme to make it more personal. After all, this is my blog and even if I couldn’t come up with a theme for myself, I should at least customize the one I got.


Packets, part 2

Yesterday I thought I sorted out the problem with assembling complete responses from packets, but that was quickly disproved by weird errors showing up only in certain situations, but in those situations always.