How to use callback functions in Appcelerator’s Titanium

Interested in a hands-on tutorial in Titanium? Building Cross-Platform Apps using Titanium, Alloy, and Appcelerator Cloud Services

As part of our internal “Crash Course To Titanium”, I was teaching our guys how to use a Common JS module to pull data from a remote server and generate data for a tableview.  The problem came when we’d finished generating the data, we had to pass it back to the View.  The hacky solution would be to store the TableView object in a Global variable that can be accessed anywhere.  Of course, that’s not the best solution, a much better one is to use a callback function passed as a parameter to the CommonJS function which is then called when the tableviewdata has been prepared.

Here’s a simplified version of how we got it working:

Thanks to Ricardo for pointing us in the right direction:

Anyone interested in Titanium development should check out our tutorials and also join


Simple Animations with Appcelerator’s Titanium

Interested in a hands-on tutorial in Titanium? Building Cross-Platform Apps using Titanium, Alloy, and Appcelerator Cloud Services

Every app you make can be brightened up by some animation.

Here’s a very quick + dirty test gist we did for a request to have each word of a sentence fade in word by word and play a sound when the word has faded in:

Further reading:!/api/Titanium.UI.Animation!/api/Titanium.UI.2DMatrix

UXMNL UX Manila April Workshop with Patti Hunt & Kristin Low

Last Saturday we hosted the first in a series of UX workshops under our UXMNL brand.   UXMNL is a User Experience Design agency, dedicated to creating solutions that make a difference and improve lives.

A large part of our vision for UX in the Philippines falls under education.  Without people, clients and companies being aligned on the benefits and merits of good design, it makes it very difficult for us to do our job and for good design to prosper.  Our mission is to drive the UX industry forward by servicing local companies and hosting these workshops and trainings with UX leaders from around the world.  There’s a lot to look forward to this year.

The UX Manila April workshop featured Hong Kong based Patti Hunt & Kristin Low, who gave an incredible workshop that started with an introduction & brief history of UX.  The introduction lecture was followed by a workshop where attendees were introduced to design studio.  Patti and Kristin introduced a persona and a design problem to be solved.

With over 230 attendees, not only was this was the biggest UX event in the Philippines to date, but it was also the biggest workshop Patti & Kristin have ever done!  Although you would never have known this, their presentation was smooth and concise. Evidently seasoned professionals at work.

A massive thank you to everyone who attended, and to Patti & Kristin for coming here and sharing your knowledge and experience with us!

Stay tuned for the next event!

Check out Patti & Kristin’s HK company and follow them on twitter

The workshop in the press:


Creating your own ios slide to unlock feature on Titanium Appcelerator

Interested in a hands-on tutorial in Titanium? Building Cross-Platform Apps using Titanium, Alloy, and Appcelerator Cloud Services

We currently have a project that requires a lock feature without using the actual lock button on the iPhone, since I have to somehow copy the “slide to unlock” of the iOS, I did a research thinking maybe someone have already done that on Titanium then voila! There is one! Thanks to a user named pec1985, here’s the link to the code repo.

Unfortunately he created the code during an earlier version of the Ti SDK,  Continue reading

Foolproof Labs’ blazes the way with first iBeacon powered event

At the UXMNL event on Saturday (, Foolproof Labs showed off the latest in our technology portfolio with an application that went from “idea” to “uploaded to the Google Play store” in 6 hours flat.

iBeacon is an indoor positioning system developed by Apple that works with both iOS and Android and enables us to send targeted content based on the user’s location and even on the user’s demographic information e.g. you could send different content to males and females, old and young people, students and professionals.

As solution providers, this is a really powerful system and opens up a whole new playground of possibilities for us and for our clients.

You could imagine a trade-show in a large conference center that could send a welcome message to the customer when they walk in the door, another message with a promotional coupon when they get to the first booth and another message when they reach another pre-defined place and so on.

The possibilities are endless, other uses include:

Our application ( was a 3 page app for use on the day that displayed the event schedule by default.  When a user moved near the Registration Booth, they were shown a “Welcome” message and were then shown a “Meet the Team” page with profiles of each team member.  When they moved away from the Registration Booth, the Event Schedule page came back.  Later in the evening at the networking event, when users entered the venue at Chihuahua (I highly recommend their tacos and Frozen Magaritas by the way), they were shown the Chihuahua food menu.

Pretty simple but a great proof of concept and not bad for 6 hours of work from idea to design to finished application.

If you want to have iBeacons in your business, get in touch with us to know more, you can email me directly at

Further Reading on how iBeacons are going to change the world:

How to apply for a job at Foolproof Labs

If you know us well, you will know that there are, amongst many things, two things high on the list of things we love:

  1. Great UX
  2. No bullshit

We’ve recently been hiring a lot of people which has involved ploughing through blank emails with resumes attached, or sometimes a blank email with  a covering letter and resume attached as well as ploughing through resumes with lots of irrelevant information e.g. Mother’s maiden name, Religion, a copy/paste from the web for the “My goal” section.

This is a fairly slow and painful way for us to go about the process and it seems “ripe for disruption” as they say in the Startup community, which is the same as saying: “There’s a better way to do that.” (We’d love to go through the whole Design Thinking process for this but let’s save that for another day.)

From today onwards, we’d like to experiment with a different way of hiring people, as follows:

  1. To apply for a job at Foolproof Labs and to have a chance of getting an interview, send us an email stating:
    1. Why you’re so amazing that we should hire you
    2. Why you think you’re fit for the job being offered
    3. What amazing things you’ve done/worked on/want to work on/have ideas for etc
    4. What are you passionate about and/or what you want to learn

If you can answer those well, we’ll give you a call 🙂

Look forward to hearing from you!



How to track scroll percentage, scroll depth with Mixpanel Analytics

Want to be able to track when a user has scrolled a certain amount down the page?

Well, thanks to it’s rather easy.

I’ve just made a fork of Jquery-scrolldepth on Github here:

When the user scrolls to 25, 50, 75 and 90% of the way down the page, the following javascript will be called:

mixpanel.track(labelPrefix + label);

where label is either “25%”, “50%”, “75%” or “90%” and labelPrefix is “” (empty string) by default.

How to implement:

1. Make sure jQuery is included on your page
2. Make sure the scroll depth script is in included on your page
3. Make sure the Mixpanel tracking script is in the <head> tag
4. Call this function to initialise the tracking script:

$(function() {

5. That’s it! If you want to pass a label prefix, change the line above to:

 $.scrollDepth({labelPrefix:"myPrefix "});

How learning Dota can be applied to learning programming


strategical map

When we play Dota or Dota 2 we always wait for the creeps on either Dire or Radiant side of the map, well let’s relate this on my college life. When I was still in College as an IT Student, when a new technology on development came up and out for use some of my friends tend to say “Professors will teach us about that when we get to the next semester maybe”, with that mentality a lot of students are about to make the biggest mistake of their college years if they are about to pursue their career as a programmer or a developer, if you will be doing that there’s no difference between you and “juan tamad” who just waited for the fruit to fall from the tree rather than climbing the tree and getting the fruit.

juan tamad

Students now a days already have access to fast internet connections depending
on what ISP you subscribed to, so why wait for your professors to teach you a new language
which you can learn at home? When you graduate, probably most of the things that they taught
you in your college days might be obsolete and that will be a pain in the ass because you have to rush your self learning new stuff to find a job as a fresh graduate when that is something you could have done in your college years.

I know some of the players of either Dota 2 or Dota already used the hero named “Axe”, the common
strategy for the users of Axe is that before the start of the game or the release of the creeps, they go on the opponents side near the blind spot and wait for the first release of the opponent’s creeps and kill all of them before they reach center of the map so that axe becomes fatty before his opponents does. Yeah, I know this blog is not about teaching a new Dota strategy on how not to wait for the creeps but this is intended to grab some attention from the college students who prefer to spend their precious time on playing Dota rather than studying stuff that would get them fatty for the clash against the real world.

Be an Axe who doesn’t always wait for the creeps on their comfort zone, there are a lot of communities
on Facebook, Reddit, Stackoverflow etc. that could help you out when you get stuck with some problems while developing or studying new technologies for the development and always remember to “RTFM” (Read The F*cking Manual).

How to annoy a UX designer in 10 easy steps

A light-hearted look at the healthy competition in our office between the “User Experience guys (and girls)” and the “Dev guys (no girls…yet)”…..the “how to annoy a dev guy” post is coming soon 😛

  1. Give them FTP access and ask them to upload their prototype to the server (“FT…what?”).
  2. Tell them their user flow doesn’t make sense but don’t give a reason.
  3. Tell them their “best-practice” feature is impossible to implement.
  4. Tell them the Axure License has expired and they need to use Powerpoint in the meantime.
  5. During the client meeting, while they’re presenting their UX audit, tell them the Account Manager told them to audit the wrong site. Continue reading

What is usability testing?

So I guess you’re wondering, what’s this “usability testing” term that people have been juggling around these days? Let’s cut to the chase:

Usability testing is watching people use a product, like a website or mobile application, then analysing their behaviour to identify opportunities for improvement. It is used to:

  1. Find out whether your product is easy to use
  2. Determine  issues/problems that you can fix
  3. Find out if the product meets users’ needs

This is what makes usability testing unique, the act of watching your users interact with your product is what sets it apart from other forms of research such as surveys, interviews, focus groups, heuristic evaluations and even expert reviews. Don’t get me wrong, all of these research methods are useful but what happens if what your user is saying turns out out to be false? Continue reading