Smart Habits

I always recommend that people read the book How to Win Friends and Influence People. This book has taught me a lot. If you don’t have time to read it or at least read the lesson summaries on the Wikipedia page for the book.

Someone brought up the issue that if you practice the principles discussed in the book in real life it may make you seem fake or forced. This is absolutely true! (See video above). The fact is, it’s really, really hard to pretend to like someone. So how do we solve this?

The answer is to create habits out of the good practices taught. A habit is something you do without a conscious awareness of doing it. If you create a habit out of never criticizing people, then the next time they say something really, really stupid, you’ll look less like you’re holding in a fart resisting correcting them and more like a naturally nice person.

I recommend you read The 7 Habits of Highly Effective People is an excellent read after you read How to Win Friends. It talks a lot about the creation of habits and how we can use habits to improve ourselves.


The quickest way to send someone bitcoins for the first time.

Alright, bitcoin has a lot to go in terms of ease of use before it will be used by anyone other than early adopters. The benefits are obvious, but I was a bit disappointed since the amount of PR this tech gets is way ahead of the tools and documentation that currently exist to help “non-nerds” send and receive bitcoins.

Luckily I am a nerd, and I like to blog. Here is the fastest way I could find to send bitcoins to another person (in Canada):

Bitcoin graphic (credit

How To Send Bitcoins To Someone Quickly

  1. Sign-up for Coinbase. Even though it kind of defeats the purpose to use a web service for bitcoin, trust me, this is way better than getting started with the Bitcoin QT that you would need to download and update.
  2. Copy your Bitcoin ID. It should be a long string of characters and numbers. You might find it in the My Account section of Coinbase. It should look something like this: 16PW58mQstaBdWFsdmaDLRT4j4QFD1168Q
  3. Familiarize yourself with the conversion rate. Check it out, even recognizes bitcoin now.
  4. Buy bitcoins at Tinkercoin. When it asks you for your bitcoin ID enter in the ID you got from Coinbase in step #2.
      Note 1: Tinkercoin is the fastest way I could find to buy bitcoins with a credit card so you don’t have to wait for your bank account to get validated. Their fees are well worth the convenience IMO.
      Note 2: Keep in mind you can only currently buy 1 bitcoin at a time and no fractions. One of the founders (Ross Robinson) said they’re going to be implementing that soon, so keep an eye out.
  5. Wait for the transaction to get validated. You should see the bitcoins reach your account in Coinbase almost instantly, but they need to get validated before you can use them. This generally takes an hour or so.
  6. Use Coinbase to send the bitcoins to your recipient. It should be pretty obvious how to do this in Coinbase if you have the recipient’s bitcoin ID.

The whole process takes about 2-3 hours the first time you do it and probably 1-2 hours the second time you do it. The biggest time sink is waiting for the sent bitcoins to be validated across the network. If it didn’t take so long to validate you could probably send bitcoins within 5 minutes every time after setting it all up.

Feel free to discuss your bitcoin challenges in the comments below or suggest more tools that make it easier to send/receive bitcoins!

Check if a website is running Magento Community or Enterprise Edition

To check if a website is running Magento the first thing you want to do is view the page source and search for “Varien”. If you find a match then the website is *probably* running Magento. If you do not match anything, next view the source of the JS files and look for “Varien”. Some websites merge their javascript files into one file, so that should be easy.

After you know if the website is running Magento, you can detect if a website is running Magento Enterprise Edition by hitting *website_base_url*/giftcard/customer in your browser. If you get a 404 Page Not Found error then that means they are NOT running MEE (Magento Enterprise Edition). If you get redirected to a login page that means they ARE most likely running MEE.

You can get browser extensions like Chrome Sniffer that will also tell you if they are running Magento, however the above method is great if you need to do it programmatically for some reason.

How to temporarily disable cache for Magento scripts

If you are running Magento scripts that are bootstrapped for reasons such as asynchronous processing, syncs, indexing, etc, then you’ll want to disable all Magento cache when Magento is loaded. This will avoid cases where old model data is being used, especially when you have two executions of the Magento script running at the same time.

To disable all Magento cache programmatically add the “global_ban_use_cache” option to your Mage::app initialization. Your Mage::app initialization would look like this:

Mage::app(‘admin’, ‘store’, array(‘global_ban_use_cache’=>true));

Any modules you have running that also use the native Magento cache system should also stop using cache when this flag is set.

Hope this helps some people!

Top 10 Programmer Responses When Software Doesn’t Work


I saw somebody post this sort of list so I thought I would choose my favorites from the other lists and add a few of my own favorite responses that I’ve heard.

When something doesn’t work, these are my favorite programmer responses:

10. “Maybe I forgot to push to master.”

9. “You must have corrupt data.”

8. “How is that even possible???”

7. “It works on my machine. Maybe there’s something wrong with your computer?”

6. “Somebody must have changed my code.”

5. “It’s never done that before.”

4. “It was working yesterday…”

3. “That’s weird…”

2. “Yeeeeeeaaaaaahhhhhhhhh…………sorry about that.” (at least this one is honest, haha)

1. “It works, but THAT part wasn’t tested thoroughly.”



How to launch a social media strategy that doesn’t suck

So you launch a product and now you want people to share it with the world… It’s not an easy problem to solve at all. How do you get people to share? Here are my tips in order of importance:

#1. Start with producing meaningful content or something really interesting.

It doesn’t matter how much you ask, the mass wont share unless they truly like the content. Surprisingly, most companies stumble here.

#2. Ask, but ONLY after content/value has been delivered.

DO NOT ask before. Think, have you ever hit a site and shared within the first 10 seconds? No, probably not, unless it was a picture of llama dressed up in something funny or something crazy like that. That’s why good blogs/news companies put the social share links at the bottom of the article. Don’t be annoying.

#3. Incentivize the share-politely.

Most people are smart enough to know they are helping you out. Give them something for doing it and be clear. it can be as simple as: “Know anyone else who might think this trip is cool? Help us out by sharing!” or “Share if you think this trip is awesome”. A consumer play can be more playful too, like “Like us and we’ll show you a picture of a cat in a batman costume… seriously!”


How NOT to ask people to acknowledge your good content...


I was recently speaking to a friend about their social media strategy and I thought I would write a post to summarize my tips. I’ve had the privledge of seeing over 100 company’s social media strategies through my experience at Sweet Tooth, so although I’m not a “social media expert”, I’ve been able to see what works and what doesn’t. I hope these tips help more people out there!

Show the full SQL query when you get Magento SQL errors

If you’ve ever been coding in Magento you may have seen an error like this:


Obviously an error message like that makes it pretty tough to figure out what is wrong. You can make your SQL error reports show much more data to help with debugging and look like this:


To do this edit your /lib/Zend/Db/Statement/Pdo.php file and replace line 234 in this file with the following code.

Make sure you don’t let this code get into your production environment though as showing the full SQL can sometimes reveal private data in the event of an error.

A ‘Heads’-up about access control orgins and setting content-type

I’m not really sure if this happens on every server, but I recently came across a little annoyance that had me locked up for the greater part of 3 hours trying to figure out what was wrong. I had a javascript application doing an ajax call over to a different server. I wasn’t doing anything fancy, just using jQuery, etc, and using JSON to send data to the remote server.

The first thing to know about trying to do ajax calls to another server is that you need to set your header orgin access control allowances. The easiest way to do this is to edit your .htaccess and drop these lines in somehere at the bottom:

Header add Access-Control-Allow-Origin “*”
Header add Access-Control-Allow-Headers “origin, x-requested-with, content-type”
Header add Access-Control-Allow-Methods “PUT, GET, POST, DELETE, OPTIONS”

After doing this the remote calls started going through for me, but then they started getting duplicated as well. The strange thing is that the chrome developer console didn’t show duplicate ajax calls being sent out!

The problem ended up being that my server didn’t like that I was trying to set the content-type property from my java-script AJAX request so for some reason it was failing in its response back to the client and attempting to redo the server call as a POST request… It is a very weird reaction from the server and caused duplicate actions on the server-side per each single AJAX call on the server side. It was near impossible to prevent with a hack-fix because the issue is controlled neither by the client javascript code, nor the server application code.

The solution? Make sure you don’t try to set the content-type in your ajax call to the server. That means if you’re using the jQuery ajax function then don’t set the contentType attribute. Removing the contentType from my ajax calls solved this crazy problem for me. I hope my solution helps someone else!