Skip to content

Instantly share code, notes, and snippets.

Last active March 15, 2020 15:15
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
My Empirical Formula for Stability to Code to Refactor...a Ratio if you Will

by Antwan Wimberly

25 June, 2019

Time for Red, Green, Refactor Must Present Itself (When in Doubt, Do as the Romans Do)

If production code already works (conforms to requirements and is deemed fast enough for end users...which makes it stable) and does not have code coverage, leave it be until the opportunity presents itself to add code coverage and change the code (System Under Test) at will, or a bug occurs related to that code, or it is deemed not performant enough at a later date. ☝🏽

If production code has code coverage and conforms to requirements but could be better and you have time to improve it, proceed to refactor it. The tests will serve as feedback.


Otherwise, it's business as usual (work life balance all the things). Try to allocate sufficient time to add test coverage for new requirements as you’re writing new code but be aware of the scope of the project and when it ideally needs to ship to production. From there’s it’s a balancing act. I’m a natural born β™ŽοΈ so I’m innately capable of conducting this balance of a daily basis βš–οΈ. All hail Egypt πŸ‡ͺπŸ‡¬. My African and European heritage have served me well (let freedom ring...U.S.A.!!!).

Deeper than rap - Rick Ross of Miami, FL

Copy link

armw4 commented Nov 30, 2019

To be a bit more concise, wait until one of the following conditions is met/satisfied prior to introducing deltas for stable production code that lacks test coverage:

  • The existing production code exposes a bug at a 🐜 ⛅️ πŸ§™β€β™‚οΈ (to encapsulate those 3️⃣ meaningless and nebulous emojis...I the future while you’re πŸ„πŸ½β€β™€οΈ YouTube or perusing πŸ‘©πŸ»β€πŸ’» πŸ‘¨πŸ»β€πŸ’» ...or your πŸ†• born baby πŸ‘ΆπŸ½ is in the middle of taking a poo πŸ’©...everybody has to ...poo πŸ₯˜)
  • The existing production code is too slow πŸ“ˆπŸ“Š

Put simply, don’t get too cute (’re absolutely trolling to some degree..instant cringe if it costs your company or team 🏑 βš–οΈ πŸ“† ♋️ πŸ‘ 🚴🏾 at a later date ...but certainly not the end of the world β˜€οΈ ) and code change just for the sake of doing so (you’re exposing unnecessary risk and you have far better things to do w/ your time as an IT Professional - LinkedIn Rocks 🎸). πŸ™ 🀝 πŸ“§ πŸ‘©πŸ»β€πŸ’» πŸ‘¨πŸ»β€πŸ’» βš–οΈ

Copy link

armw4 commented Dec 5, 2019

Copy link

armw4 commented Mar 15, 2020


balance on a daily basis.

You get the point by now πŸ†

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment