Do you refactor your newbie codes?
When I began programming I wrote some of my first programs including some really cool one. While looking at them now i feel they were written poorly and can be refactored to make them more efficient and clean. So do you keep refactoring your old codes as you learn or you like to preserve them as they are?
10/23/2019 9:57:15 AMAshutosh Agrawal
14 AnswersNew Answer
I just don't touch my old codes, cuz that's the memory of how all these began for me.
If you think it is worthwhile (for example learning-wise) to do it, then do it. If you're sentimental about your baby steps, make versions 1.1 and so on like Saiffyros and Aymane Boukrouh recommended. More important than looking back and patting yourself on the shoulder is looking *forward* and make even more progress! 🙂
It seems a bunch of people here should read about the 90/90 rule. When you're 90% done, there's another 90% to be done. That includes things we are not really concerned about, but that are very important such as code refactoring, polishing, documenting, design patterns, licences and so on. You can always make copies of your code and polish it, keeping a record of the old ones. Remember: all code is trash, every time you look at it you think of ways to improve it. Cut and charge it, it's not sacred.
Raj || Turbo you are absolutely right. I also want to keep my old codes as memories so I can always remember from where i started and where i am now. But still I find some really nice codes in them that can maybe get good reputation on github and may make a nice portfolio
I can't find them any more to do that.
Ashutosh Agrawal just rewrite them, but keep a copy of your old code. It feels good to go back to old codes and see how much you improved. Or restart from scratch, just get the idea of your old code and write it without looking at the old code, it can be confusing, especially if you improved a lot. After you're done, you can compare them with old ones.
No I don't, as they remind me of what was I then and what am I now. If I find out that there are some of them which are very poor, instead of refactoring them I make a new ones 🙃🙂
I don't refactor it, I just copy the old ones and improve it while my old codes are there to remind me of the humble beginning.
You can always copy the code and start with a new code, without changing the first one.
Refactoring code is common in software development, code review and refactoring is performed on the code once the required functionality is achieved. It's not matters who written the code i.e. either beginners or experienced.
I prefer to reuse them on new projects rather than convert them.
Nneka I think you will get your answer for this if you post it in a separate question.
Yes i do, sometimes is needed. It makes beter codes
float("210" int(input("2"))) help me point out what is wrong with this code.