Categories > Etc > Software & Hardware >
[Q] Making My Code More Maintainable?
Posted
It's been a few years and I have a few big project codebases (most are private, but my Starlight project is a good example). Some of my projects go up to five thousand lines of code and 40+ source files. Anyways, what I've noticed is that it's extremely difficult for me to add features to my code without rewriting from the ground up. Sometimes my code becomes such a rat's nest that I give up and take a break. I don't think I write bad code, per se, but rather I don't organize it well. Do any of you have project design/layout conventions that could help keep my code clean and maintainable when adding new features?
https://github.com/RealNickk | nick@substrant.dev
https://i.imgur.com/0iXAZL7.jpg
https://i.imgur.com/QfzBBTK.png
Replied
I dont know if you do this or not.
I try creating classes for each semi major or a major function.
and i also use trello to organize what i do and what i can say is using trello has increased my productivity and that in return has made my code a tad bit more organized
https://cdn.discordapp.com/attachments/1047697447838830673/1051632062798495834/siggy.png
Replied
programmers are like that, we're lazy because it works better for us.
Astronemi#8419 | DM me if you need help or have any questions! <3
Replied
Alr another bot time to ban it
https://media.discordapp.net/attachments/1013939973671624917/1027279180192292944/unknown.png
https://media.discordapp.net/attachments/996322272547704845/1016492646820233246/standard.gif
Replied
@Hiroku bruh 💀
https://github.com/RealNickk | nick@substrant.dev
https://i.imgur.com/0iXAZL7.jpg
https://i.imgur.com/QfzBBTK.png
Replied
"Questionable intellegence, but I like the mystery" - CubeFaces
https://cdn.discordapp.com/attachments/908778288426651739/928478435066642492/siggy_1.png
Replied
One approach that may help is using design patterns and conventions to promote encapsulation and separation of concerns, making it easier to add new features. Also, implementing a consistent naming convention, file organization, and version control can aid in code maintenance.
It's also important to review your code regularly and take breaks to avoid burnout. Remember, code organization is an ongoing process and takes time and practice to develop good habits.
"It is more effective to provide individuals with the necessary knowledge and skills to address problems independently, rather than solely providing them with ready-made solutions."
Replied
@JumpingJerboa Yeah, I do all of that. It still gets quite messy.
https://github.com/RealNickk | nick@substrant.dev
https://i.imgur.com/0iXAZL7.jpg
https://i.imgur.com/QfzBBTK.png
Replied
I totally get that it can still be tough to keep things organized even when you're doing everything right. One thing that could help is regularly going through your code and cleaning it up, so it's easier to understand.
There are also tools that can help you visualize your code, which can make it easier to spot problem areas. If all else fails, don't be afraid to ask for help. Sometimes, a fresh set of eyes can see something you missed.
"It is more effective to provide individuals with the necessary knowledge and skills to address problems independently, rather than solely providing them with ready-made solutions."
Users viewing this thread:
( Members: 0, Guests: 1, Total: 1 )