Categories
Other

My History of Failure

“I’ve failed over and over and over again in my life, and that is why I succeed.”

This is my third attempt.  I’ve tried twice before and failed, but this time could be different.  It could end up in failure just like the others, but I don’t think it will.  I’m smarter this time around.  I’ve learned from my mistakes, am better at what I do, and I have more to lose.

Encode4Free

The first time around was in 2007.  I had just learned PHP and thought I had what it took to make a video encoding startup.  This was before the term “cloud” was popular, and my idea was that users would upload videos to my service, encode them into whatever format they liked, and then re-download them.  For revenue, I thought that a free service could be done by adding advertising to the beginning of the encoded video.  Or, a user could pay small fee to get moved to the front of the queue and have no advertisements.

The idea seemed good, but I wasn’t dedicated to it.  I got a design going and had the back-end encoding stuff working, but I just couldn’t act on it.  Some other things went wrong too.

  • No motivation – I was still in college, didn’t need the money, and enjoyed my life just where it was.  There wasn’t really a huge motivation for me to do this.
  • No passion – I honestly didn’t care about video encoding.  Sure it’s cool, but only cool from a technical standpoint.  It wasn’t something I could really get behind.
  • Knowledge – I really had no idea how deep the programming rabbit hole went at this point.  Not knowing what good design was really put a cramp in how fast I could develop too.  In short, I was inexperienced and it showed.
  • Flawed business model – In retrospect, this should have been a freemium model.  10 minute video for free, anything over is charged.  That way people don’t get annoying advertisements added to their videos.

Should I Get The Book?

In 2008 and early 2009 I worked on “Should I Get The Book?”(SIGTB).  As a grad student reflecting on my undergraduate years, I realized that I spent a ridiculous amount of money on books that I never needed.  After talking to friends and classmates, it seemed this was a universal problem, and my startup idea was born.  This time, I did things right (sort of).  I took a few hours every week over the the summer and started hacking away at it.  By the end of the summer, I had a functioning product.  I did a launch, and the waited.  But nobody came.

So what happened?  Was it competition?  Was it a poor idea?  Well, it was a lot of things.

  • Design – This is huge.  My site design sucked.  I basically ripped off a WordPress template that somebody made because it looked cool.  It had nothing to do with my idea, and it showed.  People coming to the page would say “So what is this about?”.
  • UI – The interface and experience was awful.  None of it made sense, and the changes that people did suggest I back-burnered until I “had more time”.
  • Seed Data – The idea that users leave reviews about whether they needed the book or not was great, except that nobody would do it.  Without having some reviews already in there, I found that people weren’t motivated to leave a review because they thought the site wasn’t being used.  I needed to have data seeded, but I couldn’t think of a good way to do this without paying any money (I had none at the time).
  • Focus – I tried to focus on too many schools at once with the first launch.  I should have started with one to see if the concept would stick.
  • Advertising – On a college campus, flyers and word of mouth is key.  I had zero flyers and nobody talking about me.
  • Karma – Users like getting a reward for doing something.  It doesn’t have to be money, karma works just as well.  Users get to scratch their competitive urge by posting reviews, getting karma, and checking to see if they have more then their friends. I should have done this, but didn’t.
  • Evergreen data – One of the big problems with this data is that the instructor can change books, change styles, or even stop teaching.  The data can become useless quickly.

Once I realized most of these things I vowed to start a re-design with all of these issues addressed.  I was about 25% of the way through the mock-up when I was informed that RateMyProfessor.com had a similar feature.  It was easy to use, and they already had a huge user base.  My idea was basically sunk.

While SIGTB flopped, it was important step for me.  I had pushed a project through to completion, learned a lot about marketing, and learned that I really need a co-founder to talk me out of bad ideas.  Most importantly though, I proved to myself that I could accomplish something.  I might have given up too quickly, but I think that the idea wouldn’t have worked well anyways.

CampaignAlytics (Working Name)

I started this idea out in late October of this year.  The idea is that email campaign analytics can be done better.  Currently analytics is rolled in as a feature for big mailers (Mail Chimp, etc), but it doesn’t provide the in-depth analytics that a lot of marketing folks are looking for.  We’re looking to change that.  I’ve been working for an hour a day since November 1st, and have a lot to show for it.  I pitched the idea to a local pitch night, and the reception was great.  We have a lot of great features, and do it all in a non-obtrusive way that is compatible with mailing services, or can be rolled into your custom solution using our API.

I’m taking a different path with this startup, based on the things I’ve learned on the last two.

  • Pay for a design – The first thing I did for this web app was pay for a design.  I got a great deal, and now have a design that I can be proud of and shows off the product like nothing I could have ever come up with.
  • Co-Founder – Having someone to talk you out of bad ideas, and give you a sense of perspective is amazing.  Having someone to discuss ideas with and share the burden is pretty great too.
  • Funding – I’ve come to the conclusion that without a little bit of funding, this startup will take forever to complete.  We’re applying to the seed incubator Momentum and hopefully we’ll get funded.
  • Iterate – I’ve already gone through two different layouts and menu structures for the account/analytics page.  The second version is far better than the first because I asked for feedback from a few trusted people and implemented the changes right away.

The thing I hope you can take away from this is that you are going to fail many times before you succeed.  Being persistent (and maybe a bit stubborn) will take you 70% of the way there, and the rest is on how good your idea is.

Categories
Other Other Programming PHP Programming

SVN Merge Example (Trunk to Branch)

I’m often in the situation where I need to merge changes from the trunk development into a branch.  I can never, EVER, remember the command, so I’m putting in here in hopes that I can reference it again and that other people might find it useful.

svn merge -r x:y svn://repositoryURL/repo/trunk/ .

So, how does it work? X is the revision that you branched at. This can also be the revision that you last merged changes from. Y is the version that you want to merge up to.  In most instances, HEAD is probably what you’re looking for.

Note:  Using –dry-run if you want to see the changes that will be made before actually doing it.  It takes some of the “this is scary” out of merging.

Categories
Other PHP Programming

Creating a Flexible Caching Module

I work for a great company, I really do.  Sure we have our problems (like just coming out of the developer stone age), but overall I work with smart, friendly people who are passionate about what they do.  One of the things that always bugged me though was the lack of any sort of caching in our CMS.  Most times it’s not needed, but when an operation takes about 100 queries or so to finish, then it’s time to start caching.

Since I’m a bit of an efficiency freak, I thought I would take a crack at writing a flexible caching module that is easy for our developers to use.  So what do “easy” and “flexible” mean?  To be “easy”, the caching module must be usable by even a novice developer and have a limited number of options.  For instance, I ended up deciding that we really only need two public methods, and one public property.

  • $cache->exists – If “$cache” is a cache object, calling exists checks to see if the cached object already exists in the database.  It also checks to see if it’s expired or not.  If it’s expired or non-existent, it returns false.   It returns true if the cached object exists and is up to date.
  • $cache->put($val) – This is how you store something in cache.  It can be any type of serializable PHP object.  So basically, resource types are off limits but objects, arrays, variables, entire web pages, etc. can be used.
  • $cache->get() – This fetches the object stored  in the cache.  It handles the re-serialization of it as well, so it really makes things pretty idiot proof.

What about flexible?  Well, by that I mean we need to be able to transparently implement several different types of caching.  Since we’re just crawling out of the dark ages, I opted to implement a fallback caching mechanism.  Here’s how it works.

  • The programmer defines a variable in our settings area to be which caching option he/she wants to use.  Options are memcached, file, mysql.
  • If the setting isn’t defined, we try memcached by default.  This is by far the best caching system to use, so it makes sense to try it first.
  • If memcached fails, we go to a database caching schema.  While not nearly as good as using memcached, it’s possible it could save you tons of queries on your database.
  • If the user chooses file caching, we do that.  It’s a pretty bad idea to use in most cases, but may still have it’s uses.

So why did it come this?  It’s not that we host terribly high-volume sites, but that our CMS is super slow.  A full-on page will take about 4 seconds to load to your screen completely, and that’s running local on the network.  One of the main problems is that we use output bufferring extensively.  The ENTIRE FRIGGIN PAGE is buffered.  This has 3 side effects:

  1. Slight performance loss due to bufferring.
  2. Apparent page load time sucks because the browser has to wait for the entire page to be generated before getting output.
  3. Development is super easy because you don’t ever have to worry about output being sent before doing a call like “header()”.

We can’t remove output buffering unfortunately.  It’s at the very core of our CMS and development practices, so it just won’t work.  To get the load time to generate the page as low as possible, I decided that caching was needed.

So what sort of problems do we run in to with this caching module?  Glad you asked!  Many of the problems aren’t specific to this caching module, but to caching in general.  The quick list:

  • If the original query wasn’t complicated, it’s not worth storing the results.  The number of queries the caching module does in MySQL mode is 3.  If your initial query was less than that, or not a super-complex-mega-join, it’s not worth using.  This caveat goes away in memcached mode.
  • Smart naming and design.  You have to be very careful out what you cache, and when.  Remember, page content and queries probably change when a user is logged in or on a different device.  Just things to keep in mind.
  • Getting developers to use it.  Not everyone likes to learn, let alone change their habits.  The biggest barrier to this is getting people to use it.  Some people don’t care about efficiency either (sad, I know), but at least our system administrator thanks me.

The caching module seems to work pretty well too.  On one particularly SQL heavy page, I reduced page load time from 14 seconds (ridiculous) to just under 6 seconds (still bad, but getting better).

That’s it for now.  Any questions or comments are welcome.

Categories
Other

Are we really worth 3.5 million?

A news (I use this term loosely) article recently came across TechCrunch about a Google engineer being offered $3.5 million in restricted stock to not leave for Facebook.  Now, I was alway taught to not undervalue myself, and I completely agree with that line of thought.  However, 3.5 million is ridiculous.  How many startups could you fund with that kind of money?  How many lives could be saved through research, aid, or vaccines?   How much good could be done with $3.5 million?

I understand that this may just be a rumor (it is TechCrunch after all), but it brings up a good point.  As programmers we’ve been taught that our skills are irreplaceable, but I don’t believe that.  Yes we have a hard job, and being good at what we do is even harder, but we’re not worth $3.5 million.  $100,000 for a good programmer, sure.  $500,000 for a “rock star”, maybe. But never $3.5 million.

Google is afraid of losing talent, but this seems like a knee-jerk reaction.  There will always be brilliant engineers who want to work for Google, so I say let him/her go.  Put that $3.5 million to use somewhere it can make a difference, not in the pocket of someone who likely already has a ton of cash.  Besides, if this person is leaving for Facebook, they are probably burnt out or looking for a new challenge anyways.  It happens, and no amount of money will change the fact that they are probably going to leave after their contract is up anyways.

Categories
Other

It’s Not Enough

I’m 24 (almost 25, but lets not go there). In my life I’ve accomplished many things, but with the exception of one, they aren’t very important. I’ve graduated high school, graduated college, got accepted to grad school, got married (the important thing), and created a start-up that failed. I have a good paying job (for the region), doing something I love (web development), at an amazing company with smart co-workers. But I still feel unfulfilled. It just isn’t enough.

Don’t take this the wrong way. I’ve done a lot of stuff. It’s not easy to graduate college. Getting accepted to grad school is hard too. But the thing is, none of these things stand out. Everyone graduates from college these days, and dropping out of grad school isn’t exactly a stand out thing either. I half-assed a start-up that was doomed to failure too. Out of all these things, I learned the most from that failure. I learned that without the right motivation and passion I will not make a good product. I also learned the most import lesson of all: It’s ok to fail.

So here I am now, happily married and decidedly middle class. The American dream right? Not for me. It’s not enough. I want to be passionate about the things I do again. Aside from my wife, nobody in my family seems to understand this. Maybe it’s because I come from a poor family. They feel that because I have a good paying job I should be happy. But the thing is, I’m not. Money just isn’t enough for me to be happy. I need to be intellectually challenged, passionate about what I’m working on, and excited. Now that I’m at this point in my life, I’ve realized that the ceiling is much higher than I ever thought possible.

Where does this lead me? For me, it means starting something that I can be passionate about. Be it a blessing or a curse, the Hacker News community has put the entreupanurial spirit in me, so I’m going to do another start-up (“Do or Do Not. There is no try.”). This time with a long time friend and an idea that seems extremely viable. But why should it be different this time? Maybe it won’t be, but it feels different this time. It’s like when you go for a run, and within the first 10 steps you can tell if it’s going to be a struggle every step of the way or smooth sailing. This feels like smooth sailing, so I’m hopeful. Most importantly though, I’m excited.

I wonder if this new start-up will be enough to satiate my thirst for knowledge, adventure, and success. I hope it is, but I feel that nothing will ever be enough. I’ll always aspire towards the next level. I’ll always work late into the night until my wife comes in and tells me to go to bed. I’ll never be fully satisfied, but maybe some day I’ll be just just satisfied enough to be happy.

Categories
Other

Exorithm – An Online PHP Playground

As I was cruising about the web this morning I stumbled upon Exorithm, an online PHP execution environment (or playground as I like to call it).  Actually, it’s a lot more than that.  It’s a hub for people to learn, create, and share.  Exorithm allows PHP developers to create functions that other people might find useful and share them.  For instance, just this morning there were algorithms on the site for reversing strings, drawing shapes, and sorting data.

It’s worth checking out.  I spent a good half hour just trying to break their evaluation environment (no luck!) and then another few minutes cruising the algorithms section.  Their web site is http://www.eXorithm.com.

Exorithm

Categories
Other

Traffic Analysis (Hacker News & Reddit Focus)

Over the past month I’ve started pulling in some modest traffic to this blog.  Now that I’ve gotten a few thousand visitors over that past few weeks, I thought it might be time to do a quick analysis of my traffic.

Overview

As you can see, my traffic goes in spikes.  Each of those spikes corresponds to when a new article is published.  Without the outliers, there is still a steady increase in traffic.  I’ve also noticed that over the past several weeks my average time on site has increased to over 1 minute ( it was somewhere near 45 seconds before I started posting articles frequently).  The best stat on here for me is that I actually have returning visitors.  Granted, they only make up ~16% of the traffic, but it’s still good to see.

Reddit -vs- Hacker News


As you can see, I clearly have Reddit and Hacker News to thank for my traffic numbers.  Without you guys (and girls), it wouldn’t be nearly as fun to write.  However, there is some interesting info tucked away in that table.  The most important piece is “Avg. Time On Site”.  Reddit’s average time is only 27 seconds, as opposed to Hacker News which is nearly 2 minutes.  This tells me that the typical Reddit user probably has no attention span (likely) and I should probably add a TLDR block at the beginning of each article (I won’t, don’t worry).   On the other hand, this might just mean that Hacker News users open up a ton of tabs and it takes 90 seconds on average to get to mine.  I tend to think it’s just lower brow traffic from Reddit, but I’ll give them the benefit of the doubt.

The bounce rate from Hacker News is also slightly better, but still nowhere near as good as traffice from PHPDeveloper.org or StumbleUpon.

OS & Browsers


There aren’t any surprises here.  Windows + Firefox is leading the pack, with Windows + Chrome closing in right behind them.  Mac users are also making a strong showing.  As this is a technical blog, this doesn’t surprise me at all.

Categories
Other

Google Keyword Tool

It’s not easy knowing what to write about.  When you run a niche site like this, it’s even harder.  One of the tools I rely heavily on to tell whether I should invest the time writing a post or not is the Google Keyword Tool.  The Google Keyword Tool allows you enter key words, and then it tells you the monthly search volume on those words, the competition, and even monthly local searches.  But it doesn’t stop there, it gives you other keywords that may be relevant to you and displays statistics on those as well.   By far though, the most important feature is the competition rating.  It lets you see if you should even bother trying to go after that niche or not.

Google Keyword Tool