WorryFree Computers   »   [go: up one dir, main page]

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

Are Rewrites Always a Bad Idea?

Are Rewrites Always a Bad Idea?

Adele Carpenter

May 05, 2024
Tweet

More Decks by Adele Carpenter

Other Decks in Programming

Transcript

  1. Item Response Theory (IRT) AR E R EWRITES ALWA YS

    A BAD IDEA? Least Difficult Items Most Difficult Items
  2. Item Response Theory (IRT) AR E R EWRITES ALWA YS

    A BAD IDEA? Least Difficult Items Most Difficult Items Assessment
  3. Assessment Delivery Reporting service Data export service - Hard to

    verify changes - No logging - Non human-readable requests
  4. aPar bPar CurSeg Theta WarmTheta Clu Ctg Naming is Hard

    AR E R EWRITES ALWA YS A BAD IDEA?
  5. - Black box - Hard to reason about and debug

    - Trivial changes take a long time Problems with the Current Service AR E R EWRITES ALWA YS A BAD IDEA?
  6. - Stateless - Well-defined scope or footprint - Small part

    of the entire project What makes it a Good Rewrite Candidate? AR E R EWRITES ALWA YS A BAD IDEA?
  7. AR E R EWRITES ALWA YS A BAD IDEA? Photo

    by Chris Lawton on Unsplash - There is a desire to functionally change the application 0. Reasons to Rewrite
  8. AR E R EWRITES ALWA YS A BAD IDEA? Photo

    by Chris Lawton on Unsplash - There is a desire to functionally change the application - There are no small steps to be found 0. 1. Reasons to Rewrite
  9. Question Yourself - Bias FOR the rewrite (most common!!): -

    Why should I keep the existing code base? - What opportunities exist to improve it? AR E R EWRITES ALWA YS A BAD IDEA? Photo by Chris Lawton on Unsplash - Bias AGAINST: - Are the improvement opportunities really there? - How much work are these “improvements” compared to a rewrite? Photo by Ilkka Kärkkäinen on Unsplash
  10. AR E R EWRITES ALWA YS A BAD IDEA? Photo

    by Chris Lawton on Unsplash - There is a desire to functionally change the application - There are no small steps to be found - The skills are not in the team and you don’t wish to acquire them 0. 1. 2. Reasons to Rewrite
  11. No wish to acquire the required skills AR E R

    EWRITES ALWA YS A BAD IDEA? Photo by Divani on Unsplash Photo by an_vision on Unsplash Photo by Meritt Thomas on Unsplash
  12. AR E R EWRITES ALWA YS A BAD IDEA? Photo

    by Chris Lawton on Unsplash - There is a desire to functionally change the application - There are no small steps to be found - The skills are not in the team and you don’t wish to acquire them - The service is small and scope well- defined 0. 1. 2. 3. Reasons to Rewrite
  13. Fig tree in the forest by Tatters, used under CC

    BY 2.0 license https://www.flickr.com/photos/tgerus/24057488061
  14. Load Balancer Starting position Early days Halfway Nearly finished Finished

    Internet icons created by Freepik - Flaticon Load Balancer Load Balancer Load Balancer Load Balancer
  15. AR E R EWRITES ALWA YS A BAD IDEA? Strangler

    Fig Application Go down the rabbit hole from Martin Fowler’s original blog
  16. Spike - Experiment to explore a solution to a new

    problem - “End-to-end but very thin” - Best bet is a functional spike - Can help you figure out how to deliver value early AR E R EWRITES ALWA YS A BAD IDEA? Photo by Chris Lawton on Unsplash Photo by Ayoola Salako on Unsplash
  17. Reasons to Rewrite - There is a desire to functionally

    change the application - There are no small steps to be found - The skills are not in the team and you don’t wish to acquire them - The service is small and scope well- defined AR E R EWRITES ALWA YS A BAD IDEA? Photo by Chris Lawton on Unsplash 0. 1. 2. 3.
  18. Item information calculation Student ability estimation (Online) Item calibration Content

    balancing Item selection IN scope? YES YES YES NO NO AR E R EWRITES ALWA YS A BAD IDEA? Feature Audit Item selection service
  19. You are not special - If you think you are,

    you’re at peak Dunning-Kruger #sorrynotsorry - It’s probably “so complicated” for a reason - Treat the first phase as a discovery or feasibility stage - Prepare yourself to walk away AR E R EWRITES ALWA YS A BAD IDEA? Photo by Chris Lawton on Unsplash Photo by Hobi industri on Unsplash
  20. Item selection service Item information calculation Student ability estimation (Online)

    Item calibration Content balancing Item selection IN scope? YES YES YES NO NO AR E R EWRITES ALWA YS A BAD IDEA? Plan for version 1.0
  21. Development Begins AR E R EWRITES ALWA YS A BAD

    IDEA? Photo by Divani on Unsplash - Kotlin / Spring Boot
  22. Choosing the Tech Stack AR E R EWRITES ALWA YS

    A BAD IDEA? Photo by Divani on Unsplash - MultiK could work - But we were only dealing with 2D arrays - Kotlin / Spring Boot - Numerical packages in Kotlin - MultiK and SMILE - SMILE overpowered
  23. data class WaffleSales(val type: String, val price: Int, val qtySat:

    Int, val qtySun: Int) val stroop = WaffleSales("stroop", price = 2, qtySat = 15, qtySun = 20) val belgian = WaffleSales("belgian", price = 3, qtySat = 25, qtySun = 18) val weekendSalesData = listOf(stroop, belgian)
  24. data class Saturday(val qtySold: Int) data class Sunday(val qtySold: Int)

    data class WaffleSales(val type: String, val price: Int, val sat: Saturday, val sun: Sunday) val stroop = WaffleSales("stroop", price = 2, Saturday(15), Sunday(20)) val belgian = WaffleSales("belgian", price = 3, Saturday(25), Sunday(18)) val weekendSalesData = listOf(stroop, belgian)
  25. data class Saturday(val qtySold: Int) data class Sunday(val qtySold: Int)

    data class WaffleSales(val type: String, val price: Int, val sat: Saturday, val sun: Sunday) val stroop = WaffleSales("stroop", price = 2, Saturday(15), Sunday(20)) val belgian = WaffleSales("belgian", price = 3, Saturday(25), Sunday(18)) val weekendSalesData = listOf(stroop, belgian) val dailySales = listOf( weekendSales.sumOf { it.price * it.sat.qtySold }, weekendSales.sumOf { it.price * it.sun.qtySold } ) println(dailySales) // [105, 94]
  26. e

  27. e = 1 + 1 1 + 1 2 +

    1 2 × 3 + 1 2 × 3 × 4 + … + 1 n! e ≈ 2.71828182845904523536 0287471352662497757247093 6999595749669676277240766 3035354759457138217852516 6427427466391932003059921 8174135966290435729003342 95260… d dx ex = ex
  28. val eToPower = exp(3.0) // ~ 2.718 ^ 3 println(eToPower)

    // 20.0855 val naturalLog = ln(eToPower) // Log to base e of 20.08 println(naturalLog) // 2.9997 (about 3) // other handy functions // pow() abs() sqrt()
  29. *But they can be a good idea sometimes. YES!* Are

    Rewrites Generally a Bad Idea? AR E R EWRITES ALWA YS A BAD IDEA?
  30. When are they not? - There is a desire to

    functionally change the application - There are no small steps to be found - The skills are not in the team and you don’t wish to acquire them - The service is small and scope well- defined AR E R EWRITES ALWA YS A BAD IDEA? Photo by Chris Lawton on Unsplash 0. 1. 2. 3.
  31. - Tech stack: made a good enough choice in the

    context of your company and team - Unfamiliar technology = more risk - Add value as early as possible - Conduct experiments - What so your users / stakeholders think? If you really must rewrite AR E R EWRITES ALWA YS A BAD IDEA?