+8

Interview question - Refactor or Leave it?

This is a question to all the devs who hire or interview. So I have an application that I wrote, which for my first proper project, is pretty big. I was learning as I wrote it. Whilst it functions exactly as I wanted it too, the code itself I know could be massively improved. In fact it did improve along the way, for example the first form is coded very differently to to the last one. including the actual form design. All the text boxes, comboboxes etc.. were all there but hidden and as the user adds new items it shows the next row. (this also limited the entries to 10 as there where no text boxes beyond that. In the latter forms they are added dynamically which removes the limitation of 10 entries. This will be my show piece for any interview I get so my question is. Should I refactor the whole project to the best of my current ability or leave it as it is so I can demonstrate the improvements as I got further into the project? Thanks Mike

8/23/2019 9:02:17 AM

Mike Hulme

13 Answers

New Answer

+13

Mike Hulme i would like to refer you to this "ancient" article: https://www.joelonsoftware.com/2000/04/06/things-you-should-never-do-part-i/ It might enlighten you 😎

+5

My suggestion, you can try leave it for improvement, if there is no any improvement can do, then proceed to refactor. Both for refactor and leave have pros and cons. You have to evaluate which one it getting more easier and benefits more to proceed.

+5

They may see the improvements as you progress through your software. Because they want to see how you can improve and maintain your software well more than you create the software. Nowadays, mostly company will not create the new software , they probably will maintain and improve the current software unless there have any reason to do that.

+4

I think the decision to refactor has to be made after a cost/benefit analysis of the refactoring.

+3

@Uchiha itachi The code in terms of usage is fine as the software will only be used by me. the question is more for interview purposes. Will the interviewer prefer to see my code at the best of my ability or will they like to see the improvements as I progressed though making software?

+3

Thanks, I don't actually have one yet, I am going to start applying once I have completed my MCSD Certification. I am just starting to think about interviews and how I will tackle them, hence the question. Thanks again for your help.

+3

IMHO, refactoring is an extreme. I'm not a professional, but I've been a hobbyist for 40 years, so I'd like to think I know good programming practices. I say show them what you got!! They're probably gonna ask you a fair amount of questions anyway. Best of luck, Mike!!

+2

Thanks, I will probably leave it as it is then, It also gives me some good talking points during the interview

+2

@Burey Thanks, that's a good read, I have fixed many bugs in it, so it makes sense to stick with the current code

+2

Thanks Jay

+1

Good Luck for your interview

0

0

enjoyed the article.