Monday 5 September 2022

Swap Escape and Tilde (backtick) keys on Ubuntu

Use a 60% keyboard and want to map Caps lock to Escape and Escape to backtick (`) & tilde (~)?

Assuming you use the English (US) keymap, modify the following file (on Ubuntu 20.04)

/usr/share/X11/xkb/symbols/us

This is the diff: (us.bak is the original unmodified version of us)

diff --git a/us.bak b/us
index 798926f..efb81a2 100644
--- a/us.bak
+++ b/us
@@ -3,7 +3,8 @@ xkb_symbols "basic" {
 
     name[Group1]= "English (US)";
 
-    key <TLDE> {	[     grave,	asciitilde	]	};
+    key <ESC>  {	[	grave,	asciitilde	]	};
+    key <CAPS> {	[	Escape, Escape		]	};
     key <AE01> {	[	  1,	exclam 		]	};
     key <AE02> {	[	  2,	at		]	};
     key <AE03> {	[	  3,	numbersign	]	};

Thursday 31 May 2018

25 pages a day - April 2018*

The Intelligent Investor: The Definitive Book on Value Investing

*More like almost 25 pages a day, and a week or two of May included.
I've discussed some parts of this book in my first post here, and there's more to it. Graham mentions another significant difference; between the defensive and the enterprising investor. The difference being not much money one puts in compared to the other, but how much time they spend researching and picking their investments. The defensive investor would stick to low-cost index funds balanced with government bonds, while the enterprising counterpart may risk individual stock selection, but not before carefully wading through at least a few years of the financial statements of the companies. He warns about earning figures inflated by recent revenues and shady accounting practises, suggesting one use average figures (.e.g for earnings per share) over past few years instead to determine if a stock is worth buying. "There is no good or bad stocks, only cheap and dear ones."
The efficient market hypothesis states that securities would more or less be perfectly priced (trading at fair value), and price disparities would not remain unexploited for too long. This theory is also mentioned in a few places, along with counterexamples from not too long ago. The market is not perfect, and will probably never be as long as emotion drives the decisions of a considerable chunk of its participants.
There's a short primer on evaluating financial statements, which tells you what to look at: stability and growth of earnings, historical records of dividends paid, size of the company, management etc. There's also actual values for "acceptable" P/E ratio, earnings per share, and price-to-book ratios, but I'm not sure how relevant these are today (since the book was last updated in the 70s). The latter half of the book is filled with tons of examples, comparing companies, discussing irrational market behaviour, and stories of exceptional returns achieved by people known to the author. If you only read one book about investing, this one wouldn't be a bad choice.

Saturday 14 April 2018

25 pages a day - March 2018


Dragons of Eden

Carl Sagan describes the evolution of man and other creatures and speculates a bit on some unanswered questions. What makes us more intelligent than other species? Are we the result of competing ancestral species? He ponders over life and evolution on other planets, suggesting intelligence developed outside of Earth (or the solar system) might look very different (literally and biochemically), while still having to comply with the same laws of physics. Machines might have a role to play in the next big step in intelligence, computers being good at many things that we aren't very good at, and vice versa. He also discusses the purpose of dreams, something that is observed only in mammals, and more common in predators rather than prey (go figure). The asymmetry in the hemisphere of our brains, the purpose each serves, the progress of language, are among the several other things Sagan takes us through the history of. The best part about this book is the cosmic calendar at the start, which puts down the entire history of the Universe (as we know it) in a single year. Fascinating to know how insignificant we are in the grand scheme of things, but also of the outstanding progress made by humans in relatively short time.


Zero to One

Peter Thiel in this book defines the attributes of a successful startup. He focuses on the concept of going from zero to one; change of an order of magnitude– a fundamental shift from how existing companies approach and solve a problem. He shares his thoughts on monopolies, capitalism, and competition among companies, and what makes them successful. One of my favorite pieces of advise for a startup, also something that I came across in the book, is about doing one thing and doing it well. When the odds are against you, as they are in a startup, you only make it harder for yourself by focusing on half a dozen things with the same small team. This is a good book overall and a must read for founders and employees, for it teaches you how to avoid the most common mistakes which prevent an enterprise from succeeding.


Prelude to Foundation

Fiction, for a change. The first one in the Foundation and Empire series of books, but the last to be published. Set in the distant future where humans inhabit millions of worlds and faster-than-light travel, Asimov takes us through the adventures of a paranoid mathematician who is convinced (by someone else) that his mostly theoretical paper could have a practical application, possibly making him the most important person in the galaxy. A fun read, will probably pick up the rest of the books in the series as well. Not much to write about without spoiling the story.

Sunday 11 March 2018

25 pages a day - Feb 2018

This month's list

When Genius Failed: The Rise and Fall of Long-Term Capital Management


This was recommended in the footnotes of An Intelligent Investor which I was reading last month (January, 2018). The author provides a window into the secretive lives and ballsy albeit short adventures of the partners in the hedge fund Long Term Capital Management.

LTCM, which comprised of Nobel laureates and other geniuses, made a whole lot of money with a lot of leverage and then lost it all, almost bringing down several banks and the financial system along with it in a span of 4 years. I like the way the author gives a little bit of background on John Meriwether, the man at the centre of it all, and some of the partners, before going into the details of the fund itself.

It's an enthralling read, and it could be better, I feel, if I had better knowledge on the basics of financial markets and the instruments they deal in. The author makes it a point to explain, in simple language, several of the terms and concepts (such as arbitrage, swaps, spreads, etc) when first mentioning them, but I think it would be a better read if these terms and concepts were second nature to me. The more you understand, the more you appreciate.


The Toyota Way


I mentioned this one last month, having read a small part of it. I may have been quick to judge. I've heard words of praise for Toyota from a car enthusiast friend and this book provides the explanation. Every organisation takes about culture and core principles, but few put their money where their mouth is. Toyota has been doing it for decades. The founders and top personnel believed in a set of principles, ways of getting things done, and made sure everyone around them did the same. Promoting from within, they made sure their successors believed and followed these principles as much as they did. Rinse and repeat. What you end up with is a global organisation with astounding manufacturing efficiency and reputation for being one of the most reliable car manufactures on the planet. More important than the principles themselves is the ability to stick with them through thick and think.

The author mentions other organisations attempting to copy the processes Toyota follows, without making it a part of their culture, without buy-in from top management, in hopes to achieve the same gains in efficiency. It doesn't work, even if it does it doesn't stay that way for long. Sooner or later, they are back to square one. If you work in manufacturing and have even the slightest influence on the floor, this book can prove to be of great benefit.

I work in a startup, one that provides software based services. I read this book hoping to find something to help ship quality products on schedule. What I learned is that blindly attempting to apply these principles will not work, even if you do it well. I will need to start from scratch, picking those that apply to me, modifying them to fit this specific industry. I don't believe software is much more complicated than hardware. I feel the industry is relatively young and slightly undisciplined overall, and perhaps in half a century's time, whoever still maintains the quality they have today, will have an interesting story to tell.


Bargaining with the Devil: When to Negotiate, When to Fight 


I found this one also in the footnotes of one of my favourites from last month - Getting To Yes, by Roger Fisher, who is one of the co-founders of the Harvard Negotiation Program. The author of this book, Robert Mnookin, can be said to be his successor, and the current chair of the same program. This book is a great lesson in history, logical reasoning, and human relationships. The author provides a framework at the start of the book, one that will assist you in making the decision of whether or not you should negotiate. He discusses traps, which can be described as ways of thinking, that can lead, confuse, distort your thinking into leaning towards either of the ends (to negotiate and not).

The author then describes several stories where the protagonist (or a group of people) figure out how to "deal with the devil", if at all. The stories include that of Anatoly Sharansky and the Soviets, Rudolf Katzner and the Nazis, Churchill and the War Cabinet, IBM and Fujitsu, Nelson Mandela, the ANC, and the South African Government, musicians and management of the San Francisco Symphony, and a few more of personal disputes including divorce, estate settlement, etc. The author is personally involved in a few of them, and ends each story with an assessment of whether the characters involved were right in choosing to negotiate (or not) with their counterparts, and what he would do differently, providing ample reasoning. This books answers some of the questions at the end of the "Getting To Yes" in much more detail.