Is it bad practice to have placeholder data in your source control repository? For example, when building a view is it ok to commit something like this:
...
<span id="username">LoremIpsum</span>
<span id="karma">999</span>
...
...or should I put the variable names in during design, and only view the work-in-progress view via some sort of test:
...
<span id="username"><?php echo $username; ?></span>
<span id="karma"&开发者_Go百科gt;<?php echo $karma; ?></span>
...
...
//test file kept in a repository/tests directory
$username = "LoremIpsum";
$karma = 999;
$page = new Page($username, $karma);
$page=>render();
Put the placeholder data in test directories/files completely seperate from the code. You will not remember to take the placeholders out before production.
精彩评论