How can I avoid always feeling like if I completely rebuilt my program from scratch I'd do it much better?
Clash Royale CLAN TAG#URR8PPP
up vote
4
down vote
favorite
I have learned a significant amount of coding however, it's always been in a scientific environment (not computer science), completely self-taught without anyone to guide me in the right direction. Thus, my coding journey has been.. messy... I've noticed now that whenever I build some type of program, by the end, I realize how I could have done it far more elegantly, far more efficiently, and in a way that is far more flexible and easy to manage going forward. In some circumstances, I've actually gone back and rebuilt things from the ground up, but usually this is not practically feasible. While most of my programs so far have been relatively small, it seems quite unwieldy to completely rewrite large programs every time you create something... I'm just wondering, is this a normal experience? If not, how do you prevent this from happening? I've tried planning things in advance, but I can't seem to really foresee everything until I start hammering out some code.
programming-practices project-management development-process coding-standards
New contributor
Ashish is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |Â
up vote
4
down vote
favorite
I have learned a significant amount of coding however, it's always been in a scientific environment (not computer science), completely self-taught without anyone to guide me in the right direction. Thus, my coding journey has been.. messy... I've noticed now that whenever I build some type of program, by the end, I realize how I could have done it far more elegantly, far more efficiently, and in a way that is far more flexible and easy to manage going forward. In some circumstances, I've actually gone back and rebuilt things from the ground up, but usually this is not practically feasible. While most of my programs so far have been relatively small, it seems quite unwieldy to completely rewrite large programs every time you create something... I'm just wondering, is this a normal experience? If not, how do you prevent this from happening? I've tried planning things in advance, but I can't seem to really foresee everything until I start hammering out some code.
programming-practices project-management development-process coding-standards
New contributor
Ashish is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
If you're going to downvote, care to explain why...?
– Ashish
3 hours ago
5
its normal, program more
– Ewan
3 hours ago
Relevant.
– Neil
49 mins ago
add a comment |Â
up vote
4
down vote
favorite
up vote
4
down vote
favorite
I have learned a significant amount of coding however, it's always been in a scientific environment (not computer science), completely self-taught without anyone to guide me in the right direction. Thus, my coding journey has been.. messy... I've noticed now that whenever I build some type of program, by the end, I realize how I could have done it far more elegantly, far more efficiently, and in a way that is far more flexible and easy to manage going forward. In some circumstances, I've actually gone back and rebuilt things from the ground up, but usually this is not practically feasible. While most of my programs so far have been relatively small, it seems quite unwieldy to completely rewrite large programs every time you create something... I'm just wondering, is this a normal experience? If not, how do you prevent this from happening? I've tried planning things in advance, but I can't seem to really foresee everything until I start hammering out some code.
programming-practices project-management development-process coding-standards
New contributor
Ashish is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
I have learned a significant amount of coding however, it's always been in a scientific environment (not computer science), completely self-taught without anyone to guide me in the right direction. Thus, my coding journey has been.. messy... I've noticed now that whenever I build some type of program, by the end, I realize how I could have done it far more elegantly, far more efficiently, and in a way that is far more flexible and easy to manage going forward. In some circumstances, I've actually gone back and rebuilt things from the ground up, but usually this is not practically feasible. While most of my programs so far have been relatively small, it seems quite unwieldy to completely rewrite large programs every time you create something... I'm just wondering, is this a normal experience? If not, how do you prevent this from happening? I've tried planning things in advance, but I can't seem to really foresee everything until I start hammering out some code.
programming-practices project-management development-process coding-standards
programming-practices project-management development-process coding-standards
New contributor
Ashish is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Ashish is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Ashish is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 3 hours ago
Ashish
261
261
New contributor
Ashish is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Ashish is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Ashish is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
If you're going to downvote, care to explain why...?
– Ashish
3 hours ago
5
its normal, program more
– Ewan
3 hours ago
Relevant.
– Neil
49 mins ago
add a comment |Â
If you're going to downvote, care to explain why...?
– Ashish
3 hours ago
5
its normal, program more
– Ewan
3 hours ago
Relevant.
– Neil
49 mins ago
If you're going to downvote, care to explain why...?
– Ashish
3 hours ago
If you're going to downvote, care to explain why...?
– Ashish
3 hours ago
5
5
its normal, program more
– Ewan
3 hours ago
its normal, program more
– Ewan
3 hours ago
Relevant.
– Neil
49 mins ago
Relevant.
– Neil
49 mins ago
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
7
down vote
This is a very common experience
Most people I interact with, and I myself as well, feel like this. From what I can tell one reason for this is that you learn more about the domain and the tools you use as you write your code, which leads you to recognize many opportunities for improvement after you've already written your program.
The other reason is that you might have an idea in your head about the ideal clean code solution and then the real world and its messy limitations get in your way, forcing you to write imperfect work-arounds and hacks that may leave you dissatisfied.
"Everyone has a plan until they get punched in the face."
What to do about it
To some degree you will have to learn to accept that your code will never be perfect. One thing that helped me with that is the mindset of "If I hate the code I wrote a month ago, it means I have learned and become a better programmer".
A way to alleviate the issue is to constantly be on the lookout for potential improvements as you work and refactor continuously. Make sure to hit a good balance between refactoring and adding new features / fixing bugs. This won't help with big design issues, but it will generally leave you with a more polished code base you can be proud of.
New contributor
Andreas Kammerloher is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
The only thing I'd add to this answer is, learn and follow TDD principles when writing code. Those tests then provide a secure environment for refactoring and rewriting as you continue to improve as a developer and want to make changes to existing code.
– David Arno
1 hour ago
add a comment |Â
up vote
0
down vote
Learn refactoring - the art of gradually improving code. We all learn all the time, so it is very common to realize that the code you have written yourself could be written in a better way. But you should be able to transform the exiting code to apply these improvements without having to start from scratch.
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
7
down vote
This is a very common experience
Most people I interact with, and I myself as well, feel like this. From what I can tell one reason for this is that you learn more about the domain and the tools you use as you write your code, which leads you to recognize many opportunities for improvement after you've already written your program.
The other reason is that you might have an idea in your head about the ideal clean code solution and then the real world and its messy limitations get in your way, forcing you to write imperfect work-arounds and hacks that may leave you dissatisfied.
"Everyone has a plan until they get punched in the face."
What to do about it
To some degree you will have to learn to accept that your code will never be perfect. One thing that helped me with that is the mindset of "If I hate the code I wrote a month ago, it means I have learned and become a better programmer".
A way to alleviate the issue is to constantly be on the lookout for potential improvements as you work and refactor continuously. Make sure to hit a good balance between refactoring and adding new features / fixing bugs. This won't help with big design issues, but it will generally leave you with a more polished code base you can be proud of.
New contributor
Andreas Kammerloher is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
The only thing I'd add to this answer is, learn and follow TDD principles when writing code. Those tests then provide a secure environment for refactoring and rewriting as you continue to improve as a developer and want to make changes to existing code.
– David Arno
1 hour ago
add a comment |Â
up vote
7
down vote
This is a very common experience
Most people I interact with, and I myself as well, feel like this. From what I can tell one reason for this is that you learn more about the domain and the tools you use as you write your code, which leads you to recognize many opportunities for improvement after you've already written your program.
The other reason is that you might have an idea in your head about the ideal clean code solution and then the real world and its messy limitations get in your way, forcing you to write imperfect work-arounds and hacks that may leave you dissatisfied.
"Everyone has a plan until they get punched in the face."
What to do about it
To some degree you will have to learn to accept that your code will never be perfect. One thing that helped me with that is the mindset of "If I hate the code I wrote a month ago, it means I have learned and become a better programmer".
A way to alleviate the issue is to constantly be on the lookout for potential improvements as you work and refactor continuously. Make sure to hit a good balance between refactoring and adding new features / fixing bugs. This won't help with big design issues, but it will generally leave you with a more polished code base you can be proud of.
New contributor
Andreas Kammerloher is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
The only thing I'd add to this answer is, learn and follow TDD principles when writing code. Those tests then provide a secure environment for refactoring and rewriting as you continue to improve as a developer and want to make changes to existing code.
– David Arno
1 hour ago
add a comment |Â
up vote
7
down vote
up vote
7
down vote
This is a very common experience
Most people I interact with, and I myself as well, feel like this. From what I can tell one reason for this is that you learn more about the domain and the tools you use as you write your code, which leads you to recognize many opportunities for improvement after you've already written your program.
The other reason is that you might have an idea in your head about the ideal clean code solution and then the real world and its messy limitations get in your way, forcing you to write imperfect work-arounds and hacks that may leave you dissatisfied.
"Everyone has a plan until they get punched in the face."
What to do about it
To some degree you will have to learn to accept that your code will never be perfect. One thing that helped me with that is the mindset of "If I hate the code I wrote a month ago, it means I have learned and become a better programmer".
A way to alleviate the issue is to constantly be on the lookout for potential improvements as you work and refactor continuously. Make sure to hit a good balance between refactoring and adding new features / fixing bugs. This won't help with big design issues, but it will generally leave you with a more polished code base you can be proud of.
New contributor
Andreas Kammerloher is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
This is a very common experience
Most people I interact with, and I myself as well, feel like this. From what I can tell one reason for this is that you learn more about the domain and the tools you use as you write your code, which leads you to recognize many opportunities for improvement after you've already written your program.
The other reason is that you might have an idea in your head about the ideal clean code solution and then the real world and its messy limitations get in your way, forcing you to write imperfect work-arounds and hacks that may leave you dissatisfied.
"Everyone has a plan until they get punched in the face."
What to do about it
To some degree you will have to learn to accept that your code will never be perfect. One thing that helped me with that is the mindset of "If I hate the code I wrote a month ago, it means I have learned and become a better programmer".
A way to alleviate the issue is to constantly be on the lookout for potential improvements as you work and refactor continuously. Make sure to hit a good balance between refactoring and adding new features / fixing bugs. This won't help with big design issues, but it will generally leave you with a more polished code base you can be proud of.
New contributor
Andreas Kammerloher is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Andreas Kammerloher is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
answered 2 hours ago


Andreas Kammerloher
792
792
New contributor
Andreas Kammerloher is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Andreas Kammerloher is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Andreas Kammerloher is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
The only thing I'd add to this answer is, learn and follow TDD principles when writing code. Those tests then provide a secure environment for refactoring and rewriting as you continue to improve as a developer and want to make changes to existing code.
– David Arno
1 hour ago
add a comment |Â
The only thing I'd add to this answer is, learn and follow TDD principles when writing code. Those tests then provide a secure environment for refactoring and rewriting as you continue to improve as a developer and want to make changes to existing code.
– David Arno
1 hour ago
The only thing I'd add to this answer is, learn and follow TDD principles when writing code. Those tests then provide a secure environment for refactoring and rewriting as you continue to improve as a developer and want to make changes to existing code.
– David Arno
1 hour ago
The only thing I'd add to this answer is, learn and follow TDD principles when writing code. Those tests then provide a secure environment for refactoring and rewriting as you continue to improve as a developer and want to make changes to existing code.
– David Arno
1 hour ago
add a comment |Â
up vote
0
down vote
Learn refactoring - the art of gradually improving code. We all learn all the time, so it is very common to realize that the code you have written yourself could be written in a better way. But you should be able to transform the exiting code to apply these improvements without having to start from scratch.
add a comment |Â
up vote
0
down vote
Learn refactoring - the art of gradually improving code. We all learn all the time, so it is very common to realize that the code you have written yourself could be written in a better way. But you should be able to transform the exiting code to apply these improvements without having to start from scratch.
add a comment |Â
up vote
0
down vote
up vote
0
down vote
Learn refactoring - the art of gradually improving code. We all learn all the time, so it is very common to realize that the code you have written yourself could be written in a better way. But you should be able to transform the exiting code to apply these improvements without having to start from scratch.
Learn refactoring - the art of gradually improving code. We all learn all the time, so it is very common to realize that the code you have written yourself could be written in a better way. But you should be able to transform the exiting code to apply these improvements without having to start from scratch.
answered 12 mins ago
JacquesB
40.2k1683117
40.2k1683117
add a comment |Â
add a comment |Â
Ashish is a new contributor. Be nice, and check out our Code of Conduct.
Ashish is a new contributor. Be nice, and check out our Code of Conduct.
Ashish is a new contributor. Be nice, and check out our Code of Conduct.
Ashish is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsoftwareengineering.stackexchange.com%2fquestions%2f380597%2fhow-can-i-avoid-always-feeling-like-if-i-completely-rebuilt-my-program-from-scra%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
If you're going to downvote, care to explain why...?
– Ashish
3 hours ago
5
its normal, program more
– Ewan
3 hours ago
Relevant.
– Neil
49 mins ago