Programming land

Home.

Android Manufacturers Overlays

A few weeks ago, my Samsung Galaxy 10.1 tablet crashed and after reboot all applications stopped working except default Android. It was even impossible to start Google Play store.

Not finding any way to restore it, I eventually installed CyanogenMod. Like for my Galaxy S phone last year, installation was really smooth by scrupulously following installation steps on CyanogenMod’s wiki, starting by searching for the target device. The only aspect which required leaving device’s page was finding Google Apps.

And like last year for my phone, it is just mind blowing to reboot. Performances are much better. Before that I was thinking buying a new tablet because this one was so slow browsing it became harly usable. But with latest versions of Android it is perfectly smooth. Apps to are just better, I used to have around ten applications which were clones of Android’s one that I was not able to uninstall.

And this is where I am really annoyed by manufacturers overlays. It looked my device was obsolete while it just required a software update and a bit of app cleanup. Please at least allow me to remove your clones if I don’t want using them. Please let Android upgrades flow once the device is no longer the company flagship and developers have been reaffected to other projects.

For now I really regret not having upgraded to CyanogenMod before, especially since I already had a positive experience with it. And I’m really happy with my move to Firefox OS, which is maybe not yet at the level of Android, but at least it self updates and has no non-removable bullshit.

Map Tile Provider Switch

CloudMade recently announced their will no longer support the free tier which I used to display running races I participate to. I thus moved all traces to using MapQuest tiles instead. There is so few traffic on the blog that I am way below their rate limits.

Thanks to the way I displayed them with the my own plugin using Leaflet in Octopress, I was just changing tile source and credits in my _config.yml:

1
2
leaflet_tile_url: http://otile3.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.png
leaflet_tile_attrib: Tiles Courtesy of <a href="http://www.mapquest.com/" target="_blank">MapQuest</a> <img src="http://developer.mapquest.com/content/osm/mq_logo.png">

SVG Sprites

Chris Coyier posted an article on CSS-tricks about using SVG sprites and the <use> tag to replace icon fonts.

I am a big fan of SVG, and I actually used the same technique for slides of a recent conference I talked at to build slides with consistent assets. I defined my base shapes in a SVG with only <defs> in the <head> of the slideshow and then reused them in all schemas with no copy paste. Making a change to a shape is reflected at everyplace it is used with zero change.

NodeJS Conference 2014 in Brescia

Had a chance to give a talk with Fabrice Matrat at NodeJS conference, Brescia about a library built on our spare time about synchronizing data between a web application and its backing server. The library has its dedicated website. I was invited to do the talk a second time in Sophia-Antipolis Javscript user group.

Slides can be found here, and follow the base text used. This is not an exact transcript of the conference but is the breadcrumb. This is not meant to be an exact transcript of the talk but rather a sort of guide.

Monster Version Control Repository

Two articles accounting for having a single version control repository retained my attention, one is from Facebook and the other from Google.

In the case of Facebook, they explain the rational is for being able to smoothly refactor code in atomic ways. It makes it manageable to impact two different parts of the project because one does not need to modify at one place then go to the other, upgrade the dependency and do the other change. Just do the change in both and commit.

For Google the rationale of the article is more around integration testing. If one developer commits code in a shared library and that breaks a depending product, then the build for this commit will fail in minutes, not a dependent build a few days later.

I Hate Maps

I am very annoyed by a common usage of Java Map it is not made for. Maps are here to represent a dictionary from keys to values, but it is often used to store unstructured content in place of a standard object.

1
2
Map<String, String> dog = person.getDog();
dog.put("name", "Foo");

The general reasoning is that a map makes it more extensible, but it makes it hard to validate the object right at modification time. In the example one would likely include some validate method inside the person object:

Method Chaining Return Values

I personally like to use method chaining and fluent interfaces and think these are great patterns, but in Java then tend to be implemented with a return this and that annoys me. It is generally assumed that methods modify the curent instance and return it, as highlighted in Wikipedia’s articles for method chaining:

possibly the current object itself

and fluent interface:

self-referential, where the new context is equivalent to the last context

This is also stressed in StringBuilder’s javadoc for all append methods:

Returns: a reference to this object.