Interesting Stuff: November 2018

I read quite a bit. Sometimes I like what I read and sometimes I don’t. I generally do not talk about what I dislike but the interesting stuff is worth mentioning.

Noteworthy books:

Noteworthy videos:

Can you teach an old dog new tricks?

I graduated from software engineering (specialization: AI and robotics) a long time ago. The AI specialization was a big deciding factor for me. I was an avid science fiction reader (dreamer?) and had ideas of building the first “positronic” brain (please don’t laugh, I’m still uncomfortable as to how naive I was).

When I finally got to the AI courses (after three years of engineering), I was a bit disappointed. The courses were less about Neural Networks (NNs) and a lot more about “general” Machine Learning (ML) (e.g. linear regression and the like). The little we learned about NNs was theoretical and very very basic (e.g. perceptrons).

Fast forward a couple of decades and things are different. First, data sets are much larger and more readily available. CPUs are more powerful. This makes the analysis of these data sets feasible and relatively cheap. Finally, you also have a rich eco-system of languages (e.g. Python, R) and frameworks (TensorFlow, Pytorch) that make the NNs accessible for laymen.

Given all of this, I decided to take a couple of months off to get back to AI. I’m unsure if this is a career move or will just be a hobby. My younger self’s interest in AI and NNs might have faded and been replaced by other things but since I don’t want to live with past regrets, I’ll give it a go.

I’ve built myself a study plan. I have time-boxed this experiment until January. After that, I’ll make a decision as to what to do next.

So my approach to learning AI is as follows:

Learning Python

First, most frameworks and tools use Python as their “preferred” language. I have no experience with Python. My first goal is to first become knowledgeable about Python. The ideal would be for me to be able to say I’m an intermediate Python programmer. Here, I’m hoping that my experience with other languages, Java, Ruby, Javascript will help. The resources I will use are:

I like the Jose Portilla courses, there’s a lot of exercises which are a must to learn a new language. I probably also need to think about a project or two to learn the language better.

Learning Machine Learning Techniques

Next, I want to get a broad overview of the current state of machine learning. The following resources will be used:

The second resource is a university course book, I’m unsure that this is the level where I should take this but since I haven’t looked the AI in many years, I’ll at least take a quick look at it as a refresher.

Learning Neural Networks

So there’s a decision that I’ll need to make here. Should I select PyTorch or TensorFlow? Are these two frameworks so dissimilar that I really need to select one? I’m not sure. For the moment though, I’ll focus on TensorFlow as online courses are more readily available. By the time I get to this section of my curriculum, things might be different though. We’ll see. For the moment though, the resources I’ll use are:

I’ll try to blog a little bit about what I find out during this experiment.

Leaving Facebook for a short time

I’m getting out of Facebook for a month. I’ll see how things go but if things go as I think they will, I will not go back. I’ve been thinking about doing this for a while but the trigger for it is the following video:

It’s an interesting video. In it, Tristan Harris lays a claim that the goal of Facebook (and of the other content providers, e.g. YouTube, Netflix, etc) is to get as much of your attention as possible. There are 24 hours in a day, you sleep 8, the 16 other are up for grabs. These companies are ruthlessly competing with one another to steal as much of your attention as possible. They create algorithms to ensure that you spend as much time as possible on their website(s) and they constantly tune them so that you are less and less likely to leave.

In the video (minute 6:45), Tristan comments on how this problem can be fixed:

  1. Accept that you are persuadable
    You have to accept the fact that you are no match for a bunch of neuroscientists, psychologists, computer scientists whose job it is to keep you addicted to their website.
  2. Need new models for accountability systems in these organizations
    The accounting models used are totally geared to maximize profits. These companies will appeal to the lowest common denominator, they will hit your lizard brain, put you in an echo chamber for your political views, anything to keep you hooked. You should be clear about your goal when you use a website, does it do what it’s supposed to do? Or are you simply getting a dopamine hit?
  3. Design Renaissance
    The UX of these websites should protect against the timelines you don’t want and empower the timelines that you prefer.

I agree with 1 (I have no doubt that I am persuadable) but do not believe that 2 (transparency in accountability system) will happen. As to 3, as it implies a change in the accountability model (which I already don’t accept), I don’t believe it will happen.

Facebook is particularly insidious compared to sites like Netflix. There are two reasons for this:

  1. Facebook is “non directed” in its very nature, you don’t have a “strong and clear” goal when visiting it. Netflix is less pernicious because you direct it. You go to the website and you decide to watch a given tv show. The fact that it plays the next one is more in your control and is certainly more in tune with your initial interest.
  2. Facebook is solely ad-driven. Netflix is not. At the end of each month, you pay around 10$ to Netflix. At that time you usually think about the value that was brought to you over the last month. Facebook is “free”. You only give away your time….

So how would the accountability system of Facebook change from valuing the capture of the user’s time to providing real value provided to the user (e.g. improving relationships with connections)? It will only change if Facebook migrates away from an ad-driven model to a paid subscription model. Can this happen? I don’t think so. It’s more likely that a competitor comes in with a totally different business model.

In any case, my goal is to be the best person I can be and there is simply no way Facebook is presently helping me achieve this. Yes, I can see updates from friends but most of them are trivial. I would do much better writing these friends or even better spend time with them. A lot of people I have on my Facebook are also “connections”, not true friends. What do I care, what Person X ate last week? This is totally useless information. There can be serendipity in some of the information provided but it seems to me that there a deficit if you do the difference between the value obtained from time spend (a formula for this would be great!).

P.S. On a totally different note, if you want to read about alignment of concerns, take a look at David Swensen’s “Unconventional Success: A Fundamental Approach to Personal Investment”. At the time, it changed my life.

2017 is my year of functional languages

It’s a brand new year, time to set some goals!   Software wise, my main goal this year is to get familiar with functional programming.

I want to accomplish by learning two languages that I’ve had on my radar for a while: Elixir and Elm.  Not sure if this is “career advancing”, I doubt it, but from the little that I know from both languages, I’m fairly certain that I will learn something that I can bring back to the Java and Javascript worlds.

So, why Elixir and Elm?

First, Elixir is intriguing.  Elixir runs on top of the Erlang VM.  It uses the same VM that powers WhatsApp…. and WhatsApp is VERY performant.  You can find articles and videos on it here:

There seems to be little doubt that a language built on top of the Erlang VM will be performant.

Now, why not learn Erlang instead of Elixir?  Elixir was created by Jose Valim, a key contributor in the Rails world.  He created the “Devise” library in Rails.  I’ve since looked at the Elixir API and it was definitively heavily influenced by the Ruby and Rails APIs.  I’m just hoping to cut some of the API learning time by leveraging some of my Ruby experience and focus on the new stuff: functional programming proper.

One language should be sufficient to learn how functional programming work but I’ve decided to also dig into Elm.

This is an emotional decision, I think.  I listened to a few podcasts that intrigued me:

I’m not crazy about Javascript and I think that I’m just looking for an alternative that I find more pleasing.  It’s not a dynamic vs compiled language decision, I’m fine with Ruby which is dynamic and I’m fine with C++ and Java, which are compiled.  My problems with Javascript are in some of its details. For example, the equality logic (or rather that weird casting it does).  I’m not crazy about the prototype model stuff either.  It’s pretty far from a what a good OO language should be.  Even frameworks like Angular are a bit annoying because they have to piggyback on some of the idiosyncracies of the JS.  (Though ES6 and Angular2 might make me change my appreciation of Javascript, we’ll see).

Elm is a “transpiled” language (Elm -> JS).  Furthermore, it is typed.  It has meaningful error messages and has an intriguing programming model that looks like it might help out with the asynchronous nature of client application.  Everything in an Elm program is message based.  So really, it’s all asynchronous.

So, there you go.  My plate is full.  It’s going to be interesting.

 

Music and stuff in 2016

Finally, 2016 is done.  It was a crappy year.

Yes, the US elections were a downer.  Whomever you were rooting for, you have to be concerned about the level of division, even hatred that was seen on both sides.  Hopefully, now that things are resolved, people will get back to their lives, try to patch things up and move on.

I love music and this was a particularly sad year.

I will miss Leonard Cohen.  I’m from Montreal and always felt some kinship with him.  He’s a product of my parents’ time and though I never lived in those days,  my dad was always a fan of the “man with the golden voice”… and somehow it made an impression on me (so did my parents’ love of Jacques Brel… but that’s another story).

I will miss Prince.  I didn’t love everything he did, but he was PRINCE, man!  The guitar work was amazing, check out his solo on “While my guitar gently weeps” on  this Rock and Roll Hall of Fame rendition, or this accoustic version of “Cream“.

I will miss David Bowie. I became “aware” of him quite young.  I remember being transfixed by the video of “Ashes to Ashes“, which was playing at my cousins’ during New Year’s Eve, many many years ago (close to 40 years ago??? wow!).  It had all those weird sounds and visuals.  That being said, it took a few more years for me to truly get an appreciation of his earlier stuff.

On a more positive side, I saw Pearl Jam live for the first time this year.  They left everything on stage.  Eddie’s voice is still amazing, even after all these years.  My impression is that  PJ never compromised.  Love them.

On a personal side,  my wife and I were blessed by the arrival of our baby daughter. She’s healthy, beautiful, funny.  So basically, life is a-ok.

 

Leaving Facebook for a short time

I’m getting out of Facebook for a month. I’ll see how things go but if things go as I think they will, I will not go back. I’ve been thinking about doing this for a while but the trigger for it is the following video:

https://www.youtube.com/watch

It’s an interesting video. In it, Tristan Harris lays a claim that the goal of Facebook (and of the other content providers, e.g. YouTube, Netflix, etc) is to get as much of your attention as possible. There are 24 hours in a day, you sleep 8, the 16 other are up for grabs. These companies are ruthlessly competing with one another to steal as much of your attention as possible. They create algorithms to ensure that you spend as much time as possible on their website(s) and they constantly tune them so that you are less and less likely to leave.

In the video (minute 6:45), Tristan comments on how this problem can be fixed:

  1. Accept that you are persuadable
    You have to accept the fact that you are no match for a bunch of neuroscientists, psychologists, computer scientists whose job it is to keep you addicted to their website.
  2. Need new models for accountability systems in these organizations
    The accounting models used are totally geared to maximize profits. These companies will appeal to the lowest common denominator, they will hit your lizard brain, put you in an echo chamber for your political views, anything to keep you hooked. You should be clear about your goal when you use a website, does it do what it’s supposed to do? Or are you simply getting a dopamine hit?
  3. Design Renaissance
    The UX of these websites should protect against the timelines you don’t want and empower the timelines that you prefer.

I agree with 1 (I have no doubt that I am persuadable) but do not believe that 2 (transparency in accountability system) will happen. As to 3, as it implies a change in the accountability model (which I already don’t accept), I don’t believe it will happen.

Facebook is particularly insidious compared to sites like Netflix. There are two reasons for this:

  1. Facebook is “non directed” in its very nature, you don’t have a “strong and clear” goal when visiting it. Netflix is less pernicious because you direct it. You go to the website and you decide to watch a given tv show. The fact that it plays the next one is more in your control and is certainly more in tune with your initial interest.
  2. Facebook is solely ad-driven. Netflix is not. At the end of each month, you pay around 10$ to Netflix. At that time you usually think about the value that was brought to you over the last month. Facebook is “free”. You only give away your time….

So how would the accountability system of Facebook change from valuing the capture of the user’s time to providing real value provided to the user (e.g. improving relationships with connections)? It will only change if Facebook migrates away from an ad-driven model to a paid subscription model. Can this happen? I don’t think so. It’s more likely that a competitor comes in with a totally different business model.

In any case, my goal is to be the best person I can be and there is simply no way Facebook is presently helping me achieve this. Yes, I can see updates from friends but most of them are trivial. I would do much better writing these friends or even better spend time with them. A lot of people I have on my Facebook are also “connections”, not true friends. What do I care, what Person X ate last week? This is totally useless information. There can be serendipity in some of the information provided but it seems to me that there a deficit if you do the difference between the value obtained from time spend (a formula for this would be great!).

P.S. On a totally different note, if you want to read about alignment of concerns, take a look at David Swensen’s “Unconventional Success: A Fundamental Approach to Personal Investment”. At the time, it changed my life.