{"id":18,"date":"2008-10-15T10:28:59","date_gmt":"2008-10-15T14:28:59","guid":{"rendered":"https:\/\/blogs.mathworks.com\/videos\/2008\/10\/15\/puzzler-usability-study-recap\/"},"modified":"2008-10-28T13:36:34","modified_gmt":"2008-10-28T17:36:34","slug":"puzzler-usability-study-recap","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/videos\/2008\/10\/15\/puzzler-usability-study-recap\/","title":{"rendered":"Puzzler: Usability study recap"},"content":{"rendered":"<p>This <a href=\"https:\/\/blogs.mathworks.com\/videos\/2008\/10\/07\/puzzler-be-in-a-usability-study\/\">recent puzzler<\/a> was very successful with entries from four different continents.  I can understand the busy researchers of Antarctica not joining in, but I expected to hear from Australia and Africa.  The t-shirt orders have been sent out and should arrive soon.<\/p>\n<p>The movies were all interesting in different ways.  I hope to have highlights on the usability aspects up soon.  However, I can comment immediately on the coding style that we saw.  It always amazes me how differently people approach the problem.<\/p>\n<p>Here was the problem statement:<\/p>\n<p><strong>What is the sum of all the natural numbers up to and including 1,000 that are multiples of 3 or 5?<\/strong><\/p>\n<p>There were a few skills needed to solve this problem:<\/p>\n<ul>\n<li>Decide if a number met the criteria for being a multiple of 3 or 5.\n<\/li>\n<li>\nMake sure numbers like 15 were not counted twice<\/li>\n<li>Sum these numbers<\/li>\n<\/ul>\n<p>The most common methods for deciding if a number is a multiple of 3 or 5 were the commands:<\/p>\n<ul>\n<li>REM<\/li>\n<li>MOD<\/li>\n<li>[3:3:1000]<\/li>\n<li>[1:200]*5<\/li>\n<\/ul>\n<p>For REM and MOD, if there was a non-zero return from the function, then the number should NOT be added to the sum, so there was usually a logical flip-flop with the ~ operator.<\/p>\n<p>The two vector constructions would simply generate the numbers to be added directly<\/p>\n<hr>\n<p>Next, the code needed to determine if there was an overlap of the sets of numbers above.  Some people were dealing with two binary vectors (1&#8217;s if divisible and 0&#8217;s if not).  They could use the | operator to do an OR.  If not using a vector, but going through a FOR loop, they would use the || operator.<\/p>\n<p>Once this final binary vector was constructed, the indexing would be of the form:<\/p>\n<p><code>>> a = [1 2 3 4 5];<br \/>\n>> b = logical([0 0 1 0 1]);<br \/>\n>> a(b)<br \/>\nans =<br \/>\n   3     5<\/code><\/p>\n<p>Some of the people were carrying around vectors like [3 6 9 12 15] and [5 10 15].  For them, they could use the UNIQUE function to pull out the unique values and avoiding the double count of 15 and 30 and such.  UNION served a very similar purpose.<\/p>\n<hr>\n<p>The final step, adding the numbers was always done with SUM, if people were carrying around the vectors of numbers.  If people were using for loops, then it was a simple accumulator with the <code>X = X+i <\/code> type of construction.<\/p>\n<hr>\n<p>Everyone that sent in a video found the correct answer, and as hoped, we saw a range of skills.  Some people marched through without making so much as a typo, some people missed some of the productivity accelerators like using F5 to save and run a file, while some people struggled with syntax.  <\/p>\n<p>The struggles that we saw are very useful at design time in an effort to make MATLAB easier to use.  Tools like the new function hints, m-lint and the function browser are all grown from things we observe in usability studies done at The MathWorks.  <\/p>\n<p>Thank you all for participating, and if you are in the Boston area, let us know, we often are looking for people to do full studies with longer challenges.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This recent puzzler was very successful with entries from four different continents.  I can understand the busy researchers of Antarctica not joining in, but I expected to hear from Australia and&#8230; <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/videos\/2008\/10\/15\/puzzler-usability-study-recap\/\">read more >><\/a><\/p>\n","protected":false},"author":68,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[10],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/posts\/18"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/users\/68"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/comments?post=18"}],"version-history":[{"count":0,"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/posts\/18\/revisions"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/media?parent=18"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/categories?post=18"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/tags?post=18"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}