logo
  • Product
  • Solutions
  • Developers
  • Resources
  • Pricing
  • Log in
  • Create a store
  • Product

  • Pricing
  • Try for free
  • Log In
  • Merchandising

  • Operations

  • Building

  • Integrations

  • Products

    Powerful modeling and versatile presentation of your entire catalog.

  • Subscriptions

    Sell recurring physical and virtual products alongside one-time offerings.

  • Discounts

    Get the sale with coupons, BXGY promotions, and automatic discounts.

  • Wholesale

    Sell B2B like it's DTC, along with volume pricing, customer groups, and invoicing.

  • Content

    Manage all your products content through the admin dashboard.

  • Users

    Multi-store admin accounts and role-based permission controls.

  • Customers

    Manage customer info, generate reports, and see buyer activity.

  • Orders

    Edit orders anytime and get the right information for smooth fulfillment.

  • Fulfillment

    Ship from multiple locations, track inventory, and split shipments.

  • Reporting

    Monitor your store's performance to ensure you have visibility across the business.

  • Storefronts

    Swell storefronts are fully customizable, allowing you to create just the right experience.

  • Checkouts

    Use our hosted checkout, integrate with a partner, or build a custom flow.

  • Payments

    Connect multiple gateways simultaneously, store cards, and split payments.

  • Internationalization

    Go global with region-specific languages, pricing, and payment methods.

No-code integrations

Connect with 40+ services for marketing, payments, fulfillment, automation, and more.

See all integrations →

Use Cases

  • Direct-to-consumer

    Tell your story and give customers a unique shopping experience

  • Subscriptions

    Sell personalized subscription bundles, memberships, and one-time items together

  • B2B/B2C

    Support retail and wholesale customers from one catalog and dashboard

  • Marketplaces

    Create a B2B or B2C marketplace with multi-vendor carts and split payouts

Customer Stories

  • Spinn Coffee

    A coffee revolution sparked by a connected machine and marketplace

  • Smashing magazine

    Global tax and shipping for complex product bundles

  • Infinitas Learning

    Delievering leading educational experiences in Europe

All customer stories →

Documentation

  • Quickstart

  • Backend API reference

  • Frontend API reference

  • Guides

  • Core concepts

  • Storefronts

Community

  • GitHub

  • Discussion forum

  • Changelog

  • API status

Resources

  • Help Center

    The latest industry news, updates and info.

  • Customer stories

    Learn how our customers are making big changes.

  • Become a partner

    For agencies creating innovative commerce experiences.

  • Changelog

  • API Status

  • Contact us

Blog

Legacy code bases and the five stages of grief

From denial to acceptance, learn how to navigate the emotional stages of working with legacy code and turn frustration into growth.

Thomas Taylor | September 13, 2023

Hey there, I'm Thomas, and I've recently joined Swell as a UI Engineer. Currently, I’m focused on improving Swell’s admin dashboard and implementing a new design system. Here's a glimpse into my journey thus far...

Established code bases can be both a blessing and a curse for Engineers—regardless of seniority or experience. On one hand, they provide a foundation for building upon existing systems (keeping in mind these systems are paying your salary). On the other hand, they often come with technical debt and haven’t kept up with the rapidly evolving frontend world that can make even the simplest task feel like an uphill battle. As engineers delve into these code bases, they often find themselves experiencing a range of emotions that mirror the five stages of grief. In this blog post, I will explore these emotional stages and provide tips for navigating each one effectively.

Stage 1: Denial

When confronted with a sprawling and complex code base - regardless of seniority, it's common to experience a sense of denial. "This can't be as bad as it looks", you might think. Unfortunately, denial can hinder progress as you underestimate the complexity of the situation. To move past this stage:

Accept reality: Acknowledge that the code base is indeed challenging. Embrace the fact that you'll need time to understand its intricacies.
Documentation is key: Start by documenting what you observe, even if it seems chaotic. This will help you create a roadmap for understanding the code better.
Set realistic expectations: Give yourself permission to encounter difficulties and setbacks. Patience is crucial.

Stage 2: Anger

As you begin to unravel legacy code, frustration and anger may set in. Why was the code written this way? Why weren't better practices followed? Instead of dwelling on these emotions, channel them constructively:

Avoid blame: Remember that the original developer/s likely had their reasons, be it tight deadlines, limited resources, or anything in-between.
Find venting outlets: Discuss challenges with colleagues or in online communities. Sharing experiences can provide emotional release and potential solutions.
Incremental improvements: Identify small, manageable tasks you can improve. This will give you a sense of accomplishment and gradually transform the code base.

Stage 3: Bargaining

In the bargaining stage, engineers may try to find shortcuts or ways to make the legacy code work temporarily. This can lead to patchwork solutions that only exacerbate the issues. Instead:

Plan for refactoring: Instead of patching, plan for systematic refactoring. Identify key areas to improve and create a clear refactoring strategy.
Balance pragmatism and long-term goals: while it's important to address immediate concerns, don't compromise long-term maintainability. Strive for a balance between quick fixes and holistic improvements.

Stage 4: Depression

As the enormity of the task sinks in, feelings of hopelessness and depression may emerge. The code might seem insurmountable, and doubts about your own abilities might arise. To overcome this stage:

Break it down: divide the code base into smaller, manageable sections. Tackling one piece at a time can make the challenge seem less daunting.
Celebrate small wins: recognize and celebrate each successful refactor or improvement. These victories build confidence and momentum.
Seek support: collaborate with team members or mentors. They can provide fresh perspectives and encouragement when you're feeling stuck.

Stage 5: Acceptance

Finally, after investing time and effort, you'll reach a stage of acceptance. The code base's flaws are no longer a surprise, and you've made significant progress. To reach this stage:

Celebrate achievements: reflect on how far you've come and the positive impact your efforts have had on the code base.
Share knowledge: document the improvements you've made and share them with your team. This ensures that future engineers won't have to endure the same struggles.
Learn and grow: embrace the lessons learned from working with legacy code. These experiences will make you a more adaptable and skilled developer.

Conclusion

Working with legacy code bases can be an emotional roller coaster, but by acknowledging and navigating the stages of grief, engineers can turn frustration into growth. Embrace the journey, apply patience, and remember that the process of improving legacy code is a testament to your resilience and dedication as a software engineer.

I look forward to sharing more about our design and development process, and the major improvements coming to Swell merchants soon. Stay tuned!

Next-level commerce for everyone.

X.comGitHubLinkedIn

Subscribe to our newsletter for product updates and stories

Subscribe

Resources

Help CenterDeveloper CenterCommunityAgenciesChangelog

Use cases

SubscriptionsB2B WholesaleMarketplaceOmnichannelDirect-to-consumer

Explore

FeaturesPricingIntegrationsCustomer stories

Developers

OverviewDocumentationGuidesStorefrontsHeadlessSwell Apps

Company

About usPartners

© 2025 Swell. All rights reserved.

Privacy PolicyTerms of Service