I know karate, voodoo too

Category: Uncategorized

Talk is Cheap

As Steven Pinker has observed, “No mute tribe has ever been discovered, and there is no record that a region has served as a ‘cradle’ of language from which it spread to previously languageless groups.” Speech came naturally—it did not have to be invented. But writing did… Though linguists have documented more than three thousand languages currently being spoken throughout the world, only about a hundred of those languages have been written down. What’s more, over all of human history, writing was independently invented only a few times, and it made its way around the world mainly through cultural diffusion, being borrowed or adapted from existing systems rather than being repeatedly reinvented.

— From Leonard Mlodinow’s The Upright Thinkers. The Steven Pinker quote is from his book, The Language Instinct (1994).

Python Timing Compare

As part of a recent PyData talk, I did some timing tests to compare the performance of various methods of translating a large number of geographic locations represented as ECEF XYZ to latitude / longitude / altitude.

I ran this for both 10,000 points and 1,000,000 points using the following methods:

  • Native Python (using built-in lists)
  • Numpy
  • Pandas
  • Numba (using Numpy array then Pandas DataFrame)
  • Numexpr (using Numpy array then Pandas DataFrame)
  • Cython (with Numpy array)
  • Cython Parallel (with Numpy array)

You can find the code here in a Jupter notebook.

The results are below. There is an issue worth noting (that I haven’t had time to run to ground) and that is that clearly the parallel Cython implementation is not correct since it is virtually identical in timing to the non-parallel implementation.

Summary Table

Execution Time (per point)

Compare to Native Python

No Slackers

I remember listening to a talk by Martin Fowler (although it could have been Kent Beck) recently where he mentions the Facebook poster that says “Nothing at Facebook is somebody else’s problem.” It’s posted all around the company. He tells an anecdote about the Facebook mobile app and how the entire company uses the beta app so as to find all of the bugs before it goes to the masses. If one was ever to say (and occasionally a newbie does) “this beta is painful to use… I am going to go download the legit release from the AppStore” then the FB culture shines through. “No, you most certainly will not. You will use the beta like everyone else, so that our customers see as few bugs as possible. If you are frustrated by a bug, then fix it.”

nafisep

Too often within an organization there is a tendency to lay the blame for the problem at the feet of others. This tendency can fester and begin to seep into the culture. Rather than being one team with one goal the organization becomes snipping factions.

Churchill

524_Winston_Churchill_becomes_PM

From The Rise and Fall of the Third Reich, a great quote from Winston Churchill. This was June 1940 right after the evacuation of Dunkirk.

Even though large tracts of Europe and many old and famous States have fallen or may fall into the grip of the Gestapo and all the odious apparatus of Nazi rule, we shall not flag or fail. We shall go on to the end, we shall fight in France, we shall fight in the seas and oceans, we shall fight with growing confidence and growing strength in the air, we shall defend our island, whatever the cost may be, we shall fight on the beaches, we shall fight on the landing grounds, we shall fight in the fields and in the streets, we shall fight in the hills; we shall never surrender, and even if, which I do not for a moment believe, this island or a large part of it were subjugated and starving then our Empire beyond the seas, armed and guarded by the British Fleet, would carry on the struggle, until, in God’s good time, the New World, with all its power and might, steps forth to the rescue and the liberation of the Old. (June 4, 1940)

Picking up with the author’s (William L. Shirer) commentary:

Why should Great Britain fight on alone against helpless odds? Especially when it could get a peace that would leave it, unlike France, Poland and all the other defeated lands, unscathed, intact and free? This was a question asked everywhere except in Downing Street, where, as Churchill later revealed, it was never even discussed, because the answer was taken for granted.

Let us therefore brace ourselves to our duties, and so bear ourselves that, if the British Empire and its Commonwealth last for a thousand years, men will say; “This was their finest hour.” – Churchill (June 18, 1940)

Data Smart Sans Excel

This is very much a work in progress, but I am process of working through the exercises in Data Smart using python in an IPython notebook.

Data Smart is a data science book written by John Forman (of MailChimp). The book is very hands-on, with lots of exercises / examples. John wanted it to be a “code free” book (at least for the first few chapters), so he uses Excel as the primary data tool. I thought it would be a helpful learning exercise to work the problems in the book with python.

It lives here: Data Smart Sans Excel Notebook

 

© 2024 Luke Starnes

Theme by Anders NorenUp ↑