Showing entries 1 to 2
Displaying posts with tag: short (reset)
Managing a Bestseller

There are a couple of bookstores in my neighborhood. They could not be more different from one another.

The first is known to focus on best seller lists, to promote popular books, and use displays and traditional retail techniques to drive business. They seem to do well, year in, year out. The other bookstore is more of a community treasure, beloved by the neighborhood, with a focus on the (thoughtful) insights of their staff. Those insights are delivered via small note cards appended to shelving throughout the store, where books are displayed alphabetically, with library-like neutrality.

The first store is very market focused, changes with the season, and seems to be quite succesful. The latter store, beloved though it may be, struggles to stay in business.

Now you might consider that an awkward …

[Read more]
Using short if statement in programming

In many programing languages it is possible to shorten if statements using what’s called the ternary operator. It is sometimes referred as the “one line if statement” or the “short if statement”. This can help at times to produce cleaner code, however use this operator wisely as it is not always best to be used for more complicated statements.

PHP Example of an if statement

1
2
3
4
5
6
7
8
if($nFoo > 0)
{
   echo "I'm at the work.";
}
else
{
   echo "I'm at home.";
}

PHP Example using the ternary operator

1
      echo $nFoo > 0 ? "I'm at the work." : "I'm at home.";

The expression (expr1) ? (expr2) : (expr3) evaluates to expr2 if expr1 evaluates to …

[Read more]
Showing entries 1 to 2