December 2021

Now the testing (and the website work).

The app is done!  Barring, of course, a major bug cropping up in the testing I’ll do this week.  The difference between where it is now and where it started is amazing and I’m really pleased with how this has turned out. I can’t wait to send it out into the world and see what others think of it – I’m hoping at least one or two folks might find it useful!

In the meantime, the website will also get some attention this week. Now that the screens are set, I can redo all the screenshots and tweak the tutorial to take into account the changes that have been made since I wrote it up. I also need to put together a pass on the FAQs and write up the page about importing and exporting.  In perspective, though, it’s so close!

The sea of white is …not even close.  We travel at the end of this week too, so it’s not likely to see significant progress for a bit; I’ll stick to smaller kits while flying, thanks, and especially with all the white stitching that needs to be done. It’s a shame, because it’s a giant area of essentially filling in the blank spaces …I don’t know. Maybe. It’ll be nice to spend some time stitching again either way, even if it is because I am sitting on a plane at 7am (ugh) traveling 3 time zones the wrong direction (double ugh).

I admit, there are times I could really get behind the concept of abolishing time zones.

Enough feature creep, we are almost there…

This has been a serious coding binge, but oh man. I’ve implemented a notes section for a project (associated with the fabric because that is where the finish info is tracked), dates to track when you started and finished a project, fixed several major bugs (including a nasty one that caused crashes during a common use-case scenario) and even more minor ones (some small edge cases are no longer slipping through on sorting).

I’m drawing the line. At this point, the only things left before I am going with this for release are: the help screen, making a few adjustments to where menus show up, and an update to the logo on the loading screen.  Also, a serious commenting and clean-up pass, but that’s a given.  At this point, if I never did a substantial feature update once it is on the Google Play store, I could live with that. It’s something I can be proud of.

I’d really wanted to finish it today, honestly, and have this weekend to enjoy doing other things including stitching (which has suffered immensely because I can’t do that and code), but …I also want to do something else that is not coding for a bit. Tomorrow will be a day around kilts (hooray for Highland games) and then maybe I will work on the help screen on Sunday. That’s the biggest of the remaining tasks.

In the meantime, I will watch a little more hockey today (excellent background noise while coding, plus playoffs), and look at patterns (I am undecided on the new Mirabilia), and go to bed at a reasonable time.

…well, reasonable for me.

Driven by features, that’s my to do list.

The final behind-the-scenes implementations to get the patterns something that can be in or out of stash has been finished – changes to both the importer and the exporter. They can be non-trivial pieces of code to maintain, sometimes – the importer especially can be a beast in terms of readability (and this is after I refactored the sucker) – but I feel like the benefit is worth it. I strongly believe that after the user has gone through all this trouble to enter in their data, it should be available to them in a form that they can take with them. Whether that’s because they don’t like my app (I hope not) or it’s 20 years down the road and it’s time for something different or whatever, it should be in a human readable, sensible format that’s portable.

I’d actually forgotten I’d done some of the work on the importer on Monday and was really not looking forward to diving back into that piece of code, so it was a pleasant surprise to open up the file and realize that I only needed to make a few more changes in order for it to work with the changes I had decided on for the exporter.  Thanks, Monday Me!

Tomorrow there’s a whole host of items on the to do list – how do I display the information about finishes for patterns, for example, and do I show how many of x are called for by the number of patterns marked as kitted? Plus the whole “marking a pattern as complete” bit still has a number of things that need implementing; I am currently thinking that I’ll put in a preference to allow the user to determine whether the app deducts things from the stash or they do it manually (easy enough to add, and will let folks who want to edit the stash as they go not lose the ability to mark things complete).  Dialog box to congratulate the user on the finish and explain, if necessary, what edits will be made to the stash and, oh, at some point, an in app help button will probably be useful.  Sigh.

Really, I am just avoiding the giant sea of white that is the current stitching in the current project, plus a host of other mundane activities. But tomorrow I will write more code, and the app will hopefully come very close to the point where it is ready to be released.

Then the real measure of its usefulness will come.

Which list it’s on actually matters a lot.

I’ve now changed things around so that patterns can be removed from the stash without being deleted from the program – something that became necessary once I started tracking finishes. I’m still not sure how useful folks will find this feature, but it does make some level of logical sense.

Of course, implementing that was not without its own pitfalls.

Logically, it would make sense that this is something that you would want to provide access to from the pattern page itself. It’s likely not something that will be used frequently – not compared to the other features in the program – and so it can be hidden up in a menu button. So far, straightforward.

The real question comes when looking at what happens to the page when you are looking at it in the stash list. Things were set up to allow swiping from side to side to browse the patterns in the stash without having to go back up to the pattern page, but that meant that when the pattern was removed from the stash list …what happened?

Underneath it, of course, is a FragmentPagerStateAdapter. Merely calling notifyDataSetChanged() was insufficient to cause the adapter to update the views (a problem I have run into often on this project) but even more importantly, calling it essentially caused the adapter to overwrite the information for the next pattern in the list with the previous one – the one that had just been removed from the stash. The end result being, of course, that I could end up with 5 versions of the same pattern and several missing.

Setting the getItemPosition() to return NONE did not accomplish the desired result either; the adapter still doesn’t seem to be updating the fragments in memory, leaving the old data there to overwrite the new stuff (and I have words about the fact that Google fires onTextChangedListeners out of apparent order, but that’s a rant held from the issue caught while trying to solve a different problem). It might work if I set the number of fragments offscreen to zero, but that would be less ideal when I (hopefully) start having photos available – having the fragment loaded offscreen helps decrease the visible loading time.

This also drives home a more serious point about the behavior of things that I was skirting around previously when dealing with threads and embellishments – when the quantity in the stash is decreased to 0, those items are immediately removed from the stash list. According to the thought that, if opened from the stash tab, I should only be looking at items in the stash, the item in question should then be removed from view immediately – and I’m not a big fan of that. Misclicks happen. I’d rather the user have time to correct the mistake instead of having to go back through another 4 screens in order to fix it.

The solution I’ve settled on isn’t the prettiest – it seems a little counter-intuitive to me to have stuff not in the stash show up when you’re swiping between items that you’ve called from the stash, for example – but it sidesteps some of these other major problems that have come up. When swiping, the user has access to the full list of everything, in stash or not. Swiping isn’t really meant for searching through the overall list anyway, and so in that sense this is a more logical approach.  There are places I wish I could have it function slightly differently, but at least for the moment, this is the best compromise between functionality, my time, and logical behavior.

Break for the brain, or at least some different exercise.

Some days, you just kind of need to switch gears and focus on something else while things percolate in the background. I think I hit that wall yesterday. Working through some of the changes that I talked about for StashCache, I ran into the issue now of “what happens when you get rid of a pattern from your stash?”

Especially since not everyone is a packrat like me who holds onto things on the off-chance that maybe I will want to revisit it in another five years (or lifetime, you know).

Since I’m trying to preserve the list of completions, this is now a valid question – and that smacks at some of the assumptions I was going to make about how to handle patterns. Thinking about that yesterday didn’t go very far, either – I did the easy changes, but the harder changes may also depend on the answer to the above question, so …not much sense in working on that until those questions are answered. Website work is also somewhat on hold right now, until I get the code changes settled.

So today has been a little bit of a break – I have finished all the not-white stitching (except for the backstitching) on the Great Wave piece, and will probably start trying to put a dent into the white tonight. I’m thinking some about backup services – for photos, for music, for the general computer stuff.

There’s some more general to do list items – I’m feeling like updating that list would be a good idea at some point today, both for the mundane and the more out there. That’s probably what the purpose is of those daily check-in meetings for software developers, if I had to hazard a guess, but as it’s just me, it can be easy sometimes to get a little lost in the trees on what I want to accomplish and how to accomplish that.

I decided to put off the grocery store trips until tomorrow because supposedly there was supposed to be weather today, but the weather has mostly consisted of wind and the occasional 30 second bit of drizzle. Sigh. It’s still probably a fine day to stay at home and be thoughtful, making plans for moving forward.

In stash or out of stash or…

My sister has been proofreading the tutorial write-ups, as I’ve been producing them. It is somewhat of a slower process than writing the code itself; that part doesn’t need to be explained to anyone else, all I need to do is understand what I’m doing. (The advantages of working independently.) Here, with the tutorials, I have to figure out how to explain the sequence of actions and the decisions I’ve made to someone else.

Preferably using action verbs and short words and in an easy-to-read, conversational style that’s short.

I am not very good at short.

Anyway, we were reviewing the sections that I wrote about different types of items in the stash – fabric and patterns versus threads and embellishments, and she was asking some questions about how I’d handled them. I made the decision when I started writing the program that the patterns you include are always considered ‘in the stash.’ On the other hand, thread and embellishments might or might not be in your stash, but had to be included in the app to be tracked as part of the shopping list. So clearly their presence in the app does not automatically mean that they are in the stash.

I’d initially decided to treat fabric similar to patterns. I was already treating it differently from thread or embellishments, in that each entry represents one piece of fabric. If you have a duplicate, you have to make another entry for it. Each fabric can only be associated with one pattern at a time. If you had it associated with one pattern and then changed your mind to put it with a different pattern, the first pattern “loses” its fabric.

And then my sister asked, “Well, what happens when you finish the pattern?”

My gut answer was that, well, you delete the fabric because it’s not in your stash anymore. We talked about adding a “finish” button that you can hit when you’ve finished a piece, that would delete the fabric for you. But thinking about it some more, it would be nice to have a record of what you did the piece on, wouldn’t it?

And then there’s the issue of choosing an existing piece of fabric from your stash for a pattern. Currently, when you hit the button to do that, it displays all the fabric in your stash that could fit it, even those assigned to other patterns. (The app does tell you which pattern it’s assigned to, so you don’t accidentally select it.) But that doesn’t make sense once you’ve actually started stitching the pattern – you’re not going to rip out the stitches to reassign the fabric.

So maybe I should add something you can mark on the pattern when it’s in progress. Then the fabric gets flagged as “in use” and it won’t show up in those lists. And instead of deleting the fabric on finishing, it gets marked as “completed” and shown only on the master list, not the stash list. Those changes are relatively simple to make – not trivial, but not too tricky. I can probably even add dates to when you mark something as in progress and again when you mark it as finished, to make a little journal of how long it took.

So far so good.

And then she asked, “What about the threads and embellishments when you mark the pattern as finished?”

And oh. Ugh. This is where it gets really tricky.

Some things are very straightforward. If a pattern calls for two skeins of thread, chances are very high that you will completely use up at least the first skein. (The second …well, that depends.) If a pattern needs three buttons, you are probably not going to be left with half a button at the end.

But what about the patterns that call for one skein of a color, and you use an eighth of it? You can probably use that just fine in a few other patterns; I probably shouldn’t subtract it from your stash automatically. What about a box of beads from Mill Hill, where you used maybe 1/4 of the box? That would probably also work for another pattern, which means I still shouldn’t subtract it outright (although in general I am less generous with assumptions about leftover embellishments – I don’t allow overlap when counting them for the shopping list like I do for thread).

My current plan for this is to decrease the amount of threads and embellishments in the stash by n-1 for each item called for in the pattern, where n is the amount called for by the pattern. This is based on that assumption mentioned earlier, that if the pattern called for two skeins/boxes of beads/whatever, you probably used up one completely. It’s not a perfect solution, and the dialog box that will pop up to confirm the finish will warn the user that they should check and manually correct their stash counts for items involved with the pattern if needed. But it seems to be the best solution I’ve come up with to this problem.

It also means I have a bunch more coding to do before it’s back to screenshots and tutorial writing.

Furry overlords of the mundane

I’ve been buried in Android development and web design lately (although to be accurate, the latter is more figuring out the WordPress theme I purchased and less the nuts and bolts of what I would consider active designing). Even much of my hobby time lately has gone into this project – today’s trip to the cross stitch store was aimed at getting feedback on StashCache, not shopping for more stash.  (I failed to get feedback and failed at buying nothing.  Sigh.  But new stash!)

So leave it to the furry overlords to remind me that there is still reality to deal with.

Of our three, Problem Child lives up to his name in more ways than one – eating hair, getting onto the kitchen counter, humping blankets (yes, he’s fixed) – but perhaps the most obnoxious is that he doesn’t like covering up his own business in the litterbox.

I read somewhere (on the Internet, so it must be true) that this is a way that cats assert dominance or some such something. I don’t know. I don’t especially care. I’d just like him to stop, because while most of the cats I’ve known aren’t particularly aromatic in that sense, Problem Child is special.

Extra special.

Special enough that his rear end should be classified as a chemical weapon.

And until it gets covered up, well, it’s potent. Thankfully, once covered, the odor tends to dissipate fairly rapidly. Sort of how babies smell fresh once you finally get the diaper dealt with.

That’s why a few warning bells should have rung when the smell hadn’t dissipated by the time we got back from a short walk around the block. But I’m tired and have been focused on this WordPress installation and the pile of tutorials I need to write, which is why it took another 15 minutes or so to notice the smear of poop across the linoleum.

Perhaps the only saving grace is that I’m fairly certain he didn’t do it deliberately, as opposed to what the parents of every small child must deal with at the point said small child decides to play with the contents of their diaper.  I’m fairly certain he probably produces less poop too. (On the flip side, you can train small children not to do that again, whereas I’m fairly certain it would be a lost cause with Problem Child.)

And that is why I was cleaning cat poop off my kitchen floor at 11:30 pm. My glamorous, exciting life-in-progress – reality checks provided by the furry overlords.