Week 14: Better Late than Never

Madeline Krajewski

Tasking has been both easier and more difficult than expected. It’s easier in the sense that I have done them before, and once I sat down to do it, it went much smoother than anticipated. On the other hand, it was more difficult due to the sheer size of my program. Implementing it has been a bit of a challenge, but I have gotten it to work! Behold, progress:

Notice how the number of bits num-up-down (lower lefthand corner) and the Save button are disabled? Additionally, the Select Images button has changed to a cancel button. (I haven’t quite implemented that yet, but it is in the works.)

I do have a bit more to do with tasks, of course, and the goal was to have it completely finished by the end of this week. However, I found a few random, tiny, and frankly, annoying bugs which took about four hours to debug. You see, this week I implemented another feature, which was supposed to be small and unassuming. For the most part, it was–except that it triggered code which should never have been triggered. I’m getting a bit ahead of myself, however.

The feature is a secret one, in a sense. Only users who have secret images 1/2 the size or smaller than the host trigger it, as that whole encoding process is a completely different way of encoding information. One pixel of the secret image gets distributed among two of the host’s pixels. As a result, a person might wish to increase the number of bits to encode.

It’s a rather simple little form which allows the user to increase the encoded bits. You may be wondering how it caused errors–after all, it’s essentially a clone of the other num-up-down object. The only difference is that it sends a result back to this form.

I am happy to note that it no longer causes errors. The issue ended up being that I have two ints which store the number of bits to encode. One is a form variable, and the other is a function (local) variable. I saved the data to the local one, which meant it still encoded 4 bits as opposed to 6. So, that was one bug which took a lot of tracing through Visual Studio’s debugger.

Now, the other, more concerning one: it somehow triggered this code:

The reason it’s scary is that I have no idea how I fixed it. It is no longer causing those cases to trigger. See?

This second one I solved by not allowing the user to choose fewer bits to encode than they had previously selected. I actually chose to do this because it doesn’t make sense to want to encode a certain number, then when you can encode more, you change your mind to encode less. It just had the side effect of fixing the bug by not allowing it to occur in the first place.

Now, this isn’t an extreme amount of progress. Those who have been following me on this journey are probably panicking. After all, I still have a whole algorithm left to write! Due to extenuating circumstances this semester, my professors have kindly allowed me to take a few more weeks to truly create something I’m proud of. So, you’ll hear from me a few more times before this journey ends.

À bientôt!