The document discusses various design smells that negatively impact software quality attributes like reusability, changeability, understandability and extensibility. It covers different categories of design smells including abstraction smells, encapsulation smells and modularization smells. Some examples of specific smells discussed are missing abstraction, leaky encapsulation, broken modularization etc. The document emphasizes the importance of addressing design smells through refactoring to improve design quality and reduce technical debt.
This is a talk I gave to my Research Group about C++11/C++14.
Since many of our students know little about C++, I decided to refresh their knowledge of C++ and to teach them about the C++11 modern features.
This is a talk I gave to my Research Group about C++11/C++14.
Since many of our students know little about C++, I decided to refresh their knowledge of C++ and to teach them about the C++11 modern features.
Diffing Shotgun Surgery and Divergent Change smells in the two editions of Re...Philip Schwarz
Download for higher quality.
I find out what the changes are to the smells of Shotgun Surgery and Divergent Change in the 2019 edition of Refactoring and realise that some bits have been removed that I found valuable.
E.g. a section has been removed which IMHO highlights and pithily expresses the duality of the two smells, plus naturally links up with how they complement each other in the Single Responsibility Principle, in which the smells also line up with coupling and cohesion.
Refactoring for Design Smells - ICSE 2014 TutorialTushar Sharma
In this tutorial, we introduce a comprehensive catalog, classification, and naming scheme for design smells to the participants. We discuss important structural design smells based on how they violate the four key object oriented design principles (abstraction, encapsulation, modularization, and hierarchy). Smells are illustrated through design smells found in OpenJDK (Open source Java Development Kit) code base, with discussions on refactoring strategies for addressing them.
Software development process models
Rapid Application Development (RAD) Model
Evolutionary Process Models
Spiral Model
THE FORMAL METHODS MODEL
Specialized Process Models
The Concurrent Development Model
These slides, covering the topics of Software Maintenance and Evolution, are introductory slides to the course LINGI2252 “Software Maintenance and Evolution”, given by Prof. Kim Mens at UCL, Belgium
A quick-and-dirty introduction to Design Smells, as presented in Robert 'Uncle Bob' Martin book "Agile Software Development". Thought as the first of a series.
How to improve your code quality? The answer is continuous refactoring. Learn more about refactoring. Know the most frequent code smells (antipatterns), telling when to refactor. Go through the catalog of well-known refactorings, telling how to improve your code.
This presentation provides a brief overview about technical debt including its definition, types, and dimensions. Further, the presentation discusses a couple of ways to prevent technical debt to accumulate. Finally, the presentation reveals a few pragmatic strategies to repay technical debt in real-world settings.
Tools for Identifying and Addressing Technical DebtTushar Sharma
This presentation catalogs a few tools that are useful for identifying and addressing technical debt. The debt identification tools include smell detection tools and metrics tools. The debt addressing category includes refactoring tools and comprehension tools.
Diffing Shotgun Surgery and Divergent Change smells in the two editions of Re...Philip Schwarz
Download for higher quality.
I find out what the changes are to the smells of Shotgun Surgery and Divergent Change in the 2019 edition of Refactoring and realise that some bits have been removed that I found valuable.
E.g. a section has been removed which IMHO highlights and pithily expresses the duality of the two smells, plus naturally links up with how they complement each other in the Single Responsibility Principle, in which the smells also line up with coupling and cohesion.
Refactoring for Design Smells - ICSE 2014 TutorialTushar Sharma
In this tutorial, we introduce a comprehensive catalog, classification, and naming scheme for design smells to the participants. We discuss important structural design smells based on how they violate the four key object oriented design principles (abstraction, encapsulation, modularization, and hierarchy). Smells are illustrated through design smells found in OpenJDK (Open source Java Development Kit) code base, with discussions on refactoring strategies for addressing them.
Software development process models
Rapid Application Development (RAD) Model
Evolutionary Process Models
Spiral Model
THE FORMAL METHODS MODEL
Specialized Process Models
The Concurrent Development Model
These slides, covering the topics of Software Maintenance and Evolution, are introductory slides to the course LINGI2252 “Software Maintenance and Evolution”, given by Prof. Kim Mens at UCL, Belgium
A quick-and-dirty introduction to Design Smells, as presented in Robert 'Uncle Bob' Martin book "Agile Software Development". Thought as the first of a series.
How to improve your code quality? The answer is continuous refactoring. Learn more about refactoring. Know the most frequent code smells (antipatterns), telling when to refactor. Go through the catalog of well-known refactorings, telling how to improve your code.
This presentation provides a brief overview about technical debt including its definition, types, and dimensions. Further, the presentation discusses a couple of ways to prevent technical debt to accumulate. Finally, the presentation reveals a few pragmatic strategies to repay technical debt in real-world settings.
Tools for Identifying and Addressing Technical DebtTushar Sharma
This presentation catalogs a few tools that are useful for identifying and addressing technical debt. The debt identification tools include smell detection tools and metrics tools. The debt addressing category includes refactoring tools and comprehension tools.
Towards a Principle-based Classification of Structural Design SmellsTushar Sharma
This is our paper published in JOT (Journal of Object Technology) based on our initial work. In this paper, we present our (early) catalog, classification, and naming scheme for design smells and also highlight several interesting observations and insights that result from our work.
This document provides a non-exhaustive list of commonly available tools - along with their categories, supported languages, license, and web-site link - that can help in the process of refactoring to repay technical debt.
Technical debt in a software system not only impacts the productivity of the team but also compromises the external product quality. Technical debt needs to be managed pragmatically to ensure discipline, value, and quality.
Manual design reviews are effective in finding smells in design. Use this checklist when you are reviewing UML diagrams (mainly class diagrams) or code to find smells in your software.
Refactoring for Software Design Smells: Managing Technical DebtTushar Sharma
Technical Debt is a major concern today for huge and long-life maintenance projects. You can address technical debt in your project by identifying smells in your project and refactoring them. We have classified and cataloged 25 commonly-occurring design smells according to the design principles they violate.
The tutorial titled "Applying design principles in practice" was presented in ISEC (India Software Engg Conference) on 18th Feb 2015 in Bengaluru by Tushar Sharma, Ganesh Samarthyam, and Girish Suryanarayana.
Achieving Design Agility by Refactoring Design SmellsTushar Sharma
This workshop starts with illustration to “Design agility” and highlight the commonly perceived ignorance in current practices associated with design agility. The workshop extensively covers design smells, its classification and catalog, and a series of examples of smells and their impact on software quality. The workshop engages the participants in an exercise to let participants identify smells and their corresponding refactorings.
A Study on Code Smell Detection with Refactoring Tools in Object Oriented Lan...ijcnes
A code smell is an indication in the source code that hypothetically indicates a design problem in the equivalent software. The Code smells are certain code lines which makes problems in source code. It also means that code lines are bad design shape or any code made by bad coding practices. Code smells are structural characteristics of software that may indicates a code or drawing problem that makes software hard to evolve and maintain, and may trigger refactoring of code. In this paper, we proposed some success issues for smell detection tools which can assistance to develop the user experience and therefore the acceptance of such tools. The process of detecting and removing code smells with refactoring can be overwhelming.
Software Refactoring Under Uncertainty: A Robust Multi-Objective ApproachWiem Mkaouer
Refactoring large systems involves several sources of uncertainty related to the severity levels of code smells to be corrected and the importance of the classes in which the smells are located. Due to the dynamic nature of software development, these values cannot be accurately determined in practice, leading to refactoring sequences that lack robustness. To address this problem, we introduced a multi-objective robust model, based on NSGA-II, for the software refactoring problem that tries to find the best trade-off between quality and robustness. We evaluated our approach using six open source systems and demonstrated that it is significantly better than state-of-the-art refactoring approaches in terms of robustness in 100% of experiments based on a variety of real-world scenarios. Our suggested refactoring solutions were found to be comparable in terms of quality to those suggested by existing approaches and to carry an acceptable robustness price. Our results also revealed an interesting feature about the trade-off between quality and robustness that demonstrates the practical value of taking robustness into account in software refactoring tasks.
So You Just Inherited a $Legacy Application...Joe Ferguson
You were just handed the keys to a new repo. Your first glance over the code base causes the fearful "LEGACY" word to ring in your head. HAVE NO FEAR! I'll share the techniques I've learned after working on several legacy codebases to help update that old code to the current PHP generation. We'll cover triaging the old code base, writing tests to make sure you don't break anything, and how to modernize your old code base!
So You Just Inherited a $Legacy Application… NomadPHP July 2016Joe Ferguson
You were just handed the keys to a new repo. Your first glance over the code base causes the fearful “LEGACY” word to ring in your head. HAVE NO FEAR! I’ll share the techniques I’ve learned after working on several legacy codebases to help update that old code to the current PHP generation. We’ll cover triaging the old code base, writing tests to make sure you don’t break anything, and how to modernize your old code base!
GENERATING SOFTWARE PRODUCT LINE MODEL BY RESOLVING CODE SMELLS IN THE PRODUC...ijseajournal
Software Product Lines (SPLs) refer to some software engineering methods, tools and techniques for creating a collection of similar software systems from a shared set of software assets using a common means of production. This concept is recognized as a successful approach to reuse in software development. Its purpose is to reduce production costs by reusing existing features and managing the variability between the different products with respect of particular constraints. Software Product Line engineering is the production process in product lines and the development of a family of systems by reusing core assets. It exploits the commonalities between software products and preserves the ability to vary the functionalities and features between these products. The adopted strategy for building SPL can be a top-down or bottom-up. Depending from the selected strategy, it is possible to face an inappropriate implementation in the SPL Model or the derived products during this process. The code can contain code smells or code anomalies. Code smells are considered as problems in source code which can have an impact on the quality of the derived products of an SPL. The same problem can be present in many derived products from an SPL due to reuse or in the obtained product line when the bottom-up strategy is selected. A possible solution to this problem can be the refactoring which can improve the internal structure of source code without altering external behavior. This paper proposes an approach for building SPL from source code using the bottom-up strategy. Its purpose is to reduce code smells in the obtained SPL using refactoring source code. This approach proposes a possible solution using reverse engineering to obtain the feature model of the SPL
GENERATING SOFTWARE PRODUCT LINE MODEL BY RESOLVING CODE SMELLS IN THE PRODUC...ijseajournal
Software Product Lines (SPLs) refer to some software engineering methods, tools and techniques for
creating a collection of similar software systems from a shared set of software assets using a common
means of production. This concept is recognized as a successful approach to reuse in software
development. Its purpose is to reduce production costs by reusing existing features and managing the
variability between the different products with respect of particular constraints. Software Product Line
engineering is the production process in product lines and the development of a family of systems by
reusing core assets. It exploits the commonalities between software products and preserves the ability to
vary the functionalities and features between these products. The adopted strategy for building SPL can be
a top-down or bottom-up. Depending from the selected strategy, it is possible to face an inappropriate
implementation in the SPL Model or the derived products during this process. The code can contain code
smells or code anomalies. Code smells are considered as problems in source code which can have an
impact on the quality of the derived products of an SPL. The same problem can be present in many derived
products from an SPL due to reuse or in the obtained product line when the bottom-up strategy is selected.
A possible solution to this problem can be the refactoring which can improve the internal structure of
source code without altering external behavior. This paper proposes an approach for building SPL from
source code using the bottom-up strategy. Its purpose is to reduce code smells in the obtained SPL using
refactoring source code. This approach proposes a possible solution using reverse engineering to obtain
the feature model of the SPL.
Generating Software Product Line Model by Resolving Code Smells in the Produc...ijseajournal
Software Product Lines (SPLs) refer to some software engineering methods, tools and techniques for
creating a collection of similar software systems from a shared set of software assets using a common
means of production. This concept is recognized as a successful approach to reuse in software
development. Its purpose is to reduce production costs by reusing existing features and managing the
variability between the different products with respect of particular constraints. Software Product Line
engineering is the production process in product lines and the development of a family of systems by
reusing core assets. It exploits the commonalities between software products and preserves the ability to
vary the functionalities and features between these products. The adopted strategy for building SPL can be
a top-down or bottom-up. Depending from the selected strategy, it is possible to face an inappropriate
implementation in the SPL Model or the derived products during this process. The code can contain code
smells or code anomalies. Code smells are considered as problems in source code which can have an
impact on the quality of the derived products of an SPL. The same problem can be present in many derived
products from an SPL due to reuse or in the obtained product line when the bottom-up strategy is selected.
A possible solution to this problem can be the refactoring which can improve the internal structure of
source code without altering external behavior. This paper proposes an approach for building SPL from
source code using the bottom-up strategy. Its purpose is to reduce code smells in the obtained SPL using
refactoring source code. This approach proposes a possible solution using reverse engineering to obtain
the feature model of the SPL.
Phil Calçado - Your microservice as a functionScala Italy
SoundCloud's microservice architecture is built mostly in Scala, using Finagle as its distributed systems workhorse. Finagle is an RPC system for the JVM, and it is based on a pipes-and-filters architecture that maps very nicely to functional programming concepts of higher-order functions and combinators. Over the past few years we have found that it is extremely useful to go even a step further and think of microservices as functions themselves. In this talk let's explore how SoundCloud uses Scala and Finagle, and how we started thinking of a microservices architecture as a special case of a functional system.
ScalaItaly 2015 - Your Microservice as a FunctionPhil Calçado
SoundCloud's microservice architecture is built mostly in Scala, using Finagle as its distributed systems workhorse. Finagle is an RPC system for the JVM, and it is based on a pipes-and-filters architecture that maps very nicely to functional programming concepts of higher-order functions and combinators. Over the past few years we have found that it is extremely useful to go even a step further and think of microservices as functions themselves. In this talk let's explore how SoundCloud uses Scala and Finagle, and how we started thinking of a microservices architecture as a special case of a functional system.
Similar to Refactoring for Software Design Smells - 1 day Workshop (20)
Almost everything can be done using refactoring tools:
* How to get buy-in for refactoring? (use Technical Debt quantification tools)
* How to identify refactoring candidates? (use smell detection tools)
* How to prioritize / identify what to refactor first? (use reports from design analysis tools)
* How do I identify dependencies and evaluate impact of refactoring? (use visulization tools)
* How to I actually perform refactoring? (Use IDE support for automated refactoring and use them!)
Deriving from a rich experience in using tools for refactoring in real-world projects, this talk takes you through a whirl-wind tour of refactoring tools (of course for Java). What's more, this talk includes quick demos of some of these tools so you can see them in action.
Presented in BoJUG meetup on 19th Jan in Bangalore - https://www.meetup.com/BangaloreOpenJUG/events/257183518/
Please check out the workshop "AI meets Blockchain" at HIPC 2018, in Bangalore: http://hipc.org/ai-blockchain/
HIPC is a premier conference and hence getting a paper accepted in HIPC workshop would be quite an accomplishment for any blockchain/AI enthusiast. Check out the details in this poster on submissions.
I have been fortunate to have worked with some geeks with incredible coding skills. I felt amazed at how they can play games with compilers, perform magic with their incantations on the shell, and solve some insanely complex algorithm problems with ease. I naively assumed that they are going to achieve greatness in near future. Alas, I was wrong. Really wrong. [Read the rest of the article ... ]
Many students reach out to me asking for project ideas they can do as a summer project for learning. Here is an interesting project idea - implement your own java disassembler (and expand it to a VM later).
Design Patterns - Compiler Case Study - Hands-on ExamplesGanesh Samarthyam
This presentation takes a case-study based approach to design patterns. A purposefully simplified example of expression trees is used to explain how different design patterns can be used in practice. Examples are in C#, but is relevant for anyone who is from object oriented background.
This presentation provides an overview of recently concluded Bangalore Container Conference (07-April-2017). See www.containerconf.in for more details.
Bangalore Container Conference 2017 (BCC '17) is the first conference on container technologies in India happening on 07th April. Organizations are increasingly adopting containers and related technologies in production.Hence, the main focus of this conference is “Containers in Production”. This one-day conference sets the perfect stage for container enthusiasts, developers, users and experts to meet together and learn from each others experiences.
Presented in Bangalore Open Java User Group on 21st Jan 2017
Awareness of design smells - Design comes before code. A care at design level can solve lot of problems.
Indicators of common design problems - helps developers or software engineers understand mistakes made while designing and apply design principles for creating high-quality designs. This presentation provides insights gained from performing refactoring in real-world projects to improve refactoring and reduce the time and costs of managing software projects. The talk also presents insightful anecdotes and case studies drawn from the trenches of real-world projects. By attending this talk, you will know pragmatic techniques for refactoring design smells to manage technical debt and to create and maintain high-quality software in practice. All the examples in this talk are in Java.
Bangalore Container Conference 2017 (BCC '17) is the first conference on container technologies in India. Organizations are increasingly adopting containers and related technologies in production. Hence, the main focus of this conference is “Containers in Production”. This one-day conference sets the perfect stage for container enthusiasts, developers, users and experts to meet together and learn from each others experiences.
This presentation covers quiz questions prepared for the Core Java meetup on 1st October in Accion Labs. It has questions from "Java best practices", "bytecodes", and "elastic search".
Navigating the Metaverse: A Journey into Virtual Evolution"Donna Lenk
Join us for an exploration of the Metaverse's evolution, where innovation meets imagination. Discover new dimensions of virtual events, engage with thought-provoking discussions, and witness the transformative power of digital realms."
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Shahin Sheidaei
Games are powerful teaching tools, fostering hands-on engagement and fun. But they require careful consideration to succeed. Join me to explore factors in running and selecting games, ensuring they serve as effective teaching tools. Learn to maintain focus on learning objectives while playing, and how to measure the ROI of gaming in education. Discover strategies for pitching gaming to leadership. This session offers insights, tips, and examples for coaches, team leads, and enterprise leaders seeking to teach from simple to complex concepts.
Enterprise Resource Planning System includes various modules that reduce any business's workload. Additionally, it organizes the workflows, which drives towards enhancing productivity. Here are a detailed explanation of the ERP modules. Going through the points will help you understand how the software is changing the work dynamics.
To know more details here: https://blogs.nyggs.com/nyggs/enterprise-resource-planning-erp-system-modules/
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Globus
The U.S. Geological Survey (USGS) has made substantial investments in meeting evolving scientific, technical, and policy driven demands on storing, managing, and delivering data. As these demands continue to grow in complexity and scale, the USGS must continue to explore innovative solutions to improve its management, curation, sharing, delivering, and preservation approaches for large-scale research data. Supporting these needs, the USGS has partnered with the University of Chicago-Globus to research and develop advanced repository components and workflows leveraging its current investment in Globus. The primary outcome of this partnership includes the development of a prototype enterprise repository, driven by USGS Data Release requirements, through exploration and implementation of the entire suite of the Globus platform offerings, including Globus Flow, Globus Auth, Globus Transfer, and Globus Search. This presentation will provide insights into this research partnership, introduce the unique requirements and challenges being addressed and provide relevant project progress.
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisGlobus
JASMIN is the UK’s high-performance data analysis platform for environmental science, operated by STFC on behalf of the UK Natural Environment Research Council (NERC). In addition to its role in hosting the CEDA Archive (NERC’s long-term repository for climate, atmospheric science & Earth observation data in the UK), JASMIN provides a collaborative platform to a community of around 2,000 scientists in the UK and beyond, providing nearly 400 environmental science projects with working space, compute resources and tools to facilitate their work. High-performance data transfer into and out of JASMIN has always been a key feature, with many scientists bringing model outputs from supercomputers elsewhere in the UK, to analyse against observational or other model data in the CEDA Archive. A growing number of JASMIN users are now realising the benefits of using the Globus service to provide reliable and efficient data movement and other tasks in this and other contexts. Further use cases involve long-distance (intercontinental) transfers to and from JASMIN, and collecting results from a mobile atmospheric radar system, pushing data to JASMIN via a lightweight Globus deployment. We provide details of how Globus fits into our current infrastructure, our experience of the recent migration to GCSv5.4, and of our interest in developing use of the wider ecosystem of Globus services for the benefit of our user community.
Cyaniclab : Software Development Agency Portfolio.pdfCyanic lab
CyanicLab, an offshore custom software development company based in Sweden,India, Finland, is your go-to partner for startup development and innovative web design solutions. Our expert team specializes in crafting cutting-edge software tailored to meet the unique needs of startups and established enterprises alike. From conceptualization to execution, we offer comprehensive services including web and mobile app development, UI/UX design, and ongoing software maintenance. Ready to elevate your business? Contact CyanicLab today and let us propel your vision to success with our top-notch IT solutions.
Listen to the keynote address and hear about the latest developments from Rachana Ananthakrishnan and Ian Foster who review the updates to the Globus Platform and Service, and the relevance of Globus to the scientific community as an automation platform to accelerate scientific discovery.
We describe the deployment and use of Globus Compute for remote computation. This content is aimed at researchers who wish to compute on remote resources using a unified programming interface, as well as system administrators who will deploy and operate Globus Compute services on their research computing infrastructure.
In software engineering, the right architecture is essential for robust, scalable platforms. Wix has undergone a pivotal shift from event sourcing to a CRUD-based model for its microservices. This talk will chart the course of this pivotal journey.
Event sourcing, which records state changes as immutable events, provided robust auditing and "time travel" debugging for Wix Stores' microservices. Despite its benefits, the complexity it introduced in state management slowed development. Wix responded by adopting a simpler, unified CRUD model. This talk will explore the challenges of event sourcing and the advantages of Wix's new "CRUD on steroids" approach, which streamlines API integration and domain event management while preserving data integrity and system resilience.
Participants will gain valuable insights into Wix's strategies for ensuring atomicity in database updates and event production, as well as caching, materialization, and performance optimization techniques within a distributed system.
Join us to discover how Wix has mastered the art of balancing simplicity and extensibility, and learn how the re-adoption of the modest CRUD has turbocharged their development velocity, resilience, and scalability in a high-growth environment.
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns
Unlocking Business Potential: Tailored Technology Solutions by Prosigns
Discover how Prosigns, a leading technology solutions provider, partners with businesses to drive innovation and success. Our presentation showcases our comprehensive range of services, including custom software development, web and mobile app development, AI & ML solutions, blockchain integration, DevOps services, and Microsoft Dynamics 365 support.
Custom Software Development: Prosigns specializes in creating bespoke software solutions that cater to your unique business needs. Our team of experts works closely with you to understand your requirements and deliver tailor-made software that enhances efficiency and drives growth.
Web and Mobile App Development: From responsive websites to intuitive mobile applications, Prosigns develops cutting-edge solutions that engage users and deliver seamless experiences across devices.
AI & ML Solutions: Harnessing the power of Artificial Intelligence and Machine Learning, Prosigns provides smart solutions that automate processes, provide valuable insights, and drive informed decision-making.
Blockchain Integration: Prosigns offers comprehensive blockchain solutions, including development, integration, and consulting services, enabling businesses to leverage blockchain technology for enhanced security, transparency, and efficiency.
DevOps Services: Prosigns' DevOps services streamline development and operations processes, ensuring faster and more reliable software delivery through automation and continuous integration.
Microsoft Dynamics 365 Support: Prosigns provides comprehensive support and maintenance services for Microsoft Dynamics 365, ensuring your system is always up-to-date, secure, and running smoothly.
Learn how our collaborative approach and dedication to excellence help businesses achieve their goals and stay ahead in today's digital landscape. From concept to deployment, Prosigns is your trusted partner for transforming ideas into reality and unlocking the full potential of your business.
Join us on a journey of innovation and growth. Let's partner for success with Prosigns.
In the ever-evolving landscape of technology, enterprise software development is undergoing a significant transformation. Traditional coding methods are being challenged by innovative no-code solutions, which promise to streamline and democratize the software development process.
This shift is particularly impactful for enterprises, which require robust, scalable, and efficient software to manage their operations. In this article, we will explore the various facets of enterprise software development with no-code solutions, examining their benefits, challenges, and the future potential they hold.
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Globus
Large Language Models (LLMs) are currently the center of attention in the tech world, particularly for their potential to advance research. In this presentation, we'll explore a straightforward and effective method for quickly initiating inference runs on supercomputers using the vLLM tool with Globus Compute, specifically on the Polaris system at ALCF. We'll begin by briefly discussing the popularity and applications of LLMs in various fields. Following this, we will introduce the vLLM tool, and explain how it integrates with Globus Compute to efficiently manage LLM operations on Polaris. Attendees will learn the practical aspects of setting up and remotely triggering LLMs from local machines, focusing on ease of use and efficiency. This talk is ideal for researchers and practitioners looking to leverage the power of LLMs in their work, offering a clear guide to harnessing supercomputing resources for quick and effective LLM inference.
First Steps with Globus Compute Multi-User EndpointsGlobus
In this presentation we will share our experiences around getting started with the Globus Compute multi-user endpoint. Working with the Pharmacology group at the University of Auckland, we have previously written an application using Globus Compute that can offload computationally expensive steps in the researcher's workflows, which they wish to manage from their familiar Windows environments, onto the NeSI (New Zealand eScience Infrastructure) cluster. Some of the challenges we have encountered were that each researcher had to set up and manage their own single-user globus compute endpoint and that the workloads had varying resource requirements (CPUs, memory and wall time) between different runs. We hope that the multi-user endpoint will help to address these challenges and share an update on our progress here.
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamtakuyayamamoto1800
In this slide, we show the simulation example and the way to compile this solver.
In this solver, the Helmholtz equation can be solved by helmholtzFoam. Also, the Helmholtz equation with uniformly dispersed bubbles can be simulated by helmholtzBubbleFoam.
How to Position Your Globus Data Portal for Success Ten Good PracticesGlobus
Science gateways allow science and engineering communities to access shared data, software, computing services, and instruments. Science gateways have gained a lot of traction in the last twenty years, as evidenced by projects such as the Science Gateways Community Institute (SGCI) and the Center of Excellence on Science Gateways (SGX3) in the US, The Australian Research Data Commons (ARDC) and its platforms in Australia, and the projects around Virtual Research Environments in Europe. A few mature frameworks have evolved with their different strengths and foci and have been taken up by a larger community such as the Globus Data Portal, Hubzero, Tapis, and Galaxy. However, even when gateways are built on successful frameworks, they continue to face the challenges of ongoing maintenance costs and how to meet the ever-expanding needs of the community they serve with enhanced features. It is not uncommon that gateways with compelling use cases are nonetheless unable to get past the prototype phase and become a full production service, or if they do, they don't survive more than a couple of years. While there is no guaranteed pathway to success, it seems likely that for any gateway there is a need for a strong community and/or solid funding streams to create and sustain its success. With over twenty years of examples to draw from, this presentation goes into detail for ten factors common to successful and enduring gateways that effectively serve as best practices for any new or developing gateway.
3. 3
Why care about software quality?
Poor software quality
costs more than $150 billion
per annum in U.S.
and greater than $500 billion
per annum worldwide
- Capers Jones
4. Capers Jones on design errors in industrial software
* http://sqgne.org/presentations/2012-13/Jones-Sep-2012.pdf
0
20
40
60
80
100
120
IBM
Corportation
(MVS)
SPR Corporation
(Client Studies)
TRW
Corporation
MITRE
Corporation
Nippon Electric
Corp
PercentageContribution
Industry Data on Defect Origins
Adminstrative Errors
Documentation Errors
Bad Fixes
Coding Errors
Design Errors
Requirements Errors
Up to 64% of software defects can be traced back
to errors in software design in enterprise software!
5. 5
Why care about design quality?
Poor software quality
costs more than $150
billion per year in U.S. and
greater than $500 billion
per year worldwide
The debt that accrues when
you knowingly or unknowingly
make wrong or non-optimal
design decisions
Software
Quality
Technical
Debt
Design
Quality
Design Quality means changeability,
extensibility, understandability, reusability, …
6. 6
Technical debt
“Technical debt is the debt that accrues
when you knowingly or unknowingly make
wrong or non-optimal design decisions”
Reference: Refatoring for Software Design Smells– Girish et al Morgan Kaufman 2014
7. 7
Why care about technical debt?
Global 'IT Debt' as $500 billion
for the year 2010, with
potential to grow to $1 trillion
by 2015
- Gartner
8. 8
Why care about technical debt?
Reference: Zen and the art of software quality – Jim Highsmith Agile 2009 conference
9. 9
What constitutes technical debt?
…
Code debt
Static
analysis tool
violations
Inconsistent
coding style
Design debt
Design smells
Violations of
design rules
Test debt
Lack of tests
Inadequate
test coverage
Documentation
debt
No
documentation
for important
concerns
Outdated
documentation
12. 12
Why care about refactoring?
As an evolving program is
continually changed, its
complexity, reflecting
deteriorating structure,
increases unless work is done
to maintain or reduce it
- Lehman's law of Increasing
Complexity
13. 13
What are design smells?
“Design smells are certain structures in the
design that indicate
violation of fundamental design principles
and
negatively impact design quality”
Reference: Refatoring for Software Design Smells– Girish et al Morgan Kaufman 2014
14. 14
What is design quality?
Quality
Attribute
Definition
Understandability The ease with which the design fragment can be comprehended.
Changeability
The ease with which a design fragment can be modified (without causing
ripple effects) when an existing functionality is changed.
Extensibility
The ease with which a design fragment can be enhanced or extended (without
ripple effects) for supporting new functionality.
Reusability
The ease with which a design fragment can be used in a problem context other
than the one for which the design fragment was originally developed.
Testability
The ease with which a design fragment supports the detection of defects
within it via testing.
Reliability
The extent to which the design fragment supports the correct realization of
the functionality and helps guard against the introduction of runtime
problems.
19. 19
Why should we focus on smells?
A good designer is one who
knows the design solutions
A GREAT designer is one who
understands the impact of
design smells and knows how to
address them
20. 20
Design smells as violations of fundamental principles
What do smells indicate?
Violations of
fundamental design
principles
We use Booch’s fundamental
principles for classification
and naming of smells
This helps identify cause of
the smell and potential
refactoring as well
21. 21
Design principles used to classify design smells
DesignPrinciples
Abstraction
Encapsulation
Modularization
Hierarchy
22. 22
Design principles and enabling techniques
PHAME: Principles of Hierarchy, Abstraction, Modularization and Encapsulation
23. 23
What is refactoring?
Refactoring (noun): a change
made to the internal structure of
software to make it easier to
understand and cheaper to
modify without changing its
observable behavior
Refactor (verb): to restructure
software by applying a series
of refactorings without
changing its observable
behavior
24. 24
A note on examples in this presentation
Almost all examples are from real-world software
Most examples are from OpenJDK 7.0 (open source)
Examples from industrial software are “sanitized” – they do not reveal
anything about where they came from…
All illustrations are mostly as UML diagrams so no need to know Java
Though you’ll appreciate them more if you are from a Java background
A few code examples are in Java, because JAVA is the most widely
used language
They are simple enough for people of any programming background to
understand
28. 28
The principle of abstraction
“The principle of abstraction advocates the simplification of entities
through reduction and generalization: reduction is by elimination of
unnecessary details and generalization is by identification and
specification of common and important characteristics”
30. 30
public class Throwable {
// following method is available from Java 1.0 version.
// Prints the stack trace as a string to standard output
// for processing a stack trace,
// we need to write regular expressions
public void printStackTrace();
// other methods omitted
}
31. 31
Missing abstraction
This smell arises when clumps of data or encoded strings are used
instead of creating a class or an interface.
32. 32
Refactoring for missing abstraction smell
public class Throwable {
// following method is available from Java 1.0 version.
// Prints the stack trace as a string to standard output
// for processing a stack trace,
// we need to write regular expressions
public void printStackTrace();
// other methods omitted
}
public class Throwable {
public void printStackTrace();
public StackTraceElement[] getStackTrace(); // Since 1.4
// other methods omitted
}
public final class StackTraceElement {
public String getFileName();
public int getLineNumber();
public String getClassName();
public String getMethodName();
public boolean isNativeMethod();
}
34. 34
Imperative abstraction
This smell arises when an operation is turned into a class.
This smell manifests as a class that has only one method defined
within the class. At times, the class name itself may be identical to
the one method defined within it.
37. 37
Incomplete abstraction
• This smell arises when a type does not support a responsibility completely
• Specifically, the public interface of the type is incomplete in that it does not
support all behavior needed by objects of its type
38. 38
Incomplete abstraction – Example
In this case, the MutableTreeNode
supports only setUserObject but no
corresponding getUserObject (which is
provided in its derived class!)
Hence, MutableTreeNode has
Incomplete Abstraction smell
How to fix it? Provide all the necessary
and relevant methods required for
satisfying a responsibility completely in
the class itself
In case of public APIs (as in this case), it
is often “too late” to fix it!
40. 40
How to refactor & in future avoid this smell?
For each abstraction (especially in public interface) look out for symmetrical
methods or methods that go together
For example, methods for comparing equality of objects and getting
hash code (in Java/C#)
Look out for missing matching methods in symmetrical methods (see table)
min/max open/close create/destroy get/set
read/write print/scan first/last begin/end
start/stop lock/unlock show/hide up/down
source/target insert/delete first/last push/pull
enable/disable acquire/release left/right on/off
45. 45
public class FormattableFlags {
// Explicit instantiation of this class is prohibited.
private FormattableFlags() {}
/** Left-justifies the output. */
public static final int LEFT_JUSTIFY = 1<<0; // '-'
/** Converts the output to upper case */
public static final int UPPERCASE = 1<<1; // 'S'
/**Requires the output to use an alternate form. */
public static final int ALTERNATE = 1<<2; // '#'
}
46. 46
class Currency {
public static String DOLLAR = "u0024";
public static String EURO = "u20AC";
public static String RUPEE = "u20B9";
public static String YEN = "u00A5";
// no other members in this class
}
47. 47
Unnecessary abstraction
The smell occurs when an abstraction gets introduced in a software
design which is actually not needed and thus could have been avoided.
49. 49
Unutilized abstraction
This smell arises when an abstraction is left unused (either not
directly used or not reachable).
Two forms:
• Unreferenced abstractions – Concrete classes that are not
being used by anyone
• Orphan abstractions – Stand-alone interfaces/abstract classes
that do not have any derived abstractions
52. 52
• executing objects of type ActionEvent at
specified intervals
javax.swing.Timer
• scheduling a thread to execute in the future as a
background thread
java.util.Timer
• sending out an alarm to wake-up the listeners
that have registered to get timer notifications
javax.management.timer.
Timer
53. 53
/*
* Note on casts to double below. If the arithmetic of
* x+w or y+h is done in float, then some bits may be
* lost if the binary exponents of x/y and w/h are not
* similar. By converting to double before the addition
* we force the addition to be carried out in double to
* avoid rounding error in the comparison.
*
* See bug 4320890 for problems that this inaccuracy causes.
*/
/*
* Note on casts to double below. If the arithmetic of
* x+w or y+h is done in int, then we may get integer
* overflow. By converting to double before the addition
* we force the addition to be carried out in double to
* avoid overflow in the comparison.
*
* See bug 4320890 for problems that this can cause.
*/
Rectangle2D class Rectangle class
56. 56
Types of clones
• exactly identical except for variations in whitespace, layout, and
comments
Type 1
• syntactically identical except for variation in symbol names, whitespace,
layout, and comments
Type 2
• identical except some statements changed, added, or removed
Type 3
• when the fragments are semantically identical but implemented by
syntactic variants
Type 4
60. 60
The principle of encapsulation
“The principle of encapsulation advocates separation of concerns and
information hiding through techniques such as hiding implementation
details of abstractions and hiding variations”
63. 63
Lenient encapsulation
This design smell arises when the hiding is deficient so that clients
can access the implementation aspects of the abstraction directly
(An abstraction should expose only the interface to the clients
and hide the implementation details.)
64. 64
Lenient encapsulation – Example
The java.awt.Rectangle class has 4
pubic fields: x, y, width, and height
in addition to public getter and
setter methods for these fields!
Smell since the accessibility of
its members is more permissive
(i.e., are declared public) than
actually required (i.e., they are
required to be declared private)
Refactoring suggestion: Make all
data members private
Lenient
encapsulation
Insufficient
modularization
77. 77
switch (transferType) {
case DataBuffer.TYPE_BYTE:
byte bdata[] = (byte[])inData;
pixel = bdata[0] & 0xff;
length = bdata.length;
break;
case DataBuffer.TYPE_USHORT:
short sdata[] = (short[])inData;
pixel = sdata[0] & 0xffff;
length = sdata.length;
break;
case DataBuffer.TYPE_INT:
int idata[] = (int[])inData;
pixel = idata[0];
length = idata.length;
break;
default:
throw new UnsupportedOperationException("This method has not been "+ "implemented
for transferType " + transferType);
}
78. 78
Unexploited encapsulation
This smell arises when client code uses explicit type checks (using
chained if-else or switch statements that check for the type of the
object) instead of exploiting the variation in types already
encapsulated within a hierarchy.
79. 79
Refactoring unexploited encapsulation smell
protected int transferType; protected DataBuffer dataBuffer;
pixel = dataBuffer.getPixel();
length = dataBuffer.getSize();
switch (transferType) {
case DataBuffer.TYPE_BYTE:
byte bdata[] = (byte[])inData;
pixel = bdata[0] & 0xff;
length = bdata.length;
break;
case DataBuffer.TYPE_USHORT:
short sdata[] = (short[])inData;
pixel = sdata[0] & 0xffff;
length = sdata.length;
break;
case DataBuffer.TYPE_INT:
int idata[] = (int[])inData;
pixel = idata[0];
length = idata.length;
break;
default:
throw new UnsupportedOperationException("This method
has not been "+ "implemented for transferType " +
transferType);
}
82. 82
The principle of modularization
“The principle of modularization advocates the creation of
cohesive and loosely coupled abstractions through
techniques such as localization and decomposition”
85. 85
Broken modularization
This smell arises when members of an abstraction are broken and
spread across multiple abstractions (when ideally they should
have been localized into a single abstraction).
Two forms of this smell:
• Data and methods that ideally belong to an abstraction are
split among two or more abstractions.
• Methods that ideally belong to abstraction are split among
two or more abstractions.
90. 90
Insufficient modularization
This smell arises when an existing abstraction could be further
decomposed thereby reducing its interface size, implementation
complexity or both.
Two variants:
a) When an abstraction has a large number of members in its interface, its
implementation, or both
b) When an abstraction has one or more methods with excessive complexity
91. 91
Insufficient modularization – Example
The abstract class java.awt.Component is an
example of insufficient modularization
It is a massive class with 332 methods
(of which 259 are public!)
11 nested/inner classes
107 fields (including constants)
source file spans 10,102 lines of code!
The Component serves as a base class and
the hierarchy is deep
Derived classes inherit the members =>
life is quite difficult!
96. 96
Cyclically-dependent modularization
This smell arises when two or more class-level abstractions depend
on each other directly or indirectly (creating a tight coupling among
the abstractions).
(This smell is commonly known as “cyclic dependencies”)
107. 107
Hub-like modularization
This smell arises when a class-level abstraction has dependencies
with large number of other class-level abstractions (high incoming
as well as outgoing dependencies).
110. 110
The principle of hierarchy
“The principle of hierarchy advocates the creation of a
hierarchical organization of abstractions using techniques such
as classification, generalization, substitutability, and ordering”
114. 114
Unfactored hierarchy
This smell arises when the types in a hierarchy share unnecessary
duplication in the hierarchy.
Two forms of this smell:
• Duplication in sibling types
• Duplication in super and subtypes
118. 118
public Insets getBorderInsets(Component c, Insets insets){
Insets margin = null;
// Ideally we'd have an interface defined for classes which
// support margins (to avoid this hackery), but we've
// decided against it for simplicity
//
if (c instanceof AbstractButton) {
margin = ((AbstractButton)c).getMargin();
} else if (c instanceof JToolBar) {
margin = ((JToolBar)c).getMargin();
} else if (c instanceof JTextComponent) {
margin = ((JTextComponent)c).getMargin();
}
// rest of the code omitted …
119. 119
Missing hierarchy
This smell arises when an abstraction uses conditional logic to
determine behavior where a hierarchy could have been formed to
exploit variation in behavior.
139. 139
Broken hierarchy
This smell arises when the base abstraction and its derived
abstraction(s) conceptually do not share “IS-A” relationship
(resulting in broken substitutability).
This design smell arises when inheritance is used wrongly instead of
using composition.
140. 140
Liskov’s Substitution Principle (LSP)
It should be possible to replace
objects of supertype with
objects of subtypes without
altering the desired behavior of
the program
Barbara Liskov
144. 144
Multipath hierarchy
This smell arises when a subtype inherits both directly
as well as indirectly from a supertype leading to
unnecessary inheritance paths in the hierarchy.
150. 150
Unnecessary hierarchy
This smell arises when an inheritance hierarchy has one or more unnecessary
abstractions. Includes the following cases:
• all the subtypes are unnecessary (i.e., inappropriate use of inheritance)
• supertype has only one subtype (i.e., speculative generalization)
• intermediate types are unnecessary
157. 157
Speculative hierarchy
This smell arises when one or more types in a hierarchy are provided speculatively
(i.e., based on imagined needs rather than real requirements)
167. 167
Key take-aways
Technical debt accrues when you knowingly or unknowingly make
wrong or non-optimal design decisions
Design smells indicate violation of fundamental design principles
Also, design smells negatively impact design quality
We need to care about technical debt
Accumulating debt will lead to “technical bankruptcy”
Refactoring is the primary means to repay technical debt
168. 168
Key take-aways
Apply fundamental design principles (such as abstraction,
encapsulation, modularization, and hierarchy) to create high-
quality software
Smells are related: they tend to co-occur, amplify the effect of
other smells, or can indicate deeper design problems
Use the IMPaCT process model to identify/mark, prioritize,
and refactor design smells in practice