Book Review: “A guide to the good life”

I forget where and when I first heard about this book. It might be through the “Tim Ferriss Show” or it could have been a recommendation from my brother. Whatever or whomever the source, all I can say is that this book is definitively worth reading.

“A guide to the good life” talks about everything surrounding Stoicism. It discusses its history; from its Greek origin to its Roman adoption. It goes over its major “influencers”; Musonius, Seneca, Marcus Aurelius amongst others. Mainly though, it’s a practical guide as to how best apply Stoicism in modern times…

“A guide to the good life” goes over various Stoic techniques to improve your “tranquility”. Examples include:

  • Negative visualization
  • Practiced poverty
  • Dealing with insults
  • Daily meditation
  • etc.

I’m always been wary of books on philosophy. I usually find them too “meta” for me. This one though is highly practical. Reading it will, in the worst case, educate you about a popular approach to view the world. In the best case though, it might change your life for the better.

The book is filled with tons of interesting ideas. I took many notes and will only reprint a portion of those here. Get the book, it’s worth it.

  • Many ancient Greek and Roman philosophers, for example, not only thought philosophies of life were worth contemplating but thought the raison d’être of philosophy was to develop them.
  • The Stoic philosophy of life may be old, but it merits the attention of any modern individual who wishes to have a life that is both meaningful and fulfilling—who wishes, that is, to have a good life.
  • The Stoics realized that a life plagued with negative emotions—including anger, anxiety, fear, grief, and envy—will not be a good life.
  • Stoic tranquility was a psychological state marked by the absence of negative emotions, such as grief, anger, and anxiety, and the presence of positive emotions, such as joy.
  • We, humans, are unhappy in large part because we are insatiable; after working hard to get what we want, we routinely lose interest in the object of our desire. Rather than feeling satisfied, we feel a bit bored, and in response to this boredom, we go on to form new, even grander desires.
  • One key to happiness, then, is to forestall the adaptation process: We need to take steps to prevent ourselves from taking for granted, once we get them, the things we worked so hard to get.
  • Negative visualization, in other words, teaches us to embrace whatever life we happen to be living and to extract every bit of delight we can from it. But it simultaneously teaches us to prepare ourselves for changes that will deprive us of the things that delight us. It teaches us, in other words, to enjoy what we have without clinging to it.
  • A practicing Stoic will keep the trichotomy of control firmly in mind as he goes about his daily affairs. He will perform a kind of triage in which he sorts the elements of his life into three categories: those over which he has complete control, those over which he has no control at all, and those over which he has some but not complete control.
  • In particular, instead of merely thinking about what it would be like to lose our wealth, we should periodically “practice poverty”: We should, that is, content ourselves with “the scantiest and cheapest fare” and with “coarse and rough dress.”
  • TO HELP US ADVANCE our practice of Stoicism, Seneca advises that we periodically meditate on the events of daily living, how we responded to these events, and how, in accordance with Stoic principles, we should have responded to them.
  • Besides reflecting on the day’s events, we can devote part of our meditations to going through a kind of mental checklist. Are we practicing the psychological techniques recommended by the Stoics? Do we, for example, periodically engage in negative visualization? Do we take time to distinguish between those things over which we have complete control, those things over which we have no control at all, and those things over which we have some but not complete control? Are we careful to internalize our goals? Have we refrained from dwelling on the past and instead focused our attention on the future? Have we consciously practiced acts of self-denial? We can also use our Stoic meditations as an opportunity to ask whether, in our daily affairs, we are following the advice offered by the Stoics.
  • “fellowship is the purpose behind our creation.” Thus, a person who performs well the function of man will be both rational and social.
  • The Stoics, therefore, recommend that we avoid befriending people whose values have been corrupted, for fear that their values will contaminate ours. We should instead seek, as friends, people who share our (proper Stoic) values and in particular, people who are doing a better job than we are of living in accordance with these values.
  • He counsels us, for example, not to waste time speculating about what our neighbors are doing, saying, thinking, or scheming. Nor should we allow our mind to be filled with “sensual imaginings, jealousies, envies, suspicions, or any other sentiments” about them that we would blush to admit.
  • He adds that if we detect anger and hatred within us and wish to seek revenge, one of the best forms of revenge on another person is to refuse to be like him.
  • keep in mind, when insulted, that we ourselves are the source of any sting that accompanies the insult.
  • something external harms me, it is my own fault: I should have adopted different values.
  • in retrospective negative visualization, we imagine never having had something that we have lost.
  • Reason is our best weapon against grief, he maintains, because “unless reason puts an end to our tears, fortune will not do so.”
  • Anger, says Seneca, is “brief insanity,” and the damage done by anger is enormous: “No plague has cost the human race more.”
  • We should, he says, fight our tendency to believe the worst about others and our tendency to jump to conclusions about their motivations.
  • we should also keep in mind that the things that anger us generally don’t do us any real harm;
  • humor can be used to prevent ourselves from becoming angry:
  • when we feel ourselves getting angry about something, we should pause to consider its cosmic (in)significance. Doing this might enable us to nip our anger in the bud.
  • Stoics value their freedom, and they are therefore reluctant to do anything that will give others power over them.
  • Epictetus, therefore, advises us not to seek social status, since if we make it our goal to please others, we will no longer be free to please ourselves.
  • If we wish to retain our freedom, says Epictetus, we must be careful, while dealing with other people, to be indifferent to what they think of us.
  • Our goal should, therefore, be to become indifferent to other people’s opinions of us.
  • She must keep firmly in mind that her wealth can be snatched from her; indeed, she should spend time preparing herself for the loss of it—by, for example, periodically practicing poverty.
  • It is therefore unlikely that a Stoic will bask in any fame that comes her way. At the same time, she will not hesitate to use this fame as a tool in the performance of what she takes to be her social duty.
  • Thus, the proximity of death, rather than depressing us, can be turned to our advantage. In our youth, because we assumed that we would live forever, we took our days for granted and as a result wasted many of them. In our old age, however, waking up each morning can be a cause for celebration.
  • The most important reason for adopting a philosophy of life, though, is that if we lack one, there is a danger that we will mislive—that we will spend our lives pursuing goals that aren’t worth attaining or will pursue worthwhile goals in a foolish manner and will, therefore, fail to attain them.
  • the first step in transforming a society into one in which people live a good life is to teach people how to make their happiness depend as little as possible on their external circumstances. The second step in transforming a society is to change people’s external circumstances.
  • Parents do lots of things for their children, but Stoic parents—and, I suspect, good parents in general—don’t think of parenting as a burdensome task requiring endless sacrifice; instead, they think about how wonderful it is that they have children and can make a positive difference in the lives of these children.
  • Stoicism, understood properly, is a cure for a disease. The disease in question is the anxiety, grief, fear, and various other negative emotions that plague humans and prevent them from experiencing a joyful existence. By practicing Stoic techniques, we can cure the disease and thereby gain tranquility. What I am suggesting is that although the ancient Stoics found a “cure” for negative emotions, they were mistaken about why the cure works.
  • The Stoics regarded the principles of Stoicism not as being chiseled into stone but as being molded into clay that could, within limits, be remolded into a form of Stoicism that people would find useful.
  • MY NEXT PIECE OF ADVICE for would-be Stoics is not to try to master all the Stoic techniques at once but to start with one technique and, having become proficient in it, go on to another. And a good technique to start with, I think, is negative visualization. At spare moments in the day, make it a point to contemplate the loss of whatever you value in life.
  • AFTER MASTERING negative visualization, a novice Stoic should move on to become proficient in applying the trichotomy of control, described in chapter 5. According to the Stoics, we should perform a kind of triage in which we distinguish between things we have no control over, things we have complete control over, and things we have some but not complete control over; and having made this distinction, we should focus our attention on the last two categories. In particular, we waste our time and cause ourselves needless anxiety if we concern ourselves with things over which we have no control.
  • “Nothing is worth doing pointlessly.”)

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.

Printing Camera Case

3D printing merges my interests in geeky, digital stuff and “concrete physical work”.  It’s quite exciting for somebody who mainly deals with “ones and zeroes”.  There’s so much to learn though and I need to expand my comfort zone! So when a friend of mine, asked me to print a camera case that he found on Thingiverse, I didn’t hesitate.

I decided to print it using the following:

  • Plastic: ABS
  • Nozzle temperature: 220C
  • Heated Bed temperature: 80C

At the present time, I use the OpenMatter control software.  The slicing engine I used is “MatterSlice”.

Also, note that I use hairspray to increase adherence on the glass plate.

I’m still learning and there have been a few tries here.  It actually took me three tries to obtain a decent print.

First attempt

My first attempt was unsuccessful.  The structure detached itself from the glass plate while printing the base.  I canceled the print while it was in the middle of printing a bird’s nest.  Sorry, no picture.  It was quite ugly though.

Second attempt (using raft)

This was actually a successful print.  With this second attempt, I used a printing raft, which increased the contact area with the glass plate.  The result is acceptable as you can see.

I’ve left the raft at the bottom of the structure to show what it looks like.  It’s very easy to detach a printing raft, you usually just peel it away.  No need for x-actor work.

My problem with the result though is that some of the surfaces are not as clean as I’d want them to.  This is especially true of the camera case proper which has this surface somewhat “droopy” (again, you see the “wires” of plastic at the bottom of the holder).

Third attempt (using raft and support material)

This is the print I kept and gave my friend.   In this case, I used both a raft and asked OpenMatter to use support material.  Here is the result with the support material still in place:

Removing the support material is similar to removing the raft.  It’s quite easy, you generally just need to peel things off.  Following the removal of the raft and the support structure.  I tried an experiment with a cold acetone vapor bath to smooth out the structure.  Here’s the final result.

Conclusion

It was a very interesting exercise.  It took quite a while as the printing of the two parts take about 3 hours total… so 3 tries of 3 hours took me 9 hours of print time.  The acetone bath did smooth things out a little bit but I probably should have left it a little bit longer as the deposited layers still show (but less).

First 3D printing project: QC15 Earpads

The 3D printer works and I’ve actually managed to print a couple of things but no design of mine yet.   So, this weekend, I worked on my own printing project.

I have Bose QuietComfort QC 15 headphones.  I love them, best headphones I’ve ever had.  They’re getting a little bit long in the tooth though.  I’ve had to change the pads and wire a number of times in the last 5 or 6 years.  A month ago, it became necessary to replace the ear pads:

Totally DONE!

Long story short.  I couldn’t get original parts and therefore had to get knockoffs from Amazon.  They are actually quite a bit less expensive but they simply do not fit.  The pads are much smaller than the original ones and can’t hook in the earphones.  I don’t understand why they can sell these as QC15 replacement pads.

I could have used scotch tape or glue to make them fit but this would not be aesthetically pleasing.  Since I have a 3D printer though, why not use that?  How about I print a small base for the pad that would extend the area of the pad so that it fits in the pad receptacle.

I did it this weekend.  It was actually quite simple.  I used OpenScad and created a 3D structure built through the difference of two ovals.  The ovals were measured using a digital caliper.

Here’s the model for it:

//Parameters

mm=1;

outside_dia_long= 88 * mm;

outside_dia_short= 69.3 * mm;

height= 1.4 * mm;

width= 9.2 * mm;
outside_r_long=outside_dia_long / 2;

scale_val = outside_dia_short / outside_dia_long;

inside_r_long=outside_r_long - width;

difference() {

	scale (v=[scale_val,1,1]) cylinder(h = height, r=outside_r_long);

	scale (v=[scale_val,1,1]) cylinder(h = height, r=inside_r_long);

}

Printing it took about 20 minutes (per pad extension) and here’s what it looks like:

So I’m quite happy with the result.  I probably could have done something using a piece of wood and some sawing, cutting and sanding…but the 3D printer allows me to go from a very physical to a more abstract world where I can express things mathematically (at which I am a little better).

Hopefully, this is just a start.  I’ll get more familiar with the technology and print more impressive stuff in the future.  Again though, very very happy about the result.

Building Rostock 3D printer (part 7 – LCD Panel)

The printer assembly is almost complete.  Mechanical pieces are all in and electronics is in.  The last thing to do is to put the LCD panel on the printer and we’ll be (almost on our way).

The LCD panel sits in front of the electronics board.  It allows you to see various information about the status of the system (e.g. Current temperatures (hot end, bed), elevation of the hot end, etc).  It also allows you to have access to some basic functions without having to use a connected computer (e.g. Homing the hot end, changing the elevation of the hot end, marking the Z height, etc).

The LCD panel installation apparatus composed of three components.  There is the LCD panel proper, the flat connector wires and the board adapter.  Installation should be quite easy.

Practically, I advise you to follow the instructions in the manual and mark every piece and connector with an A or B to indicate which connector end should be used where.  The main reason for this is that you may receive one of two potential LCD panels (red or white).  Each one should be the same, but the providers had a different understanding of where the pin 0 should be… Consequently, if you are using the red board, you have to reverse some of the connections.  Having A or B on each of the wires and connectors makes it easier to do.

The installation of the LCD panel was trivial, it took me about 5 minutes.  When I turned the printer on and looked at the display, things were not as expected.  I got two blank rows of data displayed.  This definitively wasn’t expected.

As with software, I first doubt myself… so I checked all the connections, made sure that everything was ok… Not my fault apparently… I then doubted seemecnc’s documentation, so I reversed the connectors, made it match the white pin-out… No success either.  Finally, I started doubting the LCD panel itself.   So I contacted seemecnc to discuss my issue.

I sent them an email on Friday, got an answer Monday morning.  We exchanged emails for a bit, sending pictures back and forth.  Ultimately, it was agreed that either the LCD panel, the wires or the panel adapter were not functioning properly.  Seemecnc sent me new pieces, which I got 3 days later.

I changed the LCD panel only, leaving the original board adapter and wires and success! I now have information displayed on the screen.

Kudos to seemecnc who were courteous, knowledgeable and very helpful in resolving this problem.  Thanks!

Building Rostock 3D printer (Part 6 – Electronics)

Next, the electronics.  The Rostock Max uses an Arduino based board, called RAMBo (I always wonder if the acronym is found before the meaning for it :-).   In any case, the RAMBo board was developed through the RepRap projects.  It’s cheap, stable, got tons of people working on it and is very easy to install.

In the case of the Rostock Max v2, it goes in the base of the printer.  There’s a bit of soldering to be done.  Most of the wires that were driven through the towers end up connected on the board.  There’s a bit of soldering to be done.  If you are handy with a multimeter, lucky you, it might be a good idea to check the connections once more, prior to connecting the whole thing.

Here’s a picture of the board installed.  You can see the stepper motor wires at the bottom.  The stop end wires are the black and white wires in the middle of the board.  Hot end and fans are mainly on the side. 

This part of the assembly took me the most time.  The reason is that I dreaded the idea of connecting something incorrectly or having a short.  Those issues are difficult to debug for a software guy like me.

In any case, assembly went well.  I turned the power on and there was no smoke coming from the board… Small victory!

Overriding resque spec

This is a reminder to myself mainly… It’s the second time in the last 6 months where I lose valuable time because of this error.

If you are using the Resque spec gem in an engine, make sure that you do NOT include it in the development dependencies of the “gemspec” file. Doing this overrides the default Resque send mechanism and prevents message enqueuing. Instead, you need to modify the “Gemfile” as follows:

group :test do
  gem 'resque_spec'
end

This seems to do the trick. I couldn’t find a more elegant solution. I could use the disable_ext option but that’s even more ugly.

Building Rostock 3D printer (Part 5  – Installing the extruder)

I found this to be the easiest part of the assembly process.   The extruder is the mechanical device that pushes the filament all the way down to the hot end.   The extruder proper is a simple stepper motor, attached to the top plate of the 3D printer and pushes the filament down a Bowden tube.

Here’s a picture of the extruder before I attached it to the top plate.

From the picture, you can see the motor and the extruder proper attached to the motor.  The filament is inserted at the top and is pushed at the bottom.

Here’s a picture of the extruder and the Bowden tube connected to the hot end. For display purposes, I have reversed the arms of the hot end.

That’s pretty much it for the extruder, quite easy.