2020-05-15

Evil as striving for a local maximum

Let's observe first that we tend to attribute evil when there is a sufficient capacity of understanding the consequences of one's actions. A small child that produces a tragical accident is not considered evil usually, because there was no intent in doing that harm.

We then observe that we judge evil in the contrast to another, better, possible action: "he could have decided to not kill him". We don't attribute evil when someone produces harm without having the possibility of doing something better.

Moral judgement on evil is therefore a judgement of one's actions and decisions, in relation to some other actions or non-actions that would have resulted in a better world. That better is a highest "local maximum" that we can envision. The misdirected action is usually dictated by another, more narrow,  goal that is aiming at a smaller local maximum. For example, one can aim his narrow, selfish, good (local maximum) at the expense of others.

This maximum is often on a single dimension: feel good physically, or have a lot of money, or be revenged, or make out nation/race great (think Hitler). There objectives are often not bad in themselves. However, chasing them might affect other life dimensions - like having a better win-win relationship, or at least avoid the damaging effects of a personal or international war.

There are three dimensions of evil, closely related: at personal level, social level and at the level of Humanity.

2020-03-22

Cache and Data Consistency in Distributed systems (CAP/PACELC/CRDT) - part 1

Abstract

There is always a tension between data Consistency and system Availability when Partitioning a system across datacenters (think CAP). Especially data cache-ing poses interesting challenges. This tension becomes way more acute as soon you have 2 data centers separated by more than 10ms latency. I present below some of the problems along with possible solutions.

In the end I will present an elegant solution that maximizes Availability while providing the needed Consistency level for read-after-writes flows. The solution requires the client to carry a monotonic id along the flow. I would postulate that any solution where the client don't carry some consistency info will provide a higher latency that the presented solution (see chapter "Flow consistency").

The examples below are simplified to be intuitive and easy to understand, however these learnings also apply to N datacenters.


How it starts

Suppose you started with on single datacenter called Central. It has all your data, and all clients are sending requests there. You have some in-memory cache-ing (like Memcached, Redis), and you are managing to keep it consistent by making sure that each write to database is also put in the memory cache as it is written to database.

2020-03-19

Hell

Being burned in hell for an eternity is not the worst that can happen. Even worse than this, for me, is to be entirely washed out from Existence.

Burning in hell looks pretty painful indeed, but it still contains a glimpse of hope. After eons of suffering, a redemption is still possible, potentially. Suffering from burns is still a property of Life, something that suffers must exist and must somewhat live. There is still something that exists in the burning hell...

Even worse than this, for me, is to disappear, gradually, then totally, from Existence. The eternal void is more frightening that any eternal pain. The eternal void does not leave any glimpse of hope for a better future. The eternal void is no future at all.

* * *

2020-02-05

On jobs and welfare

We often hear the expression "this creates jobs". But job creation cannot be good in itself. The state could create well payed jobs for everyone for doing nothing. Even with jobs, if nobody produces food, then people would starve.

What is important is welfare creation - goods and services, that is often accompanied by occupied people that have jobs. Such welfare creation should equate to a better life for the ones who consume that created welfare. There are many nuances here. In these days, only a fraction of jobs is actually involved in creating goods and services that directly affect the quality of life.

There is a high portion of jobs that are involved in organizing the welfare creation and redistribution. This includes management, state administration, banks, lawyers, police and more. Without a system to control the fair exchange of goods through money, people would tend to break contracts and steal from the welfare created by others.

While such "administrative overhead" is needed on the long run for the actual welfare creation and consumption, it's harder to evaluate the added value to welfare and the fair share of welfare that people involved in such activities are entitled.

Individuals can thrive having a well payed job while doing nothing useful. However, a country cannot thrive by having too many people that consume welfare without adding value to the general welfare.


Public policies

2019-11-27

Black Friday theory

Black Friday is a selling race over the gift budget that has the peak around the start of December

What is the lowest possible price on "Black Friday"? Sellers will try to make this unpredictable. However, there are certain price strategies that any rational seller should apply. This can give you hints about the likelihood of obtaining a lower price on Black Friday, Cyber Monday and similar.

Why having price cuts at all? Normally, any producer or seller would want to have the highest gain from the product it sales, therefor higher price is desirable. However, selling more many pieces of a product might bring higher gain than the loss from the price cut. Also, a product that is not sold brings no revenue, while selling slightly over the acquiring price still brings some money.


What are the reasons for doing price cuts?

"Black Friday" is not only a period of gratefulness, it is also a day close to the winter holidays, when many people buy gifts for others and for themselves. Normally higher demand should push the prices up, however the opposite happens. The sellers and producers are expecting the high demand and they will usually prepare an even higher offering of products. It's better to have too many products than to not have enough and send the customers away with their wallets full of money. Most often there are little constraints in the quantity of products that can be produced.

2019-10-22

The Economy theory - goods and money

Welfare

Welfare = produced goods + redistribution curve

At the basic level, welfare in society is just a matter of produced good (including services) and the redistribution curve. Money is not welfare in itself, as you cannot eat money.

However, money is the system that controls the production and redistribution of goods. People with more money are entitled to consume more goods in this moment. But they can also chose to delay the consumption and have no impact in their welfare for the moment, then consume goods at a later time. Or money can lose value and can be never exchanged for the expected value.


Money is motivation to produce goods

Money also controls the motivation in the production of goods - like in working for salary or creating a company to get rich. Money permits to save the value of the goods that you produce now and later consume goods produces later - like when you retire. Money is used to redistribute goods to people that cannot produce goods (like unemployed people).

2019-09-12

Linux Ubuntu 19.04 full install on USB stick drive - with UEFI/Grub boot fix

This explains how to install Ubuntu 19.04 or similar on USB+UEFI, like you would do it on a hard drive. Regular USB install will likely fail, you need the fix below. Ubuntu installer has a bug when installing on USB using a PC that already has an UEFI boot system (like Windows 10).

Such thumb-drive is not only persistent, you can also do regular updates on it, customize the programs, repair the file-system. This is more than just a live "USB Pen Drive Linux" with persistence, it is your full Linux system in your pocket.

Only (U)EFI boot is covered here, but most recent systems support UEFI. The old BIOS boot is more complex to fix and less portable because you depend on a specific drive order.

Use this at your own risk. A single mistake might wipe out the entire hard drive on your PC.
If unsure, do a full backup of your system, including the Windows EFI partition.

P.S. The same procedure can be used to install Linux on external USB hard drive. From my experience, even an USB 2.0 hard drive with Linux is often more responsive than Linux on thumb-drive, because hard drives have very good write speed. However, a hard drive is not as portable as a small USB flash drive. If you go with flash drive, use USB 3.0 thumbdrive with a write speed of at least 30MB/s.

Optionally you can read first "Linux Grub/UEFI boot system - small howto"


Short version - for experienced users

1. Normal Ubuntu installation on USB

- format the target USB drive with "gpt" partition table (not msdos).
  • create first partition fat32 of 100MB, set the flags 'esp' and 'boot'
  • create second partition ext4 on the rest of the space
- use custom Ubuntu installing ("Something else"), booting in UEFI mode

  • set target boot location on the USB device - like /dev/sdc, not a partition
  • use the fat32 partition as 'efi'
  • use the ext4 partition as '/'
  • install Ubuntu

The bug is that Ubuntu installer will not install any EFI/Grub files on the USB drive, but it will put them on your first hard drive - for example in the EFI partition created by Win10. You need to move the 2 new directories to the USB drive, in the EFI partition. Normally the install will not break the existing Win10 boot.