Tech: If I were Yahoo!, what would I build?

Yahoo’s acquisition of RockMelt last week kicked off another round of armchair quarterbacking questioning the wisdom of aquiring so many startups purely for talent. Only time will ultimately validate the strategy but I think an interesting discussion is given Yahoo!’s position, what would you build given the influx of new talent?

Build a low cost, gaming focused tablet

With the popularity and penetration of tablets accelerating, now would be a great time for Yahoo! to enter the space. In addition to consumer interest, Android 4.3 is rock solid, OEMs are comfortable building “decent” tablets, and Amazon has proved that alternate Android app stores work. So what if Yahoo! built a low cost, gaming focused tablet, with an alternative app store and developer friendly terms? I think they’d be able to successfully capture the low to mid market and then primarily drive revenue via app and in-app purchases.

Double down on Fantasy Sports

One of the few Yahoo! properties that I actually see people visit are it’s Fantasy Sports offerings. Given that, I think it makes sense for Yahoo! to double down on Fantasy and make it an absolutely killer offering. Things like an open API, facilitating playing with real money, and Nate Silver style statistics would set Yahoo! Fantasy apart and ultimately restore the “cool” around the Yahoo! brand.

A killer second screen experience

Remember that tablet Yahoo! just built? Well why not leverage it to put relevant “pop culture” and “celeb gossip” content in front of Yahoo!’s users? It’s not sexy to talk about, but a lot of Yahoo!’s traffic is driven by this type of content and if they can monetize it more effectively than display advertising it should be an easy win. In addition, with the “new” Fantasy Sports available Yahoo! would be able to provide relevant content during live sports and monetize those users as well.

Anyway, whatever Yahoo! ends up building I’m sure it’ll be a bold departure from it’s old path. They have the cash, talent, and hopefully the vision to reinvent a once great Internet giant into a real contender.

isset(), empty(), is_null() – What’s the difference?

I came across an article on phpro.org about the difference between isset, empty and isnull methods that I found it informative so I’m going to summarize and re-post it here.

There are often times where you need to check for empty or null values or if a variable is set.  It’s pointed out that in many circumstances the wrong function is used to make these assertions. The code may end up working; however, in some cases using the wrong function returns a value that programmer didn’t expect and leads to errors.

Actions speak much louder than words so I’ll cut to the example. The example script tests the following functions and operators:

  • isset()
  • empty()
  • is_null()
  • ==
  • ===

against the following values:

  • no value set
  • null
  • zero
  • false
  • numeric value
  • empty string

and builds out a comparison table (see below) of the results. The notice above the table is because the isset() function is trying to check a variable that has not been initialized(Not Set).

I’ll be honest, I never knew passing a zero into the empty() function returns a true!

Anyways, the chart below ends up becoming a useful reference guide as well.  The code used to produce the table is at the bottom of this post.

The Code

Startups: You should be building a minimum viable business

Published in 2011, Eric Reis’s book The Lean Startup became the blueprint that dozens of “web 2.0” companies were built against. At a high level, the book promotes an “agile” like approach to developing a new company. Loosely speaking, the “happy path” to building a new startup would involve synthesizing ideas into a minimal viable product (MVP), receiving feedback, rapidly iterating, and finally reaching product market fit. Due to its simplicity and wide applicability, the “lean startup methodology” has become wildly popular especially among first time entrepreneurs. With this popularity, the concept of a “MVP” has basically become a buzzword rallying cry to justify what people are building.

Unfortunately, a common problem we’ve noticed is that people focus solely on the MVP and end up neglecting the other parts of the business, notably sales and marketing. To combat this, you should really be thinking of building a minimal viable business instead of specifically an MVP. Ok great, so what are the components of an MVB?

Product (MVP)

The product that you’re actually building is ultimately going to be one of the most important parts of your new business. Surprisingly, I’d argue that the exact features that make it into the MVP aren’t terribly important. What is key, is that your users experience an “aha!” moment while using the product which will help you convey the value. Another key takeaway is less is more. Start small and grow the product to avoid leaving users overwhelmed, confused, and discouraged.

User Acquisition

Awesome. So you’ve built a fantastic product, now how are you going to get in front of people? First time tech founders often overlook an effective user acquisition strategy and it ends up being a major risk factor for them. Hallmarks of an effective strategy are that it needs to be replicable, measurable, and generally affordable. Because of this, “getting great PR”, “going viral” or “buying a super bowl commercial” generally don’t qualify as tractable strategies. Instead, things like paid search, affiliate marketing, and native content ads would be more reasonable strategies to consider.

Community

Community is another area that is often overlooked. Even though it’s usually associated with B2C companies, it’s still important for B2B companies. On the B2C side, the majority of users are less likely to engage with “empty” social sites since no one wants to be the only person at the party. You’ll need a strategy to seed any social features your site has and also keep the heartbeat there once you launch. From a B2B perspective, you’ll still need to think about things like answering support issues, writing newsletters, and generating blog content. Although they seem trivial, having an actionable plan for these “community” issues helps establish user trust and win brand champions.

Metrics

The last piece of the “minimum viable business” are the KPIs and metrics that you’re looking to track. Tracking key indicators is important because they provide a yardstick to let you know if you’re moving in the the right direction. A key point is to make sure you’re tracking useful numbers. Vanity metrics like “# of followers” or “page views” aren’t really going to help you determine the health of your business. You’ll need numbers like “customer acquisition cost” or “lifetime value” which help you distill how your company is doing.

That’s a wrap

Wrapping up, building an MVP is just one of the components of building a successful startup. You’ll need to consider several other important aspects which will help you build, measure, and iterate along your path to building a successful company.

As with all advice, just remember that 90% of all advice is bullshit.

Applying for a job? What we like to see

We recently just finished hiring another engineer for our team (welcome Jared!), during which we’ve seen quite a few different applications and it also led to my previous post about what we’d like to see recruiters do before contacting us.

While I am certainly no hiring expert, I think some of the following points may help people applying for a job out.

Read the Full Posting

Many job postings, including ours, will include details about what they want to see from any potential candidate. I’ve seen everything from a simple put in the subject “XYZ” to answer the following programming questions. On some of our job postings we include something like include your favorite beer, the best place you’ve vacationed, etc.. These questions aren’t only used to weed out spam, but we like to see what people come up with and to see if they are a good fit. Regardless of what the posting request is, it’s important to fully read it and apply properly. Several potential candidates didn’t read ours in full and didn’t follow the simple application instructions. If you don’t follow the instructions it can reflect poorly as it may indicate you aren’t able to pay attention to details.

Shorter Can Be Better

I remember back in college when working on resumes many advocated “keep it to a single page”; I can’t agree more now. I’ve received some resumes that are over 6 pages long. A resume, in my point of view, should be something that bullet points your skills, experience, and education. Most of the time, you can fit all this information on to a single page. Being clear and concise pays its dividends. I’m much more interested in the resumes that I could briefly look at and get a good feeling about the candidate. The long resumes often spent a half page to page summarizing some activity at a previous job; it’s much easier to inquire about a specific experience you have if I don’t understand it.

Keep Programming Languages Short

One thing I saw on an alarming number of resumes was that someone would list 10+ programming languages as their core languages. I’m all for having basic knowledge in multiple languages, but I wouldn’t list all the languages I’ve ever worked on as my core language.

The long lists (java,python,php,ruby, perl, c++, c# and scala), more often on recent graduates, seemed more like a list of languages the candidate knew existed. Understandably, right out school you may not have a specific language that you have an in-depth knowledge of. In this case, I recommend looking up what language the job position that you are applying for is, and list that and one or two others that compliment it (such as PHP, Javascript, SQL) rather than listing everything you’ve ever worked in. I gave much more attention to candidates who applied with fewer languages and then listed a few projects/concepts they did within each language.

Past Projects, Not Classwork

One of the last points I want to touch on is when people want to know past projects you’ve worked on. What I’m looking for is something to just show that you can put all the programming concepts you’ve learned together to form some sort of project. Whether this is a simple side project you had or something you worked on at your last job, it shows you are able to take some theory and apply it to realistic applications. Often at career fairs I’d get 30 resumes all which list the exact same project, which was an assignment from class. While coming straight from college you may not have many side projects, have at least one (or make one), and list it first. By having at least one side project that you’ve built (or been a major part of), it shows that you’re able to take what you’ve learned in theory and apply it. Classroom assignments are often “fill in the blank” or too rigid, follow these exact instructions, to demonstrate your full capabilities.

While these are only some of the points I look for on incoming applicants, they are extremely important. Let me now if you think I’ve missed a few!

Good luck on applying to your next job!

WordPress: Modify Native Calendar Widget for Event Post Types

Recently I was working on WordPress website  and the client’s theme had an existing “Event” custom post type. The client wanted a way to calendarize the event start date and display with a widget.

There is a calendar widget built into WordPress; however, it has a couple shortcomings for what the client was trying to do. First, it calendarises all posts regardless of type (and in this case all we want is event posts). Secondly, it also calendarises posts based on date posted rather than a field such as event date.  As an added constraint, the non-profit client did not have a budget for building a custom plugin from scratch to fill the need.

So I went digging through the PHP script that powers the native calendar widget and found a way to modify the plugin while only having to bill about a half hour of custom development. It actually took me longer to write this post!

It’s not the most ideal or elegant solution but it saved the client a bunch of money by spending almost no time on this.  Couple drawbacks without further modifications 1) the widget won’t display multi-day events properly 2) The calendar widget now only works with event post types (i.e., can’t calendarize post dates of normal blog posts).

Here’s what it ends up looking like:

The Code

PHP

The file I had to modify is located in the WordPress 3.5 installation in wordpressroot>wp-includes>general-template.php

In order to know which days on the calendar to highlight as links to posts, the WordPress devlopers built a query that pulls the day numbers of the posts that were posted in the current month.

There’s a couple issues here as it relates to getting this to work for events as opposed to regular posts. First, the query is pulling post_type equal to “post” so we’ll need to change that “event” so only events are being pulled. Secondly, the original query is selecting posts based on post date in the current month.   For events, when we’re looking at a calendar, we don’t care when it was posted, but rather the start date of the event.

To deal with these issues, I had to rewrite the query. Unfortunately, the event start date field was one of the custom fields added for the event post type so it resides in the `wp_postmeta` table as opposed to `wp_posts so you have to join the `wp_posts` and `wp_postmeta` tables to get access to all the required fields.  The query returns the event start day of the month (dom) , post id (post_id) , url of the event (guid) and event title (post_title).  You’ll see soon why I pulled more fields than just the day numbers like before. Also, I changed the return value to an array of objects instead of numerical array per my own preferences. The new query looks something like this:

The next block of the original code (see gist below) executes a second query almost identical to the first, but instead of pulling just day numbers like before, it pulls the post id, post titles and day numbers. The block following the query goes through each post and puts the titles into an associative array indexed by the day of the month. The array of post titles ($ak_titles_for_day) will used to display the post titles on their corresponding day cell in the calendar when it builds out the calendar table.

Use of two queries seemed a bit duplicative to me since they are so similar so I got rid of the second one and pulled the additional fields in the first query.  Next I modified the foreach to record both the event title and event page url for every event post (this is so we can display a list of event links when a user hovers over a calendar day). I also consolidated the foreach code with the loop that follows the first query.  Based on the results form the first query, two arrays are built.  The first array, $dayswithpost, is simply an array containing all the day numbers of the month that have events to be used when building out the calendar table. The $ak_titles_for_day array, as mentioned above, is an associative array indexed by day numbers. It stores the event title and event url under the corresponding day number index and will be used to display to the user when they hover over a day number on the calendar that has event starting dates.

Lastly, the  code to build out the table/calendar had to be modified.  The original block of code compares the day number of the calendar cell being generated to the $dayswithposts array to determine if any posts are listed for that day.  If the day number has corresponding posts in the $dayswithposts array, an anchor tag is wrapped around the day number and href generated using the built in WordPress function get_day_link(). This function returns the url of an archive page for all posts on a given day. This works nicely for days with multiple posts because you can see all the posts by navigating to that daily archive url which is a built in WordPress template. The post title(s) for days with posts are also inserted into the title attribute of the day number link from the values stored in the $ak_titles_for_day array so the user will see the post titles when they hover over a calendar day link.

For events, a single anchor wrapped around the calendar day number would not work because clicking on the day would just take you to the archive page for events posted on that day not the start date of actual event day.  Therefore the code needs to be modified so that a user is able to click on each individual event title and have it link to the events page url instead of an archive page.

Instead of wrapping the day number in an anchor tag, I switched it to a span so it can be selected later by css/js.  Also, I created a <div> containing event titles and links for all the events for a given day and inserted it after the calendar number </span>.  In the CSS, I set the <div> to display:none, and position:absolute and positioned it relative to the <td> it resides in.  Then using jQuery I set a hover on both the <span> and the <div> so when a user hovers over a day with posts, you can display the <div> with the event links and titles.

JS and CSS