The document summarizes a presentation about applying and detecting design patterns. It discusses the need for a common description of design patterns to enable both application and detection. It presents a meta-model for describing design patterns and tools developed for applying patterns to source code using JavaXL and detecting patterns using explanation-based constraint programming (e-Constraints). The goal is to enable a "round-trip" process of seamlessly applying and detecting design patterns.
Je vous partage l'un des présentations que j'ai réalisé lorsque j'étais élève ingénieur pour le module 'Anglais Business ' , utile pour les étudiants souhaitant préparer une présentation en anglais sur les Design Pattern - ou les patrons de conception .
Je vous partage l'un des présentations que j'ai réalisé lorsque j'étais élève ingénieur pour le module 'Anglais Business ' , utile pour les étudiants souhaitant préparer une présentation en anglais sur les Design Pattern - ou les patrons de conception .
Meta-modeling: concepts, tools and applicationsSaïd Assar
Presentation made as a tutorial at the rcis2015 conference in Athens, Greece, on May 13, 2015.
Video recording available online on IEEE Education (http://www.computer.org/web/computingnow/education)
Bridging the gap between AI and UI - DSI Vienna - full versionLiad Magen
This is a summary of the latest research on model interpretability, including Recurrent neural networks (RNN) for Natural Language Processing (NLP) in terms of what's in an RNN.
In addition, it contains suggestion to improve machine learning based user interface, to engage users and encourage them to contribute data to adapt the models to them.
The I in PRIMM - Code Comprehension and QuestioningSue Sentance
Slides from a talk given at the CAS London conference on 29th February 2020. Discusses the teaching of computer programming using PRIMM and in particular, the Investigate stage. Looks at the Block Model and how we can explore students' understanding by asking a range of different questions.
MetaScience: Holistic Approach for Research Modeling and AnalysisJordi Cabot
This article (presented at the ER2016 conference) proposes a conceptual schema providing a holistic view of conference-related information (e.g., authors, papers, committees and topics). This schema is automatically and incrementally populated with data available online.
A number of data analysis and visualization algorithms are applied on top of this data to provide meaningful information to prospective authors, PC members and conference steering committeees
An on-going project on Natural Language Processing (using Python and the NLTK toolkit), which focuses on the extraction of sentiment from a Question and its title on www.stackoverflow.com and determining the polarity.Based on the above findings, it is verified whether the rules and guidelines imposed by the SO community on the users are strictly followed or not.
Meta-modeling: concepts, tools and applicationsSaïd Assar
Presentation made as a tutorial at the rcis2015 conference in Athens, Greece, on May 13, 2015.
Video recording available online on IEEE Education (http://www.computer.org/web/computingnow/education)
Bridging the gap between AI and UI - DSI Vienna - full versionLiad Magen
This is a summary of the latest research on model interpretability, including Recurrent neural networks (RNN) for Natural Language Processing (NLP) in terms of what's in an RNN.
In addition, it contains suggestion to improve machine learning based user interface, to engage users and encourage them to contribute data to adapt the models to them.
The I in PRIMM - Code Comprehension and QuestioningSue Sentance
Slides from a talk given at the CAS London conference on 29th February 2020. Discusses the teaching of computer programming using PRIMM and in particular, the Investigate stage. Looks at the Block Model and how we can explore students' understanding by asking a range of different questions.
MetaScience: Holistic Approach for Research Modeling and AnalysisJordi Cabot
This article (presented at the ER2016 conference) proposes a conceptual schema providing a holistic view of conference-related information (e.g., authors, papers, committees and topics). This schema is automatically and incrementally populated with data available online.
A number of data analysis and visualization algorithms are applied on top of this data to provide meaningful information to prospective authors, PC members and conference steering committeees
An on-going project on Natural Language Processing (using Python and the NLTK toolkit), which focuses on the extraction of sentiment from a Question and its title on www.stackoverflow.com and determining the polarity.Based on the above findings, it is verified whether the rules and guidelines imposed by the SO community on the users are strictly followed or not.
Why Design Patterns Are Important In Software EngineeringProtelo, Inc.
In software engineering, a design pattern is a general repeatable solution to a commonly occurring problem in software design. A design pattern is not a finished design that can be transformed directly into code. It is a description or template for how to solve a problem that can be used in many different situations. Learn how design patterns quickly solve common classes of problems and streamline communication between developers.
Design patterns are acknowledged as powerful conceptual tools to improve design quality and to reduce the time and cost of design
by effect of the reuse of “good” solutions. In many fields such as software engineering, web engineering, and interface design,
patterns are widely used by practitioners and are also investigated from a research perspective. Still, the concept of design pattern
has received marginal attention in the arena of user interfaces (UIs) for Recommender Systems (RSs). To our knowledge, a little
is known about the use of patterns in this specific class of applications, in spite of their increasing popularity, and no RS
specific interface pattern is available in existing pattern languages. We have performed a systematic analysis of 28 real-world RSs in
a variety of sectors, in order to: (i) discover occurrences of existing general (i.e., domain independent) UI patterns; (ii)
identify recurrent UI design solutions for RS specific features; (iii) elicit a set of new UI patterns for RS interfaces. The analysis
of patterns occurrences highlights the degree at which “good” UI design solutions are adopted in RSs for the different sectors. The
new patterns can be used by UI designers of RSs to improve the UX of their systems.
Hönnunarmunstur er þekktar og reyndar lausnir við almennum vandamálum. Hugbúnaðargerð felur í sér að leysa vandamál og oft rekumst við að sömu vandamálin aftur og aftur. Þessi vandamál má leysa með þekktum leiðum, svo kölluðum munstrum. Hönnunarmunstur skjala þekktar lausnir. Þau eru byggð á þekkingu úr iðnaðnum, segja hvað virkar og af hverju.
Í þessum fyrirlestri skoðum við hönnunarmunstur, sögu þeirra og hvernig þau eru skjöluð. Við lítum á ýmis dæmi og tökum svo fyrir grunnmunstur - base patterns. Þá skoðum við Open Close Principle sem er eitt af þessum prinsippum sem við þurfum að hafa í huga.
This presentation is about a lecture I gave within the "Software systems and services" immigration course at the Gran Sasso Science Institute, L'Aquila (Italy): http://cs.gssi.it/.
http://www.ivanomalavolta.com
Some Pitfalls with Python and Their Possible Solutions v1.0Yann-Gaël Guéhéneuc
Python is a very popular programming language that comes with many pitfalls. This presentation describes some of these pitfalls, especially when they could trick unsuspecting object-oriented developers. It proposes solutions to these pitfalls, in particular regarding inheritance, which is easily broken because of the implementation choice of Python for explicit delegation, its method resolution order, and its use of the C3 algorithm. It discusses some advantages of using Python, especially regarding meta-classes.
Advice for writing a NSERC Discovery grant application v0.5Yann-Gaël Guéhéneuc
NSERC Discovery grant applications are judged according to four criteria: (1) Excellence of the researcher, (2) Merit of the proposal, (3) Contribution to the training of HQP, and (4) Cost of research. Each criterion has six possible merit indicators: Exceptional, Outstanding, Very strong, Strong, Moderate, and Insufficient. This presentation describes the process from a candidate's point of view and a reviewer's point of view. It discusses funding decisions, including bins and ER vs. ECR. It gives some advice, including graduating PhD students, having a story, and limiting the number of main objectives.
Ptidej Architecture, Design, and Implementation in Action v2.1Yann-Gaël Guéhéneuc
A set of process, architecture, design, and implementation patterns from a real, large program, the Ptidej Tool Suite. This set shows concrete problems and their solutions in Java. It includes: Be A Profiler, Tests as Documentation, Multi-layered Architecture, Proxy Console, Proxy Disk, Hidden Language, Internal Observer, Run-time Deprecation, String Parsimony, Object Identity, Object Address, Final Construction, StringBuffer as Positioning Element.
Examples of (bad) consequences of a lack of software quality and some solutions. This presentation presents some examples of (bad) consequences of a lack of software quality, in particular how poor software quality led to the direct deaths of 89 people. It then provides some background on software quality, especially the concept of Quality Without a Name. It then discusses many principles, their usefulness, and their positive consequences on software quality. Some of these principles are well-known in object-oriented programming while many others are taken from the book 97 Programmers. They include: abstraction, encapsulation, inheritance, types, polymorphism, SOLID, GRASP, YAGNI, KISS, DRY, Do Not Reinvent the Wheel, Law of Demeter, Beware of Assumptions, Deletable Code, coding with reason, and functional programming. They pertain to dependencies, domains, and tools.
(In details: Beautify is Simplicity, The Boy Scout Rule, You Gotta Care About the Code, The Longevity of Interim Solutions, Beware the Share, Encapsulate Behaviour not Just State, Single Responsibility Principle, WET Dilutes Performance Bottlenecks, Convenience Is Not an -ility, Code in the Language of the Domain, Comment Only What the Code Cannot Say, Distinguish Business Exception from Technical, Prefer Domain-specific Types to Primitive Types, Automate Your Coding Standards, Code Layout Matters, Before You Refactor, Improve Code by Removing It, Put the Mouse Down and Step Away from the Keyboard)
Some Pitfalls with Python and Their Possible Solutions v0.9Yann-Gaël Guéhéneuc
Python is a very popular programming language that comes with many pitfalls. This presentation describes some of these pitfalls, especially when they could trick unsuspecting object-oriented developers. It proposes solutions to these pitfalls, in particular regarding inheritance, which is easily broken because of the implementation choice of Python for explicit delegation, its method resolution order, and its use of the C3 algorithm. It discusses some advantages of using Python, especially regarding meta-classes.
An Explanation of the Unicode, the Text Encoding Standard, Its Usages and Imp...Yann-Gaël Guéhéneuc
Unicode is currently the world standard for encoding text. It supports all of the world's major writing systems. With its version 15.1 of 2023/09/12, it defines 149,813 characters and 161 scripts. This presentation starts with the, seemingly, simple example of the polar bear emoji. It then defines the key terms of any such standard. It then asks how a software system can render orthographic characters into glyphs, i.e., to render characters into (combined) glyphs. It introduces the concept of abstract characters and describes a brief history of encoding standards, from ASCII to Unicode. It shows how, by adding one level of indirection, the Unicode standard answers this question. It then presents code examples to display text written in Unicode: HarfBuzz (for shaping) and FreeType (for rendering).
An Explanation of the Halting Problem and Its ConsequencesYann-Gaël Guéhéneuc
The halting problem is an important, famous, and consequential problem in computer science. It is about writing a program that decides if another problem will stop. There is no general solution to this problem, which shows that such a problem is undecidable, with important consequences: for example, it is not possible to write tests that would exhaustively test entirely an arbitrary program. This presentation was written in collaboration with <a href="https://www.iro.umontreal.ca/~hahn/">Gena Hahn</a>.
A presentation summarising FPGAs, their history, their benefits, and showing how to program them. It provides some historical background on the development of computers, from the Difference Engine to the Intel 4004 to the AMD Ryzen Threadripper PRO 3995WX. It shows how the number of transistors increased dramatically but also how this increase led to more complexity and more bugs. It then introduces Field-programmable gate arrays (FPGA) as an alternative. It then presents how to program such FPGA using data-flow graphs. It discusses some tools (Yosys, NextPnR, and IceStorm) and illustrates them with a typical "Hello World" (i.e., blinking an LED) using Cygwin on Windows 10.
A set of brief presentations of some of the women and men who made the history of computer science and software engineering.
- 1936: Alan Turing
- 1948: Claude Elwood Shannon
- 1950: Grace Murray Hopper
- 1960: John McCarthy
- 1966: Frances E. Allen
- 1967: Ole-Johan Dahl
- 1967: Kristen Nygaard
- 1969: Charles A. R. Hoare
- 1970: Edgar F. Codd
- 1972: Dave Parnas
- 1974: Manny Lehman
- 1975: Frederick Brooks
- 1986: Edward Yourdon
- 1987: Barbara Liskov
- 1994: Erich Gamma
- 1997: Grady Booch
- 2001: Butler Lampson
A tutorial on the history, use, and caveats of Java generics. Using the simple example of an interface for sort algorithms, the tutorial presents the history of generics and describes the problems being solved by generics. It also provides definitions, and examples in Java and C++, and discusses Duck Typing. It then describes two scenarios: (1) Scenario 1: you want to enforce type safety for containers and remove the need for typecasts when using these containers and (2) Scenario 2: you want to build generic algorithms that work on several types of (possibly unrelated) things. It also summarises caveats with generics, in particular type erasure.
A tutorial on reflection, with a particular emphasis on Java, with a comparison with C++, Python, and Smalltalk. It describes different scenarios in which reflection is useful, a brief history of reflection and MOPs, a comparison with C++, Python, and Smalltalk, and some particulars about Java. The source code of the examples in Java (Eclipse project), Smalltalk (Squeak image v3.10.6), Python (Eclipse project), and C++ (Eclipse projects and Visual Studio solution) are available. (C++ Eclipse projects require Mirror.) Big thanks to Matúš Chochlík and Marcus Denker for their kind and precious help with C++ and Smalltalk.
The tutorial focuses on four common problems:
- Avoid using instanceof when code must bypass the compiler and virtual machine’s choice of the method to call.
- Create external, user-defined pieces of code loaded, used, and unloaded at run-time.
- Translate data structures or object states into a format that can be stored (file, network...).
- Monitor the execution of a program to understand its behaviour, and measure its space and time complexity.
It shows working examples of Java, Smalltalk, Python, and C++ code solving the four common problems through four scenarios:
- Scenario 1: invoke an arbitrary method on an object (see the problems with instanceof and plugins).
- Scenario 2: access the complete (including private) state of an object (see the problem with serialisation).
- Scenario 3: count the number of instances of a class created at runtime (see the problem with debugging/profiling).
- Scenario 4: patch the method of a class to change its behaviour (see the problem with patching).
It also discusses the different kinds of interconnections among objects that are available in common programming languages (linking, forking, subclassing, inter-process communication, and dynamic loading/invoking), a bit of theory about reflection, and specifically the class-loading mechanism of Java.
REST APIs are nowadays the de-facto standard for Web applications. However, as more systems and services adopt the REST architectural style, many problems arise regularly. To avoid these repetitive problems, developers should follow good practices and avoid bad practices. Thus, research on good and bad practices and how to design a simple but effective REST API are essential. Yet, to the best of our knowledge, there are only a few concrete solutions to recurring REST API practices, like “API Versioning”. There are works on defining or detecting some practices, but not on solutions to the practices. We present the most up-to-date list of REST API practices and formalize them in the form of REST API (anti)patterns. We validate our design (anti)patterns with a survey and interviews of 55 developers.
Code reviews are vital for ensuring good code quality. They serve as one of our last lines of defense against bugs and subpar code reaching production.
Yet, they often turn into annoying tasks riddled with frustration, hostility, unclear feedback and lack of standards. How can we improve this crucial process?
In this session we will cover:
- The Art of Effective Code Reviews
- Streamlining the Review Process
- Elevating Reviews with Automated Tools
By the end of this presentation, you'll have the knowledge on how to organize and improve your code review proces
Understanding Globus Data Transfers with NetSageGlobus
NetSage is an open privacy-aware network measurement, analysis, and visualization service designed to help end-users visualize and reason about large data transfers. NetSage traditionally has used a combination of passive measurements, including SNMP and flow data, as well as active measurements, mainly perfSONAR, to provide longitudinal network performance data visualization. It has been deployed by dozens of networks world wide, and is supported domestically by the Engagement and Performance Operations Center (EPOC), NSF #2328479. We have recently expanded the NetSage data sources to include logs for Globus data transfers, following the same privacy-preserving approach as for Flow data. Using the logs for the Texas Advanced Computing Center (TACC) as an example, this talk will walk through several different example use cases that NetSage can answer, including: Who is using Globus to share data with my institution, and what kind of performance are they able to achieve? How many transfers has Globus supported for us? Which sites are we sharing the most data with, and how is that changing over time? How is my site using Globus to move data internally, and what kind of performance do we see for those transfers? What percentage of data transfers at my institution used Globus, and how did the overall data transfer performance compare to the Globus users?
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.
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteGoogle
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
👉👉 Click Here To Get More Info 👇👇
https://sumonreview.com/ai-pilot-review/
AI Pilot Review: Key Features
✅Deploy AI expert bots in Any Niche With Just A Click
✅With one keyword, generate complete funnels, websites, landing pages, and more.
✅More than 85 AI features are included in the AI pilot.
✅No setup or configuration; use your voice (like Siri) to do whatever you want.
✅You Can Use AI Pilot To Create your version of AI Pilot And Charge People For It…
✅ZERO Manual Work With AI Pilot. Never write, Design, Or Code Again.
✅ZERO Limits On Features Or Usages
✅Use Our AI-powered Traffic To Get Hundreds Of Customers
✅No Complicated Setup: Get Up And Running In 2 Minutes
✅99.99% Up-Time Guaranteed
✅30 Days Money-Back Guarantee
✅ZERO Upfront Cost
See My Other Reviews Article:
(1) TubeTrivia AI Review: https://sumonreview.com/tubetrivia-ai-review
(2) SocioWave Review: https://sumonreview.com/sociowave-review
(3) AI Partner & Profit Review: https://sumonreview.com/ai-partner-profit-review
(4) AI Ebook Suite Review: https://sumonreview.com/ai-ebook-suite-review
GraphSummit Paris - The art of the possible with Graph TechnologyNeo4j
Sudhir Hasbe, Chief Product Officer, Neo4j
Join us as we explore breakthrough innovations enabled by interconnected data and AI. Discover firsthand how organizations use relationships in data to uncover contextual insights and solve our most pressing challenges – from optimizing supply chains, detecting fraud, and improving customer experiences to accelerating drug discoveries.
Globus Connect Server Deep Dive - GlobusWorld 2024Globus
We explore the Globus Connect Server (GCS) architecture and experiment with advanced configuration options and use cases. This content is targeted at system administrators who are familiar with GCS and currently operate—or are planning to operate—broader deployments at their institution.
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.
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.
Software Engineering, Software Consulting, Tech Lead.
Spring Boot, Spring Cloud, Spring Core, Spring JDBC, Spring Security,
Spring Transaction, Spring MVC,
Log4j, REST/SOAP WEB-SERVICES.
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.
Check out the webinar slides to learn more about how XfilesPro transforms Salesforce document management by leveraging its world-class applications. For more details, please connect with sales@xfilespro.com
If you want to watch the on-demand webinar, please click here: https://www.xfilespro.com/webinars/salesforce-document-management-2-0-smarter-faster-better/
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."
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.
Quarkus Hidden and Forbidden ExtensionsMax Andersen
Quarkus has a vast extension ecosystem and is known for its subsonic and subatomic feature set. Some of these features are not as well known, and some extensions are less talked about, but that does not make them less interesting - quite the opposite.
Come join this talk to see some tips and tricks for using Quarkus and some of the lesser known features, extensions and development techniques.
Utilocate offers a comprehensive solution for locate ticket management by automating and streamlining the entire process. By integrating with Geospatial Information Systems (GIS), it provides accurate mapping and visualization of utility locations, enhancing decision-making and reducing the risk of errors. The system's advanced data analytics tools help identify trends, predict potential issues, and optimize resource allocation, making the locate ticket management process smarter and more efficient. Additionally, automated ticket management ensures consistency and reduces human error, while real-time notifications keep all relevant personnel informed and ready to respond promptly.
The system's ability to streamline workflows and automate ticket routing significantly reduces the time taken to process each ticket, making the process faster and more efficient. Mobile access allows field technicians to update ticket information on the go, ensuring that the latest information is always available and accelerating the locate process. Overall, Utilocate not only enhances the efficiency and accuracy of locate ticket management but also improves safety by minimizing the risk of utility damage through precise and timely locates.
Large Language Models and the End of ProgrammingMatt Welsh
Talk by Matt Welsh at Craft Conference 2024 on the impact that Large Language Models will have on the future of software development. In this talk, I discuss the ways in which LLMs will impact the software industry, from replacing human software developers with AI, to replacing conventional software with models that perform reasoning, computation, and problem-solving.
A Sighting of filterA in Typelevel Rite of Passage
010821+presentation+oti.ppt
1. 1
Design Patterns: A Round-trip
A trip in the marvellous
country of design pattern
application and detection
Good afternoon Ladies and Gentlemen.
The topic is about design patterns: How to apply them, and how to detect
them.
(This handout is an improved version of the talk given at OTI, on Tuesday,
August 21st, 2001. It corrects some minor defects in the talk and in the
comments. A re-factored and much improved version will be available later,
based on the comments received after the presentation and a discussion with
Kevin McGuire.)
2. 2
n Hervé Albin-Amiot
– 3rd year PhD student
– Partly funded by Soft-Maint, S.A. (France)
n Yann-Gaël Guéhéneuc
– 2nd year PhD student
– Partly funded by Object Technology
International, Inc. (Canada)
n Pr. Pierre Cointe
– Supervisor
n Dr. Narendra Jussien
– Assistant-professor Constraints Team
My name is Yann… As most of you already know ;-)
I served several co-op terms at OTI.
I am now a PhD student at the École des Mines de Nantes.
I work with Pr. Pierre Cointe, Dr. Narendra Jussien and another PhD
student, Hervé Albin-Amiot.
Our common interest is software engineering, and the improvement of
software quality.
In this presentation, I will first summarize the reasons why we talk about
design patterns.
Then, I will present the current state of our research.
3. 3
One observation
n Software quality
– ISO/IEC 9126
• Functionality, reliability, usability, efficiency,
maintainability, portability
– ISO/IEC 14598
– Coupling, cohesion, method replacement…
n Maintenance = 75%
n Design defects
Here is one observation.
Quality is very important.
And quality is a challenge for software developers.
But quality is very subjective, even if some authors propose kind of
“objective” tools, such as metrics, there is no consensus on what a good
design is, it’s too context-dependent.
As a proof, just look at the many standards for software quality and the
many independent quality characteristics.
The ISO 9126 standard is a standard that divides software quality in six
characteristics.
And so on…
So now, what is the reason to be concerned by software quality?
If you take maintenance, for instance, maintenance is (at least) 75% of the
life-cycle of a software.
It takes lots of time, of effort, and of people.
It cost billions of dollars each year.
How to decrease maintenance time? We must improve software quality!
How to improve software quality? We must look for design defects!
4. 4
One classification
n Intra-class / Inter-class / Behavioural
Number: 39/61 (64%)
Detection–correction: 25%
Number: 13/61 (21%)
Detection–correction: 8%
In OO programming languages, we define three categories of design
defects:
•Intra-class design defects are related to the internal structure of the classes.
For example, unused fields.
•Inter-class design defects are related to the external structure of the classes,
to their public interfaces. For example, a “middle-man” is a class with too
many delegating methods.
•Behavioural design defects are related to the semantics of the classes. For
example, the Y2K bug.
We made a survey of the literature on design defects.
We found that:
•Intra-class design defects, studied a lot, well-known.
•Inter-class design defects, studied a little bit, rely on “feelings”, “bad
smells”, “heuristics”, …
5. 5
One long-term plan
n To identify inter-class design defects
– Classification
– Automated detection mechanisms
+
n To correct inter-class design defects
– Solutions
– Automated correction mechanisms
Those are the reasons why our long-term plan is to help in identifying
and correcting inter-class design defects.
From our classification of design defects, we would like:
•To propose a methodology and the tools to automate the detectionof inter-
class design defects.
•To propose solutions and the tools to automate the correction of those
defects.
6. 6
On inter-class design defects
n Design patterns are useful when:
– Designing / implementing / Re-engineering
– Documenting
n [Gamma et al. 1994]
– Quality architectural solutions
• Flexibility, understandability
– Language independent
• General Smalltalk- or C++-level
– Domain independent
Now, when we started our research, we looked around and we tried to find
related problems.
That’s how we came to ask the question: “What’s the link between design
defects and design patterns?”
Design patterns are useful
•To design.
•To implement.
•To re-engineer.
•To document.
They are good solutions to recurring architectural problems.
And they are language and context independent.
That’s true, at least, for the design patterns presented by the GoF.
Especially, in the GoF, they emphasize the idea that design patterns
improve the flexibility and understandability of the software.
7. 7
On inter-class design defects
n Design patterns, design defects = dual
problems
n Working hypotheses
– Groups of entities similar to a design
pattern = Inter-class design defects
+
– Making these groups of entities closer to a
design pattern = Improving architectural
quality (flexibility and understandability)
Then, because design patterns affect the software quality, we can assume
that there is a connection between design patterns and architectural
quality. More precisely, that design patterns and design defects are dual
problems.
From this observation, we propose two working hypotheses:
•We make the hypothesis that groups of entities that look like a design
pattern, but not quite, represent a design defect.
•We make the hypothesis that transforming these groups of entities (such
that they look more closely like a design pattern) actually improves the
overall architectural quality.
Those are working hypotheses, you may disagree with them, and I will
be glad to discuss them with you. But, we use them as a starting point and
we may confirm or refute them later on.
8. 8
Our short-term goals
n Design patterns are difficult to use
– Lack of formalism
– Lack of automation
n We want to provide
round-trip using
design patterns
From software quality, we went to design defects.
From design defects, we went to design patterns.
So, what do we want, now?
We want:
•To help designers.
•To help maintainers.
In using design patterns.
(We do not want to replace them.)
We propose the notion of design patterns round-trip.
Round-trip is the seamless application and detection of design patterns
(of design pattern solution micro-architectures).
9. 9
Our short-term goals
n We need
– A common description for design patterns
• Application viewpoint
• Detection viewpoint
– A way to apply physically design patterns
– A way to detect physically design patterns
Œ
•
Ž
To offer design pattern round-trip, we need:
•A common description for design patterns, specifically tailored towards
application and detection. Several authors already proposed formalisms for
design patterns, but none designed with round-trip in mind.
•A way to apply a design pattern. That is, we need a way to modify or to
generate source code.
•A way to detect a design pattern. That is, we need a way to retrieve in
random source code the design patterns present.
In the rest of this presentation, I will focus on those three points one after
the other. If I have time left, I will present two tools we developed to apply
and to detect design patterns. Then, I will conclude on some future work.
10. 10
Œ
n We need a common description for
design patterns
– Application viewpoint
– Detection viewpoint
The starting point is a common description for design patterns. This
description must be specifically oriented towards application and detection.
11. 11
Meta-modelŒ
The accepted way to describe or to formalize a design pattern is using a
meta-model. Several meta-models exist for design patterns, the one we
developed is different in that it comprises all the entities, elements, and
mechanisms needed to define, to apply, and to detect a design pattern.
A design pattern is defined as a subclass of class Pattern, for instance, the
Composite design pattern.
A design pattern is defined using the entities and elements offered by the
meta-model (new entities and new elements may be added).
A design pattern is defined as a first-class entity in our system, we can
manipulate it as we would manipulate a class and its instances (through
message sends).
12. 12
Informal descriptions
from [Gamma et al.]
Instance of class PDelegation
Instance of class PInterface
Instance of class PClass
Instance of class PAssoc
name() Instance of class PMethod
Instance of class Pattern
Pattern, PInterface, PClass, PAssoc,
PDelegation, and PMethod are
classes defined in our meta-model
Translates into
Abstract model of CompositeŒ
Let’s take an example.
From the description and the OMT diagram proposed by the GoF for the
Composite pattern.
We extract all the needed information and we formalize the design pattern
using our meta-model.
Here you can see the Composite pattern abstract model, where each entities
and elements are instances of constituents of our meta-model.
We call this an abstract model because it represents the design pattern
solution, independently of any context, specific cardinality, and so on.
13. 13
Abstract model
n Each constituent of the meta-model
deliver its associated code
– New language are added using an
instance of the Visitor design pattern
– Modifications of an existing source code is
(only) provided for Java using JavaXL
n Each constituent of the meta-model
detect its associated instances
Œ
An abstract model is a first-class entity in our system.
It know how to generate the source code associated with itself.
It know how to detect its own instances in source code.
14. 14
Abstract model
Composite pattern abstract model
Composite pattern concrete model 1 Composite pattern concrete model n
PatternsBox •
• •
Composite pattern concrete model 1
(source code)
Composite pattern concrete model n
(source code)
•• ‚‚
Ptidej ‚
‚ ‚
Œ
To understand fully what is an abstract model, consider the following
example.
We developed two tools, I will present these tools more in details later (if
we have some time left ;-).
From the Composite design pattern abstract model, PatternsBox allows us
“to concretize” this abstract model. This means that we can specify role
names, cardinalities... This is basically like a parameterization of the
abstract model. The results are, for instance, two concrete models:
•One representing a dummy example (on the left).
•One representing a sub-set of the Java AWT hierarchy (on the right).
From these concrete models, we can generate the corresponding source
code.
Now, we have this second tool, Ptidej, which from the source code (any
source code), builds back concrete models of a given design pattern
abstract model.
15. 15
•
n We need a way to apply physically
design patterns
– At the source code level
– With as few modifications as possible
The second point deals with the application of a design pattern in a given
source code.
Because we want to help the developers and the maintainers to use
design patterns, we must apply design patterns at the source code level
(level where the developers and maintainers work) while modifying the
source code as little as possible.
16. 16
JavaXL
n Extension to the Java reflection APIs
n Working at the source code level
n Modifying the user source code as little
as possible
n Modifications are reversible
•
We developed an extension of the Java reflection APIs. This extension
works at the source code level, to the contrary of already existing
extensions, such as Javassit or OpenJava.
The modifications are minimal and reversible.
17. 17
JavaXL
n High-level abstraction
– Multiple language
– No semantics
n High-level interface
– Specific Java implementation to VAJ
– Refactorings (Eclipse, Grant Gayed)
•
Basically, JavaXL defines high-level abstractions, that are language
independent and that provide no semantic checks.
JavaXL is also a high-level interface that hides implementation details.
So far, we have a Java-specific implementation, closely related to VAJ.
But we can imagine to have a version working on top of refactorings, such
as the one implemented in Eclipse or using XML and the mechanisms
proposed by Grant Gayed.
18. 18
Singleton
n Example of the Singleton pattern
for (Iterator i = aClass.getConstructors().iterator();
i.hasNext();) {
XMethod currentMethod = (XMethod) i.next();
currentMethod.setModifiers(Modifier.PRIVATE);
}
XField xf = new XField();
xf.setModifiers(Modifier.STATIC & Modifier.PRIVATE);
xf.setName("soleInstance");
…
Basic
A
Example:•
Here is a basic example of JavaXL in action.
This is an extract from the transformation needed to apply the Singleton
pattern.
In the loop, for each constructor of the class represented by aClass, we
create an instance of XMethod and we modify its modifiers.
Then, we create an instance of XField, set its modifiers to static-private,
then we name this field “soleInstance” and so on…
19. 19
Ž
n We need a way to detect physically
design patterns
– Use of a design pattern solution
• Well written code
• Notion of complete version
– Other uses of a design pattern solution
• Code improvement
• Notion of proximal version
+ No up-front descriptions of the variations
The third and last point concerns the detection of design patterns.
What is important to notice, is that design patterns are never applied “by
the rules”, there are always adapted and modified.
We need a mechanism able to detect the use of design pattern solutions is
well-written code, that is the notion of complete solutions. And a
mechanism able to detect the variations of a design pattern solutions in to-
be-improved code, that is the notion proximal solutions.
20. 20
Complete and proximal versions
n Related works
– The search of sub-graphs in a graph
– The adaptation phase in case-based
reasoning
– Logic programming
ÆExplanation-based constraint
programming (e-Constraints)
Ž
There are several related work, although none is specifically oriented
towards the detection of the complete and proximal solutions.
What is important, is that we do not want to describe a priori the
variations.
We do not want / we cannot think about all the variations beforehand.
Thus, we need:
•Explanations for why there is or not solutions.
•A way to know why a solution is a solution.
•A way to look for more solutions.
•A strong user interaction.
All these requirements led us to look at explanation-based constraint
programming, a.k.a. e-Constraints.
21. 21
e-Constraints
n Set of constraints justifying an
action performed by the solver
–Value removal
–Contradiction
n Trace of the solver behaviour
Ž
An explanation is a set of constraints that justify an action performed by the
solver (value removals, contradiction...)
Explanations are computed by tracing the behaviour of the solver.
22. 22
e-Constraints
n An implementation: PaLM
–Developed by Narendra Jussien, on
top of Choco, written in Claire
–Used for
• Path-Repair
• Mac-DBT
• Assistance upon failure
• Interactive solvers
Ž
We have an implementation of e-Constraints: the PaLM system, which uses
Choco and Claire.
The PaLM system is developed by Narendra Jussien at the École des Mines.
This system has been used (its explanations) to:
•Provide assistance upon failure (debugging tools).
•Design interactive solvers (dynamic addition and removal of
constraints).
•Design new search algorithm (guided by the explanations).
It is a reliable and efficient implementation of e-Constraints.
23. 23
Our application
n The design pattern abstract model
– A class defines a variable
– Relationships among classes define
constraints
n The source code of the application
– The classes define the domain of the
variables
– Relationships among classes give the
semantics of the constraints
Ž
In our application of e-Constraints.
We define a CSP using a design pattern abstract model and the given
source code.
From the design pattern abstract model:
•A class defines a variable
•Relationships among classes define constraints
From the source code of the application:
•The classes define the domain of the variables
•Relationships among classes give the semantics of the constraints
24. 24
Our application
n e-Constraints enables
– Complete and proximal versions
– Justifications
• Explain why / how a solution is a solution
• Explain why / how the code is modified
– Strong interactivity with the user
• Dynamic description of the variations
Ž
Programming is an artistic activity, in the sense that there are no good
designs but best designs depending on the context (expected life time, cost,
experience of the developer…).
We need the justification provided by e-Constraints to explain why and how
a solution is solution, thus why and how the code is to be modified.
A complete solution = A solution with all the constraints.
A proximal solution = A solution with some constraints removed.
The idea is to associate a reason for a constraint to be there. This reason
may be textual, but it may also contain executable code, written in terms
of JavaXL, to provide the transformations needed to correct the code.
We need to interact heavily with the developer: We cannot / do not want
to think about all the possible cases!
25. 25
n The Composite design pattern solution
n Its constraints
ConstraintsBasic
A
Example:
composite < component
leaf < component
composite ⊃ component
Ž
For example, if we take the Composite design pattern abstract model.
The constraint associated with this model are …
These constraints are automatically generated by the abstract model,
we come back to the point that we want a common description of design
pattern tailored for application and generation.
(Beware of the < symbol which is different from the object-oriented way of
thinking.)
26. 26
InteractionBasic
A
Example:
composite < component
leaf < component
composite ⊃ component
Ž
From the constraints, and given a source code, the e-Constraints PaLM
system allow us to find all the complete solutions; and, to find all the
proximal solutions (or at least, the ones we are interested in) by
removing or adding constraint dynamically.
Of course, we can potentially explore an exponential universe, but it does
not matter because the user directs the search and stops it when she judges
that it does not make sense to remove constraints further.
27. 27
n We needed
– A common description for design patterns
• Application viewpoint
• Detection viewpoint
– A way to apply physically design patterns
– A way to detect physically design patterns
Œ + • + Ž = PatternsBox + Ptidej
Basic
A
Example
Œ
•
Ž
31. 31
Application
n The tool generates the code required
for the design pattern in Java
public interface MyComponent {
public abstract void myOperation();
}
public class MyComposite implements MyComponent {
// Association: myChildren
private java.util.Vector myChildren = new java.util.Vector();
public void add (MyComponent myComponent) {
myChildren.addElement(myComponent);
}
public void remove (MyComponent myComponent) {
myChildren.removeElement(myComponent);
}
// Method linked to: myChildren
public void myOperation() {
for (Enumeration enum = myChildren.elements();
enum.hasMoreElements(); ((MyComponent)
enum.nextElement()).myOperation());
}
}
public class MyLeaf implements MyComponent {
public void myOperation() {
}
}
Basic
A
Example:
38. 38
Back to the future
n Design pattern, design defects = dual
problems
– Meta-model, abstract model
– Source-to-source transformation engine
– e-Constraints
n Two tools
Œ + • + Ž = PatternsBox + Ptidej
= Round-trip
So, in this (long ;-) presentation, I talked about software quality, and how
it is related to design defects, and how those are related to design
patterns.
Then, I presented a meta-model to express design patterns. This meta-
model is tailored towards detection and application. I introduced the
concepts of abstract and concrete models.
Then, I presented JavaXL. JavaXL is an extension to the Java reflection
API. We use JavaXL to modify the source code. These modifications are as
small as possible.
And, then, I presented a new paradigm of constraint programming,
explanation-based constraint programming, a.k.a. e-Constraints. We use e-
Constraints to detect complete and proximal versions of a design pattern.
Finally, I briefly show two tools, PatternsBox and Ptidej, implementing
our ideas.
39. 39
Future
n Meta-model, abstract models
– [Gamma et al. 1994] design patterns
– Design defects
n Source-to-source transformation engine
– Refactorings
n e-Constraints
– Interaction
– Previous solutions as knowledge
First, we would like to improve the meta-model and develop design
patterns and design defects abstract models.
Second, we will enhance the source-to-source transformation engine, to
integrate it with refactorings, either to use refactorings or to develop
refactorings with it.
Finally, we will improve the interaction and the automation of the constraint
system. And we are investigating the use of previous solutions as
knowledge to help the developers in their choices.
40. 40
Future
And, of course, because the future is already there, we are integrating our
tools with Eclipse!
Ptidej, the detection tool, is already half-done.
PatternsBox, JavaXL should come out soon…
Thank you very much for your attention.
If you have any question or comment, please feel free to ask.
If you want a demo, feel free to ask!
You may also contact us at:
•cointe@emn.fr (Team leader ;-)
•jussien@emn.fr (e-Constraints, www.e-constraints.net)
•albin@emn.fr (Application, JavaXL, PatternsBox,
www.emn.fr/albin)
•guehene@emn.fr (Detection, Ptidej, Eclipse, www.yann-
gael.gueheneuc.net/Work/)