Remote setup for Android and iOS made easy

Developing a new mobile application takes a lot of iterations: with every new version we are adding new features, polish the old ones, measure user acceptance – and react as fast as possible.

However, with the long App Store submission process and the even longer period until Android users update their apps, it usually takes a while to experiment with new features.

To find the features people will love is the key to win a whole lot of hearts: hearts, that belong to the new users. The faster you can find out what product the users really want, the better – that’s why marketers keep using A/B tests for almost everything.

On mobile though, the free and paid split test solutions usually aim too much: they come with statistics, robust close-source SDKs (that crash all the time), and these services want you to commit for life and beyond.

That’s why we created AppWoodoo. A minimalistic, open-source SDK and a lightweight backend service that does exactly what you expect: receives a new list of settings every time you want it.

So, say, you can switch off Facebook login as soon as it turns out people leave your app for that. Or just add a “my mood” section which you can update daily.

If you are already eager to try it out, please do so. The SDKs are on Github (iOS, Android), and the service is live on appwoodoo.com

And now, some coding magic, with Android (you can do pretty much the same on iOS as well though).

In this example, we will create a simple screen to remotely display or hide a Login button, and measure the clicks via Google Analytics.

1. Add the settings on AppWoodoo

In this example I added the ENABLE_LOGIN_BUTTON setting and set it to false. (Go to appwoodoo.com, and create an app to get started.)

2. Integrate the SDKs

You will need the Google Analytics SDK and the AppWoodoo SDK; both are available for free.

3. Start to code

First, we add a loginButton in the xml (notice that the button is not visible):

j j j

Google Maps Latitude and Longitude Picker

A jQuery Latitude and Longitude plugin to pick a location using Google Maps.

Supports multiple maps. Works on touchscreen. Easy to customize markup and CSS.

This is a demo page; the newest live demo will always be here.
For the code, install instructions and to see how amazingly free it is, go to Github.

Basic functions

  • Move the marker on the map to receive the updated latitude, longitude and zoom values in the hidden fields
  • “location_changed” event will be fired, with the gllLatlonPicker Node JS object as attribute for easy access

Move the marker, or double click on the map.

Google Maps

<fieldset class=”gllpLatlonPicker”>
<div class=”gllpMap”>Google Maps</div>
<input type=”hidden” class=”gllpLatitude”/>
<input type=”hidden” class=”gllpLongitude”/>
<input type=”hidden” class=”gllpZoom”/>
</fieldset>

Simple form with a Google Maps search field and default values

  • If the search has results, the first element will appear on the map (with the default zoom value 11)
  • You can set default latitude, longitude and zoom values in the hidden fields
  • If you don’t give an ID to the map, the script generates one; feel free to use custom ID’s though

Move the marker, or double click on the map. Search for cities, countries or landmark names.

Google Maps

<fieldset class=”gllpLatlonPicker” id=”custom_id”>
<input type=”text” class=”gllpSearchField”>
<input type=”button” class=”gllpSearchButton” value=”search”>
<div class=”gllpMap”>Google Maps</div>
<input type=”hidden” class=”gllpLatitude” value=”52″/>
<input type=”hidden” class=”gllpLongitude” value=”1″/>
<input type=”hidden” class=”gllpZoom” value=”12″/>
</fieldset>

Reverse lookup: retrieves the location name once it’s picked

  • After the position change you’ll have the location name in the gllpLocationName field.
  • If there is no value, the field will be emptied.
  • The “location_changed” event will also be fired with the gllLatlonPicker Node JQuery object as attribute.

Move the marker, or double click on the map.

Google Maps

Found:

<fieldset class=”gllpLatlonPicker”>
<div class=”gllpMap”>Google Maps</div>
<br/>
<input type=”hidden” class=”gllpLatitude”/>
<input type=”hidden” class=”gllpLongitude”/>
<input type=”hidden” class=”gllpZoom”/>
<input type=”text” class=”gllpLocationName” size=42/>
</fieldset>

Editable and selectable Latitude/Longitude values

  • You can set your own latitude, longitude and zoom values. The map shows your data after pressing the update button.
  • You can still hide the Zoom field (or any other fields)

Move the marker, double click on the map, search, or set new values to interact.

Google Maps

lat/lon: / , zoom:

<fieldset class=”gllpLatlonPicker”>
<input type=”text” class=”gllpSearchField”>
<input type=”button” class=”gllpSearchButton” value=”search”>
<br/>
<div class=”gllpMap”>Google Maps</div>
lat/lon: <input type=”text” class=”gllpLatitude” value=”20″/> / <input type=”text” class=”gllpLongitude” value=”20″/>, zoom: <input type=”text” class=”gllpZoom” value=”3″/> <input type=”button” class=”gllpUpdateButton” value=”update map”>
</fieldset>

Released under free (do whatever you want) license.


j j j

Indie webcomics to follow

A well written joke or a sharp illustration can make my day. I love Dilbert and other popular comics, but there are some more out there who very well deserve the spotlight.
(Furthermore, if you are an aspiring cartoonist pop star like myself, following these guys can be great to learn new tricks and techniques.)

Please welcome some of my favourite webcomics.

The best indie webcomics
Poorly Drawn Lines by Reza Farazmand

The best indie webcomics
Invisible Bread by Justin Boyd

The best indie webcomics
Saturday Morning Breakfast Cereal by Zach Weiner

The best indie webcomics
Little Gamers by Christian Fundin & Pontus Madsen

The best indie webcomics
Noise to Signal by Rob Cottingham

For this list, I considered indie everyone who looks indie. It’s not a real measurement I know – but if I made a mistake, it’s alright. The point here is to find awesome webcomic authors.

j j j

To play Ingress, go to Berlin

I’m sure that playing Ingress is great fun everywhere, and also, this whole topic is very subjective – but I’m certain that this place adds a lot to the experience. I have at least three reasons why.

1. Awesome scenery

The ugliness of Berlin is a significant plus to the game experience: every building here looks like a scene from your favourite first person shooter. And now that I pay more attention to statues, I know that most of them are pretty weird too.

playing Ingress in Berlin - from Wimagguc, a geek blog

2. Perfect language

Everything sounds more serious in German. My communication field is full of texts like ‘Der grosse Stern – Gefangen I’m netz der Schlumpfe‘. I don’t even know what that means, but it does look scary.

3. You are not weird

The whole place is full of geeks and other weirdos, so no one gives you the look when you are running back and forth between portals. (Not unless you are holding your phone out to watch those commands about establishing control fields and destroying links – in the circle of an elementary school group. Yeah, maybe try to avoid that.)

j j j

Reducing the meat problem

Living healthy starts with eating right. Unfortunately if you are not a fitness-, cooking- or calories nerd, it’s not easy to decide what to put on the table every day. As for me, most of the time I end up buying some meat, roasting it and, serving with bread, call it a dish. Now this came to an end.

I would not want to go cold turkey (ha!) and become vegan, especially for all the excellent salamis and great wild meat out there. The only thing I want to stop is the mindless defaults: why would anyone eat chicken wraps and Frankfurters anyway? 

Somewhere I’ve read that an average grown up person in Europe would eat something like 50 kilograms of meat a year – my consumption seems to be fairly close to this, although I’m trying to be on the healthy end.

Ready-made products and those with unidentifiable origin seem to be easy to avoid, but then again: the recent horse scandal shows that even if the label looks very accurate, it’s rarely the case. Döner kebab is not something you would have high expectations about, but even Nestle and other, seemingly reliable companies sold horse meat as beef products.

Not that I’m picky with animals, I would eat whatever – my biggest complain here is that if we don’t even know the type of the animal, how would we know such very important facts like whether the unlucky pig was raised in a cage with hundreds of others, or: if it has ever seen the sun.

There I can get very picky actually. How much more awesome is to know that the animal I eat was in good health, free of weird antibiotics and full of energy! (Before it got slaughtered.)

If you just search for some minutes, you will see that some chickens are living a total of 32 days before you find them as ‘chicken wings’ in McDonalds. I can’t see how this is not bad for the public health and the environment – in the race for low-price meat, the food industry is leaving us with antibiotic resistant germs. (And even worse: food snobs, who only eat stuff coming from Bio Company shops.)

So here is my plan: I quit being a part of the problem and will reduce my food consumption to a more eco-friendly level, with the following:

  • Emerge new defaults: breakfast with cereals, choosing hummus and falafel when eating out (kill all the chickpeas!)
  • When buying non-vegan products, going for organic: looking for meat directly from farmers
  • Not buying minced meat or similar all-in kind of products
  • Keeping track of my food: keeping meat products below 500g a week

Please be aware of the fact that I’m in no way more clever than you with this. I’m not a doctor, have no idea of biology, fitness, health – so you better don’t follow anything you read here.
This post might be a good food for thought though. And please, feel free to send me further readings, hummus recipes, or just get in touch and encourage me / tell me I’m a fool on Twitter.

I might return to this topic later, if anything significant happens – although, I would be surpised if that was quite soon.

j j j

Node.js static http server with GZIP support (for Heroku)

One of my favourite solutions to serve static files is on Heroku, with Node.js: lightweight, easy to setup, easy to configure and highly scalable – awesome features, these.

However, when you serve static files, the users’ internet provider sometimes changes those. An example is when the carrier compresses the javascript documents or resizes the images to provide faster downloads. This will result a mismatch in file hashes, which, with some javascript frameworks like the Sencha touch SDK, leads to fatal app breakdowns.

An easy method to avoid this is to gzip all data ahead. Fortunately, Node.js has a built-in zlib module after v0.6.13, so writing a static http server with gzip support is a breeze. You can get my code from github: it comes as a Heroku project, so if you don’t want to configure anything, just replace the files in the ./app folder and you are all set to go.

To check that your setup works, use the following commands:

$ curl http://nodejs-static-http-with-gzip.herokuapp.com/ --silent --write-out "%{size_download}\n" --output /dev/null

$ curl http://nodejs-static-http-with-gzip.herokuapp.com/ --silent -H "Accept-Encoding: gzip,deflate" --write-out "%{size_download}\n" --output /dev/null

…where the resulting number is the size of the downloaded file – if you get a smaller number running the second command, it means that the server is sending gzipped files for a browser that supports them.

(Remember that ngix, perhaps the most popular fronting server for Node.js already supports gzip – therefore you only need this trick on Heroku and similar environments.)

j j j

Which cities does the music from?

Here in Berlin we like to think that this city is: the European capital of music. This is where artists can flourish, where all cool stuff comes from, where early adopters get what they want the most. Only that the European capital of music is not Berlin. It’s Oslo.

The alternative point of view: Wimagguc
From the paper: The geographic flow of music

Last.fm has a great pile of data about what people in the world are listening. This is a detailed snapshot of user’s taste in space and time. One can see what kind of music people are listening to and also how the taste of music changes: a flow across genres and place.

Based on this data, a research shows that music preferences are closely related to nationality, language and geographic location. Also (with a similar method I used in my masters thesis!) they figured that some cities are consistently early adopters of new music – the interesting part is that these hubs are not that easy to guess.

In Europe for example, would you have guessed that the capital is Oslo? Or that all North-America is following Montreal?

j j j

What I’ve learned from a Facebook marketing campaign

To get more attention and hopefully, eventually more likes for Frederique’s Facebook page, I’m running a small marketing campaign in the last two weeks of the year. Here are some of my findings, a little after halfway through.

(Preface: the campaign is for winning free posters. For that, one only needs to share anything from the Facebook wall or like the giveaway’s post. More info about the campaign here.)

First, the campaign is set to run in the last 18 days of the year, within the most noise around – when everyone is already immune to ads. This was clearly not great timing, and I will avoid this in the future whenever possible. 

Second, I scheduled the post to go online on a Thursday, when I saw most of my peers active on Facebook. Also, I’ve let some close friends know about the post immediately and asked them to like or share it to gain more visibility. This worked well: some people liked the post a day later as well, showing that it was among the important ones (sharing it as an image probably added some extra points to its rank).

Third, my optimistic webcomic has a very special audience: almost every person is a potential follower, and therefore it was almost impossible to foresee the new followers. (This also means that I will have next to no chance narrowing down the audience for a future ad campaign based only on gender, age or similar values).

Fourth, the helpfulness of my friends is fantastic: their shares, likes and comments helped to show Frederique to hundreds of people in a week and meet the very modest goal of reaching the magic number – 50 followers of my Facebook page.

j j j

Moving my WordPress blog to Heroku (and Amazon S3)

Knowing that there are plenty of pages out there to walk you through the exact same thing, I won’t make this guide too long: only five steps, with some bullet points for future reference.

1. Create a Heroku project

  • Create an empty folder, locate it in Terminal and:
    $ git init
    $ git add .
    $ git commit -m "init"
    $ heroku create
  • Setup the name of the Heroku app and make your domain point to it
  • Add a ClearDB database to this Heroku project

2. Make a copy of your WordPress site

  • Download all WordPress files and copy them to the Heroku project’s folder
  • Create a dump of the database (the easiest way is to use this WordPress backup plugin)
  • In the Heroku project, make sure all domain values in the files’ content point to the right address. I had quite a few ‘hardcoded’ values in the footer still pointing to wimagguc.hu – a quick search and replace on all textual files took care of this.
  • Pro tip: if you had a .htaccess file, make sure to copy that as well

3. Migrate your database to ClearDB

  • Connect to ClearDB via MySQL Workbench (or a similar tool), and import the SQL dump you created in step 2.
  • Your articles and settings will still point to your old domain. Fix these with three simple updates:

    UPDATE PREFIX_wp_options SET option_value = replace(option_value, 'www.OLD-DOMAIN.com', 'www.NEW-COMAIN.com') WHERE option_name = 'home' OR option_name = 'siteurl';
    UPDATE PREFIX_wp_posts SET guid = replace(guid, 'www.OLD-DOMAIN.com','www.NEW-COMAIN.com');
    UPDATE PREFIX_wp_posts SET post_content = replace(post_content, 'www.OLD-DOMAIN.com', 'www.NEW-COMAIN.com');
  • Edit your wp-config.php:
    $db = parse_url($_SERVER["CLEARDB_DATABASE_URL"]);
    define("DB_NAME", trim($db["path"],"/"));
    define("DB_USER", $db["user"]);
    define("DB_PASSWORD", $db["pass"]);
    define("DB_HOST", $db["host"]);

4. Make The Heroku project run locally

  • (Now this step is far from mandatory, but I find it easier to add plugins and double check everything on localhost.)
  • You probably have your xAMP environment set up already. So did I, and therefore all I needed to do was to:
  • Set the CLEARDB_DATABASE_URL variable to whatever URI “heroku config | CLEARDB_DATABASE_URL” displays
  • Create a symlink to your apache document root: “ln -s /Users/wimagguc/heroku-wordpress-folder/ /var/www/heroku-wordpress-test”

5. Add S3 to handle file uploads

  • The best practice is to keep dynamic file content off from Heroku: in case you have multiple instances running, files uploaded to one dyno might be missing from other ones. Keeping all uploaded files on Amazon S3 is one way to solve this problem.
  • Go to amazonaws.com and register for Simple Storage Service (now there is a free usage tier for the first year!)
  • On the S3 console, create a bucket for your blog
  • Get the login credentials from Amazon
  • Install this great S3 for WordPress plugin and set it up to use with your bucket

Further reading:

j j j

Selfridges London on Google Maps

If you have ever lost in a subway or a shopping mall, you know that indoor maps are indeed useful. I’m not the kind of person who wants to consult info points and -graphics every time looking for the right exit in the underground – but having a map in my phone that helps in these situations: that’s a real deal.

Selfridges London on Google Maps - by Richard Dancsi

I have read sometime in July that the indoor function of Google Maps will be available in the UK, but I didn’t pay too much attention: with my age I already know how to get around in shops and how to look for those signs that give me directions. What’s really great though, is the ease of use. No matter which section, floor or department you are at, the phone is always in your pocket – and you always know which way to go next.

A faster, more effective, happier way of getting around indoors.

j j j