The document discusses removing structural duplication from code. It defines structural duplication as similar code structures that repeat even if the internal actions differ. Examples given include conditional statements, exception handling, and views. The risks of duplication include increased size and unintended changes. The document provides steps to remove duplication such as separating structure from actions, extracting data models, and using loops to consolidate duplicated code. Both advantages like improved separation of concerns and disadvantages like increased rigidity are discussed.
Veteran Ember NYCer Matthew Beale (@mixonic) will talk about the new APIs arriving soon in Ember. He'll cover how he and the rest of the team have implemented block params and bound attributes, and look at how top-level components, attrs, and opt-in two-way binding may look.
Статичный SQL в С++14. Евгений Захаров ➠ CoreHard Autumn 2019corehard_by
Xочу рассказать про разработку библиотеки ORM для SQLite3 на С++14 (https://github.com/fnc12/sqlite_orm). В докладе хочется поделиться своим опытом в попытке создать ORM с которой можно забыть про текстовые запросы и как это адаптируется в С++ при помощи шаблонов.
Performance is a feature! - Developer South Coast - part 2Matt Warren
Starting with the premise that "Performance is a Feature", this session will look at how to measure, what to measure and how get the best performance from your .NET code.
We will look at real-world examples from the Roslyn code-base and StackOverflow (the product), including how the .NET Garbage Collector needs to be tamed!
Existing methods for refactoring legacy code are either unsafe, or slow and require a lot of rare skills. I'm proposing a new method composed of three steps: refactor to pure functions, write tests for the pure functions, and refactor the pure functions to classes or something else. I believe that with a few mechanical steps a trained developer can safely refactor legacy code faster using this method.
A talk from CppEurope 2019 about functional programming in C++.
It talks about lambdas, immutability, operations with functions (partial application, currying, functional composition), shows an example and ends with a procedure for refactoring legacy code.
What can we learn from other design disciplines? How do they learn design? What can we copy from them?
This is a challenge for software developers to start thinking as code designers, as people who use code as a material to prototype solutions to problems.
What is good software design? Why does it matter?
In this keynote, I addressed this complex problem. Going from the history of programming, through analogies with other design disciplines, ending with conclusions on what is good software design, and how to become a better designer.
Slides for a workshop on agile technical leadership.
Agile teams are complex adaptive systems. In order to obtain a certain level of consistency, required when you want effective teams, teams have to set constraints on themselves and to make strategic decisions. This workshop explores some of the constraints and the difficulties of making strategic technical decisions.
One of the difficulties of developers starting to apply Test Driven Development (TDD) is letting go of preconceived notions of design and allowing themselves to evolve it. I have successfully used TDD As If You Meant It as a way of showcasing how design grows when doing TDD. TDD As If You Meant It is a set of constraints created by Keith Braithwaite that forces developers to let go of their set blueprints and allow the design to evolve. I've noticed in code retreats and dojos that the technique is very difficult to get right. In this session, I will explain the core technique, the value of the technique and what I've learned by applying it and by helping others applying it.
How to identify, when to remove and how to remove a common pattern in code: duplication that can be refactored towards loops and more complex data structures. Also with code examples.
Docker is a tool that didn't exist 2 years ago. Yet I am convinced that we will hear about it for a long time. We will almost certainly use containers to test and deploy our applications.
This talk is about the reasons to start using docker in your daily work as a programmer, tester, sysadmin or IT professional.
As a programmer, you are wondering what it takes to grow your career in a fast-changing environment. This talk is about a path for your career growth.
As a manager you are wondering how you can optimize your software development teams. This talk is about a model to use for a rough evaluation and improvement of your teams.
As a business owner, CEO or CTO, your primary request for development teams is to quickly add features. This talk is about a model for optimizing implementation time.
The pyramid of programming skillsets is a model based on the usefulness of programming skills when changing code fast is the most important business objective. Let’s explore five skillset levels I identified when working with teams of programmers around Europe. We will discuss each level and how to move from one level to another.
We've been discussing software craftsmanship for years. But does it match the realities of a business? How?
This is a story about applying the ideas and practices of software craftsmanship for a real project in a difficult context. The conclusion? It helped us, it might help you as well.
How can you advance your career as a software developer? How can you assess your team as a team leader / technical lead / manager?
I created a simple model to answer these questions based upon the most common need in modern software applications: the need to add features fast.
All models are wrong, but some are useful. I found this model useful and I hope you will too.
An introduction to Kanban I presented with Flavius Stef at the Bucharest Agile Meetup Group in February 2014. See the event details on http://www.meetup.com/The-Bucharest-Agile-Software-Meetup-Group/events/146222892/. See http://mozaicworks.com for articles and events about Kanban and agile
This talk answers questions asked about unit testing by attendees at ALE 2013.
It was created in two hours, starting from an open space session where we gathered the questions.
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
Atelier - Innover avec l’IA Générative et les graphes de connaissancesNeo4j
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Allez au-delà du battage médiatique autour de l’IA et découvrez des techniques pratiques pour utiliser l’IA de manière responsable à travers les données de votre organisation. Explorez comment utiliser les graphes de connaissances pour augmenter la précision, la transparence et la capacité d’explication dans les systèmes d’IA générative. Vous partirez avec une expérience pratique combinant les relations entre les données et les LLM pour apporter du contexte spécifique à votre domaine et améliorer votre raisonnement.
Amenez votre ordinateur portable et nous vous guiderons sur la mise en place de votre propre pile d’IA générative, en vous fournissant des exemples pratiques et codés pour démarrer en quelques minutes.
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."
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Łukasz Chruściel
No one wants their application to drag like a car stuck in the slow lane! Yet it’s all too common to encounter bumpy, pothole-filled solutions that slow the speed of any application. Symfony apps are not an exception.
In this talk, I will take you for a spin around the performance racetrack. We’ll explore common pitfalls - those hidden potholes on your application that can cause unexpected slowdowns. Learn how to spot these performance bumps early, and more importantly, how to navigate around them to keep your application running at top speed.
We will focus in particular on tuning your engine at the application level, making the right adjustments to ensure that your system responds like a well-oiled, high-performance race car.
Do you want Software for your Business? Visit Deuglo
Deuglo has top Software Developers in India. They are experts in software development and help design and create custom Software solutions.
Deuglo follows seven steps methods for delivering their services to their customers. They called it the Software development life cycle process (SDLC).
Requirement — Collecting the Requirements is the first Phase in the SSLC process.
Feasibility Study — after completing the requirement process they move to the design phase.
Design — in this phase, they start designing the software.
Coding — when designing is completed, the developers start coding for the software.
Testing — in this phase when the coding of the software is done the testing team will start testing.
Installation — after completion of testing, the application opens to the live server and launches!
Maintenance — after completing the software development, customers start using the software.
Transform Your Communication with Cloud-Based IVR SolutionsTheSMSPoint
Discover the power of Cloud-Based IVR Solutions to streamline communication processes. Embrace scalability and cost-efficiency while enhancing customer experiences with features like automated call routing and voice recognition. Accessible from anywhere, these solutions integrate seamlessly with existing systems, providing real-time analytics for continuous improvement. Revolutionize your communication strategy today with Cloud-Based IVR Solutions. Learn more at: https://thesmspoint.com/channel/cloud-telephony
AI Genie Review: World’s First Open AI WordPress Website CreatorGoogle
AI Genie Review: World’s First Open AI WordPress Website Creator
👉👉 Click Here To Get More Info 👇👇
https://sumonreview.com/ai-genie-review
AI Genie Review: Key Features
✅Creates Limitless Real-Time Unique Content, auto-publishing Posts, Pages & Images directly from Chat GPT & Open AI on WordPress in any Niche
✅First & Only Google Bard Approved Software That Publishes 100% Original, SEO Friendly Content using Open AI
✅Publish Automated Posts and Pages using AI Genie directly on Your website
✅50 DFY Websites Included Without Adding Any Images, Content Or Doing Anything Yourself
✅Integrated Chat GPT Bot gives Instant Answers on Your Website to Visitors
✅Just Enter the title, and your Content for Pages and Posts will be ready on your website
✅Automatically insert visually appealing images into posts based on keywords and titles.
✅Choose the temperature of the content and control its randomness.
✅Control the length of the content to be generated.
✅Never Worry About Paying Huge Money Monthly To Top Content Creation Platforms
✅100% Easy-to-Use, Newbie-Friendly Technology
✅30-Days Money-Back Guarantee
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
#AIGenieApp #AIGenieBonus #AIGenieBonuses #AIGenieDemo #AIGenieDownload #AIGenieLegit #AIGenieLiveDemo #AIGenieOTO #AIGeniePreview #AIGenieReview #AIGenieReviewandBonus #AIGenieScamorLegit #AIGenieSoftware #AIGenieUpgrades #AIGenieUpsells #HowDoesAlGenie #HowtoBuyAIGenie #HowtoMakeMoneywithAIGenie #MakeMoneyOnline #MakeMoneywithAIGenie
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.
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.
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.
Artificia Intellicence and XPath Extension FunctionsOctavian Nadolu
The purpose of this presentation is to provide an overview of how you can use AI from XSLT, XQuery, Schematron, or XML Refactoring operations, the potential benefits of using AI, and some of the challenges we face.
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppGoogle
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
👉👉 Click Here To Get More Info 👇👇
https://sumonreview.com/ai-fusion-buddy-review
AI Fusion Buddy Review: Key Features
✅Create Stunning AI App Suite Fully Powered By Google's Latest AI technology, Gemini
✅Use Gemini to Build high-converting Converting Sales Video Scripts, ad copies, Trending Articles, blogs, etc.100% unique!
✅Create Ultra-HD graphics with a single keyword or phrase that commands 10x eyeballs!
✅Fully automated AI articles bulk generation!
✅Auto-post or schedule stunning AI content across all your accounts at once—WordPress, Facebook, LinkedIn, Blogger, and more.
✅With one keyword or URL, generate complete websites, landing pages, and more…
✅Automatically create & sell AI content, graphics, websites, landing pages, & all that gets you paid non-stop 24*7.
✅Pre-built High-Converting 100+ website Templates and 2000+ graphic templates logos, banners, and thumbnail images in Trending Niches.
✅Say goodbye to wasting time logging into multiple Chat GPT & AI Apps once & for all!
✅Save over $5000 per year and kick out dependency on third parties completely!
✅Brand New App: Not available anywhere else!
✅ Beginner-friendly!
✅ZERO upfront cost or any extra expenses
✅Risk-Free: 30-Day Money-Back Guarantee!
✅Commercial License included!
See My Other Reviews Article:
(1) AI Genie Review: https://sumonreview.com/ai-genie-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
#AIFusionBuddyReview,
#AIFusionBuddyFeatures,
#AIFusionBuddyPricing,
#AIFusionBuddyProsandCons,
#AIFusionBuddyTutorial,
#AIFusionBuddyUserExperience
#AIFusionBuddyforBeginners,
#AIFusionBuddyBenefits,
#AIFusionBuddyComparison,
#AIFusionBuddyInstallation,
#AIFusionBuddyRefundPolicy,
#AIFusionBuddyDemo,
#AIFusionBuddyMaintenanceFees,
#AIFusionBuddyNewbieFriendly,
#WhatIsAIFusionBuddy?,
#HowDoesAIFusionBuddyWorks
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Mind IT Systems
Healthcare providers often struggle with the complexities of chronic conditions and remote patient monitoring, as each patient requires personalized care and ongoing monitoring. Off-the-shelf solutions may not meet these diverse needs, leading to inefficiencies and gaps in care. It’s here, custom healthcare software offers a tailored solution, ensuring improved care and effectiveness.
May Marketo Masterclass, London MUG May 22 2024.pdfAdele Miller
Can't make Adobe Summit in Vegas? No sweat because the EMEA Marketo Engage Champions are coming to London to share their Summit sessions, insights and more!
This is a MUG with a twist you don't want to miss.
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeAftab Hussain
Understanding variable roles in code has been found to be helpful by students
in learning programming -- could variable roles help deep neural models in
performing coding tasks? We do an exploratory study.
- These are slides of the talk given at InteNSE'23: The 1st International Workshop on Interpretability and Robustness in Neural Software Engineering, co-located with the 45th International Conference on Software Engineering, ICSE 2023, Melbourne Australia
4. Definition
Structural duplication (better said, similarity) is a similar code
structure that repeats, even though the actions performed inside
the structure are different.
4
7. Example: views
<form id="personForm">
<div class="row">
<div class="col-md-4">
Show something here
</div>
<div class="col-md-4">
Show something different here
</div>
</div>
<div class="row">
<div class="col-md-4">
Show yet something else here
</div>
<div class="col-md-4">
And again something else here
</div>
</div>
</form>
7
9. Issues
• Risk: when the same structure is spread throughout the code,
it’s likely that:
• it will grow
• it will keep increasing in duplication (eg. we’ll treat
ThirdException in the same way in another place)
• similar structures might change in similar ways, resulting in
duplicated work
• Intent hidden inside the structure
• Long methods
• Duplication in tests
9
11. Criteria for removal
• When it appears at least 3 times
• When it’s expected to grow
• When the intent is unclear
• When we expect the structure of the code to change in similar
ways in multiple places
• Judgement call
11
20. Step 2: Extract action for each if statement
List<Employee> readEmployeesFromDatabase(){
try{
List<Employee> employees = readEmployees();
} catch(Exception e){
if(e is SqlException) return emptyList();
if(e is Exception) return logError();
}
}
20
21. Step 3: Refactor to set of rules
List<Employee> readEmployeesFromDatabaseAndReturnEmptyListO
List rules = new List(){
new Pair(
{e -> e is SqlException},
{e -> emptyList()}),
new Pair(
{e -> e is Exception},
{e -> logError(e)})
}
try{
List<Employee> employees = readEmployees();
} catch(Exception e){
return rules.find{e.first(e)}.second(e)
}
}
21
24. Advantages
• Clear and consistent set of rules for exception management
• Separate the behaviour from exception management (SRP)
• Change the exception management rules from one place (OCP)
• Easier to write new code of the same kind
24
25. Disadvantages
• Can prove difficult to extend for certain exception management
treatments. Eg. retries, transactional behaviour etc.
• Requires understanding of lambdas
• Can be difficult to understand for programmers unused with
the idea
25
28. Step 0: which structure do we want to separate?
Could be:
• A two column form, if we have many two column forms and
expect to change their layout at the same time
• A stack of rows, if we have multiple stacks of rows and
expect to change them in similar ways (e.g. switch from one
grid system to another)
• Others, depending on the rest of the code
28
32. Careful with accidental duplication
<div class="col-md-4">
...
</div>
<div class="col-md-4">
...
</div>
Looks like structural duplication, but label width doesn’t
necessarily change at the same time with input width
32
33. Step 4: More separation of layout
<form id="personForm">
<g:each var="formLine" from="${dataModel}">
<g:render template="formLine" model="${formLine}">
</g:each>
</form>
33
34. Advantages
• All two-column forms have the same structure, and we can
change it from one place
• Smaller, more focused code (SRP)
• Follow OCP (yes, it applies to views too!)
• Clear where to change details (label and input templates) and
where to change structure (form, formLine templates)
34
35. Disadvantages
• If only one of the forms changes structure (eg. to three
columns), it can be painful (aka rigidity to certain types of
change)
• Can be harder to navigate to the places where you need to
change things. The structure and conventions need to be
documented and learned
35
37. Steps
1. Define precisely which structural duplication you want to
remove
2. Double-check if it’s accidental
3. Separate structure from actions
4. Extract data structure
5. Replace with loops or functional constructs
37
39. Recap
• Structural duplication is a code construct that has similar
structure but does different actions
• If we expect the structure to change in multiple places, it’s
worth separating from the actions
• It leads to code that follows SRP & OCP
• But be very careful at accidental duplication
39