Refactoring With Regular Expressions

被引:0
|
作者
Spinellis, Diomidis [1 ,2 ]
机构
[1] Athens Univ Econ & Business, Dept Management Sci & Technol, Athens 10434, Greece
[2] Delft Univ Technol, Dept Software Technol, NL-2600 AA Delft, Netherlands
关键词
Code refractoring; Programming; Visualization; C plus plus languages; Codes; Software development management; Integrated design; Software measurement; Linux; Licenses;
D O I
10.1109/MS.2024.3439028
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Code refactoring is an essential part of software development, because it reduces technical debt, enhances long-term code sustainability, and enables the implementation of functionality that might have been incompatible with an original design. IDEs automate many refactoring tasks, but they sometimes lack support for specific operations or languages. In such cases, regular expressions offer a powerful alternative, automating tedious tasks, reducing errors, and saving time. This article shares a practical example: extending the CScout refactoring browser to collect metrics on C preprocessor usage, which required addressing widespread cyclic dependencies. The changes were facilitated by the "git-subst" Git extension, which makes global text replacements using regular expressions in Git-managed files. A series of 30 git-subst invocations were automatically generated, again using regular expression replacements. While not a cure-all, regular expressions are invaluable for many refactoring tasks, making them a key skill for software developers.
引用
收藏
页码:29 / 33
页数:5
相关论文
共 50 条
  • [1] Clone Refactoring with Lambda Expressions
    Tsantalis, Nikolaos
    Mazinanian, Davood
    Rostami, Shahriar
    2017 IEEE/ACM 39TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE), 2017, : 60 - 70
  • [2] GENERATION OF REGULAR EXPRESSIONS FOR AUTOMATA BY INTEGRAL OF REGULAR EXPRESSIONS
    SMITH, LW
    YAU, SS
    COMPUTER JOURNAL, 1972, 15 (03): : 222 - &
  • [3] Regular expressions
    Becker, P
    DR DOBBS JOURNAL, 2006, 31 (05): : 52 - +
  • [4] Regular expressions
    LeFebvre, William
    Performance Computing/Unix Review, 1999, 17 (11): : 49 - 51
  • [5] Regular expressions
    Scientific Computing and Instrumentation, 2000, 17 (08):
  • [6] A Refactoring Catalog for Lambda Expressions in Java']Java
    Teixeira Junior, Janio Elias
    Valdivieso Tobar Neto, Heres Edison
    de Faveri, Cristiano
    Saccol, Deise de Brum
    Vizzotto, Juliana Kaizer
    Piveta, Eduardo Kessler
    INTERNATIONAL JOURNAL OF SOFTWARE ENGINEERING AND KNOWLEDGE ENGINEERING, 2019, 29 (06) : 791 - 818
  • [7] Regular Transducer Expressions for Regular Transformations
    Dave, Vrunda
    Gastin, Paul
    Krishna, Shankara Narayanan
    LICS'18: PROCEEDINGS OF THE 33RD ANNUAL ACM/IEEE SYMPOSIUM ON LOGIC IN COMPUTER SCIENCE, 2018, : 315 - 324
  • [8] Regular transducer expressions for regular transformations
    Dave, Vrunda
    Gastin, Paul
    Krishna, Shankara Narayanan
    INFORMATION AND COMPUTATION, 2022, 282
  • [9] Synchronized regular expressions
    Della Penna, G
    Intrigila, B
    Tronci, E
    Zilli, MV
    ACTA INFORMATICA, 2003, 39 (01) : 31 - 70
  • [10] Regular Expressions on the Web
    Hodovan, Renata
    Herczeg, Zoltan
    Kiss, Akos
    12TH IEEE INTERNATIONAL SYMPOSIUM ON WEB SYSTEMS EVOLUTION (WSE 2010), 2010, : 29 - 32