Thursday, July 25, 2013

In which I tweak KawigiEdit

I made an unofficial KawigiEdit release. It is all about python support.

Participating in TopCoder without a plugin that would generate a tester (with appropriate problem method signatures) Can get very tedious. Although the admins have finally added python support, it needs plugin support as well if we want it to work*

I want python to be popular in TopCoder, for many reasons. The main one being that it is a free language without attachment to unreliable corporations like Oracle or Microsoft. It is a very open language. It is also dynamic, something that is novel in TC. I know too that python is usually among the third most popular languages in the google code jam. I like the idea of being able to use python in editorials, it should be fun depending on the problem. There are people who claim python is a good beginner language. To be honest I don't think so. I think that the worst thing that could happen to a beginner is to deal with more run-time errors than compiler errors. But because of how the claim that python is good for beginners motivates people to talk to beginners about python, there ARE a lot of programmers that know python much better than C++.

The next Saturday will be the first TopCoder SRM that will officially support python. (SRM 585 was supposed to be it, but there were issues). Ever since the new compilers were announced I was trying very hard to make python work in KawigiEdit. For context, Kawigi was a very notable member and problem setter of the TopCoder community back aeons ago when I first joined. He made KawigiEdit which is probably the best plugin for those who are starting up in the arena. It supports all the TopCoder SRM languages, and it is very configurable. Although I think more advanced coders probably want something that uses an external editor. I knew for a while that Kawigi designed the plugin very well and flexible, so I was trying to implement python support. And failing. It was not until ffao made his own release that I finally discovered what I was missing.

The crux of the matter is that ffao's changes needed a bit of minor tweaks and I made them. Updated KawigiEdit.jar. There is more information in the forum thread.

I did my best to test that the python support is working in various problems. (Things like double return values, arrays of double, string comparisons). And it seems to work fine. But I don't take responsibility for any issues you might find during a match. Sorry:).

It is amazing how little (relatively speaking) work we needed to make KawigiEdit able to use python. Kawigi is a great software designer even in such a minor project as KawigiEdit. It is no surprise that you would later hear of him working for a couple of tech giants...

Am I going to maintain KawigiEdit now? The answer is no officially. I have not asked permission to pivanof yet to make new releases and those things. I also think that for the most part (except for the python support) KawigiEdit is not lacking in features and is working Ok. So there is no rush to pick a new mantainer. There is also the small issue that I actually use a KawigiEdit mod (which I will be releasing in a later blog post), so I don't really use the upstream version of the plugin. I think it is better to leave the possibility of someone else with more time and interest in improving the plugin to become the mantainer.

* In reality, it seems that the performance difference between python (at least the version in TC's servers) and Java is too grand and it may be impossible to make a passing submission in certain problems.

3 comments :

Vishnu said...

I also wanted to tweak kawigiedit for mac keyboard shortcuts support. But I am unable to do so because of some missing libraries. "com.topcoder.client.contestApplet.common.LocalPreferences". From where (which jar) I can get this class? Will you be able to help?

vexorian said...

From the topcoder arena, you need to find ContestApplet.jar

http://topcoder.com/contest/classes/ContestApplet.jar

Vishnu said...

Thanks a lot. that worked. :-)