Answer the question
In order to leave comments, you need to log in
How to stop shit-coding and making wrong architectural decisions?
Actually the essence of the question above is how to write maintainable code?
What to google, what to learn? Can you recommend some literature to read?
Can you call yourself a middle if your code is shit?
Answer the question
In order to leave comments, you need to log in
how to write maintainable code?
Can you call yourself a middle if your code is shit?
Practice as much as possible, try to find a competent mentor or a job where there will be a more senior programmer than you, who can prompt and explain what is bad and what is good.
To do this, you first need to just do shitty coding.
Yes, you can.
Literature, practically any. But the must-haves are:
Clean Code, Clean Architecture, Perfect Programmer (Robert Martin) and Perfect Code (Steve McConnell).
The answer is simple: you need to first develop the architecture of the code , and only then start coding.
But not vice versa - not while coding to "invent" the architecture of the code "on the go"!
It is the thinking of the sequence of actions of the code during coding that gives rise to shit code.
Programming is knowledge, skills and abilities (you can sometimes say "art" when talking about talented people) FIND COMPROMISES . Trade-offs between the speed of the task (which means the cost of development) and the quality/clarity of your code, between the speed of its execution and the amount of memory/resources consumed, between the presence/absence of tests and the completeness/quality of their coverage of your code....and many other trade-offs. . In the end, programming is such a huge "constructor" in which you can put figures together a huge number of times and options. Some options will be optimal and elegant, but most of them are far from being the same. The better the skills-knowledge, the better the option. The more attempts (successful and unsuccessful), the greater your experience as a designer.
Any, even if (suddenly!) Initially "perfectly written code" as the project develops (it's good when the business is successful and develops) can turn into shit code by itself, because "it overgrows with crutches" when adding "features" (new functionality ). This is a normal and natural process of "code/system evolution". Trying to keep unit/integration/what_tests up to date, learning how to refactor both code and tests are skills that need to be developed. You can also on personal projects, because for you personally they are more interesting and valuable in terms of quality and you are usually not strictly limited in time. You can "solve problems", you can participate in open source projects.
"Classical knowledge/works" always remain "they were written about above, you can still read books about the "art of creating an evolving software architecture" for development. Not to be called an "architect" right away, but at least just try to plan development in advance, design a project/module/component/function/etc in this aspect, evaluate possible shortcomings of the current code/design/architecture. This is difficult for Middle, but there is nothing wrong with gaining new knowledge and skills if there is enough free time (and there is always very little of it). It must be understood that this field of knowledge / profession continues and will continue to develop, new languages / paradigms / libraries / ideas will appear, therefore, independent development of (practical) skills and (theoretical) knowledge for practice is the key to success. Knowledge without practice and "appropriateness of their application" in this or that case/context, they can also be useless and/or harmful. No need for fanaticism!
Yes, sometimes it's hard not to cheat, but you have to compromise with yourself, put todo marks in the code and enter "technical debt" tasks into jira. Those debt accumulates and if it is not eliminated, then sooner or later the project becomes difficult and painful to maintain.
As a developer with 18+ experience in this profession, I agree with the previous comments. There is no universal and only working recipe for "not shit-coding", you have to develop, grow up as you gain practical experience and knowledge.
How to stop shit-coding and making wrong architectural decisions?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question