Home Artists Posts Import Register

Content

Hi all of you Anki-istas out there!

July is coming to a close, so it's time for a long overdue development recap! This time we have a three-for, covering all of May, June, and July 2019. So get your iced teas ready and strap in folks, as this one's going to be a ride! 

(est. reading time 5-8 minutes)

AnJoy Release!

First things first: I know you guys have all been patiently waiting for more news on AnJoy since the sneak peak last month. Well, I'm happy to say that the first release is finally here! Prepare your gamepads and stretch your thumbs, as the release announcement and download will be following shortly after this recap.

A Bug Hunting Odyssey

Not all development work is as shiny and pretty as a pristine new project, but even the most annoying coding drudgery can be weirdly satisfying. A prime example of this over the past three months has been my journey to uncover and reproduce a bug in Anki's add-on system that had plagued many users for months or even years: Add-ons that worked fine for everyone else would simply refuse to load for some users, with no indication as to what could possibly set their systems apart from everyone else.


Bugs like these are insidious not only because of their severe nature, but also because they are incredibly hard to reproduce. As a developer you hope that you can reenact a user's findings on your own machine. It's when you can't that you go uh-oh.

So how do you deal with a bug that affects a large variety of add-ons by many different authors, but seemingly can only be reproduced on a pale moon night when a frog croaks twice? Well, you crowd-source your bug-hunting, and that's what I ended up doing: I wrote an add-on specifically designed to lure the elusive bug out of its hiding spot, and called upon the Anki community to find it and squash it with me. And it worked!:

Thanks to the tireless efforts of few users on here and on GitHub who were crazy enough to embark on this bug hunting journey with me, we were able to catch the annoying little pesterer and pass him on to Anki's creator in a carefully prepared vial. That is, we finally had a reliably reproducible test case – the holy grail of all bug hunting.

So I know that most of you will likely be bored out of your mind at this point, but some of you might actually be wondering what this bug was all about. Why was it only affecting a select group of people, and why were things working fine for everyone else?

Well, it seems silly in retrospect, but what ended up being the key factor were user names. See, for some reason Anki's add-on import system was failing whenever the length of your profile path fell below a certain number of characters. And as the main varying factor in that path is your name, people with short aliases ended up with the short stick.

I will spare you the exact details of why that was the case (feel free to read up on them here, if you'so inclined). However, the gift of is this: What was first thought to be a bug in one add-on was neither a bug in that add-on, nor a bug in other add-ons, nor even a bug in Anki's code base. It ended up being a small oversight in the tools used to craft Python executables like the one we use to install Anki. Marvelous, right?

The definitive fix for the import bug described in this section will be arriving with Anki 2.1.15. Should you be one of the unfortunate affected by this bug, then please install the latest 2.1.15 beta which should fix the issue.

Building the Tools for Building

Alright, moving on from that bug-hunting escapade but still staying well within the realm of behind-the-scenes work: One of my key areas of interest over these past three months has been in reworking my development workflow from the ground up. See, when you start off working on a project, time efficiency usually takes a backseat to results. It's not about cutting corners, but about prioritizing what's important at that moment – and usually that is shipping a working product.

However, when you no longer have to maintain just one product but a hundred, then efficiency do considerations do come into play. "Janitorial" work like pushing updates, writing changelogs, and managing bug reports can quickly mount up, and at some point you find yourself spending more time dealing with all of this than actual coding.

This is the situation I saw myself in at the beginning of the year. With over 50 different add-ons to maintain on AnkiWeb, and even more on GitHub and Patreon – the strategies I had previously employed to manage my add-ons simply no longer worked.

So what I set out to do over these past few months is write a set of tools that would streamline and accelerate my development workflow, sparing me of tedious repetitive work, and allowing me to fully concentrate on the creative side of development.

I already featured one of these tools in my previous post on here, @AnkiUpdates – a fully automated Twitter account that directly hooks into my custom add-on build system to provide you with all the latest and greatest news on add-on releases.

But another project I am even more proud of is Anki Add-on Builder. This is a fully integrated build tool for Anki add-ons – the first of its kind.

At this point you might be asking yourself what the big deal is with that. Well, development tooling like this serves an important role in lowering the entry barrier to specific programming domains:

When I started dabbling with add-on development I was lost at first. Safe for the good, but not very exhaustive official add-on tutorial, there was no canonical learning path to becoming an add-on developer, and no structure to guide a newbie to follow established best practices. Like many devs before me and after me, I had to walk through a trial of fire of figuring things out for myself. Building on the existing work of other add-on authors was incredibly important in that, but it would have been so much easier if there had been more guidance.

You only need to look at similar development realms like Firefox plug-ins or Chrome extensions, to see how things could be done: An extensive set of tools and documentation that sets the foundation for a rock-solid development community.

With Anki Add-on Builder and similar projects, my hope is to slowly move Anki add-on development in that direction, so that – when a new generation of add-on developers eventually starts working on Anki 3 or 4 – they won't have to go through the same trials like me and most my fellow add-on devs did.

New Add-on Releases

As you might have figured from the overly developer-oriented preceding segments, most of my time over these past three months was spent on less exciting behind-the-scenes work (well, exciting to me – and I hope the dev community – but less so for you as an end-user). There was also the issue of the exam phase which kind of interfered with my Anki work, especially over the past month.

However, May, June, and July did see the release of many incremental updates to my Anki add-ons, and some of the highlights of these include:

  • Batch Editing v0.3.0 which completely overhauled the add-on's structure and fixed a plethora of smaller issues
  • Speed Focus Mode v0.3.0 which also saw fundamental restructuring work in preparation of a major upcoming update (see next section)
  • Image Occlusion Enhanced v1.3.0-alpha4 which fixed a couple of small, but important bugs in the releases up to that point

As mentioned up top, make sure to follow @AnkiUpdates on Twitter to stay ahead of the curve on those releases!


What's Next

I'm now finally embarking on my summer break, and although it's a bit tainted since I will still have to continue studying, this does mean that I will have more time to work on my Anki projects. So what's in store for the next couple of months? Well, there are of lot of things I have planned, but first up ahead lie the following projects:

  • A new release of Spell Checker – You've all been waiting for it, and it's almost here. The key changes will be support for advanced dictionaries (including medical spelling!), and a large number of bug fixes following your feedback.
  • The first Cloze Overlapper beta – It's time we finalize all of the remaining major 2.1 ports, and, given how stable it already is, Cloze Overlapper is the add-on best positioned to be the first one to move out of the testing phase.
  • Speed Focus Mode v0.4.0 – The biggest update to the add-on yet, pretty much nearing in on a complete rewrite. Comes with a button and hotkey to control the timer, the ability to auto-mark cards as good, and many, many other changes
  • Anki 2.1 ports of Visual Feedback, More Answer Buttons, and Puppy Reinforcement. You asked for them, and they're almost here. Anki 2.1 has been puppy-less for too long!

=============================================================

tl;dr

1.) AnJoy release shortly ahead!

2.) Bug hunting is frustrating, but fun

3.) Continued work on improving the tools to build add-ons

4.) Many incremental add-on updates! Follow @AnkiUpdates on Twitter to see them all.

5.) Great things lie ahead, including Spell Checker, Cloze Overlapper, Speed Focus Mode, Visual Feedback, More Answer Buttons, aaaand Puppies!

=============================================================

A Thank You

I've now spent 1700 words talking about myself, and as much as I love hearing myself talk, it is getting kind of tiring at this point. So how about we switch things around for a change and talk about you:

Its your patience that helped me through this difficult time where life and school forced me to be less communicative. It's your support that has catapulted this campaign over the fabled $1000 mark that will give me the stability to keep on going. It's your love that pushes the creative boundaries of Anki. It's you without whom none of this would be possible.

Thank you. Seriously.

– Aristotelis (Glutanimate)

Comments

Mikey Atalla

Hey, I am having trouble with the add on. When it's enabled, I can't right click and open or image occlude images in the editor window. However, when I disable it, I can. How can I fix this?

Anonymous

Are you still working on BetterTags? That add-on has been really helpful for making tags less fiddly and easier to organise.

abed

I really miss 'PDF Glossary Exporter' and 'Advanced Previewer' in the latest Anki. With new add-ons you never know how popular they will be whereas these two add-ons have lots of positive ratings.

glutanimate

Check back in later today. I think you'll really enjoy the news :D And thanks again for your support over all these months, abed! I really appreciate it.

glutanimate

Yes, definitely! A new release of BetterTags should be coming up next month. Glad to hear you've found it to be that helpful.