Wednesday, November 21, 2012

Memeja Loop

For the past three days at Memeja, we've been working to 3/4am in the morning, refining the tutorial system and the design. It's startup time, all the time.

Talking to people at Berkeley, a majority of students mentioned how natural it is for them to integrate with Facebook: they need Facebook login and be able to invite friends with Facebook.

We originally wanted to base the registration system on emails, but with the privacy of albums, it's a tricky problem. For instance, if User A chose to register with email rather than FB and invites User B via email. User B hits the landing page and chooses to register with FB instead of email. Now we have a problem because we don't know how to link User A (email) and User B (FB) together -- there simply is no link between them unless User B's FB email matches the email User A typed in, which is a risky assumption.

Because of similar situations, we opted for Facebook login and invitation. Now when you register with Facebook, you land on a happy tutorial:

Which takes you to a hands-on tutorial.

After dragging a few tutorial memes into your album, we ask you to invite your friend -- otherwise there simply is not much immediate value. Another reason we immediately ask users to invite is because we found that users who used our system were struggling to already invite their friend to the system.

As this is more of another hypotheses, we're eager to see what people think of our system.

Saturday, November 17, 2012

Reversed Object has no len()

This was a fairly annoying problem:

To show our images in a reversed order (with the newest at the top), in views I wrote:

images = reversed(list.image_set.all())

This created a problem when you're trying to use len(). I was trying to find the length of the queryset to implement a Facebook-like infinite scroll.

We solved it by creating a QuerySet that reversed the order before outputting:

images = list.image_set.all().order_by('-id')

Hope this helps anybody who had the same problem

Friday, November 16, 2012

The Next Step

For the past week, we've switched from coding to startup tasks:  talking to users and understanding our market.

We learned the following from talking to real users who test-drove our different prototypes:

  1. We know from Prototype 1 & 2 (the flash generator and that users like to create image-captioned memes about friends and browse memes. They're personal and funny!
  2. We know from Prototype 1 & 2 that Memeja virally spread via FB posts BUT that people wanted a level of privacy/social circle (old Memeja was too public)
  3. We know from Prototype 3 that invitation is difficult with email invitations. Users kept saying that Facebook was more natural. In our tutorial, many users simply skipped the Invitation step. But in Prototype 2, we saw that people had no problem 'tagging' their friends (which would post the meme to FB). 
  4. We know from Prototype 3 that without meme-browsing, it was difficult to get the ball rolling. We had a handful of early adopters but without public viewing like Prototype 2, it was difficult to foster community.
  5. We know from Prototype 4 ( a site that tested whether people liked viewing rage comics), people love rage comics as a medium. We also learned that people highly disliked current rage comic creation platforms because of poor UI/UX (this is a pain point I felt too).
Max and I sat down at Starbucks today and hashed out the next step. We thought through our own pain sharing stories and how to better surface content to share with friends.

We will create and test the following with users:
  1. Instead of email, Facebook integration. It seems so many other startups only have Facebook Connect now, but I am skeptical. From a user perspective, FB connect should be a complement not standalone. Practically speaking, people will invite their friends via Facebook -- we're confident this will increase the virality of the product.
  2. We are going to introduce a feed specific to the school (so for e.g., memes only for Dartmouth). When a user logs in, we automatically subscribe them to a feed. We're testing how much users would like following different feeds (like sub-reddits for memes). Yes, this has been done to a small extent with Facebook College Groups, but it's only the start. If you like the meme, you can drag the meme into album. This makes it easier for users to surface and share content. 
  3. Upon registering, users must start an album by inviting a friend into it. This could have adverse effects but since the product itself is about sharing experiences -- it seems only logical to us that the first step is to invite your friend into an album. We're testing to see how high the bounce rate is for this.
  4. Recreation of experience: we've been asking users about this for a long time. People seem excited about it but it's really the execution that matters here. This is what will differentiate our albums from simple Facebook messaging. 
We're excited to see what users think about this new model. We will finish it by Monday so we can go out and ask on Mon/Tues/Wed. More importantly, we're excited to start creating memes about Dartmouth and finally being able to share experiences better with our friends.

Thursday, November 15, 2012

Iteration Part 2

Flying back from Dartmouth, I've been thinking deeply about the creation question.

On one hand, it seems reasonable to say: "If people love rage comics so much, as evidenced by our prototype, why aren't more people creating?" Max asked people this exact question: 

"Would you create a rage comic?"
That sounds reasonable. But I've realized that because users view rage comics and memes as simple entertainment, the frame of the question is more like:

"Would you create a rage comic for fun in your leisure?"
The distinction is that under this context, it's doubtful if people would go out of their way and create (Max found that the people who did create hated the creation platforms, by the way). This idea of entertainment was reflected in our users' language: "I would use it to procrastinate" or "I would create if I'm bored"

So for Memeja, I think a better question is:

"Can we frame rage comics in another context where people are more willing to create?"
Put another way, how can we deepen interactions between people using the concept of memes? How can we add value to people's lives THROUGH the medium of memes SO that they will create naturally. We know people love viewing memes already.

This turns out to be the problem we are trying to solve!  It is the point of all our iterations. When I think of what such a frame could be, a deeper question emerges:

What does the form of visual communication allow us to do that other social networks can't with words? 
Whatever the answer, we should head in that direction because that differentiates us most effectively. The answer, in my opinion, is quick recreation of experiences.

Monday, November 12, 2012

Memeja Iteration

In the past week, we've found that people really love viewing rage comics. Bounce rate for new visitors is quite low (~10-20% - we think the variance is influenced by the quality of the front-page stories).

We're following up with a second, fascinating question: if people love viewing rage comics, why aren't people creating more of them? We realize that viewing always surpasses creation but it's rational to wonder why this hasn't been done before.


So like good entrepreneurs, we are going out to engage our users and ask them for their opinions why. We've learned in the past that what users say about themselves does not exactly coincide with what they do. But this still provides us a cursory understanding of user mentality.

Berkeley was on Veteran's Day holiday, but we thought we could still catch a number of students and continue to market. What we found is that 7 out of 11 students had seen rage comics before. 6 out of 7 had never tried to create. It's a small sample size but already interesting to think about. We know that rage comic creation is degrees more difficult to create than macromemes -- but is it the difficult mechanics of creation or the difficulty of imagining a story?

Max: I asked [a student] his thoughts on the current editor and said it was okay, I asked him if he would likely make more if there were an easier editor and he said "maybe, it's more about having a story I think is good enough to share than the process of making it"

So if that's the barrier to creating rage comics, we have a host of interesting ideas to pursue: perhaps by creating a social context, people will be able to create stories more easily. In other words, as with the original Memeja idea, if we have an 'album' together that already represents an experience, that makes it easier for people to think of stories within that experience context.


The second experiment we're conducting is based on the idea that people already know what rage comics are. We printed a different flyer that had a funny Berkeley rage comic on it. Essentially, we're split-testing the different flyers to see which has a better ROI.

It'll be interesting to see if more users come because of the rage comic flyer. If so, that may say something else again about how much people like rage comics.

Saturday, November 10, 2012

Memeja Hypothesis Analysis

Over the past three days, we've taken a break from coding to focus on what our users want through marketing. Our site was a means to an end: figure out what users want and incrementally iterate towards it.

Through our experiments, we've found that for new visitors, the bounce rate is LOW. In other words, these new visitors are spending more than 45 seconds on the site. While it could be the case that they absent-mindedly left the tab open while surfing other things, I've watched about 20-30 real-time analytics to see that users slowly trickle from the first page to the second to the third (this can be seen in GA too).

This is great because the behavior suggests that users enjoy reading rage comics. We've always suspected that people enjoy reading rage comics, but the question was to what degree. Apparently a lot! Roughly more than a third of the unique new visitors came back to check for new content (marked as returning visitors).

So the question becomes: why aren't more people creating rage comics? People do enjoy viewing them. Is it simply a case of timing where because the medium hasn't attained a critical mass of popularity to breach the mainstream? Or is it the fact that the blank canvas is intimidating and people generally lack story ideas?

Luckily, we know a few things now: in the rage comic space, the biggest pain point for users is creation -- there just is no de-facto solution that works seamlessly. This is something that Max and I felt when creating too. I mentioned this in another post: it seems that Reddit users that popularize rage comics in f7u12 do so out of a hobby, not as a seamless mode of communication.

In any case, whether we pivot to become the de-facto site for college experiences/rage comics, a better rage creator is a must.

Our next steps are to see student awareness of rage comics and to gather info as to why more people aren't creating. If it's a problem of easiness, then a well-thought technical and UI/UX design solution will be viable. If it's a deeper problem, like a chicken and egg problem (where they need their friends to use it and popularize it first), we'll need to put the better creation tool in the hands of powerful early adopters and power users.

Next week, we'll be asking these questions and iterating ever closer to what people want.

Memeja Hypothesis Results Day 2

If I could, I would stay in to code all day long. But if we did that, we would fail. I've learned that a startup is not about coding up some brilliant idea but instead about creating small experiments and talking with users. At the end of the day, the users are the ones who determine your success.

We woke up at 6am to commute to Berkeley and market. Our strategy: post flyers before students came to class. Then, in class, students would presumably be bored and in a position where checking out our site would be easy.

We ran out of flyers around 9am, but I'm confident that if we continued to 4 or 5pm, the response would have been tremendous. For 3 hours worth of marketing,

about 40 people visited the site with a bounce rate of ~21%.

From Nov 7th to Nov 10th, we got about 88 unique new visitors and 33 unique returning visitors. The average visit duration is about 5min 30s for new visitors and 11m 18s for returning visitors. Those metrics are likely underestimated though due to Google Analytics' treatment of diff stamps. For example, a user who views the first page for 5 min and leaves would not be averaged in.

For bounce rate, 26% for new visitors and 40% for returning visitors. Probably due to the fact that these returning visitors are checking the site to see if any new rage comics are up.

Thursday, November 8, 2012

Memeja Hypothesis Results Day 1

Day 1 Analytics

Day 1 has been a big success.

By success, I mean that we are on our way to validating the hypothesis.

We spent 11am-5pm spreading word of our MVP (that we created ~1 day ago) on campus.  We supplemented word-of-mouth with guerrilla marketing on campus: posting flyers in bathrooms and doors, tracking analytics in real-time with a hotspot.

Bathroom marketing worked surprisingly well. Makes sense: by putting flyers right above urinals, we have their captive attention. We also focused on putting flyers on seats before class, hoping that bored students would curiously log onto our website.

From the graph, you can see that around 1pm traffic started to pick up (10-20 uniques every hour). Around the time when we marketed in classes. My guess is that bored students started logging on.

What's awesome is that the bounce rate is so low. In the beginning portions of the graph from 12pm-6pm on Wednesday, we hadn't adjusted the bounce rate so it marked 100% bounce rate for visitors who just visited the one page (remember, Google Analytics doesn't have the diffs).

But started at 1pm today, the bounce rate has kept under 20% for the most part. Even though we don't have tons of visitors, the ones who are coming stick around. That's important because we want to build products that users want.

It's also satisfying to track users in real-time slowly reading through the pages. You can see this in Top Active Pages in GA:

Tomorrow will be the defining day of this hypothesis. But so far, it's looking great. We'll probably set up a booth on campus to ask people WHY they like to read them. Then follow-up with our other hypotheses...

Memeja Analytics Engine

Today, we spent all day setting a new MVP to test our hypothesis.

The key is to make it easy for people to engage with the site by reading the memes/rage comics on one page. This runs into a problem with Google Analytics, though, as it uses two different timestamps for a time diff (and records that as your Avg Time).

Even worse, GA counts someone who just views one page as a bounce because the user hasn't seen a pageview. Usually, this wouldn't be so bad, but for our one-pager site, it's a problem.

Javascript hacking to the rescue...

First, to adjust the bounce rate to exclude any user visit above x time:

setTimeout('_gaq.push(['_trackEvent', 'NotABounce', 'Over 45 seconds']), 45000);

We believe 45 seconds is enough to engage with at least a few comics. It's conservative but anything less means that the user might simply be curious but doesn't want to actually engage with rage comics.

As usual, returning visitors is the best sign. They know the website is already there and want to check back.

Next, we wanted to more precisely find out how much time a user would be spending on our site. This requires long polling to tell GA at different intervals. Knowing the adjusted bounce rate is nice, but knowing how much time the user is spending looking at these comics is even better.

Adding this portion of the code...

(function (timer) {
  window.setInterval(function () {
    timer = (function (t) {
      return t[0] == 50 ? (parseInt(t[1]) + 1) + ':00' : (t[1] || '0') + ':' + (parseInt(t[0]) + 10);
    window.pageTracker ? pageTracker._trackEvent('Track', 'Check', tos) : _gaq.push(['_trackEvent', 'Track', 'Check', timer]);
  }, 10000);

This piece of Javascript will help us log the time spent for each user on one page. Although it will slow down the site (a little bit), we're wary of reaching out limit with GA. Still, it should serve us well.


Ultimately, what we want to know is how people react to rage comics. Do they like to read them if they're more personal? If so, then we have a host of other interesting questions to ask: Would they create them if creation was made easy? Would they create them for friends to read?

Tuesday, November 6, 2012

Testing More Hypotheses

After demoing yesterday, the upshot was that it is difficult for people to view memes as a form of visual  communication (as seen in the previous post).

While we believe that rage comics are like visual tweets (fast transmission of an experience), yesterday's experience told us that we need to more concretely validate that our solution can fully solve a problem. So we started back at step 1 again to validate our hypotheses by talking to users from the ground up.


Our premise is this: sharing stories, a fundamental human desire, is actually difficult. Telling it in words is difficult because language is limited and lacks contextualization. You've seen this: when someone tries to tell you a story but ends up fumbling around with the words, what do they say? "You just had to be there."

From our previous prototypes, we can see that other people share this problem.

So the question is: how are people sharing stories now? Can we use rage comics as a better way for people to share personal experiences?

My hypothesis is that people usually simply wait to see someone to tell them a story. Or if that's not possible, they would try to call them. These are the best ways of explaining stories, in my opinion. Then: IM Chat, emailing/Facebook messaging.

Online solutions include emailing/Facebook messaging a narrative. But anything that includes typing up a story is already a non-starter because it is difficult and time-consuming. Instant messaging is the exception because of real-time feedback that could clarify certain areas of the story.

In the cases of verbalizing a story through a call or in-person, online solutions still may be better. Like the rise of text-messaging, it's more convenient to communicate something without requiring the other person's availability. Also the advantage of premeditating a message is a big plus.


Researching online and talking to users, we know that most people don't read rage comics because they simply aren't funny. This is fair: not everyone shares the same type of humor, especially when an experience is irrelevant to you.

What we want to know is whether people would read rage comics more if it IS personally relevant to their social circle and their lives. Put another way, would Berkeley students read rage comics way more if all the stories related to UC Berkeley? We think so.

Testing Hypotheses Pt 2

Researching online and talking to users, we know that most people don't read rage comics because they simply aren't funny. This is fair: not everyone shares the same type of humor, especially when an experience is irrelevant to you.

What we want to know is whether people would read rage comics more if it IS personally relevant to their social circle and their lives. Put another way, would Berkeley students read rage comics way more if all the stories related to UC Berkeley? We think so.

But we've also learned that what people say and what they actually do are two separate things.

The Plan

  1. Set up a quick subdomain ( that has rage comics created specifically about UC Berkeley stories.  We'll host an upload button for any users that want to contribute their own creation.
  2. Hand out mass flyers and market this subdomain all of Wednesday and Thursday. 
  3. Watch for activity via analytics. Most importantly, how many returning users will we get? How long are they spending time on the site? This signifies that a user knows that the site exists and wants to see it again. (A first-time visit doesn't mean much unless a user spends lots of time on the site.)

Plan as mapped out on our whiteboard:

From there, we can validate whether or not people appreciate rage comics as a quick way of communicating experiences. Then shift our current platform specifically towards rage comics (like we had originally intended).

Monday, November 5, 2012

Another Demo at Berkeley

We showed a new prototype today at Berkeley with a built-in tutorial upon registration. Learned a lot. Even met a Dartmouth '96 / UCSD professor who gave us advice to better our pitch.

We talked to about 30 people today and noticed that the value proposition is still unclear. We showed the albums feature (dragging memes you like to privately shared albums), walked them through the tutorial, and certain problems became immediately apparent:

The tutorial seems to communicate that we are still all about entertainment.  The albums led people to pigeonhole Memeja as a fast way to share memes (and create them with the Pull Facebook photo of the generator). Interestingly, people still liked the concept of sharing privately, but our goal is for Memeja to be more than that. What we need to make clear is that Memeja is not only a faster way of sharing memes people love, but that it is a better way of sharing experiences than the current alternative (of writing a long letter or email).

Because we already know that currently alternatives to sharing stories are difficult and time-consuming (typing up a story via email or Facebook message).

When we didn't explain what we were all about, people believed that memes != experiences. And that memes == entertainment. Many Berkeley students characterized Memeja as a site they would go to waste time or distract them from studying. Working with the term "Internet meme" is already an uphill battle because of the associated stigma.

The key, then, is to differentiate Memeja as more than an entertainment site.

Furthermore, I hypothesize that these problems stem from the fundamental construct of our tutorial, which features personal UC Berkeley visual captioned memes. These memes create quick laughs but looking back, they are superficial. They convey no deeper experience that people can relate to.

Another big problem is that when people finish registering, there isn't any content to interact with. Put another way, Memeja only adds value to people's lives when they proactively create an album or a meme. This paradigm is different from other sites, like Quora or Facebook, where value is immediately added when a user registers because of already existing content.  Privacy necessitates limited content but an interesting idea is to integrate both: public memes within the context of a larger private group.

The biggest feeling I took away from today is that while we haven't yet found our product-market fit, we are inching closer and closer to a broader understanding of the market/space. We are flexible enough to keep iterating and changing our ideas based on feedback.

Fight. Persist with all determination.

Saturday, November 3, 2012

Today, we get to work on our startup

There is this great scene in The Rookie (2002), where Jim Morris, the protagonist hits a low point in his baseball career. He's right about to quit, calls his wife and says he's coming home. He's not sure why he's even playing competitive baseball, but he feels he's not made for it. When he remembers why he loves the game.

Next morning,  he's smiling, finds his best friend on the team and says, "Today, we get to play baseball!"

That's how I feel every morning when I wake up. Sometimes, I'm exhausted and tempted to sleep in. But, I find that the bigger 'yes' burning inside is what drives me throughout the day. "Today, we get to work on our startup!"

It's about finding the joy inside of what you're doing and the passion of building what people want to use. We're not in it for a quick exit (those never seem to work out anyway). Because the more and mopre I talk to people about the way they share experiences online, the more I realize that Memeja has so much potential.

Shoutout to Ali, Rachel and Erin who we met last night at a piano warming party. They had made memes of their friends but didn't want to share it all over the Internet. So they were texting it back and forth to each other, saying "you wouldn't really understand the meme because you don't know him." They were also concerned of making memes of friends for fear of being made memes themselves (for all the Internet to see!).

It's always interesting to hear people encounter the same problems that drive you to work on your startup. For them, today, I get to work on my startup.

Thursday, November 1, 2012

How to get people to try your demo

Today, Max and I went out to Berkeley to talk to Memeja users and hear their opinions on various things, including: album concepts, recreating experiences and privacy.

The conversation usually goes like this:

"Hi, we're launching a startup. Would you take a minute or two to check out our demo and tell us what you think?"

Important things: 

  1. Always have a smile on your face! I find that people are much more likely to engage if you seem like a happy, well-adjusted individual.
  2. Time constraint: What's interesting is that you can see people's thoughts and opinions on their faces even before they say anything. I've noticed that creating a time constraint (like a minute) is just enough to get your foot in the door. Even if the demo doesn't actually last a minute, people tend to be much more engrossed once they're playing around with a live demo.
"This is our working prototype. It just has functionality -- it's basically a shitty safe mode. So go ahead and play around with it and tell us what you think. Don't hold back! We have wills of steel."

Humor is great for reducing social pressure (especially when you have two people around a table listening to you). We don't want them to feel pressured because we want them to speak their mind! 

It also makes the experiments funner for us too!

"Imagine you're with a friend when you see something crazy happen. Like....  a hobo rob a kabab stand (which is totally possible). Now you want to share it with your friend because only he knows what you're talking about"

At this point, we'd either ask them about how they would share an experience (to see if there is a problem)... and try not to lead them on. We want honest opinions and feedback. Or we'd just take them through the demo by creating an album and adding different memes into them, explaining the concept.

It's especially important to keep checking if he/she understands what you're explaining.

We've noticed that people tend to continue along even if they don't fully understand the concept. Perhaps shyness or social courtesy discourages them.


Insights today:

Everybody knew what a meme was! And everybody knew what a rage comic was (if they didn't, we showed them an example and they recognized it)

People really love the album concept but don't seem to fully grasp actually recreating experiences.

A small number of people commented on how they would simply use Facebook message or create it on Reddit and then send the link over. I'm curious why so I will be following up on them.

We found it helpful to explain Memeja as a Google Docs for experiences.

Almost everyone said they knew a friend who would love the site, even if they wouldn't use it themselves.

Everyone said they would click through an invitation link if it was from a personal friend (we have that by passing the full name as context in Python).

Many people commented on  how they liked how the memes were all in one place.

For the people who didn't make memes, they didn't see themselves as creative enough.

BUT many people WOULD share existing memes they found funny with friends in albums (like a private Pinterest). It might be interesting to create a prototype Javascript extension that allows people to interface with Memeja.

Many people wanted to see a mobile app that complements the webapp. We are already making plans for this.

For the people who really liked Memeja, they understood that it was a better way of sharing experiences with everything integrated.

Tuesday, October 30, 2012

Speaking concisely

One of the most valuable qualities anyone can have is speaking concisely. You don't just communicate more efficiently; you also manage to add more content into the conversation. More content: more gets discussed: more gets done.

Whenever we demo our product, we try to be as concise as possible, especially in the first few sentences when describing our product.

That said, articulating your vision has definitely worked well for us when approaching Berkeley and Stanford students. It helps them with the bigger picture of where we're going and what we're trying to accomplish. But when it comes down to functionality concepts, it's better to be concise.

Like this post.

Sunday, October 28, 2012

The Mission with Memes

Whenever I explain Memeja to peers at Dartmouth, I invariably get the question: "Why are you doing this?"

In other words, what is the endgame for Memeja?

It's interesting to think about because even with all of our different pivots (accompanied by many late-night whiteboarding sessions), the fundamental vision has always been the same. That vision is to change the face of communication using memes.

In a way, using memes to share experiences is simply an iteration of a pre-existing form of communication: images. Thus, "an image is worth a thousand words". But by adding the element of memetics to seamlessly pass trains of thought between people, we significantly expedite response times. Not only that, we enhance understanding by sharing context.

That sounds abstract. Put another way, if I share an experience with you in a form of a meme (rage comic, specifically), I am establishing a social context. The comic says: here are the events, happening linearly. Naturally, reading it, I must have some reaction -- even not reacting is a reaction.

So how can I communicate my reaction to you in the fastest possible way online?

I could use an emoticon. But that doesn't say much. What if I wanted to share a story that relates to your story?

By taking your meme and pinging back with my own meme, I can respond with a story quickly. Or if I have my own perspective on the story, I could take elements and ideas from your story and replicate them in mine, like a meme.

This transmission of context and thought is what makes memes like visual tweets. 

We believe that memes are visual forms of communication that can help people mutually understand each other better than other mediums for sharing experiences.

Also, we just love building things people want to use.

Saturday, October 27, 2012


I see people in vectors. 

Because our perspectives are restricted by the third dimension, individuals always seem relatively static to us. But, from a bigger picture POV, we intuitively understand that individuals cannot be static -- we are constantly changing, shifting and adapting to life experiences. We are but sums of our own decision-making. Similarly, each has a certain direction and magnitude. Our intrinsic principles and values drive our direction like a compass. Having no principles is a direction too (although a scattered one). They mold what we aspire towards, how we live and how we treat others. The magnitude is determined by our management decisions. The deeper we explore something and commit towards that direction, the deeper we entrench our own lives around that space.

Other people can influence these factors too. Long-term relationship are interesting vectors. As both individuals grow, their inner principles may diverge according to life experiences, leading to relationship discontent ("but we were so good together in the past!"). Or couples may start with differing fundamental principles but slowly converge as they spend time together (like the bad boy turned good by pure empathy).

To this end, I seek to define my principles first and foremost so that as I invest in whatever I do, I can trust that my decisions follow deeply meditated principles. Because even with the greatest magnitude, without direction, I am lost. In fact, most of my past mistakes are representations of an incorrect trajectory.

Wednesday, October 10, 2012

Git and Amazon EC2

At Memeja, we're running on Amazon EC2 linux servers.

As we want to launch and iterate quickly, our top concern was committing, merging and deploying quickly.

The optimal setup would be to

  • make a change
  • quickly commit, push to the repo and then push to the server in one go
  • restart the server to apply changes

First, we set up a quick way to ssh into Amazon EC2 in a shell script. Saves repetitive typing and time.

 ssh -v -i ~/key.pem amazon-ip-address

Next, we're going to set up a post-receive hook so that repo pushes also update the server. But to do that with Amazon EC2, we must add provide a valid .pem file. This goes into the shell script every time we go ahead and push.

 ssh-add ~/Dropbox/Memeja/server/memejalaunch.pem  

That does it. Now for the post-receive hook:

We created a new repository on the Amazon EC2 to mirror the local one, changed directory into it and added the post-receive hook.

Then we added a new remote with the ssh and a shell script to automate the committing/pushing:
 mkdir /path/to/memeja  
 cat > hooks/post-receive  
 GIT_WORK_TREE=/path/to/memeja git checkout -f  
 chmod +x hooks/post-receive  
 git remote add web ssh://path/to/repo/on/server.git  
 git push web +master:refs/heads/master  

And to automate deployment...
 # !bin/sh  
 cd ~/memeja  
 git add .  
 echo '...........done.............'  
 echo "Please type commit message"  
 read commit_message  
 git commit -am "$commit_message"  
 echo "Pushing onto repo"  
 git push   
 echo '...........done.............'  
 echo "Pushing onto Amazon EC2 server"  
 git push production  

the $commit_message allows you to enter something on the fly. You can modify the shell script to allow something empty if you want to be really fast.

Then we can ssh and restart the server.

Tuesday, October 9, 2012

Ideomotor Action and Flow

In psychology, the concept of 'ideomotor action' suggests that the more you think about something, the more likely you are to actually do it, a self-fulfilling prophecy. 

For instance, when on a diet, studies show that simply thinking about the food makes you more likely to eat the food. Or when you are typing, if you think about messing up, you increase your chances of screwing up while typing. 

On the flip side, I feel most productive and happiest when I reach a psychological flow -- a state where I become so immersed in my work that everything simply else falls away. The work is challenging enough for me to derive a sense of fulfillment yet also solvable within the limits of my abilities. This state is the opposite of ideomotor action where you are self-consciously evaluating something or aware of what you are doing. It seems to me that most people live for this flow and derive great joy from it: the dedicated student who plays the violin for hours, the bodybuilder who lifts for hours, the programmer who codes late into the night. 

So for me, reaching a state of flow is an immersive experience without self-consciousness. Similar to how I enjoy myself the most in social scenes by being 'in the moment'.

Yet interestingly, what distinguishes humans from all other animals is this exact self-awareness and the ability to abstract oneself in one's mind (thinking about yourself thinking about yourself...). I would argue that a computer can never become self-aware because whatever logic that underlies the computer inherently precludes self-awareness of that logic (I haven't googled this though, so I'd love to hear arguments). Self-awareness empowers us to empathize looking from outside-in at our own actions. Or to analyze situations objectively and make adjustments based on our assessments.

It's curiously strange to me how something so essential to human productivity (the ability to be self-aware and improve oneself) can also handicap us.