Jul
01
Copy And Paste Code
ByYou shouldn't use/copy ;) the methods from one class to an other.
For example:
- D:\xampp\xampp\htdocs\vb404\includes\class_picture comment.php:282-353
D:\xampp\xampp\htdocs\vb404\includes\class_visitor message.php:302-373
- D:\xampp\xampp\htdocs\vb404\includes\class_picture comment.php:356-377
D:\xampp\xampp\htdocs\vb404\includes\class_visitor message.php:377-398
- D:\xampp\xampp\htdocs\vb404\includes\class_picture comment.php:397-423
D:\xampp\xampp\htdocs\vb404\includes\class_visitor message.php:418-444
Why not provide a abstract class "comment/message" which provides this methods?
This would provide a much cleaner, easier to manage code.
I've run an c&p detection tool on vB404 code and found
0.71% duplicated lines out of 383599 total lines of code.
OK It's not much and it's old code whcih will be refacored sometime, but it would be less work to support the code after the refactory
in the vB4 code it's much more;)
packages direcotory: 1.45% duplicated lines out of 57970 total lines of code.
If i'm not wrong this are 800 LOC (lines of code)
For example:
Quote:
- D:\xampp\xampp\htdocs\vb404\includes\class_picture comment.php:282-353
D:\xampp\xampp\htdocs\vb404\includes\class_visitor message.php:302-373
- D:\xampp\xampp\htdocs\vb404\includes\class_picture comment.php:356-377
D:\xampp\xampp\htdocs\vb404\includes\class_visitor message.php:377-398
- D:\xampp\xampp\htdocs\vb404\includes\class_picture comment.php:397-423
D:\xampp\xampp\htdocs\vb404\includes\class_visitor message.php:418-444
This would provide a much cleaner, easier to manage code.
I've run an c&p detection tool on vB404 code and found
Quote:
0.71% duplicated lines out of 383599 total lines of code.
in the vB4 code it's much more;)
Quote:
packages direcotory: 1.45% duplicated lines out of 57970 total lines of code.
