Showing all entries for: August 2012

CoffeeScript Style Guide. Following style guides helps to keep your code consistent, readable, and organized.

EDIT: The only thing I don’t completely agree with is this:

Use spaces only, with 2 spaces per indentation level.

I personally prefer 4 spaces, and don’t see any inherent benefit to using 2 spaces over 4 (unless you need 2 characters to remain in the 79 characters-per-line guideline). Is there a reason (I’m apparently missing) as to why 2 is better than 4?

UPDATE: I was just informed that most coffee projects use 2 spaces for indentation, so if you plan on adopting CoffeeScript and possibly working with/on other projects, 2 spaces is what you should probably get used to using (and that is probably why the style guide says you should use 2 spaces).

The Self-Employed Trap. Derek Sivers, founder of CD Baby:

There’s a big difference between being self-employed and being a business owner.

Being self-employed feels like freedom until you realize that if you take time off, your business crumbles.

To be a true business owner, make sure you could leave for a year, and when you came back, your business would be doing better than when you left.

Twitter Should Charge Developers. Dusty Reagan:

It feels like Twitter’s general attitude towards API developers has increasingly become one of annoyance. The reason the API has become such a pain to Twitter is because they’re just giving it away.

I like Dusty’s idea, but perhaps Twitter doesn’t see tiered API usage pricing as being lucrative enough for them. After all, there really are only a handful of great, widely-used clients.

Free Computer Science Education. Looks like a great (free) way to get an education in Computer Science (and a number of other fields), if you were otherwise being blocked due—most-likely—to financial constraints. isn’t an accredited institution, but that doesn’t mean the education you gain from there is useless. Looking at the coursework required for their Computer Science major, it looks to be a very rigorous program and in fact, many of the resources for the individual courses come straight from accredited universities.

On paper, an education from doesn’t hold much weight in contrast to a degree from an accredited institution; however, it certainly holds more weight than nothing. And if you seek education purely for the purpose of gaining knowledge, or supplementing existing knowledge gained from experience and self-education in a specific field, then is perfect.

The App Store Lottery

I often read how developing mobile apps is like playing the lottery, because of the multitudes of apps that are submitted, only a fraction ever get anywhere—the rest are complete and utter flops.

So should you just do yourself a favor and not develop or submit any apps, that is, if you’re an indie developer or part of a small studio? Not exactly.

You see, when you go purely by the numbers, you’re essentially equating apps that were made in a day and make fart noises to ones that had a lot of design, testing, time, and passion put behind them—placing all apps on the same playing field, when clearly they are all not.

What motivated me to write this post is the previously linked article written by James Hague, that pointed out a fact that many of the more pessimistic articles tend to leave out, or fail to emphasize on enough: not all apps are created equally. If you haven’t read the article, you should.

I’m going to touch on three areas that I personally believe that if you put more focus into, you’ll greatly increase your chances of “winning” the so-called app store lottery. I encourage you to research further into the following areas to see how you can apply them to your own games and apps.


This is the area most people can agree on, because it is the most obvious. Your app should look professional, have a great-looking icon, the animations should be smooth—overall, it should look and feel very polished.

If you’re no good at graphics, it might be in your app’s best interest to either save up for a graphics designer, or partner with one (sharing revenue is a good example of a common, risk-free arrangement between a small group of people). Graphics are very important, because while we all know we shouldn’t judge a “book” by its cover, that’s exactly what most consumers will do.

Not much more to say here. Make your app look good. Then, once you think it’s good—make it better.


Putting in the extra time to test your app yourself, as well as allowing others to test it before release is crucial. Have friends and family test your app in person, right in front of you, so you can observe how they use it (you may pick up on important cues and other things that they don’t even realize).

Apart from friends and family, you’ll also want to allow those you don’t know to test your app as well, because let’s face it, friends and family aren’t always the best source of brutally honest feedback when it comes to app development. Getting in contact with people in forums (such as TouchArcade‘s, if you’re making a game) is a great way to find testers who are willing to give you honest feedback. Services such as TestFlight also help make the testing process easier—I’ve personally used their service, it’s really great.

Testing is probably the best way to identify bugs, usability issues, missing features, etc. Once you get plenty of feedback, you should take the time to fix the issues and do another round of testing—no matter how badly you want to ship your app. This doesn’t mean you should put in every feature that is requested (there will probably be a lot), but you should definitely address legitimate issues that are brought to your attention.


It’s true, big companies are going to have much deeper pockets when it comes to marketing—and that kind of marketing budget isn’t available to most indie developers and small studios, but that doesn’t mean that success is going to be prevented or even greatly reduced.

The fact of the matter is, big companies generally pour much more money into actually developing apps, so they have to put the marketing muscle behind them just to have a shot of breaking even, much less profiting. Many developers do everything—or most everything—themselves and can get away with creating a game at a much lower price than big companies can, making it much easier to turn a profit.

That’s not to say getting your app “out there” isn’t important—it just doesn’t have to be quite as expensive as you may expect. There are tons of affordable (and even free) ways to market your app—but your app has to be good to begin with. You cannot forget that. You can’t just throw X amount of marketing to just any app and expect it to become a raving success.

Take Joe Kauffman for example. His company, Fire Maple Games, is a one (possibly two)-man shop that has made over $1 million in revenue from their game, The Lost City. When he came in and had lunch with my team at work earlier this year, he explained how he had done absolutely no external “marketing” to reach that level of success—but that doesn’t mean he didn’t do anything to get it in front of eyeballs.

When The Lost City was released, he decided to make his previous game, The Secret of Grisley Manor, freely available. It was updated to include a prominent—but unobtrusive—advertisement for his new game right on the menu screen. This, he said, was the source of a large amount of sales for The Lost City—which ultimately resulted in him becoming an “app millionaire”.

Grisley Manor wasn’t “just another game” however. It was a high quality, full-featured game that received great reviews from those who played it. Its audience was also a perfect fit for his new game, The Lost City (it’s the same kind of game, only bigger and better). In fact, Joe’s scenario is a testament to just about all the things mentioned in Hague’s article.

In short, your app must be high quality, look great, have a large target market, and be tested extensively. You should also put a considerable effort into ensuring people know about your app (with or without a large budget). All these important factors are ones that many “lottery” articles fail to place emphasis on. On the other hand, all of these things can be challenging, so it can certainly seem like putting your app into a big lottery—or perhaps even a trash bin—if too many of these areas are neglected.

App Store Failure and Personal Responsibility. James Hague on how there is a lot more to app successes and failures than just hit or miss:

Just because you slogged through the massive effort it takes to design and release a product doesn’t have any bearing at all on whether or not anyone actually wants what you made.

(via Reaches $500k Goal. Congratulations to the team, and best of luck with the new service. I’m very much looking forward to seeing it once it’s live.

"Third-Hand" Languages

J.A. Whye, the creator of Corona Project Manager, posted this tweet last night:

Added MoonScript to Corona Project Manager (mix .lua and .moon files). I need more sample code for testing. Anyone got Moon?

I’ve heard of MoonScript before, and just thought it was just another scripting language out there—but I didn’t see how it fit in with J’s Corona Project Manager product (because you can only use Lua with Corona SDK). I decided to look it up.


As it turns out, MoonScript is a scripting language that looks like a hybrid between Python and Ruby, but compiles into Lua. That means Lua developers can actually program in MoonScript without touching any Lua at all. A “third hand” language, if you will, because scripting languages like Lua are “second-hand” by nature (non-technically speaking, of course).

The cool thing is that since your scripts are compiled, you simply use the resulting Lua scripts as if you wrote them yourself (which you did, but you were able to use MoonScript instead of Lua). So theoretically, anywhere you can use Lua, you can use MoonScript—that’s really cool.

For Python or Ruby developers who are transitioning into a Lua-based development environment (e.g. Corona, Moai, LuaCocoa, etc.), it would actually probably be easier to learn MoonScript instead of Lua, especially if you plan to use classes in your project. As it turns out, I like Lua just fine, so for the time being, MoonScript isn’t of much use to me personally.


Even though I don’t plan to use MoonScript immediately, this whole thing got me interested in these “third hand” languages so I decided to search to see if I could find anymore. It wasn’t long before I came across CoffeeScript—which I’ve seen in Hacker News headlines (quite a bit actually), but it never sparked my interest enough to dig any deeper. Now I’m interested.

Unlike MoonScript, which allows you to avoid a language I actually like (Lua), CoffeeScript gives some order to a language I’ve always particularly disliked: JavaScript. What MoonScript is to Lua, CoffeeScript is to JavaScript.

I remember JavaScript back before very many websites used it, and you couldn’t really use it reliably because JavaScript was turned off in a lot of browsers. Since it wasn’t extremely popular, it was mostly used to popup alerts/windows, ads, etc. As a result of all that, and the fact that it was usually embedded directly into HTML, made it feel very “hacky” to me.

Since then, its usage has matured and it has some very serious applications now, but there are still just so many things I don’t like about the language itself—it still feels very “hacked together” in my mind, and some of the conventions and syntax are just strange to say the least. For example, I hate putting functions in parenthesis just to have local variables—that alone feels like I’m using a hack to sort of “trick” JavaScript into letting me have a local environment here or there.

I always thought if I had to use JavaScript, then I could bite the bullet and use it, and maybe even grow to like it eventually—it’s not that bad. But now after looking at CoffeeScript, with its Ruby/Python-inspired syntax and generally “clean” feel to it—I’d actually be pretty excited to work on a JavaScript project right now.

From what I’ve seen of CoffeeScript so far, the only thing I don’t particularly care for is how it uses “->” in place of the “function” keyword. I don’t like “function” either (too long), but I just think they should have used something different than “->”—but that’s a small matter of personal preference, and definitely not a deal-breaker. I have no other gripes about the syntax—Python-style whitespace is something I’d have to get used to, but I don’t dislike it.

Another plus: CoffeeScript seems to have quite a large following (and growing), so I don’t think it’s going away any time soon—that’s very important to me.

Further Reading

I downloaded a copy of The Little Book on CoffeeScript to read in my spare time, because this little language has really sparked my interest. If you decide to read it, definitely get the downloadable version, because it is more up-to-date.

If you foresee yourself doing any kind of JavaScript development at some point (or if you currently do), I highly recommend looking into CoffeeScript. Like Lua, it is very small, not a lot to it, and makes JavaScript a whole lot more bearable.

Even if you’re well-grounded and comfortable in a specific language (such as Lua, PHP, or Ruby, etc), it’ll benefit you to learn another one. Seeing common concepts across multiple languages portrayed differently helps to solidify your understanding and will make you a better programmer.

As an added bonus, CoffeeScript, like Ruby and Python before it, promotes good coding practices—an area I think JavaScript is particularly weak in.

“Zynga Stock Price Collapse” on Quora. Interesting discussion. Some of the questions answered by Zynga employees:

As an employee, how do you feel about the company’s business model? Are you surprised by how much the stock has dropped? Does this change the way you feel about the time (and effort) spent with the company?

(via @carlosicaza)

Textmate 2 Binary. Here’s a compiled binary from the Textmate 2 source code that was released yesterday (e.g. the actual app) from Albert Zeyer’s fork, for those who don’t want to or can’t build it for whatever reason.

The general consensus on the web seems to be that Textmate 2 has been abandoned and you should move on. Allan Odgaard (the creator of Textmate), on the other hand, says he hasn’t given up on it.

Be Inspired. Leo Babauta with some great practical advice for finding inspiration:

You are overcome with laziness and procrastination, feeling unmotivated, stuck, can’t get started.

Web/game/app developers: sound familiar?

The Great HTML5 Mobile Gaming Performance Comparison. Great analysis of HTML5 mobile gaming performance — a must-read for HTML5 game developers.

The unibody iPhone. Don Lehman on what’s most likely going to be the next iPhone (unconfirmed, of course). Here’s my favorite part about the new design (apart from the taller screen):

Thinness is a major feature of this design. Take a look at your iPhone 4/4S from the side. Now imagine that the new design is only as thick as the metal band. That’s a big deal.