Book Review - Educated

Educated I am not a fast reader (at least by now) and it took me little bit more time than others to read a passage. However, since I don’t have anything to do due to this pandemic, reading is the only thing I do.

Two days ago I was privileged to finish Educated and let me tell you this: it’s one of the best books I have ever read. It’s not a science-fiction but basically a memoir of its author, Tara Westover. I mentioned science-fiction because at first when I started the book I thought it is! It’s full of strange events happening around and I couldn’t believe that all of these wired events are happening in the 21st century.

Tara, has never been to school until the age of 17 because her parents believed public schools wash the kids minds so they keep their children at home as much as possible. To avoid schools they didn’t get birth certificates for some of their children. Tara has received hers at the age of 9!

In addition, Tara’s parents didn’t believe on hospitals as well! They thought human made (chemical) drugs will rot patients’ bodies from inside and they will kill them. So when her mother’s head injured badly during a car accident, her father took mother to home instead of hospital!

In some developing countries these kind of believes still exist. a small amount of

But Tara found her own way toward being Educated, she attended in a collage and started her new path of life until she awarded with PhD from Cambridge!

As a matter of fact, I want to talk about this book for days to reflect how fascinating it was, but at the same time, don’t want to spoil it.

I think this book is the one of those everyone should have at their bookshelves; so, go ahead and either purchase it online or from your local bookstore.

How to correct typos in VS code

This #StayAtHome trend has given me enough time (more than enough actually) to try out new things; from changing my development fonts after 6 years, or to try out new themes.

I have recently moved from “all other editors and IDEs” to Visual Studio Code and trying to make it my new home. One of the things I believe every text editor should have is spell checking. Unfortunately, VSCode does not have spell checking out of the box but there is an extension for it thanks to the community.

Code Spell Checker

The extension is Code Spell Checker. What it does is providing a basic spell checking that also supports camelCase. Although it’s very simple and works right out of the box, it’s highly configurable as well. For example, you may want to disable spell checking for a specific programming language. In this case you can add the following configuration to your settings.json:

"cSpell.enableFiletypes": [
    "!go" // ! excludes go extension
]

In addition, following are other configurations you may want to manipulate:

// The Language local to use when spell checking. "en", "en-US" and "en-GB" are currently supported by default.
"cSpell.language": "en",

// Controls the maximum number of spelling errors per document.
"cSpell.maxNumberOfProblems": 100,

// Controls the number of suggestions shown.
"cSpell.numSuggestions": 8,

// The minimum length of a word before checking it against a dictionary.
"cSpell.minWordLength": 4,

// Specify file types to spell check.
"cSpell.enabledLanguageIds": [
    "csharp",
    "go",
    "javascript",
    "javascriptreact",
    "markdown",
    "php",
    "plaintext",
    "typescript",
    "typescriptreact",
    "yml"
],

// Enable / Disable the spell checker.
"cSpell.enabled": true,

// Display the spell checker status on the status bar.
"cSpell.showStatus": true,

// Words to add to dictionary for a workspace.
"cSpell.words": [],

// Enable / Disable compound words like 'errormessage'
"cSpell.allowCompoundWords": false,

// Words to be ignored and not suggested.
"cSpell.ignoreWords": ["behaviour"],

// User words to add to dictionary.  Should only be in the user settings.
"cSpell.userWords": [],

// Specify paths/files to ignore.
"cSpell.ignorePaths": [
    "node_modules",        // this will ignore anything the node_modules directory
    "**/node_modules",     // the same for this one
    "**/node_modules/**",  // the same for this one
    "node_modules/**",     // Doesn't currently work due to how the current working directory is determined.
    "vscode-extension",    //
    ".git",                // Ignore the .git directory
    "*.dll",               // Ignore all .dll files.
    "**/*.dll"             // Ignore all .dll files
],

// flagWords - list of words to be always considered incorrect
// This is useful for offensive words and common spelling errors.
// For example "hte" should be "the"`
"cSpell.flagWords": ["hte"],

// Set the delay before spell checking the document. Default is 50.
"cSpell.spellCheckDelayMs": 50,

You can also contribute to this project: https://github.com/streetsidesoftware/vscode-spell-checker

Fira Code - THE font for programming

When I started programming on a GUI-based environment, the only fixed-width fonts available were Courier and Courier New. We actually didn’t have lots of options to choose from. You may laugh at me but after 2 years of programming, I realized I can change the font size of Visual Studio IDE. In 2007, Microsoft introduced another moonscape font named Consolas. The font was much better and had better support anti-aliasing.

DejaVu Sans Mono

After moving to Linux in 2012, I got familiar with some other fonts. After trying out plenty of them, I found DejaVu Sans font family. DejaVu Sans Mono is one of the fonts I still love even after 6-7 years using it. I have temporarily switched to other fonts but got back to it after a short period of time.

Since we cannot leave the house as we usually did during the Coronavirus pandemic, I decided to play around with tools and apps I use the most and try out new things. As a result, I decided to search a little bit to see if I can find a replacement for the legendary DejaVu and actually found a fully-deserved one!

Fira Code

Fira Code is my new favorite moonscape font! It’s very clean and elegant and has also support for Retina displays which is the new standard for new laptops and monitors.

Fira Code

Besides, what makes this fonts so lovely the way it solves a very important problem:

Programmers use a lot of symbols, often encoded with several characters. For the human brain, sequences like ->, <= or := are single logical tokens, even if they take two or three characters on the screen. Your eye spends a non-zero amount of energy to scan, parse and join multiple characters into a single logical one. Ideally, all programming languages should be designed with full-fledged Unicode symbols for operators, but that’s not the case yet.

To be able to solve this issue, Fira Code contains a set of ligatures for common multi-character combination we use everyday such as -> or !=; so it automatically convert those character combinations to its corresponding ligatures. Please take a look:

Fira Code ligatures

One other cool things about Fira is that it supports Powerline as well. If you are familiar with Powerline, you may know that to be able to render Powerline fonts correctly, you need to Install a Powerline versions of those fonts; but, Fira supports them out of the box.

Please take a look at Fira Code repository on Github to find more information about the font and the installation instructions.

Best things to do during home quarantine

COVID-19, the virus that put the world on hold. It’s spread all over the world and about 130 countries are currently dealing with it. Most companies are urging their employees to stay home or work remotely if possible. According to the worldometers website which is a verified source, there are currently more than 170,000 cases worldwide and the number is growing dramatically fast.

Photo by Fusion Medical Animation on Unsplash

Although COVID-19 is not as fatal as other same-type viruses like SARS and MERS, it could be transmitted much faster and easier. In fact, every carrier transmits the virus to three people in average. Consequently, health officials all around the world are strongly urging people to stay home!

But staying at home can be difficult; especially, if you have children. As a programmer, here are some useful things to do:

Read

Photo by Thought Catalog on Unsplash

Unfortunately, most people don’t read enough nowadays. When it comes to reading, the first thing that comes to mind is book; but it requires you to leave your house, go to your first store, and buy some which could be dangerous. Alternatively, you can purchase your desired books online or even use the electronic versions if possible. Apple Books Store and Kindle are the most popular services to purchase an electronic version of your favorite books.

In addition, you may want to try the audio version of books as well. If you don’t have time for reading (which you should find some), it’s possible to listen! You can use audiobooks when commuting, washing dishes, gardening, etc.

Beside books, you can also try apps like Pocket and Feedly. Pocket allows you to add your articles on the web to it for later reading while it also suggest you related articles based your reading history. Feedly on the other hand is an RSS reader. It let you add your favorite websites to it and it automatically gather all new articles for you in one place.

Help your family

Photo by Louis Hansel @shotsoflouis on Unsplash

It’s not bad to wash the dishes or helping your wife or mom with chores. Even if you work remotely these days, you have at least two hours more (because you don’t commute); as a result, it’s now time to help you family. You may have some postponed tasks from a long time ago. These days are the best time to get them done.

As my friends know, I love cooking. Since the last week, I help my wife prepare the meals as well. sometimes, I prepare the meal myself. It’s really enjoyable.

Spend more time with kids

Father playing with daughter. Photo taken from https://www.talkplayandread.com/fathers-play-important-role-children/

If you have children, it’s the best time to spend more time with them. Kids need to do more physical activities than adults. They need to run and play. But because these days they should stay at home, they get bored. Find new indoor games and play with your children is vital. If you don’t know what games to play, you may want to check out 75 Fun Indoor Games for Kids

Learn a new language

Most people think knowing English is enough. However, other languages can be helpful as they open a completely new world to you. At least, you can use those new-learned languages in your next travels! Language institutes are closed these days but there are several online services (most of them free) which can be used to learn a new language. The most popular services are Memerise and Duolingo. Both services has free services as well as premium features. But you may start with a free subscription and then upgrade to premium if you find them useful.

Workout at home

Although gyms are closed these days and it’s important to exercise. Therefore, you should find a way to keep up you workouts even if you’re at home. Some people may have some equipments like dumbbells and etc., so they can use them. But for those who don’t have any, I found a very useful app called Home Workouts that teaches you how to workout with absolutely no equipments.

Conclusion

Remember, the best thing you can do to prevent the 2019 Coronavirus from spreading is to just stay at home. While staying home for a long period of time can be boring, you can do a lot of valuable activities even if you’re at home.

Stay healthy and safe.

Book Review - The Subtle Art of Not Giving a Fu*k

The subtle art of not giving a f*ck I have read lots of books on self-development and productivity and recently finished the book “The Subtle Art of not giving a fuck”. There are a considerable amount of books on self-motivation and “how to be a successful person” out there but I think this book is among the bests. In this post I want to give you an insight about what this book is all about while not spoiling its content because I want you to read it yourself.

These days the COVID-19 virus has spread around the globe and as the officials says the best way to prevent it is to stay at home. Beside spending time on PS4, social network websites such as Twitter and Instagram, I think one of the best things to do is to simply read! In Iran, the government has restricted almost all of social activities including travel, cinemas, theaters, gyms, etc., to keep people at home. However, being at home is difficult. It’s really is. But we can use this time and do some valuable tasks.

The book’s main subject is aiming at our values. The values we think are important while they’re actually not. If you take a closer look on your values, you notice that most of them are not so valuable and don’t deserve the amount of concentration you’re currently putting on them.

When we care about these unimportant values, we automatically forget the things that actually matter. A great example of this is our past! Instead of pay more attention to our current state and future, some of us feel mad about things we have done in the past and always think about them, while they are gone now and there’s nothing we can do about them. We pay so much attention to our inabilities and compare ourselves to others we call successful because they can do things we cannot; while there are things we are good at and they’re not! The book is full of such examples.

The second part of the books focuses on what we call happiness. The author describes that TRUE happiness comes from difficult moments of our lives. It argues that short-term happiness does not last for long; on the contrary, achieving difficult milestones such as monetizing from your first start up or running your first marathon are examples of things that gives you the REAL happiness.

The book then talks about the importance of owning less. This is something most of us know as minimalism. It describes that having lots of things doesn’t give us joy; in contrast, owning less things delivers the true happiness! Because when we own less things (only things that are essential), we don’t have to care about extra-unimportant things we have.

Finally, the book talks about death. The truth that most people don’t want to talk about. They don’t want to think about that they are going to die one day. When we think about this inevitable fact, our brain automatically focuses on things that matters most and stops putting effort on things that are not valuable.

There are actually a lot to talk about this book. I described the content as general as possible to avoid any spoils. As I have mentioned, this is a must-read book; so don’t waist a moment and start reading.