I was trying to add a custom font to the LunchTable app when an exception thrown by Typeface.createFromAsset gave me “Native typeface cannot be made.” For me, this was related to Gradle.

The solution was simple: I moved my assets folder directly under main, at the same level as java and res. It might not be necessary, but my .ttf file was in assets/fonts/, as well.

$ logout

Advertisements

There is an issue with the Sony Xperia Z (C6833) keyboard that causes any EditText using an InputFilter to misbehave. For example, typing h-e-l-l-o in one of these fields comes out as hhehelhellhello.

In order to keep my filtering functionality (I want to only allow alphanumeric characters), I removed my old code ( myText.setFilters(new InputFilter[] { ... }); ) and made a few simple changes to any EditTexts I need filtered so they look like this:

<EditText
    android:digits="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
    android:singleLine="true"
    android:imeOptions="actionNext"
    />

The android:digits property does the filtering here. Give it any and all valid characters you want to accept, and for extra credit, throw it in a string resource to reduce copy-and-paste errors.

If you’d like the “Next” button to show on your user’s keyboard for this field, android:imeOptions="actionNext" alone isn’t going to cut it—the android:digits property causes the keyboard to show an Enter key on every device I tested, so throw in android:singleLine="true" to fix it.

$ logout

This is part 1 of a series about recent redesigns on LunchTable.

I’ve been taking LunchTable in a very different direction from its initial vector as a social networking site. Though it maintains its core ideals, I’ve had to progress it forward naturally; these are where I made my decisions.

Try first

This is the largest new feature: the ability to try it first. These days, so many services want you to read what makes them so great (as told by them, of course), and instantly hand over your email and name to enjoy the honor of using their system. How do you even know if that service will be of use to you? How can you imagine it through abstract explanations and marketing hyperbole?

I navigated to Pinterest the other week for the first time to try it and see what it actually does, and was presented by a wall of infinitely-scrolling images. I had to navigate to Help to get a simple English description of the site, and that didn’t truly give me a good idea of what I could do with it. I clicked an image, and out of curiosity clicked Like on it. I was directed immediately to a sign-up page–diverting my previous train of thought from what a nice picture to: do I really want to hand over my email address? I’d imagine a similar bewilderment if I was asked for my contact information before trying on clothes at a store, especially after being led to believe it wouldn’t happen.

There are plenty of free services that let you use them without registering with them. I used jsFiddle almost every day for my previous web development job; Jottit is another amazing service I recently discovered. There are myriad other sites like these. But to me, these services are reminiscent of the early internet days, when people seemed to prefer to make something cool so perhaps you’d click their flashing banner ad, instead of, for example, cajoling you into sharing your most intimate details with people you already know (and the man in the middle). Most importantly, they enable you to use a product first-hand before you hand over any money or even just your email address– something I personally hold just as valuable.

Jump right in

For a site that normally relies on the interactions of personally-tied identities, the initial implementation of a registration-free LunchTable was hard to conceive. But once I let go of the hope for a near-1:1 representation, I afforded myself some flexibility and creativity. After all, the idea was to demonstrate LT’s abilities as far as possible within the restrictions of a free-roaming experience. So these key features were put in place:

  • Anyone can join a table someone else has created, simply with a link. (This was a given; without this, there would be no interaction element).
  • Users can make posts and chat. (These demonstrate real-time functionality).
  • Users can customize their Table to their liking. (This allows some hands-on experience with similar editing abilities they’ll see later, should they sign up).

Trial .’s

The 90s called, and they want their software marketing strategies back. No one likes to have a ticking clock hanging over his or her head. Why 30 or 60 or 90 days, anyway? Will you run out of bits to send me, and you’ll need to order more? You wouldn’t kick a customer out of the store because they take more than an hour to find what they’re looking for, so why do you do it with software?

I’m of the mind that the more arbitrary limits you put on your software, the more people will either try to circumvent your protections, or will quickly shy away from your product because you’re greedy and don’t like to share. Shouldn’t people want to pay you for this amazing thing you’ve created anyway, instead of feeling they have to?

Shut up and take my money

It helps to trust that people have good taste, and if they see something they like, they will want to pay for it.

If instead you warmly welcome them into your service, let them poke around and even use you a little more than you’d hope to offer, you’ve done a good thing for them, and in one way or another for you too. And it will make more sense to them when you offer a little extra functionality for a little bit of money. Just be ready to catch them when they start reaching for their wallets.

You can give LunchTable a whirl (without signing up) on Android, and you’ll soon enjoy the same on the web.

Sometimes error messages don’t really do their job and tell you how to rectify them, like this one I found today in Android Studio (v0.4.5). While attempting to add a page indicator for my ViewPager, I got “CirclePageIndicator is not allowed here.”

Way to be ambiguous...

As it turns out, this is less about Mama Android telling you where to put your controls, and more about using the correct namespace when adding controls (I had only copied over this class, not the whole project).

Mind your namespaces!

$ logout

After a fun day of attempts at crossgrading one of my machines to 64-bit Lubuntu, I needed to move my old local MySQL data to my new hard drive.

  1. Copy database folders stored in /var/lib/mysql/
  2. Change ownership of all databases to to mysql user: sudo chown -R mysql:mysql /var/lib/mysql/{my_database,my_other_database}

Done!

$ logout

LunchTable (600 commits)
LunchTable

In-progress Android app (44 commits)
New Android app

I love working from the command line. And while I can quickly open and hack away at any terminal in Ubuntu, I noticed a laggy experience on my MacBook Pro in iTerm2. Typing commands didn’t bug me as much as editing in vim, which would slow considerably when scrolling through a file.

I tried changing the font and upping the keystroke repeat rate (which needed to be done anyways), but all to no avail. It wasn’t until I plugged in a second monitor that I noticed the real issue: my Retina display; iTerm was snappy on my non-Apple 1080p monitor.

It looks like this has been an issue for a while. For now, it’s back to Terminal.app for me.

$ logout