Skip to main content


Showing posts from 2015

What I learnt validating my MVP and promoting my app for free

In October 2015 I developed Xtegos - Voices for Whatsapp as a weekend project. Xtegos is a mobile app to r ead messages with funny foreign accents and share them on Whatsapp as voice messages. After launching the MVP for  Android , I wanted to test the following assumptions : 1) People like sharing voice messages with someone else's voice on Whatsapp groups. 2) People prefer that voice to have a funny foreign accent. 3) This app will grow organically after some initial marketing effort. In order to achieve some customer base, I implemented the following marketing strategies : A) Create a website , Facebook page and a Twitter account  (renamed one with 5k followers). B) Share the app with my personal contacts on social media. C) Share funny voice messages created with Xtegos on my Whatsapp groups. D) Promote Xtegos on Facebook groups with keyword "Whatsapp" with a big lie in the post: " Xtegos, the app to share voices on Whatsapp that is

How to share remote audio files on social media using Phonegap

I wanted to create the iOS and Windows Phone versions of Xtegos using Phonegap , and the main problem I had was sharing audio files on Whatsapp. There is a fantastic Cordova plugin called Social Sharing , developed by Eddy Verbruggen (thanks for your help), which makes things much easier, but it does not explain how to share audio files. This is how I did it on Javascript: The function below assumes that your file is in a remote server. If this is not the case, the code is much simpler and you can remove all the XMLHttpRequest code. function shareAudio() {   var endpoint = ';   var client = new XMLHttpRequest();'GET', endpoint, true); // Async call    // Need to change the MimeType for this kind of binary content   client.overrideMimeType("text/plain; charset=x-user-defined");   client.onreadystatechange = function() {      // When the progress is level 4 (ready) and the status is 200     if (clie

Xtegos: funny accents for your Whatsapp voice messages

It's a fact, we can't help smiling when someone orders a drink in Spanish with a very strong English accent, the same way English people smile when I ask for directions with my Spanish accent.  However, we really appreciate their effort speaking a foreign language. I wanted to know how would people react if they had an app to recreate these international accents and share them with their friends. That is why  I spent 8.5h developing Xtegos , an Android app that enables users to read any text with nine different accents and share the result  as a voice message  on Whatsapp . The interface is extremely simple, literally a text box, nine voice selectors, a button to listen and another one to share on Whatsapp. In the backend I am using Android TTS after trying out some other free text-to-speech APIs. The best thing about this native voice synthesizer is that you can use it even offline . The voices currently available are: English, French, German, Brazilian, Italian, Russ

How to fix the "cryptswap1 is not ready yet" error on Ubuntu?

I never paid attention to the error message that, every time I started Ubuntu 14.04, was saying that " The disk drive for /dev/mapper/cryptswap1 is not ready yet or not present ". However, this caused that today I couldn't start the system at all, which is a painful and stressful experience. These are the steps I followed to fix the issue and get Ubuntu back to life. 1)  At the GRUB menu , start Ubuntu in recovery mode 2) At the Recovery menu , select " Drop to root shell prompt " 3) Type " sudo swapoff -a " to disable swapping 4) Type " sudo mount -o remount,rw " to have write access to the system files 5) Type " sudo nano -w /etc/crypttab " and put a "#" at the beginning of the line that starts with " cryptswap1 ". Save the file. 6)   Type " sudo nano -w /etc/fstab " and put a " # " at the beginning of the line that starts with " /dev/mapper/cryptswap1 ". Save the

Using Windows and you can't see your Android device on DDMS? This is how to fix it!

I recently bought a new phone running on Android 5.0.2 and, after enabling the Developer Mode and activating USB debugging , I was unable to connect it to Eclipse on Windows 10. The DDMS view and adb devices command showed an empty list. This is how I fixed it: 1) Make sure you the Google USB Driver installed in your Android SDK folder. 2)  Connect your device via USB and open Control Panel -> Device Manager . 3)  You will see under " Other devices " an unrecognized " ADB Interface ". Right-click on it and select " Update Driver Software ". 4)  Click on " Browse my computer " and enter the path to your Google USB Driver ( <sdk>\extras\google\usb_driver\ ). 5)  Click on " Let me pick from a list of device drivers " and select " Android USB Device ". 6) Save changes and restart your IDE. Your device should be now visible from your DDMS view.

How to deploy a PostgreSQL database in Ruby on Rails through Cloud Foundry

If you have a Ruby on Rails app with a PostgreSQL database and you are deploying it for the first time through Cloud Foundry to your hosting provider, you might have realized that a simple cf push yourappname doesn't initialize the database. As it occurs when you are working locally, you  first need to trigger the database creation and migration processes . In my case, I am connecting to IBM Bluemix through Cloud Foundry , and my app is connected to an ElephantSQL  PostgreSQL database. These are the steps to deploy my app successfully: 1) Deploy the app for the first time:  cf push yourappname 2) Create the database and run the migrations (if any):  cf push -c "bundle exec rake db:create db:migrate" yourappname .  Note that this command will leave the app down. 3) Start the app again:  cf push -c "null" yourappname

Why do I love IBM Bluemix

I had six Ruby on Rails web apps hosted on Heroku that I wanted to migrate to a more scalable and professional platform within my budget. My first intention was to use my Bizspark account and deploy them to Microsoft Azure but, unfortunately, Azure Web Apps do not support Ruby on Rails yet. My attempt to deploy them in a single Linux Virtual Machine was painful and the performance very poor, so I decided to try IBM Bluemix . After signing up for the 30-day trial , I started loving its engaging and intuitive UI, the simple pricing model and the amount of available services for a 1-year old cloud platform. In less than one hour I had deployed my six web apps using Cloud Foundry CLI , migrated the PostgreSQL databases with the ElephantSQL add-on, and  set up the custom domain and SSL certificates. A tiny " Add Git " button introduced me to IBM Bluemix DevOps Services . This is simply mind-blowing! You are not only allowed to edit your code from the w

How to schedule tasks in Ruby on Rails

There are some scenarios where we would like to set some actions to be performed at certain times of the day, or periodically. There is an easy way set up these cron jobs in Ruby on Rails with  rufus-scheduler . It does support four kinds of scheduling : scheduler. in '10d' do     # do something in 10 days end scheduler. at '2030/12/12 23:30:00' do     # do something at a given point in time end scheduler. every '3h' do     # do something every 3 hours end scheduler. cron '5 0 * * *' do     # do something every day, five minutes after midnight end The integration is incredibly simple. Just create a new file task_scheduler.rb in your /config/initializers folder, include the gem rufus/scheduler and set up your task. In the example below, I am sending an HTTP GET request to Google every 2 minutes and print the status code. # Required Gems require 'rubygems' require 'rufus/scheduler' require 'net/https' requ

How to make an app start automatically on Ubuntu

Sometimes we found ourselves starting manually a set of apps or webservices everytime we reboot our Ubuntu instance. We can easily automate this process. 1)  Open the configuration file with sudo vi /etc/rc.local 2)  Add all the commands that you want to run. For example:     cd /home/myuser   rm *.tmp     nohup java -jar /var/www/myapp/app.jar & With nohup and the final & we force the jar file to run on background, creating the  nohup.out log file. 3) Always end with exit 0 4) Save changes with :x and reboot the system. The commands that you have added should be run at start up.

How to get your Azure Web App FTP credentials

In the new Microsoft Azure portal, when you create a new Web App, you might struggle to find your FTP user credentials.  This is how you can find them. 1) Open and browse to the Web App you want to access to. 2)  Click on the " Get Publish... " button as per screenshot below. It will download an XML file. 3) Open that file with a text editor and you will find the publishUrl , userName and userPWD fields you need.

Why you should think twice before using biometrics

In the last decade we have seen how advances in biometric technologies have made it possible to identify individuals with their fingerprint, voice, iris or even brainwaves with very low failure rates. I have no doubt that biometrics ( something you are ) will eventually replace passwords ( something you know ), which can be easily forgotten, guessed or deciphered with dictionary attacks. It is a fact, we are not good at choosing robust passwords and we reuse them all the time. Unfortunately, it is not uncommon to hear from considered secure cloud services urging their users to change their passwords after a cyberattack. It is very annoying, but a new password should solve the problem. But what if your biometric information is stolen ?  Most of cloud services protect it the same way they do with passwords, i.e., the information is encrypted and stored in their servers. If after a cyberattack  your fingerprint is deciphered, it could be used in order to access any oth

The "we have no competitors" startup myth

I recently met an early-stage startup in a meetup for entrepreneurs in Dublin. They were working on an e-commerce solution for SMEs, and they already had a quite impressive working prototype. I am not going to question whether this is or is not lean . When I asked the founder about their competitors, I got the worst possible answer: " We have no competitors " - with a big smile. Every time I hear that I think about four different possibilities: 1) They didn't even bother to do a proper search on Google, which is bad because they didn't do their homework. Anything or anyone between their startup and the money is a competitor. 2)   They don't know what market are they in , which is even worse because they are building a solution without a problem or potential customers. The " this product is for everyone " simply doesn't work. 3) They don't have any competitors because it is not an attractive market at all, which is catastrophic

How to make Office365 SMTP server work from Gmail

If you ever tried to send emails from your Office365 account directly from Gmail , you might have experienced an issue that prevents you from authenticating. Yes, you have carefully followed all the instructions and your credentials are correct, but you are still getting this error message: Authentication failed: Please check your username/password Don't worry, you are not alone! The problem is that the default SMTP server ( ) is not always successfully translated into the correct IP address. In order to make it work, just follow these instructions: 1) Open your command line or terminal 2) Type ping 3) You will see that a different domain name is displayed. In my region (Europe) it is 4) Use that domain when you enter your Office365 SMTP server details on Gmail

How to add users to your AWS EC2 Linux instance

Do you need to add more users to your AWS EC2 Linux instance? This is a step-by-step tutorial to guide you through the basic process. 1)  Open a terminal session and navigate to the path where you have  your-key-pair.pem  file 2)  Type the following command in order to extract the public key from your key pair ssh-keygen -y -f your-key-pair.pem 3) You will get as a response a string like the one below. Copy it to your clipboard. ssh-rsa AAAAB3NzaC1yVh0/ThkcfO479gFjMUVw48D2Pi4u0P+0lvP0tpzKcZ/nwnzhFIDyUHsVKMN0F97DCoPQEbk5jmyHRSBok+cuEXAMPLEt1VI7TLSAwWZj5aRedb+awFDLxBgS8SN/nvsaP4+KY8uGum10YV83/wGNZjYEVRLg9NjyDbuVERYFAKEhscyZAbWTMw2t30JELizxyXZx4s4OImfS4yOCnDLFgHFf3JUjGhTUg1O+10I3V2TB3j63166AEB+98JizrRtwJ85AUN/wmMD0V2YIiEaa2rMLbdGZw8lSlPakV3bedx+8NYf+s2+SLwB 4) Login with your ec2-user to your instance, as usual. s sh -i your-key-pair.pem ec2-user@ yourawspublicip 5) Create a Linux user account on the EC2 instance sudo adduser username 6)  OPTIONAL: Only if you want

How to prevent your Heroku dyno from going to sleep

If you are using a free Heroku web  dyno, you might have already noticed that sometimes it takes too long to load your website. The reason is that single  1X or 2X web dynos go to sleep after one hour of inactivity.  This causes a few second delay for the first request. However, subsequent requests should perform normally. In order to prevent this, you can do the following: 1)  Install  Heroku Scheduler  free add-on ( heroku addons:add scheduler:standard ) 2)  From your Heroku Scheduler dashboard, add a new job with these details: - Task:  $ curl -I - Dyno size:  1X - Frequency:  Every 10 minutes 3)  Save the changes That's it! Heroku Scheduler will send a "keep awake" signal to your app every 10 minutes, so that it won't fall asleep. Important: Heroku Scheduler runs one-off dynos that will count towards your dyno-hours for the month and you might be charged for extra usage.

How to transform a website into a desktop app

If you want to have immediate access to your favorite sites in an app-like way, you can use Google Chrome's Create desktop shortcut  feature. It enables you to create within seconds a shortcut of a website, that will be placed on your desktop or applications menu. Just to be clear, this is not a real app , but  a desktop shortcut to Chrome's viewer, hiding the browser bars, so it does look like an app. The shortcut icon will be the website's favicon.ico image. In order to create your own desktop shortcut on any operating system supporting Google Chrome (Windows, Ubuntu,...) you can do the following: 1) Open your target website on Google Chrome 2) Click on Chrome's menu (top-right corner) 3) Go to  More tools  and Create application shortcuts 4) Tick on the kind(s) of shortcuts you want to create 5) Click on Create This is how it looks for on Ubuntu 14.04:

Multitasking in Scrum teams

Let me invite you to perform the following exercise taken from Essential Scrum (Kenneth S. Rubin) . Grab a piece of paper and a pencil, draw two identical tables as shown in the figure below, and complete them with two different strategies: row-at-a-time (a, 1, i, b, 2, ii, c, 3, iii, ...) and column-at-at-time (a, b, ..., j, 1, 2, ..., 10, i, ii, ..., x). Don't forget to time yourself! The average results are 35 seconds for the row-at-a-time table, and 16 seconds for the column-at-a-time table. In addition, the first table has more chances to have errors. The first table represents multitasking , where we are continuously switching from one task (column) to another, while the second table is single tasking (we don't start with the next column until we have completed the previous one). The meaning of this experiment is that working on too many items at the same time involves a high level of over-head . Similarly, working on too few items at the same time is als

How to grow your blog audience

Since I started my website and blog , I was always worried about growing my audience. Despite my sharing efforts, mainly on Twitter, Facebook and Linkedin, I just got a couple of hundreds of views per post, mainly from my contacts. How can my posts reach readers beyond my social circles?  In the age of collaborative economy making a huge impact on most sectors, there has be a solution of bloggers helping bloggers to promote their posts and grow their respective audiences. Copromly is a web a web app that  makes use of collaborative growth to provide bloggers with a 10-fold audience reach in their social campaigns. If you are a blogger who wants to promote a blog post for free , the process is quite simple: 1) You submit your post to Copromly 2) Copromly provides you with a magazine   featuring your post and presenting some posts from other bloggers. 3) Other bloggers promote their magazines. Some of them show   your   post. 4) You promote your magazine (e

Managing technical debt of your products

You and your team are working on a new version of the product. There is an strict deadline that you simply can't meet within high-quality standards, and you are not allowed to cut corners of these must-have features. After explaining the situation to your manager, she responds that this is a business decision and that you have to do whatever is necessary to meet this deadline. In other words, you need to do some low-quality work which should be reviewed and enhanced in the future. Does this scenario sound familiar to you? This is the most common example of technical debt , but we are not just talking about unclean code that needs to be refactored. Other types of technical debt are bad design, insufficient test coverage, poor integration, etc. Sometimes it is necessary to take on some debt for compelling reasons, such us going out of business otherwise, or being the first to market. However, the decision makers must have in mind that it is a loan after all, and it has to

How to migrate your PHP website to Amazon EC2

Amazon Elastic Compute Cloud ( Amazon  EC2 )  and is one of the most popular hosting solutions nowadays. Using EC2's virtual servers you don't need to  invest in hardware up front, and you can easily manage performance, networking and security of your applications. The AWS Free Tier  provides the following free services for 12 months, and with a competitive price afterwards: 750 hours per month of Linux, RHEL, or SLES t2.micro instance usage 750 hours per month of Windows t2.micro instance usage Run one instance at a time or multiple instances simultaneously In this post I will explain how can you easily migrate your application from your local server to this high-performance cloud solution. 1) Sign up. Sign up for free on Amazon Web Services . Credit card information is required, but you won't be charged during the first 12 months. 2) Set up EC2. On your Amazon Management Console, apply for a EC2 account following these instructions . Keep the resu