Feb 25 2020

How to install Homebrew, Composer, and Drush on Mac OSX Sierra, High Sierra, Mojave, Catalina

Installing Drush on MacOSX with Composer

In order to install Drush, you should first install Composer. Composer is often required for Drupal 8 and once Composer is installed, installing Drush is easy.

1. Open the Terminal app on your Mac.

2. Install Homebrew via the instructions here:

3. Install Composer globally on your Mac with this command:

brew install composer

4. If your computer doesn't have a "/usr/local/bin" directory, create that first with this command:

sudo mkdir -p /usr/local/bin

...that creates the directory; you should be prompted to enter your computer's password.

Now, when you type composer --version and press Enter, we'll see that you have Composer installed!

5. Install Drush via Composer:

Note!: Please do not install Drush using composer global require. See Pantheon's article, Fixing the Composer Global command.

Instead, first install the Composer global require command:

composer global require consolidation/cgr

6. Add the vendor/bin from the Composer home directory to your $PATH.

(Thereafter, you may substitute cgr for any command line tool whose installation instructions recommends the use of Composer global require. Example: cgr drush/drush)

If you get a popup to install the Xcode Developer tools, go ahead and install Xcode.

7. Update the system $PATH:

vim ~/.bash_profile

to edit the file press the i key to enter Insert mode, copy and paste this into that file:

export PATH="$HOME/.composer/vendor/bin:$PATH"
PATH="$(composer config -g home)/vendor/bin:$PATH"

Press the Escape (esc) key to switch back to command mode.

Type :wq and press Enter to save and quit the file.

8. Quit the Terminal app (or, run the "source" command to load the .bash_profile file without having to restart the Terminal.)

To run the source command:

source ~/.bash_profile

9. Now you will actually install Drush:

Install latest stable Drush:

cgr drush/drush

Now if you type drush and press Enter, you'll see that Drush is installed, and working on your machine!


Oct 03 2019

How to Value a Company

Historical PS, PE, PB Ratio of the S&P 500, 20 years

There will be a lot of conversations about why prices are going up or down... in the end it's simply supply and demand. More buyers than sellers makes the price go up. More sellers than buyers makes the price go down. Either people want more of it or they don’t. (Paraphrased from Josh Brown) has a great stock screener tool. Run a quick screen of medium to large companies ($3.5 billion+ market cap), filter for industries such as Consumer Staples, Financials, Information Technology, Communication Services, Industrials, then sort by Price/Sales Ratio and you'll see there are a bunch of Information Technology companies selling for over 10x sales (see the Oct 2019 screener results below). Scott McNealy, co-founder of computer company Sun Microsystems had this to say about companies selling for 10x sales during the Dot Com bubble:

Scott McNealy via Bloomberg · April 1, 2002: [source]

“Two years ago [Sun Microsystems stock in the year 2000] was selling at 10 times revenues when we were at $64.

At 10 times revenues, to give you a 10-year payback, I have to pay you 100% of revenues for 10 straight years in dividends.

That assumes I can get that by my shareholders.
That assumes I have zero cost of goods sold, which is very hard for a computer company.
That assumes zero expenses, which is really hard with 39,000 employees.
That assumes I pay no taxes, which is very hard.
That assumes you pay no taxes on your dividends, which is kind of illegal.
That assumes with zero R&D for the next 10 years, I can maintain the current revenue run rate.

Now, having done that, would any of you like to buy my stock at $64?

Do you realize how ridiculous those basic assumptions are?
You don't need any transparency.
You don't need any footnotes.
What were you thinking?”

P/E Ratio

The price-to-earnings ratio indicates the dollar amount an investor can expect to invest in a company in order to receive one dollar of that company's earnings. This is why the P/E is sometimes referred to as the price multiple because it shows how much investors are willing to pay per dollar of earnings

The historical average P/E for companies in the S&P 500 is ~15x

(Right now we’re around 22x, about 45% above average)

Example: If you pay $100 for $10 of earnings that is a 10x Price to Earnings

P/E Ratio, long term chart


P/S Ratio

The price-to-sales ratio (Price/Sales or P/S) is a company's market capitalization (the number of outstanding shares multiplied by the share price) divided by the company's total sales or revenue over the past 12 months (TTM means “trailing twelve months”).

The historical average P/S for companies in the S&P 500 is ~1.5x

(Right now we’re around 2.1x, about 40% above average)

You use the P/S Ratio when a company doesn’t make money. (i.e there are no “earnings” or net income). Trusting that they one day will make money. ¯\_(ツ)_/¯

P/S Ratio, long term chart


P/B or P/BV Ratio

The price-to-book ratio (Price/Sales or P/S) is calculated by dividing a company's stock price by its book value per share, which is defined as its total assets minus any liabilities.

The historical average P/B for companies in the S&P 500 is ~2.7x

(Right now we’re around 3.4x, about 25% above average)


All 3 Ratios in a single chart

Historical PS, PE, PB Ratio of the S&P 500, 20 years


Fidelity Stock Screener, Oct 2019

Fidelity Stock Screener, Oct 2019


A good peek into how companies become overvalued:

Aug 01 2019

Tutorial: How to Migrate from Drupal 6 or 7 to Drupal 8


As Drupal 8 does not allow you to upgrade an existing drupal 6 or 7 database to the Drupal 8 structure, content and configuration must be migrated over. To facilitate this, there are a few modules created to assist with this effort.



There are two ways currently offered to run migration efforts: Through the Drupal UI or Drush.
After having tested both approaches, the Drupal UI route (although a bit slower) seems to be the least error-prone. However, the Drush route allows for more flexibility and rerunning individual migrations etc. but it is also a bit more problematic and error-prone. While testing, I was unable to get the same results via the Drush route as I did using the Drupal UI route. If things fail via Drush, it’s initially set up to abort and cancel the migration. However, via the UI interface, it continues silently until the end. This can be desirable for small migrations but probably not for larger efforts.

See UI:

Before beginning

It should be noted that having access to the Drupal 6/7 site root containing the code and files etc. is needed. Along with this being able to run both sites locally is quite beneficial in the migration effort. In order for this to happen, having the appropriate PHP version etc. for each site to run simultaneously needs to be taken into consideration. Both sites, the one being migrated and the one where things are to be migrated to should also be updated fully to the latest core release and all contrib modules etc. should be updated as well. Given that Drupal 6 contrib modules are mostly deprecated, Drush (by default) will not allow querying whether there is a newer version. However, there is a D6 module call mydropwizard to facilitate in the gathering of proper module version info:

The process

As the Drupal UI migrate approach is what I had the best results with, I will go over the process for using this approach:

Instantiate both sites locally (site being migrated and the one being migrated to)

The D8 site should not have any configuration done to it. It should be a completely fresh install.

Update both sites to their latest core versions and any outstanding core/contrib modules

Catalogue the modules enabled on the existing site and verify whether it is still needed (see

Activate necessary modules on D8 site needed to be replicated from existing site and update to latest release

Activate the relevant migrate modules on the D8 site (Migrate, Migrate Drupal, Migrate Drupal UI)

Navigate to /upgrade in the D8 site and fill out the appropriate fields:
Drupal Migration Tutorial

Review the items to be upgraded and the ones that will not be upgraded on the subsequent screen:
Drupal Migration Tutorial

If there are certain items shown that will not be upgraded but are expected to be upgraded and are needed, take a step back and verify that proper analysis was done on the modules enabled and existing on the current site and whether there is a proper module activated for it in the new site.

If the new site was modified and there is existing content that will be replaced, you may be prompted to acknowledge that data may be lost:
Drupal Migration Tutorial

Acknowledge and proceed accordingly.

Wait for the upgrade to run:
Drupal Migration Tutorial

Review migration log once completed:
Drupal Migration Tutorial

If needed, the Drupal log contains extended information on the migration effort:
Drupal Migration Tutorial

After migration

It is highly unlikely that everything will go according to plan with the migration effort. There are certain modules existing in D6/7 wherein there isn’t a proper path to D8. In such cases, some things may not work as expected on the D8 site. The migration takes care of a lot of content pieces (content types, fields, files etc.) However, custom pieces such as views etc. would have to be recreated manually. And, in some instances, utilizing the feeds approach outlined by Ramon above may be needed in order to finish off some missing pieces.

May 16 2019

Configuring Raspberry Pi with Terminus to run Drush Commands, Drupal

Configuring Raspberry Pi with Terminus to run Drush Commands, Drupal

We were having a bit of trouble with a MLSli API sync timing out on, so we:

- created a basic shell script with the drush commands
- configured a Raspberry Pi with Terminus, to be able to run the "drush" commands and use it as the "launcher"

And now we are successfully performing the MLSli sync.

-- reconciling listings (to remove the unpublished ones),
-- sync listings metadata (to get the new updates),
-- import the new images (this is the process that lasted too long as there are thousands of images)

Next steps:

-- improve script so it can be automatically scheduled and also used to log the data and report a summary status

Dec 15 2018

Tutorial: How to Migrate from WordPress to Drupal

For WordPress to Drupal Migrations you can use the wordpress_migrate Module. The only caveat I’ve noticed is the lack of support for multiple post types. If that’s a concern and content is your only focus, the Universal route may be the way to go.

For the migration of menus I’ve found the menu_import module very useful. You can setup your menus with paths and nesting in a text file and simply import directly to Drupal.

At the very least you should have a blog and page content type. You should also have a tag and category term reference field added to blog or both. You should also have an image field attached to both as well for the importing of images from WP.


You’ll need to specify the create_term subfield with a default value of TRUE.


You’ll need to specify the file_class subfield with a default value of MigrateFileFid.


Sometimes files referenced in the body of a WP document may not get migrated. It’s simply HTML and Drupal isn’t aware of the file. These files can be downloaded and merged into your files directory with wget.

I also use Integrity to ensure that there aren’t pages with broken image references:

wget -r -P -A jpg,jpeg,gif,png target_url_here


  • Migrate (migrate)
  • Wordpress Migrate (wordpress_migrate)
  • Menu Import (menu_import)
Nov 17 2017

React Native and Drupal -- App integration


Main commands

(You can also check

After cloning the project. On the project folder. Run:

npm install
#To download the node packages into the node_modules folder.

If you don’t have un-met dependencies. This should be the main command to run the app with the ios simulator:
react-native start iOS

This other command is the generic one (also for Android)
npm start

# Run on a iOS device
react-native run-ios --device

# Run on the iOS simulator

The first time you run it, If it doesn’t work, open the xCode project with xCode and build it using the play button, it will open a default terminal.

Then you can close the XCode.

Node.js packages - global installation :

# related to lint
npm install -g eslint
npm install -g eslint-plugin-react
npm install -g babel-eslint
npm install -g eslint-config-airbnb
npm install -g eslint-plugin-jsx-a11y
npm install -g eslint-plugin-import


When things go wrong and you feel you need to do a reset:

npm run clean

It’s an alias for:
rm -rf $TMPDIR/react-* && watchman watch-del-all && npm cache clean --force

Other commands

Check the package.json file and “scripts” to check for other commands aliases.

npm run ios


To debug:

Project organization

Located at (work in progress…)

The initial project was migrated to an “Ignite” template.

The initial *Create React Native App* was also ejected. This was needed in order to enable the Push Notifications (Xcode project code was modified). You can’t use Expo on the current application because it was ejected. The current application has the same main build as it was created with the init option.


To discuss / prioritize.
Should we keep a on the github repo?

Push Notifications. Work in progress. Add functionality for remote notifications (Certificates installed). . Local notifications are already working.
Theming. Set the correct default padding, fonts, etc. for all the screens.
"Offline first" implementation. Use redux and redux-offline.
Main title on the site name header


General settings. Improve them, use
Add new functions to get the content from Drupal
Add user section. Implement Oauth authentication.

Containers and Navigation

Two options/approaches:
React Navigation (JavaScript) -
React Native Navigation (Native) -
Comparison here:

The App/Containers folder contains the component that are used as a screen.

We are currently using the “react-navigation” library to implement the navigation between screens and the tab navigator.

The main settings are defined:

on App/Navigation/AppNavigation.js (We define the TabNavigator and the StackNavigator screens).

on each Component Screen. For instance,on App/Containers/ArticlesFeed.js
You’ll see the navigationOptions parameters.

You can create a new screen with
ignite generate screen NewScreen


There’s a Themes folder with the theming files. The main one is the ApplicationStyles.js

Drupal API

The main goal is to create reusable code for any new project.

First basic functions defined at App/Services/ApiDrupal.js

Params can be content type, items per page, # of page

The params is the node id.

Both of them they get the data from the view “API”, end point is at /api/content, example:

Also tested the JSONApi module, but two issues found:
Image urls are not provided on the first API call (known issue, they are working to have it).
It’s not possible to get the image url with an image cache preset.

Currently, it seems better to use a view with just the content that we need. And we can still use JSONApi to browse any content.

The view is defined at:

To view is built with a“Rest Export” display. On Drupal 8, you need to enable:

RESTful Web Services module.
Serialize (required)


On this App/Lib folder we can put any helper function. Already added Lib/Utilities.js file.


The App/Config/GeneralConfig.js contains the main configuration parameters that can be changed when creating a new project. DrupalBaseURL and end point.

Documentation and other notes

Just some notes and interesting documentation.


React Native documentation is very comprehensive with many useful samples.
Check them at:

React Native Components - Library with user ratings

A Brief Overview of ES6 for React Native Developers - very useful to understand code elements/syntax.

Dries - Cross-channel user experiences with Drupal

Debugging and testing

Install on a device:


Good tutorial by Spencer Carli

Also follow him on Github

Push notifications


Important, you need enable “background modes” on XCode (already done on my-app project).

Modules used:
Push Notifications:
It allows to send push notifications, Drupal acts as a APNS server.
You need to upload the certificate file (.pem) to a private folder (for instance: sites/default/files/private). See settings at:
Very important. We need to register each token device from the App:
we also need to configure a “service” end point, where the mobile app can register the device. See explanation/configuration at:
This is the final recommended / final solution. Using RESTFull API:

RESTful Web Services (core module) and Rest UI (
We use to build a view as an end point to get content (Resftul Export display).
Optional, not used yet. Drupal acts as an API server. It allows to browse all content and entities. See the index at: Some issues found, it’s not possible to get the image file on the first api call and a specific image style.



Native Vector Icons Directory

Very helpful, this guy knows very well Restful settings with Views on Drupal

Jan 18 2017

.gitignore Icon files from Google Drive

If you checkout a Git repo into Google Drive each directory gets a hidden “Icon” file:

You can modify the .gitignore file with a simple “?” at the end of the “Icon” and that will ignore it.

# OS generated files #

Sep 11 2016

Website ADA Accessibility Checklist

Improving on source:

ADA Best Practices Tool Kit for State and Local Governments

This checklist is designed for use in conducting a preliminary assessment of the accessibility of your agency’s website. The goal is to review your website and your agency’s website policies and procedures and see if there are red flags alerting you to ADA accessibility concerns.


To assess the accessibility of your website you will need:

  1. If already created, a copy of your Website Accessibility Policy.
  2. Information describing specific actions taken to make your existing website accessible to people with disabilities.
  3. Information about website accessibility training taken by staff and/or contractors responsible for developing and posting webpages and content.
  4. Information about any procedures used to obtain input from people with disabilities regarding the accessibility of your website.
  5. Any input provided by people with disabilities about their experiences accessing your website.
  6. The assistance of your website manager.

Assessing Current Webpages and Content on Your Website

This section will help you determine if your website has some of the most common accessibility problems. It will not identify all website accessibility problems.

1. Does the top of each page with navigation links have a “skip navigation” link? (This feature directs screen readers to bypass the row of navigation links and start at the webpage content, thus enabling people who use screen readers to avoid having to listen to all the links each time they move to a new page.)

2. Do all links have a text description that can be read by a screen reader (not just a graphic or “click here”)?

3. Do all of the photographs, maps, graphics and other images on the website currently have HTML tags (such as an “alt” tag or a long description tag) with text equivalents of the material being visually conveyed?

4. Are all of the documents posted on your website available in HTML or another text-based format (for example, rich text format (RTF) or word processing format), even if you are also providing them in another format, such as Portable Document Format (PDF)?

5. If your website has online forms, do HTML tags describe all of the controls (including all text fields, check boxes, drop-down lists, and buttons) that people can use in order to complete and submit the forms?

6. If your website has online forms, does the default setting in drop-down lists describe the information being requested instead of displaying a response option (e.g., “your age” instead of “18 - 21”)?

7. If a webpage has data charts or tables, is HTML used to associate all data cells with column and row identifiers?

8. Do all video files on your website have audio descriptions of what is being displayed to provide access to visually conveyed information for people who are blind or have low vision?

9. Do all video files on your website have written captions of spoken communication synchronized with the action to provide access to people who are deaf or hard of hearing?

10. Do all audio files on your website have written captions of spoken communication synchronized with the action to provide access to people who are deaf or hard of hearing?

11. Have all webpages been designed so they can be viewed using visitors’ web browser and operating system settings for color and font?

Website Accessibility Policy And Procedures

This section will help you identify potential problems with the ongoing process of ensuring website accessibility

12. Do you have a written policy on website accessibility?

13. Is the website accessibility policy posted on your website in a place where it can be easily located?

14. Have procedures been developed to ensure that content is not added to your website until it has been made accessible?

15. Does the website manager check the HTML of all new webpages to confirm accessibility before the pages are posted?

16. When documents are added to your website in PDF format, are text-based versions of the documents (e.g., HTML, RTF, or word processing format) added at the same time as the PDF versions?

17. Have in-house staff and contractors received information about the website accessibility policy and procedures to ensure website accessibility?

18. Have in-house and contractor staff received appropriate training on how to ensure the accessibility of your website?

19. Have in-house and contractor staff who create web content or post it on your website received copies of the Department of Justice’s technical assistance document “Accessibility of State and Local Government Websites to People with Disabilities”?

20. If your website contains inaccessible content, is a specific written plan including timeframes in place now to make all of your existing web content accessible?

21. Have you posted on your website a plan to improve website accessibility and invited suggestions for improvements?

22. Does your website home page include easily locatable information, including a telephone number and email address, for use in reporting website accessibility problems and requesting accessible services and information?

23. Do you have procedures in place to assure a quick response to website visitors with disabilities who are having difficulty accessing information or services available via the website?

24. Have you asked disability groups representing people with a wide variety of disabilities to provide feedback on the accessibility of your website? (Note: Feedback from people who use a variety of assistive technologies is helpful in ensuring website accessibility.)

25. Have you tested your website using one of the products available on the Internet to test website accessibility? (Note: Products available for testing website accessibility include no-cost and low-cost options. These products may not identify all accessibility issues and may flag issues that are not accessibility problems. However, they are, nonetheless, a helpful tool in improving website accessibility.)

26. Are alternative ways of accessing web-based information, programs, activities, and services available for people with disabilities who cannot use computers?


If the answer to any of the above questions is “No,” there may be accessibility problems with your website. Here are some steps to take to ensure that your website – and the programs and services offered on it – are accessible to people with disabilities.

Establish a policy that your webpages will be accessible and create a process for implementation.

Check the HTML of all new webpages. Make sure that accessible elements are used, including “alt” tags, long descriptions, and captions, as needed.

Ensure that your webpages are designed in a manner that allows them to be displayed using a visitor’s own settings for color and fonts.

If images are used, including photos, graphics, scanned images, or image maps, make sure to include text equivalents for them, using “alt” tags and/or long descriptions for each. Ensure that the text equivalents convey the meaningful information presented visually by the image.

If you use online forms and tables, make those elements accessible.

Ensure that videos appearing on your website include appropriately synchronized audio description and captions.

When posting new documents on the website, always provide them in HTML or another text-based format (even if you are also providing them in another format, such as PDF). If documents are provided in both formats, provide both formats at the same time so people with disabilities have the same degree of access as others.

Develop a plan for making your existing web content accessible, including specific steps and timeframes. Describe your plan on an accessible webpage that can be easily located from your home page. Encourage input on accessibility improvements, including which pages should be given high priority for change. Let citizens know about the standards or guidelines that are being used to provide accessibility. Make accessibility modifications to the more popular webpages on your website a priority.

Ensure that in-house staff and contractors responsible for webpages and webpage content development are properly trained on your web accessibility policy and procedures.

Provide a way for visitors to request accessible information or services and provide feedback about accessibility problems by posting a telephone number and email address on your home page. Establish procedures to assure a quick response to people with disabilities who use this contact information to access web-based information or services.

Periodically enlist people with a variety of disabilities to test your webpages for accessibility and ease of use; use this information to increase your website accessibility.

Consider using one of the no-cost or low-cost resources available on the Internet to test the accessibility of your website. (Please note, however, that these products may not identify all accessibility problems on your website.)

Ensure that alternative means are available for people with disabilities who are unable to use computers to access information, programs, and services that are normally provided on your website.

Jul 14 2016

Drupal 7: Views: Multiple Contextual Filters with Multiple Relationships

Drupal 7: Views: Multiple Contextual Filters with Multiple Relationships

In this example we'll be building a view in Drupal 7 that filters for different recipes based on liquor brand (a content type) and product (another content type).

This will be a Page View. The path will be


1. Create the view as normal
2. Add a “Relationship” for the entity reference for “Brand”

Drupal Developers, Drupal Agency, NYC

3. Add a “Contextual filter” for Field: title

Drupal Developers, Drupal Agency, NYC

4. Click to open the Contextual filter that was just created.

Select from the dropdown the relationship to match the “Brand” relationship that was created in step 2.

Add a custom PHP snippet in the “Specify validation criteria” area:

$handler->argument = str_replace("-"," ",$argument); return true;

This code will allow for Brands with a space in the title field to render in the URL as a dash.

You can test this in the “Preview with contextual filters” of the View.

Drupal Developers, Drupal Agency, NYC

5. Repeat 2, 3 and 4 to create a Relationship for the Product entity reference field. The order of the items in “Contextual filters” is important.

6. The URL scheme for the recipe landing pages will be:


For example:


Drupal Developers, Drupal Agency, NYC

7. Feel free to reach out to us if you have any questions! Use the contact form here.

Jul 14 2016

Drupal 7: How to hide EVA or block if view is empty

  1. Go to the advanced tab of your view.
  2. Add contextual filters.
  3. Select Global: Null.
  4. When the filter value is NOT available: Select 'Hide view'.
  5. Remove any "No results behavior" that may have been previously set..
Feb 17 2015

Which supplements have supporting scientific evidence?

Which supplements have supporting scientific evidence?

Recently the New York State attorney general’s office ran tests on popular store brands of herbal supplements at the retailers — Walmart, Walgreens, Target and GNC — which showed that roughly four out of five of the products contained none of the herbs listed on their labels. In many cases, the authorities said, the supplements contained little more than cheap fillers like rice and house plants, or substances that could be hazardous to people with food allergies.


What’s in Those Supplements?


To me that *feels* criminal, but I'll leave that up to the authorities to determine.

For now, I thought it worthwhile to hang onto this graphic, that I came across watching David McCandless's TEDtalk "The Beauty of Data Visualization".

Fascinating stuff, IMO.

Feb 13 2015

3.5 Billion People Apply for a Job

3.5 Billion People Apply for a Job

Food for thought from Barry Ritholtz's wonderful podcast series:

Masters in Business: Dan Alpert

FEB 10, 2015 11:02 AM EST
By Barry Ritholtz

Quote from Dan Alpert:

This all goes back to something that we all lived through. And that is that we saw the collapse of the socialist world, the emergence of these very very large countries, with tons of people. China, India, all of Eastern Europe, and you can even count Brazil.

So you’re talking about 3.5 billion people.

If you put this in perspective, the so-called “developed” world — Japan, U.S., Canada, Western Europe — is 0.8 billion people.

Mr. Alpert goes on to say:

"So we have 3.5 billion people who show up and decide one day they want to eat our lunch and play by our rules. Of course part of that is that they’re willing to work very cheaply. Obviously they have far lower standards of living and far lower costs of living.

It’s a giant global labor glut. And the glut is one of these once-in-the-history-of-mankind kind of things.

So that creates this massive instability it created, in my argument, the bubble itself, because we saw something we’ve never seen in the history of mankind which is what economist call reverse capital flows, where we see money coming from poor countries to rich countries where the Chinese buy our bonds and other countries buy our bonds.

And we’ve never seen that in the history of the world before either.

And so what creates is an environment where you have enormous amounts of capital trying to find their way into sovereign debt of developed countries, interest rates of course then decline because you have an overabundance of demand for bonds, you have an excess supply of labor relative to total demand because as you know the Chinese and Indians while they’re producing they’re not consuming, at least what they should be in order to create equilibrium.

And then you have the issue of way too much stuff being made. We can see that now as we saw infrastructure and other investment being made in China and other countries has now outstripped rational demand for the product that they make. The steel industry, for example, you saw an environment in which people were building steel plants in anticipation of not only infrastructure demand in China but also large demand growth globally. Of course that demand growth was driven by a massive amount of debt that was being created. When you took away all that debt, you took away the demand."

Tim's note:

It is perhaps worthwhile to note...

85 Richest Now Have As Much Money As Poorest 3.5B

USA Today | November 7, 2014

Feb 12 2015

Summary: The 22 Immutable Laws of Marketing, by Al Ries and Jack Trout (2 of 2)

The 22 Immutable Laws of Marketing, by Al Ries and Jack Trout (2 of 2)

I revisited the book The 22 Immutable Laws of Marketing, by Al Ries and Jack Trout (1994).

Below is a brief summary of the second 11 (the first 11 Laws were listed in a previous post).

Law 12 (The Law of Line Extension)

  • There’s and irresistible pressure to extend the equity of a brand.
  • One day a company is tightly focused on a single product that is highly profitable. The next day the same company is spread thin over many products and is losing money.
  • Less is more. If you want to be successful today, you have to narrow the focus in order to build a position in the prospect’s mind.

Law 13 (The Law of Sacrifice)

  • You have to give up something in order to get something.
  • There are three things to sacrifice: product line, target market, and constant change.
  • Less is more. If you want to be successful today, you have to narrow the focus in order to build a position in the prospect’s mind.

Law 14 (The Law of Attributes)

  • For every attribute, there is an opposite, effective attribute.
  • You can’t own the same word or position that your competitor owns. You must find your own word to own. You must seek out another attribute.
  • Too often a company attempts to emulate the leader.
  • It’s much better to search for an opposite attribute that will allow you to play off against the leader. The key word here is opposite — similar won’t do.

Law 15 (The Law of Candor)

  • When you admit a negative, the prospect will give you a positive.
  • First and foremost, candor is very disarming. Every negative statement you make about yourself is instantly accepted as truth. Positive statements, on the other hand, are looked at as dubious at best. Especially in an advertisement.
  • Next, you have to shift quickly to the positive. The purpose of candor isn’t to apologize. The purpose of candor is to set up a benefit that will convince your prospect.
  • Ex: "Avis is No. 2 in rent-a-cars." So why go with them? They must try harder.

Law 16 (The Law of Singularity)

  • In each situation, only one move will produce substantial results.
  • History teaches that the only thing that works in marketing is the single, bold stroke.
  • Finding one is difficult. Finding more than one is usually impossible.
  • Most often there is only one place where a competitor is vulnerable. Use the focus of their marketing against them.

Law 17 (The Law of Unpredictability)

  • Unless you write your competitors’ plans, you can’t predict the future.
  • No one can predict the future with any degree of certainty. Nor should marketing plans try to.
  • Good short-term planning is coming up with that angle or word that differentiates your product or company. Then you set up a coherent long-term marketing direction that builds a program to maximize that idea or angle. It’s not a long-term plan, it’s a long-term direction.

Law 18 (The Law of Success)

  • Success often leads to arrogance, and arrogance to failure.
  • Brilliant marketers have the ability to think like a prospect thinks. They put themselves in the shoes of their customers. They don’t impose their own view of the world on the situation.
  • The larger company gives up some of its advantage if it cannot keep itself focused on the marketing battle that takes place in the mind of the customer.

Law 19 (The Law of Failure)

  • Failure is to be expected and accepted.
  • Admitting a mistake and not doing anything about it is bad for your career. A better strategy is to recognize failure early and cut your losses.
  • Be free of an insidious disease called the “personal agenda” that can creep into any corporation.

Law 20 (The Law of Hype)

  • The situation is often the opposite of the way it appears in the press.
  • The only revolutions you can predict are the ones that have already started.
  • Real revolutions don’t arrive at high noon with marching bands and coverage on the 6:00 P.M. news. Real revolutions arrive unannounced in the middle of the night and kind of sneak up on you.

Law 21 (The Law of Acceleration)

  • Successful programs are not built on fads, they’re built on trends.
  • A fad is a short-term phenomenon that might be profitable, but a fad doesn’t last long enough to do a company much good. Furthermore, a company often tends to gear up as if a fad were a trend. As a result, the company is often stuck with a lot of staff, expensive manufacturing facilities, and distribution networks.
  • Don't overextend. Don't be all over the place. Don't wear out your welcome.

Law 22 (The Law of Resources)

  • Without adequate funding an idea won’t get off the ground.
  • Even the best idea in the world won’t go very far without the money to get it off the ground.
  • Marketing is a game fought in the mind of the prospect. You need money to get into a mind. And you need money to stay in the mind once you get there.
  • You’ll get further with a mediocre idea and a million dollars than with a great idea alone.

The law of leadership is tough for many to swallow. Most people want to believe they got to the top by being better, not by being first.

The law of line extension is the most dangerous law of all to deal with. In this case, you have to be prepared to demolish what management holds to be a basic truth: Big successful brands have an equity that can be exploited to encompass different kinds of products.

Line extension makes eminent sense in the boardroom. You won’t find one director in a dozen who would be willing to challenge management on this critical issue.

So beware! Management will not take kindly to any efforts to curtail their equity expansions. You may just have to wait them out. Management is mutable, but the laws of marketing are not.

Thus are you duly warned. If you violate the immutable laws, you run the risk of failure. If you apply the immutable laws, you run the risk of being bad-mouthed, ignored, or even ostracized.

Have patience. The immutable laws of marketing will help you achieve success.

Jan 06 2015

Summary: The 22 Immutable Laws of Marketing, by Al Ries and Jack Trout (1 of 2)

22 Immutable Laws of Marketing, by Al Ries and Jack Trout (1 of 2)

I revisited the book The 22 Immutable Laws of Marketing, by Al Ries and Jack Trout (1994).

Below is a brief summary of the first 11 (I'll post the second 11 soon!)

Law 1 (The Law of Leadership)

  • It's better to be first than it is to be better.
  • The basic issue in marketing is creating a category you can be first in. It’s the law of leadership: It’s better to be first than it is to be better.
  • It’s much easier to get into the mind first than to try to convince someone you have a better product than the one that did get there first.

Law 2 (The Law of the Category)

  • If you can't be first in a category, set up a new category you can be first in.
  • Everyone talks about why their brand is better. But prospects have an open mind when it comes to categories. Everyone is interested in what’s new. When you’re the first in a new category, promote the category.

Law 3 (The Law of the Mind)

  • It’s better to be first in the mind than it is to be first in the marketplace.
  • It’s better to be first in the prospect’s mind than first in the marketplace. Which, if anything, understates the importance of being first in the mind. Being first in the mind is everything in marketing. Being first in the marketplace is important only to the extent that it allows you to get in the mind first.
  • The law of the mind follows from the law of perception. If marketing is a battle of perception, not product, then the mind takes precedence over the marketplace.

Law 4 (The Law of Perception)

  • Marketing is a battle of perception, not product.
  • There are no best products. All that exists in the world of marketing are perceptions in the minds of the customer or prospect.
  • The perception is the reality. Everything else is an illusion.

Law 5 (The Law of Focus)

  • The most powerful concept in marketing is owning a word in the prospect’s mind.
  • A company can become incredibly successful if it can find a way to own a word in the mind of the prospect. Not a complicated word. Not an invented one. The simple words are best, words taken right out of the dictionary.
  • This is the law of focus. You “burn” your way into the mind by narrowing the focus to a single word or concept. It’s the ultimate marketing sacrifice.
  • Federal Express was able to put the word overnight into the minds of its prospects because it sacrificed its product line and focused on overnight package delivery only.

Law 6 (The Law of Exclusivity)

  • Two companies cannot own the same word in the prospect’s mind.
  • When a competitor owns a word or position in the prospect’s mind, it is futile to attempt to own the same word.
  • As we mentioned earlier, Volvo owns safety. Many other automobile companies, including MercedesBenz and General Motors, have tried to run marketing campaigns based on safety. Yet no one except Volvo has succeeded in getting into the prospect’s mind with a safety message.

Law 7 (The Law of the Ladder)

  • The strategy to use depends on which rung you occupy on the ladder.
  • In general, a mind accepts only new data that is consistent with its product ladder in that category. Everything else is ignored.
  • If you're not number 1, admit to being lower on the ladder and explain why someone should instead work with you.

Law 8 (The Law of Duality)

  • In the long run, every market becomes a two-horse race.
  • Early on, a new category is a ladder of many rungs. Gradually, the ladder becomes a two-rung affair.
  • When you take the long view of marketing, you find the battle usually winds up as a titanic struggle between two major players—usually the old reliable brand and the upstart.
  • As time goes on, however, these customers get educated. They want the leading brand, based on the naive assumption that the leading brand must be better.
  • We repeat: The customer believes that marketing is a battle of products. It’s this kind of thinking that keeps the two brands on top: “They must be the best, they’re the leaders.”

Law 9 (The Law of the Opposite)

  • If you’re shooting for second place, your strategy is determined by the leader.
  • Much like a wrestler uses his opponent’s strength against him, a company should leverage the leader’s strength into a weakness.
  • If you want to establish a firm foothold on the second rung of the ladder, study the firm above you. Where is it strong? And how do you turn that strength into a weakness?

Law 10 (The Law of Division)

  • Over time, a category will divide and become two or more categories.
  • A category starts off as a single entity. Computers, for example. But over time, the category breaks up into other segments. Mainframes, minicomputers, workstations, personal computers, laptops, notebooks, pen computers.

Law 11 (The Law of Perspective)

  • Marketing effects take place over an extended period of time.
  • Many marketing moves exhibit the same phenomenon. The long-term effects are often the exact opposite of the short-term effects.
Dec 08 2014

Solar on track to be cheap as competitors in 2016

Price of energy sources since late 1940s

This is huge.

The chart shows the price of energy sources since the late 1940s. The extreme outlier, of course, is solar, which only recently became an expensive blip in the energy marketplace. It will soon undercut even the cheapest fossil fuels in many regions of the planet, including poorer nations where billion-dollar coal plants aren’t always practical.


2014: Top 5 Solar Contractors

1 First Solar Tempe AZ 1999 4850 Utility EPC 2887 1130
2 NRG Energy Princeton NJ 1989 10000 Utility Developer 1200 672
3 Rosendin Electric San Jose CA 1919 3500 Utility EPC 478.844 383.41
4 SolarCity San Mateo CA 2006 5000 Residential Rooftop Contractor 567 280
5 CSI Electrical Contractors Santa Fe Springs CA 1990 750 Utility Electrical Subcontractor 378 260

Table src:

Nov 20 2014

Drupal + AngularJS = The new

Drupal + AngularJS = The new

Migrating The Worlds Largest Website Onto Drupal

Congrats to Mediacurrent and The Weather Channel (TWC) for relaunching on Drupal!

I attended their presentation at DrupalCon [ ] and really enjoyed it.

Session intro: is of the most highly visited web sites in the world. And, it’s certainly among the largest Drupal sites in the wild.

To migrate, TWC and Mediacurrent had to address editorial concerns, replace legacy systems, and take over the front end serving.

Jason Smith (Mediacurrent) and Chris Hill (TWC) provide more insight into the architectural decisions that allowed them to address this complex site’s requirements:

Here are a few of the pain points:

  • With over 2 million locations with unique forecasts cache efficiency was low.
  • Feature velocity was a challenge as requirements sometimes change quickly
  • Too many hurdles in the current platform to content generation
  • Too many legacy platforms to support

Some novel innovations that were created within the Drupal framework to support TWC:

  • Presentation framework allows independent teams to create flexible widgets that can vary in presentation based on the consuming device (ESI, native, inline or AngularJS)
  • How mobile has become a hub that supports the mobile apps
  • How the content workflow is write once use many places
  • Highly leveraging ESI and a novel routing concept to increase cache efficiency
Nov 18 2014

A simple example of Flexbox in action

How to use Flexbox CSS / Tutorial

The CSS3 Flexible Box, or flexbox, is a layout mode providing for the arrangement of elements on a page such that the elements behave predictably when the page layout must accommodate different screen sizes and different display devices.

For many applications, the flexible box model provides an improvement over the block model in that it does not use floats, nor do the flex container's margins collapse with the margins of its contents.

Many designers will find the flexbox model easier to use. Child elements in a flexbox can be laid out in any direction and can have flexible dimensions to adapt to the display space. Positioning child elements is thus much easier, and complex layouts can be achieved more simply and with cleaner code, as the display order of the elements is independent of their order in the source code.

This independence intentionally affects only the visual rendering, leaving speech order and navigation based on the source order.

CANIUSE IT? It has support for IE10 and up.

BUT! Add a less than IE10 class to the HTML tag and use that class to do a float fallback for older browsers and you're good to go!

<!--[if IE 9]><html class="no-js lt-ie10"> <![endif]-->


/* A modern grid / flexbox */

.group {
position: relative;
display: -webkit-box;           /* OLD - iOS 6-, Safari 3.1-6 */
display: -moz-box;              /* OLD - Firefox 19- (doesn't work very well) */
display: -ms-flexbox;           /* TWEENER - IE 10 */
display: -webkit-flex;          /* NEW - Chrome */
display: flex;                  /* NEW, Spec - Opera 12.1, Firefox 20+ */

.group > div {
margin: 0 20px 20px 0;
width: 49%;
padding: 20px;

.group > div:last-child {
margin-right: 0;

/* A modern clearfix for IE8 and up. */
.group:after {
  content: "";
  display: table;
  clear: both;


  <div class="group group-01">
    <div class="group-item">
      <h3>Digital Strategy and Marketing</h3>
        <li>Product and Service Design and Development</li>
    <div class="group-item">
      <h3>Creative, Craft, and Content</h3>
        <li>Online Marketing, Branding, and Identity</li>
  <div class="group group-02">
    <div class="group-item">
      <h3>Web Software</h3>
    <div class="group-item">
      <h3>Mobile Applications</h3>
        <li>Apple iOS</li>
  <div class="group group-03">
    <div class="group-item">
      <h3>Custom/R&D Software Engineering & Development for eCommerce, Mobile, CMS, Enterprise, ERP</h3>
        <li><strong>Languages:</strong> PHP, C#, Ruby, JavaScript, HTML5/CSS3, Flash/Flex, Objective-C, Swift, Java, C/C++ </li>
        <li>... </li>

Additional Resources

Nov 17 2014

Bill Murray's Advice on Relaxing Your Way to High Performance

Bill Murray's Advice on Relaxing Your Way to High Performance

Bill Murray Day @ TIFF: Bill Shares Personal Philosophy & his Cab Driver Story (Sep. 5, 2014)

"You have to remind yourself that you can do the very best you can when you're very, very relaxed, no matter what it is, whatever your job is. The more relaxed you are, the better you are. That's sort of why I got into acting. I realized the more fun I had, the better I did. I thought, well, that's a job I could be proud of."

Nov 13 2014

QOTD / Lowest Bidder

It's a very sobering feeling to be up in space and realize that one's safety factor was determined by the lowest bidder on a government contract.

-Alan Shepard

Nov 13 2014

Drupal websites need to be regularly maintained and updated


Great article today from

It's now 28 days after the so-called #Drupageddon and up to 57.5% of the top 10,000 Drupal websites still have not applied the patch.

"The key point in this experiment is that systems that are not regularly maintained and updated when patches become available will be a liability for your organization. Ensure you have a process in place for updating all your software including web applications and add-ons."

I think it's worth noting that Acquia and Pantheon (Drupal hosting companies) both applied the patch before the Drupal PSA announcement. I love Pantheon. This is yet another reason why.

A related article from Anthony Ferrara

"And the truth of it, is that both are correct. From a security standpoint, using a CMS/Framework is both a risk, and a benefit. Like everything when it comes to security, it's a tradeoff. Does that mean you should avoid CMS's and Frameworks? No. What it means is that you need to think and plan on how to mitigate risks.

You're never safe. If you're running a system, it's either been compromised, or will be. The key is how you deal with it."

Nov 06 2014

Imagine yourself in 50 years...

Sal Khan, MIT's Commencement Address 2012

"Imagine yourself in 50 years. You’re in your early 70s, near the end of your career. You’re sitting on your couch, having just watched the State of the Union holographic address by President Kardashian.

You begin to ponder your life. The career successes, how you’ve been able to provide for your family. You’ll think of all the great moments with your family and friends. But then you start to think about all of the things you wished you had done just a little differently, your regrets. I can guess at what they might be.

Sitting in 2064, you wish that you had spent more time with your children. That you had told your spouse how much you loved them more frequently. That you could have even one more chance to hug your parents and tell them how much you appreciate them before they passed. That you could have smiled more, laughed more, danced more and created more. That you better used the gifts you were given to empower others and make the world better.

Just as you’re thinking this, a genie appears from nowhere and says, “I have been eavesdropping on your regrets. They are valid ones. I can tell you are a good person so I am willing to give you a second chance if you really want one.” You say “Sure” and the genie snaps his fingers.

All of a sudden you find yourself right where you are sitting today.You are in your shockingly fit and pain-free 20-something body and begin to realize that it has really happened. You really do have the chance to do it over again. To have the same career successes and deep relationships. But, now you can optimize. You can laugh more, dance more and love more. Your parents are here again so it is your chance to love them like you wished you had done the first time. You can be the source of positivity that you wished you had been the first time around."

- Sal Khan in an amazing and inspirational thought experiment in MIT's Commencement address to the class of 2012

Oct 23 2014

Wonderful lecture by Photographer Norman Seeff at The E.G. Conference 2014

Wonderful lecture by Photographer Norman Seeff at The E.G. Conference 2014

A wonderful lecture by photographer Norman Seeff, who explains how he connects with his subjects and explores "creativity beyond control".

Norman Seeff (EG8) from EG Conference on Vimeo.


May: 2014, Norman Seeff discusses his emotional, and singular approach to creative work.

From Tina Turner to Steve Jobs, from Steve Martin to Joni Mitchell, from Michael Tilson-Thomas to Michael Jackson, from Dr. John to Dr. Phil, from Chicago to the Rolling Stones, from Arthur Ash to Frank Zappa, no single individual has photographed, interviewed and filmed more creative icons from every imaginable field than Norman Seeff.

Norman Seeff, a native South African who moved to the United States in 1969, is a physician turned internationally acclaimed photographer and filmmaker. Seeff ’s talk, Finding You Voice, Living Your Dream, will be followed by a screening of his documentary, The Triumph of the Dream.

He has been documenting the inner dynamics and outer ex- pressions of the creative process with hundreds of artists and innovators for close to four decades. As a result, he has identified a seven-stage archetypal map of how the creative process unfolded that appeared relevant to all creative endeavors across multiple disciplines.

The film is the result of the time Seeff spent working with a team of NASA scientists and engineers at the Jet Propulsion Laboratory in California as they prepared to land the two rovers, Spirit and Opportunity, on Mars. It reveals the power of imagination and the drive to dream and vision the future, as the ultimate source of all creation. In this session, we will screen the film and Seeff will facilitate an audience dialog around the practical elements of his seven-stage creative dynamic in action.

Oct 11 2014

Who can access our cloud data?

Who can access our cloud data?

Great article from Chris Coyne [@malgorithms]. Full article here:

A key takeaway:

Our cloud data is stored for eternity, not the moment. Legislation and company policy cannot guarantee backups are destroyed. Our government may change, and what qualifies as a "lawful" warrant tomorrow might be illegal today. Similarly, your eternal data might be legal today and a threat tomorrow.

What you consider cool today might be an embarrassment or personal risk tomorrow. A photo you can rip to pieces, a letter you can shred, a diary you can burn, an old flag you can take out into the woods with your friends and shoot with a bb-gun till it's destroyed and then have a nice, cold beer to celebrate. Cheers to that.

But memories in the cloud are there forever. You will never be able to destroy them. That data is backed-up, distributed, redundant, and permanent. I can tell you first-hand: do not assume that when you click "delete" a file is gone. Take Mary Winstead’s word for it. Bugs and tape backups often keep things around, regardless of the law or programmer effort. This is one of the single hairiest technical problems of today.

Instead, how can you burn that digital love letter, or tear up that digital picture? The only answer is to start with it encrypted, and then throw away the only key.

You need the legal right to use software that makes you the sole owner of that key.

Sep 15 2014

Hello world.

Hello world.

Hey. :)


New York
108 Wooster St, New York 10012
(949) 254-0339