Spring Break! Time to have fun, right? Wrong, time for learning and working

Alright so I believe I have finished my final assignment/exam just now before Spring Break (woohoo!). I'm pretty excited. Not because I'm going to Spain or Brazil or somewhere awesome for break to have lots of college-y fun, but because it's time to become a better entrepreneur! I'm going to be spending my time doing a few things:
  1. Learning Ruby on Rails (a side project a friend presented me requires rails, and also its a great language that many companies are now using to get scale, fast).
  2. Throwing together Bottleable (basically a "message in the bottle" thing for the internet)
  3. Prototyping a new direction for Tasteplug.
  4. Spending lots of time loving my beautiful girlfriend (guys with girlfriends, never skimp on this)
Alright so lots to do in a short amount of time. I was hoping to re-adjust my sleep schedule (currently sleeping at 6-7AM, waking up at 10AM) to something more reasonable, but we will see if that will get done. It's worth it though. I'm fast paced and trying to get on track to becoming a successful entrepreneur. I want to do something now, and that takes work. So I'll do my work. Until I get something done.

Learning by helping

Woops, almost forgot to post tonight - it's 7AM who can blame me? Thanks to the wonders of the iPhone WordPress app I can write this short and sweet blurb as I drift asleep in the comfort of my bed.

Today I was reminded of a very valuable life lesson - you get just as much out of helping someone as they get by being helped. I'm sure there are plenty of studies or philosophers out there that can point to how or why being a teacher actually helps you learn a subject better but here's a little anecdote from my life earlier today (er yesterday).

I got a tweet two nights ago saying the site wasn't working for them. I stayed in touch trying to figure out what was wrong. Unfortunately I had to leave the situation to get a precious 3 hrs of sleep before an exam I had to take. But after I woke up I continued to work on this persons case (@thesraid whose twitter handle is escaping me right now).

I looked, couldn't find his name on the database, then looked and couldn't find his oauth id. He told me maybe it was because his name had an apostrophe in it. I thought I had taken care of that problem with my mysql_escape_string calls but I looked at where the problem could lie.

Turns out there was one function (which believe it or not was the crucial function of registering a user) that did not call this. So I added it (also apologies to everyone else that suffered because of my mistake) and thought nice done. Good to go.

Wrong. More problems. Now his page wasn't loading. Looked through the source, and realized he was making it into the database now but when getting his named called to the page it broke the JavaScript because of his apostrophe again. So I called addSlashes and things worked like a charm. After things got fixed he thanked me and told me about how one time an envelope was addressed to him (John O Undefined Character String vs John O'Riordan insert funny name here later when I can remember).

Basically, I could have spent some previous hours preparing for either of my Midterms or sleeping but I knew it would be valuable to help out a user with a mistake I made. Turned out I learned something and got another user successfully registered!

I am a firm believer in help out as much as you can and you wont be disappointed. Glad I won't have to flip flop on that anytime soon.

Wish I could be a social entrepreneur

In my LGST210 class today we went over different corporate social initiatives and gave them grades based on how effective we thought they were or what their cause was. One of the companies that really caught my attention was Tom's Shoes. They sell very simple shoes at an affordable price, but their real value proposition is that for every pair sold, they will donate a pair to a child in need. I thought this was very unique and interesting because the company is still for-profit. Yet I truly believe that the founder's intention from the beginning was to simply create a sustainable business that had a great cause. It was a bold $1M+ investment for the founder to make but I have to say it did work out and now the world is a better place for it. Though shoes may not necessarily be the cause everyone believes it the highest priority on the list - it's a great start. It really gets me thinking even more about what kind of things can I build that not only will be beneficial to myself but the world. What can I create that will be successful enough to sustain its good cause for a significant and meaningful amount of time in this world. I'll keep thinking. Meanwhile, let me know if you have any suggestions.

Back to reality

The past couple of weeks (really since the start of the semester) my head has been in the clouds thinking about how great it is to get in the real world and create things people really care about. I'll be honest, school has really taken a back seat. My priorites (in order) have really been:
  • Meet with really smart, driven, helpful individuals
  • Idea generation, and the hacking/iteration of those ideas
  • Track
  • Schoolwork
But I have two midterms, a paper, and a big assignment due this week before I'm off the Spring break to do more of the meeting smart, driven people, hacking, and training for track. I've forced myself to do some hardcore studying (in between managing server issues...) for these classes which I have not really been to. I've just finished studying for OPIM (for tonight) and hopefully my coach will understand if I leave practice a little early for doing some quick pre-test cramming. I've actually found OPIM to be pretty easy and I think I'll do fairly well for learning it now. BPUB (or managerial economics) is tomorrow night. I don't think that will be as pretty. But will let you know.

WhereMyFriends.Be up and running! Finally, I can sleep

Let's make this post quick, since I would like to get some real sleep... WhereMyFriends.Be is finally up and running for good (at least so it seems...)!!!! Thanks VERY VERY VERY much to a Paul from Rackspace who helped me figure it out after several support staff members over the past 72 hours have just thrown me in several directions. Paul, you're a boss. Fortunate for me, he had just finished creating data structures for a very similar purpose dealing with the Facebook API and had a lot to offer. Basically he told me:
  • Facebook/MySQL likes short bursty queries over long ones
  • Ints are greater than strings
The latter really saved the day. The biggest change he helped me make was changing the oauth ids to bigints rather than the current text in SQL and also indexing this. This made everything load at SUCH a faster speed. 100X better than originally, and at least 1000X better than the slow crappy times! K maybe exaggerating a bit. But yeah. I believe this is our solution to keeping up a stable site for thousands of concurrent users. I will wake up in about 14 hours (longer if I'm lucky) and hope to see things going just as smoothly as I left them.

Blood, sweat, and tears - Mashable certainly tested our resolve

[caption id="attachment_101" align="aligncenter" width="745" caption="source: my heart and soul"] [/caption] Boy was it a rough couple night... but a great one which I will remember forever. Feb 24 12:15AM - On my way to start doing my homework. As soon as I sit down in the study room, Dan Shipper calls me "We're on Mashable!" I'm stunned, don't know what to say and he tells me to come back to the dorms so we can work. I run over as fast as I can. 12:30AM - I'm back in the quad done dancing around in glee with Dan. We realize, we need to get cracking. Our servers at GoDaddy are getting hit hard. We thought it would handle it, but clearly the virtual dedicatd server was not enough. Dan called up Rackspace, got a Cloud Site squared away, and we began to migrate. 1:00AM - We decide it's worth it to take down the page rather than letting it load poorly for people. So we put up a landing page, and let the migration begin. We finally got a hold of Ajay (where the hell was he?). Ajay helps us wit PR. 1:30AM ish - Our cloud site was up and running! Dan and I were so happy! This was one of our emotional highs. Everything was working smoothly, we were getting hit with traffic at unimaginable loads, but we were handling. We though smooth sailing. So we just thought we could spruce things up a bit, fix a bug here and there, calm down the fire of people that had seen the site down and go to bed. We were wrong. 1:30AM - 4:30AM - Happily responding to tweets, facebook comments, Mashable comments while watching our traffic and user base grow. Through th night we saw user benchmarks hit 1K, then 2K, then 3K, 4K, and by the end of the night (er early morning) we see 5K! Also, Dan and I are busy fixing bugs and making features more robust for users. 5:30AM - Ajay heads to bed. As soon as this happens, Dan and I sort of realize, something is wrong. Things are slowing down significantly for loading the profile page. We expect that it must be something to do with our database because the code was basically unchanged through the night and traffic was consistently high so that was not the big difference. The only thing we could think of was something going on with more and more data being logged into our database. I mean, this was good, but it also hurt our speed - so we though. 6:30AM - We continue to look through our code to see if there are any MySQL calls that are just looping or something extremely inefficient. We catch a couple small things but don't see anything that could really make that much of a difference. We see some calls taking as long as 30s from the webpage, when earlier that evening it took only 2-3s...what is going ON??? 7:00AM - We decide to try logging the times it takes to go through each function that was called to see if it really was our SQL database. 8:00AM - Call Rackspace again, finally they discover it is not a CPU or RAM deficiency from our Cloud Site server but is instead long queues to our database because our site is data-call heavy. We continue to look through our scripts because they claim there is nothing we can do but to wait and let the queues clear out. 9:00AM - We have to head to class and so we need to make a choice: keep WhereMyFriends.Be up, or take a down. We had to choose whether we wanted to leave a sub-par, slow product up that would probably still pick up traffic, or take it down and possibly close off this window of opportunity for virality from Mashable. We eventually chose to take it down. To me, the choice was simple because you never release a product you know not to be the highest of quality. We didn't need artificial growth/hits, but instead wanted to make sure people knew we only produce great stuff. So we ended up using MailChimp to put up a nice apology letter, with a chance for them to sign up and see the product when it was up and running again. Then I had to start the day...In between classes and such I was running around checking to make sure our landing page didn't crash (I figured it wouldn't but...who knows sometimes) and seeing what I could do to make the SQL queries faster. I immediately got some great advice, thought of how to implement it, and started doing some of the coding while sitting around waiting for class to begin. I also made sure to help cool the fire online with all the hits going to our site, but nowhere to go from there.  Then at about 12PM Dan tells me we got on CNN! We were down at the time but it was still exciting! But now there were more angry/confused comments to respond to and quel. After finishing some homework that was due the next morning, I met up with Dan again to start coding. I was introduced to a new method of parsing the friends. Before we were sending off 20 friends at a time to get back 20 (or however many revealed their location) locations. I would figure out if those friends were in our database or not, then I would send them on different paths there. In my new implementation, after getting some advice, I parsed the friend list immediately into what-is-in-our-sql-tables, and what-do-I-need-from-FB. That made a big difference in terms of time, and along with other tweeks we thought our code was solid. We were just waiting on Rackspace to migrate us over from Cloud Sites to more powerful and scalable, Cloud Servers. After we did that, migrated over, things seemed to work fine. Mind you it was around 4AM at this point. We had run into several issues along the way, such as DNS mis-pointing, private/public IP misdirecting, SQL fails, and every other migrating issue you can think of. Surprisingly though, the new untested code that parsed the friends data in a different way and sent them on unique tracks worked with almost no hiccups! I was pretty proud. At 5:30AM, we figured everything was pretty much in the clear. We did more cleaning up, some more bug testing and phew. Up and running. Sleep. Wake up, things are good. Go to class, get out of class. Boom. Down again. I had a meeting to go to, and Dan said he was taking care of it so I trusted him to get it fixed. Rackspace told us, there really wasn't much they could do, so we put up the landing page again. FAIL. Jeeze I was mad... So now for the past several hours, Dan and I have been implementing memcache and seeing what else we can do to make things more robust and lightweight. I think we're pretty much done, and just have a few small things we need to tweak. But we should be ready to release tonight. By the way, Dan is in NYC tonight at a concert so if sh** hits the wall...I'm all alone. This project has probably taken up literally half of my life this week. But it's been worth it. Through all the good, and bad, and worse, and better, and best, and etc etc, I've learned a lot and know a lot about what to look out for and do next time I strike gold again (which hopefully is very soon).

Jianmin Zhao gets some kudos!

[caption id="attachment_98" align="aligncenter" width="741" caption="source: yahoo movies"] [/caption] Jianmin Zhao, my dad duh, is on the internet! I know he's had several papers published that are also online, but its cool that he's now getting in the credits for movies and even games! He also was on the game credits for Unleash the Force 2, but I can't find the picture. I really respect my Dad for everything he's sacrificed and done for my family, and love him very much. I'm glad he's finally starting to get cool little recognition on the interwebs! Check out the credits for I Am Number Four (w/ Jianmin Zhao!)

Blog got on Wall Street Journal (blog) - so cool!

[caption id="attachment_92" align="aligncenter" width="602" caption="source: blogs.wsj.com"] [/caption] My post on the inspiring words of Jack Abraham got mentioned on Wall Street Journal's blog! So cool. It was posted under their "Must Reads" for the week. I would have to agree - for any entrepreneur/aspiring entrepreneur it is a must read. Hopefully this will drive people to the cool new project Where My Friends Be, but if not this is so awesome.... should I go celebrate now or something?

Very Happy for Ankur Dave's Publication

Just read Ankur Dave's recently published paper. It was 6 pages of complicated cloud computing principles I hardly understand. But it was an awesome read! From what I read I got these key (and not so key takeaways): -MapReduce is cool and all but it doesn't allow for iterative computations -k-means algorithms allows for iterative stuff and is well known and robust. -the "Buddy System" fails if two buddies both fail so no failure is reported. Otherwise buddies will pick up each others slack. - something about I/O - Lots of things about cloud clustering. - There is a guy named W. Zhao that did cool enough research to be noticed by Ankur. Even though I didn't understand most of every word I wrote I am very happy and proud of Ankur Dave (who is only a freshman) to have been published already with an obviously very academic paper! And not only has he been published, but check out his mention on Quora by THE Marc Bodnick: New Users He Discovered . I applaud him and am thankful to know him. Will linkify this post later to help Ankur's SEO :). Until then I must sleep. Ankur probably didn't expect me to read his paper all the way through but I did! The full paper: CloudClustering: Toward an iterative data processing pattern on the cloud [PDF]

Early Morning Crisis Averted

Alright. Here's basically what happened. We finished the product at around 6:30am. At about 7am I headed to bed. At 7:30am I got a frantic call from Dan telling me that nothing was working. It turned out that somehow Facebook had deleted our app from the Developers thing and we had lost the ability to use the API key and secret. We had to quickly create a new app as fast as possible and rewrite some configuration files on the site to make it all work. It was up and running again by 7:45 and so it was fine. We ended up getting 8 upvotes fr Hacker News and got as high as 20th position on the first page! We also got a couple hits from StumbleUpon and some upvotes on Reedit. Things are going well but not as good as hoped. The issues in the launch, I feel, were a big inhibitor in maintaining first page position on hacker news which would have been golden. Instead bugs caused chaos again. Every time we tighten up security and bug control but there's always something that slips by. So we'll just keep getting better with experience. Or release it at a time when we'll be awake to make changes during crucial moments...