Dead phone

Jun. 10th, 2017 06:22 pm
jack: (Default)
Sigh, my phone seems to have worn out. I thought this one had been treated fairly well, with a case, and not suffering any disastrous drops. But now when I turn it on, it reboots again either immediately before finishing the boot sequence or as soon as I open an app.

I tried removing the case and waggling the buttons, and doing a factory reset and that didn't make a difference. Is there anything else I should try?

Assuming I need a replacement, what should I get? Probably a recent android phone. I used to always get nexus but pixel seem to have got expensive.
jack: (Default)
Poly speed dating again tomorrow! In 3s. I managed to escape doing the programming for the matching algorithm this time :)

What should I tell people about why they should like me?
jack: (Default)
Have I talked about this recently?

It feels like there's two sorts of advice. Or maybe a spectrum of advice with an axis which I have particularly noticed.

Some advice is implicitly obvious once it's pointed out. If you say "turn capslock off" when someone can't see why their password doesn't work, it's hard to reject if you know what capslock does at all. Sometimes it's obvious once you try it, like "try pressing capslock" when you don't know what it capslock does.

Other advice is implicitly "you won't be able to tell whether it's working or not, just trust me and keep doing it". Anything fairly long term, any "do this every day and you'll be more organised/fitter/healthier/have less chance of X".

And some advice is somewhere between.

I realised aphorisms are generally the _first_ sort of advice. Sometimes "the early bird catches the worm". Sometimes "measure twice, cut once". But when you *think* "are there obvious risks to delaying? are there obvious risks to moving too quickly?" it often obvious which is more risky, and you know to avoid that. (And in a minority of cases it's not clear and its more of a judgement call.)

But I think those aphorisms are still useful, not because they're ALWAYS true, but because they're a useful reminder to consider them when you might otherwise have forgotten to.

But I think we usually need to treat advice like this. Like, it should usually be obvious WHY it's better. Otherwise, it might be worth bearing in mind as something that *might* be useful, but not be treated as absolute.

There are times when it's useful to adopt something without understanding. If you can't see any clear pros and cons, doing it the way a more experienced person does is OFTEN good, because they probably wouldn't do that if there were obvious problems, and there may be non-obvious benefits which they can't immediately explain.

But I think, when someone gives advice, it's worth considering, "does this make sense to me"? And if not, "is it likely to be safer than what I was doing anyway".
jack: (Default)
Last minute suggestions for things to see in Amsterdam?

Tyre width

Jan. 20th, 2016 12:03 am
jack: (bike)
The tyres on my bike seem to be 35c and 38c width, if I read them right. Would a thinner tyre be better for cycling round Cambridge? I mostly go short distances 1 mile to 4 mile, but it would be nice if there wasn't unnecessary effort, and nice if it was possible to cycle to Shelford occasionally, which right now is possible but a bit too much of a trek to ever want to do it. Or should I be looking at a better bike instead?
jack: (Default)
Tumblr says that any part of my life spent not watching Supernatural is wasted. And I have to admit, it sounds like my sort of show. But I'm not sure I want to watch eleven seasons of anything. Is there a sensible subset which is worth watching by itself?

Flood maps

Apr. 14th, 2014 11:18 am
jack: (Default)
I'm looking at flood maps as linked on the previous post. But it looks like NONE of the fen ditton housing estates are in any of the areas marked as risk, at worst some of the houses added on to fen ditton proper.

When people warned about the recent flooding, did they mean places like Ditton Fields and Fison Road at all? Or did they just mean places like Green End, Fen Ditton?

I feel stupid for not having checked at the time. But I'm confused. Green End end of fen ditton is right by the river. OBVIOUSLY it floods. When people warned about flooding I assumed they were talking about the bulge and the other side of the main road, because that's where you could get bitten if you didn't realise you were at danger. But now I ask if that was completely wrong. Is there any way of finding out where actually flooded in the recent floods?
jack: (Default)
There's a stuffed toy hanging from a telephone wire across Chesterton High Street. Is it worth seeing if BT care? I asked the council and they say it's not their problem and to phone BT, but if it doesn't harm the wire I don't see why BT would care.
jack: (Default)
I didn't want to think about it before, but following Liv's excellent example last year, I want to join a gym in Cambridge. I know a couple of you have, where did you join? Are you happy with it?

I also want to get Liv some home weights for xmas. Cardio exercise is probably more important, but that probably wants more variety, but if she continues to go to the gym, she can do some weights on other days, and do more cardio when she's in the gym. Does that make sense?

And does anyone have any experience or suggestions for what to buy?
jack: (Default)
When someone says "easy to use", a high proportion of the time they're talking about a different use cases to the one you're thinking of. It's an easy mistake to make, as often one's usage pattern is representative, but also, often it isn't. And if it isn't, it's easy to forget that someone else might be talking about how easy it is to do something else -- either something so basic you'd forgotten it was necessary, or something so complicated you simply never needed to use it.

Classic example: 3.5 ed DnD Forums. Essentially every conversation on the forum[1] went something like this:

Beginner: Which class is [most powerful/easiest to play effectively/most fun]?
Expert: Oh, that's easy. Everyone knows the best class is [wizard/cleric/non-core prestige class X]
Other beginner: What? I tried that and [I was eviscerated by a Kobold in the first encounter because I started the game with -57 hit points[1]]. What are you smoking?
Expert: NEWB!
Beginner: DICK!

Etc, etc.

The same applies to unspoken differences in GMing style, which can make social skills overwhelmingly broken, or near-useless; or make time to prepare spells before combat into an assumed right, or a rare luxury; or make finding a highly enchanted weapon suited to your skills a certainty, or an unheard of stroke of luck.

But the same applies to all sorts of other things. I recently saw a thread asking "is [version control A] [more powerful/easier to use] than [version control B]" and it turns out that whether or not it's clear what the answer is, it depends whether you mean "for going from 'never used it' to 'first check in'" or "for editing the history in creative ways", and it's easy to dismiss the other person as wrong, when "not relevant to me and so I assumed that wasn't relevant to anyone" would have been more accurate.

[1] Mild exaggeration
jack: (Default)
Q. People used to think the moon was knocked out of hole in the earth, leaving behind the Pacific Ocean. At any rate, it would just fit. If you put it down there really, really gently, would we be ok living on an earth with a moon balanced on it?

A. No. The surface of the crust is nowhere near enough to support a protrusion on the surface a large fraction of the size of the planet. It would settle. Having a density similar to that of magma, it would not plunge straight to the centre of the earth, possibly ejecting large fractions of the earth into an escape velocity in a gigantic "splash", but would certainly become immersed, engendering a massive rise in magma levels.

You probably know the massive destruction a large Tsunami can wreak on coastal (and not so coastal) cities, forests, stuff, etc. A largest tsunami is less than a mile high, and might kill hundreds of thousands of people and scour hundreds of square miles of land.

Now imagine a a tidal wave several thousand miles high which is made of hot lava. This is not a human survival positive indicated event. I'm not sure even the cockroaches are going to like this one. I mean, I'm sure some of the bacteria may survive, but I don't know if they'll survive on Earth, or only by having previously escaped the Earth and drifting in interstellar space, hoping to waft into another hospitable planet. There are some bacteria that might survive being frozen to near absolute zero[1], but not, I think, vaporisation.[2]

Ah, you say, but what about humans, or bacteria, buried safely at the bottom of a disused mine-shaft, under a mountain? Well, there are two problems with this: (1) a few isolated bacteria and no other biota in existence may, upon resumption of a decent environment, be able to recolonise from scratch. Humans, not so much. (2) the in-a-mineshaft plan depends heavily on the mineshaft being buried safely just below the surface of the earth's crust, and as I think I indicated previously, I strongly suspect the entirety of the earth's crust to be the front-line casualty in a moon-magma-plop scenario.

As a comparison (in the tradition of the awesome demonstration in The Core), consider an orange filled with boiling-hot jello[3]. Put some ants on the surface. Now smash the orange with a hammer (to simulate the splash) and whack all the bits of peel a few more times (to simulate the effect of very high G on human anatomy). Then scoop it all back together again, mixing the bits of peel with the surface of boiling jello. Examine the ants. Did any survive?

Of course, this is unfair. Suppose the moon is immersed carefully in the magma. This would merely cause the earth's surface to expand a bit, leading to massive tectonic upheaval, but life perched carefully in the middle of relatively stable continental plates may be ok. Or suppose it's levitated carefully to just touch the bottom of the ocean but not fall any further. Assuming the moon is stable under its own gravity to hold together enough that no bits fall off in the Earth's gravity (which would result in a mess similar to scenario #1) This will merely cause a lot of nearby water and possibly mountains to fall sideways off the earth and onto the moon, causing more traditional world-wise Tsunamis that may be made of water rather than lava. In both cases, primitive biota and mammals cosying in mine shafts may be ok.

[1] And viruses, but bacteria need water and some useful chemicals to come back to life. Viruses need bacteria.

[2] I use the term "Tidal wave" despite the "tidal" being considered a misnomer. Despite the name, these waves are typically not being caused by the moon, which causes many pedants to prefer the more euphonious "Tsunami". However, as I have been at quite unnecessary pains to explain, the wave I'm discussing here IS caused by the moon. So I'm going to say the not-quite-correct "Tidal wave" in the hopes that bad pedants will be annoyed and good pedants will think it's funny.

[3] I have no justification for choosing the American proprietary term "Jello" rather than the British generic term "Jelly", but did so PURELY to annoy pedants. However, it occurred to me because it (1) sounds funnier and (2) suggests clearly that I'm referring to desert jelly, rather than royal jelly, petroleum jelly, gelignite, American-made jam, or any other anatomic, biological, lubricating or industrial substance which wobbles or has a similar technical name and picked up the descriptor "Jelly" somewhere along the line.
jack: (Default)
Tip: Don't name the last episode of your TV show after any common DVD menu navigation features :)
jack: (Default)
1. Make an 'A' with 2000 unicode combining underlines
2. Paste into Microsoft Word
3. Restart Microsoft Word without document autorecovery

So, my other question is, if I have a programming language which specifies programs of the form "One single capital latin 'A', followed by some number N of unicode combining underlines" and processes them according to "Interpret N as a binary expression, and reinterpret it as an encoding of a perl/brainfuck program, then run it", does this mean that for the purposes of code golf writing-a-program-in-the-minimum-number-of-characters, every program will count as having only one character?

You could have a somewhat more efficient encoding by using different characters to encode more information.

I agree the idea of comparing fewest-number-of-character programs between languages is not a priori meaningful, but I think it often produces interesting results. (And the observation that there's always some imaginary language where the program you want is one or zero characters is correct, and good to make once, but does NOT invalidate the idea that it's interesting to compare different langugaes.)

This has the advantage that although the language is degenerate/isoteric, it will be the same language admitting different programs, just one-character programs, rather than only meaningful for one particular code gold challenge.

I highly advise not trying to write A-Underline code by hand, though :)

The only language I can imagine better at code gold would be the hypothetical JFGI language, which would accept programs of zero length and compile them to a program which accepts input on stdin, googles for it, and returns whatever follows on the top hit web page. That won't always work (it won't work on programs which aren't supposed to have an input), but it will work sometimes, and without all the tedious steps of _writing_ a program.
jack: (Default)
OK, this is going to be massively oversimplified and riddled with inaccuracies, and the networking gurus on my friendslist are probably more prominent than the Jewish ones, so expect a number of corrections in the comments, but for the benefit of Liv and anyone else interested, a very brief overview.

An ethernet packet

- Has a header containing destination address, source address, type, data and a couple of other things
- The type is a number specifying what protocol is in the data. This is typically an IP ("Internet protocol") packet.
- The addresses are addresses of the physical network cards of the computers
- Which will (always?) be MAC addresses, ie. a six-byte number which every network card manufactured has a unique one.
- It is normally written in hexadecimal with semicolons, like 00:0E:78:5D:10:04
- It doesn't matter how they're assigned, except that each manufacturer has a different set of them to assign (sequentially or randomly) to network cards they manufacture
- These do not need to be unique across the whole world, they only need to be unique within one physical LAN or wireless network. But because you don't know which computers will be plugged together, they're ALL made unique
- If a computer has an ethernet cable and a wireless card, they will have different MAC (?)
- This is transmitted by the computer by physically changing the electric voltage on the wire, or by physically transmitting a short radio burst
- That means that the computers have to take turns transmitting and so on -- how to do that is what ethernet specifies
- This will be received by all computers on the wire or within range of the wireless, but ignored unless it has the appropriate destination address (and possibly appropriate content -- a computer not listening for IP traffic will just ignore any)
- There are special MAC addresses which mean "to everyone" which everyone receives (probably FF:FF:FF:FF:FF:FF but I can't remember). This is not used for normal TCP/IP traffic, but for some special network uses.

An IP packet

- Directly after the ethernet packet headers typically come IP packet headers
- Again, this is a source address, a destination address, and something indicating the content
- But this is coincidence, they're all different to the ethernet fields I discussed above
- The IP addresses are four bytes, typically written with dots like:
- Originally the idea was that each individual network would communicate by ethernet, and you'd connect them together by having some computers which were on two neighbouring networks
- And every computer would have an IP address assigned by some independent body somewhere (originally Job Postel, later ICANN)
- And computers would maintain routing tables, saying that "messages for THESE IP addresses should be passed to THOSE networks, and so on"
- Which is what IP does (routes packets between networks to a specific IP address, but does NOT, for instance, combine packets into a longer message or have an acknowledgement that they got there)
- Most IP addresses (in theory) could be anywhere on the internet, but some are reserved for small networks to use themselves, so many different small networks might use 192.169.anything.anything for the computers on it, so long as they don't accidentally send messages for those IP address out onto the internet. There are also some special IP addresses not assigned to any computer but that mean "this computer" or "all computers on this network"
- Nowadays it's much more common for a home network to connect to the internet via a router, and the router (may) have a real internet IP address (though not normally the same one every day) which it uses to talk to the internet, but another, eg. which it uses on the local network, and whenever it sends packets between the networks it switches the addresses around so they go out, and come back to the router, and then it switches them over to go to the local IP address.
- On a small internal network IP addresses are either assigned manually (by just picking 192.168.anything and making sure they're different) or by DHCP (which is much the same, except whenever a computer turns on, it asks the router for a new IP address that's no-one's using,and the router keeps a list and hands out the next free one)


- The contents of an IP packet are typically a TCP packet
- IP does the "get this packet to the right computer" but TCP does "send a reply to make sure it gets there, number all the packets I send so the other end can check they all arrive in the right order, and stitch together lots of small packets into one big message, number them so I can (eg) stream music and download a webpage at the same time, and the right messages go to the right program etc"
- There are some other protocols which are similar to TCP and use IP, but are different, eg. UDP which does a similar thing but WITHOUT all the checking.

HTTP, FTP, etc, etc

- OK so, TCP sends a potentially long message. What is a message? Many, many different protocols use TCP/IP, typically used by different applications on the same computer
- For HTTP it might be something like "Hey computer? Do you have a file called index.html? Please send me a file called index.html!" and a webserver running on that computer would send an HTTP reply saying "404. That means I don't have it." or "200. That means, that file follows. OK, here goes. [lots of html/txt/jpg/etc]"
jack: (Default)
Most of us have "doh" moments, when something we normally do fine -- locking the door, reading an important letter without putting it down and losing it -- we completely fail to do. What I think is that once something like that is a habit, it will go fine -- unless it's interrupted, which is when mistakes happen. If someone speaks to you just as you're shutting the door, you then go into "I must remember to lock the door" mode. And most of us are much less reliable at "I must remember to do X" than in following an ingrained habit. (Some people are very good at remembering to do one-off tasks without making notes, but probably exhibit the same flaws elsewhere.)

My advice is, form the habit that when interrupted, you commit or roll-back the current task. So, if someone speaks to you when you're shutting the door -- open the door ajar again, and you will probably automatically shut and lock it. Or say "hold on a sec" and lock the door then. Don't wait paused in the middle of the door-locking activity, because you're much more likely to get distracted.

The thing is, locking the door goes fine 364 times out of 365. Which is very good, but to never, ever, get it wrong, you need it to be right every time in 20,000 I think competent, organised people are not those who never experience those little lapses (although that helps), because that only reduces the frequency, but those who ensure that when they do experience them, they recover well, either because (A) they have this habit or (B) they have another back-up, like leaving a key with a neighbour.
jack: (Default)
If you want to make someone sound pretentious go ahead and have them use lots of excessively long and obscure words. But if you want someone to sound intelligent or knowledgeable, then only use longer and more obscure words if they convey a greater or more concise meaning.

Sure, if the reader is less intelligent or knowledgeable, they won't be able to tell the difference between long words used to look clever and ones used to convey information. This confusion supports politics, con artists, and parts of soft science all over the world. But if you're trying to make someone seem smart to smart people, their words need to be concise, or clear, or technically detailed[1]. Fortunately, you have the advantage of time, you can probably prepare in five minutes something that would be terribly clever if your character talks like that all the time :)

[1] In fact, many people, notably me and many of my friends, are quite smart AND quite pretentious, and strive to be precise, both from clarity, and also because they think it's funny. It's quite likely they'll go together, but I still maintain there's a difference, especially if the character was previously dumb but tenacious and then is hit by an intelligence-ray for a short humorous interlude :)
jack: (Default)

If you're very drunk, don't go swimming. And if you do anyway, don't jump straight into an unknown sea. And if you do anyway, make sure there haven't been a recent spate of shark attacks. And if you do anyway, at least look to make sure the shark isn't RIGHT THERE. But if you do anyway, make damn damn sure you brain it right between the eyes.
jack: (Default)
"RSVP" traditionally means exactly what it says: please respond. Whether or not you're able to come. Traditionally, not doing so is rude (assuming the invitation came from someone who had a genuine reason to invite you).

Now, a much better heuristic is: on invitations to big social events like weddings, "RSVP" retains the traditional usage. On casual social engagements, "RSVP" typically means "let me know if you're going to come" and non-response is treated like a "no". Although often positive responses are helpful even if not necessary, and often there is some flexibility to turn up at the last minute.

Unfortunately, this means that you can't really say it at all without a little bit of ambiguity. Normally the heuristic works fine, but it may be slightly better to specify what you actually mean, eg. "let me know if X, letting me know if Y would be helpful but not necessary" or "please let me know by DATE if you want to come or not, or what it depends on if still unsure". Or even to give people a little helping hand by asking them if they're probably coming, which many people can answer immediately, and is often sufficient for small social occasions, rather than if they're definitely coming, which puts many people into "let me check my diary for three months" mode.
jack: (Default)
If you're going to criticise someone for something, the first rule of irony says you will probably accidentally commit the same offence during your criticism. This is pretty unavoidable, but at least try to cover the basics, and let fate work for it's revenge. For instance: spell "gauche" correctly :)

(I assume I have done the same here.)
jack: (Default)
Don't make a theme park with robots who pretend to be cowboys. Or dinosaurs. Sure, it seems like an awesome idea. A really awesome idea. But it never ended well. Ever[1]. Just don't try.

[1] Counterexamples welcome.