Skip to main content

Posts about dgplug (old posts, page 41)

Books I Read, October 2020

This post was first sent to my newsletter on November 2nd, 2020.
You really ought to subscribe :)

Nothing really exciting this month.
I had lots of work and could not quite focus on reading hard books or non fiction.
I needed to escape from the humdrum of life

So, I read a lot of Jack Reacher.
I decided to read all of the Lee Child novels featuring the character.

And all of that, started because I read a book, that followed Lee Child around for a year, describing his writing process and the work that goes into a Reacher novel.
It’s been fun, reading. Like meeting an old friend.
Considering that he writes about one a year, I find it slightly alarming that I have now read seventeen years of Child’s work in a month.

I wonder what I’ll do when I get done with all the books.
Well I don’t really have to wonder. I’ll just go read another one.

I have more books, I want to read than I have life left :)
So here’s to reading! See you next month!

If you want to see the titles, click here.

P.S. Subscribe to my mailing list!
Forward these to your friends and get them to subscribe!
P.P.S. Feed my insatiable reading habit.

Putting Emacs Backup Files in a Separate Location

Whenever Emacs saves a file, it makes a backup of the original.
So if I had a file.txt and I make changes and save it, Emacs firsts backs up the original to file.txt~.
While I love this functionality, and it has saved me from a pickle more than once, I don’t love the way my folders get polluted with ~ files all over the place.
My blog’s drafts folder had hundreds of these.

Mercifully, Emacs offers a way to stow all these files in one central folder of your choosing.
All I did was add this little snippet to my init.el

;; Set the folder for backup files to a subfolder in the 
;;.emacs.d folder of the user. 

(setq backup-directory-alist 
  '(("." . "~/.emacs.d/file-backups")))

Emacs now stops littering all over the place and saves the backups it creates, to a file-backups folder in my .emacs.d folder.
You can choose a location, you like better :)

P.S. Subscribe to my mailing list!
P.P.S. Feed my insatiable reading habit.

A Day of Updates

Could not focus much on programming today.
So decided on doing things with Python programs.

Nikola Upgrade

I use Nikola to generate both my websites.
It is an extremely easy to use, no fuss static site generator, which is easy on my server’s resources.
Version 8.1.2 was released a few hours ago and I hopped on and installed it.
I follow a slightly unconventional upgrade path, because I was terrified of breaking my server in the early days, when I was still learning about how to go about installing things on servers.

  • I have Miniconda installed.
  • I use that to generate a conda environment, which I then installed Nikola into.
  • When a new release drops, I create a new conda environment, install the new release in there and run them against my source folders (after backing them up).
  • This lets me revert very quickly to the old data and the older version of Nikola, in case I do something boneheaded and screw things up.
  • If all works fine for a month, I delete the older conda environment along with the old Nikola release.
  • I have been doing this for quite a while now, and while it may be overkill, it gives me peace of mind.
  • As usual, Nikola upgraded with no issues at all.

Pleroma Bot

I always wanted to understand what bots do.
Now I realise they are athromorphic programs that (with the right permissions and the right credentials) look like actual users of a service, doing sets of activities they are programmed to do.
Like your banking app has set of solutions to common queries that it shows you, before it hands off to an actual human, if those solutions don’t fit your needs.
They feel like supercharged scripts to me.
So I decided to see if I could install one.
Since I am learning Python, I love reading the low volume Daily Python Tip Twitter account.
It has surprising, handy, funny, interesting tips and tricks about the Python language and the massive ecosystem around it.
But, I have weaned myself off Twitter for my own sanity.
I only use it sparingly once a day.
And going back to that noise and tumult no longer interests me.
I saw a bot that mirrored tech news accounts to Mastodon and wondered if a bot could get Daily Python Tip to me on my Pleroma timeline.
A quick search led me to Pleroma Bot.
A couple of struggling hours later, (creating a twitter developer account, creating a pleroma account for the bot, figuring out how to get bearer tokens for said accounts) and tada, I got the bot to come alive!
It checks the Twitter account once a day, and mirrors the tweets to the bot account.
You’re most welcome to follow it for a Python tip, daily.
The next thing to do, is to see if I can get a bot to post a tagged pleroma status to my twitter account.
But that is something for another day …
Update, 2020/11/17: figured out how to use the bot to mirror multiple accounts. It now mirrors, Daily Python Tip, RegexTip, and CompSciFact.

P.S. Subscribe to my mailing list!
P.P.S. Feed my insatiable reading habit.

What I Learnt from Antifragile (III)

This post was sent to my newsletter on October 25th, 2020.
You really ought to subscribe :)

What I Learnt from Antifragile (III)

What Does Not Kill Me … Antifragility for the Collective

What does not kill me makes me stronger.
— Friedrich Nietzsche, Maxims and Arrows

The world breaks everyone and afterward many are strong at the broken places.
But those that will not break it kills.
It kills the very good and the very gentle and the very brave impartially.
If you are none of these you can be sure it will kill you too but there will be no special hurry.
— Ernest Hemingway, A Farewell to Arms

That, in a nutshell, explains my learning today.
To become Antifragile, we need to understand be aware of what we do, our actions and then see who it ultimately benefits.


via Greek Myth Fandom

Antifragility, like I imagined in my head, was me getting stronger with every blow that life dealt me, Hydra like.
If you cut off one head, I would just grow another one.
But I realised that everything comes at the expense of something.
If I am growing Antifragile, something else has to give.
If there’s just nature on the otherside, we’re fine. But if there are people, then we better be careful about how we get Antifragile.

There’s also the notion of scale. Something small, dying to make the bigger collective stronger.
So there’s always a balancing act and a constant need to be observant.

This is how I imagine it, in a few scenarios in my life.

My cells need to die, my muscles need to tear in order that I build up my strength.
Here the individual is nature (my cells), dying in order to make me (my body, the collective) much stronger.
Imagine if that did not happen, if each cell decided, why should I die?
Actually, you don’t have to imagine.
That’s what cancer is.

If I die this year, I am insured. My folks get a hefty payout. (Antifragility for my family’s finances)
But the insurance company can only afford to do this, because they have money from a ton of folks placing the same bet as I did. That we would croak this year.
This is again the individual (me) benefiting the collective (the vast pool of people, who do not have enough saved, yet want to provide for their loved ones).

A nasty one is when someone uses this for their own benefit.
They win, but the collective loses.
Scams of various sorts come to mind here, where an unscrupulous person, takes advantage and become antifragile at the benefit of other people.

The flip side is the hero, where the individual takes risks and sacrifices to benefit the collective
Soldiers, Teachers, Firefighters, Tinkerers, Entrepreneurs are all examples of folks who sacrifice individually so that society as a whole benefits.

So this is what I learnt. To see how actions towards antifragility (mine or others) have ramifications on my life.
To always see if I or society benefit. Not someone else taking undue advantage.

P.S. Subscribe to my mailing list!
Forward these to your friends and get them to subscribe!
P.P.S. Feed my insatiable reading habit.