9,825 research outputs found
SQLCheck: Automated Detection and Diagnosis of SQL Anti-Patterns
The emergence of database-as-a-service platforms has made deploying database
applications easier than before. Now, developers can quickly create scalable
applications. However, designing performant, maintainable, and accurate
applications is challenging. Developers may unknowingly introduce anti-patterns
in the application's SQL statements. These anti-patterns are design decisions
that are intended to solve a problem, but often lead to other problems by
violating fundamental design principles.
In this paper, we present SQLCheck, a holistic toolchain for automatically
finding and fixing anti-patterns in database applications. We introduce
techniques for automatically (1) detecting anti-patterns with high precision
and recall, (2) ranking the anti-patterns based on their impact on performance,
maintainability, and accuracy of applications, and (3) suggesting alternative
queries and changes to the database design to fix these anti-patterns. We
demonstrate the prevalence of these anti-patterns in a large collection of
queries and databases collected from open-source repositories. We introduce an
anti-pattern detection algorithm that augments query analysis with data
analysis. We present a ranking model for characterizing the impact of
frequently occurring anti-patterns. We discuss how SQLCheck suggests fixes for
high-impact anti-patterns using rule-based query refactoring techniques. Our
experiments demonstrate that SQLCheck enables developers to create more
performant, maintainable, and accurate applications.Comment: 18 pages (14 page paper, 1 page references, 2 page Appendix), 12
figures, Conference: SIGMOD'2
Automated Refactoring in Software Automation Platforms
Software Automation Platforms (SAPs) enable faster development and reduce the need
to use code to construct applications. SAPs provide abstraction and automation, result-
ing in a low-entry barrier for users with less programming skills to become proficient
developers. An unfortunate consequence of using SAPs is the production of code with a
higher technical debt since such developers are less familiar with the software develop-
ment best practices. Hence, SAPs should aim to produce a simpler software construction
and evolution pipeline beyond providing a rapid software development environment.
One simple example of such high technical debt is the Unlimited Records anti-pattern,
which occurs whenever queries are unbounded, i.e. the maximum number of records to be
fetched is not explicitly limited. Limiting the number of records retrieved may, in many
cases, improve the performance of applications by reducing screen-loading time, thus
making applications faster and more responsive, which is a top priority for developers. A
second example is the Duplicated Code anti-pattern that severely affects code readability
and maintainability, and can even be the cause of bug propagation. To overcome this
problem we will resort to automated refactoring as it accelerates the refactoring process
and provides provably correct modifications.
This dissertation aims to study and develop a solution for automated refactorings in
the context of OutSystems (an industry-leading SAP). This was carried out by implement-
ing automated techniques for automatically refactoring a set of selected anti-patterns in
OutSystems logic that are currently detected by the OutSystems technical debt monitor-
ing tool.As Plataformas de Automação de Software (PAS) habilitam os seus utilizadores a desen-
volver aplicações de forma mais rápida e reduzem a necessidade de escrever código. Estas
fornecem abstração e automação, o que auxilia utilizadores com menos formação técnica a
tornarem-se programadores proficientes. No entanto, a integração de programadores com
menos formação técnica também contribui para a produção de código com alta dívida
técnica, uma vez que os mesmos estão menos familiarizados com as melhores práticas
de desenvolvimento de software. Desta forma, as PAS devem ter como objetivo a cons-
trução e evolução de software de forma simples para além de fornecer um ambiente de
desenvolvimento de software rápido.
Um exemplo de alta dívida técnica é o anti-padrão Unlimited Records, que ocorre
sempre que o número máximo de registos a ser retornado por uma consulta à base de
dados não é explicitamente limitado. Limitar o número de registos devolvidos pode, em
muitos casos, melhorar o desempenho das aplicações, reduzindo o tempo que demora a
carregar o ecrã, tornando assim as aplicações mais rápidas e responsivas, sendo esta uma
das principais prioridades dos programadores. Um segundo exemplo é o anti-padrão
Código Duplicado que afeta gravemente a legibilidade e manutenção do código, e que
pode causar a propagação de erros. Para superar este problema, recorreremos à reestru-
turação automatizada, pois acelera o processo de reestruturação através de modificações
comprovadamente corretas.
O objetivo desta dissertação é estudar e desenvolver uma solução para reestruturação
automatizada no contexto da OutSystems (uma PAS líder neste setor). Tal foi realizado
através da implementação de técnicas automatizadas para reestruturar um conjunto de
anti-padrões que são atualmente detetados pela ferramenta de monitorização de dívida
técnica da OutSystems
- …