Kawigi's TopCoder stuff
First of all, for the impatient people who don't want to read my ramblings, you can get your friggin' plugin here and the documentation is here.
UNDER NEW MANAGEMENT! - Pivanof has volunteered to take over maintenance of KawigiEdit since I haven't really been working on it lately. His first version is KawigiEdit 2.1, and I suspect he'll continue maintaining and improving it for some time.
UPDATED!!!! - you can discuss KawigiEdit, report bugs, request features, mess around, etc here. Enjoy.
Well, it's finally happened, I'm getting ready to release my TopCoder plugin to the public (Actually, now it's released and published). Ryan has a copy of some in-between version that he hasn't tried yet (I don't think he ever did try it, he downloaded a later version and started playing with it instead), the TopCoder admins have a slightly trimmed down but more polished version they are reviewing for distribution (I think I sent them 3 or 4 revisions before they finished the review process), and I'm feeling kind of good about it.
What's so great about it? Well, I think it's high time something to compete with PopsEdit. Not that there's anything in particular wrong with PopsEdit, but all but two of the "published" TopCoder plugins were written by Pops (all but three now, thanks to me), and the only editor plugin that anyone has published (before) that's actually an editor is PopsEdit, which doesn't appear to have been updated for nearly a year and a half. It has lots of nice features, but it really is only an editor/lightweight IDE, it's closed-source, and most people who use it also have to use 2 or 3 other plugins (at least one of which was probably also written by Pops).
Well, to make a long story short, and I know this isn't the characteristic attitude for me - but this is my thought relative to specifically "contributed" free software - A guy with some inside connections can put out a fine product that people like to use, but for the health and advancement of technology, there MUST be a reasonably powerful and nearly comparably featured competitor that is more "free", flexible, living, and open-source. This is what I hope KawigiEdit can acheive. Either it will slowly beat out PopsEdit and be used by TopCoder competitors across the board (which Pops won't mind if he truly doesn't feel like he has time for plugins anymore), or it will drive Pops to improve his editor. In either case, the coders benefit.
I suppose I have a few reasons for thinking that I have a chance to gain popularity against the other packages that do things like what KawigiEdit does. When I first mentioned my work on a plugin, the immediate response was that I should use CodeProcessor, FileEdit and either TZProcessor or ExampleBuilder (probably depending on the language I wanted to use), and then edit files outside of the applet in whatever text editor or IDE. Sounds to me like it would be much more convenient to do the editing in the applet and not have any more windows open than I absolutely need. So in that case, the answer would be to ALSO use PopsEdit. But why use three or four plugins when I could be using just one? That seems a little silly to me. No switching between them, all the functionality that I want is just automatically there, because I put it there (that's the real point of writing your own plugin, right?). So I guess I'm saying that one advantage I have is integration. (The whole is greater than the sum of the parts, right?) You keep your code locally, you test generate skeleton and test code automatically, you get syntax hilighting and auto-indenting, you get one-click testing on all of the test cases at once, and you don't have to load multiple plugins. It's probably slightly less likely to have complications in installing it, but that's only a problem with a small number of people. What I lack to PopsEdit is graphical bracket matching (not anymore!), several hotkeys, the integrated debugger, and full screen mode.
Another reason I think KawigiEdit can catch on is that it has better multi-language support than any plugin to date. I wouldn't be surprised if future plugins generate code that looks suspiciously like the code I generate simply because I went and learned enough about all the languages to do it. The benefit to the coder is that they can use KawigiEdit to have a fully-featured editor for their language of choice that does appropriate syntax hilighting and generates skeleton and testing code, even if you're using Visual Basic. There was a time that (since the people who knew enough Java to make an effective plugin were using Java in competition) Java was the only language with good plugins, and there was a time that I was the only one using KawigiEdit and all its language-related stuff was just written for Java. But times change, and I couldn't stand to let other people use KawigiEdit without letting it be as good for them using <insert language here> as it is for me using Java. So I think I can get a hold on the small market of VB programmers on TopCoder, as well as providing the only in-applet syntax hilighting specifically written for C# (although I believe code-generation tools have been made to support C# before).
The final advantage of using KawigiEdit over other existing tools is that KawigiEdit is designed completely around speed. PopsEdit also has some such features if you can figure out how to use them, but I wrote this plugin while trying to do the practice problems as fast as possible and looking closely at what my bottlenecks were in solving the problems. Any situation where I was typing slower than I was knowing what to type helped me form in my mind some idea about what the perfect plugin would do. So, if anyone starts solving level 1 problems faster than antimatter, I'd like to think it will be someone who's using my plugin.
So I guess the remaining question is where is it? You can download it on the TopCoder website, or you can download the most recent version (or older ones if you REALLY want to) right here (since it sometimes takes several days for a new version to get up over there). And the Documentation is also available.
Version 2.1 - a.k.a. PivanofEdit 1.0 ;-)
- Test code regeneration has been rewritten to improve readability, implement a more correct double comparison, and avoid repetitive code.
- Changed generation of code stubs from templates to not include a comment about the plugin(/version) - the code expansion does this automatically now.
- Additional settings have been added for C++, to improve support for different local compilers (for example, changing the 64-bit integer data type's name).
- Added capability of adding test cases for local testing in KawigiEdit
- Save-Load round-tripping has been improved, so that test cases are re-parsed and can be effectively used again by the test case editor.
- The editor now has an option to automatically synchronize the source with the saved file, allowing you to more seamlessly use KawigiEdit's code generation in the same way you'd use FileEdit in combintation with other plugins.
- Various bug fixes.
- The real point of this release was the big rewrite and centralization of the command/UI infrastructure.
- Additionally, this is the first version that addresses problems with the "Unused Code Rule" by having the testing code separate from the solution code (in the editor anyways).
- The executability has been stripped from the templates, now they just use a text replacement. This is probably beneficial to more people than having compiled templates was beneficial to.
- Code generation has been somewhat reimplemented and seems to work more consistently than ever.
- Snippets are stored in a human-readable format now, using the new UI infrastructure to help.
- No more "gray screen" when starting up KawigiEdit in non-US locales.
- While the functionality hasn't changed too drastically overall, the organization of the code is completely different and should give me more room to make it "cooler" and retain stability. It also promises to be the most stable version of KawigiEdit yet.
Version 1.1 - The Template Version
- Templates! The template system described in the Discussion site is basically implemented. Now that things have been hacked together, I just need to clean up the parts that should be cleaner. Thanks to Pops, too, for being the person to whine at when things didn't work right away.
- A Template editor and a Tag Library editor has been included in the config dialog.
- Bug fixed in C# test code generation (missing semicolons).
- Bug fixed in parentheses (, etc.) matching in C++/Java/C#.
- By request (and passing mention) - LOTS of new keystrokes recognized in the main editor
- Load button - if you have a solution with the appropriate filename in your testing directory, it can be loaded from disk into the editor (rather than having to copy it from the local code tab).
- Fixed display issue with tabs in comments in C++.
- Renovated the block-matching code (the bracket on the left side of the editor) and made it work more sensibly for VB.
- The "Challenge Tools" can now be used to get and sort on Div 2 data.
- KawigiEdit keystrokes no longer conflict with TopCoder keystrokes.
- I think I fixed the bug that made it so you typed text backward after undoing large actions. Let me know if this still ever happens to you, and send me info from the Java console if possible. It was a really strange hack that got rid of it (and it's a bug I can't really fix that's in the Java libraries).
- \'s can now finally be in the name of the test directory! Heh, what a silly bug.
- Block indent (or un-indent) if you select text and hit tab (or shift+tab).
- Challenge data pages for each coder doesn't allow table cells wider than 500 now (it will truncate anything past that with a '...' at the end). This is to avoid having the layout be really wide on those profiles.
- Snippets no longer put a comment in front of the pasted snippet when you use them. This is mostly for better compatibility with VB. Snippet files are still compatible. More changes may soon come to the snippet implementation, but I'll be careful to keep it so that your old snippets won't be lost.
- The testing code prints the output and desired output on seperate lines if the return type is an array/vector of strings.
- Fixed up test code in Java and C# to no longer test validity on string comparison (figured it was more stable and makes more room for double compares later).
- Search and replace now has an option to not use regular expression matching (as this confused people quite often, and it made it unusable by other people).
- Fixed a really strange problem with block matching when there was an unclosed multiline comment.
- The local code pane now has a button to open a file dialog, rather than the menu thing that turned out to be difficult for people to figure out.
- Fixed a display bug with characters in Java that I introduced in my refactoring of that code.
- Fixed an issue which caused way too many redraw-requests as a result of block matching. So now you can turn it back on and it won't do weird things :-)
- Fixed a user bug - when I packaged the last version, I packaged all of the newer library classes with the old version of the entry point, so some of the features and fixes in there weren't actually there :-p
- Fixed a bug where the file dialog in the config dialog didn't do anything (thanks to Im2Good for pointing me to that bug).
- I now do block matching - curly braces, parentheses, square brackets, several VB constructs, and "block-oriented" preprocessor directives all get 'highlighted' when your cursor is near them.
- Blocks in curly braces that are more than one line long are also indicated next to the line numbers, so you can make sure they're matching up correctly.
- You can now configure what libraries to automatically import in the template for any language (without even having to hack up the code!)
- The editor should now always initially come up on the code pane when you open a new problem.
- You can now change the selected text and selection highlight colors in the config dialog.
- Fixed a bug where preferences on font size in the editor were ignored.
- Fixed a font problem that randomly came up in the config dialog.
- Refactored the syntax coloring code. It should still be functionally the same, but the [KawigiEdit] logo should display correctly even in a variable-width font. This reorganizing of the code may afford bolds/italics in conjunction with syntax hilighting in the future. If you notice bugs due to this change (such as text being drawn on top of other text and stuff), please let me know.
- Found two C++ keywords that weren't being hilighted (and one that was being hilighted wrong) because of putting stuff in the wrong place or leaving a space in the string. The most common of these was the word, "public".
- Finally got timing results into C++, C# and VB. Thanks to Ryan and aussie for tips on how to do this (even though aussie didn't do it on purpose).
- Added quotes to the C++ output of problems that return a string or vector<string>. Thanks to duner for pointing that out to me.
- The testing process run from the plugin will timeout after a specified number of seconds (default is 15). Note that this is the total amount of time for all test cases, not the time for each test case. The option is in the "General" section of the config dialog.
- The config dialog can now be accessed from the editor in the coding phase window.
- Found and fixed a bug in skeleton code generation in Visual Basic.
- Had to restructure a little bit, but now the caret is sitting in the function you're supposed to implement after the skeleton code is generated (instead of being at the bottom).
- Customized the scrolling increments on the code pane, now if you use the mouse wheel it won't scroll impossibly slow anymore.
- The line numbers won't scroll off the left side of the viewable area. I just randomly ran into how to do that :-)
- Made the size of the tabs part of the settings. I figure I have control over it anyways, and as Ryan puts it, "Most people can put up with the default settings on anything else." Default setting is 4 ;-)
- Changed how I color compiler directives. At the moment, anything after a # sign is tokenized as one token until there is a comment or something. In other words, "#include <vector>" will get one color instead of doing #include in one color, vector in another color and <> in yet another color. Comments after compiler directives are still in the comment color, though. Let me know if you think this is a bad idea.
- Made a "cuter" cell renderer for the font text boxes - now the fonts show up on the list in their own font :-) Helps if you know what kind of font you want but don't know what your fonts look like.
- Fixed a funny layout thing when big strings went into the text fields in the config dialog. This ended up taking less effort than I thought it would.
- I guess I got quote-happy when writing the C# code generator, as it created string test variables with p0 = ""A"";. Thanks to Ryan for finding that for me.
- Also at Ryan's suggestion, I took out some redundant C++ headers from the C++ template thingy. I don't know what's in most of those headers, so it's good that someone is trying it out that does. I also fixed a default settings issue
- undo/redo stopped working.
- Java compiler doesn't pay attention to settings changes.
- Setting the font from the config window didn't work.
The links on the rest of the page should be updated to the most recent version.
As of KawigiEdit 2.1, supported by pivanof, KawigiEdit will be profiled using the YourKit Java Profiler, in order to enhance its performance in the future.
YourKit is kindly supporting open source projects with its full-featured Java Profiler. YourKit, LLC is creator of innovative and intelligent tools for profiling Java and .NET applications. Take a look at YourKit's leading software products: YourKit Java Profiler and YourKit .NET Profiler.