Click here to Skip to main content
15,922,696 members

Survey Results

You inherit code in a language you're not familiar. Do you...

Survey period: 23 Jun 2014 to 30 Jun 2014

A hypothetical of 4 choices.

OptionVotes% 
Learn the new language inside and out and get to work38417.49
Learn enough to do what's needed, but no more1,46966.92
Find someone who does know the language and pass it to them1135.15
Rewrite it23210.57



 
GeneralRe: This is actually a trick question Pin
JMK-NI23-Jun-14 7:42
professionalJMK-NI23-Jun-14 7:42 
GeneralRe: This is actually a trick question Pin
CPallini23-Jun-14 21:26
mveCPallini23-Jun-14 21:26 
GeneralRe: This is actually a trick question Pin
KarstenK24-Jun-14 1:19
mveKarstenK24-Jun-14 1:19 
GeneralRe: This is actually a trick question Pin
Gary Wheeler24-Jun-14 1:20
Gary Wheeler24-Jun-14 1:20 
GeneralRe: This is actually a trick question Pin
Dan Neely24-Jun-14 2:34
Dan Neely24-Jun-14 2:34 
GeneralRe: This is actually a trick question Pin
plaster24-Jun-14 5:55
plaster24-Jun-14 5:55 
GeneralRe: This is actually a trick question Pin
Smart K826-Jun-14 3:15
professionalSmart K826-Jun-14 3:15 
GeneralRe: This is actually a trick question Pin
Ian Shlasko27-Jun-14 3:00
Ian Shlasko27-Jun-14 3:00 
Oh, when I inherit code, I always want to rewrite it. Usually I end up doing so, but not always, and almost never right away.
Chris Maunder wrote:
code has a shelf life and by the time it's handed off it's obsolete (the job security approach)
This. Usually once I'm hired it's because my predecessor has gotten sick of maintaining spaghetti code and has abandoned ship. Nothing against their skills, but it's the natural course of evolution for any software project in this environment. I work right on the trading desk, so there's a constant stream of requests that all need to be done yesterday. You try to push back against it, to give yourself time to build things cleanly, but every once in a while something slips through and the code base frays a little at the edges.

Sooner or later, it's going to be a mess, and it's going to need a rewrite.

The trick is to break things down and know what needs a rewrite and what doesn't. As they say, if it ain't broke, don't fix it. If you can salvage it with a few minor tweaks, do so. Rewriting only becomes the right choice when it would take longer to make the change than to replace the whole thing. And that's only after completely learning the old code base. Even if you're replacing it, you still have to understand it.

And most importantly... When you find something in the old code that looks completely backwards and illogical, so crazy that no programmer with half a brain would have written... Maybe they had a good reason that you just don't understand yet. (I've fallen into that trap before).

But hey, once you understand the old code and decide it's beyond patching, you've got 20/20 hindsight and can redesign it while taking into account all of the nasty hacks that broke the previous design! And years from now, your successor(s) will do the same thing to your code!

EDIT: Oh, to the survey topic... If you don't know the language, LEARN IT. ALL OF IT. Even if you're going to rewrite it, you can't fully understand the code unless you understand the language, and you can't properly rewrite something you don't understand.
Proud to have finally moved to the A-Ark. Which one are you in?
Author of the Guardians Saga (Sci-Fi/Fantasy novels)

Generalif it's Visual Basic I would always re-write it ! :) Pin
BillWoodruff23-Jun-14 3:17
professionalBillWoodruff23-Jun-14 3:17 
GeneralRe: if it's Visual Basic I would always re-write it ! :) Pin
SortaCore23-Jun-14 22:18
SortaCore23-Jun-14 22:18 
GeneralRe: if it's Visual Basic I would always re-write it ! :) Pin
i0024-Jun-14 0:19
i0024-Jun-14 0:19 
GeneralRe: if it's Visual Basic I would always re-write it ! :) Pin
CPallini23-Jun-14 22:37
mveCPallini23-Jun-14 22:37 
GeneralWay too complex a situation to be answered with only a single choice Pin
Dan Neely23-Jun-14 3:10
Dan Neely23-Jun-14 3:10 
GeneralHow much code? Pin
Nemanja Trifunovic23-Jun-14 3:08
Nemanja Trifunovic23-Jun-14 3:08 
GeneralRe: How much code? Pin
Albert Holguin26-Jun-14 4:08
professionalAlbert Holguin26-Jun-14 4:08 
Question"Your not familiar"? Pin
Ravi Bhavnani23-Jun-14 2:41
professionalRavi Bhavnani23-Jun-14 2:41 
AnswerRe: "Your not familiar"? Pin
Albert Holguin26-Jun-14 4:09
professionalAlbert Holguin26-Jun-14 4:09 
GeneralRe: "Your not familiar"? Pin
Ravi Bhavnani26-Jun-14 4:24
professionalRavi Bhavnani26-Jun-14 4:24 
GeneralRe: "Your not familiar"? Pin
Albert Holguin26-Jun-14 4:43
professionalAlbert Holguin26-Jun-14 4:43 
GeneralDepends Pin
Mike Hankey23-Jun-14 2:33
mveMike Hankey23-Jun-14 2:33 
GeneralBit like answering this poll - new language... Pin
CHill6023-Jun-14 1:18
mveCHill6023-Jun-14 1:18 
GeneralRe: Bit like answering this poll - new language... Pin
Phil J Pearson23-Jun-14 2:12
Phil J Pearson23-Jun-14 2:12 
GeneralRe: Bit like answering this poll - new language... Pin
Ravi Bhavnani23-Jun-14 2:44
professionalRavi Bhavnani23-Jun-14 2:44 
GeneralRe: Bit like answering this poll - new language... Pin
  Forogar  23-Jun-14 5:18
professional  Forogar  23-Jun-14 5:18 
GeneralAny opportunity to add another language/framework to my CV Pin
JMK-NI23-Jun-14 0:52
professionalJMK-NI23-Jun-14 0:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.