Saturday, May 28, 2016

The Problem of Evil

The problem of evil, quoting from the Wikipedia article on the topic, "refers to the question of how to reconcile the existence of evil with an omnipotent, omniscient, and omnibenevolent God".

For Christian theologians, notably starting with St Augustine (AD 354–430), God created a perfect world, but gave Adam and Eve the power to deviate from His chosen path. In that view, God didn't create evil, and instead that evil is the deviation or privation of goodness. The existence of evil, they say, is the price we pay for being able to make free moral choices, and a world in which Man is able to make such choices is better than one were Man isn't, and thus God created a perfect world. This became Catholic doctrine, and this concept is often referred to as all is for the best in the best of all possible worlds, an idea which Voltaire (1694–1778) satirizes to great effect in Candide (1759).

Luther and Calvin stronger belief in predestination leads them to conclude that the fall of man was part of God's plan, and that, ultimately, we might just not be able to understand God's plan.

Monday, April 18, 2016

Waiting for the 2016 MacBook

I am very interested to what Apple will do with the new MacBook, also known as 12" MacBook or Retina MacBook, as it might tell us something about where their laptop lineup is moving. As of this writing, the new MacBook is expected to:
  • Be released by the end of April, which, would be in the next 2 weeks.
  • Come with newer CPUs, compared to the 2015 MacBooks. Those new CPUs have already been launched by Intel in Q3 2015, and are expected to be:
    • For the low-end model: Core m3-6Y30, succeeding the Core M-5Y31.
    • For the mid-range model: Core m5-6Y54, succeeding the Core M-5Y51.
    • For the high-end model: Core m7-6Y75, succeeding the Core M-5Y71.
  • Be about 25% faster, judging from the single-core Geekbench score, comparing the old high-end to the new high-end CPUs. Those scores look good (maybe too good), and would make the new high-end CPU just 5-10% slower than a 2013 Core i7 MacBook Pro.
When Apple introduced the 12" MacBook in 2015, it was in the ultra-portable category: it was a designed to be light and small, but compromising on performance, the availability of ports, and the price. And this is fine, because ultra-portables aren't designed to be entry-level machines; they are not expected to be used by, say, high-school students. Instead, ultra-portables are laptops typically used in addition to another machine, either a desktop or a more powerful but also more bulky laptop. The ultra-portable is the laptop you take with you when go to a coffeeshop, to a meetup, to a conference, on your vacation, on a business trip, or your couch at home, when you don't need anything more powerful.

In short, the 2015 12" MacBook was an ultra-portable, and not a replacement for the MacBook Air. But I have reasons to think that Apple has plans to expand the role of the MacBook, and have it progressively take the place of the MacBook Air as their new entry-level laptop:
  • The name – In 2015, Apple didn't call it the MacBook Something, with Something wisely chosen to evoke "ultra-portable". Instead, Apple just called it MacBook. This makes sense if you have in mind a lineup where you have the MacBook (for entry-level users), and the MacBook Pro (for power-users).
  • The small size of the market (pun intended) – The ultra-portable category exists because there is a market for it, but it is a small market, compared to entry-level and professional laptops. (For PCs, there is a fourth category: gaming laptops, also a smaller market.) I think that in 2015 Apple introduced an ultra-portable not to enter into a new category but as a way to develop more expertise in building lighter and thinner machines, with the idea that this technology would then be used on its entry-level and pro laptops. And isn't this exactly what they did with the MacBook Air? Remember how, when it was introduced, the MacBook Air was so expensive and slow, but so thin?
  • The shrinking size of the market – The new MacBook Pro is expected to be announced this summer, and to be much thinner. This will make the MacBook less appealing to MacBook Pro owners, as more of them will will consider their new MacBook Pro to be small enough.
Will Apple reposition its 2016 MacBook as more of an entry-level laptop? Here are some signs I'll be watching for:
  • A lower entry price – The 2015 MacBook started at $1,299. There is no way Apple will lower the price all the way to $899, the level of its least expensive MacBook Air. But they could move in that direction. (This also tells me that the MacBook Air will stay, at least for one more year, so they can keep a product at this price point.)
  • An additional USB-C port – One port is fine for a machine you mostly use away from your desk, but a second USB-C port, on the other side of the machine, like on Google's Pixel, would allow it to better compete as an entry-level laptop.
Will Apple do anything to move the MacBook towards being more of an entry-level laptop? Or do nothing special, and keep the MacBook firmly in the ultra-portable category, for at least one more year? Or do something completely different? We'll see. Hopefuly, very soon.

Thursday, April 14, 2016

Google Has A Language Problem

Apple had a language problem, which it solved in 2014 with Swift. It is now Google's turn to be in a situation not unlike Apple's, before the introduction of Swift: Google has a language problem.

The problem is Java, which is used to develop apps on Android, and internally at Google to create many of their own apps. The issue with Java is that it is controlled by Oracle, a company Google is fighting in court, and as a 20-year language that evolves very slowly, it is now just plain obsolete. To solve this problem, Google needs a new language, and I see 3 possible contenders, Kotlin, Swift, and Scala:

Kotlin Swift Scala
Benefits compared to Java High High Very high
Controversial Low Medium High
Difficulty to target Android Low Hard Medium
Difficulty to target iOS Hard Low Medium
Difficulty to target the Web Medium High Low

Other alternatives exist, but seem less realistic, at least in the short term:
  • A new Google language - Apple created its own language: Swift. So, couldn't Google come up with their own language as well? This would be a major undertaking. It isn't something outside of Google's league, but if such a large project was underway and getting even remotely close to something they could release, Google being a fairly open company, we would by now have heard about it.
  • An existing Google language - That would be: Go or Dart:
    • Go is designed for system programming, not application programming. It doesn't compete with languages like Kotlin, Swift, or Scala, because it wasn't designed to.
    • It would be all too easy to criticize Dart as a programming language, or describe how much of a failure Dart has been as far as its adoption goes, both within and outside Google. But there is no need to go there given the question that interests us. It suffices to say that Dart, maybe even more so than Go, hasn't been designed to compete with languages like Kotlin, Swift, or Scala, but rather in an attempt to be attractive to JavaScript developers reluctant to use strongly typed languages (ultimately a market it lost to TypeScript).
Getting back to our 3 contenders, no clear winner emerges from the above table:
  • Swift has a lot going for it, but a large amount of work would be needed to make it a viable first-class programming language for Android (think: IDE, APIs, interop with existing code). And maybe even more importantly, how wise would it be for Google to bet on a language designed and controlled by one its competitors?
  • Scala is the best technical solution, both for the capabilities of the language itself, its IDE support (JetBrains' own IntelliJ, Eclipse, and through ENSIME in Emacs, Vim, and Atom), a rich library ecosystem, its ability to target the web through the production-ready Scala.js, and a project underway to create a LLVM backend, which would enable it to target iOS. But the complexity of the language, both real and perceived, is a big hurdle to overcome.
  • Kotlin can be seen as a lesser-Scala: from a technical perspective, it might not be as strong as Scala, but it is strong-enough, and it is less controversial than Scala, and thus easier to sell to Java developers.
If I were Google's language tzar, that is, in the unique position to decide on Google's language strategy, I could see myself go with Scala. If instead, I had to bet on what option Google would go for, assuming it goes for one, I would put my money on them adopting Kotlin.

JetBrains is, to their credit, a fiercely independent company, so I'd be surprised if Google were to acquire JetBrains, but I can see Google announce they will support Kotlin as a first-class language for Android development, along Java. And maybe even will work with JetBrains to improve their JavaScript backend, and together work a on an  LLVM backend, ultimately allowing the same code to be compiled for Android, iOS, and the web.

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: