You: "The biggest risk was hidden business logic, for example B2B pricing rules written in stored procedures and in VBScript.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | # ====================================================================== # Q: CTO: "Tell me about the migration from ASP to Django. What was the biggest # risk?" # # You: "The biggest risk was hidden business logic, for example B2B pricing # rules written in stored procedures and in VBScript. I handled it with # characterization tests: I recorded real scenarios from the old system # (customer, SKU, quantity -> final price) and the new system had to produce # exactly the same results. The second risk was the data: encodings # (windows-1253), duplicates, orphaned records. I wrote an idempotent ETL with # reconciliation reports. We did the cutover module by module behind nginx, with # a rollback plan for every step." # ====================================================================== # The cases were extracted from the legacy system (inputs + the price the ASP produced) @pytest.mark.parametrize('case', load_cases('legacy_b2b_pricing.json')) def test_b2b_price_matches_legacy(case): price = pricing.calculate(customer_id=case['customer'], sku=case['sku'], qty=case['qty']) assert price == Decimal(case['legacy_price']) |