Showing posts with label software. Show all posts
Showing posts with label software. Show all posts

Thursday, February 15, 2024

Technology and dignitary harms

In contemporary ethics, paternalism is seen as really bad. On the other hand, in contemporary technology practice, paternalism is extremely widely practiced, especially in the name of security: all sorts of things are made very difficult to unlock, with the main official justification being that if if users unlock the things, they open themselves to malware. As someone who always wants to tweak technology to work better for him, I keep on running up against this: I spend a lot of time fighting against software that wants to protect me from my own stupidity. (The latest was Microsoft’s lockdown on direct access to HID data from mice and keyboards when I wanted to remap how my laptop’s touchpad works. Before this, because Chromecasts do not make root access available, to get my TV’s remote control fully working with my Chromecast, I had to make a hardware dongle sitting between the TV and the Chromecast, instead of simply reading the CEC system device on the Chromecast and injecting appropriate keystrokes.)

One might draw one of two conclusions:

  1. Paternalism is not bad.

  2. Contemporary technology practice is ethically really bad in respect of locking things down.

I think both conclusions would be exaggerated. I suspect the truth is that paternalism is not quite as difficult to justify as contemporary ethics makes it out, and that contemporary technology practice is not really bad, but just a little bad in the respect in question, even if that “a little bad” is very annoying to hacker types like me.

Here is another thought. While the official line on a lot of the locking down of hardware and software is that it is for the good of the user, in the name of security, it is likely that often another reason is that walled gardens are seen as profitable in a variety of ways. We think of a profit motive as crass. But at least it’s not paternalistic. Is crass better than paternalistic? On first, thought, surely not: paternalism seeks the good of the customer, while profit-seeking does not. On second thought, it shows more respect for the customer to have a wall around the garden in order to be able to charge admission rather than in order to control the details of the customer’s aesthetic experience for the customer’s own good (you will have a better experience if you start by these oak trees, so we put the gate there and erect a wall preventing you from starting anywhere else). One does have a right to seek reasonable compensation for one’s labor.

The considerations of the last paragraph suggest that the special harm of paternalistic behavior is a dignitary harm. There is no greater non-dignitary harm to me when I am prevented from rooting my device for paternalistic reasons than when I am prevented from doing so for profit reasons, but the dignitary harm is greater in the paternalistic case.

There is, however, an interesting species of dignitary harm that sometimes occurs in profit-motivated technological lockdowns. Some of these lockdowns are motivated by protecting content-creator profits from user piracy. This, too, is annoying. (For instance, when having trouble with one of our TV’s HDMI ports, I tried to solve the difficulty by using an EDID buffer device, but then I could no longer use our Blu-Ray player with that port because of digital-rights management issues.) And here there is a dignitary harm, too. For while paternalistic lockdowns are based on the presumption that lots of users are stupid, copyright lockdowns are based on the presumption that lots of users are immoral.

Objectively, it is worse to be treated as immoral than as stupid: the objective dignitary harm is greater. (But oddly I tend to find myself more annoyed when I am thought stupid than when I am thought immoral. I suppose that is a vice in me.) This suggests that in terms of difficulty of justification of technological lockdowns with respect to dignitary harms, the ordering of motives would be:

  1. Copyright-protection (hardest to justify, with biggest dignitary harm to the user).

  2. Paternalism (somewhat smaller dignitary harm to the user).

  3. Other profit motives (easiest to justify, with no dignitary harm to the user).

Saturday, July 10, 2021

Reading a Game Boy Tetris cartridge

I saw a small rectangular PCB on the sidewalk not far from my house. It looked interesting. I left it for a couple of days in case someone lost it and returned for it. A web search showed it was the PCB from a Game Boy cartridge. Eventually, I took the PCB home, and made it a challenge to extract the data from it with only the tools I had at home and without harming the PCB (so, no soldering).

This PCB was from a ROM-only cartridge, 32K in size (I was able to identify it from the part number and photos online as likely to be Tetris), so it should have been particularly easy to read. The protocol is described here.

While the Game Boy cartridges run at 5V, the only microcontroller I had available with enough GPIOs  and ready to use was an stm32f103c "black pill" which runs at 3.3V. Fortunately, it has a number of 5V-tolerant GPIOs, so there was some hope that I could run the cartridge at 5V and read it with the microcontroller.

The Game Boy I didn't have a cartridge connector, but fortunately the PCB had plated through-holes on all but two of the lines, and they fit my breadboard jumper wires very nicely. I used test clips for the remaining two lines (VCC and A0). After some detours due to connection mistakes and a possibly faulty breadboard or GPIO, I ended up with this simple setup (what a mess on the breadboard!).

1. Connect D0-D7 on the cartridge to 5V-tolerant inputs, connect A0-A14 on the cartridge to outputs, ground GND, A15 and RD (CS and RS were not connected to anything on the cartridge), and connect VCC to a power supply (it turned out that all my worries about 3.3V/5V were unnecessary: supplying 3.3V, 4.5V or 5V all worked equally well). 

2. Write a 15-bit address to A0-A14. Wait a microsecond (this could be shaved down, but why bother?). Read the byte from D0-D7. Increment address. Repeat. Check the header and ROM checksums when done. Arduino code is here.  (I just copied and pasted the output of that into a text file which I then processed with a simple Python script.)

It works! I now have a working Tetris in an emulator, dumped from a random PCB that had been lying on the sidewalk through torrential rains!

I've played many versions of Tetris. This one plays very nicely.

Some technical notes:

  • I got advice from someone to set pulldown on the D0-D7 lines. Turns out that makes no difference.
  • Cartridges that are more than 32K would need some bank switching code.

Friday, May 25, 2018

Vector display for Arduino-type boards

It's a nuisance to buy an LCD for each new Arduino project that requires a display, so I wrote an Android app that lets you use a tablet or phone as a display for an Arduino-type project. As a result, one can use a $2 board as a rudimentary oscilloscope with a phone or tablet providing the power, display and UI.



Instructions and links here.

Thursday, October 26, 2017

Certamen practice machine

This summer, the big kids and I built a practice machine for the Junior Classical League's Certamen competition, based on an Arduino (clone) Mega 2560. It's a "practice machine" as it's not officially approved for tournament use (and perhaps can't be without the clicker shape being changed). Cost is about $80 (including filament), as compared to $400+ for the official version.

Build instructions are here. Code is here.


Sunday, May 12, 2013

Blogger to LaTeX book converter

Someone I know wanted to print a book from a Blogger blog. We tried the software from one book printing site, but it kept crashing. After some searching, I found a perl script that converts to Adobe InDesign. But InDesign is expensive. So I modified the script to put out LaTeX.

Here is my script.

It's not doubt buggy, and you will probably need to make some manual adjustments to the output. Post comments here if it doesn't work for you.

This may also work for non-Blogger blogs that use Atom xml. Let me know if it does.

Here are some quick instructions.

Download an xml backup of your blog. Then edit config.cfg to point to that file and set conversion options. Edit header.tex to set title, author and similar information, as well as to customize formatting. Since much of the formatting is done via macros, you can customize a lot of it.

After ensuring you have all the needed perl packages--see here for perl and package information--run:

perl format_for_tex.pl

Then process output.tex (or whatever you specified as the output in config.cfg) with a modern LaTeX that fetches needed packages.

You can edit which posts and comments are included by editing output.tex. A post begins with

\begin{blogpost}{1}{other stuff}

The {1} means the post is included. To uninclude it, just change to {0}.

Similar things can be done with comments.

Wednesday, September 3, 2008

Artefacts

There are no artefacts, at least not in any metaphysically serious way. To see this, consider some puzzles that face those who believe in artefacts.

You come across a stump in the woods. You sit down. Has the stump become a seat? It seems so. Even though you haven't actually changed the stump, you have given it the function of a seat. An artefact does not, after all, need multiple pieces. I could manufacture wooden seats by taking logs and carving them into seats, or by spending a lot of time in the woods and finding pieces of wood that already have the right shape and bringing them back. Or perhaps it's not enough just to sit on a stump to have a seat.

But actually, if I manufacture seats, the stuff I make does not become a seat when someone sits on it—it is a seat when the manufacturing process is complete. Likewise, then, it seems that the stump has already become a seat when I intend to sit on it. Or if giving something the function of being sat on once is not enough to make it a seat, maybe it becomes a seat as soon as I intend to take it home and put it in my living room. But this is really spooky: by simply intending to treat a stump a certain way, I have made a new object—a seat—with new persistence conditions. Very strange, that.

You buy a chair. Dust settles on it. The dust is not part of the chair. But you then make a tag: "Dusty Chair II". You put the tag in front of the chair. Oh, I "forgot" to say—your home is an art gallery. When you put the tag in front of the chair, with the right intentions, you created a work of art, an artefact with certain complex persistence conditions. One of the persistence conditions is that while the dust is not a part of the chair, it is essentially a part of Dusty Chair II. So, simply by putting a tag in front of the chair, I have brought it about that a new artistic artefact comes to exist. The token tag is not, however, a part of the work of art. (The signs in a gallery are printed by the gallery, and need not travel with the works of art.) So I created a new entity, without in any way causally interacting with it—just by putting a tag in front of it. And of course the tag is unnecessary. If I just stand in front of the chair telling all the visitors to my home that this is Dusty Chair II, that's just as good.

The case of the stump-seat and Dusty Chair II violate the principle that one cannot bring about the existence of a new object without a relevant[note 1] causal interaction with the object. Artefacts are simply too easy to make.

The above arguments assumed that what defined the identities of artefacts were maker's intentions. The alternative is social practices. But it is no less weird to suppose that a bunch of people by getting together can create an object without relevantly causally interacting with it.

It is clear that the persistence conditions for artefacts are defined by the makers and/or users and/or the community. But let us say that a careful study of our language shows that half of the users of English understand "chair" as an essentially four-legged artefact, and the other half think of a "chair" as surviving the loss of one of its four legs. Does that mean that my dining room chairs are coincident objects, colocated chair(1)s and chair(2)s, where a chair(1) cannot survive loss of a leg and a chair(2) can? Or is the question whether I have chair(1)s or chair(2)s settled by figuring out what the majority of the folks in the chair factory thought (suppose my chairs were made in an English speaking country)? Or is it settled by what the bosses thought? Or by what I thought? But I have no opinion on the question. So is there no fact of the matter whether one of the things in my dining room would survive loss of a leg? These questions seem insuperable.

Now one way to get out of all of these puzzles is to be enough of a compositional universalist: any bunch of parts with coherent persistence conditions and interworld identity conditions defines an object.[note 2] Thus, when I come upon the stump, whatever my intentions towards the stump, there is an object there with the persistence conditions of a stump, and an object there with the persistence conditions of a seat. Perhaps, then, I do not bring about the existence of the latter object with my intention, but I simply bring it about that it is appropriate to call the object a "seat". Likewise, while artistic intention is needed to transform the dusty chair into Dusty Chair II, even if I didn't have this intention, there would be a nameless object there with the persistence conditions that Dusty Chair II has.

But the main reason to save the existence of artefacts is to save common sense. And this kind of universalism departs far from common sense. It posits that there is an object sitting in the same chair as me, with the same shape and physical properties as me, but with the counterfactual property that were I to yell "Abracadabra!", it would instantly (faster than light!) move to the Amazon rain forest, where it would be wholly composed of a poison-dart frog. To embrace this kind of compositional universalism to save artefacts seems too costly.

Of course, this denial of the existence of artefacts needs come along with some kind of a paraphrase story that allows ordinary sentences like "She sat on a chair" to be at least approximately true. Presumably, the story will involve particles or fields having chair-wise arrangements, and so on. Moreover, I think we are going to have give such a story even if we admit tables and chairs into our ontology—just not for tables and chairs.

For there are always going to be artefact-like cases where almost nobody—not even the compositional universalist—will want to posit an object. The person whose home is a museum can make a work of art "composed" of shadows, by simply placing a tag on a blank wall with an interesting shadow pattern. But shadows don't exist. Or one could have an earring that is made entirely of the concentration in some kind of a field (maybe a magnetic one—the earring then could be seen by aliens who have a magnetic sense). But while fields might exist, it seems unlikely that concentrations of them do. Just as one can use a nail, it seems one can use a hole (one can put something in it, or one can sell it to an art gallery), but holes don't seem to exist.

Authors write books, and programmers write software. And it seems that, more and more, the most valuable artefacts are of this sort, artefacts that are the subject matter of intellectual property law rather than of tangible property law. These books and pieces of software seem type-like, abstract, rather than object-like. It is the book-type that we care about the author's writing. But what is odd is that if we take these type-like creations seriously, we have to depart from the common-sensical idea that the author causes them to exist. For surely we don't cause type-like things, abstracta, to come into existence.

But suppose we insist that the book the author writes is the manuscript. Where is this manuscript, these days? On a CD sent to the publisher, let us say. The CD is not the manuscript, though. There might be several manuscripts on a CD. The manuscript, it then seems, is made of colored pieces of dye on the CD (assuming a consumer CD-R). Maybe that can be counted an object. But suppose that instead of using a CD, we use some medium where all the data is encoded as the state of some field. Unless we reify states of fields, the data won't be an entity. Or, more simply, let suppose that I put several manuscripts on a CD, and then archive, compress and encrypt them in such a way that it is impossible to single out the bits of one manuscript from the bits of another, but it is possible to decrypt and decompress the archive, and extract the manuscripts. (For instance, the compression may ensure that words and phrases that appear in multiple manuscripts get listed only once in full. The encryption might end up shuffling the bits of all the manuscripts together before applying the encryption function.) Then perhaps there is no plausible way to identify the manuscript with a bunch of colored patches on the CD, but the manuscript is still "there", on the CD.

In other words, unless we are going to have a really bloated ontology, we are anyway going to end up with artefacts that we don't admit in our ontology, artefacts such that we will need some kind of a paraphrase for sentences that treat them as if they were substances. So the kind of story the person who denies the existence of artefacts will need to give about tables and chairs is one that needs to be given anyway about shadows, holes, books and manuscripts. The cost of the story is, therefore, low.