SlideShare a Scribd company logo
1 of 28
Code Smells
Developing Design Sense for your Code
@LlewellynFalco
Play along at
Slides:
llewellynfalco.blogspot.com/p/sparrow-decks.html
Phone game:
bit.ly/sparrowdecks
*http://journals.plos.org/plosone/article?id=10.1371/journal.pone.0141357
Dr. Pigeon diagnosis cancer
15 days of training
85% successful
University of Iowa
Sparrows Decks
Sparrows Decks
Clutter
Time to find things
Patterns in the code
Accounts_Receivable
Balance_Sheet
Cost_of_Goods
Expenses
Liabilities_2010
Present_Value
Profit_And_Loss
Outstanding_Invoices
Accounts_Receivable_2010
Balance_Sheet_2010
Cost_of_Goods_2010
Expenses_2010
Liabilities
Present_Value_2010
Profit_And_Loss_2010
Outstanding_Invoices_2010
Accounts_Receivable_2010
Balance_Sheet_2010
Cost_of_Goods_2010
Expenses_2010
Liabilities
Present_Value_2010
Profit_And_Loss_2010
Outstanding_Invoices_2010
Long lines
if (fullName.StartsWith(hintAssemblyName, StringComparison.OrdinalIgnoreCase)
&& stream != null && BrowserInteropHelper.IsBrowserHosted || (loadedAssembly.Full
Encapsulation
& Readability
if (fullName.StartsWith(hintAssemblyName, StringComparison.OrdinalIgnoreCase)
&& stream != null && BrowserInteropHelper.IsBrowserHosted || (loadedAssembly.Full
if (isAssemblyAvailable())
vs.
Long Methods
// If a license key has been located...
if (licenseKey != null) {
// Decrypt
licenseKey = ActiproLicenseProvider.DecryptString(licenseKey, encryptionKey);
// Find the licensee and license key
string[] licenseKeyData = licenseKey.Split(new Char[] { ';' });
if (BrowserInteropHelper.IsBrowserHosted) {
// XBAP licensing uses required assembly / licensee / license key
// Ensure that the specified assembly is in the AppDomain
string requiredAssemblyName = licenseKeyData[0].Trim();
Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies();
bool assemblyFound = false;
foreach (Assembly loadedAssembly in assemblies) {
if (loadedAssembly.FullName.StartsWith(requiredAssemblyName + ",", StringCompari
assemblyFound = true;
break;
}
}
if ((assemblyFound) && (plainTextLicensee == licenseKeyData[2]) && (String.Compare
// Assembly was found so use license data
licensee = licenseKeyData[2];
licenseKey = licenseKeyData[1];
sourceLocation = ActiproLicenseSourceLocation.AssemblySavedContext;
}
}
else {
// Regular licensing just uses licensee / license key
licensee = licenseKeyData[1];
licenseKey = licenseKeyData[0];
sourceLocation = ActiproLicenseSourceLocation.AssemblySavedContext;
Encapsulation
& Readability
Merge Conflict
Bad Names
Time to Onboard New Employees
Silo’s
Lingo
Duplication
Duplication
Duplication
Duplication
Duplication
Duplication
Duplication
Duplication
Duplication
Inconsistency
LlewellynFalco.blogspot.com
Resources
www.ApprovalTests.com
21 episode youtube series
#MobProgrammingGuidebook
Contact Information
@LlewellynFalco
http://LlewellynFalco.Blogspot.com
http://www.approvaltests.com

More Related Content

More from Llewellyn Falco

More from Llewellyn Falco (20)

Lets connect linked_in
Lets connect linked_inLets connect linked_in
Lets connect linked_in
 
Test driven development done well
Test driven development done wellTest driven development done well
Test driven development done well
 
Do not use the greater than sign in programming
Do not use the greater than sign in programmingDo not use the greater than sign in programming
Do not use the greater than sign in programming
 
Cutting code quickly
Cutting code quicklyCutting code quickly
Cutting code quickly
 
The falco technical coaching framework
The falco technical coaching frameworkThe falco technical coaching framework
The falco technical coaching framework
 
Expressive objects
Expressive objectsExpressive objects
Expressive objects
 
Roi on learning hour
Roi on learning hourRoi on learning hour
Roi on learning hour
 
Mob programming
Mob programmingMob programming
Mob programming
 
Mob testing
Mob testingMob testing
Mob testing
 
10x
10x10x
10x
 
Strong Style Pairing
Strong Style PairingStrong Style Pairing
Strong Style Pairing
 
Exploratory and Unit Testing
Exploratory and Unit TestingExploratory and Unit Testing
Exploratory and Unit Testing
 
Increase testability with code seams
Increase testability with code seamsIncrease testability with code seams
Increase testability with code seams
 
Advanced unit testing
Advanced unit testingAdvanced unit testing
Advanced unit testing
 
The curse of knowledge
The curse of knowledgeThe curse of knowledge
The curse of knowledge
 
Approval testing from basic to advanced
Approval testing   from basic to advancedApproval testing   from basic to advanced
Approval testing from basic to advanced
 
Intentional code
Intentional codeIntentional code
Intentional code
 
Strategy agile games 2015
Strategy   agile games 2015Strategy   agile games 2015
Strategy agile games 2015
 
Getting existing code under tests
Getting existing code under testsGetting existing code under tests
Getting existing code under tests
 
Lean coffee
Lean coffeeLean coffee
Lean coffee
 

Recently uploaded

ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701bronxfugly43
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Association for Project Management
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxcallscotland1987
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the ClassroomPooky Knightsmith
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 

Recently uploaded (20)

ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 

Developing design sense of code smells

Editor's Notes

  1. Both
  2. Both