I'm working on a side project at the moment, just a clean-up for an old customer who was acquired and needs to be migrated off our old systems and onto their parent company's systems. To do that, we need to make a single, simple calculation. About half of the time so far in the project has been taken up by trying to extract the core of this calculation from the legacy system in which it was written. By comparison, the same basic function for the "new" parts of the system was a few lines of code, since the new system is anal about storing every little bit of metadata about the things it does.
You often run into these situations in working with really large, really legacy codebases. The code has acreted rules and requirements over the years, none of them really spelled out. Some relatively simple operation is now pretty much inextricably linked into the overall functioning of the system. Poor compartmentalization of the legacy code means that side-effects happen all over the database and the code-base.
They are a PITA, you often wind up trying to whittle down the old system's code so that you can run some subset of the system as a separate process and munge the data, but you're always thinking "maybe I could just implement it in a few lines of code" in the back of your mind. You're pretty sure that if there was a proper spec you could... but there isn't... and it took years to acrete all the rules and exceptions in there... better to just hold your nose and try to make the best of it.



Comments
2010-02-04 09:16
A somewhat heavy-handed approa ch (requires a Posix'y system) : Let the server processes be handled bySupervisor [...]
2010-02-04 08:50
I often have the same problem. I've resorted to subproces s, as well, with the tearDown( ) calling a platform-spe [...]
2010-02-03 22:42
I haven't had to write a test like this in quite a while, so this isn't how I do it, but ... If you run a chil [...]
2010-01-31 18:17
I feel your pain. I'm banging my head against the GSM 09.02 spec at the moment.
2010-01-27 16:17
What kind of spam is that ^^ I like socat for this stuff (also my netfilter-fu is weak) . socat TCP-LISTE [...]
2010-01-27 13:28
In case you weren't aware - St artCom (www.startssl.com) is a great place to get free, trus ted certificates.
2010-01-25 16:56
I based the rewriting on the t wisted.web rewriting-rule code : http://twistedmatrix.com/tra c/browser/tags/releases/ [...]
2010-01-25 16:32
Did you independently think up this way of doing things, or were you inspired by other cod e you found on the inter [...]
2010-01-24 18:27
It did help. Though I'm still tempted to use raw SQL. Thanks , serendipity!
2010-01-22 17:43
Hmm, hard to tell if this is a spam post or not (the use of the search terms for the name makes me suspect it is, [...]
2010-01-22 15:39
Wow, thank you for so informat ive post. I am just a beginner in programming and now tried to run a similar type of [...]
2010-01-22 12:21
PyOpenGL sprint would be tempt ing. I'll only be there for th e first day of sprinting. I've just been waiting for a [...]
2010-01-21 12:46
I love this post. LOVE. IT .
2010-01-16 22:10
Oh, I know about the start/end key support for pagination, bu t it's like saying that with o ffset and limit SQL has [...]
2010-01-16 17:41
CouchDB already has support fo r pagination using the start_k ey and count get data. What li brary are you using?