The pMD Blog

Welcome to the
pMD Blog...

where we cover interesting and relevant news, insights, events, and more related to the health care industry and pMD. Most importantly, this blog is a fun, engaging way to learn about developments in an ever-changing field that is heavily influenced by technology.

Lessons From Surviving A Rewrite

Earlier this year, we released secure messaging clients across iOS, Android, and the browser. Over the last few months, however, it became clear that the web client was having slower release iterations than the other platforms while also hitting some performance ceilings. We decided it was finally time to fix all the issues, but as we got deeper into the code, we realized there was little we could reuse. The abstractions and implementation needed to change.

When you commit to rewriting a large chunk of code, you’re most likely about to make a huge mistake. Joel Spolsky argued this in his classic essay, “Things you should never do”. Yet when we successfully released it on schedule last week, I was frankly surprised because rewrites are usually such a dismal failure in the software industry. Since then, we’ve been thinking about the lessons we learned and how we managed scope creep. Here are some of those lessons:

  1. Know exactly why a rewrite will help the user on day one. This is probably the most important lesson to help keep things on the right track. Whether it’s better responsiveness, better features, or fewer bugs, have concrete and quantifiable goals that must be addressed. The rewrite is not for the developer, it’s for the user. Making the code “cleaner” is not good enough.

  2. Redefine the problem. Oftentimes, many requirements are in fact not really required. Insurmountable problems in the old code can become trivial if you question the right assumptions. I’ve found “hammock driven development” helps at this stage.

  3. Simplify the data model. How you store your data, on-disk and in memory, makes all the difference in what happens next. The fewer copies and immutable versions floating around the better, but avoid puritanical thoughts; denormalized data can be a beautiful thing.

  4. New infrastructure is expensive. Even if you outsource servers or services to somewhere in the cloud, the dependency and management of these new resources adds complexity (and fragility) you may not foresee. Designing simpler but performant infrastructure may be harder, but better.

  5. You probably don’t need a caching layer. Given modern hardware and the fact that databases already do some forms of caching for you, introducing more complexity into your stack can probably be avoided for many real world applications. Scrutinize whether something needs to be cached and at what level. Just remember Phil Karlton’s wise words: “There are only two hard things in Computer Science: cache invalidation and naming things.”

  6. You probably need a caching layer. If done right, caching can open a lot of doors. Yet this shouldn’t always entail introducing some new layer into your stack. Sometimes a good old static HashMap will do. There’s a cache for every budget.

  7. You can optimize that SQL query a lot more than you think. It never ceases to amaze me how much faster a SQL query can be made after you’ve told everyone it can’t be made any faster. These days it’s so easy to blame the relational backend and try to argue for a NoSQL solution. Be creative, you might be pleasantly surprised.

  8. If you’re deleting more code than you’re adding it means one of two things. You are either losing features and introducing old bugs or you’re actually doing something right. Make sure you know which one you’re doing at all times.

  9. The chance of a successful rewrite is inversely proportional to the age of the product. Code complexity is often a function of time: rebuild it when it’s young, and humor it when it’s old.

We didn’t rebuild our entire charge capture app, but we did end up rewriting a significant piece of the secure messaging feature. Whenever you get a sinking feeling of scope creep on a refactor, I think that Joel’s warnings and a few lessons can go a long way toward a successful strategy.
5G ACA Account Management accurate coding ACI adoption Advancing Care Information Advice AHCA AHRQ AI Alternative Payment Model Amazon S3 Android API Apple appointment reminders Artificial Intelligence arts Audit Award Bay Area BCRA Benefits Best Place to Work Best Practices Big Data Billing Billing & Collections Billing Service Billing Services bootcamp BPCI BPTW Bundled Payment Model Bundled Payments Business relationships Care Communities care coordination Care Navigation Care Team Career Fair CDC Charge Capture Charge Capture App Charge Capture Software Charge Capture Solution Charge Capture Statistics Charge codes Charge Lag Charge Reconciliation CHIP CIO Claims Clinical Communication clinical data Clinical Data Registry Clinically integrated network Cloud CMS cms regulations Coding Collaboration Communication Company Culture Conferences Connected Health Record contact practice Coronavirus COVID COVID-19 COVID19 Cross-functional culture custom reports Customer Interaction customer relations customer service customer success customer support Customers Cyber Security cybersecurity Developer DHHS Diagnosis codes Dialysis discharge instructions Doctor EHR elderly Electronic Charge Capture Eligibility EMR Encryption End-to-End Platform epidemic Expansion FDA FHIR Flu fundamentals gamification Gen Z GI GI Outlook Goals group messaging Health Care Health Care Technology Health Care Web Health Care. Health Care IT health data Health Information Exchange Health Record Healthcare Healthcare Data healthcare interface healthcare interface integration healthcare software HIE HIPAA HIPAA Compliance hipaa compliant communication hipaa compliant communication platform HIPAA-Compliant Hiring HL7 Holidays Home dialysis Home Health Hospital Census Hospital Communication humanity IA ICD-10 ICD-11 Immunizations Implementation Improvement Activities in-app calling inclusive software incorrect billing increase revenue injury rehabilitation innacurate coding Instant capture Integration interface interoperability iOS iOS 8 iOS7 iPad iPhone iPhone 6 IT Lead Generation length of stay LGBTQIA Long Term Care LTC Machine learning MACRA Medaxiom Medical Billers Medical Billing Medical Billing & Collections medical billing denials and solutions Medical claims Medical Coding medical coding accuracy medical coding quality Medical Errors medical practice revenue Medical Record Medical Software Medicare Mental Health Mentorship Messaging Messaging with Patients MGMA MIPS MIPS Registry mobile Mobile App Mobile Charge Capture Mobile EHR Mobile Health Mobile Messaging Mobile Payments Mobile security Mobile Software Mobile Technology Mobile telehealth Modern Healthcare Native App natural language processing Network new feature new features news NIH nlp OCM onboarding Oncology Care Model operations opioid crisis Pandemic Parenting Partnership partnerships Patient Patient access Patient Adherence Patient App Patient Care Patient Chat Patient chat routers Patient Communication patient data Patient Engagement patient experience patient experience cycle Patient Generated Health Data Patient Handoff Software Patient Information Patient Messaging patient outcomes Patient payments patient portal Patient Record Patient Safety Patient satisfaction Patient Simulators patient support Patient Visits Patient-Centric PCP Performance bonus PHI Phishing Scams Physician Physician burnout pmd pMD Pro pMD Team population health Population Health Management Post-COVID PQRS Practice Management Pregnancy Press Release Product Development Productivity products Promoting Interoperability Protected Health Information QCDR QPP Quality Data quality reporting Quality Scoring Ransomware RCM Recruiting Recruitment Reimbursement remote jobs Remote Work Reporting reports Residents Responsibility revenue cycle management ROI Rural communities Ryuk Sales Secure Communication Secure Data Secure Messaging Secure Messaging Video Secure Text Messaging Secure Video Secure Video Chat Security Audit self care seniors sexual orientation and gender identity SF Biz Times SMB SNF SNOMED-CT SOC 2 software vendor SOGI Spear Phishing Specialty Care success support TCM TDM Team Team culture Teamwork technology telehealth telehealth reporting Telemedicine telemedicine in long term care Telemedicine skilled nursing facilities Teletherapy Text Messaging texting Thanksgiving Therapeutic Drug Monitoring time-based billing training transgender Travel Upgrades UX Design VA vaccination records vaccinations Vaccine Value-based care Video Calling Video chat video communication video conferencing Virtual Care Virtual Visit voice calling voice memos WannaCry Wearable Device wearing many hats Web App wellness wfh Wireless Work From Home Work Life Balance Workflow optimization Workplace Culture