Friday, July 8, 2022

Degrees, Money and the Future

For a long time, it was politically incorrect to protest the huge increase in university/college attendance across developed nations in Europe and North America. University attendance went from approximately 14% in the 1970s to over 40% today. Tony Blair famously wanted 50% of youngsters to attend university. A degree was lauded as a springboard to socio-economic mobility, and graduates were supposed to boost GDP growth and tax revenues by taking up high-skilled jobs.

But the reality is turning the dream into a nightmare. The sad truth is that the number of graduates exceeds the number of graduate jobs, and many graduates—particularly from some of the humanities and social sciences—end up under-employed. Furthermore, the burden of college debt acts like a vice on the economy. It doesn’t matter whether the debt is private debt (like in the US) or public debt (like in most European countries). Most obviously, debt harms consumption. It has knock-on social effects on fertility and demographics; young people burdened with debt start a family later (or don’t start it at all), and struggle to afford a house. Moreover, from a macroeconomic perspective, the loans are dangerous, since a lot of them are bad—that is to say, some graduates will repay the full amount, or repay the interest, or repay within the expected maturity period.

The hard truth, that young people, parents, and policymakers don’t want to hear, is that high-skilled, university-level jobs make up at best 20% of the available jobs. I am also highly skeptical that this will increase in the future. The percentage may increase, but only because the total number of jobs will decrease as more jobs are destroyed by automation (high-skilled jobs are much more resistant to the effect of automation). The jobs that require a degree are highly technical and/or vocational: medicine, pharma, nursing, dentistry; programming; engineering; data science; and so on.

Automation, AI and the post-scarcity economy are things that have been discussed elsewhere in more detail than I will go into here. The long and short of it is: we are heading towards are a post-scarcity economy. We are not there yet, and the process will take time. Also, let me be clear that a post-scarcity economy does not mean the end of scarcity; some goods and services will remain scarce, but the majority will be available in abundance. To give you an idea: food, energy and consumer goods will be abundant. Heck, they are already pretty abundant right now. Have you ever seen a shortage of nails? Nails, like many other goods, can be mass-produced for a very low price, and they require almost no human input in their creation. Other things will remain more scarce, especially things that require a lot of high-skill human labour.

That’s the key, the salient point of this little essay: labour. Historically, we have regarded labour, work, as something valuable and worthy. An entire religion, Protestantism, revolves around the value of work. Work means steady payment; a livelihood. But labour is inherently tied to scarcity. Humans have to labour because things are scarce: food, shelter, medicine and so on. So what happens when all the work is done by robots and software? Let’s assume that everything could be done by robots or computers, just for the purposes of this thought experiment.

Ideally, we would live in a utopia; humanity would never want for anything. In reality, the barrier lying between us and this utopian vision is capitalism. We admire capitalism because it has worked well for the last two centuries or so—with government regulation and the managing of natural monopolies, of course. Adam Smith was more or less right. He was misunderstood by the braying free market neoliberals; Adam Smith never argued that the “invisible hand” would make markets self-regulating in general (only if a very specific set of criteria were fulfilled). A mixed market+command economy is the way to go. This is something that France, the UK, Scandinavia and Germany understood, but which the US and Soviet Union did not.

Unfortunately, I think the economic model of the past century may no longer function in this post-scarcity future, because it is still predicated on the idea of renumeration for labour. To put it bluntly: in the future, many, perhaps most, of the population will be unemployed. They will be unemployed for no other reason than that they will have nothing to do.

I believe that we will need a Universal Basic Income at some point in the not-too-distant future. Moreover, I think a successful economic model of the future will still have capitalism (i.e. capital, companies, competition etc.) but in a far more diminished way. Capitalism will be limited to areas of rapid innovation, scarcity, and high differentiation. Everything else will be administrated by organs of the state, be it local, regional or national governments. Money will still exist, so this will be socialism, not communism. The state already administers 40–50% of the economy measured by GDP, so this should not be a big pill to swallow (newsflash, Americans). Why will it be adminstered by the state, you ask?

This leads onto the next point. Capitalism is unstable and destructive. It creates a small number of winners and a large number of losers. (Sorry, right-wing Americans.) In the future, this tendency will be exaggerated until society will fray apart. An industrial reserve army of the unemployed—an army of losers—will be created. There are only three possible scenarios. One, capitalism tries to maintain itself through coercion. Two, socialism prevails. Or three, massive social unrest results in anarchy, and the post-scarcity economy is destroyed, bringing us back to the status quo ante… by which I mean something before 1770: the medieval world. This scenario seems more likely in third world countries that are politically unstable.

Let’s go back to square one, and the original point of this essay. More university degrees will not lead to better pay or employment. There are powerful economic and technological forces at play that are leading us to a world with high unemployment. Instead of creating more debt and broken dreams, policymakers need to focus on managing the transition to a post-scarcity economy based on UBI, the provision of basic goods, and reduced inequality.

What does this look like, in practical terms? Well, it won’t be a world of perfect equality. I don’t believe such a thing is possible or even desirable—and I say this as a staunch socialist. Natural inequality is the reality of the world we live in. Some humans are smarter than others, or more talented, or hardworking; they should be rewarded. So the economic situation will look like this. Everyone will be guaranteed a basic income of, say, 2000 euro a month. They can earn extra by participating in the labour market when possible. Some people will earn high salaries, like 3K, 4K, 5K a month because they do something difficult (and they will pay taxes on their income). And there will be a few millionaires or billionaires, but fewer than there are today. The state’s revenues will shift from being predominantly taxation funded to being funded more by the sale of goods, e.g. food and housing. This is because there won’t be enough taxpayers to fund public goods like healthcare and (obviously) UBI itself otherwise.

Money is hard to understand for the layperson. Money is not scarce; it can be created at will. But scarce things do have a higher price. This is why creating more money causes inflation: there is more money, but the number of goods does not increase.

How can the state fund UBI? It’s not through taxation: you can tax UBI, but since that money comes from the government, there is no mathematical way to fund UBI with itself. Rather, the state can simply print money and ensure that the supply of goods (which it controls) matches up. The state will also tax corporations that make large amounts of money through the sale of goods and services. This system will ensure that basic goods are provided, but also that people have disposable income to spend on more whimsical things—art, fine dining, holidays, whatever—at their discretion. Remember that this will not be a truly post-scarcity society, just a “mostly” post-scarcity one. Provided that the money supply is managed sensibly, this system will work very well.

Now that I think about it, this system could already be partially implemented in the world we live in today, since we are already approaching post-scarcity in some ways. But to accomplish this, we have to have political awareness. We cannot allow our politicians to further the interests of the rich, and pull the wool over our eyes. People are not unemployed because they are lazy, or because they don’t have a degree, or because they don’t know how to code. Only 1% of the population knows how to code, and demand is at most 2 or 3%. People are unemployed because of technological growth.

Some people will not like what I am saying about degrees. Humanities people in particular think that humanities degrees are being devalued in favour of STEM. But actually my argument has nothing to do with funding one or the other. It is true that humanities degrees do not pay as well as (most) STEM degrees, so that is a good argument to avoid going into debt for one. But I would very much be in favour of subsiding degrees so that the best humanities students can study for free. The real problem—which I want you, the reader, to understand—is when we make 1 in 2 youngsters get a degree just for the sake of it. Believe me, all those psychology students (psychology is one of the most popular majors) don’t really want to be doing a degree; they just want to party. Them getting a degree, however, prejudices bright students who are genuinely interested in learning. It strains financial resources and devalues the worth of a degree.

Thanks for reading this far. If you have some thoughts to share, please comment below.

Monday, June 27, 2022

Guide: Setting up zswap

This is a guide to setting up zswap on Linux-based operating systems. What is zswap and why should you use it? Zswap is a way of giving your computer additional virtual memory, like increasing your RAM. It is very useful for systems with low RAM (< 8 GB) and quite useful even for systems with more RAM. This guide will show you how to setup zswap with the lz4 compression algorithm, which is very fast. But first, to answer some questions.

Warning for BTRFS users: read the wiki before creating a swapfile. It is easier to use ZRAM instead.

Does this come with a performance penalty?

There is no such thing as free lunch – compressing and decompressing pages in virtual memory will tax your CPU. However, using compressed memory is faster than swapping to an SSD, and orders of magnitude faster than swapping to a spinning hard disk. It is also better than running out of memory, which results in either your system locking up or the out-of-memory killer killing some important process. As oom killers are not very intelligent, it is wise to avoid this.

Note: there is no performance penalty until you actually start swapping, just so we’re clear.

What about ZRAM?

ZRAM is good too; I have used it. But zswap does not compress pages which are incompressible, instead sending them to your swap file. This is a good thing, as it avoids wasting CPU cycles compressing pages that are not compressible anyway. ZRAM is good for hard disk or SD-backed computers; I feel zswap is more appropriate for SSD-backed devices as swapping to an SSD is not such a big problem.

Step 1

Note: run all the commands below in the terminal, copying them one line at a time and hitting enter. Make sure they are copied correctly.

First check if you have a swap file by running free -h. If you do have a swap file, continue to the next step. Otherwise run the code below.

sudo su
fallocate -l 4G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
echo '/swapfile none swap sw 0 0' | tee -a /etc/fstab

Step 2

Note: the following assumes are you are using grub. PopOS users should follow the instructions here.

Run sudo nano /etc/default/grub and edit the line GRUB_CMDLINE_LINUX_DEFAULT to read:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash zswap.enabled=1 zswap.compressor=lz4 zswap.max_pool_percent=50 zswap.zpool=z3fold"

What does the max pool percent variable mean? This refers to the maximum % of your RAM that will be taken up with compressed storage. It is dynamically allocated, so it doesn’t take up any space until you actually start using it. For most systems, 50% is a good maximum. For really low memory systems, you can try 70%. Anything higher will make the system unusably slow (Google has actually benchmarked this for Chrome OS).

Save your changes (type Ctrl+X and type y and then enter). Now run:

sudo update-grub

Step 3

Run the following:

sudo su
echo lz4 >> /etc/initramfs-tools/modules
echo lz4_compress >> /etc/initramfs-tools/modules
echo z3fold >> /etc/initramfs-tools/modules
update-initramfs -u

You are done! Reboot and run cat /sys/module/zswap/parameters/enabled. If zswap is working, you should see a Y printed.

Sources

LKML

Linux Kernel Documentation

Make Tech Easier

IBM

Guide: Using gpu-screen-recorder with your NVIDIA GPU

GPU screen recorder is an awesome open source program that allows you to record a window or screen using NVENC, a technology specific to Nvidia cards that is used to encode video without using the CPU. This is extremely useful for any low-spec PC, and you would otherwise need a very powerful multicore processor to be able to game and record at the same time – especially if you game at 4K. Furthermore, this tool records in h.265, a very bandwidth efficient compression algorithm that does wonders for your disk space.

Why not OBS?

Gpu screen recorder uses less CPU, and does not harm your fps, unlike OBS. It also feels smoother, with less stuttering. This is because OBS has to copy frames between the host and device; whereas GSR uses CUDA and runs entirely on the GPU. Furthermore, I’ve experienced a lot of difficulty getting OBS to record in h.265 (I believe OBS depends on ffmpeg which may not be packaged correctly for your distribution).

Is Wayland supported?

Not as far as I know. I attempted to run it on the Plasma Wayland session but was unable to get it to work.

Does it work with PRIME?

Yes, but it can only record a window. Make sure your game is running in borderless window mode instead of true fullscreen.

Installation guide

If you are on Arch, install the AUR package of the same name. Else, clone the git repository with git clone https://repo.dec05eba.com/gpu-screen-recorder. Make sure to install git if it isn’t already installed (sudo apt install git on Ubuntu). Also install xdotool if it is not already installed, using your package manager.

Change to the newly created directory. If you are an Ubuntu user, run sudo ./install_ubuntu.sh Otherwise you will have to install the dependencies yourself and compile the program.

Now, go to this Github link and select Code -> Download ZIP. PRIME users, SKIP this step. Extract the archive, then run sudo ./patch-fbc.sh.

Usage

To record the whole screen:

gpu-screen-recorder -w "screen" -c mp4 -f 60 -a "$(pactl get-default-sink).monitor" -o test_video.mp4

You may replace test_video.mp4 with a more useful name.

To record a window:

gpu-screen-recorder -w $(xdotool selectwindow) -c mp4 -f 60 -a "$(pactl get-default-sink).monitor" -o test_video.mp4

Make sure to start the game beforehand and select its window by clicking on it. Note: xdotool can only see XWayland windows, not native Wayland windows. And I haven’t tested it with Gamescope yet.

Why does this guide exist?

Because documentation is scarce and it took me a lot of time to setup. Also, a lot of people don’t know this tool exists, and may be struggling with OBS.

Monday, June 20, 2022

The Problem with Manjaro/Arch

I have been using Manjaro for about a year. My initial love for Manjaro came about because of three things. One, it made the installation of the Nvidia driver as painless as possible – by allowing you to boot directly using the binary driver and avoiding the need to mess with nouveau and nomodeset (looking at you, Fedora).

Two, Manjaro ships the latest Linux software in its repositories. This is a welcome change from Ubuntu or Debian; the packages in the repositories can be badly out of a date on an Ubuntu LTS, and even the latest Ubuntu might run a version or two behind. Related to this, I am shocked by how many packages in the Ubuntu repositories just don’t work. For example: Back In Time, a popular backup tool, does not work on the latest Ubuntu 22.04.

Thirdly, Manjaro also ships the latest releases of various desktop environments, allowing the user to try out different UIs if they don’t like the one they started with. (Or because they wanted to find out which DE actually supports fractional scaling properly… signed, yours truly.)

Alas, it was not to be. A few days ago, the Manjaro install on my Nvidia-powered desktop PC imploded after I upgraded using pamac. I do not mean to say that something was broken after an update; I mean to say that the pamac froze halfway through, and rendered the entire system unrecoverable. Firefox stopped working. KDE wouldn’t respond to mouse and keyboard input. After a force restart, I was left with an unbootable system with no kernel.

This tells us a few things. Firstly, pamac is a horrible program. But these were not the only issues that troubled my Manjaro experience. For example, GPG signature errors are depressingly common on both Arch Linux and Manjaro.

Another problem, inherent to the very design of pacman/Arch Linux, is that you cannot perform partial upgrades safely. Need to grab a small package/program in order to accomplish a task? You may well have a multi-gigabyte update that needs to be applied first, with a real risk of bricking your system, as I found out when I innocently tried to install a 100KB package.

Furthermore, if the update command pacman -Syu fails, it will not fail gracefully like on, say, Fedora, where dnf will rollback the transaction. No, it will leave your system in the before-mentioned partially upgraded state. From the Arch Wiki:

Note that if pacman -Syu does not perform the upgrade because of an error, the end result is the same as running pacman -Sy. Therefore, the error must be resolved and the upgrade operation completed as soon as possible.

Yikes!

In fact, the more I read about pacman, the less I like it. Common operations lack human-readable names, like -Syu instead of dnf update or apt’s update && upgrade. Pacman is not designed to keep multiple versions of a library installed, which causes conflicts if program X needs library version 0.12 but program Y needs version 0.13. (It is possible to fix this manually with various solutions like LD_LIBRARY_PATH, symlinks, chroots etc, but nothing user-friendly.) Contrast this to Flatpak, which can not only keep multiple runtimes installed, like org.Gnome.Platform 41 and 42—but deduplicate them as well.

It is my opinion that these technical problems render the very idea of a user-friendly Arch distribution like Manjaro or Endeavour laughable. Updating is just too dangerous, especially since many users like to install a lot of programs. I am guilty of this as well.

The AUR

There are three problems with the AUR. Firstly, it is insecure because anyone can publish a package there. Secondly, a lot of AUR software is distributed in source form, which takes ages to compile — and might fail. The third Manjaro-specific problem is that since Manjaro holds packages back for two weeks, this can cause AUR programs to fail because the system is not up-to-date enough.

The sad reality is that a lot of software is missing from the Arch repositories and the AUR is the only convenient way to get this software. Who wants to fiddle around with alien or compile software manually?

So what’s the alternative?

Flatpak is the best package manager I have ever used. It will never brick your system (it doesn’t mess with system files); it handles dependency conflicts and deduplication beautifully; it just works! About the only bad things I can say are that sometimes, I have to use Flatseal to change permissions, and there are some small theming issues.

But not every program can be distributed as a self-contained Flatpak. So what Linux should I use for the base system?

Currently, I am using Kubuntu on the desktop because it distributes a recent kernel, allows easy installation of the Nvidia driver, and has reasonably up-to-date packages. But some packages are still out of date—KDE software, ironically enough. I also think the apt package manager could be improved. Maybe I should try aptitude.

But is there really an alternative to the Ubuntu/Mint/Pop world?

  • Fedora KDE: The live session froze before it even got to the installer. The problem is that they made Wayland the default on KDE, which does not work with the nouveau drivers. (Fedora refuses to ship the Nvidia binary drivers or patent-encumbered codecs.) This does not inspire confidence in the level of QA and testing that went into the distro.
  • OpenSUSE Leap: too out of date.
  • OpenSUSE Tumbleweed: I’ve read mixed reviews on this one. It pushes updates really, really frequently. No human QA goes into it, only automated QA – and even a really good automated system like openQA can’t replace humans. Arch at least has humans testing its packages. Even with its fancy btrfs snapshots, I am not adventurous enough to try it.

The only alternative to Ubuntu I would consider is a Fedora with sane defaults. But then, I guess there’s a reason Ubuntu and its deriatives have been more popular than Fedora and Arch for a very long time.

Thursday, February 18, 2021

Welcome to the Angry Penguin Blog

Hello readers,

Welcome to my newly-launched blog. As you might be able to guess from the title, and the huge picture of Tux up top, this is a space to discuss all things Linux-related: tips-and-tricks, how tos, and especially operating systems. I prefer to write about substantive stuff like performance improvements in the kernel, drivers, concurrency, package management and compositing; this is not OMG Ubuntu.

As part of the launch, I will start by writing a series of posts titled “Why Linux is the best desktop OS”. Yes, I do love a good OS flamewar, and I especially like bashing Microsoft and Apple. But I promise to keep the bashing informed by real facts, benchmarks, and user experience—not just pure opinion.

Here’s the order of the posts:

  1. Why Linux is better than Chrome OS.
  2. Why Linux is better than macOS/OSX/whatever.
  3. Why Linux is better than Microsoft Windows.

You might also want to know a little about me and what makes me interesting. If you read my bio on the side, you’ll know the basics: I’m a published writer with 3 novels under my belt (Fallen Desire is coming soon!) and I author the Magical Realm. I’m studying for a master’s in Data Science and I know a thing or two about computers.

But what you might not know is that I got my bachelor’s degree in economics. This won’t be your standard nerd blog—I will also present a lot of market analysis. Because software isn’t developed in a vacuum, you know.

Finally, I’m also something of a gym rat, so I may have some tips for combining workouts into daily programming/DS/sysadmin life. So expect topics on how to prevent RSI, desk ergonomics, how and why to train your gluteus muscles, cardio, etc.

And of course, if you want to reply, use the comments section.

EVs are not the future—hybrids are

There has been a wild surge in optimism in EVs—really, a kind of hysteria—with the EU and UK governments hoping to ban combustion engines in...