SlideShare a Scribd company logo
Renée De Voursney July 14, 2011 ConferenciaRails How I learned to smell code Photo credit: http://www.vlib.us/medical/gaswar/Exp.%20Dog%20Mask,%20WWI.jpg
How many of you went to university for Computer Science? How many have a background in business consulting or working in the Microsoft stack (C#)? I will assume we all currently work with Rails. How many have a main app that is Rails <= 2.0.5? Rails 2.3.x? Rails >= 3.0.x? Who is out there? Photo credit: http://www.flickr.com/photos/drachmann/327122302/sizes/l/in/photostream/
Who am I? ,[object Object]
Lives in Seattle, Washington
A mountain and rock climber
Loves Building Systems for People
Loves Working in a Programming Language made for People
Likes Useful Frameworks and Gems
Strives to live up to the principles learned onRenee’s Road to Scentless Code
A hound surrounded by wonderful smelling flowers, is to a developer working with: Well documented code A working application Well designed and maintainable code What I want Photo credit: http://timesnow.info/Download/images/pet_animals/cute_puppies/spring_scents_basset_hound.jpg
Writing and then Maintaining Lots and Lots of stinky code! How did I get there? Renee’s Road to  Scentless Code  Photo credit: http://static.howstuffworks.com/gif/pug.jpg
Photo credit: http://www.vlib.us/medical/gaswar/Exp.%20Dog%20Mask,%20WWI.jpg
[object Object]
Teaching someone else is the best way to learn and re-enforce your understanding of a concept
Objects, javadoc, and the JVM are really cool! What Did I learn Photo credit: http://www.mentalfloss.com/wp-content/uploads/2007/10/tongue_stuck_on_pole.jpg
Photo credit: http://i2.squidoocdn.com/resize/squidoo_images/250/draft_lens10490801module95270741photo_1271186415dog_sneeze.jpg
[object Object]
Single Responsibility
Abstractions
Positive Conditions, Always have an else…. What Did I learn Photo credit: http://www.flickr.com/photos/sephiroty/320928712/sizes/z/in/photostream/

More Related Content

Similar to How I Learned to Smell Code

hey I founded a tech startup...OH SHIT I CAN'T CODE. #barcampsg7
hey I founded a tech startup...OH SHIT I CAN'T CODE. #barcampsg7hey I founded a tech startup...OH SHIT I CAN'T CODE. #barcampsg7
hey I founded a tech startup...OH SHIT I CAN'T CODE. #barcampsg7
Elisha Tan
 
Software Craftsmanship - It's an Imperative
Software Craftsmanship - It's an ImperativeSoftware Craftsmanship - It's an Imperative
Software Craftsmanship - It's an Imperative
Fadi Stephan
 
TxJS 2011
TxJS 2011TxJS 2011
TxJS 2011
Brian LeRoux
 
My experience of Ruby Education in Taiwan
My experience of Ruby Education in TaiwanMy experience of Ruby Education in Taiwan
My experience of Ruby Education in Taiwan
Mu-Fan Teng
 
Cinci ug-january2011-anti-patterns
Cinci ug-january2011-anti-patternsCinci ug-january2011-anti-patterns
Cinci ug-january2011-anti-patterns
Steven Smith
 
OWASP Bricks presentation from OWASP-Null combined meet at Delhi, August 2014
OWASP Bricks presentation from OWASP-Null combined meet at Delhi, August 2014OWASP Bricks presentation from OWASP-Null combined meet at Delhi, August 2014
OWASP Bricks presentation from OWASP-Null combined meet at Delhi, August 2014
Abhi Balakrishnan
 
Recipe of a rockstar developer
Recipe of a rockstar developerRecipe of a rockstar developer
Recipe of a rockstar developer
Topu Newaj
 
Documentation for developers
Documentation for developersDocumentation for developers
Documentation for developers
Michael Marotta
 
Why you should use a web framework, eventually
Why you should use a web framework, eventuallyWhy you should use a web framework, eventually
Why you should use a web framework, eventually
kyphpug
 
Ruby On Rails Presentation
Ruby On Rails PresentationRuby On Rails Presentation
Ruby On Rails Presentation
Paul Pajo
 
Software craftsmanship - Imperative or Hype
Software craftsmanship - Imperative or HypeSoftware craftsmanship - Imperative or Hype
Software craftsmanship - Imperative or Hype
SUGSA
 
Learning Web Development with Ruby on Rails Launch
Learning Web Development with Ruby on Rails LaunchLearning Web Development with Ruby on Rails Launch
Learning Web Development with Ruby on Rails Launch
Thiam Hock Ng
 
Developers are People Too! Building a DX-Based API Strategy Ronnie Mitra, Pri...
Developers are People Too! Building a DX-Based API Strategy Ronnie Mitra, Pri...Developers are People Too! Building a DX-Based API Strategy Ronnie Mitra, Pri...
Developers are People Too! Building a DX-Based API Strategy Ronnie Mitra, Pri...
CA API Management
 
Most common mistakes in ruby on rails development (and how to avoid making them)
Most common mistakes in ruby on rails development (and how to avoid making them)Most common mistakes in ruby on rails development (and how to avoid making them)
Most common mistakes in ruby on rails development (and how to avoid making them)
Katy Slemon
 
Software Craftsmanship - It's an Imperative
Software Craftsmanship - It's an ImperativeSoftware Craftsmanship - It's an Imperative
Software Craftsmanship - It's an Imperative
Fadi Stephan
 
SxSW 2015
SxSW 2015SxSW 2015
SxSW 2015
Mike McNeil
 
Shrey jairath
Shrey jairathShrey jairath
Shrey jairath
Shrey Jairath
 
Shrey jairath li
Shrey jairath liShrey jairath li
Shrey jairath li
Shrey Jairath
 
AWResume
AWResumeAWResume
AWResume
Aaron Washburn
 
Extracurricular Swift
Extracurricular SwiftExtracurricular Swift
Extracurricular Swift
Sally Shepard
 

Similar to How I Learned to Smell Code (20)

hey I founded a tech startup...OH SHIT I CAN'T CODE. #barcampsg7
hey I founded a tech startup...OH SHIT I CAN'T CODE. #barcampsg7hey I founded a tech startup...OH SHIT I CAN'T CODE. #barcampsg7
hey I founded a tech startup...OH SHIT I CAN'T CODE. #barcampsg7
 
Software Craftsmanship - It's an Imperative
Software Craftsmanship - It's an ImperativeSoftware Craftsmanship - It's an Imperative
Software Craftsmanship - It's an Imperative
 
TxJS 2011
TxJS 2011TxJS 2011
TxJS 2011
 
My experience of Ruby Education in Taiwan
My experience of Ruby Education in TaiwanMy experience of Ruby Education in Taiwan
My experience of Ruby Education in Taiwan
 
Cinci ug-january2011-anti-patterns
Cinci ug-january2011-anti-patternsCinci ug-january2011-anti-patterns
Cinci ug-january2011-anti-patterns
 
OWASP Bricks presentation from OWASP-Null combined meet at Delhi, August 2014
OWASP Bricks presentation from OWASP-Null combined meet at Delhi, August 2014OWASP Bricks presentation from OWASP-Null combined meet at Delhi, August 2014
OWASP Bricks presentation from OWASP-Null combined meet at Delhi, August 2014
 
Recipe of a rockstar developer
Recipe of a rockstar developerRecipe of a rockstar developer
Recipe of a rockstar developer
 
Documentation for developers
Documentation for developersDocumentation for developers
Documentation for developers
 
Why you should use a web framework, eventually
Why you should use a web framework, eventuallyWhy you should use a web framework, eventually
Why you should use a web framework, eventually
 
Ruby On Rails Presentation
Ruby On Rails PresentationRuby On Rails Presentation
Ruby On Rails Presentation
 
Software craftsmanship - Imperative or Hype
Software craftsmanship - Imperative or HypeSoftware craftsmanship - Imperative or Hype
Software craftsmanship - Imperative or Hype
 
Learning Web Development with Ruby on Rails Launch
Learning Web Development with Ruby on Rails LaunchLearning Web Development with Ruby on Rails Launch
Learning Web Development with Ruby on Rails Launch
 
Developers are People Too! Building a DX-Based API Strategy Ronnie Mitra, Pri...
Developers are People Too! Building a DX-Based API Strategy Ronnie Mitra, Pri...Developers are People Too! Building a DX-Based API Strategy Ronnie Mitra, Pri...
Developers are People Too! Building a DX-Based API Strategy Ronnie Mitra, Pri...
 
Most common mistakes in ruby on rails development (and how to avoid making them)
Most common mistakes in ruby on rails development (and how to avoid making them)Most common mistakes in ruby on rails development (and how to avoid making them)
Most common mistakes in ruby on rails development (and how to avoid making them)
 
Software Craftsmanship - It's an Imperative
Software Craftsmanship - It's an ImperativeSoftware Craftsmanship - It's an Imperative
Software Craftsmanship - It's an Imperative
 
SxSW 2015
SxSW 2015SxSW 2015
SxSW 2015
 
Shrey jairath
Shrey jairathShrey jairath
Shrey jairath
 
Shrey jairath li
Shrey jairath liShrey jairath li
Shrey jairath li
 
AWResume
AWResumeAWResume
AWResume
 
Extracurricular Swift
Extracurricular SwiftExtracurricular Swift
Extracurricular Swift
 

More from reneedv

Nginx caching
Nginx cachingNginx caching
Nginx caching
reneedv
 
Week10
Week10Week10
Week10
reneedv
 
Week9
Week9Week9
Week9
reneedv
 
Week7
Week7Week7
Week7
reneedv
 
Week6
Week6Week6
Week6
reneedv
 
Week5
Week5Week5
Week5
reneedv
 
Week4
Week4Week4
Week4
reneedv
 
Week3
Week3Week3
Week3
reneedv
 
Week2
Week2Week2
Week2
reneedv
 
Week1
Week1Week1
Week1
reneedv
 
Fill Up your Bookshelves!
Fill Up your Bookshelves! Fill Up your Bookshelves!
Fill Up your Bookshelves!
reneedv
 
Dealing with Legacy &lt;del>Code&lt;/del> People
Dealing with Legacy &lt;del>Code&lt;/del> PeopleDealing with Legacy &lt;del>Code&lt;/del> People
Dealing with Legacy &lt;del>Code&lt;/del> People
reneedv
 
Whose Wife Are You?
Whose Wife Are You?Whose Wife Are You?
Whose Wife Are You?
reneedv
 
RailsBrdige Seattle Workshop Intro
RailsBrdige Seattle Workshop IntroRailsBrdige Seattle Workshop Intro
RailsBrdige Seattle Workshop Intro
reneedv
 

More from reneedv (14)

Nginx caching
Nginx cachingNginx caching
Nginx caching
 
Week10
Week10Week10
Week10
 
Week9
Week9Week9
Week9
 
Week7
Week7Week7
Week7
 
Week6
Week6Week6
Week6
 
Week5
Week5Week5
Week5
 
Week4
Week4Week4
Week4
 
Week3
Week3Week3
Week3
 
Week2
Week2Week2
Week2
 
Week1
Week1Week1
Week1
 
Fill Up your Bookshelves!
Fill Up your Bookshelves! Fill Up your Bookshelves!
Fill Up your Bookshelves!
 
Dealing with Legacy &lt;del>Code&lt;/del> People
Dealing with Legacy &lt;del>Code&lt;/del> PeopleDealing with Legacy &lt;del>Code&lt;/del> People
Dealing with Legacy &lt;del>Code&lt;/del> People
 
Whose Wife Are You?
Whose Wife Are You?Whose Wife Are You?
Whose Wife Are You?
 
RailsBrdige Seattle Workshop Intro
RailsBrdige Seattle Workshop IntroRailsBrdige Seattle Workshop Intro
RailsBrdige Seattle Workshop Intro
 

Recently uploaded

Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
Trusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process MiningTrusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process Mining
LucaBarbaro3
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
Postman
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - HiikeSystem Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
Hiike
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
Jakub Marek
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
SAP S/4 HANA sourcing and procurement to Public cloud
SAP S/4 HANA sourcing and procurement to Public cloudSAP S/4 HANA sourcing and procurement to Public cloud
SAP S/4 HANA sourcing and procurement to Public cloud
maazsz111
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
dbms calicut university B. sc Cs 4th sem.pdf
dbms  calicut university B. sc Cs 4th sem.pdfdbms  calicut university B. sc Cs 4th sem.pdf
dbms calicut university B. sc Cs 4th sem.pdf
Shinana2
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Wask
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
HarisZaheer8
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
Antonios Katsarakis
 
A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024
Intelisync
 

Recently uploaded (20)

Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
Trusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process MiningTrusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process Mining
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - HiikeSystem Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
SAP S/4 HANA sourcing and procurement to Public cloud
SAP S/4 HANA sourcing and procurement to Public cloudSAP S/4 HANA sourcing and procurement to Public cloud
SAP S/4 HANA sourcing and procurement to Public cloud
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
dbms calicut university B. sc Cs 4th sem.pdf
dbms  calicut university B. sc Cs 4th sem.pdfdbms  calicut university B. sc Cs 4th sem.pdf
dbms calicut university B. sc Cs 4th sem.pdf
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
 
A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024
 

How I Learned to Smell Code

Editor's Notes

  1. Hola, thank you for having me here today! I’m going to be telling you a story, my story. I hope you get something out of it, and if not I hope it amuses you.Before I tell you about myself, I’m going to ask you some questions. I know! Audience participation at a software conference, how awful of me! And just before lunch too! Don’t worry they are not questions about food!Also, everyone has heard the term “code smell before right?”
  2. Just for fun, how many of you are rock climbers?
  3. Like Rails! Especially ones that follow or teach us maintainable patterns and practices of ways to structure code.
  4. What is at the end of the Road? What’s the light at the end of the tunnel?I love descriptive analogies, especially ones that come with a picture of a dog!So which is it? I think I made this pretty obvious, but just in case.
  5. What is this? This is my story.I’m going to be telling you about my experiences with code, the Good, the Bad ,and the Goofy!This explains my questions. I was wondering who out there has a similar background to mine. I went to university for computer science, I worked as a business consultant doing custom development in the Microsoft stack, and now I work as the lead Ruby developer for Blue Box Group.I’ve worked with lots and lots of code of different varieties, and each of the three different places where I have written and had to maintained code I’ve learned something different about what makes for good code and what makes for bad code.Using my hound sniffing analogy, you can say my code sniffing ability grew with each step of my journey.
  6. At university I did a lot of java and C programmingThough we were using java to learn about objects, most of the code I wrote and learned from was procedural in nature and had lots of conditionals:A situation I like to refer to as if-else-death.Working with teams was vile,Tests were unheard ofAnd I rarely every looked at code that was quote ”finished” – ie: code for a completed assignment (in fact I had trouble finding code from that time to make this awful picture of java code for this talk)So with my dog analogy: a dog with a refined sniffer at this point would look at my code and need a gas mask….
  7. So what did I learn about code from University?Of course I learned the basics: how to solve a programming problem (don’t underestimate this!)&lt;Read 1st bullet&gt;unless I interview with Google (linked list, Back-Tracking Search, Bubble Sort,etc…)I did ACM competitions, Top Coder competitions, etc…I certainly got skills from doing that, but they were not skills about how to create maintainable, and/or scalable, applications.I was a CS TA for 3 years, and found teaching to be the best way for me to learn myself.(Not really anymore…)I really loved javadoc when I got out of school, I thought that was the best and only way to document code! How awesome is that, something creates docs right from your comments!HAHA ok enough with the java already! This is a RoRconf!
  8. So what am I going to talk about next? C#... As a consultant, one of my favorite projects was building a financial forecasting system for a very large organization from scratch in C# .Net. It was a service oriented web application that was going to save all of their financial analysts tons and tons of time. We used the Windows Workflow Foundation framework for structuring the app. Anyone familiar with the WWF? Hehe I like to refer to that acronym because it’s reference to the world wrestling federation is appropriate – It’s a big show, and very few people get hurt.We had lots and lots and lots of code.But it wasn’t horrible code, it was very, very structured code. Everything with a similar purpose was grouped together, you knew where to look for a particular action, naming conventions and code patterns for methods were strictly enforced…. Even when they didn’t really make sense…..Our hound in this picture is just sneezing, he’s not terribly sick, but this somewhat nicely patterned behemoth of code never actually went into production… Also, our “test suite” was actually a team of testers with scripts they would run through any time the app changed. That is pretty typical big corporation waste from what I have seen.
  9. So What did I learn about code here?Consistently adhering to patterns makes code written by different team members separately adhere together nicely.I certainly learned about single responsibility and abstractions, but there were patterns beaten into me that never really clicked:Always make your if statements positive, and you must always have an else when there is an if. What? Why?Well now I can say I understand that if you have an if, you are branching your code, and putting the else there makes that other branch explicit, therefore giving someone who comes after more information about what your code does.I can see the argument, but I would say now get rid of the branch and use polymorphism – objects are your friends!!!But again, this wasn’t Ruby, the framework wasn’t Rails, and this was enterprise level business practices – a much more restrictive environment than most of us in the RoR community work in.
  10. So what was next?Ruby! Rails! Legacy Code?Best way to understand OO design principles is to work with code that doesn’t follow any. But it’s a rails app, it has MVC structure and separation of concerns at those layers, right?The model I’ve excerpted here has 2,533 linesThe dog in this picture says it all….So what do you do? This is production code, that the business and the customers depend on. There are bugs. (Did I really need to say that?) but really there are bugs that need fixing and feature requests that need implementation. You gotta deal with it, you gotta do it – That’s how I learned to smell code.
  11. make sure there are tests! – Get the business requirements (AGAIN) from the end user – if it works in production that does not mean “don’t change it”, that means “Good the end users know the business process, and we can easily re-capture what this cluster is trying to do, and re-do it better”.
  12. All of my first code looks like C#, because that’s the last language I knew, and there weren’t any good patterns to follow.I fought with Rails about how it structures data – I’m a db girl, who all of a sudden isn’t supposed to worry about the database anymore….When I found myself writing just as nasty (in terms of maintainability) code I looked for help.
  13. Rails patterns are getting better and better:Coffee Script – makes our js less smelly – and there will be emerging new patterns here for maintaining all the gobs of client side code we are all writing
  14. I talked about patterns to follow – here I’m talking about not following a pattern – when you follow an anti-pattern you will learn something – work with someone else who has a different pattern and learn together with them.The least smelly programmers are pair-programmers
  15. If you have never seen the anit-patterns or code-smells talked about here, they may not click, but then re-read it. This is a reference manual, not a one-time-read.
  16. Same idea here – this book is mentioned in Clean Code – read all the books in clean code’s bibliography – I have not gotten through all of them yet.
  17. Lastly – pick up a hobby – you learn really cool things about what you do everyday when you do something else.From Rock climbing I’ve learned this about OO design patterns:It’s like learning to belay – you learn, you become a good belayer, It becomes muscle memory, but you don’t really get it, until one day it clicks – you’ve caught lots of falls, you’ve both lead climbed and caught a leader fall – you get how the system works and why the pattern / the rules you follow are there. That is when you can evolve and modify the system. You know when to follow the pattern and when to improvise. Do this with your code and help others do it – follow a couple good design patterns, make them muscle memory, and one day it will click, and then you can evolve your own patterns that will push the field forward. – If you’ve followed lots of good patterns, you will know how to make a good new one.
  18. Not everyone has the same experiences you do, sometimes you need to write a bit of C# in ruby to figure out that ruby shouldn’t be written that way.I’ve found that these three things that are about learning and flexibility are more important to creating scentless code than anything else.For # 4 : It’s my pet peeve – I’m allowed one soap-box per talk, and this is it.every point in Chapter 17 (smells and heuristics) that is made about comments is 100% true. I’ve seen all of them, I’ve done a number of those things with comments myself. JUST STOP! Make your code document itself, no one who comes after you, who changes what your code does, will update your comments, but they will update your names and method signatures. And trust your source control – use Git for your comments – it’s a much better place for them. All of us think about the appropriate place for our code to go, think about the appropriate place for your comments.