Answer the question
In order to leave comments, you need to log in
The term for "shitcode"?
All of us in everyday life are accustomed to calling low-quality code simply “shit code”. Are there any established terms for this? Or a more correct, censored name?
Answer the question
In order to leave comments, you need to log in
> Well, there are wtf program code metrics
per minute
A shit code is a code that doesn't look like an opponent's code. Understanding someone else's code is a long and tedious job. And if the code is written as if you wrote it, then you understand it and this saves time for revision and debugging.
Any novice programmer first of all rushes to rewrite other people's programs. Even if they are absolutely functional, even if after rewriting part of the functionality disappears and bugs appear.
This is said with a grain of salt, of course.
Shit code is the application of not the best (from the point of view of the majority) solutions to a problem. Well, for example, the exit from the loop will be called shitcode by setting the counter to the maximum value.
for(i=0; i<1000; i++)
i=INT_MAX;
void main() {
// ...
void init_dialog(); init_dialog();
void init_referenceControl(); init_referenceControl();
void init_functionsHelp(); init_functionsHelp();
void init_new_style(); init_new_style();
// ...
}
</souce>
Вместо определения функций в .H файлах, я это сделал прямо на месте. Говнокод. Можно было бы создать кучу .H файлов, использовать одну из множества библиотек выполняющих инициализацию. Но это максимально простой способ, способ без использования доп классов, функций и программ; так легче отлаживать, так наглядно изображена последовательность инициализации, так не надо писать кучу #include, и кроме функции MAIN, функции инициализации ни от куда не вызвать.
Говнокод - потому что люди бы не так написали.
If it is in one word, then in English-language correspondence I use the term "shitware" sometimes.
What makes the code shit code - no one knows for sure. There is no exact definition. Often, what some consider obvious shit code, others see as a concise and effective solution.
In general, you can rely on Fowler's chapter "Code with a smell" (M. Fowler "Refactoring") and on examples from chapters with various refactorings to determine "shitty".
We use the term “govkokod” in contracts and decipher it under an asterisk as a very large sentence.
In my opinion, shitcode is code that cannot (or is difficult) to upgrade due to its inelasticity. Those. the person only wrote for the specific case, no error handlers, etc.
Well, I suggest you go to govnokod.ru/ and look at several options, and you will immediately understand everything :)
govnokod.ru/3577
- :> file
(: ;) > file
------------- -
In fact, Fowler and McConnell's "Smell Code" is a well-established name, my foreign colleagues use it to refer to shit code. They say code smell . Wiki article .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question