Category Archives: Uncategorized

Printing, a status report

The process of moving countries appears to involve a lot of paper. The intended workflow is that you download a file, you print it out, you scribble on it, you scan it back in. It’s a bit ridiculous.

The main obstacle to this is that I didn’t have a printer, or a scanner. I’ve resisted having one for a long time: I just don’t need to print much, and printers have a tendency to break if you don’t use them for extended periods of time. Also, printing under Linux has a tendency to be… variable.

But this seemed to have become a necessity, and I figured worst case scenario I can just buy the printer then gift or sell it on after I’m done with it. If I can’t get it working on Linux I do have a Windows machine (it’s intended purely for games).

So, I gave in and bought one, the Epson XP-312.

The verdict? Actually surprisingly good. Admittedly given how bad I was expecting it to be, not being eaten by sharks is a surprisingly good outcome.

Getting the printer on the WiFi was a complete pain. On setting up it basically says “Here are 5 SSIDS. Want one of them?” (These were not the 5 strongest. It was sitting literally right next to my router when I did this). If those are not the ones you want, you have to manually enter the entire SSID one character at a time selecting the character by pressing up and down on the controls. It took a while. Once I’d done that though it did manage to connect just fine.

I solved the problem of printers not working well with Linux by just not using either of my laptops and doing virtually everything via my phone.

The printer supports Google cloud printing natively, which works rather nicely. There was some WTF about the complete lack of integration between drive/docs and cloud print on the web (it works fine on android), but it wasn’t too much of an issue.

Scanning was a little more challenging. There’s Google cloud printing but they don’t support the dual operation of scanning. So it was either figure out how to get my scanner working under Linux (nooooo. Also this would have required me to use the shit kind of USB cable that no one ever wants and only printers think is a good idea which naturally I don’t have and they don’t include) or installing the software they provide under windows (noooooo).

But then I spotted the existence of Epson’s cloud services which claim to support scanning. On “select printers”. Apparently mine is not one of the select printers, but I only found this out after installing the cloud services. Well… I guess now I have two ways to print from the internet? Yay?

So, that plan failed, I noticed that there’s an android app for Epson printers. Called “iPrint”. Amusing misbranding but whatever.

And… you know, it works pretty well. Using my phone I can activate the scanner, get the scanned file on my phone and upload that to Google drive. The UI is like something out of the 90s, but it works remarkably well despite that. It isn’t using the cloud services either – it just detects it on the local network and connects to the printer directly.

So… printers are still a bit clumsy, but it seems to be possible to bypass CUPS these days, at least for this particular model. All told it could have been a lot worse.

This entry was posted in Uncategorized on by .

I think I might have a book problem

I was talking to my colleague Daoud about the books I’m reading in my current attempts to understand statistics in a more coherent fashion (my  problem isn’t that I don’t understand a reasonable amount of statistics, it’s that I don’t have an overall framework in which I understand statistics, so my knowledge is very patchy) and happened to look up at my bookshelves.

Where I spotted an entire book on statistical inference that I have literally no recollection of buying.

It looks pretty good, too. I haven’t actually read much of it just now (I probably have in the past), but it seems decent based on a skim through.

But it drove home a thing I’m realising recently: how little of the knowledge that is contained on my bookshelves I actually know.

Looking around the shelves there are a lot of books there I haven’t really read. They fall into a bunch of categories:

For some of them, this is legit – there are a lot which I’ve partially read before abandoning that path of my life (I have a lot of books on functional analysis, set theory, etc which I’m still interested in in the abstract and can’t bring myself to get rid of but honestly I will never study again).

Some of them I’ve picked up, read as much of them as I could and “Oh god this is too hard I need something simpler” and either bought a simpler book to supplement them or abandoned the subject.

Some of them are that simpler book, and I’ve instead ended up acquiring the information a different way and they are now too basic for me.

Some of them I’ve bought only to discover that they’re terrible and not really worth reading.

Some of them are reference books where the concept of having “read” them doesn’t really apply.

A lot of them though? I think what has happened is a chain of thought that goes “I wish to learn about X” *buys book about X* “Yay. I have learned about X” (In one case this is literally true. I have an unread book about Xlib up there. Fortunately I also no longer care to learn about Xlib).

There’s an idea that’s common in some fitness communities: You shouldn’t pre-announce your fitness goals, because it gives you much the same psychological rewards as actually achieving those goals, and thus makes you less likely to put in the effort to really achieve them. I don’t know if this is true – I don’t really know enough about the psychology of reward mechanisms to say (Ooh. I should buy a book on that. Wait. No. Bad David) – but it has plausibility, and I think something like that might be happening here: Surrounding myself with books about a subject in some way satisfies my desire to learn about that subject even though no learning actually takes place.

A little of this is probably healthy and normal. But there’s a lot of this going on with my shelves. I suspect that there’s a year of reading (spare time reading rather than solid) even if I only count the books that I actually care about still learning.

So I’m going to do two things to try and change this.

OK, three things, because I’m aware that I’m pre-announcing my goals right after I said that pre-announcing your goals is a great way to not achieve them. But the third thing is “achieve my goals despite having pre-announced them through a careful application of regularly reminding myself I haven’t achieved this goal”.

The first thing: Always have a physical non-fiction book on me when leaving the house. I can’t guarantee that this will cause me to read it, but I can guarantee that time when I don’t have a book with me are times that I’m not going to be reading a book.

The second thing: I was saying the other day that I didn’t really have any mid-range goals suitable for using beeminder. All the habits I’m trying to form seem to be either not worth the additional monetary stress or ones I’m already able to achieve on my own. Well, now I’m wrong, so I no longer have the excuse to not try it, so I’m trying it. I’ve committed to reading a non-fiction book every four weeks (I’ve counted my recent read of Mathematical methods in the theory of queuing to get me started). A book every four weeks should be easy. I normally read 3-4 books per week. Granted those are fiction, where my reading rate is absurd compared to my reading rate for non-fiction, but even so. If anything I’m hoping that it will be a pessimistically low rate and I’ll be able to raise it later,

Both of these will bias me towards shorter books (the former because longer books are heavy. The latter because I can’t necessarily finish a longer book in a month). If this proves to be a problem I’ll redefine my beeminder goal in terms of a “typical” book size and count book carrying as an exercise goal. Really though, I don’t have a problem with being biased towards shorter books for now: I like short books, and I have plenty of interesting ones to keep me going for now.

I’ve no idea if these will be sufficient to sort out this problem, but hopefully they’ll be a good start.

This entry was posted in Uncategorized on by .

Sketch design for a sort of housing co-operative

Prior warning: This is just a thing that I was thinking about this morning. I’ve very little knowledge of the prior art around housing cooperatives, and gather broadly similar things to the specific details I’m sketching out exist, but I’ve not done the research. It’s entirely possible that the way I’ve structured this is a terrible idea for entirely obvious reasons that I’ve simply missed.

Anyway, I was thinking this morning about the fact that in many cities, including London, Mortgage payments are often cheaper than the equivalent rent. Part of this is because in many ways you’re getting more for your rent than just the home (a certain guarantee of your landlord being responsible for repairs, although some landlords are pretty terrible at it, and a much greater flexibility), and part of this is just the usual takes money to make money thing where the cost of getting the mortgage in the first place is the barrier to entry that prevents most people from benefiting from this.

I was thinking about how to design a system where you could enable people to enter into a form of home ownership without that overhead of the deposit, and was thinking about housing co-operatives, and I hit on a design for an interesting financial arrangement.

Essentially the basic premise is this: An organisation which acts as the landlord and does maintenance, charges rent, etc. as normal. However, the organisation is entirely owned by its renters. All rent you pay also buys you shares in the organisation, at a share price calculated at the beginning of each month as the average of all rents on properties held by the organisation (essentially you’re giving each renter one share per month, reweighted so that people who pay more get more shares) (note: This requires shares to be infinitely divisible. It might make more sense to instead e.g. multiply this by 1000, round down, and carry over any unallocated shares into the next month in a take a penny/leave a penny style scheme).

These shares have the normal set of purposes: They give you voting rights (possibly according to a quadratic voting scheme?), and they give you dividends. The organisation reserves a certain amount of its profits to be ploughed back into assets, allowing adding more properties to its holdings, but the rest is paid out to its shareholders on a monthly basis.

This is definitely not the same as owning property, but it has similar benefits – in particular, what you are overpaying relative to the cost of the property will mostly come back to you as dividends over the long-term (this isn’t true initially – it starts out as essentially no different from normal renting but, over time, you end up with your rent effectively going to zero and eventually negative). 

One caveat: In order to prevent this from essentially turning into an investment vehicle, there are a few rules about the ownership of shares.

  1. All shares must be held by individuals, not corporations, trusts, etc.
  2. Shares held by someone who has never rented a home from the organisation are deemed inactive. They don’t go away, but they do not receive dividends or voting rights.
  3. Shares held by someone who has not rented in the last year similarly become inactive.
  4. Individuals who have not been resident in their rented home for more than half of the last 6 months temporarily lose their voting rights (those voting rights are restored once this condition is met again).
  5. Shares are fully transferable (I expect a common pattern will be for people to sell their shares when they wish to move into accommodation not owned by the organisation). All of the above time constraints however are attached to the individual, not the shares, so the counters restart from scratch.

I haven’t thought about this in depth, but I suspect that this would be a very useful sort of organisation to have exist. Of course, it requires a certain amount of seed money, and a lot of motivation, to get started, so it will probably never happen.

This entry was posted in Uncategorized on by .

Etiquette for the devil’s advocates

Devil’s advocacy is when you take a position you do not believe in order to have a debate over it to explore the idea. It’s a really useful tool for exploring ideas that you want to think through.

Unfortunately, it has quite a bad reputation, especially amongst feminist circles (who are particularly used to having it used badly against them). Given the way it’s misused, it’s an entirely deserved reputation.

Fundamentally I think there are two major types of misuse that lead to this: The first is that many people who say they are playing devil’s advocate are not, in fact, playing devil’s advocate: They are using the claim that they are playing devil’s advocate in order to avoid being held accountable for their beliefs. Secondly, people fail to realise that often even if they do legitimately want to play devil’s advocate, it is not always going to be welcome.

I think this is a shame given that when it’s used properly it’s an extremely useful technique, so I’d like to propose the following as the basic etiquette required for playing devil’s advocate usefully and politely. It’s mostly “use words honestly” and “behave with common courtesy”, but given the existing usage patterns it seems to be helpful to spell out specific applications

  1. Be honest about your devil’s advocacy. Do not use it as a cover for just arguing for beliefs you actually hold but don’t want to be held accountable for. You are only entitled to play devil’s advocate for a position if you do not hold that position.
  2. Never play devil’s advocate without explicit up front consent from the person you are discussing things with. Something along the lines of “I would like to explore this issue. Do you mind if I play devil’s advocate for a bit?”. Be prepared for the answer “Yes I do”, and if you get it don’t argue. Also remember that, as always, consent can be revoked as well as granted – if someone asks you to stop after previously having agreed then stop.
  3. Don’t even try to play devil’s advocate in emotionally charged situations – e.g. when your position is going to be “I know you’re upset, but have you considered things from your attacker’s perspective?” this is never going to go well and you shouldn’t even try.

If you follow these rules, you’re both dramatically less likely to upset people and more likely to have productive conversations. This seems like a good thing, so I’d encourage you to do so unless you like having useless conversations where you upset people.

PS. Anyone who response to this post with hilarious comments which declare they’re “just playing devil’s advocate” will be responded to solely through the medium of “Your argument is invalid” gifs.

This entry was posted in Uncategorized on by .

New testmachine release

As you might have noticed, testmachine development stalled for a bit there. It wasn’t through a lack of interest – it’s been a mix of illness, busyness and being stuck on a thorny problem.

The thorny problem in question being subprocesses. It’s really important to me to be able to run testmachine programs in a subprocess, because my major use case for it right now is testing intmap, which is full of internal C assertions. One of the major benefits of generating tests with testmachine is that it can find ways to trigger those assertions (fuzzers love assertions), but if the process crashes before they can usefully reduce the test case the results are… unhelpful.

The reason this has been a hard problem is that testmachine is quite stateful, and synchronizing that state across the process boundary is quite painful. I knew how to do it, but it was going to be a lot of work and felt very inelegant.

Fortunately, on Wednesday, I realised I didn’t have to!

Despite the relatively constrained main interface to it, the internals for testmachine are pretty general – there’s a context object which gets passed around and maintains a bunch of state (a number of stacks of variables, and a random number generator), and languages and operations are essentially free to manipulate that state arbitrarily.

Well, I’ve added two constraints to that which have made life vastly easier:

  1. A language may only depend on the heights of each stack, not the values in them
  2. An operation must be able to predict its stack effect without knowing what the values on the stack are (by providing a simulate method)

Given these two constraints the result is that we can simulate the execution of a program in a safe way without invoking any of the dangerous functions – we can run a version of it that calls simulate instead of execute, accurately maps the variable reads and assignments of the program, and provides us with a nice pretty output without having to worry about our program randomly crashing in the midst of its compilation process. We can then run the version that actually executes the code in a subprocess and safely let it crash.

I would expect the new feature to be a little ropey right now. I’m aware of at least one problem with it that I’ve yet to fully resolve (It makes assumptions about how you use the randomness that hold if you use the main interface but are not guaranteed by the internals). But it passes testing, is off by default and is a pretty useful feature, so I’m pushing it out now. Let me know if you have any problems.

This entry was posted in Uncategorized on by .