Upgrade to Pro — share decks privately, control downloads, hide ads and more …

The importance of naming

The importance of naming

In this talk, I walk through examples of bad naming, and derive my naming principles from them:

1. Use only one name to refer to a concept.
2. Give different concepts different names.
3. Rename concepts when principles are violated.
4. Ensure names match meaning.
5. Break up concepts that cannot be named properly.
6. Be consistently correct.

5fd304a1701b060ad83381e4f4722e95?s=128

Denis Defreyne

February 06, 2020
Tweet

Transcript

  1. The importance of Denis Defreyne RUG : : B 2020

    - 02 - 06 naming
  2. principles cases +

  3. Inventory CASE 1

  4. moving inventory list

  5. moving inventory list Umzugsgutliste

  6. moving inventory list Umzugsgutliste moving goods list

  7. moving inventory list Umzugsgutliste moving goods list inventory of items

  8. Use only one name to refer to a thing. PRINCIPLE

    1
  9. Use industry-standard names when possible. PRINCIPLE 1b

  10. Inventory, redux CASE 2

  11. moving inventory list Umzugsgutliste 
 moving goods list 
 inventory

    of items 

  12. moving inventory list Umzugsgutliste 
 ( UGL ) moving goods

    list 
 inventory of items 

  13. moving inventory list Umzugsgutliste 
 ( UGL ) moving goods

    list 
 ( MGL ) inventory of items 

  14. moving inventory list Umzugsgutliste 
 ( UGL ) moving goods

    list 
 ( MGL ) inventory of items 
 ( IOI )
  15. moving inventory list Umzugsgutliste 
 ( UGL ) moving goods

    list 
 ( MGL ) inventory of items 
 ( IOI )
  16. glossary

  17. Give different things different names. PRINCIPLE 2

  18. Staging CASE 3

  19. 1 2 3 4 5 stage

  20. 1 2 3 4 5 stage 1 – 5

  21. 1 2 3 4 5 pipeline stages

  22. 1 2 3 4 5 SalesForce stage

  23. 1 2 3 4 5 SalesForce staging

  24. staging stage qa ??? ??? ???

  25. staging + sandboxes

  26. Rename things when principles are violated. PRINCIPLE 3

  27. Make renaming easy. PRINCIPLE 3b

  28. Leads CASE 4

  29. lead

  30. lead the contact information […] of a customer who is

    interested in a specific product or service.
  31. the 
 outside 
 world

  32. Lead Manager the 
 outside 
 world

  33. Lead Manager Core the 
 outside 
 world

  34. Lead Manager Core the 
 outside 
 world Salesforce

  35. Lead Manager Core the 
 outside 
 world Salesforce

  36. Lead Manager Core the 
 outside 
 world Salesforce manages

    leads
  37. Lead Manager Core the 
 outside 
 world Salesforce manages

    leads does not 
 manage leads
  38. Ensure names match meaning. PRINCIPLE 4

  39. Leads, redux CASE 5

  40. Core

  41. Core leads id from_street to_street …

  42. Break up things that can’t be named properly. PRINCIPLE 5

  43. Importers and exporters CASE 6

  44. Core Salesforce

  45. Core Salesforce Importer Exporter

  46. Core Salesforce Exporter Importer

  47. Core Salesforce Importer Exporter

  48. Core Exporter Importer Exporter Exporter Importer Importer Exporter Importer

  49. Core Importer Exporter Importer Importer Exporter Exporter Importer Exporter

  50. Core Importer Exporter Importer Exporter Exporter Importer Importer Exporter

  51. Be consistently correct. PRINCIPLE 6

  52. 1 2 3 4 5 6

  53. Bonus round! CASE ∞

  54. Total price = total_price

  55. Total price = total_price +

  56. hercules hercules-ui

  57. hercules hercules-ui UI lives here

  58. UI

  59. UI api.company.de

  60. None
  61. P1 Use only one name to refer to a thing.

  62. P1 Give different things different names.

  63. P1 Rename things when principles are violated.

  64. P1 Ensure names match meaning.

  65. P1 Break up things that can’t be named properly.

  66. P1 Be consistently correct.

  67. 1 2 3 4 5 6 DONE

  68. DONE

  69. None