US toy giant threatens to sue Matchbox

TL;DR: A giant American toy company threatens to sue Matchbox. Having no resources at hand, Matchbox is forced to change it’s name to Tuneup.

On the 14th of March, I received an email from Apple (via the giant toy company) with the following content:

The developer of the reported application is using the registered
Matchbox trademark in the description of the application without
authorization from the right holder. Also he is offering services by
unlawfully using the registered trademark which is causing bad
influence for the Matchbox brand values. Furthermore, this application is
not authorized from the right holder. This is a trademark infringement
causing damages to our client xxxxxxxx, the right holder for the
Matchbox intellectual property. I would kindly ask you to proceed and
remove the infringement/application from all stores worldwide.

This company, had the trademark for Matchbox registered under the following classification codes: US 001 002 003 005 021 022 023 026 029 036 037 038 039 041. Each and every G & S description was related to toy products, fabrication, stationery products, and manufacturing processes.

Looking up these classification codes on the United States Patent and Trademark Office’s website, absolutely none of them are for computer software, or anything that even crosses paths with Matchbox.


The million dollar question: If there was absolutely no case for “confusingly similar”, why did Matchbox change it’s name?

It’s simple really. Big guys always bully the small ones. They threatened to sue us if we didn’t stop using it. Even after proving to them that it wasn’t even remotely infringing to their use of Matchbox, they wouldn’t budge. Had I fought them legally, I would’ve won. Easy peasy. However, due to the lack of resources, I had no choice but to change it’s name.

If I had to call Matchbox anything other than Matchbox, I’d call it Tuneup. “Tuneup” is imagined by Joelle Fernandes, the co-founder of Let’s Tuneup.

Why Matchbox, and how it connects people through music

There’s no doubt that music defines us. It influences our moods, for example, making us happy by releasing a chemical named dopamine. It can affect what we wear, what we eat, and perhaps even who we enjoy being together with. It affects our thought process too (it’s well known that ambient noise can improve productivity).

In a study conducted amongst couples who were eighteen years old, it’s been found to predict personality traits. According to the same study, it’s what we’re most likely to discuss about when we meet somebody new, within the first few weeks. Psychologically, men and women who listen to similar music tend to be better communicators, and have longer lasting relationships.

It’s probably one of the most important things in our lives. If I were to place music on Maslow’s hierarchy of needs, I’d place it at the physiological stage. It’s a fundamental part of our society. Even the Hollywood movie directors (e.g. the scene from Interstellar) would agree.

Why not extend this to the social discovery apps we use today? None of them base their core on this. One of the most popular apps for social discovery, Tinder, uses Facebook page likes and interests, to match people together.

This is why Matchbox was created. It bridges the gap between “truly anonymous“, and “hey there“. The app shows you the top ten artists that are common between you and the person you’re looking at, giving you a fair knowledge of what that person would be like:

Matchbox showing the top 10 artists
Matchbox showing the top 10 artists

You’re more likely to be at ease knowing that the opposite person is a little similar to you. Matchbox was crafted with the sole intention that music is the key that connects us, and binds us together. It has evolved for over 9 months, before being made available to the world.

As it stands right now, Matchbox has a hundred active users, and is growing slowly.

Go ahead and test drive the app, and see for yourself how Matchbox re-defines the social discovery platform.

Download on the App StoreGet it on Google Play

A letter to Tim Cook regarding iOS 10, with love for Apple

Tim, iOS has always been known for it’s user interface, until recently. Your new take on notifications have not only made them very loud, and unsettling, but do not flow with the entire look and feel of Apple:

No Mr. Tim, no. My notifications will not be waiting for me. They're crying out for my attention.

No Mr. Tim, no. My notifications aren’t waiting for me. They’re crying out for my attention.

See that white background? While you’ve done a good job of highlighting the content, it breaks continuity. There was nothing wrong to start with. The way notifications used to render on my iPhone was simply perfect! The content did not need to be highlighted the way you’ve done so in iOS 10. I really loved iOS for not cluttering my life, and making it simpler, compared to Android (the new style does look like inspiration from Android, doesn’t it?).

Comparing this to iOS 9, what you’ve lost is absolute ingenuity:

Yes Tim, the beauty of your beloved platform has been lost, and Steve is waiting for you.

See? Nothing was ever wrong.

I’ve been using the beta version of iOS 10 for a little more than a few hours now, and the Today screen has also been ruined. Oh! I almost forgot – what you’ve done to the control centre is horrible. Do you know what this reminds me of? It reminds me of the Red Wedding – Lord Bolton murdering the King of the North, Robb Stark. That was truly gruesome, wasn’t it?

Tim, iOS 9 was the epitome of creation.

I truly hope that this letter talks solely about iOS 10 preview, and that it doesn’t speak for iOS 10 final.



Compile LESS on the fly for your exploded WAR in IntelliJ

At CleverTap, we’ve recently started using LESS for dynamic CSS. While it has it’s upsides, the biggest downside was that most of our developers couldn’t use the hot deploy feature for their local deployments.

After an hour or so, we came up with a neat solution.


There are two parts to this:

  1. Just before deploying the app into the web container, compile all the LESS files within the exploded artifact output directory
  2. Have the File Watcher plugin re-compile a modified LESS file within the IDE, and copy it over to the artifact output directory

Both parts above utilize a bash script (since everybody uses a Mac for development, it’s cool).


  1. The LESS compiler – can be installed using npm (npm install -g less). If you don’t have the Node Package Manager, just search on how to install it (most likely you’d use Homebrew)
  2. Install the File Watcher plugin in IntelliJ
    1. Go to Preferences in IDEA, then to Plugins
    2. Hit the “Install JetBrains plugin…” button, and search for “file watchers”.
    3. Install the plugin and restart the IDE
  3. A run configuration that is configured to deploy an exploded WAR (can be either Tomcat/Jetty/anything)
  4. Knowing where your exploded artifact resides (in my case, it is /Users/jude/developer/WizRocket/out/artifacts/Dashboard_war_exploded). If you don’t know how to get this, follow these steps:
    1. Go to File -> Project Structure
    2. Click on Artifacts (in the left menu)
    3. Select your exploded WAR artifact
    4. On the right, you’ll see the output directory

Part 1: Compile the LESS into CSS just before deployment

Copy the following script and save it as /Users/username/bin/lessc-idea:

function update {
target=`echo $1 | sed s/web\\// | sed s/.less/.css/`
echo "Generating $exploded_artifact_path/$target"
$less $1 $exploded_artifact_path/$target
function all {
find $exploded_artifact_path -name *.less | while read path; do
output=`echo $path | sed s/.less/.css/`
echo "Generating $output"
$less $path $output
$1 $2

view raw

hosted with ❤ by GitHub

Note: You will need to update the variable exploded_artifact_path in the script above.

Make it executable:

$ chmod +x /Users/username/bin/lessc-idea

Now, open up your run configuration, and scroll all the way to the bottom (where it says Make, followed by Build artifact …). Hit the “+” button, and select “Run External Tool”.

Hit the “+” button to add a new External Tool, and configure it as follows:

External Tool configuration for compiling LESS files before deployment

Ensure that the build order in your run configuration is as follows:

Build order for LESS compilation

Once this is done, your LESS files should be automatically generated when you deploy your web app. Go ahead and give it a shot.


Part 2: Configure the File Watcher plugin to re-compile LESS files edited:

Go to Preferences, and navigate to File Watchers under Tools (left menu). Hit the “+” button and select “Less”.

Configure your new watcher as shown in the screenshot below:

File Watcher configuration for LESS files

Before your hit the OK button, a few things to do:

  1. Clear any output filters added automatically: Press the Output Filters… button, and remove anything inside there.
  2. Select your scope: Select the CSS/LESS directory within your web module (ensure you click on Include Recursively after you’ve selected the directory)

You’re all set. Hit OK, then Apply, and OK.

Test drive your new setup. The moment you change a LESS file, it’ll get re-compiled into the corresponding CSS file within the corresponding directory in the artifact output, and you’ll be able to see the changes immediately.

Sending notifications via Apple’s new HTTP/2 API (using Jetty 9.3.6)

HTTP/2 is still very much new to Java, and as such, there are just two libraries who support it – Jetty (from 9.3), and Netty (in alpha). If you’re going the Jetty way (as I have), you’ll need to add their ALPN library to your boot classpath.

Note: Jetty 9.3.x requires the use of Java 8.

A full library for this is available here, on GitHub.

Here’s a quick example:

package com.judepereira.jetty.apns.http2;
import org.eclipse.jetty.client.HttpClient;
import org.eclipse.jetty.client.api.ContentResponse;
import org.eclipse.jetty.client.api.Request;
import org.eclipse.jetty.client.util.StringContentProvider;
import org.eclipse.jetty.http2.client.HTTP2Client;
import org.eclipse.jetty.http2.client.http.HttpClientTransportOverHTTP2;
import org.eclipse.jetty.util.ssl.SslContextFactory;
public class Main {
public static void main(String[] args) throws Exception {
HTTP2Client http2Client = new HTTP2Client();
KeyStore ks = KeyStore.getInstance("PKCS12");
// Ensure that the password is the same as the one used later in setKeyStorePassword()
ks.load(new FileInputStream("MyProductionOrDevelopmentCertificate.p12"), "".toCharArray());
SslContextFactory ssl = new SslContextFactory(true);
HttpClient client = new HttpClient(new HttpClientTransportOverHTTP2(http2Client), ssl);
// Change the API endpoint to if you're using a development certificate
Request req = client.POST("")
// Update your :path "/3/device/<your token>"
.content(new StringContentProvider("{ \"aps\" : { \"alert\" : \"Hello\" } }"));
ContentResponse response = req.send();
System.out.println("response code: " + response.getStatus());
// The response body is empty for successful requests
System.out.println("response body: " + response.getContentAsString());

view raw

hosted with ❤ by GitHub

openFrameworks and AppCode

Developing an openFrameworks app with AppCode is pretty easy. However, if you just open and run the project created by the project generator, you might see the following errors:

Building a stock openFrameworks app results in these errors
Building a stock openFrameworks app results in these errors

Why doesn’t it just work?

This is because openFrameworks doesn’t support 64 bit builds yet on the Mac, due to a dependency on the deprecated QT framework. More on that here.

What’s the quick fix?

Set your project’s architecture to i386 (32 bit) in it’s build settings:

Ensure that you set both, your project's architecture, as well as openFrameworks' architecture to i386
Ensure that you set both, your project’s architecture, as well as openFrameworks’ architecture to i386

Once you’ve done this, your run configurations should shortly say 32 bit Intel instead of 64 bit Intel:

Run configurations now say 32 bit. Yay!
Run configurations now say 32 bit. Yay!

Kudos! Run your project now, and it will work right out of the box!

OpenWRT won’t bring my WiFi interface up, unless the other is up

I recently bought a D-Link DIR 505 router. So far, I’ve got a DLNA server running on it, along with Transmission, a bit torrent client. Life is awesome so far.

I set it up to repeat another WiFi router in my house, the one connected to the internet – using a bridge. It works really well right now.

However, when that WiFi network is down, even the second WiFi network created by my new router won’t come up. I don’t know why as of yet, but I have a dirty hack – if within 10 seconds after boot the router cannot ping my other WiFi router, I will disable that interface and restart the WiFi. This brings the network created by the D-Link up, and I can continue to stream stuff off my hard drive from it.

I created an executable shell script, and placed it in /usr/bin. Then I added a link in rc.local, which is executed after the system is up:

# /usr/bin/

logger "Waiting for 10 seconds for network to settle down"
sleep 10

if uci get wireless.@wifi-iface[0].disabled | grep 1; then
    logger "Primary interface is disabled"
    logger "Primary interface hasn't been disabled"
    logger "Checking for connectivity"
    if ping -c 1; then
        logger "Connectivity has been established"
        logger "Connectivity lost. Disabling primary WiFi interface"
        uci set wireless.@wifi-iface[0].disabled=1
        uci commit wireless

Discover – my second iOS app

iTunes Genius is a great feature. However, it lacks music discovery outside your own music library. Sure, you can always do a Google search for similar tunes, but let’s face it – who has time to do this anymore?

There weren’t any great music discovery apps on the App Store either. All of them either looked ugly, or had to be opened by the user. The content wasn’t available readily.

Then I thought of Discover. I wrote this app keeping in mind that the app would never have to be opened by the user, to see any content. Instead, why not present it in the Today screen itself? This way, the widget can refresh it’s content quickly and present it, in a beautiful manner.

Unobtrusive. Simply genius, isn’t it?

How can this be made any better? Provide buttons which directly search the iTunes Store or YouTube for the song recommended. This way, it’s easy for the user to try out new songs, with zero effort. Eureka! The effort of typing on the device is now gone!

I’ve submitted the app on the App Store for review, and I hope it will be accepted and published soon. Here’s a sneak peak of it:

Highlights of Discover
Highlights of Discover

Discover took a total of one month to complete. Although it was a simple app, I couldn’t give it much time day to day.

I love what it’s turned into. There’s so much that I’ve learned about iOS – auto layout, GCD, and the language itself.

0f > Float.MIN_VALUE = false!

Turns out that this is the expected behaviour from the java doc:
A constant holding the smallest positive nonzero value of type float, 2-149.

So now, how do I get the smallest negative value that a float can hold?

Just came across the most weirdest thing ever in Java – 0f > Float.MIN_VALUE returns false!

Similarly, anything less than 0, (say -10 for example) is surprisingly not greater than Float.MIN_VALUE.

However, 0 > Integer.MIN_VALUE returns true!

Want to try it out?

public class E {
    public static void main(String[] args) {
        System.out.println("1f > Float.MIN_VALUE: " + (1f > Float.MIN_VALUE));
        System.out.println("0f > Float.MIN_VALUE: " + (0f > Float.MIN_VALUE));
        System.out.println("-1f > Float.MIN_VALUE: " + (-1f > Float.MIN_VALUE));
        System.out.println("0f < Float.MIN_VALUE: " + (0f < Float.MIN_VALUE));
        System.out.println("0f == Float.MIN_VALUE: " + (0f == Float.MIN_VALUE));


1f > Float.MIN_VALUE: true
0f > Float.MIN_VALUE: false
-1f > Float.MIN_VALUE: false
0f < Float.MIN_VALUE: true
0f == Float.MIN_VALUE: false

MPU 6050 and it’s DMP over time

Using Jeff’s brilliant library for using the DMP on the MPU 6050, here are graphs of the DMP filling the FIFO buffer at 200 Hz, 100 Hz, and 50 Hz.

At 200 Hz, I found that while the MPU did interrupt my Arduino Due at 200 Hz, I could only read off the FIFO at 150 Hz. It overflowed twice or thrice every second. To be sure, I used the examples from the library itself.

In the graphs below, red is yaw, green is pitch, and blue is roll (time in seconds is on the x-axis, and the values are on the y-axis).
The MPU was kept on steady on the floor at all times during this test.

FIFO rate at 200 Hz:

MPU 6050 at 200 Hz

It’s unbelievably unstable. The values randomly shoot to 50 – 70 and stay there for a while. Before the MPU gives away (it doesn’t fill the FIFO for over 100ms), it’s about 17 minutes.

FIFO rate at 100 Hz:

MPU 6050 at 100 Hz
The values look stable enough for use. It’s just 6 minutes before the MPU gives away this time.

FIFO rate at 50 Hz:

MPU 6050 at 50 Hz
At 50 Hz, the values are very good. They stabilise within 10 seconds. However, the MPU stops filling the FIFO buffer after about 36 minutes.

Does anybody know what’s wrong here?

Arduino Due – Absolute Maximum Ratings

The table below lists the maximum current which can be sourced or sinked for a given pin on an Arduino Due board:

Due Pin Number SAM3X Pin Name Mapped Pin Name IOH (or ISOURCE) in mA IOL (or ISINK) in mA
0 PA8 RX0 3 6
1 PA9 TX0 15 9
2 PB25 Digital Pin 2 3 6
3 PC28 Digital Pin 3 15 9
4 connected to both PA29 and PC26 Digital Pin 4 15 9
5 PC25 Digital Pin 5 15 9
6 PC24 Digital Pin 6 15 9
7 PC23 Digital Pin 7 15 9
8 PC22 Digital Pin 8 15 9
9 PC21 Digital Pin 9 15 9
10 connected to both PA28 and PC29 Digital Pin 10 15 9
11 PD7 Digital Pin 11 15 9
12 PD8 Digital Pin 12 15 9
13 PB27 Digital Pin 13 / Amber LED “L” 3 6
14 PD4 TX3 15 9
15 PD5 RX3 15 9
16 PA13 TX2 3 6
17 PA12 RX2 3 6
18 PA11 TX1 3 6
19 PA10 RX1 3 6
20 PB12 SDA 3 6
21 PB13 SCL 3 6
22 PB26 Digital Pin 22 3 6
23 PA14 Digital Pin 23 15 9
24 PA15 Digital Pin 24 15 9
25 PD0 Digital Pin 25 15 9
26 PD1 Digital pin 26 15 9
27 PD2 Digital Pin 27 15 9
28 PD3 Digital Pin 28 15 9
29 PD6 Digital Pin 29 15 9
30 PD9 Digital Pin 30 15 9
31 PA7 Digital Pin 31 15 9
32 PD10 Digital Pin 32 15 9
33 PC1 Digital Pin 33 15 9
34 PC2 Digital Pin 34 15 9
35 PC3 Digital Pin 35 15 9
36 PC4 Digital Pin 36 15 9
37 PC5 Digital Pin 37 15 9
38 PC6 Digital Pin 38 15 9
39 PC7 Digital Pin 39 15 9
40 PC8 Digital Pin 40 15 9
41 PC9 Digital Pin 41 15 9
42 PA19 Digital Pin 42 15 9
43 PA20 Digital Pin 43 3 6
44 PC19 Digital Pin 44 15 9
45 PC18 Digital Pin 45 15 9
46 PC17 Digital Pin 46 15 9
47 PC16 Digital Pin 47 15 9
48 PC15 Digital Pin 48 15 9
49 PC14 Digital Pin 49 15 9
50 PC13 Digital Pin 50 15 9
51 PC12 Digital Pin 51 15 9
52 PB21 Digital Pin 52 3 6
53 PB14 Digital Pin 53 15 9
54 PA16 Analog In 0 3 6
55 PA24 Analog In 1 3 6
56 PA23 Analog In 2 3 6
57 PA22 Analog In 3 3 6
58 PA6 Analog In 4 3 6
59 PA4 Analog In 5 3 6
60 PA3 Analog In 6 3 6
61 PA2 Analog In 7 3 6
62 PB17 Analog In 8 3 6
63 PB18 Analog In 9 3 6
64 PB19 Analog In 10 3 6
65 PB20 Analog In 11 3 6
66 PB15 DAC0 3 6
67 PB16 DAC1 3 6
68 PA1 CANRX 3 6
69 PA0 CANTX 15 9
70 PA17 SDA1 3 6
71 PA18 SCL2 15 9
72 PC30 LED “RX” 15 9
73 PA21 LED “TX” 3 6
74 PA25 (MISO) 15 9
75 PA26 (MOSI) 15 9
76 PA27 (SCLK) 15 9
77 PA28 (NPCS0) 15 9
78 PB23 (unconnected) 15 9
USB PB11 ID 15 9
USB PB10 VBOF 15 9


  1. Arduino Due – Pin Mapping for SAM3X
  2. Arduino Due – Broad Specifications
  3. SAM3X datasheet

Note: The ratings are on pages 1390 through 1392 of the datasheet for the SAM3X.

Thanks to the folks at the Arduino IRC channel(#arduino on freenode) for pointing me in the right direction!