Thursday, July 21, 2016

7/21

More skill testing today! I had my friend cook using Alexa to get a feel for how user friendly it would be. She knew very little about my app and had never worked with an Alexa before.

The biggest problem we ran into was that Alexa kept changing recipes or reseting. This is due to the fact that I currently have Alexa continuously listening for intents. I thought this would be the most helpful, since it enabled you to ask questions quickly ("Alexa, what's the next ingredient?" over and over again without having to ask Alexa to open RecipeHelper) but if we carried on with our conversation after setting the recipe, she would mistake it as a command. She would randomly switch recipes or reset the recipe depending on what she thought she heard us say.

Other than that, my friend thought it was pretty seamless. She could ask for each step and within that step, ask for the quantity of the ingredient (every ingredient was properly found except zucchini!).

I think I need to start looking at this app through the eyes of someone who will actually use it, which will probably be as an aid to the recipe itself. I'm going to have Alexa end the session unless a response is needed and I'm going to connect asking for specific steps to the pagination, so if you ask for step three and then ask for the next step, it'll take you to step 4 instead of step 1.

Just a reminder, I'm going out of town tomorrow for the entire week. I'll be on the beach so I'm doubtful that there will be good internet, but I will take my computer just in case. I don't plan on working, but I might continue with cleaning up my code and writing documentation!

Wednesday, July 20, 2016

7/20

I kept working on fuzzy matching today. This was a lot of trail and error. I tried using getLevenshetinDistance and getJaroWinklerDistance but neither worked as well as what I currently had (two passes through my ingredient list, one looking for an exact match and one looking for something that contained it).

I ended up finding a better combination, however. I pass through once to look for an exact match and then I pass through looking for the highest result when comparing with getFuzzyDistance.

However, this created a new problem in which 'null' was never returned (meaning Alexa would never say "you don't need that ingredient". If I asked Alexa "how much pig do I need" it would return all-purpose flour, the highest ranked in fuzzyDistance. To fix this, I've added one last search at the end to make sure the result being returned at least contains the passed in ingredient value. This leads to a few weird cases not working such as asking about "oats" if the recipe specifies "oatmeal" (which worked without this check) but I think for the most part, it's getting more accurate.

Tuesday, July 19, 2016

7/19

Today I tested my skill by cooking granola bars without any reference to the recipe and I thought it went really well. It flowed easily and I had no issues until my internet cut out at the very end! The only thing that is still obviously wrong is the ingredient search aspect. I haven't really worked on the fuzzy matching issue yet, and it's really the downfall of my skill.

However, I think I've found a good way to solve this! I'll be using Apache commons text's fuzzyScore. I'm stuck right now because my maven says it can't find the dependency but I know this will resolve within a day.

A few more features I think I'll add will include being able to repeat a listen step or ingredient, as well as using the app feature more. Perhaps I'll have Alexa send the ingredients to the app so you can easily see them or know what to buy at the grocery store. all in all, I'm pleased with how my skill is turning out!

Monday, July 18, 2016

7/18

Today, I added a few new features to make my skill flow better. I added the feature to ask for the next step using "next step" and then also added an intent which would ask the user if they meant the next step or the next ingredient if they just said "next". I also added a secondary menu so after you ask for a particular recipe, it tells you not only what you're cooking (this helps with vague requests, such as asking to cook cookies, since you can hear exactly what recipe Alexa has chosen for you to cook) and gives you a list of options to ask about. This is a lot more user friendly than just starting to list all the steps.

I'm going to cook with Alexa tomorrow and take notes and have a family member do the same later in the week. I've uploaded these changes to GitHub and have also updated by ReadMe.

Thursday, July 14, 2016

7/14

Today, I fixed some more issues when trying to find the next ingredient. It wasn't able to restart, but I finally got it to work smoothly. However, Alexa is ending the session after reading each ingredient. I think this should be a simple fix, so I'll get to that next week. I also worked more on simplifying my code, fixing punctuation, etc.

Wednesday, July 13, 2016

7/13

More de-bugging today. I fix one thing to find that another thing has stopped working or broken endlessly. I was having issues with my dynamo adding backslashes and quotes in front of the title every time my ingredient index was incremented, so I tried making the ingredient index a separate data field. This has somewhat worked but took a big chunk of time.

I'm also having problems with punctuation. When I ask Alexa to read me the steps, she reads the periods as "dot," and other things like this. My biggest problem at this point, however, is that I don't know how to make this app extremely user friendly. When I ask her to make a recipe, she immediately lists the steps, which isn't helpful. However, I'm not quite sure what would be more helpful here. Another list of options could work, but when I tried playing around with this question and answer type of thing last week, I kept confusing the logic and she ended up ending the sessions or returning a bad intent error.

I'll work on this more tomorrow and later this weekend, but I won't be able to work or blog Friday since I'm going to a family reunion.

Tuesday, July 12, 2016

7/12

Today I started working on some of the bugs in my code. I had some weird issues with punctuation but I'm pretty sure I've worked that out. I spent the rest of the day introducing pagination to my ingredients. You can now ask for ingredients one by one. I'm thinking about doing this for the directions, too, but I think it might be repetitive since you can also ask for them one by one "what is step one?, what is step two? etc"

All changes have been pushed to my github!

Monday, July 11, 2016

7/11

Today I wasn't able to get a lot of work done. While on the plane, I started going through my code, cleaning it up, adding documentation, and working on expanding my list of sample utterances.

Thursday, July 7, 2016

7/7

Today, I worked on a lot of bugs in my code. It now remembers your recipe completely!! You can ask "How do I cook pancakes?" and it will give you the response. Then, you can ask "what is step three" and it recalls step three for pancakes. I also have it working for specific ingredients and all the ingredients.

I'm having some weird bugs with the formatting changing once the data is saved to Dynamo and recalled. My ingredients come back with extra spaces, commas, and brackets despite my efforts to get rid of them. However, I had to spend a while getting it the point where I could split it into different steps and ingredients (as I split it on commas or periods, and Dynamo would sometimes erase these) so I'm happy to have more punctuation than less at this moment.

I'm sure the next few weeks will be this over and over again, testing, finding errors, trying to fix, etc.
I also really need to widen my intent schema and sample utterances, I'll start this tomorrow while on the plane! Also, my newest code is uploaded to GitHub.

Wednesday, July 6, 2016

7/6

I got my code running through Alexa! However, there are still a lot of bugs. Somewhere in my method calls, I'm reseting the recipe at the wrong time. Once I request one recipe, it saves in my Dynamo, but if you ask for a further step or ingredient, it acts as if there isn't one. I'll continue to go through and de-bug tomorrow. Also, this Friday I'm traveling and may not get the chance to work or blog!

Tuesday, July 5, 2016

7/5

More efforts to get my code working with Dynamo today. With so many new storage components required for DynamoDB, I'm feeling a little lost in the woods with where things are going wrong. It's hard to test through Lambda now, since my code requires a sessionID, requestID, appID, and intent. This means that it's more difficult to know exactly what's going wrong. So far, nothing is working through Alexa. I spent quite a few hours tracing what is called in my code and trying to figure out where it's going wrong by using tons of print lines throughout my local code. 

In the last few hours, I've successfully gotten it to return the proper steps for a given recipe LOCALLY, but it doesn't return it to Dynamo yet. I was having some issues with the way I was writing to it (using DynamoDBMapper and DynamoDBMarshalling), and I haven't looked into that again since.

I've attached as screen shot of my console for the intent of getting the direction list. As you can see, there's a lot going on, a ton of methods called, and a ton of places for me to get confused. It's interesting how many times the same things are called. I'm fairly certain that my code matches the Amazon example in terms of what is called when, so I would be really curious to see if there code also repeats this many times. Maybe it's because my code is struggling to be flagged as "null"? I think this is closely related to the writing/reading through Dynamo issue which I will continue to work on.



Friday, July 1, 2016

7/1

I got my program writing to Dynamo! Now I just need to go back and make sure all my intent's know how to get the information that is written to it (since at this point, nothing is working). However, I think this was a good point to get to this week and after the holiday I'll sit down and hopefully get my intents working!