+ 14

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?

23rd Oct 2019, 9:57 AM
Ashutosh Agrawal
Ashutosh Agrawal - avatar
14 Réponses
+ 22
I just don't touch my old codes, cuz that's the memory of how all these began for me.
23rd Oct 2019, 9:59 AM
Raj Chhatrala
Raj Chhatrala - avatar
+ 14
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! 🙂
23rd Oct 2019, 2:47 PM
HonFu
HonFu - avatar
+ 9
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.
23rd Oct 2019, 10:43 AM
Rodrigo Oliveira
Rodrigo Oliveira - avatar
+ 8
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
23rd Oct 2019, 10:02 AM
Ashutosh Agrawal
Ashutosh Agrawal - avatar
+ 7
I can't find them any more to do that.
24th Oct 2019, 2:14 AM
Sonic
Sonic - avatar
+ 6
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.
23rd Oct 2019, 10:25 AM
Aymane Boukrouh
Aymane Boukrouh - avatar
+ 5
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 🙃🙂
23rd Oct 2019, 10:08 AM
Arsenic
Arsenic - avatar
+ 4
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.
24th Oct 2019, 8:56 AM
Lawrence
Lawrence - avatar
+ 2
You can always copy the code and start with a new code, without changing the first one.
24th Oct 2019, 8:29 AM
Tamar Peer
Tamar Peer - avatar
+ 2
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.
24th Oct 2019, 8:33 PM
Sudhakara Bathala
+ 2
I prefer to reuse them on new projects rather than convert them.
25th Oct 2019, 5:35 AM
Álvaro Rodríguez García
Álvaro Rodríguez García - avatar
+ 2
Nneka I think you will get your answer for this if you post it in a separate question.
25th Oct 2019, 9:54 AM
ヽ(^。^)ノ✨ヽ(^。^)ノ
ヽ(^。^)ノ✨ヽ(^。^)ノ - avatar
+ 1
Yes i do, sometimes is needed. It makes beter codes
25th Oct 2019, 2:37 AM
Kenier Cumba Bueno
Kenier Cumba Bueno - avatar
0
float("210" int(input("2"))) help me point out what is wrong with this code.
24th Oct 2019, 6:06 AM
Nneka