Answer the question
In order to leave comments, you need to log in
How are the terms different in programming?
Good afternoon, ladies and gentlemen. Can you please tell me what is the difference between the terms shitcode and hardcode ? Thank you.
Answer the question
In order to leave comments, you need to log in
Shit code is bad. And the hardcode is the code function(param) { return 1} There is no sense in the function, you need to use a constant. I hope it's understandable.
The shit code is: function() { lal = 5; azaza = 7; return lal + azaza + 3; }
The hardcode is: function() { config = {'ip' = 'localhost'}; connect(config['ip']); } Inserting settings into the program to work with something (databases, file paths, etc.). Instead of taking out some kind of external file.
What the hell difference does it make what the terms mean? Need to work.
1. Shit code: you need to know the enemy in person. Usually, shitcode is a silent horror that inexperienced programmers get and is almost impossible to maintain. It's much easier to rewrite it all over again.
2. Hardcode is a kind of some kind of shitcode, but you can more or less live with it. This can be some hastily made code, where certain settings are simply hardcoded into the program, and not put into the config, and subsequently you can get rid of the hardcode with a little refinement (and not a complete alteration of the functionality, as is the case with complete shitcode). And if shitcode is obtained because of the porridge in the developer's head, then hardcode can be a completely conscious decision.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question