Sunday, November 10, 2013

Votation populaire du 24 novembre 2013

  1. Acceptez-vous l'initiative populaire "1:12 - Pour des salaires équitables"? In the US, income inequality has been consistently going up since the 70s. Too much income inequality creates a society in which I feel less comfortable living, but imposing a maximum ratio between the lowest and highest salary within a company looks to me like a flawed approach to alleviate this problem. Using a company as a unit is problematic; it opens the door to inequalities and workarounds. Say, a dental surgeon who has her own independent practice isn't too happy paying her cleaning lady 1/12 of her salary? Then she can just outsource cleaning and bypass that constraint. It is also not clear to me that the law would take into account stock given to executives (and increasingly other employees as well). Instead, if the goal is to reduce income equality, I'd rather look at the policies of countries with a low Gini coefficient and a healthy economy, like many of the Scandinavian countries. My vote: no. Expected: no. Result: n/a.
  2. Acceptez-vous l'initiative populaire "Initiative pour les familles: déductions fiscales aussi pour les parents qui gardent eux-mêmes leurs enfants"? This is a hard one, but I'll go with a yes, mostly because the arguments of the federal council are logically flawed. If the primary goal is to help families with children, why only provide this help to those who pay someone to take care of their children? Imagine you wanted to provide an incentive for people not to use their car going to work; if you were to do so by making public transportation costs deductible, you'd be discriminating against people who carpool, bike, or walk to work. (Using a deduction for such an encouragements feels flawed to me, as it disproportionately benefits people with higher salaries who are also those who need the help the least, but this is a different question.) My vote: yes. Expected: no. Result: n/a.
  3. Acceptez-vous la modification du 22 mars 2013 de la loi fédérale concernant la redevance pour l'utilisation des routes nationales (Loi sur la vignette autorouotière, LVA)? The suggested amount (CHF 100.-) doesn't seem unreasonable, and since this is a rather technical issue, I'm comfortable following the recommendation of the federal council and parliament.

Monday, October 21, 2013

Predicting the late-2013 MacBook Pro Retina performance

Some wouldn't be surprised if new MacBook Pro Retina were to be announced at tomorrow's Apple event. Whether they are indeed announced tomorrow, or in the following months, I for one wonder what their performance will be.

I'll focus on the Geekbench 3 score, because it is the most widely used, and in particular on its single-core, 64-bit score, as I think this is the number that best reflects the experience I have using the computer as a developer. Let's look at two other lines that made the move to Haswell processors over the last year:
  • The iMac, from late 2012 (3542) to late 2013 (3935), saw an 11% improvement.
  • The MacBook Air, from mid-2012 (2863) to mid-2013 (3143), saw a 10% improvement. 
I'll predicate my prediction on the MacBook Pro Retina seeing a similar relative improvement. The MacBook Pro Retina from early 2013 scored 3395, so I predict the new "late 2013" MacBook Pro Retina will score at about 3393*1.1 = 3732.

This would make the iMac only just over 5% faster than the MacBook Pro Retina, which would make it hard to for me to choose between the latest MacBook Pro Retina and latest iMac.

Update (2013-10-22): The most high-end CPU we can get on the MacBook Pro like is described as a 2.6GHz Quad-core Intel Core i7 with Turbo Boost up to 3.8GHz, which according to Wikipedia is a i7-4960HQ with  6 MB on-chip L3 cache. The high-end late-2013 iMac comes with a i7-4771, still according to Wikipedia. Based on the specs, the iMac CPU more cache (8 MB vs. 6 MB) but the memory bandwidth MacBook Pro CPU is higher (76.8 GB/s vs. 25.6 GB/s). However, at this point we don't yet have published performance scores for the i7-4960HQ on Geekbench.

Update (2013-10-23): CPU World has a useful comparison of the MacBook Pro's i7-4960HQ (left) with the iMac's i7-4771 (right). Of interest, this comparison mentioned the F16C additional instructions of the iMac's i7-4771, which provide support for doing half-precision to and from single-precision floating-point conversions, but it isn't clear that the availability of those instructions would improve the performance of tasks typically performed by developers.

Also, a few 32-bit scores for the i7-4960HQ started showing up. There are too few to draw any conclusion, and we'd like to look at 64-bit scores, but taking a value of 3405 for the 32-bit MacBook Pro's i7-4960HQ scores and of 3584 for the 32-bit i7-4771 scores, the iMac would indeed be just 5% faster.

Wednesday, April 10, 2013

Requirements for a GTD system

For a while, I've been occasionally updating a list of requirements for a software I would be able to comfortably use to manage my GTD system. So without further ado:
  • actions
    • actions are always in a context, and some actions are also tied to a project (my primary way to look at lists of actions is by context)
    • dates
      • start date (i.e. schedule a task to become current at a future date)
      • recurring tasks (e.g. every weekday, every Monday, every first Tuesday of the month…)
      • due date not important; making the task red once it passed the due date is useless to me; maybe another implementation could make this information useful
    • email
      • quick way to create an action from an email (otherwise I am more likely to leave emails in my inbox rather than create tasks)
      • quickly find email related to an action
      • special but important case of a start date: create action from an email that become current at a future date (i.e. "if no answer in 7 days, do this")
  • projects
    • lists of current projects
    • in each project
      • next actions for that project
      • reference material: notes (typically indented lists), files (PDF, screenshots)
    • ability to archive projects
  • access
    • desktop
      • web based or OS X app
    • mobile
      • Android support (bonus for also working on iOS)
      • fast read access to specific "list" (e.g. context, project)
      • editing lists from a mobile is not a priority (just having read-only access, while not ideal, would suffice)
      • offline on mobile (ideally with background sync so the offline version is used even when online for speed)
    • proven stability of the system's cloud-based component

Wednesday, December 05, 2012

Improve your web app design

There is out there a wealth of resources you can use, often for free, to improve your web app design:

Wednesday, November 28, 2012

Importing the scott schema in Oracle on Amazon RDS

Oracle Amazon RDS doesn't allow you to connect as sysdba, and you don't have access to the local file system, so you can't run the rdbms/admin/scott.sql script, as you would otherwise do. Instead:
  1. Download the demo scripts
  2. As master user:
    1. Change password of the scott user1: alter user scott identified by password ;
    2. Grant some rights to scott:
      1. grant connect to scott;
      2. grant create table to scott;
      3. grant execute any type to scott;
      4. grant unlimited tablespace to scott;
      5. grant create any trigger to scott;
  3. Connect as scott/password
  4. Run SQL in scott.sql

1 The scott user exists by default in Oracle RDS instances, but I am not sure what the password is out of the box. (It isn't tiger.)

Friday, November 09, 2012

Glassfish 3.1

  • Starting the server
    • cd glassfish
    • ./bin/asadmin start-domain --verbose
  • Changing JVM options
    • Edit domains/domain1/config/domain.xml
    • For instance, add <jvm-options>-verbose:class</jvm-options>
    • (Just adding an command line parameters to the java started in bin/startserv doesn't to the trick; I suspect this is just a loader, which then starts the real VM that will host the server)
  • Glassfish key store password
    • By default, Glassfish sets the property (in domain.xml) to point to its own key store, in config/keystore.jks
    • That key store has a password set on it, which is the same as the Glassfish master password, by default changeit
    • However, the default domain.xml doesn't set the property
    • As a result, when establishing an SSL connection, Java fails to key store, resulting in a with the message Password must not be null
    • One way to solve this is to add a <jvm-options></jvm-options> in domain.xml

Thursday, November 08, 2012

Propos sur le bonheur, Alain (1928)

A few selected quotes:
  • Je voudrais dire de la mauvaise humeur, qu’elle n’est pas moins cause qu’effet.
  • La colère est à proprement parler une sorte de maladie, tout à fait comme est la toux.
  • Le chapelet est une invention admirable qui occupe la pensée et le doigts ensemble à compter.
  • Réagir contre l’humeur, ce n’est point l’affaire du jugement; il n’y peut rien; mais il faut changer l’attitude et se donner le mouvement convenable; car nos muscles moteurs sont la seule partie de nous même sur laquelle nous ayons prise.
  • Tout religion renferme une prodigieuse sagesse pratique.
  • […] il faudrait toujours se dire: «ce n’est pas parce que j’ai réussi que je suis content, mais parce que je suis content que j’ai réussi»
  • Il y a deux espèces d’hommes, ceux qui s’habituent au bruit, et ceux qui essaient de faire taire les autres.
  • L’art de vivre consiste d’abord, il me semble, à ne point quereller soi-même sur la parti qu’on a pris ni sur le métier qu’on fait. Non pas, mais le faire bien.
  • La pensée est une espèce de jeu qui n’est pas toujours très sain. Communément, on tourne sans avancer. [...] Percevoir et agir, voilà les vrais remèdes.
  • La vrai richesse des spectacles est dans le détail. Voir, c'est parcourir les détails, s'arrêter un peu à chacun, et, de nouveau saisir l'ensemble d'un coup d'œil.
  • [...] l'intelligence à des pointes aussi pour nous piquer.
  • Ce qui nous blesse  dans des pensées inextricables, ce ne sont pas les pensées inextricables, c'est plutôt une espèce lutte et résistance contre cela même, ou, si vous voulez, un désir que les choses ne soient pas comme elles sont. 
  • La tristesse n'est jamais ni noble, ni belle, ni utile.
  • Un auteur ancien à dit que tout événement à deux anses, et qu'il n'est pas sage de choisir pour le porter celle qui blesse la main.
On doing:
  • On veut agir, on ne veut pas subir. Aussitôt que je me donne librement de la peine, me voilà content.
  • L'enfant se moque de nos jardins, il se fait un beau jardin, avec des tas de sable, et des brins de paille.
  • Tous les métiers plaisent autant que l'on gouverne, et déplaisent autant que l'on y obéit.
  • Ne demandez pas à celui qui ne sait point jouer s'il aime le jeu. La politique n'ennuie point dès que l'on sait le jeu; mais il faut apprendre; il faut apprendre à être heureux.
  • Le travail est la meilleure et la pire des choses; la meilleure, s'il est libre, lapide, s'il est serf.
  • Celui qui met toute son attention sur un acte difficile, celui-là est parfaitement heureux.
Dans la grande prairie must be read in full. Alin recounts part of Palto’s myth of Er, where after death people arrive in a large meadow, where they can choose what they want (and will get) in their next life, and so often pick exactly the oposite of what they need. Alain doesn't believe in an afterlife, and sees us making those bad choices every day.