The document discusses software design principles and best practices, including definitions of technical debt, stakeholders' goals, causes of technical debt, types of technical debt, code smells, common code smells like comments, uncommunicative names, long methods, and design principles like SOLID principles. It provides examples of single responsibility principle, open-closed principle, Liskov substitution principle, interface segregation principle, and dependency inversion principle. It emphasizes that good code is readable and maintainable by other programmers.
Good quality code is an essential property of a software because it could lead to financial losses or waste of time needed for further maintenance, modification or adjustments if code quality is not good enough.
Which size should the function be of? What is one thing? Which comments are bad?
Robert Martin's view on agile software craftsmanship. Smells and heuristics of code.
Detail about cyclomatic complexity, formula to measure cyclomatic complexity and how this metric useful in software testing and uses of cyclomatic complexity etc.
Systematic error management - we ported rudder to ziofanf42
This talk was given at ScalaIO 2019.
It explains how you can manage errors in a systematic way in your applications, and show how we did it in Rudder with the functional library ZIO.
It presents 4 big principles which direct my devloper job:
- 1/ Our work as developers is to discover and assess failure modes.
- 2/ ERRORS are a SOCIAL construction to give AGENCY to the receiver of the error.
- 3/ An application has always at least 3 kinds of users: users; devs; and ops. Don’t forget any.
- 4/ It’s YOUR work to choose the SEMANTIC between nominal case and error and KEEP your PROMISES.
The talk gives 5 guidelines to help you implement these principles. It also introduces a very light glimpse on system thinking that you can explore in more details in the related article "Understand things as interacting systems": https://medium.com/@fanf42/understand-things-as-interacting-systems-b273bdba5dec
If you have any questions, please ask: there is several way to contact me at the end of the deck (slide 87)!
Good quality code is an essential property of a software because it could lead to financial losses or waste of time needed for further maintenance, modification or adjustments if code quality is not good enough.
Which size should the function be of? What is one thing? Which comments are bad?
Robert Martin's view on agile software craftsmanship. Smells and heuristics of code.
Detail about cyclomatic complexity, formula to measure cyclomatic complexity and how this metric useful in software testing and uses of cyclomatic complexity etc.
Systematic error management - we ported rudder to ziofanf42
This talk was given at ScalaIO 2019.
It explains how you can manage errors in a systematic way in your applications, and show how we did it in Rudder with the functional library ZIO.
It presents 4 big principles which direct my devloper job:
- 1/ Our work as developers is to discover and assess failure modes.
- 2/ ERRORS are a SOCIAL construction to give AGENCY to the receiver of the error.
- 3/ An application has always at least 3 kinds of users: users; devs; and ops. Don’t forget any.
- 4/ It’s YOUR work to choose the SEMANTIC between nominal case and error and KEEP your PROMISES.
The talk gives 5 guidelines to help you implement these principles. It also introduces a very light glimpse on system thinking that you can explore in more details in the related article "Understand things as interacting systems": https://medium.com/@fanf42/understand-things-as-interacting-systems-b273bdba5dec
If you have any questions, please ask: there is several way to contact me at the end of the deck (slide 87)!
Unit 3 Control Flow Testing contains Concept of CFT, Generate Test Input Data, Activities of Generating Test Input Data, Control Flow Graph, Path Selection Criteria, Techniques for Path Selection statement wise, branch wise, predicate wise etc. and Generating Test Input.
Unit 3 Control Flow Testing contains Concept of CFT, Generate Test Input Data, Activities of Generating Test Input Data, Control Flow Graph, Path Selection Criteria, Techniques for Path Selection statement wise, branch wise, predicate wise etc. and Generating Test Input.
One of the main hindrances to teams being able to respond rapidly to new features are technical problems resulting from bad coding practices, also known as technical debt. Melissa and Brett will cover Agile tools and practices that help development teams write better code and increase maintainability. Topics that will be covered include:
Pair programming
Automated Unit Testing
Refactoring
Test-Driven Development
Agile Architecture
Clean code is subjective and every developer has a personal take on it. There are some ideas that are considered best practice and what constitutes clean code within the industry and community, but there is no definitive distinction.
SOLID is a mnemonic device for 5 design principles of object-oriented
programs (OOP) that result in readable, adaptable, and scalable code.
S - Single Responsibility Principle.
O - Open Closed Principle.
L - Liskov Substitution Principle.
I - Interface Segregation Principle.
D - Dependency Inversion Principle.
PHP is undervalued in the world of web development. Yet, with the rise of PHP7, modern frameworks, and design principles, PHP has grown far beyond the basic scripting language it started as. In this presentation, we'll focus on what distinguishes a good PHP developer from a strong one. We'll learn how we can become better developers and make use of the SOLID design principles to deliver scalable and extendable solutions.
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
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.
How Recreation Management Software Can Streamline Your Operations.pptxwottaspaceseo
Recreation management software streamlines operations by automating key tasks such as scheduling, registration, and payment processing, reducing manual workload and errors. It provides centralized management of facilities, classes, and events, ensuring efficient resource allocation and facility usage. The software offers user-friendly online portals for easy access to bookings and program information, enhancing customer experience. Real-time reporting and data analytics deliver insights into attendance and preferences, aiding in strategic decision-making. Additionally, effective communication tools keep participants and staff informed with timely updates. Overall, recreation management software enhances efficiency, improves service delivery, and boosts customer satisfaction.
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar
The European Union Agency for Law Enforcement Cooperation (Europol) has suffered an alleged data breach after a notorious threat actor claimed to have exfiltrated data from its systems. Infamous data leaker IntelBroker posted on the even more infamous BreachForums hacking forum, saying that Europol suffered a data breach this month.
The alleged breach affected Europol agencies CCSE, EC3, Europol Platform for Experts, Law Enforcement Forum, and SIRIUS. Infiltration of these entities can disrupt ongoing investigations and compromise sensitive intelligence shared among international law enforcement agencies.
However, this is neither the first nor the last activity of IntekBroker. We have compiled for you what happened in the last few days. To track such hacker activities on dark web sources like hacker forums, private Telegram channels, and other hidden platforms where cyber threats often originate, you can check SOCRadar’s Dark Web News.
Stay Informed on Threat Actors’ Activity on the Dark Web with SOCRadar!
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.
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.
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.
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxrickgrimesss22
Discover the essential features to incorporate in your Winzo clone app to boost business growth, enhance user engagement, and drive revenue. Learn how to create a compelling gaming experience that stands out in the competitive market.
Developing Distributed High-performance Computing Capabilities of an Open Sci...Globus
COVID-19 had an unprecedented impact on scientific collaboration. The pandemic and its broad response from the scientific community has forged new relationships among public health practitioners, mathematical modelers, and scientific computing specialists, while revealing critical gaps in exploiting advanced computing systems to support urgent decision making. Informed by our team’s work in applying high-performance computing in support of public health decision makers during the COVID-19 pandemic, we present how Globus technologies are enabling the development of an open science platform for robust epidemic analysis, with the goal of collaborative, secure, distributed, on-demand, and fast time-to-solution analyses to support public health.
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.
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
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.
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.
A Comprehensive Look at Generative AI in Retail App Testing.pdfkalichargn70th171
Traditional software testing methods are being challenged in retail, where customer expectations and technological advancements continually shape the landscape. Enter generative AI—a transformative subset of artificial intelligence technologies poised to revolutionize software testing.
Enhancing Research Orchestration Capabilities at ORNL.pdfGlobus
Cross-facility research orchestration comes with ever-changing constraints regarding the availability and suitability of various compute and data resources. In short, a flexible data and processing fabric is needed to enable the dynamic redirection of data and compute tasks throughout the lifecycle of an experiment. In this talk, we illustrate how we easily leveraged Globus services to instrument the ACE research testbed at the Oak Ridge Leadership Computing Facility with flexible data and task orchestration capabilities.
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."
Accelerate Enterprise Software Engineering with PlatformlessWSO2
Key takeaways:
Challenges of building platforms and the benefits of platformless.
Key principles of platformless, including API-first, cloud-native middleware, platform engineering, and developer experience.
How Choreo enables the platformless experience.
How key concepts like application architecture, domain-driven design, zero trust, and cell-based architecture are inherently a part of Choreo.
Demo of an end-to-end app built and deployed on Choreo.
2. Technical Debt
Metaphor coined by Ward Cunningham in a 1992 report.
A concept in software development that reflects the implied
cost of additional rework caused by choosing an easy
solution now instead of using a better approach that would
take longer.
3. Stakeholders Goals
● Determine product/market fit
● Critical need to ship products early
● Meet customer needs
● Seize emerging opportunities
4. Causes of Technical Debt
● Business pressure
● Lack of understanding of the consequences of technical debt
● Failing to combat the strict coherence of components
● Lack of tests
● Lack of documentation
● Lack of interaction between team members
● Long-term simultaneous development in several branches
● Delayed refactoring
● Lack of compliance monitoring
● Incompetence
5. Types of Technical Debt
1. Code debt
2. Design & Architecture debt
3. Test debt
4. Documentation debt
7. Code Smells
A code smell is a surface indication that usually
corresponds to a deeper problem in the system.
—Martin Fowler
8. Common Code Smells
● Comments
● Uncommunicative Name
● Long method
● Duplicate Code
● Data Clumps
● Primitive Obsession
● Divergent Code
● Shotgun Surgery
● Switch Statements
● Lazy Class
And many more…..
9. Comments
● Should only be used to clarify "why" not "what".
● Can quickly become verbose and reduce code clarity.
Please don’t do that.
10. Uncommunicative Name
● Choose names that communicate intent
● Pick the best name for the time, change it later if necessary
11. Long Method
Signs and Symptoms
A method contains too many lines of code.
Reason
Developers start coding without reading the existing implementation.
Treatment
● Extract Method
● Replace Method with Method Object
12. Duplicate Code
Signs and Symptoms
Code fragments look almost identical.
Reasons for the Problem
● Multiple programmers doing same thing at the same time
● Novice programmers may not resist themselves to do Copy/Pasta
● Scary authors don’t allow to refactor their code
Treatment
● Extract Method
● Pull Up Field
● Form Template Method, Substitute Algorithm
13. Data Clumps
Signs and Symptoms
Sometimes different parts of the code contain identical groups of variables
Reasons for the Problem
● Copypasta programming
Treatment
● Extract Class
● Introduce Parameter Object
14. Primitive Obsession
Signs and Symptoms
Use of primitives instead of small objects for simple tasks
Reasons for the Problem
● “Just a field for storing some data!” the programmer said
● Creating a primitive field is easier
Treatment
● Replace Data values with Object
15. Divergent Change
Signs and Symptoms
You find yourself having to change many unrelated methods when you make changes
to a class
Reasons for the Problem
● Often these divergent modifications are due to poor program structure or
"copypasta programming”.
Treatment
● Split up the behavior of the class via Extract Class.
16. Shotgun Surgery
Signs and Symptoms
A single change impact many other classes.
Reasons for the Problem
● Poor separation of concerns.
● Failure to understand responsibilities(SRP)
Treatment
● Move Method
● Move Field
● Inline Class.
17. Switch Statements
Signs and Symptoms
You have a complex switch operator or sequence of if statements.
Reasons for the Problem
● Switch Statements can be scattered in several places
● Need to find all SS for adding new case.
Treatment
● Think about Polymorphism
18. Lazy Class
Signs and Symptoms
If a class doesn’t do enough to earn your attention, it should be deleted.
Reasons for the Problem
● After refactoring the Class has become less important
● May be designed for future needs!
Treatment
● Inline Class
● Collapse Hierarchy.
19. Design Principle
A set of guidelines that helps us to avoid having a bad design.
According to Robert Martin 3 important characteristics of a bad design should be
avoided:
● Rigidity
● Fragility
● Immobility
21. SOLID
S - Single Responsibility Principle
O - Open-closed Principle
L - Liskov Substitution Principle
I - Interface Segregation Principle
D - Dependency Inversion Principle
22. Single Responsibility Principle(SRP)
A class should have one, and only one, reason to change.
● One class should only serve one purpose
● All the methods and properties should all work towards the same goal
● When a class serves multiple purposes or responsibility then it should be made
into a new class
23. Open-Closed Principle(OCP)
Entities should be open for extension, but closed for
modification.
● Add new functionality without changing the existing code
● Use abstraction over implementation
● Helps us to build loosely coupled system
24. Liskov Substitution Principle(LSP)
Let q(x) be a property provable about objects of x of type T. Then
q(y) should be provable for objects y of type S where S is a
subtype of T.
Every subclass/derived class should be substitutable for their
base/parent class.
25. Interface Segregation Principle(ISP)
A client should never be forced to implement an interface
that it doesn’t use or clients shouldn’t be forced to depend on
methods they do not use.
26. Dependency Inversion Principle(DI)
Entities must depend on abstractions not on concretions. It
states that the high level module must not depend on the low
level module, but they should depend on abstractions
Sometimes stakeholders set unrealistic deadline of a project.
We treat everything in the trash as another trash, no matters it is valuable or less valuable
Generally, any method longer than ten lines should make you start asking questions.
The majority of a programmer’s time is spent reading code rather than writing code
It is usually a sign that the method has too many responsibilities
Long methods make code hard to maintain and debug
For example: (such as parameters for connecting to a database)
Primitive obsessions are born in moments of weakness
Then another field was needed and added in the same way.
For example, when adding a new product type you have to change the methods for finding, displaying, and ordering products.
Payoff
Improves code organization.
Reduces code duplication.
Simplifies support.
Shotgun Surgery resembles Divergent Change but is actually the opposite smell. Divergent Change is when many changes are made to a single class. Shotgun Surgery refers to when a single change is made to multiple classes simultaneously
spreading around logic that should probably be in one place
if you add a value to one switch statement you’re likely to need to hunt down all the other ones and change them too.
Cyclometic complexity = Number of decisions in the source code
Rigidity - It is hard to change because every change affects too many other parts of the system.
Fragility - When you make a change, unexpected parts of the system break.
Immobility - It is hard to reuse in another application because it cannot be disentangled from the current application.
Primitive obsessions are born in moments of weakness
Then another field was needed and added in the same way.
It doesn’t mean a class will have only one Method. All the methods should be related to the Goal of the class.
It’s not only a Principle. We can call it a CONTRACT
If a feature/method is specially handled for a given Subclass there is a violation of LSP. For example A getChildren() method of a non-leaf node returns all it’s children but a leaf node might throw exception in this case. Which is clear violation of LSP.
An example could be AnimalSound interface with bark, mew and moo. In that case Dog, Cat and Cow need to implement relevant methods from that interface.
Tight coupling between Layers & Sub-layers
Any change in the sub-layer will have a ripple effect in the next higher layer and may propagate even further upwards
In Object Oriented System both High & Low modules depends on abstraction.
So as long is the contract of abstraction is maintained the system will remain flexible.
May be I can share the what Yves told me at Nandos regarding code refactoring & code quality.