More Java With Lunchman
I have been seeing some progress with my Java the last couple of days. Today in the morning, I redid my coin changer Kata again. Im doing it a lot faster now, the goal is to get it down as fast as possible but Vim mode is like quick sand for me.. but thats fine, I will learn.
In the afternoon I paired with Mollie and Nick on a project they have been working on LunchMan. They had done most features apart from being able to copy peoples orders. So thats what we worked on, I put in my input where I could and Nick and Mollie were really helpful in the things I did not understand.
We came up with a number of solutions on how we would implement this feature. My idea was to add a drop down box when placing an order which gives you the option to add your own or copy one, then Nick pointed out that it would be faster to copy and paste and that we wanted the fastest possible method. Then Mollie came up with letting people put their order as the name of who they want to copy, which was the way we did it.
To do this, when someone places an order, we would loop through the list of employees and if the persons order is equal to an employees name then change their order to the person who they are copying order. This worked but Nick wanted to copy people in advance. So we would check if the person to copy has an order, and if he didn’t then do nothing. Then we added another check to the loop, if the worker who is orderings name matches another order, then update where that name is to the order he made. This also works for someone copying an order of someone who copied.