Just posting here to say I’m still working on the new version. I didn’t spend as much time on it lately as I could have, but I’ve returned to it a few days ago. I thought that a library like Qt will take off the burden of working on the user interface, but I’m finding myself rewriting simple things like clicking inside a table and selecting multiple rows of words for example. (In case you were wondering why it takes so long, besides it’s being a complex project anyway.)
I’m also spending a lot of time thinking about how to change the old interface. Good design decisions can make a program easier to use… and bad ones can break it. People complained that the old interface was too complex and they couldn’t find anything, but I’m afraid of oversimplifying things. I have made significant changes though, but it’s possible these won’t work well.
For example in the new design, the user is able to open as many windows as they like. The windows only display a single feature (like dictionary only, or word groups only,) but can be docked into the main window anywhere. This has the side effect that resizing the main window resizes the docked interface elements equally. As opposed to the old interface, where the kanji list part (on the left) remained the same width. We will see whether this makes the program harder to use or not.
I wanted to post screenshots but I still don’t have icons for 99.9% of the buttons, and I don’t want to publish an interface design full of buttons of the wrong size and no clear role.
This post was cut in two because I know how much people hate to read. Skip to the next one if you want to read that first.
Most things I have to work on from now on are related to the user interface. Previous versions of zkanji were built for windows only, which made the interface much easier to create. I didn’t have to use external libraries that worked like an alien life form on top of the operating system. This time though, because I wanted to make zkanji run on Linux and Mac as well, I was forced to use such library. I have already written about how painful it is to use that library, but that’s not what I wanted to write about this time.
The new user interface was meant to be modern and stylish. More importantly, easier to use and simpler just by looking at it. But I guess I should just forget most of these dreams if I want to make a working version. Every interface element (text input, button etc.) seem to take up a lot of space now, and there is no way to use the empty spaces well. This became painfully obvious when, for example, I tried to make a good interface for the kanji search. (Still work in progress.) It wasn’t very elegant in the previous versions of the program, because there are many buttons, check boxes and text input boxes that needed to be placed for editing filters for the kanji.
Another layer of difficulty is the scaling of the interface. It’d be good if it worked on all kind of screen resolutions, from the 1000ish pixels wide netbooks (are those still around?) to 4k and beyond. For this reason I’m trying to make button icons in SVG format. Those can be scaled to any size and won’t become ugly and pixelized like “traditional” images. I’m not an artist though, and I’d rather work on the code more, so unless someone wants to donate some SVG images, the button icons will be hideous at best.
Last but not least there’s the popup dictionary, which activates in previous versions by a key combination installed in the system. It brings up zkanji when you press the set keys, even when you are playing a video or reading your favorite manga. There is an extension library for the user interface library I’m using, which allowed this to work on several systems. Unfortunately it seems to have been discontinued some time ago. I’ll try to get its source files and figure out what I need to copy to make it work, but in the worst case this will be a Windows only feature.
The next time I’m posting again, I really hope I can bring you some screenshots. I know the wait is very long, but I’m a single person and this is not a small project!
It’s been a long time since I last posted, and I can’t say I’ve been busy with zkanji, because I was doing other things too. Don’t worry though, the program is now in a state when the basics are done. It still misses long hours of testing, or even user-error prevention, so it’s not ready for publication yet.
There’s a working dictionary search (obviously, as it was the first thing I had to implement,) filter for the search results, word grouping, kanji grouping, word printing, long term study test, the normal tests, “handwriting” recognition for kanji, JMDict/KANJIDIC importer (this is new in this version,) example sentences importer, dictionary exporter/importer. The things the program is missing don’t involve much change in the data handling itself. Collecting-words-with-selected-kanji for example will be able to use everything already written, as soon as the interface is done for it. There’s also no hiragana/katakana study yet, but that works solely on the user interface level. No user settings either, but that’s also just an interface.
I know that people hate to read a lot so I cut this post in two. Next one is about the future.
It’s almost 2016 and no new zkanji yet. Sorry about that. Writing the program from scratch takes a lot more time than I originally thought. Also the quirks of Qt make it very very hard to work with the user interface. I think this alone doubles the development time.
There’s a positive side too of course. Most major features are now done, the last one I’m going to add is the word list printing. (There will be kanji printing too but only after the first release. First I want to make a version which can at least do what the previous ones could.)
After that I’ll start working on a more user friendly user interface. It’s mostly working around Qt, so it will take time unfortunately. I might make a test version soon if anyone’s interested, but there hadn’t been a huge interest in that in the past either. Requests if you want something like that.
To sum it all up, this means more waiting. And more work for me.
Fast report so you know I’m still alive.
I’ve finally given in and started working on the user interface. Without some windows, like add-to-group, it’s difficult to code and test most of the features. The new user interface will be different from previous versions, and a bit different from conventional user interfaces (although there are programs that have a similar interface). The program will have a “main window” which only shows one of the many “modules” of zkanji, but you’ll be able to select which one is shown from its toolbar. When you need interaction between these (i.e. picking words from the dictionary to add to a group), you’ll open another “main window”, switch from dictionary view to word groups view, then drag-and-drop the word from the dictionary into a group.
I want most things to work by drag-dropping just as well as from context-menu of window main menu. It’s still not clear how selection inside words will work if you can drag-drop. There are many open questions but I’ll figure things out.
According to my plans, most windows will be non-modal (that is, you’ll be able to interact with other windows while a dialog window is shown.) I’ve read somewhere that this is how modern interface design should work, but not being an expert I’m not sure. This creates complexity in the code so this is just an experimental feature right now.
I’ll post pictures when there’s something to show. (Some windows are already working but with zero design…)
No, it’s not program update yet. I just thought I should share what I’ve been up to. If you are reading this, you are probably one of the few who can’t wait for me to write something. (Or you are subscribed to the RSS feed which is obviously the majority…) Enough of the introduction.
The latest addition to the new version of zkanji is a built-in JMdict importer. You’ll have to download the JMdict/KANJIDIC etc. files manually, but after that you’ll be able to import the latest dictionary, and not just the English one. (There are other languages in the JMdict now.) I don’t remember what other stuff I added, so I’ll just write about what’s missing.
The next one I want to make is a dictionary exporter + user file importer. The latter was a big task previously too so I expect a lot of resistance from my brain cells. This is not a minor feature that I can just skip and release early, because without it we won’t be able to use our old data. (It’s kinda complicated why.)
A smaller feature I need to implement is the example sentences list for the words. It is relatively easy to do fortunately.
The word tests feature is missing as well (not the long-term study, that’s done). I’m not sure what to do with it. Should it be the exact copy of the original, or does it need changes? The copy is easier to do so for now I might just do that.
These were the bigger features still missing, but there are lots and lots of small ones. Filtering in the dictionary, auto collecting words into groups by kanji, all the small dialog windows for adding stuff to groups or to the study lists. The context-menus for everything. The kanji info window and the stroke order diagram painting. The auto updater. There are so many small things that were added over the years which makes this into a huge project for a single person.
The biggest mystery right now is the popup-dictionary. I have no idea what is possible with Qt, and I’m kinda afraid of it, but it’s the feature I use most so it will be done. If it’s not possible to do within Qt I’ll make this feature a Windows exclusive (unless people help code for other OSes.) Let’s just hope it can be done.
And finally, when all the little things are done, I’ll have a struggle with Qt itself. Making the user interface right in Qt is a challenge but I can’t release something bad. I want to finish this version before the end of the year, maybe sooner. It’s definitely possible. It all depends on whether I can make myself to work on it. At least I now think that I’ll finish it.
I’m working on the handwritten kanji character recognition. At least that part doesn’t need reworking, I thought. Maybe it doesn’t, though I plan to improve on it a bit. What gives me headaches (apart from the fast changing weather) is that I don’t really understand a lot of the code now.
As I’m working on the new version, I try to describe what each part of the code does, so I’m adding comments everywhere. In the original code there was almost none. I could easily understand what the program does, so why add any? Good code explains itself? I have seen that line a lot before. Unfortunately it’s only true about code which solves a very simple, easy to understand problem with a simple algorithm. NOT for handwritten kanji character recognition.
I can’t make much out of the old code without considerable effort doing so. Because of this, even copying the old code takes a lot of time. Not that I’m just copying it either. I’m not sure whether all of my old decisions made sense or not, but regardless of that I would probably make different ones now. It’d be good if someone reading that code (even if it’s me years from now) could figure out why those decisions were made.
I think I’ve learned my lesson, but that doesn’t mean every single line will get commented either. Some parts really do explain themselves. Others might not be obvious to everyone, but as I was solving the same problems the same way years back, they will be easy to read in the future too. I have seen code before which had more comments than code, and it was hard to read because of that. If the algorithm is complicated, explaining it in a few long paragraphs at the start of the code is better than writing a description about each line.
Just to clarify, I’m writing this because it helps me concentrate while I code. I doubt anyone will change their habits because of this blog.