Showing posts with label monkeywrite. Show all posts
Showing posts with label monkeywrite. Show all posts

Saturday, April 19, 2014

Monkey Write presentation

When I was a kid, I learned Chinese the old fashion way. Each day we had to practice one character, and fill it in a 10 by 10 grid. It was boring and repetitive. With Monkey Write I want to make it fun to learn to write, and I always had children in mind. However, as a one-woman development shop there were always so many things to do, and I did not get a chance to cater the app to schools.

That is, until I heard from a parent today. Lorie emailed me and let me know that her son really enjoys Monkey Write, and she wondered if it would be possible to have workbooks that align with the syllabus at his Chinese immersion school. This is the birth of the Immersion series in Monkey Write. I have since published multiple workbooks under the Immersion series. Other parents got curious about Monkey Write, so Lorie gave a presentation on it!

This is the most rewarding part of being an independent developer. I get to talk directly with my users, hear their stories, and add features that they care about. Thank you for making my day, Lorie!

Tuesday, January 28, 2014

Monkey Write: Brush strokes

Back when I started Monkey Write at the AT&T hackathon, I was already varying the pen stroke width by the pressure of the touch events. But the pressure ranges change a lot on depending on the device. I was not able to get consistent stroke rendering with all those pressure ranges, so I only vary the stroke width by pressure if I know it is from the active stylus reported via an HTC PenEvent.

I was really excited when I saw the beautiful Markers app. Its pressure-sensitive strokes work on many devices, plus it is open sourced with Apache License 2.0, so all I have to do is to integrate that into Monkey Write. Well, all I have to do is to find time to integrate that into Monkey Write, which I finally did!

PressureCooker

When I first looked into the Markers code I was very amused by the PressureCooker class. What a name! It calibrates the pressure coming from a series of touch events, which is what I need. I lifted that class and put it into Monkey Write, but that alone did not make beautiful strokes. This was where I stopped the first time I looked into Markers, for the rest involves a more complicated co-ordination among the Slate, TiledBitmapCanvas and SpotFilter classes.

Markers architecture

I finally set aside some time to understand how Markers work.

  1. Convert each incoming touch event into a Spot.
  2. Add the Spot to a SpotFilter.
  3. The SpotFilter takes a Plotter in its constructor. After filtering it calls the plot() function of the Plotter.
  4. The Plotter renders the Spot on screen. In Markers this is handled by the inner class MarkersPlotter in Slate, which draws on the TiledBitmapCanvas.

Where is the PressureCooker, you ask? It is used inside the plot() function. Instead of using Spot.pressure directly, it is calibrated by the PressureCooker.

Monkey Write modifications

Here is what I did to incorporate Markers stroke rendering into Monkey Write:

  1. Replace my own class with Spot to store touch events.
  2. Add a TiledBitmapCanvas to the character writing custom view (called SketchPad).
  3. Make SketchPad implement Plotter, which takes a Spot and renders to the TiledBitmapCanvas.
  4. Add a SpotFilter to SketchPad. As touch events are captured by onTouch, pass the Spots to the SpotFilter.
  5. In SketchPad.onDraw(), call TiledBitmapCanvas.drawTo() after rendering the base character to show the pen strokes.
  6. After the user writes a stroke, grade it. If it was not a good stroke, call TiledBitmapCanvas.step(-1) to remove that stroke.

Pen styles

After I set up the basic pressure cooking and spot filtering I started to experiment with different pen styles. This essentially means changing the pen tip, or how to render each touch point aka Spot.

Basic style

The basic style renders the pen tip as a solid circle. Fairly straight forward:

c.drawCircle(x, y, r, mPaint);

Brush style

Markers has an airbrush style, which draws a bitmap as the pen tip. I looked at the bitmap and thought, hey, that's just a RadialGradient! I decided to generate that programmatically so I can vary the alpha value on the fly:

private Shader createBrushShader(
    float width, float alphaStart, float alphaEnd) {
  final float center = width / 2;
  final float radius = Math.max(1, width / 2);
  final int red = Color.red(mPaint.getColor());
  final int green = Color.green(mPaint.getColor());
  final int blue = Color.blue(mPaint.getColor());
  return new RadialGradient(
      center, center, radius,
      Color.argb(alphaStart, red, green, blue),
      Color.argb(alphaEnd, red, green, blue),
      Shader.TileMode.CLAMP);
}
mPaint.setShader(mBrushShader);
c.drawCircle(x, y, r, mPaint);
I update mBrushShader with createBrushShader() whenever the user changes the width or alpha from the UI.

Pencil style

Once I started playing with Shaders I could not stop. I decided to mimic a pencil stroke on a rough paper by plotting little dots at the pen tip.

private Shader createPencilShader(float alpha) {
  final int size = 32;
  int color = Color.rgb(
      Color.red(mPaint.getColor()),
      Color.green(mPaint.getColor()),
      Color.blue(mPaint.getColor()));
  float threshold = alpha / 255f;

  int[] colors = new int[size * size];
  for (int i = 0; i = threshold) ? 0 : color;
  }

  Bitmap bitmap = Bitmap.createBitmap(
      colors, size, size, Bitmap.Config.ARGB_8888);
  return new BitmapShader(
      bitmap, TileMode.REPEAT, TileMode.REPEAT);
}
mPaint.setShader(mPencilShader);
c.drawCircle(x, y, r, mPaint);

I use a BitmapShader to draw the little dots. It is a tiling bitmap, each pixel is either transparent or the chosen color. The lower the alpha value, the more transparent pixels.

Constant width

Finally I want to provide an option for users who don't want variable width. This is achieved by ignoring the pressure from the touch event and supplying a constant value to the pen tip renderer.

Mix and match

With that you can have a lot of fun making different pen styles.

Here is a very transparent blue stroke. Looks like water, doesn't it?

You can pick different styles for different strokes:

Hopefully these beautiful strokes will make it even more fun to practice writing Chinese. Download Monkey Write and try them out!

Friday, May 25, 2012

Monkey Write: Now with pronunciations!

When I showed Monkey Write to new users, 8 out of 10 people would ask me, "why doesn't it pronounce the character?" My philosophy has always been "launch early, launch often", so I put Monkey Write on the market even though it was missing this obvious feature. Not any more - the latest version of Monkey Write includes pronunciations!

I recorded the characters over the weekend:

See the fancy microphone? My friend does voice-over for videos as a hobby, and I spotted the microphone when I went over to his place for board games. I borrowed it for the recording, and the sound was wonderful.

For software, I used Audacity. It was fun to see the sound wave of the characters. Look like tropical fish to me!

I sounded out all the characters in a workbook, usually twice per character, and then exported each character as a separate ogg file. Audacity made that pretty easy, which was a relief, since I always ended up yelling at iMovie whenever I needed to edit videos. A media editing UI that makes sense! Such a pleasure. If you know any one who worked on Audacity, please give them a pat on the shoulder from me.

Monkey Write pronounces the character automatically when you enter this screen. If you want to hear it again, press the sound button on the top right corner. When you are done writing the character, you will hear the character one more time.

The pronunciation-enabled version of Monkey Write is now available on Google Play Store, Amazon Appstore and the NOOK shop. Grab a copy, and let me know what you think. Will be great if you can write a review on the store too!

Wednesday, April 25, 2012

Monkey Write won Grand Prize in Galaxy Note App Challenge!

When Samsung announced the Galaxy Note S Pen App Challenge in February, not one, not two, but five of my friends send me the link to make sure that I enter Monkey Write into the contest. It's such a natural fit that I got to work right away.

Development

I studied the S Pen SDK to see what I can do with it. The core of the API is the CanvasView, which is a canvas that accepts and renders touch events. It comes with a SettingsView to change the pen style. Another interesting feature is the animation mode for replaying the whole stroke sequence.

To minimize code change, I layer the CanvasView on top of my stroke sketching area, and pass all the touch events down for grading purposes. The CanvasView handles all the drawing, which means that I can take advantage of the nice pen styles provided by Samsung. Once the character is finished, I animate all the strokes again, so you can review the stroke sequence and direction before moving to the next character.

These enhancements made Monkey Write quite a bit nicer, but I was hesitant to release them, for the S Pen SDK adds 1MB to my binary, which is quite a lot since the base apk is only 1.9MB. I was not sure if it was a good idea to force everyone to download an extra 1MB that only benefits the Galaxy Note users. Turns out the S Pen SDK is enabled for all Samsung devices, not just the Galaxy Note, so a lot more people ended up using Monkey Write with beautiful pen styles and engaging animation.

Announcement

A few days before the contest winners were announced, I got an email from ChallengePost, asking me to verify my name and my company. I was thinking, hey, looks like I would be on some kind of list, and nobody keeps a losers' list, right? I tried not to think too much about it, but needless to say I was rather excited.

April 23 was announcement day. I was on vacation with my family in Hong Kong, and we went for a short trip to Macau. When I woke up on April 24, I went down to the hotel lobby and checked email on one of the public machines. I was staring at my inbox for quite a long time to make sure I read it right, and yes, Monkey Write won Grand Prize!

Monkey Write has been such an amazing experience for me. Both HTC and AT&T have been really supportive, from hackathon to launch. Users have told me time and again that they really enjoyed the app, some by writing 5-star reviews, others by buying extra workbooks. On top of all that I now have the great honor of being the winner of the Samsung Galaxy Note Contest. This is simply amazing.

Thank you so much for showering Monkey Write with love!

Monday, April 16, 2012

Monkey Write on Kindle and NOOK

Monkey Write works on both phones and tablets, but because it's targeted to children, the user experience on tablet screens is quite a bit better. Amazon Kindle Fire and Barnes and Noble NOOK are both 7-inch Android e-readers, and since reading and writing goes hand in hand, I thought their users will enjoy Monkey Write. They each have their own marketplace, so I needed to resubmit my app.

Kindle Fire

I started the application for both the Kindle and the NOOK around the same time, but the NOOK process was so tedious that the Kindle version went live a few weeks earlier. Amazon Appstore has an approval process, with an average turn around time of a day per submission.

I cut a few corners when I launched the first version of Monkey Write, and the Amazon folks caught them pretty quickly. One shortcut I took was to fix the device orientation: portrait for phones, landscape for tablets. That way I don't have to save state when Android destroys and re-create your activity upon orientation change. That caused my app to have a problem on Kindle Fire. According to the review message, "the ink disappears upon entering and exiting hibernation". I had to file a ticket to understand that hibernation is the lock screen. So it seems like the Kindle Fire, the activity is destroyed and re-created when the screen is locked. Once I found out that problem I just patched the app and resubmitted.

Besides the orientation change, I needed to make another patch. I direct the user to the appropriate marketplace to download workbooks. On the Kindle it goes the Amazon Appstore. Otherwise it goes to Google Play. But I did not consider the situation when the Amazon Appstore is installed on a phone. Amazon stipulates that all downloads go through their appstore even when Google Play is also available, but my code preferred Google Play. The fix was fairly easy, unlike the orientation change fix which took quite some time.

Overall the approval process was pretty good. My only complaint is that I only get notified when my app is approved for the general Amazon Appstore, and it needs a second approval specifically for the Kindle Fire. That's fine, but I don't get notified when the second approval comes along, meaning I have to resort to checking on the website obsessively.

Here is how to verify if your app is approved for the Kindle:

  1. Search for your app. In my case, Monkey Write
  2. Look on the left sidebar. Check the count for "Available on Kindle Fire".
  3. If the count is smaller than expected, click the checkbox to see the subset that is approved for the Kindle Fire.

Barnes and Noble NOOK

Getting into the Amazon Appstore was smooth sailing compared to the NOOK store. I already had quite an adventure when I submitted Puzzle Pal to the NOOK store. I had to go through the whole process again because I wanted to publish Monkey Write under a business account instead of a personal account.

I wanted to launch simultaneously on Google Play and NOOK, so I applied for a business account right before I was publishing to the Google Play store. Well, that got me rejected because they only accept developers who has already published apps in other app stores. Which is a bit silly, given that I have published Puzzle Pal on their own store!

I was really busy preparing the launch, so I just waited until the app was published in Google Play to retry. Second time I was rejected again, with a copy-and-pasted message:

  1. You are a commercial company submitting the request.
  2. You have a US Bank Account and Tax ID.
  3. You have developed a commercial application and/or have deployed an application already to an existing marketplace or application store.
  4. Your company, vision or applications are aligned to a reading centric audience who are using the NOOK Color in the US market.
  5. You are committed to assign the necessary resources and have firm plans to deliver your apps now for NOOK Color.

At this time your submission to us did not have evidence of one or several of the requirements listed above and therefore we regret that we are not able to progress your current request at this time.

We do however encourage you to resubmit based upon this criteria.

To be honest I had no idea what they wanted. I had my bank account number and tax ID ready to go, but there was no where to put it in the approval form. Point 3 was OK since I have already published Monkey Write to Google Play. Now, is a writing app aligned with a reading centric audience? I think so. Am I committed? Oh yeah, but how do I show that?

This is the time when I'm very glad that I already got through the process with Puzzle Pal, because I ended up filing a ticket under my personal account requesting help for my business account to be approved. You see, before you get approved as a developer you don't have access to their ticket system, so you don't really have a recourse. The rep on the other side was really helpful, and approved my business account right away. Phew!

Freemium not allowed

Once I got my account setup I uploaded the main app, plus additional apps for the workbooks. My main app went through the metadata-then-apk approval process uneventfully, but it took 10 days to go live because they only push apps once a week. The metadata for the workbooks all got rejected, though. Essentially they don't allow module downloads, breaking my freemium business model. I filed a ticket to complain. The rep was actually pretty funny. He said he knows I won't like his answer, but they don't allow freemium business model. He even told me that he knows the pain I went through to get a developer account, and he assured me that if I rebundle my app to trial/paid model it will work really well.

And that's what I did. I put all the workbooks into a single app, give it a price tag of $19.99, and put it on the NOOK store: http://www.barnesandnoble.com/w/books/1109941306. I am providing lifetime updates as new workbooks get published, so I thought $19.99 is a pretty good deal. Very happy to know that the NOOK users agree with me, because a few of them have bought Monkey Write already!

In the end I am glad that the NOOK store forced me to try a different business model. Their trial mode is pretty nice: users get to keep their score while they update, which is a much smoother experience than the Google Play Store, where you need a different package name. For Monkey Write, I provide a "upgrade" button on the bookshelf:

Comparison

The Amazon Appstore is much more mature than the NOOK store, and the approval process is much smoother. The flip side is that the NOOK store does not have as many apps, so there is less competition in terms of app discovery, resulting in more downloads. Both of them required patches, but in my case it was worth the extra work to reach a brand new set of tablet users.

Have you published Android apps? Where? What is your experience? I would love to hear your stories!

Friday, March 16, 2012

Monkey Write: From Hackathon to Market

AT&T recently interviewed me on how I built Monkey Write from a hackathon prototype to a full business, which got me thinking about the wonderful adventure I've been having in the past few months.

Going solo

When I left Google to go to startups, I did so because I wanted to grow beyond coding, to get a holistic understanding of how products are built. Great products need more than just technology. What is the secret sauce? It took me a year and a half as a startup employee to realize the truth: there is no secret sauce. There are theories and conjectures, but the only way to build a great product is to experiment. With your own hands.

Even in a very small startup, I was only marginally involved in product development, since my primary role was programming. After a lot of thinking, I decided I wasn't getting what I wanted out of my startup job, so last September I did the crazy thing: quit my job. Without the next one lined up. Or an idea what I was going to do next.

The idea

After I left my job, I attended many tech events. The theory was that if I feed enough data into my brain, the subconscious part would eventually figure out something. I was rather surprised that my business idea came out of something relatively straightforward: a hackathon.

In late October I went to the AT&T mobile hackathon in San Francisco. There were many sponsored APIs, and I chose to write something for the HTC Pen because I wanted the prize: a JetStream tablet. The funny thing is that the constraint actually sparked my creativity. Instead of everything under the sun, I focused on making a compelling app that uses the pen stylus, and readily came up with the idea of Chinese writing. I hacked a prototype in 6 hours, presented, and people loved it.

Building the product

The positive feedback at the hackathon encouraged me to explore this as a viable business idea. It took a bit of time to convince myself. The tipping point was the moment I came up with the freemium business model: have a free base app with a limited number of characters, and generate revenue with module downloads. This is in line with my initial goal of growing beyond coding. Now that I have a reasonable business model, I feel much more comfortable writing the code.

The major technical hurdle was gathering the character data and devising a grading algorithm. It took me a month to figure that out. Once that was in place, I knew I had the technology to power the app. I built out the rest of the app, and started user testing. It was super helpful to put the app in front of fresh eyes, because the initial UI was not obvious at all. It took me another month to refine it.

At this point the app was functional, but ugly. I told everyone that crossed my path that I needed a graphic designer, and ended up hiring a friend of a friend. I have never worked with freelancers, so it took a while to spell out my requirements and expectations. The graphic design took another month, but it was totally worth it. The beautiful artwork made the app much more engaging.

Launch!

I gave myself an arbitrary deadline to launch in January, but it did not become real until AT&T approached me with a marketing opportunity. They invited me to demo my app at their Chinese New Year celebrations in SF Chinatown on Feb 11. I wanted my app to be available on Android Market by then, which meant I had a week to finish up the app. The tight deadline really helped me prioritize and implement only what I needed for launch.

Next steps

The launch was just the beginning. I am implementing lots of improvements to the app while doing business development at the same time. I am reaching out to local Chinese schools to see if they would be interested in custom workbooks that aligned with their course materials. I have never done business development before, so this is a bit daunting, but also very exciting.

I am very happy with my decision to go solo. I enjoy the creative freedom immensely, and I am learning so much. There are times when I got overwhelmed with all the different hats I'm wearing, but it brings me so much joy to see people play with Monkey Write and simply cannot put it down. It is a lot of hard work, but also very gratifying.

Saturday, February 11, 2012

Monkey Write at SF Chinese New Year celebrations

8 days ago, on February 3, AT&T emailed me and asked me if I would be interested in demoing Monkey Write at the Chinese Lunar New Year Festival in San Francisco this weekend. I said yes immediately since it was such a great venue to showcase the app.

There was only one slight problem - my app wasn't ready for the public at that point. But I was very very close, so I set to work, staying up until the wee hours to get it done. I finished on Thursday, with two days of breathing room to test workbook downloading from Android Market. As they say, there is nothing like a tight deadline to increase your productivity!

This morning I work up early to drive up to SF Chinatown, since they wanted to do a video shoot at the event, and that would be difficult when the street got jammed with people. I met up with Jeremy, the videographer/sound technician/director/producer for the video. We first did a few sequences of me demoing the app, and then changed to interview format so I could describe my experience at the AT&T hackathon, where the app got started.

See what I was wearing? When I mentioned that I would be demoing at SF Chinatown, one of my friends suggested that I made some T-shirts to wear. With a cute monkey like that, it took me no time to decide it was a good idea. I will be attending quite a few events in the coming weeks, and I bet the T-shirt will make a great conversation starter.

In preparation for the event, I mentioned to AT&T that I planned to make some fliers with the name of my app, for people to take home and download it at their leisure. Turns out everything distributed from the AT&T booth had to be approved, so it would be hard for me to hand out fliers. No fliers then, I thought, not a big deal. But then they gave me a really nice surprise: AT&T was handing out orange envelopes anyway, and they added Monkey Write to the note inside!

They were literally giving out thousands of these orange envelopes!

Here is a closeup of the note. Look, Monkey Write and Angry Birds are mentioned in the same sentence!

After the interview, I set up a few demo phones and tablets with Monkey Write. At 10:30am the booth was ready for the public, and I started to show Monkey Write to people. Most of them were actually Chinese, so I ended up speaking Cantonese 80% of the time. And most of them already knew how to write Chinese, which made the demo a little bit awkward:

"This is a game where you can learn to write Chinese. Try it." I said in Cantonese.
[Chinese lady quickly completes all the characters]
"Is that it? Where do I get my prize?" she asked, also in Cantonese.

Fortunately a few Chinese children were also checking out the devices at the booth, and they started playing with the app. Some of them go to Chinese school on Sundays, so the Introduction workbook was too easy. When that happened, I opened the Numbers workbook, and asked them to write character for ten-thousand, stroke numbers off, and off they go, trying to get the perfect score. It was actually quite a lot of fun watching them enjoying the app. Too bad I was too busy demoing, and didn't take any photos of the kids. But Jeremy the videographer captured it all on video, and I am really looking forward to the final cut!

Thursday, February 9, 2012

Monkey Write launched!

Monkey Write is now on Android Market!
http://market.android.com/details?id=com.monkeywriteapp.write

It all started at the AT&T Mobile Hackathon. I walked in as a hackathon newbie, and walked out with an awesome tablet, a stack of gift cards, an XBox 360 with Kinect, and a business idea! I have been working on Monkey Write full-time since then, and it has been tons of fun.

There were so many milestones: segment the character data, figure out how to grade strokes, work with a graphic designer, bring it in front of users for feedback, iterate, iterate, iterate.

I am very proud of Monkey Write, but this is just the beginning. I have gathered a lot of great feature ideas during user studies, so keep an eye on the updates! You can subscribe to the newsletter, or follow @monkeywrite on Twitter.

Here is a short url to get Monkey Write from Android Market: http://bit.ly/mowran

Download it, show it to your friends, write a review. Thank you for your support!