~/talk

Ruby Smells

Talkat RubyConf Portugal 2015 · 2015-09-14..09-15· [testing]
slides:none on file

Argues that common Ruby code smells are concrete and fixable: shows examples like duplicate method calls, data clump, repeated conditional, control parameter and attribute smell, and demonstrates refactorings—cache repeated calls, introduce a Location value object or a NullLocation, split boolean-flags into separate predicates, push behavior into attendee/collection objects, and replace setters with immutable update/with methods. Presents and uses the configurable reek static analyzer to find smells, recommends verifying with tests before refactoring and tuning reek rules per project.

AI-written summary · about

  1. 0:00Introduction to Ruby smells
  2. 3:59What are code smells
  3. 7:12Duplicate method calls
  4. 11:01Data clamps in methods
  5. 13:06Repeated conditionals
  6. 14:50Control parameters
  7. 17:35Utility functions
  8. 20:24Feature envy
  9. 22:52Attribute smell
  10. 27:10Finding smells with Reek
  11. 33:47Configuring Reek
  12. 35:11Refactoring advice and conclusion
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.