Here s my (twelfth) monthly update about the activities I ve done in the F/L/OSS world.
Debian
This was my 21st month of contributing to Debian.
I became a DM in late March last year and a DD last Christmas! \o/
I ve been busy with my undergraduation stuff but I still squeezed out some time for the regular Debian work.
Here are the following things I did in Debian this month:
Sponsored trace-cmd for Sudip, ruby-asset-sync for Nilesh, and mariadb-mysql-kbs for William.
RuboCop::Packaging - Helping the Debian Ruby team! \o/
This Google Summer of Code, I worked on writing a linter that could flag offenses for lines of code
that are very troublesome for Debian maintainers while trying to package and maintain Ruby libraries and applications!
Whilst the GSoC period is over, I ve been working on improving that tool and have extended that linter to now auto-correct these offenses
by itself! \o/
You can now just use the -A flag and you re done! Boom! The ultimate game-changer!
Here s a quick demo for this feature:
A few quick updates on RuboCop::Packaging:
Has 4 cops, solving 4 different issues.
3 of them support auto-correction. Just use the -A flag.
I ve also spent a considerable amount of time in raising awareness about this and in more general sense, about downstream maintenance.
As a result, I raised a bunch of PRs which got really good response. I got all of the 20 PRs merged upstream,
fixing these issues.
Debian (E)LTS
Debian Long Term Support (LTS) is a project to extend the lifetime of all Debian stable releases to (at least) 5 years. Debian LTS is not handled by the Debian security team, but by a separate group of volunteers and companies interested in making it a success.
And Debian Extended LTS (ELTS) is its sister project, extending support to the Jessie release (+2 years after LTS support).
This was my twelfth month as a Debian LTS and third month as a Debian ELTS paid contributor.
I was assigned 19.75 hours for LTS and 15.00 hours for ELTS and worked on the following things:
(for LTS, I over-worked for 11 hours last month on the survey so only had 8.75 hours this month!)
LTS CVE Fixes and Announcements:
Issued DLA 2362-1, fixing CVE-2020-11984, for uwsgi.
For Debian 9 Stretch, these problems have been fixed in version 2.0.14+20161117-3+deb9u3.
Issued DLA 2363-1, fixing CVE-2020-17446, for asyncpg.
For Debian 9 Stretch, these problems have been fixed in version 0.8.4-1+deb9u1.
Issued ELA 274-1, fixing CVE-2020-11984, for uwsgi.
For Debian 8 Jessie, these problems have been fixed in version 2.0.7-1+deb8u3.
Issued ELA 275-1, fixing CVE-2020-14363, for libx11.
For Debian 8 Jessie, these problems have been fixed in version 2:1.6.2-3+deb8u4.
Issued ELA 278-1, fixing CVE-2020-8184, for ruby-rack.
For Debian 8 Jessie, these problems have been fixed in version 1.5.2-3+deb8u4.
Also worked on updating the version of clamAV from v0.101.5 to v0.102.4.
This was a bit tricky package to work on since it involved an ABI/API change and was more or less a transition.
Super thanks to Emilio for his invaluable help and him taking over the package, finishing, and uploading it in the end.
Other (E)LTS Work:
Front-desk duty from 31-08 to 06-09 and from 28-09 onward for both LTS and ELTS.
Here is my monthly update covering what I have been doing in the free software world during September 2020 (previous month):
Updated my tickle-me-email library (which implements Getting Things Done (GTD)-like behaviours in IMAP inboxes) to support adding 'TODO' entries as read or unread based on a runtime configuration parameter. [...]
As part of my role of being the assistant Secretary of the Open Source Initiative and a board director of Software in the Public Interest, I attended their respective monthly meetings and participated in various licensing and other discussions occurring on the internet as well as the usual internal discussions, etc. I participated in the OSI's inaugural State of the Source conference and began the 'onboarding' of a new project to SPI.
Reproducible Builds
One of the original promises of open source software is that distributed peer review and transparency of process results in enhanced end-user security. However, whilst anyone may inspect the source code of free and open source software for malicious flaws, almost all software today is distributed as pre-compiled binaries. This allows nefarious third-parties to compromise systems by injecting malicious code into ostensibly secure software during the various compilation and distribution processes.
The motivation behind the Reproducible Builds effort is to ensure no flaws have been introduced during this compilation process by promising identical results are always generated from a given source, thus allowing multiple third-parties to come to a consensus on whether a build was compromised.
The project is proud to be a member project of the Software Freedom Conservancy. Conservancy acts as a corporate umbrella allowing projects to operate as non-profit initiatives without managing their own corporate structure. If you like the work of the Conservancy or the Reproducible Builds project, please consider becoming an official supporter.
This month, I:
Also include the general news in our RSS feed [...] and drop including weekly reports from the RSS feed (they are never shown now that we have over 10 items) [...].
Update ordering and location of various news and links to tarballs, etc. [...][...][...]
Make the (long) demonstration GIF less prominent. [...]
Debian
Lintian
For Lintian, the static analysis tool for Debian packages, I uploaded versions 2.93.0, 2.94.0, 2.95.0 & 2.96.0 (not counting uploads to the backports repositories), as well as:
Frontdesk duties, responding to user/developer questions, reviewing others' packages, attending our monthly IRC meeting, participating in mailing list discussions, etc.
Issued DLA 2368-1 for grunt to fix an arbitrary code execution
vulnerability due to the unsafe loading of YAML documents.
Issued DLA 2370-1 and ELA-281-1 for the python-pip Python package installer to fix a directory traversal attack where arbitrary local files (eg. /root/.ssh/authorized_keys) could be overridden.
Issued DLA 2372-1 and ELA-282-1 to prevent a denial of service attack in libproxy, a library to make applications HTTP proxy-aware.
Issued DLA 2374-1 for the gnome-shell component of the GNOME desktop. In certain configurations, when logging out of an account, the password box from the login dialog could reappear with the password visible in plaintext.
Issued DLA 2380-1 for ruby-gon, a library to send/convert data to
Javascript from Ruby applications, to prevent cross-site scripting (XSS) vulnerabilities.
You can find out more about the project via the following video:
Uploads
Before and during FOSDEM 2020, I agreed with the people (developers, supporters, managers) of the UBports Foundation to package the Unity8 Operating Environment for Debian. Since 27th Feb 2020, Unity8 has now become Lomiri.
Recent Uploads to Debian related to Lomiri
Over the past 4 months I worked on the following bits and pieces regarding Lomiri in Debian:
Work on lomiri-app-launch (Debian packaging, upstream work, upload to Debian)
Fork lomiri-url-dispatcher from url-dispatcher (upstream work)
Upload lomiri-url-dispatcher to Debian
Fork out suru-icon-theme and make it its own upstream project
Package and upload suru-icon-theme to Debian
First glance at lomiri-ui-toolkit (currently FTBFS, needs to be revisited)
Update of Mir (1.7.0 -> 1.8.0) in Debian
Fix net-cpp FTBFS in Debian
Fix FTBFS in gsettings-qt.
Fix FTBFS in mir (support of binary-only and arch-indep-only builds)
Coordinate with Marius Gripsgard and Robert Tari on shift over from Ubuntu Indicator to Ayatana Indicators
Upload ayatana-indicator-* (and libraries) to Debian (new upstream releases)
Package and upload to Debian: qmenumodel (still in Debian's NEW queue)
Package and upload to Debian: ayatana-indicator-sound
Symbol-Updates (various packages) for non-standard architectures
Fix FTBFS of qtpim-opensource-src in Debian since Qt5.14 had landed in unstable
Fix FTBFS on non-standard architectures of qtsystems, qtpim and qtfeedback
Fix wlcs in Debian (for non-standard architectures), more Symbol-Updates (esp. for the mir DEB package)
Symbol-Updates (mir, fix upstream tinkering with debian/libmiral3.symbols)
Fix FTBFS in lomiri-url-dispatcher against Debian unstable, file merge request upstream
Upstream release of qtmir 0.6.1 (via merge request)
Improve check_whitespace.py script as used in lomiri-api to ignore debian/ subfolder
Upstream release of lomiri-api 0.1.1 and upload to Debian unstable.
The next two big projects / packages ahead are lomiri-ui-toolkit and qtmir.
Credits
Many big thanks go to Marius and Dalton for their work on the UBports project and being always available for questions, feedback, etc.
Thanks to Ratchanan Srirattanamet for providing some of his time for debugging some non-thread safe unit tests (currently unsure, what package we actually looked at...).
Thanks for Florian Leeber for being my point of contact for topcis regarding my cooperation with the UBports Foundation.
Previous Posts about my Debian UBports Team Efforts
I always had the feeling that my server, hosted by Hetzner, somehow has a slow internet connection. Then, I did put it on the distance between Finland and Japan, and didn t care too much. Until yesterday my server stopped reacting to pings/ssh, and needed a hard reset. It turned out that the server was running fine, only that the ethernet card did hang. Hetzner support answered promptly and directed me to this web page, which described a change in the kernel concerning fragmentation offloading, and suggested the following configuration to regain connection speed:
ethtool -K <interface> tso off gso off
And to my surprise, this simple thing did wonder, and the connection speed improved dramatically, even from Japan (something like factor 10 in large rsync transfers). I have added this incantation to system cron tab and run it every hour, just to be sure that even after a reboot it is fine.
If you have bad connection speed with this kind of ethernet card, give it a try.
Update 2020-09-30: The post has created considerable movement, and a PR request by Fedora developers to rebase cjs onto more current gjs and libmozjs78 is being tested. I have uploaded packages of cinnamon and cjs to experimental based on these patches (400 files, about 50000 lines of code touched, not what I normally like to have in a debian patch) and would appreciate testing and feedback.
I have been more or less maintaining Cinnamon now for quite some time, but using it only sporadically due to my switch to KDE/Plasma. Currently, Cinnamon s cjs package depends on mozjs52, which also is probably going to be orphaned soon. This will precipitate a lot of changes, not the least being Cinnamon being removed from Debian/testing.
I have pinged upstream several times, without much success. So for now the future looks bleak for cinnamon in Debian. If there are interested developers (Debian or not), please get in touch with me, or directly try to update cjs to mozjs78.
For almost a decade, I ve been very slowly making progress on a multicast IPTV
system. Recently I ve made a significant leap forward in this project, and I
wanted to write a little on the topic so I ll have something to look at when I
pick this up next. I was aspiring to have a useable system by the end of today,
but for a couple of reasons, it wasn t possible.
When I started thinking about this project, it was still common to watch
broadcast television. Over time the design of this system has been changing as
new technologies have become available. Multicast IP is probably the only
constant, although I m now looking at IPv6 rather than IPv4.
Initially, I d been looking at DVB-T PCI cards. USB
devices have become common
and are available cheaply. There are also DVB-T
hats available for the
Raspberry Pi. I m now looking at a combination of Raspberry Pi hats and USB
devices with one of each on a couple of Pis.
Two Raspberry Pis with DVB hats installed, TV antenna sockets showing
The Raspberry Pi devices will run
DVBlast, an open-source DVB
demultiplexer and streaming server. Each of the tuners will be tuned to a
different transponder giving me the ability to stream any combination of
available channels simultaneously. This is everything that would be needed to
watch TV on PCs on the home network with VLC.
I ve not yet worked out if Kodi will accept multicast streams as a TV source,
but I do know that Tvheadend will. Tvheadend can also
act as a PVR to record programmes for later playback so is useful even if the
multicast streams can be viewed directly.
So how far did I get? I have built two Raspberry Pis in cases with the DVB-T
hats on. They need to sit in the lounge as that s where the antenna comes down
from the roof. There s no wired network connection in the lounge. I planned to
use an OpenBSD box as a gateway, bridging the wireless network to a wired
network.
Two problems quickly emerged. The first being that the wireless card I had
purchased only supported 2.4GHz, no 5GHz, and I have enough noise from
neighbours that the throughput rate and packet loss are unacceptable.
The second problem is that I had forgotten the problems with bridging wireless
networks. To create a bridge, you need to be able to spoof the MAC
addresses of wired
devices on the wireless interface, but this can only be done when the wireless
interface is in access point mode.
So when I come back to this, I will have to look at routing rather than
bridging to work around the MAC address issue, and I ll also be on the lookout
for a cheap OpenBSD supported mini-PCIe wireless card that can do 5GHz.
Two years ago, I held the CIS194 minicourse on Haskell at the University of Pennsylvania. In that installment of the course, I changed the first four weeks to teach the basics of Haskell using the online Haskell environment CodeWorld, and lead the students towards implementing the game Sokoban.
As it is customary for CIS194, I put my lecture notes and exercises online, and this has been used as a learning resources by people from all over the world. But since I have left the University of Pennsylvania, I lost the ability to update the text, and as the CodeWorld API has evolved, some of the examples and exercises no longer work.
Some recent complains about that, in bug reports against CodeWorld and in unrealistically flattering tweets ( Shame, this was the best Haskell course ever!!! ) motivated me to extract that material and turn it into an updated stand-alone tutorial that I can host myself.
So if you feel like learning Haskell without worrying about local installation, and while creating a reasonably fun game, head over to https://haskell-via-sokoban.nomeata.de/ and get started! Improvements can now also be contributed at https://github.com/nomeata/haskell-via-sokoban.
Credits go to Brent Yorgey, Richard Eisenberg and Noam Zilberstein, who held the previous installments of the course, and Chris Smith for creating the CodeWorld environment.
A new release 0.2.0 of pkgKitten just hit on CRAN today, or about eleven months after the previous release.
This release brings support for tinytest by having pkgKitten::kitten() automagically call tinytest::puppy() if the latter package is installed (and the user did not opt out of calling it). So your newly created minimal package now also uses a wonderful yet tiny testing framework. We also added a new documentation site using the previously tweeted-about wrapper for Material for MkDocs I really dig. And last but not least we switched to BSPM-based Continued Integration (which I wrote about yesterday in R4 #30) and fixed one bug regarding the default NAMESPACE file.
Changes in version 0.2.0 (2020-09-27)
Continuous Integration uses the updated BSPM-based script on Travis and with GitHub Actions (Dirk in #11 plus earlier commits).
A new default NAMESPACE file is now installed (Dirk in #12).
A package documentation website was added (Dirk in #13).
Call tinytest::puppy if installed and not opted out (Dirk in #14).
I ran into filesystem corruption
(ext4) on the root partition of my
backup server
which caused it to go into read-only mode. Since it's the root partition,
it's not possible to unmount it and repair it while it's running. Normally I
would boot from an Ubuntu live CD / USB
stick, but in this case
the machine is using the
mipsel architecture and
so that's not an option.
Repair using a USB enclosure
I had to pull the shutdown the server and then pull the SSD drive out. I
then moved it to an external USB enclosure and connected it to my laptop.
I started with an automatic filesystem repair:
fsck.ext4 -pf /dev/sde2
which failed for some reason and so I moved to an interactive repair:
fsck.ext4 -f /dev/sde2
Once all of the errors were fixed, I ran a full surface scan to update the
list of bad blocks:
fsck.ext4 -c /dev/sde2
Finally, I forced another check to make sure that everything was fixed at
the filesystem level:
fsck.ext4 -f /dev/sde2
Fix invalid alternate GPT
The other thing I noticed is this messge in my dmesg log:
scsi 8:0:0:0: Direct-Access KINGSTON SA400S37120 SBFK PQ: 0 ANSI: 6
sd 8:0:0:0: Attached scsi generic sg4 type 0
sd 8:0:0:0: [sde] 234441644 512-byte logical blocks: (120 GB/112 GiB)
sd 8:0:0:0: [sde] Write Protect is off
sd 8:0:0:0: [sde] Mode Sense: 31 00 00 00
sd 8:0:0:0: [sde] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sd 8:0:0:0: [sde] Optimal transfer size 33553920 bytes
Alternate GPT is invalid, using primary GPT.
sde: sde1 sde2
I therefore checked to see if the partition table looked fine and got the
following:
$ fdisk -l /dev/sde
GPT PMBR size mismatch (234441643 != 234441647) will be corrected by write.
The backup GPT table is not on the end of the device. This problem will be corrected by write.
Disk /dev/sde: 111.8 GiB, 120034123776 bytes, 234441648 sectors
Disk model: KINGSTON SA400S3
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 799CD830-526B-42CE-8EE7-8C94EF098D46
Device Start End Sectors Size Type
/dev/sde1 2048 8390655 8388608 4G Linux swap
/dev/sde2 8390656 234441614 226050959 107.8G Linux filesystem
It turns out that all I had to do, since only the backup / alternate GPT
partition table was corrupt and the primary one was fine, was to re-write
the partition table:
$ fdisk /dev/sde
Welcome to fdisk (util-linux 2.33.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
GPT PMBR size mismatch (234441643 != 234441647) will be corrected by write.
The backup GPT table is not on the end of the device. This problem will be corrected by write.
Command (m for help): w
The partition table has been altered.
Syncing disks.
Run SMART checks
Since I still didn't know what caused the filesystem corruption in the first
place, I decided to do one last check:
SMART errors.
I couldn't do this via the USB enclosure since the SMART commands aren't
forwarded to the drive and so I popped the drive back into the backup
server and booted it up.
First, I checked whether any SMART errors had been reported using
smartmontools:
smartctl -a /dev/sda
That didn't show any errors and so I kicked off an extended test:
smartctl -t long /dev/sda
which ran for 30 minutes and then passed without any errors.
The mystery remains unsolved.
Welcome to the 30th post in the rarified R recommendation resources series or R4 for short. The last post introduced BSPM. In the four weeks since, we have worked some more on BSPM to bring it to the point where it is ready for use with continuous integration. Building on this, it is now used inside the run.sh script that driven our CI use for many years (via the r-travis repo).
Which we actually use right now on three different platforms:
All three use the exact same script facilitating this, and run a matrix over Linux and macOS. You read this right: one CI setup that is portable and which you can take to your CI provider of choice. No lock-in or tie-in. Use what works, change at will. Or run on all three if you like burning extra cycles.
This is already used by handful of my repos as well as by at least two repos of friends also deploying r-travis. How does it work? In a nutshell we are
downloading run.sh via curl and changing its mode;
running run.sh bootstrap which sets the operating system default:
on Linux we use Ubuntu,
add two PPAs repos for R itself and over 4600 r-cran-* binaries,
and enable BSPM to use these from install.packages()
on macOS we use the standard setup also used on Travis, GitHub Actions and elsewhere;
this provides us with fast, reliable, easy, and portable access to binaries on two OSs under dependency resolution;
running run.sh install_deps to install just the requireded Depends:, Imports: and LinkingTo:
running run.sh tests to build the tarball and test it via R CMD check --as-cran.
There are several customizations that are possible via environment variables
additional PPAs or drat repos can be added to offer even more package choice;
alternatively one could run run.sh install_all to also install Suggests:;
optionally one could run run.sh install_r pkgA pkgB ... to install packages explicitly listed;
optionally one could also run run.sh install_aptget r-cran-pkga r-cran-pkgb otherpackage to add more Ubuntu binaries.
We find this setup compelling. The scheme is simple: there really is just one shell script behind it which can also be downloaded and altered. The scheme is also portable as we can (as shown) rotate between CI provides. The scheme is also more flexible: in case of debugging needs one can simply run the script on a local Docker or VM instance. Lastly, the scheme moves away from single points of failure or breakage.
Currently the script uses only BSPM as I had the hunch that it would a) work and b) be compelling. Adding support for RSPM would be equally easy, but I have no immediate need to do so. Adding BioConductor installation may be next. That is easy when BioConductor uses r-release; it may be little more challenging under r-devel to but it should work too. Stay tuned.
In the meantime, if the above sounds compelling, give run.sh from r-travis a go!
If you like this or other open-source work I do, you can now sponsor me at GitHub. For the first year, GitHub will match your contributions.
Launchpad still requires Python 2, which in 2020
is a bit of a problem.
Unlike a lot of the rest of 2020, though, there s good reason to be
optimistic about progress.
I ve been porting Python 2 code to Python 3 on and off for a long time, from
back when I was on the Ubuntu Foundations team and maintaining things like
the Ubiquity installer. When I moved to
Launchpad in 2015 it was certainly on my mind that this was a large body of
code still stuck on Python 2. One option would have been to just accept
that and leave it as it is, maybe doing more backporting work over time as
support for Python 2 fades away. I ve long been of the opinion that this
would doom Launchpad to being unmaintainable in the long run, and since I
genuinely love working on Launchpad - I find it an incredibly rewarding
project - this wasn t something I was willing to accept. We re already
seeing some of our important dependencies dropping support for Python 2,
which is perfectly reasonable on their terms but which is starting to become
a genuine obstacle to delivering important features when we need new
features from newer versions of those dependencies. It also looks as though
it may be difficult for us to run on Ubuntu 20.04 LTS (we re currently on
16.04, with an upgrade to 18.04 in progress) as long as we still require
Python 2, since we have some system dependencies that 20.04 no longer
provides. And then there are exciting new features like type
hints and
async/await that we d like
to be able to use.
However, until last year there were so many blockers that even considering a
port was barely conceivable. What changed in 2019 was sorting out a
trifecta of core dependencies. We ported our
database layer, Storm. We
upgraded
to modern versions of our Zope Toolkit dependencies
(after contributing various fixes upstream, including some substantial
changes to Zope s test runner
that we d carried as local patches for some years). And we
ported
our Bazaar code hosting infrastructure to
Breezy. With all that in place, a port
seemed more of a realistic possibility.
Still, even with this, it was never going to be a matter of just following
some standard porting advice and calling it
good. Launchpad has almost a million lines of Python code in its main git
tree, and around 250 dependencies of
which a number are quite Launchpad-specific. In a project that size, not
only is following standard porting advice an extremely time-consuming task
in its own right, but just about every strange corner case is going to show
up somewhere. (Did you know that StringIO.StringIO(None) and
io.StringIO(None) do different things even after you account for the
native string vs. Unicode text difference? How about the behaviour of
.union() on a subclass of
frozenset?)
Launchpad s test suite is fortunately extremely thorough, but even just
starting up the test suite involves importing most of the data model code,
so before you can start taking advantage of it you have to make a large
fraction of the codebase be at least syntactically-correct Python 3 code and
use only modules that exist in Python 3 while still working in Python 2; in
a project this size that turns out to be a large effort on its own, and can
be quite
risky
in places.
Canonical s product engineering teams work on a six-month cycle, but it just
isn t possible to cram this sort of thing into six months unless you do
literally nothing else, and please can we put all feature development on
hold while we run to stand still is a pretty tough sell to even the most
understanding management. Fortunately, we ve been able to grow the
Launchpad team in the last year or so,
and so it s been possible to put Python 3 on our roadmap on the
understanding that we aren t going to get all the way there in one cycle,
while still being able to do other substantial feature development work as well.
So, with all that preamble, what have we done this cycle? We ve taken a
two-pronged approach. From one end, we identified 147 classes that needed
to be ported away from some compatibility code in our database layer that
was substantially less friendly to Python 3: we ve ported 38 of those, so
there s clearly a fair bit more to do, but we were able to distribute this
work out among the team quite effectively. From the other end, it was clear
that it would be very inefficient to do general porting work when any
attempt to even run the test suite would run straight into the same crashes
in the same order, so I set myself a target of getting the test suite to
start up, and started hacking on an enormous git
branch that I never
expected to try to land directly: instead, I felt free to commit just about
anything that looked reasonable and moved things forward even if it was very
rough, and every so often went back to tidy things up and cherry-pick
individual commits into a form that included some kind of explanation and
passed existing tests so that I could propose them for review.
This strategy has been dramatically more successful than anything I ve tried
before at this scale. So far this cycle, considering only Launchpad s main
git tree, we ve landed 137 Python-3-relevant merge proposals for a total of
39552 lines of git diff output, keeping our existing tests passing along
the way and deploying incrementally to production. We have about 27000 more
lines of patch at varying degrees of quality to tidy up and merge. Our main
development branch is only perhaps 10 or 20 more patches away from the test
suite being able to start up, at which point we ll be able to get a buildbot
running so that multiple developers can work on this much more easily and
see the effect of their work. With the full unlanded patch stack, about 75%
of the test suite passes on Python 3! This still leaves a long tail of
several thousand tests to figure out and fix, but it s a much more
incrementally-tractable kind of problem than where we started.
Finally: the funniest (to me) bug I ve encountered in this effort was the
one I encountered in the test runner and fixed in
zopefoundation/zope.testrunner#106:
IDs of failing tests were written to a pipe, so if you have a test suite
that s large enough and broken enough then eventually that pipe would reach
its capacity and your test runner would just give up and hang. Pretty
annoying when it meant an overnight test run didn t give useful results, but
also eloquent commentary of sorts.
This is the first post of a series in which we will provide the readers with simple tutorial approaches to reproduce the data analysis of some of our published papers. All our data analysis is performed using QSoas. Today, we will show you how to analyze the experiments we used to characterize the behaviour of an enzyme, the Nickel-Iron CO dehydrogenase IV from Carboxytothermus hydrogenoformans. The experiments we analyze here are described in much more details in the original publication, Domnik et al, Angewandte Chemie, 2017. The only things you need to know for now are the following:
the data is the evolution of the current over time given by the absorbed enzyme;
at a given point, a certain amount of CO (50 M) is injected, and its concentration decreases exponentially over time;
the enzyme has a Michaelis-Menten behaviour with respect to CO.
This means that we expect a response of the type: $$i(t) = \frac i_m 1 + \frac K_m [\mathrm CO ](t) $$ in which $$[\mathrm CO ](t) = \begin cases
0, & \text for t < t_0 \\
C_0 \exp \frac t_0 - t \tau , & \text for t\geq t_0 %>
\end cases $$
To begin this tutorial, first download the files from the github repository (direct links: data, parameter file and ruby script). Start QSoas, go to the directory where you saved the files, load the data file, and remove spikes in the data using the following commands:
QSoas> cd
QSoas> l Km-CODH-IV.dat
QSoas> R
First fitThen, to fit the above equation to the data, the simplest is to take advantage of the time-dependent parameters features of QSoas. Run simply:
QSoas> fit-arb im/(1+km/s) /with=s:1,exp
This simply launches the fit interface to fit the exact equations above. The im/(1+km/s) is simply the translation of the Michaelis-Menten equation above, and the /with=s:1,exp specifies that s is the result of the sum of 1 exponential like for the definition of above. Then, load the Km-CODH-IV.params parameter files (using the "Parameters.../Load from file" action at the bottom, or the Ctrl+L keyboard shortcut). Your window should now look like this:
To fit the data, just hit the "Fit" button ! (or Ctrl+F).
Including an offset
The fit is not bad, but not perfect. In particular, it is easy to see why: the current predicted by the fit goes to 0 at large times, but the actual current is below 0. We need therefore to include an offset to take this into consideration. Close the fit window, and re-run a fit, but now with this command:
QSoas> fit-arb im/(1+km/s)+io /with=s:1,exp
Notice the +io bit that corresponds to the addition of an offset current. Load again the base parameters, run the fit again... Your fit window show now look like:
See how the offset current is now much better taken into account. Let's talk a bit more about the parameters:
im is \(i_m\), the maximal current, around 120 nA (which matches the magnitude of the original current).
io is the offset current, around -3nA.
km is the \(K_m\), expressed in the same units as s_1, the first "injected" value of s (we used 50 because the injection is 50 M CO). That means the value of \(K_m\) determined by this fit is around 9 nM ! (but see below).
s_t_1 is the time of the injection of CO (it was in the parameter files you loaded).
Finally, s_tau_1 is the time constant of departure of CO, noted \(\tau\) in the equations above.
Taking into account mass-transport limitations
However, the fit is still unsatisfactory: the predicted curve fails to reproduce the curvature at the beginning and at the end of the decrease. This is due to issues linked to mass-transport limitations, which are discussed in details in Merrouch et al, Electrochimica Acta, 2017. In short, what you need to do is to close the fit window again, load the transport.rb Ruby file that contains the definition of the itrpt function, and re-launch the fit window using:
Load again the parameter file... but this time you'll have to play a bit more with the starting parameters for QSoas to find the right values when you fit. Here are some tips:
the curve predicted with the current parameters (use "Update" to update the display) should "look like" the data;
apart from io, no parameter should be negative;
there may be hints about the correct values in the papers...
A successful fit should look like this:
Here you are ! I hope you enjoyed analyzing our data, and that it will help you analyze yours ! Feel free to comment and ask for clarifications.
About QSoasQSoas is a powerful open source data analysis program that focuses on flexibility and powerful fitting capacities. It is released under the GNU General Public License. It is described in Fourmond, Anal. Chem., 2016, 88 (10), pp 5050 5052. Current version is 2.2. You can download its source code or buy precompiled versions for MacOS and Windows there.
QSoas can read and execute Ruby code directly, while reading command files, or even at the command prompt. For that, just write plain Ruby code inside a ruby...ruby end block. Probably the most useful possibility is to define elaborated functions directly from within QSoas, or, preferable, from within a script; this is an alternative to defining a function in a completely separated Ruby-only file using ruby-run. For instance, you can define a function for plain Michaelis-Menten kinetics with a file containing:
ruby
def my_func(x, vm, km)
return vm/(1 + km/x)
end
ruby end
This defines the function my_func with three parameters, , (vm) and (km), with the formula:
You can then test that the function has been correctly defined running for instance:
This yields the correct answer: the first command evaluates the function with x = 1.0, vm = 1.0 and km = 1.0. For , the result is (here 0.5). For , the result is almost . You can use the newly defined my_func in any place you would use any ruby code, such as in the optional argument to generate-buffer, or for arbitrary fits:
To redefine my_func, just run the ruby code again with a new definition, such as:
ruby
def my_func(x, vm, km)
return vm/(1 + km/x**2)
end
ruby end
The previous version is just erased, and all new uses of my_func will refer to your new definition.
See for yourselfThe code for this example can be found there. Browse the qsoas-goodiesgithub repository for more goodies !
About QSoasQSoas is a powerful open source data analysis program that focuses on flexibility and powerful fitting capacities. It is released under the GNU General Public License. It is described in Fourmond, Anal. Chem., 2016, 88 (10), pp 5050 5052. Current version is 2.1. You can download its source code or buy precompiled versions for MacOS and Windows there.
The new release of QSoas is finally ready ! It brings in a lot of new features and improvements, notably greatly improved memory use for massive multifits, a fit for linear (in)activation processes (the one we used in Fourmond et al, Nature Chemistry 2014), a new way to transform "numbers" like peak position or stats into new datasets and even SVG output ! Following popular demand, it also finally brings back the peak area output in the find-peaks command (and the other, related commands) ! You can browse the full list of changes there.
The new release can be downloaded from the downloads page.
Freely available binary images for QSoas 1.0In addition to the new release, we are now releasing the binary images for MacOS and Windows for the release 1.0. They are also freely available for download from the downloads page.
About QSoasQSoas is a powerful open source data analysis program that focuses on flexibility and powerful fitting capacities. It is released under the GNU General Public License. It is described in Fourmond, Anal. Chem., 2016, 88 (10), pp 5050 5052. Current version is 2.2. You can download its source code or buy precompiled versions for MacOS and Windows there.
So my previous post was all about implementing a simple FORTH-like language. Of course the obvious question is then "What do you do with it"?
So I present one possible use - turtle-graphics:
\ Draw a square of the given length/width
: square
dup dup dup dup
4 0 do
forward
90 turn
loop
;
\ pen down
1 pen
\ move to the given pixel
100 100 move
\ draw a square of width 50 pixels
50 square
\ save the result (png + gif)
save
Sun is the daughter and heir of the mercurial Queen-Marshal Eirene, ruler
of the Republic of Chaonia. Chaonia, thanks to Eirene and her ancestors,
has carved out a fiercely independent position between the Yele League and
the Phene Empire. Sun's father, Prince Jo o, is one of Eirene's three
consorts, all chosen for political alliances to shore up that fragile
position. Jo o is Gatoi, a civilization of feared fighters and supposed
barbarians from outside Chaonia who normally ally with the Phene, which
complicates Sun's position as heir. Sun attempts to compensate for that
by winning battles for the Republic, following in the martial footsteps of
her mother.
The publisher's summary of this book is not great (I'm a huge fan of
Princess Leia, but that is... not the analogy that comes to mind), so let
me try to help. This is gender-swapped Alexander the Great in space.
However, it is gender-swapped Alexander the Great in space with her
Companions, which means the DNA of this novel is half space opera and
half heist story (without, to be clear, an actual heist, although there
are some heist-like maneuvers). It's also worth mentioning that Sun, like
Alexander, is not heterosexual.
The other critical thing to know before reading, mostly because it will
get you through the rather painful start, is that the most interesting
viewpoint character in this book is not Sun, the Alexander analogue. It's
Persephone, who isn't introduced until chapter seven.
Significant disclaimer up front: I got a reasonably typical US grade
school history of Alexander the Great, which means I was taught that he
succeeded his father, conquered a whole swath of the middle of the
Eurasian land mass at a very young age, and then died and left his empire
to his four generals who promptly divided it into four uninteresting
empires that no one's ever heard of, and that's why Rome is more important
than Greece. (I put in that last bit to troll one specific person.)
I am therefore not the person to judge the parallels between this story
and known history, or to notice any damage done to Greek pride, or to pick
up on elements that might cause someone with a better grasp of that
history to break out in hives. I did enough research to know that one
scene in this book is lifted directly out of Alexander's life, but I'm not
sure how closely the other parallels track. Yele is probably southern
Greece and Phene is probably Persia, but I'm not certain even of that, and
some of the details don't line up. If I had to hazard a guess, I'd say
that Elliott has probably mangled history sufficiently to make it clear
that this isn't intended to be a retelling, but if the historical
parallels are likely to bother you, you may want to do more research
before reading.
What I can say is that the space opera setup, while a bit stock, has all
the necessary elements to make me happy. Unconquerable Sun is
firmly in the "lost Earth" tradition: The Argosy fleet fled the
now-mythical Celestial Empire and founded a new starfaring civilization
without any contact with their original home. Eventually, they invented
(or discovered; the characters don't know) the beacons, which allow for
instantaneous travel between specific systems without the long (but still
faster-than-light) journeys of the knnu drive. More recently, the beacon
network has partly collapsed, cutting off the characters' known world from
the civilization that was responsible for the beacons and guarded their
secrets. It's a fun space opera history with lots of lost knowledge to
reference and possibly discover, and with plot-enabling military choke
points at the surviving beacons that link multiple worlds.
This is all background to the story, which is the ongoing war between
Chaonia and the Phene Empire mixed with cutthroat political maneuvering
between the great houses of the Chaonian Republic. This is where the
heist aspects come in. Each house sends one representative to join the
household of the Queen-Marshal and (more to the point for this story)
another to join her heir. Sun has encouraged the individual and divergent
talents of her Companions and their cee-cees (an unfortunate term that I
suspect is short for Companion's Companion) and forged them into a good
working team. A team that's about to be disrupted by the maneuverings of
a rival house and the introduction of a new team member whom no one wants.
A problem with writing tactical geniuses is that they often aren't good
viewpoint characters. Sun's tight third-person chapters, which is a
little less than half the book, advance the plot and provide analysis of
the interpersonal dynamics of the characters, but aren't the strength of
the story. That lies with the interwoven first-person sections that
follow Persephone, an altogether more interesting character.
Persephone is the scion of the house that is Sun's chief rival, but she
has no interest in being part of that house or its maneuverings. When the
story opens, she's a cadet in a military academy for recruits from the
commoners, having run away from home, hidden her identity, and won a
position through the open entrance exams. She of course doesn't stay
there; her past catches up with her and she gets assigned to Sun, to a
great deal of mutual suspicion. She also is assigned an impeccably
dressed and stunningly beautiful cee-cee, Tiana, who has her own secrets
and who was my favorite character in the book.
Somewhat unusually for the space opera tradition, this is a book that
knows that common people exist and have interesting lives. It's primarily
focused on the ruling houses, but that focus is not exclusive and the
rulers do not have a monopoly on competence. Elliott also avoids
narrowing the political field too far; the Gatoi are separate from the
three rival powers, and there are other groups with traditions older than
the Chaonian Republic and their own agendas. Sun and her Companions are
following a couple of political threads, but there is clearly more going
on in this world than that single plot.
This is exactly the kind of story I think of when I think space opera.
It's not doing anything that original or groundbreaking, and it's not
going to make any of my lists of great literature, but it's a fun romp
with satisfyingly layered bits of lore, a large-scale setting with lots of
plot potential, and (once we get through the confusing and somewhat
tedious process of introducing rather too many characters in short
succession) some great interpersonal dynamics. It's the kind of book in
which the characters are in the middle of decisive military action in an
interstellar war and are also near-teenagers competing for ratings in an
ad hoc reality TV show, primarily as an excuse to create tactical
distractions for Sun's latest scheme. The writing is okay but not great,
and the first few chapters have some serious infodumping problems, but I
thoroughly enjoyed the whole book and will pre-order the sequel.
One Amazon review complained that Unconquerable Sun is not a space
opera like Hyperion or
Use of Weapons. That is entirely true,
but if that's your standard for space opera, the world may be a
disappointing place. This is a solid entry in a subgenre I love, with
some great characters, sarcasm, competence porn, plenty of pages to keep
turning, a few twists, and the promise of more to come. Recommended.
Followed by the not-yet-published Furious Heaven.
Rating: 7 out of 10
Previously: v5.6
Linux v5.7 was released at the end of May. Here s my summary of various security things that caught my attention:
arm64 kernel pointer authentication
While the ARMv8.3 CPU Pointer Authentication (PAC) feature landed for userspace already, Kristina Martsenko has now landed PAC support in kernel mode. The current implementation uses PACIASP which protects the saved stack pointer, similar to the existing CONFIG_STACKPROTECTOR feature, only faster. This also paves the way to sign and check pointers stored in the heap, as a way to defeat function pointer overwrites in those memory regions too. Since the behavior is different from the traditional stack protector, Amit Daniel Kachhap added an LKDTM test for PAC as well.
BPF LSM
The kernel s Linux Security Module (LSM) API provide a way to write security modules that have traditionally implemented various Mandatory Access Control (MAC) systems like SELinux, AppArmor, etc. The LSM hooks are numerous and no one LSM uses them all, as some hooks are much more specialized (like those used by IMA, Yama, LoadPin, etc). There was not, however, any way to externally attach to these hooks (not even through a regular loadable kernel module) nor build fully dynamic security policy, until KP Singh landed the API for building LSM policy using BPF. With this, it is possible (for a privileged process) to write kernel LSM hooks in BPF, allowing for totally custom security policy (and reporting).
execve() deadlock refactoring
There have been a number of long-standing races in the kernel s process launching code where ptrace could deadlock. Fixing these has been attempted several times over the last many years, but Eric W. Biederman and Ernd Edlinger decided to dive in, and successfully landed the a series of refactorings, splitting up the problematic locking and refactoring their uses to remove the deadlocks. While he was at it, Eric also extended the exec_id counter to 64 bits to avoid the possibility of the counter wrapping and allowing an attacker to send arbitrary signals to processes they normally shouldn t be able to.
slub freelist obfuscation improvements
After Silvio Cesare observed some weaknesses in the implementation of CONFIG_SLAB_FREELIST_HARDENED s freelist pointer content obfuscation, I improved their bit diffusion, which makes attacks require significantly more memory content exposures to defeat the obfuscation. As part of the conversation, Vitaly Nikolenko pointed out that the freelist pointer s location made it relatively easy to target too (for either disclosures or overwrites), so I moved it away from the edge of the slab, making it harder to reach through small-sized overflows (which usually target the freelist pointer). As it turns out, there were a few assumptions in the kernel about the location of the freelist pointer, which had to also get cleanedup.
RISCV page table dumping
Following v5.6 s generic page table dumping work, Zong Li landed the RISCV page dumping code. This means it s much easier to examine the kernel s page table layout when running a debug kernel (built with PTDUMP_DEBUGFS), visible in /sys/kernel/debug/kernel_page_tables.
array index bounds checking
This is a pretty large area of work that touches a lot of overlapping elements (and history) in the Linux kernel. The short version is: C is bad at noticing when it uses an array index beyond the bounds of the declared array, and we need to fix that. For example, don t do this:
int foo[5];
...
foo[8] = bar;
The long version gets complicated by the evolution of flexible array structure members, so we ll pause for a moment and skim the surface of this topic. While things like CONFIG_FORTIFY_SOURCE try to catch these kinds of cases in the memcpy() and strcpy() family of functions, it doesn t catch it in open-coded array indexing, as seen in the code above. GCC has a warning (-Warray-bounds) for these cases, but it was disabled by Linus because of all the false positives seen due to fake flexible array members. Before flexible arrays were standardized, GNU C supported zero sized array members. And before that, C code would use a 1-element array. These were all designed so that some structure could be the header in front of some data blob that could be addressable through the last structure member:
Converting all the zero- and one-element array members to flexible arrays is one of Gustavo A. R. Silva s goals, and hundreds of these changes started landing. Once fixed, -Warray-bounds can be re-enabled. Much more detail can be found in the kernel s deprecation docs.
However, that will only catch the visible at compile time cases. For runtime checking, the Undefined Behavior Sanitizer has an option for adding runtime array bounds checking for catching things like this where the compiler cannot perform a static analysis of the index values:
int foo[5];
...
for (i = 0; i < some_argument; i++)
...
foo[i] = bar;
...
It was, however, not separate (via kernel Kconfig) until Elena Petrova and I split it out into CONFIG_UBSAN_BOUNDS, which is fast enough for production kernel use. With this enabled, it's now possible to instrument the kernel to catch these conditions, which seem to come up with some regularity in Wi-Fi and Bluetooth drivers for some reason. Since UBSAN (and the other Sanitizers) only WARN() by default, system owners need to set panic_on_warn=1 too if they want to defend against attacks targeting these kinds of flaws. Because of this, and to avoid bloating the kernel image with all the warning messages, I introduced CONFIG_UBSAN_TRAP which effectively turns these conditions into a BUG() without needing additional sysctl settings.
Fixing "additive" snprintf() usage
A common idiom in C for building up strings is to use sprintf()'s return value to increment a pointer into a string, and build a string with more sprintf() calls:
/* safe if strlen(foo) + 1 < sizeof(string) */
wrote = sprintf(string, "Foo: %s\n", foo);
/* overflows if strlen(foo) + strlen(bar) > sizeof(string) */
wrote += sprintf(string + wrote, "Bar: %s\n", bar);
/* writing way beyond the end of "string" now ... */
wrote += sprintf(string + wrote, "Baz: %s\n", baz);
The risk is that if these calls eventually walk off the end of the string buffer, it will start writing into other memory and create some bad situations. Switching these to snprintf() does not, however, make anything safer, since snprintf() returns how much it would have written:
/* safe, assuming available <= sizeof(string), and for this example
* assume strlen(foo) < sizeof(string) */
wrote = snprintf(string, available, "Foo: %s\n", foo);
/* if (strlen(bar) > available - wrote), this is still safe since the
* write into "string" will be truncated, but now "wrote" has been
* incremented by how much snprintf() *would* have written, so "wrote"
* is now larger than "available". */
wrote += snprintf(string + wrote, available - wrote, "Bar: %s\n", bar);
/* string + wrote is beyond the end of string, and availabe - wrote wraps
* around to a giant positive value, making the write effectively
* unbounded. */
wrote += snprintf(string + wrote, available - wrote, "Baz: %s\n", baz);
So while the first overflowing call would be safe, the next one would be targeting beyond the end of the array and the size calculation will have wrapped around to a giant limit. Replacing this idiom with scnprintf() solves the issue because it only reports what was actually written. To this end, Takashi Iwai has been landing a bunch scnprintf() fixes.
That's it for now! Let me know if there is anything else you think I should mention here. Next up: Linux v5.8.
I upgraded my home internet connection to fibre (FTTP) last October. I m still on an 80M/20M service, so it s no faster than my old VDSL FTTC connection was, and as a result for a long time I continued to use my HomeHub 5A running OpenWRT. However the FTTP ONT meant I was using up an additional ethernet port on the router, and I was already short, so I ended up with a GigE switch in use as well. Also my wifi is handled by a UniFi, which takes its power via Power-over-Ethernet. That mean I had a router, a switch and a PoE injector all in close proximity. I wanted to reduce the number of devices, and ideally upgrade to something that could scale once I decide to upgrade my FTTP service speed.
Looking around I found the MikroTik RB3011UiAS-RM, which is a rack mountable device with 10 GigE ports (plus an SFP slot) and a dual core Qualcomm IPQ8064 ARM powering it. There s 1G RAM and 128MB NAND flash, as well as a USB3 port. It also has PoE support. On paper it seemed like an ideal device. I wasn t particularly interested in running RouterOS on it (the provided software), but that s based on Linux and there was some work going on within OpenWRT to add support, so it seemed like a worthwhile platform to experiment with (what, you expected this to be about me buying an off the shelf device and using it with only the supplied software?). As an added bonus a friend said he had one he wasn t using, and was happy to sell it to me for a bargain price.
I did try out RouterOS to start with, but I didn t find it particularly compelling. I m comfortable configuring firewalling and routing at a Linux command line, and I run some additional services on the router like my MQTT broker, and mqtt-arp, my wifi device presence monitor. I could move things around such that they ran on the house server, but I consider them core services and as a result am happier with them on the router.
The first step was to get something booting on the router. Luckily it has an RJ45 serial console port on the back, and a reasonably featured bootloader that can manage to boot via tftp over the network. It wants an ELF binary rather than a plain kernel, but Sergey Sergeev had done the hard work of getting u-boot working for the IPQ8064, which mean I could just build normal u-boot images to try out.
Linux upstream already had basic support for a lot of the pieces I was interested in. There s a slight fudge around AUTO_ZRELADDR because the network coprocessors want a chunk of memory at the start of RAM, but there s ongoing discussions about how to handle this cleanly that I m hopeful will eventually mean I can drop that hack. Serial, ethernet, the QCA8337 switches (2 sets of 5 ports, tied to different GigE devices on the processor) and the internal NOR all had drivers, so it was a matter of crafting an appropriate DTB to get them working. That left niggles.
First, the second switch is hooked up via SGMII. It turned out the IPQ806x stmmac driver didn t initialise the clocks in this mode correctly, and neither did the qca8k switch driver. So I need to fix up both of those (Sergey had handled the stmmac driver, so I just had to clean up and submit his patch). Next it turned out the driver for talking to the Qualcomm firmware (SCM) had been updated in a way that broke the old method needed on the IPQ8064. Some git archaeology figured that one out and provided a solution. Ansuel Smith helpfully provided the DWC3 PHY driver for the USB port. That got me to the point I could put a Debian armhf image onto a USB stick and mount that as root, which made debugging much easier.
At this point I started to play with configuring up the device to actually act as a router. I make use of a number of VLANs on my home network, so I wanted to make sure I could support those. Turned out the stmmac driver wasn t happy reconfiguring its MTU because the IPQ8064 driver doesn t configure the FIFO sizes. I found what seem to be the correct values and plumbed them in. Then the qca8k driver only supported port bridging. I wanted the ability to have a trunk port to connect to the upstairs switch, while also having ports that only had a single VLAN for local devices. And I wanted the switch to handle this rather than requiring the CPU to bridge the traffic. Thankfully it s easy to find a copy of the QCA8337 datasheet and the kernel Distributed Switch Architecture is pretty flexible, so I was able to implement the necessary support.
I stuck with Debian on the USB stick for actually putting the device into production. It makes it easier to fix things up if necessary, and the USB stick allows for a full Debian install which would be tricky on the 128M of internal NAND. That means I can use things like nftables for my firewalling, and use the standard Debian packages for things like collectd and mosquitto. Plus for debug I can fire up things like tcpdump or tshark. Which ended up being useful because when I put the device into production I started having weird IPv6 issues that turned out to be a lack of proper Ethernet multicast filter support in the IPQ806x ethernet device. The driver would try and setup the multicast filter for the IPv6 NDP related packets, but it wouldn t actually work. The fix was to fall back to just receiving all multicast packets - this is what the vendor driver does.
Most of this work will be present once the 5.9 kernel is released - the basics are already in 5.8. Currently not queued up that I can think of are the following:
stmmac IPQ806x FIFO sizes. I sent out an RFC patch for these, but didn t get any replies. I probably just need to submit this.
NAND. This is missing support for the QCOM ADM DMA engine. I ve sent out the patch I found to enable this, and have had some feedback, so I m hopeful it will get in at some point.
LCD. AFAICT LCD is an ST7735 device, which has kernel support, but I haven t spent serious effort getting the SPI configuration to work.
Touchscreen. Again, this seems to be a zt2046q or similar, which has a kernel driver, but the basic attempts I ve tried don t get any response.
Proper SFP functionality. The IPQ806x has a PCS module, but the stmmac driver doesn t have an easy way to plumb this in. I have ideas about how to get it working properly (and it can be hacked up with a fixed link config) but it s not been a high priority.
Device tree additions. Some of the later bits I ve enabled aren t yet in the mainline RB3011 DTB. I ll submit a patch for that at some point.
Overall I consider the device a success, and it s been entertaining getting it working properly. I m running a mostly mainline kernel, it s handling my house traffic without breaking a sweat, and the fact it s running Debian makes it nice and easy to throw more things on it as I desire. However it turned out the RB3011 isn t as perfect device as I d hoped. The PoE support is passive, and the UniFi wants 802.1af. So I was going to end up with 2 devices. As it happened I picked up a cheap D-Link DGS-1210-10P switch, which provides the PoE support as well as some additional switch ports. Plus it runs Linux, so more on that later
Lower Ed (subtitled The Troubling Rise of For-Profit Colleges
in the New Economy) is the first book by sociologist Tressie McMillan
Cottom. (I previously reviewed her second book, the excellent essay
collection Thick.) It is a deep look at
the sociology of for-profit higher education in the United States based on
interviews with students and executives, analysis of Wall Street filings,
tests of the admissions process, and her own personal experiences working
for two of the schools. One of the questions that McMillan Cottom tries
to answer is why students choose to enroll in these institutions,
particularly the newer type of institution funded by federal student loans
and notorious for being more expensive and less valuable than non-profit
colleges and universities.
I was hesitant to read this book because I find for-profit schools
depressing. I grew up with the ubiquitous commercials, watched the
backlash develop, and have a strongly negative impression of the industry,
partly influenced by having worked in traditional non-profit higher
education for two decades. The prevailing opinion in my social group is
that they're a con job. I was half-expecting a reinforcement of that
opinion by example, and I don't like reading infuriating stories about
people being defrauded.
I need not have worried. This is not that sort of book (nor, in
retrospect, do I think McMillan Cottom would approach a topic from that
angle). Sociology is broader than reporting. Lower Ed positions
for-profit colleges within a larger social structure of education,
credentialing, and changes in workplace expectations; takes a deep look at
why they are attractive to their students; and humanizes and complicates
the motives and incentives of everyone involved, including administrators
and employees of for-profit colleges as well as the students. McMillan
Cottom does of course talk about the profit motive and the deceptions
surrounding that, but the context is less that of fraud that people are
unable to see through and more a balancing of the drawbacks of a set of
poor choices embedded in institutional failures.
One of my metrics for a good non-fiction book is whether it introduces me
to a new idea that changes how I analyze the world. Lower Ed does
that twice.
The first idea is the view of higher education through the lens of risk
shifting. It used to be common for employers to hire people without prior
job-specific training and do the training in-house, possibly through an
apprenticeship structure. More notably, once one was employed by a
particular company, the company routinely arranged or provided ongoing
training. This went hand-in-hand with a workplace culture of long tenure,
internal promotion, attempts to avoid layoffs, and some degree of mutual
loyalty. Companies expected to invest significantly in an employee over
their career and thus also had an incentive to retain that employee rather
than train someone for a competitor.
However, from a purely financial perspective, this is a risk and an
inefficiency, similar to the risk of carrying a large inventory of parts
and components. Companies have responded to investor-driven focus on
profits and efficiency by reducing overhead and shifting risk. This leads
to the lean supply chain, where no one pays for parts to sit around in
warehouses and companies aren't caught with large stockpiles of
now-useless components, but which is more sensitive to any disruption
(such as from a global pandemic). And, for employment, it leads to a
desire to hire pre-trained workers, retain only enough workers to do the
current amount of work, and replace them with new workers who already have
appropriate training rather than retrain them.
The effect of the corporate decision to only hire pre-trained employees is
to shift the risk and expense of training from the company to the
prospective employee. The individual has to seek out training at their
own expense in the hope (not guarantee) that at the conclusion of that
training they will get or retain a job. People therefore turn to higher
education to both provide that training and to help them decide what type
of training will eventually be valuable. This has a long history with
certain professional fields (doctors and lawyers, for example), but the
requirements for completing training in those fields are relatively clear
(a professional license to practice) and the compensation reflects the
risk. What's new is the shift of training risk to the individual in more
mundane jobs, without any corresponding increase in compensation.
This, McMillan Cottom explains, is the background for the growth in demand
for higher education in general and the the type of education offered by
for-profit colleges in particular. Workers who in previous eras would be
trained by their employers are now responsible for their own training.
That training is no longer judged by the standards of a specific
workplace, but is instead evaluated by a hiring process that expects
constant job-shifting. This leads to increased demand by both workers and
employers for credentials: some simple-to-check certificate of completion
of training that says that this person has the skills to immediately start
doing some job. It also leads to a demand for more flexible class hours,
since the student is now often someone older with a job and a family to
balance. Their ongoing training used to be considered a cost of business
and happen during their work hours; now it is something they have to fit
around the contours of their life because their employer has shifted that
risk to them.
The risk-shifting frame makes sense of the "investment" language so common
in for-profit education. In this job economy, education as investment is
not a weird metaphor for the classic benefits of a liberal arts education:
broadened perspective, deeper grounding in philosophy and ethics, or
heightened aesthetic appreciation. It's an investment in the literal
financial sense; it is money that you spend now in order to get a
financial benefit (a job) in the future. People have to invest in their
own training because employers are no longer doing so, but still require
the outcome of that investment. And, worse, it's primarily a
station-keeping investment. Rather than an optional expenditure that
could reap greater benefits later, it's a mandatory expenditure to
prevent, at best, stagnation in a job paying poverty wages, and at worst
the disaster of unemployment.
This explains renewed demand for higher education, but why for-profit
colleges? We know they cost more and have a worse reputation (and
therefore their credentials have less value) than traditional non-profit
colleges. Flexible hours and class scheduling explains some of this but
not all of it. That leads to the second perspective-shifting idea I got
from Lower Ed: for-profit colleges are very good at what they focus
time and resources on, and they focus on enrolling students.
It is hard to enroll in a university! More precisely, enrolling in a
university requires bureaucracy navigation skills, and those skills are
class-coded. The people who need them the most are the least likely to
have them.
Universities do not reach out to you, nor do they guide you through the
process. You have to go to them and discover how to apply, something that
is often made harder by the confusing state of many university web sites.
The language and process is opaque unless other people in your family have
experience with universities and can explain it. There might be someone
you can reach on the phone to ask questions, but they're highly unlikely
to proactively guide you through the remaining steps. It's your
responsibility to understand deadlines, timing, and sequence of
operations, and if you miss any of the steps (due to, for example, the
overscheduled life of someone in need of better education for better job
prospects), the penalty in time and sometimes money can be substantial.
And admission is just the start; navigating financial aid, which most
students will need, is an order of magnitude more daunting. Community
colleges are somewhat easier (and certainly cheaper) than universities,
but still have similar obstacles (and often even worse web sites).
It's easy for people like me, who have long professional expertise with
bureaucracies, family experience with higher education, and a support
network of people to nag me about deadlines, to underestimate this. But
the application experience at a for-profit college is entirely different
in ways far more profound than I had realized. McMillan Cottom documents
this in detail from her own experience working for two different
for-profit colleges and from an experiment where she indicated interest in
multiple for-profit colleges and then stopped responding before signing
admission paperwork. A for-profit college is fully invested in helping a
student both apply and get financial aid, devotes someone to helping them
through that process, does not expect them to understand how to navigate
bureaucracies or decipher forms on their own, does not punish unexpected
delays or missed appointments, and goes to considerable lengths to try to
keep anyone from falling out of the process before they are enrolled.
They do not expect their students to already have the skills that one
learns from working in white-collar jobs or from being surrounded by
people who do. They provide the kind of support that an educational
institution should provide to people who, by definition, don't understand
something and need to learn.
Reading about this was infuriating. Obviously, this effort to help people
enroll is largely for predatory reasons. For-profit schools make their
money off federal loans and they don't get that money unless they can get
someone to enroll and fill out financial paperwork (and to some extent
keep them enrolled), so admissions is their cash cow and they act
accordingly. But that's not why I found it infuriating; that's just
predictable capitalism. What I think is inexcusable is that nothing they
do is that difficult. We could being doing the same thing for prospective
community college students but have made the societal choice not to. We
believe that education is valuable, we constantly advocate that people get
more job training and higher education, and yet we demand prospective
students navigate an unnecessarily baroque and confusing application
process with very little help, and then stereotype and blame them for
failing to do so.
This admission support is not a question of resources. For-profit
colleges are funded almost entirely by federally-guaranteed student loans.
We are paying them to help people apply. It is, in McMillan
Cottom's term, a negative social insurance program. Rather than buffering
people against the negative effects of risk-shifting of employers by
helping them into the least-expensive and most-effective training programs
(non-profit community colleges and universities), we are spending tax
dollars to enrich the shareholders of for-profit colleges while
underfunding the alternatives. We are choosing to create a gap that routes
government support to the institution that provides worse training at
higher cost but is very good at helping people apply. It's as if the
unemployment system required one to use payday lenders to get one's
unemployment check.
There is more in this book I want to talk about, but this review is
already long enough. Suffice it to say that McMillan Cottom's analysis
does not stop with market forces and the admission process, and the parts
of her analysis that touch on my own personal experience as someone with a
somewhat unusual college path ring very true. Speaking as a former
community college student, the discussion of class credit transfer
policies and the way that institutional prestige gatekeeping and the
desire to push back against low-quality instruction becomes a trap that
keeps students in the for-profit system deserves another review this
length. So do the implications of risk-shifting and credentialism on the
morality of "cheating" on schoolwork.
As one would expect from the author of the essay
"Thick" about bringing context to sociology, Lower Ed is personal
and grounded. McMillan Cottom doesn't shy away from including her own
experiences and being explicit about her sources and research. This is
backed up by one of the best methodological notes sections I've seen in a
book. One of the things I love about McMillan Cottom's writing is that
it's solidly academic, not in the sense of being opaque or full of jargon
(the text can be a bit dense, but I rarely found it hard to follow), but
in the sense of being clear about the sources of knowledge and her methods
of extrapolation and analysis. She brings her receipts in a refreshingly
concrete way.
I do have a few caveats. First, I had trouble following a structure and
line of reasoning through the whole book. Each individual point is
meticulously argued and supported, but they are not always organized into
a clear progression or framework. That made Lower Ed feel at times
like a collection of high-quality but somewhat unrelated observations
about credentials, higher education, for-profit colleges, their student
populations, their business models, and their relationships with
non-profit schools.
Second, there are some related topics that McMillan Cottom touches on but
doesn't expand sufficiently for me to be certain I understood them. One
of the big ones is credentialism. This is apparently a hot topic in
sociology and is obviously important to this book, but it's referenced
somewhat glancingly and was not satisfyingly defined (at least for me).
There are a few similar places where I almost but didn't quite follow a
line of reasoning because the book structure didn't lay enough foundation.
Caveats aside, though, this was meaty, thought-provoking, and eye-opening,
and I'm very glad that I read it. This is a topic that I care more about
than most people, but if you have watched for-profit colleges with
distaste but without deep understanding, I highly recommend Lower
Ed.
Rating: 8 out of 10
Following up on the initial RcppSpdlog 0.0.1 release earlier this week, we are pumped to announce release 0.0.2. It contains upstream version 1.8.0 for spdlog which utilizes (among other things) a new feature in the embedded fmt library, namely completely automated formatting of high resolution time stamps which allows for gems like this (taken from this file in the package and edited down for brevity):
spdlog::stopwatch sw; // instantiate a stop watch// some other code sp->info("Elapsed time: ", sw);
What we see is all there is: One instantiates a stopwatch object, and simply references it. The rest, as they say, is magic. And we get tic / toc alike behaviour in modern C++ at essentially no cost us (as code authors). So nice. Output from the (included in the package) function exampleRsink() (again edited down just a little):
We see that the two simple logging instances come 10 and 18 microseconds into the call.
RcppSpdlog bundles spdlog, a wonderful header-only C++ logging library with all the bells and whistles you would want that was written by Gabi Melman, and also includes fmt by Victor Zverovic.
The NEWS entry for this release follows.
Changes in RcppSpdlog version 0.0.2 (2020-09-17)
Upgraded to upstream release 1.8.0
Switched Travis CI to using BSPM, also test on macOS
Added 'stopwatch' use to main R sink example
Courtesy of my CRANberries, there is a diffstat report relative to previous release. More detailed information is on the RcppSpdlog page.
The only sour grapes, again, are once more over the CRAN processing. And just how 0.0.1 was delayed for no good reason for three weeks, 0.0.2 was delayed by three days just because well that is how CRAN rules sometimes. I d be even more mad if I had an alternative but I don t. We remain grateful for all they do but they really could have let this one through even at one-day update delta. Ah well, now we re three days wiser and of course nothing changed in the package.
If you like this or other open-source work I do, you can now sponsor me at GitHub. For the first year, GitHub will match your contributions.