A setup for remote piano lesson over Zoom

First create a new sink:

`pactl load-module module-null-sink sink_name=zoom_input sink_properties=device.description=zoom_input`

then remap into a Zoom monitor source that Zoom will allow selection of:

`pactl load-module module-remap-source master=zoom_input.monitor source_name=zoom_mic source_properties=device.description=”zoom_mic”`

Then create as many new virtual sources as microphones you need to merge together with `pactl load-module module-loopback` and finally go into Pavucontrol, select Virtual streams, and assign different physical sources in the dropdowns. Then select zoom_input in Zoom as source.

Good reference: Play audio output as input to Zoom

 

How to implement the 6-hour workday in a company

It is difficult to argue that the current, wide popular 8-hour workday in cognitive-demanding jobs is in any way efficient. It is bad both for employees and employers. Quoting the Harvard Business Review,

Many of today’s organizations sabotage flow by setting counter-productive expectations on availability, responsiveness, and meeting attendance, with research by Adobe finding that employees spend an average of six hours per day on email. Another study found that the average employee checks email 74 times a day, while people touch their smartphones 2,617 times a day. Employees are in a constant state of distraction and hyper-responsiveness.

This is insane. And if you yourself think that you do indeed work productively 8 hours a day, think again. I know nobody who will honestly say that they get productive work done 8 hours a day. Three options there:

  • we do work 8 hours, but not getting 8 hours of real work done (someone said meetings?);
  • we are at the desk for 8 hours, but we don’t work for that long (someone said procrastination and non-work related tasks?);
  • we do work productively for 8 hours, but that is not sustainable. When I truly get demanding stuff done for 8 hours, the strain is so high that I take half the day afterwards off. So it is technically true that people can work productively for 8 hours, but only at the cost of burning out in a couple years. (I have had the experience of truly working long hours in my youth, only at the price of feeling I couldn’t get any meaningful work done for months after a couple years of that routine.)

Once, when coming back home from work, I started wondering: how would it be possible to reduce the amount of hours a company expects employees to work, and yet retain the same output? How, if I had a company, would I achieve this? How could I have happier employees with more free time and yet a successful firm?

The problem with the 8 hours workday

My thinking stem from two assumptions:

  1. we can only expect to work productively 2-4 hours a day, with the exact amount depending on boundary conditions (after all, there are bad, better and good days). I would not expect anybody to focus deeply for more than 4 hours a day. Like, true focus for 4 true hours. Not fragile focus interrupted by dling of emails or random questions by passers-by.
  2. we are often asked to be in (often long) meetings where our presence is not of severe importance, or that are altogether useless for the whole team.

Clearly, point 1 is the time when the company goes forward and makes money, since it is the time work gets actually done. We want to protect those hours. Point 2 is the time no employee looks forward to. It is customary to allocate time for point 2 just to keep employees busy, relying on a well-spread disrespect for other people’s time. These hours we want to peel away.

Of course though, every company must also deal with the biggest challenge of humankind collaboration: communication. Every employee is a separate human entity, whose brain is detached from all other colleagues’ ones. Information needs to be shared among people in an effective manner, i.e. in a way in which others understand and can act as a result of the exchanged information. This is by far the most difficult part of any job: getting what you have in your head out of it and into someone else’s head. The value of an employee is often in direct proportion to his skill in this field.

To make it harder, there is an outrageous amount of oral communication happening these days in (tech) companies. When you think that you can have effective technical communication verbally, think that even USA presidents have scripts when delivering speeches. Any verbal communication needs to be carefully planned, otherwise it just ends up being wasted time.

We so often require people to be in meetings just because we are too lazy to write a well-structured and -thought text that everybody can read when they want, at the pace they want, and to which they can refer to a month later. Oral communication is instead lost, and, especially if the company has a high turnover, the same stuff needs to explained multiple times.

So how do we fix this all?

The recipe for the 6 (or less) hours workday

As often, an efficient schedule is our best friend. As part of their onboarding, employees will be asked for several time slots:

Continue reading “How to implement the 6-hour workday in a company”

Setup OpenWRT on Raspberry Pi 3 B+ to avoid data trackers

I am definitely not an expert in networking, so take all of this with some salt. Still, I found it valuable to have my home internet powered by open source software as much as possible, rather than some shitty closed black-box provided by my ISP.

There are already lots of valuable resources on setting up OpenWRT on a Raspberry Pi as a home router. To cite some:

Upon first setup, I had issues connecting the Raspberry to my Ubuntu laptop and make the first setup. Only later did I learn that I could have simply edited the config file on the microSD and avoided the pain, but anyway, I was able to have it work through ethernet on my laptop by setting the ethernet interface to be unmanaged.

I found the wifi adapter of the Raspberry do be strong enough to cover a 3-room apartment, and also go outside. When all the confi was right, I just disable DHCP on my ISP router, enable DMZ to the Raspberry (which had a static address by then), and let the Raspberry be the only DHCP server in the network.

You can check if the Raspberry really is the only DHCP server by running the command `udhcpc -n -q -s /bin/true -t 1`. You should get `udhcpc: no lease, failing` as last line of output; if you don’t, then there is still another DHCP server active in the network.

Ads and trackers blocking through dnsmasq

I then wanted to block ads and data trackers through a DNS filter. Starting from this, I eventually ended up using the first of these lists as DNS blacklist, with a handy bash script that would update the list on a regular basis. Note that data in /tmp is lost on reboot, and data not in /etc is lost on firmware re-flashing.

Continue reading “Setup OpenWRT on Raspberry Pi 3 B+ to avoid data trackers”

A fix for broken (physical) buttons and dead touch area on Android phones

My old Android smartphone fell too many times and had its physical buttons (back, home, recent apps) not working, which was problematic to do anything. You can go back with in-app buttons most of the times, but there is no way to switch app or to go back to the desktop.

One good fix is to use an app that will put the back and home button functions as touch gestures, for example swiping from the borders of the screen. To this avail I suggest Fluid Navigation Gestures. In case you absolutely needed to trigger the home button, for example, you can connect the phone to the computer, enable ADB, and trigger any key you would like with it.

Navigation gestures are a good fix until you realized that not even the spacebar (or the whole lower row of keyboard keys) would not work. So in the end, the real solution is to prevent Android from drawing anything in the bottom part of the screen (or, at any rate, the broken part, wherever it is — as long as it is on some side and not central). And it turns out it is actually possible to resize the screen area in Android!

Continue reading “A fix for broken (physical) buttons and dead touch area on Android phones”

FOSS Android Apps and my quest for going Google free on OnePlus 6

A while ago I decided I did not want to be a product anymore, and start paying for services. I started by breaking free from all the free-but-commercial company services such as Dropbox and Gmail, and ultimately ended up ditching all non open source software on my phone, doing away with anything that was Google-run.

There is an alternative: follow through as we embark on the journey of moving to Free and Open Source Software (FOSS) for Android.

Easy replacement for essential services

The problem with non-open source software is that they have to keep building new features into their products, or the market will tag them as dead. They have to keep moving, and some occasional bugfixing is not enough. On the other hand, open source software does often not have this drive. These projects’ maintainers just tend to make sure their software runs smoothly and that it has all it should have.

So, after Dropbox kept implementing useless features and, most of all, would force me to move my folder to a partition formatted with ext4 instead of ntfs, I was fed up. My first step was thus to self-host an instance of Nextcloud. I chose self-host because I wanted control and because I already had a server to host it on, but there are options where you can rely on someone else’s instance and register for a share, pretty much as Dropbox does.

And Nextcloud is really, by all means, a valid alternative to Dropbox. There are clients for all operating systems, including mobile ones, with all the needed features, and they are actively maintained. Actually, it’s more than an alternative to Dropbox! I started with just file hosting, but there are countless apps that can boost your Nextcloud instance. I added Notes and did away with Google Keep, but most importantly Contacts and Calendar so that I could sync my phone contacts and meetings not with Google, but with my own server (using the DAVx Android app, freely available on F-Droid). I also tried the Passwords app to ditch Lastpass, but the Firefox addon was not working super well (end thus ended up signing up for Bitwarden instead). I switched to Bitwarden in the end.

I then scouted for (paid) privacy-focused email services. First to grab my interest was Tutanota, but after using it a few days it was clear to me that they were still far from being something one could rely on as a power user (no conversations, no option to receive mails from other domains, and more missing). I then went with ProtonMail, which I am very happy with — true, some features miss there as well, but they are minor. I now have a primary protonmail address, and (as a paying user) I could link my other addresses so I handle all from one dashboard. It came with a subscription to ProtonVPN as well, but commercial VPNs for privacy are just nono. And so Gmail was gone as well.

Continue reading “FOSS Android Apps and my quest for going Google free on OnePlus 6”

FEniCS differences between Function, TrialFunction and TestFunction

The FEniCS project allows for simple solution of partial differential equations. However, getting started from examples is so quick, it is easy to miss how the inner-workings of it behave. This should not happen (especially if it is a PhD project). There are three vital pieces of the puzzle that it might not be clear what they are for, and the documentation does not help here: the functions TrialFunction, TestFunction, and Function.

The thing is that, in the usual Finite Element Methods, we only have the distinction between the trial function u \in V_h and test function v \in V, and even then the distinction is often blurry. In fact, technically, the spaces V_h and V can be different. However, most of the time we take them to be the same (for example, the same discrete space of piecewise linear functions). The names we give them is just to have clearer in our heads what role they play in the game, but we could as well say “two functions in V“. Then why would FEniCS have even a three-fold difference? You can quickly check for yourself that, for example, if you swap the TrialFunction for a Function, FEniCS will complain.

There is no documentation on the topic as far as I have found, so these are my (maybe mistaken) deductions.

The meaning of the TrialFunction is to let FEniCS know what function we are solving for. In fact, when we call

solve(A, u_.vector(), b)

FEniCS expects to find a TrialFunction in A, which is supposed to be the function we are looking for. On the other hand, u_ is the symbol in which the result will be stored, and this needs to be a Function (not `Trial`, not `Test`, just a regular `Function`).

Continue reading “FEniCS differences between Function, TrialFunction and TestFunction”

Troubleshooting the installation of IRAF on Ubuntu

So, found myself installing IRAF on a friend’s laptop running Ubuntu. There are some decent tutorials online about the general steps: for example, this one, and the official one. However, they all skip all possible issues that could come up (or at least, that popped up in my case). This is another good resource about the setup, config and usage (but skip the Ureka parts).

The community-maintained version of IRAF allows easy installation on some systems, such as Ubuntu.

The thing is that IRAF is a jumble of stunningly old pieces of software working together on primitive terminals and on peculiar conditions.

In random order, possible issues/tips are:

  • If the packages iraf-all pyraf-all stsci show as non-existent, you have not added the astroconda channel. The command should be
    `conda config –add channels http://ssb.stsci.edu/astroconda`
  • You will still need to manually install ds9:
    `sudo apt install saods9`
  • You do not need to change the default shell to tcsh, although you need it to be installed:
    `sudo apt install tcsh`
  • If xgterm does not execute with error File not found, although the file is clearly there, make sure you have installed 32 bit dependencies:
    `sudo apt-get install libc6:i386 libz1:i386 libncurses5:i386 libbz2-1.0:i386 libuuid1:i386 libxcb1:i386 libxmu6:i386`
  • If `conda` commands do not work, make sure you have activated the Python environment containing the iraf packages:
    `cd /path/to/iraf
    source activate iraf27`

In the end, the exact set of commands that got the whole environment working has been: Continue reading “Troubleshooting the installation of IRAF on Ubuntu”

Install Windows 7 on a modern, Intel 8th generation computer

I spent a good week trying to get Windows 7 to work on a modern laptop, having an Intel i3 8th generation CPU and other recent components, such as a NVMe SSD. What I did not know in the first place, is that officially, Windows 7 does not support Intel CPUs later than 6th gen. Moreover, it does not support UEFI boot (not GPT partition tables). For reference, we are talking of a PC Specialist Ultranote IV 14″. Up to now, everything works almost flawlessly but the wifi/bluetooth adapter.

I am not gonna provide a full tutorial on how to install Windows 7 on a modern computer, but I am going to list here all the relevant resources that helped me succeed in the mission, as the research turned out to be quite exhausting.

The main issue is that the installer will stop quite soon and abruptly, stating that “A required CD/DVD drive device driver is missing“. Clearly, this is bullshit, as the laptop does not even have an optical drive and the installer was running from USB.

Continue reading “Install Windows 7 on a modern, Intel 8th generation computer”

Meltdown – Overview of a security vulnerability (Slides)

Here is the pdf slides of my presentation about Meltdown, the security vulnerability. First are full slides, then real presentation slides (with stops when asking questions/pausing and pondering). Free for re-use, but nice to cite.

Continue reading “Meltdown – Overview of a security vulnerability (Slides)”

Endless Christmas X-MAS CTF Writeup

This is a writeup for the Endless Christmas challenge, md5 hash 866c92038d6e9fc47db4424f71f6167a (download binary). It appeared in the X-MAS CTF, and it’s a Reverse challenge.

Using afl with Radare we can see there are calls to write and execve, both happening in main, a sign that this program creates (and maybe executes?) something else.

Putting a breakpoint just before the execve happens will reveal what file is being loaded (looking into the rax register).

I went down 60 rabbit holes disassembling this binary further, but the best thing we can do at this point is change point of view, step out of Radare, and launch the binary by itself – it certainly doesn’t seem to be doing anything nasty up to this point.

It takes some time before any output is shown, so this may be a sign that some decoding happens. The program creates a good number of other binaries which all look identical, albeit different from the original one (as their size shows), but that are actually different upon closer inspection with their md5 hashes.

Continue reading “Endless Christmas X-MAS CTF Writeup”