How to rename a branch and the commits

In the company where I work we always tag the git commits against the ticket we are working on. I created a git hook for this. Each commit looks like:

“BRANCH-NAME: Commit message”

However it might happen that a branch name is mistaken, so you might needed a rename the branch and the commit messages. It is fairly easy, but be aware: if someone else is working on the same branch as you, you might create some problems.
Continue reading How to rename a branch and the commits

Freezing Sweet Potatoes

I went to a local farmer’s market in Eagle Farm last Sunday. It was about closing time and the farmers were offering amazing stuff for very little price, so I bought a whole lot of vegetables. Now the problem is to use the stuff I bought, since I truly hate wasting food.
One of the offers were about sweet potatoes (yams), so I bought quite few of them, how do I make sure that are not going to end up in the bin? Simply we freeze them. So that’s what I did.
Continue reading Freezing Sweet Potatoes

Targeting different Android layouts based on different SDKs

Please read through the whole article before doing anything, since these are notes I took while I was developing this feature.

The version of Android running on the device is given by the variable

android.os.Build.VERSION.SDK_INT

Continue reading Targeting different Android layouts based on different SDKs

Autocorrect, autocapitalize and autocorrect in contenteditable

While debugging some issues with lost of formatting in mobile editors I started researching about how to control input methods in mobile devices: we can control how the user gets corrected for words, autocorrection and spellchecking.
This feature is often desirable, however it causes content-loss in a rich text editor environment.
Continue reading Autocorrect, autocapitalize and autocorrect in contenteditable

Android Webview – The space event is not firing as expected

When we work with text editors we need to listen to every single event happening at the keyboard level and then act accordingly. For example after typing a space we might need to transform a link-like text into an actual link.

While this feature has been working fine in all the devices, our QA team has found an issue with this component, and digging into the code I found how the space is not being recognized correctly as a space.
Continue reading Android Webview – The space event is not firing as expected

Testing your local website in Internet Explorer from Mac, Linux or Windows

Testing your work on IE: hurting your sentiments.

You did the test in all the browsers available on your machine, maybe even a recent IE, such as IE11 or IE10 and everything is working like a charm, but the company you work for still have customer using IE8 or even worst IE7. So it’s time to test your work on those old platforms.

This is not the easiest of the tasks, for two main resasons:

  • Old Internet Explorer are everything but standard compilant browsers.
  • Your machine doesn’t have IE at all (Linux and Mac users), or you have IE 10 or 11 installed.

Continue reading Testing your local website in Internet Explorer from Mac, Linux or Windows

SquirtJS: Read the web one word per time

So you want to become a super fast reader in seconds, right? Good. I have the right tool for you. It is SquirtJS.
I stumbled upon this project just few months ago. I am been immediately impressed by it, I could read an English web page at a peace of about 400 words per minute, while I for my mother tongue I could reach around 600 wpm.

What is the secret of squirt.io? Simple: rather than moving your eyes while reading, squirt allow you to fix your sight in a position of the page, and it will change the words one by one, at the peace you specify.

After few months of usage, I can tell that this is a great product. It is available as chrome extension as well as a JS bookmark.
Only downside it is that some websites don’t work well with it.

Squirt.io

Showing errors after the user finishes typing with angularjs

I really like the inline form validation pattern: as the user finishes typing the validation on that input is immediately performed. This improve the user experience, by:

  • a 22% increase in success rates,
  • a 22% decrease in errors made,
  • a 31% increase in satisfaction rating,
  • a 42% decrease in completion times, and
  • a 47% decrease in the number of eye fixations. (source alistapart.)

Continue reading Showing errors after the user finishes typing with angularjs

Same functionality, same UI, but different controller in AngularJS

I am relatively new to AngularJS, but I don’t miss occasion to be surprised by the simplicity of this spectacular framework.

First of all we define a service which contains the functionality we need. In this case is a “Welcome panel”, where it’s visibility can be managed from different points.
Continue reading Same functionality, same UI, but different controller in AngularJS