posted about 18 hours ago · 8 minutes read
I was recently asked to develop a small native app for Android. Being mainly an iOS user and occasionnally dabbling with Windows Phone 8 (don't laugh, I really wanted to like that OS), my first challenge was to find an Android device I could use as a test device.
As I need to make sure the app works on older devices, I couldn't go for one of the latest high-end models. Instead, I chose a Samsung Galaxy S3, a phone released in May 2012. In 2014, this device still has a large user base worldwide and although it was a premium phone when it was released, today it is a great mid-range device.
This article has one purpose: highlight the differences I found, workarounds and pitfalls for the regular iOS user that I am, coming to Android territory. Leaving the Apple walled garden for the realm of the Google overlords is less painful than I initially thought. Also, to get used to the Android way and get a feel for its UI paradigms, I decided to use the S3 as my primary phone for a while and leave my iPhone 5 at home.
Also, my thanks to Neil for bearing with me while I'm adapting and for answering most of my many stupid questions.
There are many things that I like on Android:
I also have a few gripes with Android:
The first thing to understand if you come from iOS, is that there are many flavors of Android. Not just different themes, icons and colors but different OS'es. Android is based on Linux and just as there are many variations of Linux for your computer, there are several variations of Android for your phone. On top of that, there are different UI layers depending on the version. To make a parallel with Linux, think Unity vs Gnome vs KDE, etc. On Android, this would be Samsung's TouchWiz, HTC's Sense, etc. Oh, and of course, there are also different version numbers for each distribution of Android, think iOS 5, 5.1, 6, 7 (and as of today, 7.1).
Not all distributions, versions and UI layers are compatible with every device but most of the apps from the Google Play store (Google's App Store) run on most of them.
When you get an iPhone, you take it out of the box, you choose the language, enter your Apple ID and that's about as far as setting up the device goes. Except sorting the icons and changing your wallpaper on your home screen, that's also as far as customization goes. It's Apple's "it just works (as long as you use your device the way we want you to use it)" at its best.
Unpacking my Galaxy, I chose the language, entered my Google ID credentials and my device was set, using the brand theme from my mobile operator (Swisscom). As it is a Samsung phone, it comes with an interface layer called TouchWiz. You can't get rid of it if you decide to use the stock Android version that comes with your phone. It's tightly coupled with your device's flavor of Android. It's a bit awkward at first as there are about 5-6 empty screens you can flip through.
On iOS, when you install an app, its icon will be automatically added to your home screen. Not on Android. It will go in your App Drawer. The App Drawer is usually symbolized by an icon representing an assortment of little squares at the bottom of your phone. What you see on your home screen is completely customizable. You can add only the icons you want to see when you unlock your device and leave those you use less in the App Drawer. Think of it as your Windows desktop vs All programs in your Start menu.
Your home screen can also display widgets. Widgets are small dynamic apps living on your home screen. There are widgets for clock, calendars, weather info, news, calculator, music player, shortcuts to settings options such as wifi on/off, etc.
Just the same as with iOS, the bottom of your screen will display a Dock. It's the one line of icons that will be shown on every pages of the home screen.
The combination of home screen + Dock + App Drawer is known as the Launcher. You can install a different one, we'll see how a bit further.
To install an app, you visit the Google Play store, search for one and tap the install button. To uninstall and app is a different process than on iOS. You need to go to
Settings -> Apps -> Downloaded and from there, tap on the app you want to remove to open a menu where you'll find an
Not difficult but I tried to uninstall apps the iOS way by keeping its icon pressed for a few secs in the App Drawer. That doesn't work and instead will add the app to your home screen.
Depending on your launcher, adding and removing apps and widgets on your home screen will be a bit different but a common way for adding is to keep pressing an app's icon in the App Drawer and it will add it to the home screen where you can then set its position. To remove it from the home screen, you keep pressing its icon and drag it at the top, on the
x remove area.
Unlike iOS, if the Android version that came with your device is not suited to your needs, you can decide to change it. My personal main reason is that I really don't like the Samsung TouchWiz. It also doesn't have a Swiss-French keyboard layout (QWERTZ) and only a French one (AZERTY).
Of course, I could have installed a 3rd party keyboard app to replace the stock one (yup, that's the kind of things you can do on Android) but that wouldn't fix my dislike of TouchWiz.
Let's see how this is done but before you try it, know that it will most likely void your warranty! I'm a rebel, I void at least 3 warranties before breakfast so this didn't stop me.
The first thing you will need to do is to enable
root access to your device. Having root access means that you can do stuff that are normally restricted. If you want to learn more what that means, read the Wikipedia page on root access.
The process is different for each manufacturer and device. For example, if you have a Galaxy S3 i9300, Google
Once you have enabled root access on your device, you'll need to replace the default recovery software on it. I used ClockworkMod Recovery. This will allow you to make full backups of your device, including the current Android version. Always do a full backup before changing the OS.
Aside from allowing for complete backup and restore capabilities, ClockworkMod Recovery is also used to install other versions of Android on your device.
After reading a bit, I settled for CyanogenMod 10.2. It is based on Android 4.3 "Jelly Bean". I actually tried an unfinished version of CyanogenMod 11 (Android 4.4 "KitKat") before that but it was too buggy and as a long-time Apple user, I'm not used to having a buggy phone.
Usually, a ROM comes as a zip file. Don't decompress it, simply copy it on your SD card.
For licensing reasons, Google apps don't come bundled with custom ROMs. You have to get them separately if you want them. That includes GMail, Google Maps, etc... ...but also Google Play which you'll need if you intend to install apps from the Google app store.
Of course, you can totally opt out from installing the Google apps and live happily with a Google-free phone. It's just not convenient because Google Play remains the primary channel to get new apps on your phone.
I won't detail the steps to install your new ROM on your phone as there are too many variations of it. You'll need to read the doc for your ROM/phone to get the exact step but it roughly involves these steps
Now, you should be running your custom ROM on your phone. It's time to customize it. Here's a list of the apps I installed on mine and below, a screenshot of how my S3 now looks like:
That's the result:
I didn't comment much on the Galaxy S3 device as my interest is Android, not the hardware. But to make a long story short, let's say that it feels like a bulkier copy of the iPhone 3GS.
I will now take it from here and continue my exploration of the OS while I'm working on developing the app that started this whole Android thing for me.
posted about 1 month ago · 4 minutes read
My daughter reached a stage where she needs to start thinking about what she wants to do in her life. Her school has a program that focuses on helping students choose a suitable profession. She's a little bit ahead of the proposed activities as she's bent on learning how to code and become a software developer although that may still change. How many of us are working in the profession we thought was right for us when we were 13 years old?
As we were talking about what was required to become a programmer, she asked me one simple question: why do I like coding so much?
It may sound silly but at that very moment, I was not so sure what to answer except because it's cool and I love technology. Obviously, that answer is a bit too simple so, as I write, I'm trying to have a coherent thought process as to why I really love what I do (and oh, believe me, even if I find it hard to describe, I really do).
First, I have to figure out where this coding thing started. Why did I simply start doing it instead of getting into something else like cooking, design or being a car mechanic.
When I was a kid, I loved one thing above all: video games. These were the days when the Commodore 64 briefly dominated the market and many games were produced for it. Expensive games which my parents couldn't afford. But we had one Commodore 64.
So, I simply decided I could create my own games. From the perspective of an 8 years old kid, this plan seems perfect but in reality, I was lacking several skills, one of them being programming (doh!). I picked up a book on Commodore BASIC that came with the computer and started to read it. I'm not sure about how much I understood but I remember clearly inputing this:
10 "WHAT IS YOUR NAME?" 20 INPUT A$ 30 PRINT "HELLO ",A$,"!"
...and my computer said
HELLO, NICO!. That was magic. Pure magic. It also was the moment where, unconsciously, I knew I'd be a coder.
My work is what puts food on the table but let's assume for a moment that money is not an issue. What would I do with all my free time? Just what I am doing today: sit at a computer and code. Actually, that's what I already do during my free time (1, 2, 3).
That doesn't explain why I love it, though. It just shows that I really like what I do.
Those who create stuff are the people I respect the most. Designers, musicians, engineers. Simply because they make new things that didn't exist before they created them. I had a period in my youth when I wanted to be a 3D artist but I can't draw. I wanted to be a musician but I have no gift for it. All the engineering schools I looked at where requiring an insane amount of maths knowledge and I suck badly at maths.
Still, when I was (and still am) behind my screen coding I get this overwhelming feeling of doing some kind of magic. That's my creative outlet right there: I build things and get the instant gratification of seeing them do something right before my eyes. I'm a digital alchemist: I receive matter (data) and I transform it into something else (output). Or that's how I feel, at least.
Being quickly bored with a task is part of who I am. I need an environment that constantly changes. I don't like doing the same thing twice. Programming answers this need. Being a coder is accepting that our universe is in a constant state of change. What you know today won't be wrong tomorrow but it won't be enough.
I've never really respected people who answer the question Why you do it like this? with Because that's how we've always done it. Programming is in direct contradiction with these people. You can't do something because you've always done it a certain way.
Feeling like a complete beginner and being amazed by some new technology, design pattern, framework or language is something I get multiple times a year! Sometimes, multiple times a month. I love the fact that within my domain of choice, I can be a constant learner.
Here is the answer to why I love coding: because I am easily amazed, because I can't imagine stopping learning, because I can build things on my own rather than being a passive user, because it makes me feel good. Whatever it is that you choose to do in your life, whether being a coder, a nurse or a carpenter, I wish you to feel the same way as I do about your job.
posted about 1 month ago · 1 minute read
No need to
git clone inside your
user directory anymore. RailsBricks is now 100% made of Ruby code and available through
gem install railsbricks. The source is still available on Github if you feel like contributing.
Now, the next step for RailsBricks will be the inclusion of a plug-ins system. I started working on it already and will talk more about it soon. Stay tuned!
posted about 1 month ago · 1 minute read
Make sure you have a version of Ruby equal or superior to
2.0.0 and use
gem install qwikcrypt. Nothing else needed.
require 'qwikcrypt' some_text = "This is clear text" encrypted_text = Qwikcrypt::encrypt(content: some_text, key: my_password)
require 'qwikcrypt' encrypted_text = "VF80w10EJiw5ZRKWTb7qBe%2B5jEztoO5NSGe1FHON750%3D%0A" decrypted_text = Qwikcrypt::decrypt(content: encrypted_text, my_password)
Additionnally, you can use
iv: as a parameter of the
decrypt methods to set your own initialization vector.
qcrypt -e(ncrypt)/-d(ecrypt) key source_file [target_file]
This will encrypt or decrypt a text file into the
target_file. If no name is provided for
target_file, it will be named
posted about 1 month ago · 1 minute read
I try to automate as much basic work as I can with little utilities I make for myself, most of the time using Bash. When one tends to be used over and over, I rewrite it in Ruby and package it as a gem. The packaging part is typically something that can be automated, hence I made qwikGem.
The repetitive tasks in building a gem are the whole "create a gemspec", "add and sign a license file", "create the
bin directory structures", "add some common libraries", "git it", etc. That's what qwikGem does. A bit like
bundle gem would do but adds the parts I need and removes the parts I don't.
To install qwikGem, simply
gem install qwikgem. To use it, go to your working directory and type
qgem -n. Answer the few questions asked by the wizard and you're done. A directory named after your gem will be created with the correct structure.
posted about 2 months ago · 1 minute read
Working on many different projects, I always use the same Git workflow. In order to automate some of it, I created a collection of Bash scripts. My collection has grown so I took the time to rewrite them in Ruby and package them as a gem for everybody to use: qwikGit.
Let me give you a quick example. If you are currently working in a
dev branch, are happy with your awesome new feature and want to merge it inside your
master branch, push your repository to your remote repository and then delete your local
git add -A . git commit "some message" git checkout master git merge dev git push origin master git branch -d dev
See? Much faster, less error-prone and gives you more time to code your fantastic app instead of dealing with source control basic tasks.
posted about 2 months ago · 1 minute read
Last week, I've released RailsBricks, a Rails 4 app creator. I didn't know my little helper would get so much attention within the Rails community so I decided to work quickly on new/updated features. There are so many changes that RailsBricks will be named RailsBricks 2.
Actually, most of you have known about RailsBricks for a week only. I have been using it and tweaking it since the release of Rails 4. So, given its age and the amount of changes to its code, it makes perfect sense to have a version 2.
Consider version 1 to be a prototype (or a proof of concept). If you've been using it, you are an early adopter!
This is a list (although non-exhaustive) of new and updated features RailsBricks 2 will contain:
gem install railsbricks
$PATHnor install it inside your
rbricks --add add-on_name
posted about 2 months ago · 1 minute read
I needed to test some Ruby code on a Linux machine and didn't want to install yet another VM on OS X. Having a not really used, sluggish, Acer Aspire One 756 with Windows 8 and filled with vendor crapware, I decided to get rid of Windows and use it with Linux.
Not a big fan of Ubuntu, I chose Linux Mint 16 "Petra" Cinnamon. All I can say is that I'm quite impressed:
I installed RVM, Ruby 1.9.3, 2.0.0 & 2.1.0-preview, RVM, Sublime Text 3 and few gems like Rails and now I've got a little, responsive Ruby dev environment that allows me to test stuff like RailsBricks on a real Linux box.
One caveat, though: to run Rails apps (especially
Add the untrusted PPA:
sudo add-apt-repository ppa:richarvey/nodejs sudo apt-get update
Then, install Node.js & npm:
sudo apt-get install nodejs npm
And that's it. I had quite some fun with Mint today and I recommend it over Ubuntu.
Displaying posts 1 - 8 of 57 in total
qgit -cmpinstead of a long serie of Git commands.