(org.mongodb.mogod) Exited with exit code: 100

For some reason, I couldn’t run mongo shell and the console was overrun by the same error message like the following.

8/1/11 6:49:15 PM com.apple.launchd[1] (org.mongodb.mongod) Throttling respawn: Will start in 10 seconds
8/1/11 6:49:25 PM com.apple.launchd[1] (org.mongodb.mongod[394]) Exited with exit code: 100
8/1/11 6:49:15 PM com.apple.launchd[1] (org.mongodb.mongod) Throttling respawn: Will start in 10 seconds
8/1/11 6:49:25 PM com.apple.launchd[1] (org.mongodb.mongod[394]) Exited with exit code: 100

And searching on Google didn’t turn up any interesting results.

IT PAYS TO LOOK AT YOUR LOG FILE! Well, this shouldn’t be new, but it somehow skipped my mind until I saw the config file.

In the log file was the following helpful error message.

**************
old lock file: /usr/local/mongodb_data/mongod.lock.  probably means unclean shutdown
recommend removing file and running --repair
see: http://dochub.mongodb.org/core/repair for more information
*************

Mon Aug  1 18:49:35 [initandlisten] exception in initAndListen std::exception: old lock file, terminatingMon Aug  1 18:49:35 dbexit:
Mon Aug  1 18:49:35 [initandlisten] shutdown: going to close listening sockets...
Mon Aug  1 18:49:35 [initandlisten] shutdown: going to flush diaglog...
Mon Aug  1 18:49:35 [initandlisten] shutdown: going to close sockets...
Mon Aug  1 18:49:35 [initandlisten] shutdown: waiting for fs preallocator...
Mon Aug  1 18:49:35 [initandlisten] shutdown: closing all files...
Mon Aug  1 18:49:35 closeAllFiles() finished
Mon Aug  1 18:49:35 dbexit: really exiting now
Well, after deleting the lock file, everything was back to normal.

When in doubt, always look in your log file!

Post to Twitter

Relevance in current Internet

I just finished reading TechCrunch article, How Facebook Can Put Google Out of Business. This also reminded me of Paul Adam’s articles, The Real Life Social Network and How Your Customers’ Social Circles Influence What They Buy, What They Do and Where They Go. And also this good analogy of Facebook, Google and other hot startups.

I was also asked a lot of questions about problem of current social media and how I could make it better as part of interview questions. One common answer I provide is the relevance. How important are these news, status updates, tweets, etc. to me? I agree that the biggest difference between Facebook and Google is the core of each company – people (social) or links (web pages).

Many companies are trying to figure out who you are as a person. For example, another favorite startup of mine, Hunch, is trying to figure out who you are and what you would like based on what you already like. Netflix tries to figure out what movies you might like based on your ratings of movies. Amazon has been doing it for a while with features like “you might also like…” Facebook is obviously in good position because of the social interaction data they have – what you shared, who you have interacted with, what you liked, etc. in addition to social graph. Twitter can also certainly figure out by analyzing followers, tweets and especially retweets, but right now I feel that noise-to-signal ratio on Twitter is too high. You control tweet relevance by carefully choosing who you follow.

We are bound to create more data. The amount of data we generate will never decrease. In the sea of data, it would be harder and harder to find information that is relevant to you, but to others. In this sense, Facebook is definitely sitting on a gold mine. It’s kind of creepy, but the more interactions you have on Facebook, the more Facebook knows you, and it provides good targeting data to advertisers. Can Google build significant social product? Nothing is impossible, but I think it would be very hard. Facebook is just too big, and I just don’t see why I would use similar feature on another platform. Once you have your social network established on one platform, it is extremely hard to create the similar network on a different platform. In social network, the winner takes all, unless the winner screws up big time. It could happen (as has happened a couple of times already with Friendster and MySpace).

We are living in an interesting time, indeed.

Post to Twitter

Lean Startup in Education (Hacking for Education)

Today I have had the most productive conversation with my wife (which is shame because I think she has a lot of good insights and look at things from different view points). It was inside the car, while we were driving to Lawrence Hall of Science, which is an awesome place all around.

I had to leave my most current job abruptly, and knowing the reasons behind it, she asked me what’s the most important element angel investors look before making an investment. It was an easy question to answer – the team, of course. And she wholeheartedly agreed. She said she experienced exactly the same at her Korean school, where she teaches grade school kids, and at Korean American Community Center, where she worked before working at the Korean school.

The Korean school she teaches at is part of a church (I am an atheist, but I welcome all religions), and thus their curriculum is not directed or regulated by school district. She said she and a few other teachers like to try new ways of teaching kids. Their attitudes were just like those of tech startup founders. Failure is okay, since you will learn more from failures and apply it to the next new idea. However, she said there were other teachers who are very resistant to trying new things even if they are not the ones implementing or preparing the experiment. Not only do they waste time, they also put out the passion brought on my good teachers. So, she understood how important the team is. Not everyone in the team needs to be super smart, but it’s important for the team to be open to experiments, not be afraid of failures and support each other.

She said she saw the same thing at the Korean American Community Service. She worked there as an office manager until our first child was born. The community center reached the peak while she was there, because she said everyone was open to trying new things – services or classes or whatever – to serve the community better. And most of all, they had the full support from the head of the community center. She also said amazing thing about leadership. Good leadership is not about leading, but creating an environment for team members to innovate. You shouldn’t try to make everyone follow your views, thoughts or directions, but instead give team members freedom to experiment, learn from successes/failures and move  forward. I was like DANG! That’s the most insightful thing I heard from my wife (again, I should have more conversations with her) . :)

I told her that’s the exact operating principal for tech startups these days. I couldn’t believe we were in such unison! And it got me thinking about our education system.  Many people are concerned about our failing education system, and WE HAD THE ANSWER ALL ALONG! Apply “Lean Startup” principal to our education. Encourage teachers to take 20% of their time to innovate. It’s not possible without school district’s support, but if there is, it’s totally doable. And have Lighting Talk or Lesson Learned sessions with other teachers so that they could learn from others’ successes or failures. And pivot if an idea didn’t work out. Or perhaps we need an national website for teachers to share their experiments and lessons learned from them. I truly believe this HACKING FOR EDUCATION will save us, and put our great nation again in leading position.

Post to Twitter

Silicon Valley Bubble

I went back home to the East Coast, Washington DC suburb, this past holiday season. I also went up to see my friends and cousins in NJ and NY. Having the first meaningful conversation with my friends and relatives in about two years made me realize one thing about Silicon Valley.

We (those of us living in the SF Bay Area) are living in a bubble. I am not talking about startup/options/hype kind of bubble, but a tech bubble. I was the one most knowledgeable about up-to-date information of facebook and its eco-system with apps and social games, twitter, google, etc. None of my friends and relatives seem to know nor even care about such information.

It’s just amazing and unbelievable when you think about such high concentration of technical knowledge, talent and money in one geographical area.

Post to Twitter

Kitchen Nightmares and Entrepreneurship

I am a big fan of Hulu. Ever since I found Hulu, I don’t watch much of TV. This is clearly new way of watching TV shows.It’s very convenient, and I get to watch whatever I want (as long as episodes are available) and whenever I want. Since I don’t have much time to watch during the weekday nights, I tend to “binge” watch on weekend nights.

I have recently discovered a very interesting show called “Kitchen Nightmares“, and while it’s entertaining and a little formulaic, I drew a lot of parallels with entrepreneurship.

Passion

It was amazing to see how many co-owners didn’t have passion for their restaurants! It was very clear some owners were using it for their ego trip, even though it was failing. You need that fire in the belly, which enables you to take charge of chaotic situation and plow through.

Passion was something a lot of investors and entrepreneurs talk about (also in the book called “Monk and the Riddle“). An entrepreneur without passion is an oxymoron. If investors see the lack of passion, it’s the fastest way to getting turned down.

Leadership

Oh, man, did it matter! I have never seen inside of a kitchen during dinner rush, but it was definitely chaotic. If there is no clear leadership, everything falls apart. Bad restaurants were plagued with inconsistent food, confusion in the kitchen and among wait staff, and angry customers who had to wait for a long time for their food to arrive or whose food wasn’t exactly top quality. It also turned out that whoever took charge happened to be one with hottest passion, most fire in the belly. And it shows.

Also in entrepreneurship, especially in hard times, leadership matters the most. Someone with hottest passion may not be the best leader, but that person will at least carry the company through especially in hard times. Continue reading

Post to Twitter

Full text search on Heroku

If you want to have full text search capability on Heroku, you should definitely use texticle or acts_as_tsearch. It is possible to use acts_as_farret on Heroku, but since you can only write to /tmp directory and your index file will be deleted sooner or later, you should not use it.

I first used texticle, and later switched over to acts_as_tsearch because I wasn’t happy with performance. Acts_as_tsearch is working really fine for me, and since your database on Heroku is already Postgres, there should be minimal configuration required. I even switched my local database from MySQL to Postgres to make both development and production environments consistent.

Post to Twitter

My answer to text-dynamo

As an exercise to practice Ruby, you can try to compete a random text generator using an underlying Markov chain model. The codes in the following github account are incomplete. You are supposed to fill in or create methods that will create randomly generated texts given seed texts.

http://github.com/eandrejko/text-dynamo

Markov chain is like a state machine, but the key is the what causes state transition only depends on the current state. In this case, how do you determine probability of selecting which word next? It’s quite simple. You go through the seed text and count frequency of next words, and that determines the frequency. For example, “am” is likely to folllow “I” most frequently. Next might be “do” or other verbs.

Continue reading

Post to Twitter