Français

Blog

Day 28: Social Media for Brands: Monitor Twitter Search via Email (Guest Post)

March 12, 2014 at 5:02 pm

“This is a guest post by Phil Jackson, Technologist at SoftLayer an IBM Company”

softlayer3

If you’re responsible for monitoring Twitter for conversations about your brand, you’re faced with a challenge: You need to know what people are saying about your brand at all times AND you don’t want to live your entire life in front of Twitter Search.

Over the years, a number of social media applications have been released specifically for brand managers and social media teams, but most of those applications (especially the free/inexpensive ones) differentiate themselves only by the quality of their analytics and how real-time their data is reported. If that’s what you need, you have plenty of fantastic options. Those differentiators don’t really help you if you want to take a more passive role in monitoring Twitter search … You still have to log into the application to see your fancy dashboards with all of the information. Why can’t the data come to you?

About three weeks ago, Hazzy stopped by my desk and asked if I’d help build a tool that uses the Twitter Search API to collect brand keywords mentions and send an email alert with those mentions in digest form every 30 minutes. The social media team had been using Twilert for these types of alerts since February 2012, but over the last few months, messages have been delayed due to issues connecting to Twitter search … It seems that the service is so popular that it hits Twitter’s limits on API calls. An email digest scheduled to be sent every thirty minutes ends up going out ten hours late, and ten hours is an eternity in social media time. We needed something a little more timely and reliable, so I got to work on a simple “Twitter Monitor” script to find all mentions of our keyword(s) on Twitter, email those results in a simple digest format, and repeat the process every 30 minutes when new mentions are found.

With Bear’s Python-Twitter library on GitHub, connecting to the Twitter API is a breeze. Why did we use Bear’s library in particular? Just look at his profile picture. Yeah … ’nuff said. So with that Python wrapper to the Twitter API in place, I just had to figure out how to use the tools Twitter provided to get the job done. For the most part, the process was very clear, and Twitter actually made querying the search service much easier than we expected. The Search API finds all mentions of whatever string of characters you designate, so instead of creating an elaborate Boolean search for “SoftLayer OR #SoftLayer OR @SoftLayer …” or any number of combinations of arbitrary strings, we could simply search for “SoftLayer” and have all of those results included. If you want to see only @ replies or hashtags, you can limit your search to those alone, but because “SoftLayer” isn’t a word that gets thrown around much without referencing us, we wanted to see every instance. This is the code we ended up working with for the search functionality:

def status_by_search(search):

statuses = api.GetSearch(term=search)

results = filter(lambda x: x.id > get_log_value(), statuses)

returns = []

if len(results) > 0:

for result in results:

returns.append(format_status(result))

new_tweets(results)

return returns, len(returns)

else:

exit()

If you walk through the script, you’ll notice that we want to return only unseen Tweets to our email recipients. Shortly after we got the Twitter Monitor up and running, we noticed how easy it would be to get spammed with the same messages every time the script ran, so we had to filter our results accordingly. Twitter’s API allows you to request tweets with a Tweet ID greater than one that you specify, however when I tried designating that “oldest” Tweet ID, we had mixed results … Whether due to my ignorance or a fault in the implementation, we were getting fewer results than we should. Tweet IDs are unique and numerically sequential, so they can be relied upon as much as datetime (and far easier to boot), so I decided to use the highest Tweet ID from each batch of processed messages to filter the next set of results. The script stores that Tweet ID and uses a little bit of logic to determine which Tweets are newer than the last Tweet reported.

def new_tweets(results):

if get_log_value() < max(result.id for result in results):

set_log_value(max(result.id for result in results))

return True

def get_log_value():

with open(‘tweet.id’, ‘r’) as f:

return int(f.read())

def set_log_value(messageId):

with open(‘tweet.id’, ‘w+’) as f:

f.write(str(messageId))

Once we culled out our new Tweets, we needed our script to email those results to our social media team. Luckily, we didn’t have to reinvent the wheel here, and we added a few lines that enabled us to send an HTML-formatted email over any SMTP server. One of the downsides of the script is that login credentials for your SMTP server are stored in plaintext, so if you can come up with another alternative that adds a layer of security to those credentials (or lets you send with different kinds of credentials) we’d love for you to share it.

From that point, we could run the script manually from the server (or a laptop for that matter), and an email digest would be sent with new Tweets. Because we wanted to automate that process, I added a cron job that would run the script at the desired interval. As a bonus, if the script doesn’t find any new Tweets since the last time it was run, it doesn’t send an email, so you won’t get spammed by “0 Results” messages overnight.

The script has been in action for a couple of weeks now, and it has gotten our social media team’s seal of approval. We’ve added a few features here and there (like adding the number of Tweets in an email to the email’s subject line), and I’ve enlisted the help of Kevin Landreth to clean up the code a little. Now, we’re ready to share the SoftLayer Twitter Monitor script with the world via GitHub!

The script should work well right out of the box in any Python environment with the required libraries after a few simple configuration changes:

  • Get your Twitter Customer Secret, Access Token and Access Secret fromhttps://dev.twitter.com/
  • Copy/paste that information where noted in the script.
  • Update your search term(s).
  • Enter your mailserver address and port.
  • Enter your email account credentials if you aren’t working with an open relay.
  • Set the self.from_ and self.to values to your preference.
  • Ensure all of the Python requirements are met.
  • Configure a cron job to run the script your desired interval. For example, if you want to send emails every 10 minutes: */10 * * * * <path to python> <path to script> 2>&1 /dev/null

As soon as you add your information, you should be in business. You’ll have an in-house Twitter Monitor that delivers a simple email digest of your new Twitter mentions at whatever interval you specify!

Like any good open source project, we want the community’s feedback on how it can be improved or other features we could incorporate. This script uses the Search API, but we’re also starting to play around with the Stream API and SoftLayer Message Queue to make some even cooler tools to automate brand monitoring on Twitter.

If you end up using the script and liking it, send SoftLayer a shout-out via Twitter and share it with your friends!

Day 17: 15 Legal Concepts You Need to Know

February 25, 2014 at 3:34 pm

Today we got a visit from the awesome team over at Blue HF. Julien, Karen & Frédéric stopped by to give a presentation that covered all important legal concepts that startups should know. They joked that it would be a “very boring presentation”, and although concepts like those can be a bit dry, they’re crucial and highly valuable for startups to know about. Because of this, their presentation was much appreciated by the teams!  

Their first piece of advice was that the teams are in charge! They control how much time and money is spent on their legal stuff. If they stay organized and on top of everything, they can save up to %40 on their legal costs!

Building on that point, the team from Blue HF covered topics ranging from:

  • - Shareholders,
  • - Annual maintenance, 
  • - Various different share terms, 
  • - Raising capital and, 
  • - How to protect your IP. 

To see their 15 concepts explained in detail check out their deck below:

Day 14: Labarge Weinstein talks investor syndicates

February 20, 2014 at 3:23 pm

We’ve been hosting Lunch N’Learns twice a week and so far these talks have been about the nitty gritty details of starting a company, like filing for SRED, setting up your Capital Table properly and how to run your payroll. These are important topics that can get often overlooked while you focus on the bigger and broader issues. 

This weeks first talk was given by James Smith from Labarge Weinstein who flew all the way in from Vancouver to talk to the teams about founder relations, raising rounds and how to make it to “Demo Day and Beyond”. 

Some of his tips included: 

1) Make sure you’ve set up some basic shareholder agreements 

2) Unless you’re aiming to please, try and push investors towards Convertible Notes

3) Raising money is not just about the pitch, you should view it as a sales cycle

4) Your syndicate should have a breakdown of “Brawn, Brains and Bros” broken down something along these lines

a. 1-2 Brawns: people that invest $100K-$200K each
b. 1-2 Brains: experts in your space that invest each $25K – $50K
c. 4-8 Bros: people that invest each $25K – $50K and have a huge network for you to leverage

James was also kind enough to devote a chunk of his talk to answering questions about the BDC Convertible note, since the deadline for the teams to apply for it is quickly approaching!

Here’s his full deck:

 

Day 13: Tips on how to run your back office

February 19, 2014 at 10:43 am

We recently had a visit from Matthew Harrison, a representative from BDO Canada, who came in to give the companies a talk on how to run their back office. He had some very important tips to share with these young companies, who might not realize how important it is to have an organized, well run, back office. 

Here’s some of the insight he shared:

1) It’s important to have a clear, concise share capital table and be careful who you have promised or compensated with shares

2) Make sure you register for sales taxes, even before you have revenue 

3) Pay close attention to how you interact with the USA and be sure to research all laws BOTH federally and within the states you’re doing business in

4) Be careful in filing your SRED claim for 2014 as the new rules really focus on documentation and the accuracy of your filing

Check out the full slides to get more tips on how to properly structure and run your back office. 

Day 10: Those Times When Cheating is Good.

April 29, 2013 at 4:41 am

From an early age, we are told that cheating is bad. There are rules we’re supposed to follow, and breaking these rules – we’re told – is a big no-no. No ice-cream before dinner, no peaking at your classmate’s test, no cutting in line for lunch… or else. But is cheating always a bad thing?

Cheating

Dominic and Scott from The Working Group came up from Toronto to talk to the companies about those times when cheating in development can be good.

Bad cheating breaks the law, puts people at risk or has severe negative consequences. If you’re making a program to run a nuclear reactor: don’t cheat. If something goes wrong then there will be very bad consequences.

Good cheating is like a magic trick: it’s a method to achieve a desired effect. Just don’t get caught. Getting caught ruins the magic and gets you in trouble. Do things “wrong”, get dirty, use hacks, and optimize for very specific cases. Do all this in order to deliver the desired effect.

Applications capture, retrieve and display resources. These resources have costs, such as the cost of transmission, processing and storage. Different resources have varying probabilities of being required; some may be requested and others not, some may be requested frequently and others rarely. These are all things to consider when deciding what processes can and need to be optimized, which will in turn help you choose from your magic bag of tricks. 

Here’s a quick barometer for deciding when to cheat:
- Requests that are free or cheap to deliver and are rare are not worth optimizing since these are essentially effortless already
- Requests that are expensive but rare aren’t a priority, feel free to procrastinate on these
- Requests that are free or cheap and happen frequently are the fun ones to optimize
- Requests that are frequent and expensive are your big wins… if you can figure out how to optimize them.

There are many ways you can use performance cheats to optimize your application. A big part of cheating is first deciding when ‘more is more’ and when ‘less is more.’ For example…

Faster is not always better, sometimes you might actually want to make users wait longer. You can make something appear important by taking longer to load, creating the impression that the user’s request is hard and requires a lot of work (think airlines).  Just make sure you keep your delay proportional to the significance of the request, and make sure you keep your users informed via a spinner or progress bar. Making users wait more for more expensive requests makes users less likely to engage a feature needlessly.

For resources that users don’t see, load lessYou can fetch things on demand or practice “lazy loading”. Apply the refrigerator light principle and make it seem like it’s always on.  On the other hand, for resources that your users do see, fetch them ahead of time or practice “eager loading”.  In these cases, apply the boy-scout principle and be prepared. 

Save less: trim, crop, shrink, and strip out redundant or duplicate content. Go for one-size-fits-all when possible. But have everything that is important ready instantly, which in some cases may mean saving more. 

The fastest database call is the one never made. Cache high frequency requests that are cost-effective; for high cost requests, cache only if it’s likely to be used more than once. But be careful what you cache, since cache mistakes can be very embarrassing. Caches can make updates take longer and can be very hard to invalidate. Also consider that running without a cache leaves you with headroom. 

Sometimes you need to distribute more. Push data closer to your users, go for client storage and content bundles. Other times, you need control over structure, strategy and technology, so distribute less.  

Apply minimalist principles. Delete data that you are no longer using, send archives to cheaper storage systems. Purge. But some unpopular things matter and shouldn’t be purged. Dump these on the cloud, keep them cached longer, or pre-render them. 

Most resources benefit from some sort of compression. But remember that compressed data can’t be queried and databases can’t interact with compressed data.

Indexes massively reduce retrieval time. A query with a tuned index = bliss. But indexes don’t always get used, and every index makes writes more expensive. Rule of thumb: awkward and fast can be better than easy but slow. 

The bottom line is that, like magic, performance cheats are about perception. The key to remember is that if an application feels fast to your users, then it is fast.

Do you have other cheats that work like magic? 

Day 7: Facebook Tips for Startups

April 23, 2013 at 4:12 pm

Today Facebook dropped by for lunch and to chat with the teams. We all got insider tips on how Facebook can help our startups, as well as creative ways to use advertising, reach fans, and optimize the benefits the social media giant can offer even the smallest, most niche startups.

From targeted advertising to interesting content, not to mention the networks’ reach across the globe, Facebook is an engine of growth for many startups.

Thanks for joining us today Daniel!

Check out this infographic on the power of Facebook advertising (and why it’s so awesome):

 

We hope to see all our startups hustling on Facebook and to see Facebook in Montreal again soon! 

Welcome to our newest team: Molson Export!

March 22, 2013 at 3:21 pm

Today we’d like to wish a warm welcome to the newest resident of Notman House and one of the best additions to our Cohort: Molson Export!

They’re providing a fridge, which of course we happily brought in and beer to make for many happy Fridays during our upcoming Cohort. The perks of having a beer fridge on site? Our startups will be working that much harder to make it to Friday night and deserve a cold one.

photo

 

2013 BDC Young Entrepreneur Award

January 30, 2013 at 9:24 pm

 

The BDC has some big news to announce. In fact, it’s a big competition: the 2013 BDC Young Entrepreneur Award! Here’s a little more about the award:

Are you an entrepreneur aged 18-35? Is your company at a crossroads? Do you have a solution that could take your business to the next level? Tell the BDC about it. It could be worth $100,000, or $25,000 in consulting services.

We at FounderFuel know better than many that all companies reach turning points — decisive moments when entrepreneurs need to make important decisions that can change the future of their business, and every entrepreneur’s turning point decision is different.

So why not take that turning point, that important decision, and compete to win $100,000 to implement your solution? We think you should! 

To enter the contest, create a short video (1 to 2 minutes) outlining the turning point or decisive moment your business has reached and the solution that will put it on a new trajectory toward growth. Your video is your pitch to Canada, so be clear, concise and persuasive. Then, fill out the 4-step application form and submit your video. Your proposed solution must not have been implemented already–that’s what the prizes are for, to help you through the change process.

Once applications have been received, the judges will choose 11 finalists — one from each province and one for the territories (Yukon, Northwest Territories and Nunavut)–to be featured on their national website and to receive cross-Canada visibility and national media coverage from BDC’s media partners.

THEN WHAT? This is the fun part.

Then, Canada will choose the winners. Canadians will vote on BDC’s microsite or Facebook page for the project they think most deserves the $100,000 Grand Prize. The finalist with the second highest number of votes will win $25,000 in consulting services.

Are you at a crossroads? Apply to be the BDC’s 2013 Young Entrepreneur. 

Want more information? Visit the BDC’s 2013 Young Entrepreneur’s official website here

Elevator World Tour…Coming to a City Near You!

December 11, 2012 at 5:19 pm

International Startup Fest: Announcing the Elevator World Tour

The International Startup Festival is hosting elevator pitch competitions in the most impressive elevators in major cities around the world. Everyone’s really excited about it. You should be too, because they might be coming to an elevator near you. They’re kicking off the Elevator World Tour at Toronto’s CN Tower, Canada’s tallest elevator. Accelerators, investors and startups are coming together for the ultimate elevator pitch competition. Winners will be announced that evening at a VIP cocktail at the top! For more information, to join them in bringing entrepreneurs to new heights, or to nominate your elevator, go to www.startupfestival.com/elevatortour

Perks!

July 9, 2012 at 7:36 pm

As part of the FounderFuel program, teams get access to over $100K in perks from over 75 different companies. These deals range from discounts on services to credits for use on merchandise. Not only do these perks help startups save money, they’re also crucial in establishing relationships between fairly established startups and those just getting off the ground. Our teams are proud to call companies like Amazon AWS, Zendesk, Pivotal, MixPanel and SendGrid–and many more!–their partners, and we are proud to offer such partnerships through our program. 

Managing perks like these can be tricky, which is why we recently jumped on board with Rewardli to keep all the FounderFuel perks in one place so teams can access the program’s perks via a simple home page.

If your company is interested in partnering with FounderFuel, submit your discount here!  

Think your team has what it takes?

Apply