Example-centric programming: Difference between revisions

Content deleted Content added
CEGarcia (talk | contribs)
Citation bot (talk | contribs)
Added date. | Use this bot. Report bugs. | Suggested by Abductive | Category:Human–computer interaction | #UCB_Category 165/249
 
(23 intermediate revisions by 15 users not shown)
Line 1:
'''Example-Centriccentric Programmingprogramming''' is an approach to [[software development]] that helps the user to create software by locating and modifying small examples into a helplarger whole. That approach can be helped by tooltools that allowsallow an [[Integratedintegrated Developmentdevelopment Environmentenvironment]] (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.<ref name="blueprint">{{cite journalbook|last1=Scaffidi|first1=Christopher|last2=Brandt|first2=Joel|last3=Burnett|first3=Margaret|author3-link=Margaret Burnett|last4=Dove|first4=Andrew|last5=Myers|first5=Brad|title=SIG: end-user programming|journal=CHI '12 Extended Abstracts on Human Factors in Computing Systems |chapter=SIG: End-user programming |date=2012|pages=1193–1996|doi=10.1145/2212776.2212421|urlisbn=http://dl.acm.org/citation.cfm?id9781450310161|s2cid=2212776.2212421&coll=DL&dl=GUIDE&CFID=597181533&CFTOKEN=2695936417748945 }}</ref>
The purpose of Exampleexample-Centriccentric Programmingprogramming is to reduce the time spent by developers searching online. Ideally, in example-centric programming, the [[Useruser Interfaceinterface]] 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 journalbook|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 |chapter=Redprint |date=2011|pages=21–22|doi=10.1145/2046396.2046408|urlisbn=http://dl.acm.org/citation.cfm?id9781450310147|s2cid=204640823031454 }}</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" />
 
==Background==
The growth of the web has fundamentally changed the way software is built. Vast increase in information resources and the democratization of access and distribution are main factors in the development of Exampleexample-Centriccentric Programmingprogramming for [[Endend-user development]]. Tutorials are available on the web in seconds thus broadening the space of who writes it: designers, scientists, or hobbyists. By 2012 13 million program as a part of their job, yet only three million of those are actual professional programmers.
 
The growth of the web has fundamentally changed the way software is built. Vast increase in information resources and the democratization of access and distribution are main factors in the development of Example-Centric Programming for [[End-user development]]. Tutorials are available on the web in seconds thus broadening the space of who writes it: designers, scientists, or hobbyists. By 2012 13 million program as a part of their job, yet only three million of those are actual professional programmers.
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 [[Softwaresoftware prototyping|prototype]], ideate, and discover.<ref name="original">{{cite journalbook|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 |chapter=Two studies of opportunistic programming |date=2009|pages=1589–1598|doi=10.1145/1518701.1518944|isbn=9781605582467|s2cid=2907348 }}</ref>
 
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.
Line 13 ⟶ 12:
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-Centriccentric 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 theyor 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 Exampleexample-Centriccentric Programmingprogramming include:
 
*Prevention of Usageusage Errorserrors <ref name=codelets>{{cite journalbook|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 |chapter=Codelets |date=2012|pages=2697–2706|doi=10.1145/2207676.2208664|isbn=9781450310154|s2cid=9811795 }}</ref><ref name=codex>{{cite journalbook|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 |chapter=Emergent, crowd-scale programming practice in the IDE |date=2014|pages=2491–2500|doi=10.1145/2556288.2556998|isbn=9781450324731|citeseerx=10.1.1.645.4136|s2cid=2840903 }}</ref>
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 Programmingprogramming==
{{see also|Emergence}}
 
Emergence can be defined as a process whereby larger entities, patterns, and regularities arise through interactions among smaller or simpler entities that themselves do not exhibit such properties. The extensive amount of code publicly available on the web can be used to find this type of patterns and regularities. By modeling how developers use programming languages in practices, algorithms for finding common idioms and detecting unlikely code can be created.<ref name="codex" />
 
This process is limited to the amount of code that programmers are willing and able to share. 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 journalbook|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 |chapter=Programming with everybody |pages=101–102|doi=10.1145/2380296.2380342|year=2012|isbn=9781450315821|s2cid=1319863 }}</ref>
 
==Examples==
 
;Blueprint <ref name="blueprint" />
Blueprint is a plugin for [[Adobe Flash Builder]] that 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. It is designed to help programmers with web searches and allow them to easily remember forgotten details and clarify existing knowledge.
Line 41 ⟶ 36:
 
;Redprint <ref name="redprint" />
Redprint is a browser -based development environment for [[PHP]] that integrates API specific "Instantinstant Exampleexample" and "Instantinstant Documentationdocumentation" display interfaces. UnderstandingThe prototype IDE was developed by [[Anant Bhardwaj]], then at [[Stanford University]] on the premise that task-specific example interfaces leave programmers having to understand the example code that has been found, and thus Redprint also includes an API specific search interface.<ref name="redprint"/> The API specific search interface searches for relevant API specific examples orand documentation.
 
;Codex <ref name="codex" />
Codex is a knowledge base that records common practices for [[Ruby (programming language)|Ruby]]. Uses [[Crowdsourcing |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.
 
Codex uses statistical linting to find poorly written code, or code which is syntactically different from well written code, and warn the user, pattern annotation to automatically discover common programming idioms and annotate them with metadata using crowdsourcing, and library generation to construct a utility package that encapsulates emergent software practice.
 
;Codelets<ref name=codelets/>
;Codelets<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>
A Codeletcodelet is a block of example code an interactive helper widget that assists the user in understanding and integrating the example.
 
;Bing Code Search <ref>{{cite web|last1=Shiban|first1=Ala|title=Introducing Bing Code Search for C#|url=http://blogs.msdn.com/b/visualstudio/archive/2014/02/17/introducing-bing-code-search-for-c.aspx|website=http://blogs.msdn.com/|date=17 February 2014 |accessdate=8 December 2014}}</ref>
Bing Code Search is an extension to [[Microsoft Visual Studio]] developed by a team made of people from Visual Studio, Bing and Microsoft Research that allows developers to search code examples and documentation from [[Bing (search engine)|Bing]] directly from [[IntelliSense]].
 
Bing Code Search gathers its code samples from MSDN, StackOverflow, Dotnetperls and CSharp411.
 
;Codota
Codota helps developers find typical [[Java (programming language)|Java]] code examples by analyzing millions of code snippets available on sites such as [[GitHub]] and [[StackOverflow]]. Codota ranks these examples by criteria such as commonality of the coding patterns, credibility of the origin and clarity of the code.
The Codota plugin for the [[IntelliJ IDEA]] and [[Android Studio]] IDEs allows developers to get code examples for using Java and android APIs without having to leave their editor.
 
;UpCodeIn
UpCodeIn is a source code search engine that allows developers to find and reuse software components from the Internet. A unique feature of UpCodeIn compared to other source code search engines is its ability to find code for syntax element, for example you can find methods with specific parameter type, annotation, variables.
UpCodeIn understand syntax of many programming languages like Java, JavaScript, Python and C#.
 
==See also==
*[[Emergence]]
*[[List of human-computerhuman–computer interaction topics]]
*[[User experience]]
*[[User experience design]]
Line 65 ⟶ 68:
 
==References==
{{reflist|1}}
 
== External links ==
*[https://web.archive.org/web/20151019185229/http://projects.csail.mit.edu/video/talks/hci/hciBrandt.mp4/ Joel Brandt Talk]
*[http://labs.adobe.com/technologies/blueprint/ Blueprint plugin for Adobe Flash Builder]
*[http://projects.csail.mit.edu/video/talks/hci/hciBrandt.mp4/ Joel Brandt Talk]
*[https://www.youtube.com/watch?v=ZaAUeUTbv5o/ Codelets]
 
[[Category:Human–computer interaction]]