Wednesday, April 22, 2015

Baka Tsuki API

Aitsuko has been translated to 18% of Chapter 2, Volume 1.

It's the finals now and I have been taking time out for studying A&P, but still, sometimes it just gets too boring. 

Yeah, that's probably the only reason I'm giving on a personal reason I'm giving for making the Baka Tsuki API. Currently AFAIK there's one application that parses the pages to provide Android Users a prettier UI to read the translations and I did took some inspiration from their code for this API.

However, the level of irregularities in BT pages is still amazingly high. There are a few projects like Shakugan no Shana and Tabi ni Deyou that just doesn't have the usual templates, and some like Oregairu have their images in tables (which just blew my mind away) and all the usual stuff you see in html-lala-land.

I guess I'm lucky to live in an era where tools like jQuery and cheerio exist. DOM traversals rock! The API above is very forgiving for any page it encounters and it takes in any that remotely looks like what we want. 

Hopefully this API would kick start some applications that would expand BT's readership and thus get us more translators who would want to share their joy of reading these stuff to the rest of the world.

I would probably be working on a responsive site for BT next, aside from the usual translations that is, after my finals.

Saturday, April 4, 2015

Back from limbo

I'm back from school work and webpage administration! Aitsuko is now translated to 10.73% of the second chapter of the first volume.

Warning! The following post is something like a rant so proceed with caution.

The previous month have been pretty hectic, especially the week before today when I created a voting page on request of my organisation for something like an Oscar. It was fun coding with PHP and JQuery AJAX, but I had to lower the security level of the application because of user constraints, so users just logged in with their matriculation number. 

I certainly didn't expect my users to use the DOM and the console to alter the votes, since they were the ones that consented to this application.

Someone used this loophole and attacked the site using the matriculation number of the organisation head. It was not really serious until the guy struck again and again. Hours of work were put in to patch the application until I simply got sick of it and wrote "spite code" as revenge on a whim.

Voila! Instant reaction. We got an email that morning saying that the so called hacker group (actually it was just one person using the dynamic IP given by the school to cover his steps) had pressing matters to deal with and that the attack was to remind us to step up security. And he vanished just like that.

What was sad was that the person was someone from the organisation we made the page for. Even pressing was that he knew the matriculation number of the head so it was someone like the friend of the head possibly. 

For the senior who did something this childish, I salute you for writing a long letter, in which you have shown your chinese-like english writing skills and your limited coding knowledge. How could you have called my "spite code" just a counter? I spent some 5 seconds writing a while loop that would append invisible DOM elements forever and print them out when illegal input is detected just for you to watch your computer crash and burn.

Happy coding! (And don't forget the open the console when you're doing DOM manipulations!)