Engineering and Design Skills

Most designers don’t work directly with LAMP. Most engineers don’t create images and page layouts.

That is why a team is so important.

Usually, one person makes things look nice, and one person makes them work. In the best case scenario, each respects the other’s abilities and strives to avoid conflicts or applying limitations. The optimal environment is where they challenge each other, in every respect, with ideas and technology - always deferring, in the end, to the appropriate person.

robots.design is a design tool, but it must be applied by an engineer. In a nutshell, the power of the tool, in its current implementation, must be applied by someone with Linux experience, which most designers don’t have.

The only way to overcome this limitation is to create a tool that can be easily used by designers, while still retaining the power of the tool.

Requirements:

  • Backup the CSS files, but ensure they are not overwritten by later execution. Perhaps allow an override.
  • Use PHP to execute the sed commands.
  • Provide a streamlined interface.
  • Provide clear documentation.

Display PHP for Demonstration Code

In addition to demonstrating the timing impacts of using preg_replace instead of trim, timetest.php also shows how you can use a PHP script to display itself on a page.

echo htmlentities(file_get_contents('timetest.php'));

preg_replace trim vs. trim

Regular expressions incur a significant amount of overhead. If there is a suitable PHP function, it should always be used before coding a regular expression.

<?php

$sWord = '   TestString    ';

/* Time preg_replace trim double quotes */
$fStartPreg=microtime(true);
$sPreg=preg_replace("/^\s+|\s+$/", "", $sWord);
$fEndPreg=microtime(true);

/* Time preg_replace trim single quotes */
$fStartPregSng=microtime(true);
$sPreg=preg_replace('/^\s+|\s+$/', '', $sWord);
$fEndPregSng=microtime(true);

/* Time trim */
$fStartTrim=microtime(true);
$sTrim=trim($sWord);
$fEndTrim=microtime(true);

/* Calculate elapsed times */
$fPregElapsed=$fEndPreg-$fStartPreg;
$fPregElapsedSng=$fEndPregSng-$fStartPregSng;
$fTrimElapsed=$fEndTrim-$fStartTrim;

/* Display output */
echo '<html>';
echo '<pre>';
echo htmlentities(file_get_contents('timetest.php'));
echo "\n\n";
echo '$sWord: -'.$sWord."-\n";
echo '$sPreg: -'.$sPreg."-\n";
echo '$sTrim: -'.$sTrim."-\n";
printf("preg_replace:\t%f<br />",$fPregElapsed);
printf("preg_replace:\t%f (single quotes)<br />",$fPregElapsedSng);
printf("trim:\t\t%f<br />",$fTrimElapsed);
printf("difference:\t%f<br />",$fPregElapsed-$fTrimElapsed);
echo '</pre>';
echo '</html>';

?>

$sWord: - TestString -
$sPreg: -TestString-
$sTrim: -TestString-
preg_replace: 0.000114
preg_replace: 0.000012 (single quotes)
trim: 0.000008
difference: 0.000106

This page also demonstrates the impact of single quotes vs. double quotes.

Technical Terminology Divide

Web sites are becoming exponentially more complex and more expensive, and the terms that describe the technology are becoming equally sophisticated and diverse.

At the same time, people purchasing web sites are seeking advanced features, and may be confused by the plethora of terms.

Web development firms should describe the services such that a potential client can understand the services offered, without concerning themselves with the underlying technology.

Equivalent terms

  • Content Management System (CMS) / Blog - means the client can edit the content on the site without special technical skills or tools
  • ecommerce - Web based sale of goods
  • Open Source Applications - Commercial code that can be customized or extended
  • Validator - Used to ensure the web site code complies with standards. Indicates an attempt to develop quality code

In addition, they should highlight sites that reflect their strongest market share.

Specifications and Requirements are Vital

In a rapid development environment, specifications and requirements are vital. There is no time to build a solution that is not acceptable.

If there isn’t an adequate requirements defininition, a general approach should be defined, and routine, quick, checks should be performed to ensure the progress is in line with expectations.