• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Faking Data
 

Faking Data

on

  • 699 views

"Faking Data" lightning talk from DC PHP July 2011 meetup.

"Faking Data" lightning talk from DC PHP July 2011 meetup.

Statistics

Views

Total Views
699
Views on SlideShare
414
Embed Views
285

Actions

Likes
0
Downloads
0
Comments
0

3 Embeds 285

http://www.philipsharp.com 129
http://www.kerzap.com 126
http://new.kerzap.com 30

Accessibility

Upload Details

Uploaded via as OpenOffice

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • Who am I. What we do.
  • People want to see the product. Our people want to show it off.
  • (save, edit, publish) manually, automatically
  • Point your site to a demo db.
  • Hard to obfuscate. Tedious to make manually.
  • cant store random stuff explicitly by-day
  • Date is rolling
  • passthrough where ok override where ok reformat data

Faking Data Faking Data Presentation Transcript

  • Faking Data (Building a Real-looking Demo Account) Philip Sharp @philipsharp Clearspring / AddThis DC PHP July 13, 2011
  • Screenshots are useful...
    • Features/Tour
    • Help
    • Marketing
  • Screenshots are not a demo. Nor do they keep themselves up-to-date. (The same thing goes for videos.)
  • Neither is a free trial.
  • We collect data. People want to see how it looks up-front. (We're not all Google. GA doesn't need a demo.)
  • A good demo requires good data. (Chartbeat is lucky. But we can't all show Fred Wilson's data.)
  • Obfuscate if you can. demoPayees = [“Joe's Widgets”, ” ACME Explosives”, “ Frank's Fish Fry”] transaction = { “ datetime”: “2011-07-13 18:52:22” “ payee”: “Churchkey”, “ ammount”: 145.23 } transaction.payee = demoPayees[rand(0,2)];
  • Make your own if you can. { “ username”: “frodo” “ name”: “Frodo Baggins” rings: 1 }
  • Some data doesn't cooperate.
    • URLs
    • Titles
  • Big Data GET /atapi/pub/shares/content?pubid=xa-4e1df9914f1a6d69 &dates=110706-110712&type=bm%2Cem%2Cfl%2Cif%2Cab &domain=www.example.com&range=0%2C20 [[" http://www.example.com.com/blog/2011/07/big-news ","Example Blog :: Big News",4990]]
  • Choose Your Inputs
    • Services (top 50)
    • Countries (top 50)
    • Ruleset:
      • Domain
      • URLs
      • Keywords
      • Referers
  • 'demo-oz-emeraldcity' => array ( 'emeraldcity.gov.oz' => array ( 'target' => 5000 , 'urls' => array ( array ( '/' , 'The Emerald City' ), array ( '/tourism' , 'The Emerald City - Oz's Premiere Road-Trip Destination' ), array ( '/tourism/things-to-do' , 'The Emerald City - Things to Do' ), array ( '/tourism/things-to-do/balloon-rides' , 'The Emerald City - Things to Do - Balloon Rides' ), array ( '/tourism/things-to-do/horse-rides' , 'The Emerald City - Things to Do - Horse Rides' ), array ( '/mayor' , 'The Emerald City - Mayor's Office' ) ), 'referers' => array ( '' , 'google.oz' , 'bing.oz' , 'yahoo.oz' , 'search.oz' ), 'keywords' => array ( '' , 'oz' , 'vacations' , 'green' , 'emerald' , 'sunglasses' ) ), 'wizard.oz' => array ( 'target' => 3000 , 'urls' => array ( array ( '/' , 'The Wizard of Oz' ), array ( '/the-wizard' , 'The Wizard of Oz :: The Wizard' ), array ( '/seeking-audience' , 'The Wizard of Oz :: Seeking Audience With The Wizard' ), array ( '/contact-us' , 'The Wizard of Oz :: Contact Us' ) ), 'referers' => array ( '' ), 'keywords' => array ( '' ) ) ),
  • foreach
  • $shareMagnifier = $countrySharePercentage * $serviceSharePercentage * $browserSharePercentage / 100000; $combinationTarget = $domain['target'] / count($domain['urls']) / count($domain['referers']) / count($domain['keywords']); $dayMultiplier = (($daysOfData - $day) / 100) + 1; $combinationShares[-$day] = floor(rand(1,100) * $shareMagnifier * $dayMultiplier * ($combinationTarget / 50));
  • The Result
  • Using It Demo Accounts Demo Profiles
  • OOP to the rescue. /** * Hydra Package API demo wrapper * * @author philip * @requires Zend Framework */ class AT_Hydra_Package_Service_Demo extends AT_Hydra_Package_Service { … } $dataModel->setService(new AT_Hydra_Package_Service_Demo());
  • But wait, there's more.
    • Browsers and Operating Systems
    • Last 24 Hours
  • This...
  • Looks like...
  • $radian = ($minute / 1440) * 2 * M_PI + (1.25 * M_PI); $sin = sin($radian) + 1.05; $shares = round(rand(1,100) * $sin * $shareMagnifier * $combinationTarget);
  • Dangers
    • 0.00000001 * [Just about anything] is a really small number