Welcome to vBulletin Guru!


vBulletin is arguably the best community forum software available today. vBulletin Guru is here to offer both free advice on how to successfully build, customize and manage your forum based website as well as offer advice and resources for more advanced topics of forum management such as SEO (Search Engine Optimization), community growth and monetization.
Jul
01

Copy And Paste Code

By
You shouldn't use/copy ;) the methods from one class to an other.


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
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
Quote:

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;)
Quote:

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)

Comments are closed.

Get Adobe Flash playerPlugin by wpburn.com wordpress themes