Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7525291
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T03:30:11+00:00 2026-05-30T03:30:11+00:00

I am working with some legacy code where I am using a column value

  • 0

I am working with some legacy code where I am using a column value and its earlier history to make some comparisons and highlight the differences. However, the column is stored in an arbitary delimited fashion and the code around comparison is well, very hard to understand.

My initial thought was to refactor the code – but when I later thought about it, I thought why not fix the original source of the issue which is the data in this case. I have some limitations around the table structure and hence converting this from a single column into multiple column data is not an option.

With that, I thought if its worth to convert this arbitary delimited data into a standardized format like json. My approach would be to export this data to some file and apply some regular expressions and convert this data to json format and then re-import it back.

I wanted to check with this group if I am approaching this problem the right way and if there are other ideas that I should consider. Is JSON the right format in the first place? I’d like to know how you approached a similar problem. Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T03:30:14+00:00Added an answer on May 30, 2026 at 3:30 am

    However, the column is stored in an arbitary delimited fashion and the
    code around comparison is well, very hard to understand.

    So it seems the problem is in the maintainability/evolvability of the code for adding or modifying functionalities.

    My initial thought was to refactor the code – but when I later thought
    about it, I thought why not fix the original source of the issue which
    is the data in this case.

    My opinion is: why? I think your initial thought was right. You should refactor (i.e. ” …restructuring an existing body of code, altering its internal structure without changing its external behavior”) to gain what you want. If you change the data format you could end with a messy code above the new cooler data format in any case.

    In others words you can have all the combinations because they are not strictly related: you can have a cool data format with a messy cody or with a fantastic code, and you can have a ugly data format with a fantastic code or a messy code.

    It seems you are in the last case but moving from this case to: cool data format + messy code and then to cool data format + fantastic code is less straightforward than: fantastic code + ugly data format and then cool data format + fantastic code (optional).

    So my opinion is point your goal in a straightforward way:

    1) write tests (if you haven’t) for the current functionalities and verify them with the current code (first step for refactoring)

    2) change the code driven by the tests wrote in 1

    3) If you still want, change the data format ever guided by your tests

    Regards

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on getting some legacy code under test, and we're using Moq 4
We are working with some legacy code that accesses a shared drive by the
I am working with some legacy code, and at some point there is a
I have been working on some legacy C++ code that uses variable length structures
I've been working with some C# legacy code and I've been seeing a lot
I have some really complicated legacy code I've been working on that crashes when
I'm working with a legacy piece of code in some stuff for work which
I am working on some legacy code, and I have the following wonderful issue.
I'm working on getting some legacy code under unit tests and sometimes the only
I'm working on a legacy vb.net application that does most of its work using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.