Example-centric programming: Difference between revisions

Content deleted Content added
Brc4783 (talk | contribs)
No edit summary
CEGarcia (talk | contribs)
Added several sections to the article; Removed the image
Line 1:
'''Example-Centric Programming''' is a help tool that allows an [[Integrated Development Environment]] (IDE) to show code examples or [[API]] documentation related to coding behaviors occurring in the IDE. “Borrow” tactics are often employed from online sources, by programmers leaving the IDE to troubleshoot. The purpose of Example-Centric Programming is to reduce the time spent by developers searching online. Ideally, in example-centric programming, the [[User Interface]] integrates with help module examples for assistance without programmers leaving the IDE. The idea for this type of “instant documentation” is to reduce programming interruptions.<ref>{{cite journal|last1name=Bhardwaj|first1=Anant|last2=Luciano|first2=Date|last3=Klemmer|first3=Scott|title=Redprint: integrating API specific "instant exampleblueprint" and "instant documentation" display interface in IDEs|journal=Proceedings of the 24th annual ACM symposium adjunct on User interface software and technology|date=2011|pages=21–22|doi=10.1145/2046396.2046408|url=http://dl.acm.org/citation.cfm?id=2046408}}</ref> The usage of this feature is not limited to experts, as some novices reap the benefits of an integrated knowledge base, without resorting to frequent web searches or browsing.<ref>{{cite journal|last1=Scaffidi|first1=Christopher|last2=Brandt|first2=Joel|last3=Burnett|first3=Margaret|last4=Dove|first4=Andrew|last5=Myers|first5=Brad|title=SIG: end-user programming|journal=CHI '12 Extended Abstracts on Human Factors in Computing Systems|date=2012|pages=1193–19961193-1996|doi=10.1145/2212776.2212421|url=http://dl.acm.org/citation.cfm?id=2212776.2212421&coll=DL&dl=GUIDE&CFID=597181533&CFTOKEN=26959364}}</ref>
{{under construction |placedby=CEGarcia}}
The purpose of Example-Centric Programming is to reduce the time spent by developers searching online. Ideally, in example-centric programming, the [[User Interface]] integrates with help module examples for assistance without programmers leaving the IDE. The idea for this type of “instant documentation” is to reduce programming interruptions.<ref name="redprint">{{cite journal|last1=Bhardwaj|first1=Anant|last2=Luciano|first2=Date|last3=Klemmer|first3=Scott|title=Redprint: integrating API specific "instant example" and "instant documentation" display interface in IDEs|journal=Proceedings of the 24th annual ACM symposium adjunct on User interface software and technology|date=2011|pages=21-22|doi=10.1145/2046396.2046408|url=http://dl.acm.org/citation.cfm?id=2046408}}</ref> The usage of this feature is not limited to experts, as some novices reap the benefits of an integrated knowledge base, without resorting to frequent web searches or browsing. <ref name="blueprint" />
[[File:Beanshell.png|framed|150px|right|This is a screen shot of the free Example-Centric Programming in Java using an Eclipse plug-in called beanshell]]
'''Example-Centric Programming''' is a help tool that allows an [[Integrated Development Environment]] (IDE) to show code examples or [[API]] documentation related to coding behaviors occurring in the IDE. “Borrow” tactics are often employed from online sources, by programmers leaving the IDE to troubleshoot. The purpose of Example-Centric Programming is to reduce the time spent by developers searching online. Ideally, in example-centric programming, the [[User Interface]] integrates with help module examples for assistance without programmers leaving the IDE. The idea for this type of “instant documentation” is to reduce programming interruptions.<ref>{{cite journal|last1=Bhardwaj|first1=Anant|last2=Luciano|first2=Date|last3=Klemmer|first3=Scott|title=Redprint: integrating API specific "instant example" and "instant documentation" display interface in IDEs|journal=Proceedings of the 24th annual ACM symposium adjunct on User interface software and technology|date=2011|pages=21–22|doi=10.1145/2046396.2046408|url=http://dl.acm.org/citation.cfm?id=2046408}}</ref> The usage of this feature is not limited to experts, as some novices reap the benefits of an integrated knowledge base, without resorting to frequent web searches or browsing.<ref>{{cite journal|last1=Scaffidi|first1=Christopher|last2=Brandt|first2=Joel|last3=Burnett|first3=Margaret|last4=Dove|first4=Andrew|last5=Myers|first5=Brad|title=SIG: end-user programming|journal=CHI '12 Extended Abstracts on Human Factors in Computing Systems|date=2012|pages=1193–1996|doi=10.1145/2212776.2212421|url=http://dl.acm.org/citation.cfm?id=2212776.2212421&coll=DL&dl=GUIDE&CFID=597181533&CFTOKEN=26959364}}</ref>
 
==Background==
Line 8 ⟶ 7:
Prevalence of online code repositories, documentation, blogs and forums—enables programmers to build applications iteratively searching for, modifying, and combining examples.
 
Using the web is integral to an opportunistic approach to programming when focusing on speed and ease of development over code robustness and maintainability. There is a widespread use of the web by programmers, novices and experts alike, to [[Software prototyping|prototype]], ideate, and discover. <ref name="original">{{cite journal|last1=Brandt|first1=Joel|last2=Guo|first2=Philip|last3=Lewenstein|first3=Joel|last4=Dontcheva|first4=Mira|last5=Klemmer|first5=Scott|title=Two studies of opportunistic programming: interleaving web foraging, learning, and writing code|journal=Proceedings of the SIGCHI Conference on Human Factors in Computing Systems|date=2009|pages=1589-1598|doi=10.1145/1518701.1518944}}</ref>
There are three intentions behind code based web searches: "Learning" (just in time learning), "clarification" which is connecting existing knowledge to implementation of details, and "reminder" which is the offloading memory to external resources. Reminder is often what causes breaks in workflow. Learning involves little to no prior knowledge and consists of mostly English, where copy and paste is the method of task completion. Clarification is a mix of computer code and the English language-it is immediately understood translations of code, or language analogies.
 
To develop software quickly programmers often mash up various existing systems. As part of this process, programmers must often search for suitable components and learn new skills, thus they began using the web for this purpose.
 
When developing software programmers spend 19% of their programming time on the web.<ref name="original" /> Individuals use the web to accomplish several different kinds of activities. The intentions behind web use vary in form and time spent. Programmers spend most of the time learning a new concept, the least time is spent reminding themselves of details of a concept they already know, and in between they use the web to clarify their existing knowledge.<ref name="original" />
 
Example-Centric programming tries to solve the issue of having to get out of the development environment to look for references and examples while programming. For instance, traditionally, to find API documentation and sample code, programmers will either visit the language reference website of they go to search engines and make API specific queries.<ref name="redprint" /> When trying to learn something new, programmers use [[Tutorial#Internet|web tutorials]] for just-in-time learning. Additionally, programmers deliberately choose not to remember complicated syntax and instead use the web as an external memory that can be accessed when needed. <ref name="original" />
 
==Benefits==
 
Some of the benefits of Example-Centric Programming include:
 
*Prevention of Usage Errors <ref name=codelets>{{cite journal|last1=Oney|first1=Stephen|last2=Brandt|first2=Joel|title=Codelets: linking interactive documentation and example code in the editor|journal=Proceedings of the SIGCHI Conference on Human Factors in Computing Systems|date=2012|pages=2697-2706|doi=10.1145/2207676.2208664}}</ref> <ref name=codex>{{cite journal|last1=Fast|first1=Ethan|last2=Steffee|first2=Daniel|last3=Wang|first3=Lucy|last4=Brandt|first4=Joel|last5=Bernstein|first5=Michael|title=Emergent, crowd-scale programming practice in the IDE|journal=Proceedings of the SIGCHI Conference on Human Factors in Computing Systems|date=2014|pages=2491-2500|doi=10.1145/2556288.2556998}}</ref>
*Reduction of time searching for code examples <ref name="blueprint" /> <ref name="redprint" />
*Reduction of time searching for API documentation <ref name="redprint" />
*Clarification of existing knowledge and reminding of forgotten details <ref name="blueprint" />
 
==Emergent Programming==
{{see also|Emergence}}
 
Mining and codifying emergent programming behavior can support a broad set of software engineering interfaces. By modeling how developers use programming languages in practices, algorithms for finding common idioms and detecting unlikely code can be created. <ref name="codex" />
 
Because people write more code than they share online there is a lot of duplicated effort. To fully use the power of the crowd the effort required to publish code online should be reduced.<ref name=ditty>{{cite journal|last1=Lieber|first1=Thomas|last2=Miller|first2=Rob|title=Programming with everybody: tightening the copy-modify-publish feedback loop|journal=Adjunct proceedings of the 25th annual ACM symposium on User interface software and technology|pages=101-102|doi=10.1145/2380296.2380342}}</ref>
 
==Examples==
 
;Blueprint <ref name="blueprint" />
Automatically augments queries with code context, presents a code-centric view of search results, embeds the search experience into the editor, and retains a link between copied code and its source.
Task-specific, meaning that it will specifically search for examples in the language
 
;Redprint <ref name="redprint" />
Integrates API specific "Instant Example" and "Instant Documentation" display interfaces.
 
;Codex <ref name="codex" />
Uses crowdsourced data from developers and searches all code, looking for patterns, that way if someone is coding in a strange way, Codex lets them know that they are doing something wrong.
 
;Codelets
A Codelet is a block of example code an interactive helper widget that assists the user in understanding and integrating the example.
 
==See also==
*[[Emergence]]
*[[List of human-computer interaction topics]]
*[[User experience]]
*[[User experience design]]
*[[Web usability]]
 
==References==
{{reflist|1}}
 
[[Category:Human–computer interaction]]