Jeff Mesnil

Apple Profits and Humanity Losses

During the last quarter of 2011, Apple generated sales of $46.3 billion. 37 millions of iPhone were sold during that period.

From a New York Times article, we learn how Apple was able to build its devices:

Apple executives say that going overseas, at this point, is their only option. One former executive described how the company relied upon a Chinese factory to revamp iPhone manufacturing just weeks before the device was due on shelves. Apple had redesigned the iPhone’s screen at the last minute, forcing an assembly line overhaul. New screens began arriving at the plant near midnight.
A foreman immediately roused 8,000 workers inside the company’s dormitories, according to the executive. Each employee was given a biscuit and a cup of tea, guided to a workstation and within half an hour started a 12-hour shift fitting glass screens into beveled frames. Within 96 hours, the plant was producing over 10,000 iPhones a day.

In a related news, the President of United States want to get manufacturing jobs back in the USA:

No, we will not go back to an economy weakened by outsourcing, bad debt, and phony financial profits. Tonight, I want to speak about how we move forward, and lay out a blueprint for an economy that’s built to last -– an economy built on American manufacturing, American energy, skills for American workers, and a renewal of American values.

Apple is far from being the only one to profit from outsourcing its production but with its stunning profits, it is emblematic of the failure of capitalism to balance profit with humanity bien-être.

Apple success is well deserved, they have an outstanding line of products and I own many of them. I bought an iPhone 4S during this quarter and it is the best phone (and pocket camera) I ever had. However, I can not accept that someone is woken up in the middle of a night, given a biscuit and a cup of tea and has to work 12-hour to build a device I use sitting in my couch.

We would live in a better world if the companies profits (from Apple and all the others) could be used to create new jobs or at least provide decent working conditions when they outsource their production.

Brent Simmons on Web Publishing ☛

Very interesting triptych from Brent Simmons about Web publishing:

In other words, content! content! content! (as in quality, not quantity).

It’s a sad state for Web publishing when I need to use a mix of Instapaper, Readability, Safari Reader to have a sane reading experience without advertisement overload (and unfortunately, I know what an interstitial is…).

stomp-websocket converted to CoffeeScript

One of the joy of working with Open Source projects is when you get an awesome contribution coming out of nowhere.

Jeff Lindsay requested to pull one of his branch of stomp-websocket where he converted all the code to CoffeeScript, added unit tests with a mock implementation of a WebSocket server. This work is a preliminary for more features (including a much-needed support for STOMP 1.1).

When he offered to pull its branch, he wonders if the move to CoffeeScript was controversial and if I would accept it.

stomp-websocket is meant to run inside Web browsers and leverage the Web Sockets API. When I wrote it, JavaScript was a no-brainer.

However I have started to question this choice recently.

I have a pet project where I use node.js and I am making countless JavaScript code mistakes (I was bitten by this one last week, thankfully I have not released my project yet).

As much as I like JavaScript and its related HTML5 APIs, I must admint I am not a good JavaScript programmer and I want a language that helps me instead of trapping me. I started to read about CoffeeScript as a replacement of JavaScript. I find the language more pleasing to read even though some syntax conventions makes it more cryptic than concise.

I am quite pleased with the new code of stomp-websocket in stomp.coffee. It reads much better than the original stomp.js, there are no longer noisy this, that or vars (when they are not missing by errors!).

However, the JavaScript code compiled by CoffeeScript does not look good. I suppose I must stop to look at the compiled JavaScript and instead consider it as the assembly language of the Web.

In any case, the transition should be transparent for developers using stomp.js: the new generated stomp.js offers the same API than the previous one.

If that is not the case, please report any regression or bug on GitHub issue tracker.

As usual, do not hesitate to contribute:

git clone git://github.com/jmesnil/stomp-websocket.git

As Jeff Lindsay can attest, I welcome good contributions :)

Qui Veut Aller Loin Ménage Sa Monture

That’s the French proverb for “Slow and steady wins the race”.

Uncle Bob:

Rich [Hickey] makes the point that sprinters run fast, but not long. Then he says that Agile “solved” this problem by just firing the starting gun over and over again in quick succession. He grins, and the audience laughs. Then he goes on to say that continuous sprinting does not necessarily makes systems simple, and simplicity is the real key to speed.

That is exactly the issue I have with Scrum and other so-called “agile” methods. It sacrifices long-term design and overall quality for fast short-term hacks. Sometimes there are no shortcuts for long hard work to end up with something simple.

Simple and easy are not interchangeable concepts…

As a bonus fo French readers, a post with a different perspective on the different meanings of simplicity by a colleague, Johan Martinsonn: Pas si simple de faire simple.

Clojure on Heroku ☛

Heroku explains why they have added Clojure support in addition to Ruby and node.js:

Ruby, Javascript, and Clojure are all general-purpose languages, but they each excel at certain use cases. Ruby’s highly dynamic nature and emphasis on beauty makes it a natural fit for user-facing web apps. Node.js’s evented concurrency makes it a great fit for the realtime web. Clojure covers a new use case on the Heroku platform: components which demand correctness, performance, composability; and optionally, access to the Java ecosystem.

The right tool for the right job.
More choice for the tool helps get the job done simpler and faster.

colorapi, color chart search ☛

This tool is a good idea to find original colors for Web design.

It is also one of the best use of node.js I have seen. I just have one nitpick: I don’t understand the fascination with using the hash-bang and what it brings to this kind of web app instead of using Plain Old Stupid URLs

D.F.W.: “This Is Water” ☛

David Foster Wallace:

There are these two young fish swimming along, and they happen to meet an older fish swimming the other way, who nods at them and says, “Morning, boys, how’s the water?” And the two young fish swim on for a bit, and then eventually one of them looks over at the other and goes, “What the hell is water?”

There is no better moment, at the dawn of a new year, to read again this speech from David Foster Wallace made all the more poignant by his suicide and be reminded about what is important in our lives:

The really important kind of freedom involves attention, and awareness, and discipline, and effort, and being able truly to care about other people and to sacrifice for them, over and over, in myriad petty little unsexy ways, every day. That is real freedom. The alternative is unconsciousness, the default setting, the “rat race” – the constant gnawing sense of having had and lost some infinite thing.
[...]
It is about simple awareness – awareness of what is so real and essential, so hidden in plain sight all around us, that we have to keep reminding ourselves, over and over: “This is water, this is water.”

Happy New Year. May this year fill all lives with happiness and health.

Uncharted 3: Drake’s Deception Trailer ☛

The trailer is quoting T.E Lawrence‘s Seven Pillars of Wisdom introduction (which is one of the best prose ever written) and there are cameo pictures of Lawrence wearing the english uniform and the traditional arabic dishdasha.

It makes me looking forward to playing this game.

Who’s Passing to Who ☛

The guys at hoopism.com have created interesting diagrams connecting for each NBA team the passer to the scorer.

From the diagram above, we can see that Tony Parker assists were mainly for Tim Duncan and Richard Jefferson, while Manu Ginobili distribution is more diversified (George Hill, Dejuan Blair and Antonio McDyess in addition to Duncan and Jefferson).

As an aside, the diagrams at hoopism.com are drawn using a Processing-based Java applet. They are the single reason I activate Java Applets on my laptop…

(via TrueHoop)

Understanding the Nikon ISO Sensitivity Auto Control ☛

The ISO Sensitivity Auto Control (ISO-AUTO), found under the Shooting Menu, is a powerful feature in many Nikon DSLR cameras. It’s used to allow the camera to automatically control the ISO sensitivity and shutter speed, according to the light levels sensed by the camera. It’s very helpful when you don’t have time to deal with exposure issues—yet must get the pictures.

A good explanation to Nikon Auto ISO setting.

It is useful when shooting with a prime lens (35mm f/1.8) when the light conditions change because I know the minimum shutter speed I need to prevent blur.
However, I disable it when I use a zoom as the minimum shutter speed varies too much depending on the focal length (esp. with my 70-300mm).