How Internet Marketing Is Like A Trebuchet You almost see it. Deep inside web analytics you smell straw, feel water running down rusty castle walls. You descend rough cut stone stairs heading deeper, always deeper. A strange hushed quiet marks a different World of Warcraft. Knights, dragons, wizards, goblins, heroes and villains live here simultaneously, not always harmoniously, often surprisingly. Your hand lightly traces rough, mossy stones as you walk familiar stairs.
You hear a shout followed by noisy armored men marching. Hearing wooden wheels carrying too much weight you think, “Trebuchet”. You involuntarily snarl picturing the damaging catapult. Hearing the snarl you laugh a short, loud, echoing laugh. Your mind calms. You’ve been here before. How many war cries have you heard? Resigned you stop, turn and climb up toward notched battlements. Battlements you know almost as well as your own body. Your men wait. No one talks. Silently you grasp and hold your sergeant’s shoulder. He lifts his head locking eyes for a knowing moment. “We are here again my friend,” his steady stare says, “be careful.” Your page hands you a freshly cleaned and honed longsword fear evident in his trembling hand. Taking your old, heavy, metal friend you wait hands held out. Your page buckles the large, awkward twice linked snap.
What you do now determines the end. Success or failure rides on courage, tenacity and bold seemingly counter intuitive moves. Trusted knights are close. There is proud Ulric, Lord Crewe, old Sir John and Charles the Bald. Men are packed close waiting, looking, watching. ShadowFax, your favorite Hawk released moments ago, issues a screech. “He knows,” proud Falstaff says loud enough to be heard. Rustling stops. These trusted men, these lucky few, hold, wait. You take the time to watch ShadowFax land gracefully in a tall pine. The moment’s quiet is precious, a gift. Settling you say,
We few, we happy few, we band of brothers;
ShadowFax takes to wing with another screech making you pause. Your men laugh a loud tension relieving laugh and then quiet. You continue:
He today that sheds his blood with me Shall be my brother; be he ne’er so vile This day shall gentle his condition; And gentlemen in England sleeping safely a bed Shall think themselves accurs’d they were not here, And hold their manhoods cheap whiles any speaks That fought with us this day.
Your raised hand joins the loud, clattering roar.
You almost miss the distinct sound of four Trebuchet’s releasing heavy burdens toward your castle, men and life. “Yes,” you think, “it is afoot again.”
Atlantic BT’s 3rd Annual, Exclusive Pumpkin Chunkin –Ā Friday October 28 4:00 PM, Rain or Shine
Atlantic BT’s First Meetup Imagine pulling out of Macy’s at Crabtree Valley Mall onto Creedmoor road. Looking up you see a distinctive blue marble with white stripes resting on top of a three story building across the street. “Atlantic BT,” you read mumbling slightly to an empty car as you turn, “wonder what they do.” It is easy to tell Atlantic BT’s story of dramatic growth in web development and Internet marketing, but better to show and share. Please join us for our first Internet Marketing Raleigh Meetup next Tuesday October 25.
Dinner? Yes Atlantic BT is buying pizza and drinks
Who Should Attend? Anyone interested in learning about Internet marketing, ecommerce, business to business online marketing, social network marketing, cause marketing and email marketing (along with other Internet marketing topics we want to discuss).
Meeting Structure: Short presentations followed by brainstorms, questions, sharing resources, ideas and networking. Meetings will last about two hours (give or take).
What If I don’t Know Much About Internet Marketing? Then you will know more after next Tuesday October 25. This isn’t a Master Class, but we will be asking experts to share their knowledge because we are smarter together than alone especially in such a swiftly moving business as Internet marketing.
First Meeting Topic: Infinite Inventory – Why Amazon Dominates Ecommerce Our first meetup will include a 30 minute presentation by Martin Smith, Atlantic BT Director of Marketing, on a term he coined in 2008 to describe Amazon.com’s ecommerce dominance. Infinite inventory is why Amazon will be the first website with a billion pages in Google creating a powerful search engine marketing (SEM) engine tuned with algorithms and dominant in ecommerce. Amazon may be LARGE and IN CHARGE, but there are ideas and techniques any web site or Internet marketer can borrow, adapt and deploy to make more money, increase traffic and site engagement.
Host: Martin Smith After starting my career with P&G and M&M/Mars I’ve worked in ecommerce and Internet marketing building my first B2B and B2C site in 1998. I’ve started four companies including the nonprofit Cure Cancer Store foundation (please LIKE on Facebook), a 501c3 scheduled to launch in January 2012. I write about startups for Technorati and know many Triangle Internet marketers from @ScentTrail and the ScentTrail Marketing blog. My email is Martin.Smith(at)AtlanticBT(dot)com.
Everyone at Atlantic BT looks forward to meeting you at an Internet Marketing Meeting in Raleigh soon.
If your immediate answer was “of course” maybe you are right.Ā The next Steve Jobs is out there. He might be unemployed or she might have cancer and not be real clear where her next break is going to come from. Still going to hire the next Steve Jobs?
Context is the irony of our lives. We live in a box of what is happening NOW. Steve Jobs understood NOW, but he wasnāt a resident. Steve lived in the future. In the future everything is always better. Wait a minute, you are thinking; Steve died how is that ābetterā. There are worse things than dying. Think about it. You were Steve Jobs. Through no fault of your own you got sick. Then you become so sick you canāt BE Steve Jobs. Living can be, for short periods, the final circle of Danteās Hell. Not being Steve Jobs when you were Steve Jobs would be hellish.
It is easy to get stuck in our macro and micro NOWS. We only see white swans so we think white swans are the only swans. We forecast based on our white swan assumptions. We convince others there are only white swans. Then suddenly from out of some magic world a black swan majestically lands on the lake:
Any sufficiently advanced technology is indistinguishable from magic.
Arthur C. Clarke
Recently I wrote about Internet Marketing Relativity trying to work not knowing what we donāt know into our web development and marketing thoughts. Certainty is becoming the hobgoblin of little minds and a real problem for anyone trying to understand the web well enough to sell something to someone. Steve Jobs lived a simple truth ā the future is always better. Remember Steveās lesson and have the courage to hire a cancer survivor as Atlantic BT did this week. Live comfortably in a rapidly changing world with InternetĀ Marketing’s Accelerating Returns are happening faster and faster and you get to be Steve Jobs or play with his magical toys and that is tantamount to the same thing :).
Martin
—
Martin Smith
Director of Marketing
Martin.Smith(at)AtlanticBT(dot)com
Atlantic BT @Atlanticbt
What are the moments like immediately before Ray Kurzweilās singularity? Kurzweil proposes a technological singularity, a greater-than-human intelligence created through technological means. This singularity isnāt a black hole or something you fall into never to be heard from again. This momentous human race pivot happens a little bit at a time until its creeping ubiquity will be inevitable and taken for granted.
The moments BEFORE a tipping point, usually only obvious on reflection, have telltale signs. Watching IBMās Watson destroy Jeopardy contests that were sufficiently intimidating they beat all comers felt like something LARGE and IN CHARGEĀ just happened. Mobileās geotargeting and geomarketing creating āin the momentā relevance twitches the same nerve. If our contemporary version of Descartes, āI think, therefor I amā is I shop therefor I am then geomarketing is Iām thinking about you NOW so please recommend something special feels spooky close to Tom Cruise in Minority Report. Do you need to read retinas ifĀ customers lives live in a cloud databaseĀ capable of tapping HTML5 to knowĀ a customer isĀ standing in the cereal aisle whereĀ they usually buy Corn Flakes?
As web developers, mobile application developers, Internet marketers, content marketers, email marketers and social network marketers Atlantic BT knows one true thing. Everything is different all the time:
An analysis of the history of technology shows that technological change is exponential, contrary to the common-sense āintuitive linearā view. So we wonāt experience 100 years of progress in the 21st century ā it will be more like 20,000 years of progress (at todayās rate). The āreturns,ā such as chip speed and cost-effectiveness, also increase exponentially. Thereās even exponential growth in the rate of exponential growth.
Kurzweil Essays
“There is exponential growth in the rate of exponential growth,” needs to be on a t-shirt. Positive virtual sustainable cycles is an often overlooked Internet marketing necessity. The web, like all āscale freeā networks according to Notre Dame Professor and network researcher Albert-laszlo Barabasi in his excellent book Linked, creates hubs.
Think of hubs as a snow ball rolling downhill. Hubs displace the web’s space and time bending gravity.Ā Hubs tip the table in their direction. Growth networks increase steepness of the hill, the angle of the table, rolling more and more stuff (links, traffic, money) in their direction faster and faster. The better you are at Internet marketing the better you get at Internet marketing to infinity.
Internet marketing in a content network world is about tipping the table. Imagine the longest, heaviest table. Try to tip that table alone.Ā Your strength is over matched. Imagine climbing EverestĀ alone with no map, guide or prior knowledge of the deadliest mountain on earth. Climbing Everest in such a foolhardy way is a negative virtual cycle the sure and sad outcome of all negative virtual cycles. Now enlist a hundred, a thousand or ten thousandĀ strong friends or some of the most talented Sherpas. TogetherĀ you lift the table climb Everest and create a positive virtual cycle.
What are the moments immediately before Kurzweilās singularity? Watson beats the best Jeopardy players, a handful of creative geniusesĀ tip the webās tableĀ so hundreds of millions join their table tipping parties and Adam Smithās invisible hand reaches through your phone sharing a Corn Flakes coupon as you enter the cereal aisle.
Is anĀ Internet marketing singularity near? What tipping points do you see? Are we already there? Has your Internet marketing ever benefited from a positiveĀ virtual cycle?Ā Please share answers to these or any other questions in comments.
Martin
—
Martin Smith
Director of Marketing
Atlantic BT @AtlanticBT
I was recently asked to develop an easy way to allow the administrator to perform specific action on behalf of as user. Many of these tasks were already set up to auto-populate fields with information pulled from the current user, so I figured the easiest way to address this task would be to allow the administrator to impersonate a user and perform these actions using the same process any other user would.
With this concept in mind, I set about creating a user impersonation class that would allow just such functionality.
The first issue to address was the creation of a way to initiate this impersonation. Luckily I had already created a report system which lists all the users I would need to impersonate and displayed some information about them. This proved to be the perfect place to build the link. A simple URI string let me initiate the process. By passing the users id as the value of a URI parameter, I could have my class watch for that variable and capture its value. I implemented WordPress’s nonce with this link to ensure some level of security. To make this process even easier, I created a static method within the class that creates the necessary link while giving me the ability to specify the link target, which I set to ‘_blank’ so as to allow me to keep the admin page window open while I do what I need to do on the front-end.
Now that I had the link in place, I had my class create session values to hold the original admin user id, the impersonated users user id, and the nonce string I had generated to allow for continuous validation (note: the $_SESSION super global needs to allowed in wp_config.php in order for this class to work). Additional validation was set in place using roles and capabilities to make sure that the user doing the impersonation was actually allowed to do so.
Now that I had the necessary values stored in the session, I used WordPress’s wp_set_current_user function (which really seems to have been designed for just this purpose) to set the current user to the specified user while on the front-end. The session allows for persistence.
Once I got all that working, I wanted an easy way to stop impersonating the user, so I hooked to the admin_bar_menu and added a ‘Stop Impersonating [username]’ menu item. I wanted this to take me back to the admin page (since theoretically I’d be done on the front-end), but this resulted in permissions errors. I added nonce to the link, but that had the same result, because I was clicking the link as the impersonated user but getting to the admin page as my original admin user. I ended up replicating WordPress’s nonce creation functions to allow me to use the session stored admin user id to generate the nonce so that when I hit the back-end it would be accurate.
This class works great for my needs and could be modified to maintain impersonation on the back-end if needed since the abort link in the admin bar would allow you to get back to your original user if necessary.
This functionality could prove exceptionally helpful when testing permissions, user-specific issues, or anything else where being another user temporarily would be required.
We all know about the performance benefits of putting all of our javascript/jQuery calls into .js files, so that browsers will cache the whole chunk on the client-side.
It’s even more tempting to put all of our complicated jQuery calls into a single file, thus further enhancing performance by reducing HTTP requests (i.e. the browser doesn’t have to download so many files).
However, have you ever taken a look at a site using the jQuery Cycle plugin on the homepage? If you open up the debugging console (firebug), go to a page without the slideshow, and I bet you’ll see a little message in the console like:
[cycle] terminating; too few slides: 0
This is because the cycle init code, while correctly put inside the DOM-ready function, is still being called on every page, regardless of whether it has a slideshow or not.
Most of the time you won’t even notice the extra overhead because jQuery fails gracefully, but it’s still traversing the DOM, looking for elements that aren’t there.
Solution
The solution is to encapsulate your code in a segmented library, and only call necessary aspects within the actual page. This has the benefits of:
separation – keeps functionality organized as atomic units, so there’s no conflict between similar functions
readability – when properly documented and structured, it should be easier to find your way around a library than code just stuck in a page.
usability – make your functions as complex as you want, but use them in multiple places with a single call. Added bonus: some IDEs like Eclipse can provide autocomplete and some documentation for the library class, making it easier to call what you’re looking for.
performance – since you’re only calling the functions you need when you need them, there’s no overhead from wasted DOM manipulation.
Library Shell
The following section provides a summarized example with most of the principles involved. It will:
Declare the library “namespace” (see red section) —
this is the external variable you’ll use to actually call your library publicly — you can change this name to avoid conflicts, or customize for each site.
wrap your library in a scope “wrapper” — this is to protect your methods, etc from external conflicts, and optionally to protect your usage of jQuery within the library.
Declare the private “namespace” (see green section) —
you’ll use this to refer to your library internally — basically just a shorthand reference
sets up the library as a javascript Object (JSON)
Declare page directives or sublibraries (see blue section) —
group functions or data into sublibraries, or organize along pages — here, we have a section for common tools, and a section for the search pages
use javadoc-style commenting to explain each sublibrary – some IDEs may pick this up
mark-off the closing { of sublibraries and methods with ///—- and the name of the library, to aid in navigation and organization
use 2 slashes with 3 dashes for methods
3 slashes with 4 dashes for sublibraries
4 and 4 for the library itself
this is really just so that monospaced fonts line them up; (my IDE also colors // vs //// differently)
you can also place the commas on separate lines as well, just so they don’t interfere with comments, and provide extra visual padding
Declare actual function calls
within each function, you can bind to the jQuery document-ready function (see purple section); this is just to make it easier to use them with just 1 line outside the library.
you can use other methods and sublibraries within function calls (see yellow text); refer to the library with LIB.section.method, while you may also be able to use the shorthand this to call the current sublibrary (depending on whether you’re inside another anonymous function scope).
Close all sublibraries and methods
Return internal reference (see green text at bottom) – exposes the library object to public view.
Close library scope wrapper (see red text at bottom)
Then, in your actual page, reference your library with the public namespace variable (see yellow text at bottom).
var LIB = { //internal name of library /** * Testing function – indicates if our library is present */ ”’test”’ : function(){ $(‘body’).prepend(‘SPECIAL library loaded’); } //page directives or sublibraries , /** * General tools */ ”’tools”’ : { /** * Console-log wrapper */ ”’log”’ : function() { if( window.console && window.console.log ){ window.console.log( Array.prototype.slice.call(arguments) ); } }//— lib.tools.log
}///—- lib.tools , /** * Search namespace – related to search box or pages */ ”’search”’ : { /** * Helper function * @param msg a message for the alert */ ”’notify”’ : function(msg){ alert(‘Doin’ the search:’ + msg); }//— lib.search.notify , /** * Enable advanced search box */ ”’toggleAdvancedSearch”’ : function(){ this.notify( ‘self-reference the sublibrary OUTSIDE’ ); //call the sublibrary outside anon-func
$(function(){ //waits for document-ready var $advancedSearch = $(‘#site-search-advanced’) $searchResults = $(‘#search-results’) ; LIB.tools.log( ‘here’s an example of self-referencing’ ); //call the library internally LIB.search.notify( ‘self-reference the sublibrary INSIDE’ ); //call the sublibrary inside anon-func scope
//hide by default $advancedSearch.slideUp(‘3000’);
$searchResults.delegate(‘#refine-search’, ‘click’, function(){ $advancedSearch.slideToggle(); return false; }); }); }//— lib.search.toggleAdvancedSearch }///—- lib.search };////—- lib return LIB; // send the internal name back out })(jQuery); //scope wrapper, encapsulates jQuery
Mylib.tools.log( ‘actually using the library’ ); //call the library externally
Extensions
Multiple Internal Libraries
You could conceivably include more than one internal library (LIB, LIB2, etc) within your library scope. This is more for the following – #DOM wrapper like jQuery
DOM wrapper like jQuery
You can also include DOM-manipulation within your library. In the “shipping estimator” example, the library has an internal myDOM object that takes an HTML #id tag and creates a new instance of itself, which has several attached methods. This is similar to how jQuery works.
You’ll notice that at the end of the scope wrapper, instead of returning the LIB internal namespace, it’s merging the properties of that library back on to the myDOM object with:
//attach sublibraries to manipulation object (to avoid writing an .extend method?)
for(func in LIB){
myDOM[func] = LIB[func];
}
return myDOM;
Again, this is similar to how jQuery extends itself (also see the “Build Your Own Library” reference).
Examples
See attached files – I apologize that these are mostly out-of-context, and probably have too much extra junk to be very simple to follow, but should give you an idea of what you can do with a library.
Shipping Estimator – Example (zip) — instance of DOM-manipulation wrapper
javalib-test.html — super simple implementation of example shell
ggroup.js — has some pagination and ajax helpers, also very flexible form validation