Aug 022013

I think I’m going to play with Perl, PHP, and Python at almost the same time for some time, and thinking of the fact that dynamic graph is one of the most important feature for web pages, I think I need to find a cross-language solution.

I’m happy with PHPlot and decide not to touch GD::Graph, and I came across GDChart which seems to be good in cross-platform/cross-language area. I will give it a try and will post the result here.

Jul 192013

I was assigned to a Web project which is to present data analysis result to users. Original data came from Web log, plus some extra information, then headed to Hive, then populated statistics files after scientist’s analysis┬áThere are several interesting topics: geo graph, rendering another web page, and metrics graph, roughly speaking, I have no idea of any of these at the beginning of the project.

I think the best decision I made is to use GD based solution, actually that could be the only solution I can think about, I decided to use PHP for Web, plus Perl for batch processing, this actually seems not to be quite right as I’m migrating everything to PHP now as there is not much “real” batch processing, and everything could be done in shell. Also I decided to use server-side DOM model (read: PHP DOM) so not to slow down the project by my poor JS skills, actually my PHP skill is not that good but JS is definitely *poor*. Continue reading »

Jul 182013

PHPlot looks better than Perl’s GD::Graph … I don’t know how to exactly describe the difference, but feel like: neat, easy to understand, easy to control, and better default values.

I’m migrating some BI sites to PHPlot so to get rid of Perl stuffs, so to make things purely PHP based, thus other PHP guys can take over it easily.

Oct 222011

I built a captcha for a friend a while back for a shopping site, obviously it was too simple to be corrupted so I built this new one last night. It was not perfect though, as I don’t have enough knowledge to create dynamic fonts.

Under Ubuntu it is easy to get things work – install php5-gd, luckily it brought couple of fonts and then the script works like a charm. Under my friend’s machine I need to install some extra packages to get TrueType fonts, but it is not that hard.

Let’s see how this works, I believe the captcha is a little bit hard to be read, but it can block spammers.