{"id":2610,"date":"2020-04-14T12:08:53","date_gmt":"2020-04-14T12:08:53","guid":{"rendered":"http:\/\/cricca.disi.unitn.it\/montresor\/?page_id=2610"},"modified":"2023-05-12T07:21:02","modified_gmt":"2023-05-12T07:21:02","slug":"ruolo-delle-variabili-e-pattern-elementari","status":"publish","type":"page","link":"http:\/\/cricca.disi.unitn.it\/montresor\/teaching\/lcse\/letture\/ruolo-delle-variabili-e-pattern-elementari\/","title":{"rendered":"Roles of variables and elementary patterns"},"content":{"rendered":"<p>At the ori\u00adgin of this les\u00adson is the con\u00adcept of a \u201cpro\u00adgram\u00adming plan\u201d, intro\u00addu\u00adced by Soloway and Ehrlich in 1984. A pro\u00adgram\u00adming plan is a snip\u00adpet of code that repre\u00adsen\u00adts a \u201cste\u00adreo\u00adty\u00adpe\u201d solu\u00adtion to a small pro\u00adblem. An expe\u00adrien\u00adced pro\u00adgram\u00admer adap\u00adts and com\u00adbi\u00adnes the\u00adse \u201cpro\u00adgram\u00adming plans\u201d into com\u00adplex programs.<\/p>\n<p>More recen\u00adtly, this con\u00adcept has given rise to two tools that can be used in tea\u00adching pro\u00adgram\u00adming: the role of varia\u00adbles and ele\u00admen\u00adta\u00adry patterns.<\/p>\n<p>For the con\u00adcept of the role of varia\u00adbles, I sug\u00adge\u00adst two articles:<\/p>\n<ul>\n<li>J. Sajaniemi, M. Ben-Ari, P. Byckling, P. Gerdt, Y. Kulikova. <a href=\"https:\/\/www.researchgate.net\/publication\/228623601_Roles_of_variables_in_three_programming_paradigms\">Roles of varia\u00adbles in three pro\u00adgram\u00adming para\u00addigms. Computer Science Education<\/a>. (2005)<\/li>\n<li>J. Sorva, V. Karavirta, and A. Korhonen. <a href=\"http:\/\/jite.org\/documents\/Vol6\/JITEv6p407-423Sorva280.pdf\">Roles of Variables in Teaching<\/a>. Journal of Information Technology Education. Volume 6 (2006).<\/li>\n<\/ul>\n<p>Choose one! As an intro\u00adduc\u00adtion, they are essen\u00adtial\u00adly equi\u00adva\u00adlent. The fir\u00adst one is from the Sajaniemi group, which pio\u00adnee\u00adred the area for the impe\u00adra\u00adti\u00adve para\u00addigm and here extends the discus\u00adsion to the func\u00adtio\u00adna\u00adl\/o\u00adb\u00adject-orien\u00adted para\u00addigms. The second is from the Sorva group and reports some data on the use of this approach in two uni\u00adver\u00adsi\u00adty cour\u00adses. I\u2019m curious to see how you split over the arti\u00adcles and the opi\u00adnions that&nbsp;form.<\/p>\n<p>On the micro\u00adpat\u00adtern front, the lite\u00adra\u00adtu\u00adre is less sati\u00adsfy\u00ading. Just take a quick look at the fol\u00adlo\u00adwing article:<\/p>\n<ul>\n<li>Viera K. Proulx. <a href=\"http:\/\/www.ccs.northeastern.edu\/home\/vkp\/Papers\/Patterns-sigcse2000.pdf\">Programming Patterns and Design Patterns in the Introductory Computer Science Course<\/a>. Proceedings of the 31st <span class=\"caps\">SIGCSE<\/span> Technical Symposium on Computer Science Education (2000)<\/li>\n<\/ul>\n<h4>Discussion \/ Reasoning Points<\/h4>\n<ul>\n<li>Try to reflect on the pros and cons, in your opi\u00adnion, of tea\u00adching varia\u00adble roles\/elementary patterns.<\/li>\n<li>Try to think about pos\u00adsi\u00adble approa\u00adches to use when intro\u00addu\u00adcing varia\u00adble roles\/patterns to students.<\/li>\n<\/ul>\n<h4><strong>Practical exercises<\/strong><\/h4>\n<ul>\n<li>For tho\u00adse with exten\u00adsi\u00adve pro\u00adgram\u00adming expe\u00adrien\u00adce, try wri\u00adting small snip\u00adpe\u00adts of code that uti\u00adli\u00adze each of the roles of varia\u00adbles. For tho\u00adse with less expe\u00adrien\u00adce, refer to this web\u00adpa\u00adge, which is part of the <a href=\"http:\/\/saja.kapsi.fi\/var_roles\/\">Roles of Variables Home Page<\/a>.<\/li>\n<li>Try to do a simi\u00adlar exer\u00adci\u00adse regar\u00adding ele\u00admen\u00adta\u00adry pat\u00adterns. There is a dedi\u00adca\u00adted <a href=\"http:\/\/www.cs.uni.edu\/~wallingf\/patterns\/elementary\/\">web page<\/a> for Elementary Patterns, but it doe\u00adsn\u2019t pro\u00advi\u00adde an orga\u00adni\u00adzed over\u00adview of the area and is no lon\u00adger main\u00adtai\u00adned, with seve\u00adral bro\u00adken links (1). The only pages that are still avai\u00adla\u00adble are the following:<\/li>\n<\/ul>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li><a href=\"http:\/\/csis.pace.edu\/~bergin\/patterns\/Patternsv5.html\">Selection Patterns<\/a>, by Joe Bergin.<\/li>\n<li><a href=\"http:\/\/www.cs.uni.edu\/~wallingf\/patterns\/loops.html\">Loop Patterns<\/a>, by Owen Astrachan e Eugene Wallingford (2).<\/li>\n<\/ul>\n<\/li>\n<li>A much more com\u00adplex exer\u00adci\u00adse is to dust off the mate\u00adrials from your fir\u00adst pro\u00adgram\u00adming cour\u00adse and try to iden\u00adti\u00adfy roles and pat\u00adterns. In case they are not pre\u00adsent, try to think about how to modi\u00adfy the slides\/notes to inclu\u00adde&nbsp;them.<\/li>\n<\/ul>\n<h4>Material for future readings<\/h4>\n<p>Tracing back to the ori\u00adgins of this line of research, cer\u00adtain\u00adly the arti\u00adcles by Soloway, Ehrlich, and Bonar are among the most inte\u00adre\u00adsting. Unfortunately, the pre\u00adsen\u00adta\u00adtion of their ideas is frag\u00admen\u00adted across various arti\u00adcles, which, being writ\u00adten in the \u201980s, are also dif\u00adfi\u00adcult to read \u2013 both due to the out\u00adda\u00adted con\u00adstruc\u00adts used and the fact that some are still writ\u00adten with a typew\u00adri\u00adter! An inte\u00adre\u00adsting exer\u00adci\u00adse would be to read them, sum\u00adma\u00adri\u00adze them, and upda\u00adte them, fol\u00adlo\u00adwing a more modern approach.<\/p>\n<ul>\n<li>E. Soloway, K. Ehrlich, J. Bonar. <a href=\"https:\/\/dl.acm.org\/doi\/10.1145\/800049.801754\">Tapping into tacit pro\u00adgram\u00adming kno\u00adw\u00adled\u00adge<\/a>. Proceedings of the 1982 Conference on Human Factors in Computing Systems.&nbsp; (1982).<\/li>\n<li>J. Bonar, E, Soloway. <a href=\"https:\/\/dl.acm.org\/doi\/10.1145\/567067.567069\">Uncovering Principles of Novice Programming<\/a>. <span class=\"caps\">POPL<\/span> 1983: 10\u201313 (1983)<\/li>\n<li>E. Soloway, J. Bonar, K. Ehrlich. <a href=\"http:\/\/citeseerx.ist.psu.edu\/viewdoc\/download?doi=10.1.1.11.8250&amp;rep=rep1&amp;type=pdf\">Cognitive Strategies and Looping Constructs: An Empirical Study<\/a>. Commun. <span class=\"caps\">ACM<\/span> 26(11): 853\u2013860 (1983)<\/li>\n<li>E. Soloway, K, Ehrlich. <a href=\"https:\/\/www.ics.uci.edu\/~redmiles\/inf233-FQ07\/oldpapers\/SollowayEhrlich.pdf\">Empirical Studies of Programming Knowledge<\/a>. <span class=\"caps\">IEEE<\/span> Trans. Software Eng. 10(5): 595\u2013609 (1984)<\/li>\n<\/ul>\n<p>The Sajaniemi group has writ\u00adten a lar\u00adge num\u00adber of arti\u00adcles on the topic of varia\u00adble roles. Perhaps too many, in my opi\u00adnion. It would be use\u00adful to have a sur\u00advey that sum\u00adma\u00adri\u00adzes eve\u00adry\u00adthing. Here, I pro\u00adpo\u00adse only a few of them. For a more com\u00adpre\u00adhen\u00adsi\u00adve list, take a look at Sajaniemi\u2019s <a href=\"https:\/\/dblp.uni-trier.de\/pers\/s\/Sajaniemi:Jorma.html\"><span class=\"caps\">DBLP<\/span> page<\/a> bet\u00adween 2002 and&nbsp;2006.<\/p>\n<ul>\n<li>M. Kuittinen, J. Sajaniemi. <a href=\"http:\/\/www.cs.joensuu.fi\/~saja\/var_roles\/abstracts\/iticse04_kuit_saja.pdf\">Teaching roles of varia\u00adbles in ele\u00admen\u00adta\u00adry pro\u00adgram\u00adming cour\u00adses<\/a>. ITiCSE 2004: 57\u201361.<\/li>\n<li>P. Byckling, J. Sajaniemi. <a href=\"https:\/\/www.researchgate.net\/publication\/221537998_Roles_of_variables_and_programming_skills_improvement\">Roles of varia\u00adbles and pro\u00adgram\u00adming skills impro\u00adve\u00adment<\/a>. <span class=\"caps\">SIGCSE<\/span> 2006: 413\u2013417<\/li>\n<li>U. Nikula, J. Sajaniemi, M. Tedre, S. Wray. <a href=\"http:\/\/jite.org\/documents\/Vol6\/JITEv6p199-214Nikula269.pdf\">Python and Roles of Variables in Introductory Programming: Experiences from Three Educational Institutions<\/a>. <span class=\"caps\">JITE<\/span> 6: 199\u2013214 (2007).<\/li>\n<\/ul>\n<p><strong>Notes<\/strong><\/p>\n<p>(1) For someo\u00adne of my age, <span class=\"caps\">HTML<\/span> sty\u00adle takes you back in time; for the record, one of my pro\u00adfes\u00adsors kept his ori\u00adgi\u00adnal 1994 web\u00adpa\u00adge (when I was a stu\u00addent) until 2015. When he chan\u00adged it, an era ended for&nbsp;me.<\/p>\n<p>(2) However, if you fol\u00adlow some of the pat\u00adterns sug\u00adge\u00adsted in the arti\u00adcle on loop pat\u00adterns, you will be cha\u00adsed by Roberto Sebastiani with an&nbsp;axe.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>At the ori\u00adgin of this les\u00adson is the con\u00adcept of a \u201cpro\u00adgram\u00adming plan\u201d, intro\u00addu\u00adced by Soloway and Ehrlich in 1984. A pro\u00adgram\u00adming plan is a snip\u00adpet of code that repre\u00adsen\u00adts a \u201cste\u00adreo\u00adty\u00adpe\u201d solu\u00adtion to a small pro\u00adblem. An expe\u00adrien\u00adced pro\u00adgram\u00admer adap\u00adts and com\u00adbi\u00adnes the\u00adse \u201cpro\u00adgram\u00adming plans\u201d into com\u00adplex pro\u00adgrams. More recen\u00adtly, this con\u00adcept has&nbsp;given&nbsp;[\u2026]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":2311,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"wp_typography_post_enhancements_disabled":false,"footnotes":""},"class_list":["post-2610","page","type-page","status-publish","hentry","post"],"_links":{"self":[{"href":"http:\/\/cricca.disi.unitn.it\/montresor\/wp-json\/wp\/v2\/pages\/2610","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/cricca.disi.unitn.it\/montresor\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/cricca.disi.unitn.it\/montresor\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/cricca.disi.unitn.it\/montresor\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/cricca.disi.unitn.it\/montresor\/wp-json\/wp\/v2\/comments?post=2610"}],"version-history":[{"count":12,"href":"http:\/\/cricca.disi.unitn.it\/montresor\/wp-json\/wp\/v2\/pages\/2610\/revisions"}],"predecessor-version":[{"id":4844,"href":"http:\/\/cricca.disi.unitn.it\/montresor\/wp-json\/wp\/v2\/pages\/2610\/revisions\/4844"}],"up":[{"embeddable":true,"href":"http:\/\/cricca.disi.unitn.it\/montresor\/wp-json\/wp\/v2\/pages\/2311"}],"wp:attachment":[{"href":"http:\/\/cricca.disi.unitn.it\/montresor\/wp-json\/wp\/v2\/media?parent=2610"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}