skip to main content
10.5555/3005729.3005730acmotherconferencesArticle/Chapter ViewAbstractPublication PageselsConference Proceedingsconference-collections
Article

Refactoring Dynamic Languages

Published: 09 May 2016 Publication History

Abstract

Typically, beginner programmers do not master the style rules of the programming language they are using and, frequently, do not have yet the logical agility to avoid writing redundant code. As a result, although their programs might be correct, they can also be improved and it is important for the programmer to learn about the improvements that, without changing the meaning of the program, simplify it or transform it to follow the style rules of the language. These kinds of transformations are the realm of refactoring tools. However, these tools are typically associated with sophisticated integrated development environments (IDEs) that are excessively complex for beginners. In this paper, we present a refactoring tool designed for beginner programmers, which we made available in DrRacket, a simple and pedagogical IDE. Our tool provides several refactoring operations for the typical mistakes made by beginners and is intended to be used as part of their learning process.

References

[1]
Martin Fowler. Refactoring: improving the design of existing code. Pearson Education India, 1999.
[2]
Arnold Pears, Stephen Seidman, Lauri Malmi, Linda Mannila, Elizabeth Adams, Jens Bennedsen, Marie Devlin, and James Paterson. A survey of literature on the teaching of introductory programming. ACM SIGCSE Bulletin, 39(4):204-223, 2007.
[3]
Michael Kölling, Bruce Quig, Andrew Patterson, and John Rosenberg. The bluej system and its pedagogy. Computer Science Education, 13(4):249-268, 2003.
[4]
Clements J. Flanagan C. Flatt M. Krishnamurthi S. Steckler P. & Felleisen M. Findler, R. B. DrScheme: A programming environment for Scheme. Journal of functional programming, 12(2):159-182, 2002.
[5]
Flanagan C. Flatt M. Krishnamurthi S. & Felleisen M. Findler, R. B. DrScheme: A pedagogic programming environment for Scheme. Programming Languages: Implementations, Logics, and Programs, 12(2):369-388, 1997.
[6]
William G Griswold. Program restructuring as an aid to software maintenance. 1991.
[7]
Siddharta Govindaraj. Test-Driven Python Development. Packt Publishing Ltd, 2015.
[8]
Asger Feldthaus, Todd Millstein, Anders Møller, Max Schäfer, and Frank Tip. Tool-supported refactoring for javascript. ACM SIGPLAN Notices, 46(10):119-138, 2011.
[9]
Sam Tobin-Hochstadt, Vincent St-Amour, Ryan Culpepper, Matthew Flatt, and Matthias Felleisen. Languages as libraries. In ACM SIGPLAN Notices, volume 46, pages 132-141. ACM, 2011.
[10]
Pedro Palma Ramos and António Menezes Leitão. An implementation of python for racket. In 7 th European Lisp Symposium, 2014.
[11]
Pedro Palma Ramos and António Menezes Leitão. Reaching python from racket. In Proceedings of ILC 2014 on 8th International Lisp Conference, page 32. ACM, 2014.
[12]
Sander Tichelaar, Stéphane Ducasse, Serge Demeyer, and Oscar Nierstrasz. A meta-model for language-independent refactoring. In Principles of Software Evolution, 2000. Proceedings. International Symposium on, pages 154-164. IEEE, 2000.
[13]
Xi Ge, Quinton L DuBose, and Emerson Murphy-Hill. Reconciling manual and automatic refactoring. In Software Engineering (ICSE), 2012 34th International Conference on, pages 211-221. IEEE, 2012.

Recommendations

Reviews

R. Clayton

Novice programmers might benefit from code refactoring, but refactoring tools are mostly available in development environments requiring more experience than most novices possess. This paper describes a project to augment a pedagogically appropriate development environment with refactoring tools so novices may benefit from code refactoring. The result is a development environment for a Scheme-based language that more or less automatically corrects typically awkward novice code sequences and imparts a sense of acceptable code style. The three project tasks described are selecting the refactorings to provide, implementing the refactoring using development environment facilities, and presenting the refactoring tools in a helpful way. A review of prior efforts fixes an implementation based on abstract syntax trees and def-use chains. An analysis of the features and tools available in DrRacket, the target development environment, adds more implementation details involving macro expansion and code manipulation as well as workarounds for the lack of specific type information. The refactorings implemented are bounded by implementation capabilities and the refactorings most useful to novices, which are mostly code simplifications. Presenting the refactorings to novices is the trickiest task, and represents a fertile ground for further work. Evaluation of student examples shows the refactorings are helpful, particularly with respect to improving poorly structured code. The paper is well organized, short, and easy to read. The bibliography is to the point. Readers interested in implementation matters are best served by the paper; readers interested in pedagogic matters will find the paper mildly provocative. Online Computing Reviews Service

Access critical reviews of Computing literature here

Become a reviewer for Computing Reviews.

Comments

Information & Contributors

Information

Published In

cover image ACM Other conferences
ELS2016: Proceedings of the 9th European Lisp Symposium on European Lisp Symposium
May 2016
117 pages
ISBN:9782955747407

In-Cooperation

Publisher

European Lisp Scientific Activities Association

Publication History

Published: 09 May 2016

Check for updates

Author Tags

  1. Pedagogy
  2. Racket
  3. Refactoring Tool

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 45
    Total Downloads
  • Downloads (Last 12 months)0
  • Downloads (Last 6 weeks)0
Reflects downloads up to 20 Jan 2025

Other Metrics

Citations

View Options

View options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media