Micro-TILs

Recently I started learning elixir. During this process I came across two TIL blogs.

First one is TIL app created by Hashrocket.

At first they created it in Rails .

Recently they created (ported ?) it to Elixir. Source

The other is more interesting to me. One of the (ex?) HashRocket engineer Josh Branchaud has his own til repo Although he hasn't published these anywhere (Other than this public repo) it contains a lot of gems.

The way these are different is that each entry is a tiny piece of useful information. Small enough that I would not have called it a blog "post". But who is to say how much should a blog post be ? After all, several tweets that are just under 140 character contain the useful information.

I too have collected several "notes" over the years. I never organized nor publish them, thinking "no one needs them", but who am I to decide ? May be some one will find these useful.

So I have decided to decide to publish these as and when I learn. I may post some of the older ones initially as well.

I call them "Micro-TILs" !!

Sidney Sheldon

I had known Sydney Sheldon as an author of several best-selling novels like "The Other Side of Midnight", "Rage of Angels", "Master of the Game" etc. I grew up reading his novels (mostly marathi translations)

Later, during my few years in US, I used to watch "I Dream of Jeanie" and came to know him as the producer and writer of this show.

Little did I know, that I had all this backwards. Literally.

Recently I read his autobiography "The Other Side of Me". It turns out he had a huge career in Hollywood and Broadway before that. Later in life, he did television, and lastly a novelist.

The book starts with his thoughts of suicide when nothing was going right for him. This was during the peak of "great depression". His father talked him out of it. (He referred to both his parents by their first name)

He later reveals, that later in his life (After he won an Oscar) when he visited a psychiatrist, that he suffered from "Manic Depression", and "1 out of 5" people suffering from this end up taking their own life. (Sydney Sheldon lived till the age of 89, just 12 days short of his 90th birthday)

During his initial days he worked in a pharmacy, in check room of a hotel, and struggled as a song writer. He got his break, writing plays.

During the World War 2, he joined the armed forces and was trained to be a pilot. He was never sent to the active war zone due to his slip disk problem. He continued his work on Broadway.

At one point, he had three musicals on Broadway.

This eventually lead to his entry in Hollywood. He won an Oscar for his first screenplay.

He worked with several leading men and women of those days.

He eventually became a producer, worked with several leading movie studios of the time.

During the initial days of Television, people from Hollywood considered Television as their rival, and wouldn't do TV. Sheldon was (probably) one of the first people to move to Television. (He had almost decided NOT to do television, till he met Patty Duke, the star of the proposed Sitcom, over lunch, just as a courtesy)

Towards the end of the book, he says that he had a plot that was "begging to be written" but thought that it would not be a good material for visual medium like movie or television, since he wanted to share the "thoughts" of the leading character with the audience. That is how he become a novelist, and then wrote several novels and became best selling author.

The biography ends with publishing of his first novel.

In the last chapter of his book, he talks about few interesting experiences he had when doing research for his novels.

Just like his other books, it was a great read.

Growing up in South Africa during the Apartheid

Note: These are not MY experiences

This week I listened to two podcasts that happen to talk about growing up in South Africa during the Apartheid. It is one thing to read about it online, and quite another to hear experiences from someone who was part of it growing up.


The first story is that of Susan David, the Author of the book Emotional Agility She recently appeared on the James Altucher Show (Episode 203) which is where I heard this story.

Susan was a white female, growing up in South Africa during the Apartheid. She had a nanny - a black woman - who was very kind to her. She was Susan's friend, confidant, and "second mother". Susan grew up in an area designated only for "white" people, the nanny could not stay with her family. That means she was separated from her own children.

Once a year, she would travel to meet her family, children for 48-72 hours. She would carry gifts for them, but what was heart wrenching was that the shoes, or cloths won't fit, since the last time she has seen her children they were (say) 5 years old, and now they had grown (and were 6 years old) and thus shoes/cloths won't fit.


The other story is about Trevor Noah, the new host of the Daily show. He was recently interviewed on the Freakonomics Radio podcast.

Trevor was born and raised in South Africa to a black mother, and white European father. So he was a mixed race kid. As per the Apartheid laws of that time he was "born a crime" (Thus the name of his book). That means, neither of his parents could openly "own" him.

His mother would pretend to be his "baby sitter" if they were seen together, and his father would "run away", if he called him "daddy" in public place.

He says, he was "lucky" to go to a school that was considered a "white" school.


To listen to the complete stories, with the full context, listen to the podcasts. Links given above.

Sketches : Hands

This post comes from a podcast episode called "Fool me once". So the title of this post is apt. The post does not contain a drawing of a hand. ;)


I recently started listening to a new podcast called "Tell me something I don't know". TMSIDK for short.

In this episode one of the contestant, A.E. Kieren [1] , tells us that "hands" are conspicuously missing from the Art of the renaissance period.

The reason being that hands are very difficult to draw, and hence the artist would "charge" extra if the "paid" assignment required the hands to be included.

On a lighter note, he suggest that now onwards, if you see a portrait from the renaissance period without hands, feel free to assume that the person who commissioned that portrait was "too cheap to pay extra for the hands" 😉

[1]

A.E.Kieren is an artist himself. He drew sketches of the judges of this episode, which you can see on the episode page. He mentions that during his college days, his teacher told him "hands" were his weak spot, in front of the whole class So he created a separate sketchbook just for "hands" and practiced "hands" relentlessly, each day.

Writing golang code with spacemacs

Since I use spacemacs, everything is easy.

As soon as I started editing a .go file, spacemacs offered to enable the go layer. (I could have easily done it myself, but it is always awesome when your editor "knows" and offers to help.)

After saving the .spacemacs and SPC f e R later (and I think I had to reopen the buffer, I don't remember) I had working syntax highlighting and "coding time error checking" (Thanks flycheck)

This is when I noticed the "hard" tabs. See [References]

I was surprised to find out that gofmt tool uses tabs (width=8) to format the go code. I quickly learnt that I should not try to enforce use of spaces, instead I could set my own tab width, the way I want.

So I added the following line to my .spacemacs

(add-hook 'go-mode-hook (lambda() (setq go-tab-width 4)))

As I neared successfully completing my first go program, I appreciated how complete the golang support is, in the spacemacs go layer.

As soon as I save the file, the gofmt command is fires up, and shows up any errors in the right hand side buffer (split window)

If there are no errors, the it formats the code as per the (go) standards.

There are more go layer functionalities like :

  • godoc : Shows up the documentation. Works offline as well. I checked ;)
  • go-import-add : I'm yet to realize the usefulness of this, but seems nice.

You can send a buffer or a region to the "go playground"

Most of these are available via M-x command or via the menu bar.

I may write part two of this, or just update this once I start using go seriously

Edit [Jan 2, 2017]

As I started writing more go code, I felt that I need auto completion, which is configured by default in the go layer, but was broken, because I had not installed the external dependencies [1]

Once I did that, auto-completion started working well.

I have not yet installed gomtalinter, mostly because I am too new to go and I think the errors shown by default are enough for me. In future, I might start using gomtalinter.

For default keyboard shortcuts configured for the go layer, see [2]


[1] Spacemacs go layer pre-requisites
[2] Spacemacs go commands
[References]
Google Analytics Alternative