Thursday, 12 April 2018

I Have A Cold...

... but not one that involves runny noses. I can get up and go to work, but by the time I get home, I'm just waiting for sunset so I can go to bed. Plus it's messing up my tummy so if I do too much diary I get reflux. Also I over-did my hamstrings and had that lower back stiffness which turns me into an old man who can't get up once he's sat down. I went to my sports masseuse for that today. I just want to sleep. Or rather, not to be terribly active.

Pathetic excuses, but what can I tell you?

Thursday, 5 April 2018

March 2018 Review

God that was a long month. On the first Thursday I must have absorbed something alcoholic around lunchtime, because I went slightly wobbly for twenty-four hours. I didn’t do anything stupid and even made it to the gym, but accidental alcohol makes me feel shaken. At the end of the month I took the four days before Easter off, and naturally, the weather was cold, wet and not worth getting out of bed for. Equally naturally, I slept badly and kept waking up early. That may have had something to do with the clocks going forward and me only finding out when I looked at my watch on leaving the house Sunday morning - Wait 06:25? What? My phone said it was 06:25 an hour ago, oh, that must have happened.

I continued the Food Experiment. One week I tried salads and other potato-based lunches from Masters on Throgmorton Street: result were satiety, no sharp appetite in the evening, and an extra pound of weight that fell off by Saturday morning because I work from home then. The next week I tried bagels from Bagel Mania on London Wall: results, less dozy in the afternoon, no extra weight, but a tendency to light-headedness by the end of the afternoon. I lost three kilos but no more. This will continue for a while.

I re-gained some of my Python chops, using PyCharm, writing a file-copying utility with a simple UI. Hence the post about the rotten documentation of os.walk(). Python is a nice language to use, but I sometimes wonder if some of the people who write documentation and help posts actually follow their own advice. I may write a post on how to write instructions as well. It’s nowhere near as easy as you think.

I read Ben Yandell’s Honors Class, a series of biographies of the mathematicians who solved Hilbert’s Problems; Bede’s Ecclesiastical History of the British Isles, which got me interested in Anglo-Saxon England, about which I now have a book to read; Nicolas Naseem Taleb’s Skin In The Game, which makes a lot of good points and is prime NNT; and started on Per Olov Enquist’s The Wandering Pine.

I succumbed to Calibre. For those who don’t know, as I didn’t, this is to e-books what the iTunes is to music. It’s a terrific program and I had my small e-book collection consolidated, organised and with updated metadata after a couple of hours. I will probably write a post about using it in the future.

I finished S3 of House. Five more to go. I had a break and started watching S2 of Follow The Money. I saw some movies in my holiday week: You Were Never Really Here and Isle of Dogs at the Curzon Bloomsbury; Red Sparrow and Unsane at the Cineworld Leicester Square; and The Square at the Curzon Soho.

I had supper with Sis for her birthday at Picture on Great Portland St, and with my mate at the Argentine Steak House in Richmond.

I had a lot of early nights. If I’m tired, I’m in bed at 20:30 and if I’m not, at 21:15 at the latest.

Monday, 2 April 2018

Upgrading the Windows Computer

Every now and then I think about upgrading my Windows laptop. At the moment I have a Samsung that may be seven or eight years old. It has a 17.5 inch screen, a 2GHz Pentium, a 500GB HDD, 4GB of RAM and a basic video card. The body is plastic and the keyboard is only for light use, and I mean maybe ten minutes at a time. It does the job I want it to do, and I suspect the video card is a part of that.

So I’ve been looking at laptops and mini-PC’s.

At the bottom end of the price range, say about £300 or so, are Celerons and Pentium with 2GB of RAM. At the other end are 4k video editing machines for photographers. These have GeForce 1040 or above video cards, 8GB+ of RAM, an i7 HQ, some SSD and a 1TB drive or a lot more SSD, and USB 3. / 3.1 to connect external HDD’s with decent transfer rates. MacBook Pros and Dell XPS 15’s are get a lot of mentions. (High-end gaming laptops are way over what I need.) These machines have good keyboards and aluminium unibodies (the Dell is almost an aluminium unibody).

In between is a mass of i5 / i7 U-series machines, with or without graphics cards, random amounts of SSD, rarely an HDD, random combinations of USB / HDMI / VGA ports and build quality that ranges from awful to okay-I-guess. These can vary in price between about £600 - £1,000. The only way to make sense of these component salads is to assume that Wintel manufacturers design a high-end model, a low-end model and a mid-range model, and all the others are put together from excess parts and left-overs.

The decisions are much simpler than all those fancy specs and combinations make it look.

Want to browse the net, do text-based work, basic photographic editing and adjustment, and send e-mails? But don’t do 1080p and upwards video-editing or scientific computing? Take a serious look at an iPad and an external keyboard.

Get a Macbook Pro if you want to do iOS, Mac or UNIX / Linux development.

Get the high-end £1,100+ video-editing capable machines if you want: the aluminium body, high-quality keyboard and sharp screen; a large HDD; to use Adobe Creative Cloud or the equivalents on 1080p and 4k movies.

Want to do lots of calculations but not much graphics? (Very rare). Then you can get one of the component-salads with an i7-HQ, 256GB of SSD and integrated graphics.

Sustained daily typing and use - because you’re an author, or journalist or other content-producer? Consider a Mac Air or one of the top-end machines. (The price difference is not that large, especially if it’s how you make your money.)

Anything else? Get the mid-range Wintel.

It’s the build quality. Once you’ve had Mac, you can’t go back. At work, they hand out POS HP’s with Win 7, VGA adapters, and a keyboard with the Page Up / Down / End / Home keys in the wrong place. But that’s institutional companies for you. Cheap. The Adobe Creative Cloud Suite user in the family does so on an MSI gaming machine with an i7 HQ and 16GB of RAM with a 17-inch screen. It’s wicked fast but it’s got that corporate cheap build feel. And he doesn’t work for a big company.

I don’t want to come home and use something similar to the junk they give us at work. It’s my home, not an office. Computers are one of the things I’m willing to Pay Good Money for. (Not Silly Money, but Good Money.) As a tool to do a job. And the video-editing performance laptop is a tool for a job I’m not going to do.

The outsider for my needs is an Asus mini-PC, which has the 1TB drive, an i5-7U series, a mid-range graphics card, some SSD, Wireless-AC, and ports out the wazoo. It can drive two external screens, which is a nice-to-have I’ve wanted for a while. It will be an ace media centre, but would need hi-fi to make nice sound, but then, so does a laptop. It costs £650 and already I have an external screen (the TV), a mouse and keyboard. At a pinch I could get a 21-inch monitor for about £150 and work on a table if I wanted to use it as a computer. Back to the future.

PS: I didn’t do any of this. I did something else instead that didn’t involve spending money. I’ll talk about that later.

Monday, 26 March 2018

How Strong Do You Really Want To Have To Be?

The title is a line in an episode from S3 of House. He’s trying to persuade the dwarf mother of a normal girl they had all thought had dwarfism to take the growth hormone that will let her grow into a normal girl. At first the mother is against it. Then House lets loose.

“You and I know that being Normal sucks, because we’re freaks, and the good thing about being a freak is that it makes you strong. Now how strong do you really want her to have to be?”

The mother thinks for a moment, then approves the treatment.

Was that moment was some moment of writer’s luck, when the words seem to produce themselves? Or was it from someone’s experience? It was from mine.

Being strong in the manner House means is a non-stop effort. Not exhausting, but tiring. Giving up for a moment means sinking into debilitating self-pity, and the only person who can pull yourself back up by your own hair is you. Nobody else can help you with it, because it’s like holding your stomach in all the time: the only person who can do it is you.

People only live like that because they have to, and they know there’s nothing noble or dignified about it. Being strong-like-a-freak isn’t a virtue, it’s tiring, a continual drain of energy, leaving less for relationships or interests. Nobody who had experienced it would want that for someone they loved. Which is why the mother relents.

The best thing about being a Normie, it seems to me, is that they don’t have any reason to try. Take one look at them. The people staying in shape in the gym, the people doing professional qualifications to get ahead, the competitors, the people with absorbing interests, the Suffering and Recovering Anonymouses, let alone the people with non-standard desires... none of these are Normies. Every now and then a Normie will suprise me by having done something I thought was a Non-Normie Thing, but then I can tell the Normie Didn’t Connect with whatever it was.

When I was a suffering drunk I wanted to be a Normie: smug, self-satisfied, lacking any self-consciousness and doubt. Now I’m a recovering alcoholic and much older, I am so glad I’m not a Normie. Because if I had been a Normie, I would have got married, and then maybe divorced, or would now be living with an old woman. Eeeuugh.

I’ll take the continual drain of being strong if that’s the alternative. The occasional dip into self-pity isn’t pleasant, but it doesn’t last long. Do I think you should do it? If you don’t have a reason, no, you should not. It’s so much easier being a Normie.

Thursday, 22 March 2018

Toy Examples: How os.walk Works

One of the many things a programmer needs to do is walk a directory tree and do stuff to the files and folders in it, even if it’s just list them. This is a recursive exercise and those can be mind-bending to code, and if done badly can mess up all sorts of low-level things. It’s best left to the kind of people who have actually read Knuth. Fortunately someone on the Python project did, and they gave us os.walk. (It’s in the os module, and is called walk().)

Unfortunately, the almost identical explanations of how to use os.walk mostly miss the point. All of them - that I’ve found - print out a directory and file listing. Which is not what I wanted to do with it.

When you execute os.walk(starting_point), for a directory called ‘starting_point’, it returns a triple consisting of: the path for starting_point a list of the subdirectories of starting_point a list of the files in starting_point.

os.walk works in a loop. Outside a loop, it doesn’t do much. Here’s how to use it in Python:

for current_directory, subdirectories, files in os.walk(starting_point): (do stuff)

What happens? The first time execution hits os.walk, it returns a triple like this:

current_directory = starting_point
subdirectories .... of starting_point
files ... in starting point

If you want to do something to all the files in the starting_point directory, you loop like this

for file in files: do stuff to file

If you want to do something to the subdirectories, unless it’s to list them, don’t. Wait for a moment, because...

The second time execution hits os.walk, it steps one directory down the tree, like this:

current_directory = first_subdirectory_in_starting_point
subdirectories .... of first_subdirectory_in_starting_point
files ... in first_subdirectory_in_starting_point

Now you can ‘do stuff to file’ for the files in first_subdirectory_in_starting_point.

What happens if there’s a subdirectory in first_subdirectory? The next time os.walk is executed it will return

current_directory = first_subdirectory_of_first_subdirectory_in_starting_point
subdirectories .... of first_subdirectory_of_first_subdirectory_in_starting_point
files ... in first_subdirectory_of_first_subdirectory_in_starting_point

Why don’t you do anything to the directories? Because os.walk is using that list to walk through them, so if you change names or permissions or something, before you have walked to the directory, os.walk (probably) won’t work.

If you want to mess with the subdirectories themselves, the chances are you need to run os_walk in the reverse direction (look that up).

The toy example of a directory listing just doesn’t expose the inner workings clearly enough. It can leave you thinking you have to do stuff with the directories as well as the files, but you don’t, of course.

Someone who has worked a lot with recursive Python functions will, should they have got all that experience before needing os.walk, grok os.walk fairly quickly. They will read the description and look at the examples and match that against the way they know Python array-returning programs have worked in the past, and say after a moment ‘Oh, sure, it does this and that, and you always have to use it in a loop’.

Catch is, walking a directory tree is one of the first things a programmer wants to do. And grokking recursive-return functions like os.walk is not simple. Being able to picture a recursive process is one of those big-jump differences between code-bashers and actual programmers. A toy example isn’t going to cut it.

Monday, 19 March 2018

February 2018 Review

February is dance month. I saw Pina Bausch’s Viktor, Maria Pages’ Yo Carmen, and Jesus Carmona’s Impetus. Mother loved Carmona, Sis liked Pages, and I thought Viktor was wonderfully and sometimes disturbingly surreal. Each time I had lunch at Santore. My judgement: go for the pizzas.

February is also MoT month. I have used the same local garage, Mullen Speed Test, for a long long time. This time I needed new front tyres.

Mostly I went to work, went to the gym or went home, crawled into bed by 20:45 at the latest and slept.

I finished reading the first volume of Hegel’s Aesthetics, read Neil Gaiman’s American Gods and Nick Garlick’s Storm Horse. Gaiman has sold enough, so I’m going to commend Storm Horse to you. Don’t be put off by it looking like a children’s novel. It isn’t: it’s a sparely told story about a young boy, and that spareness gives it a bracing, adult feel. I was so absorbed I did not notice the commute on the train.

Towards the end of the month, I quit treating myself after the gym to make up for the crappy Christmas I’d had. No more breakfast deals at Paul, and no more sandwich and tea from Pret at elevenses. That was all costing a lot of money. And it was keeping my weight a little heavier than I would like. The real progress got made in March, so you’ll have to wait for that bit.

I finished series two of House and started on series 3. No movies. Too damn cold.

Monday, 12 March 2018

It Seems We Don't Touch Enough. I Wonder Why?

There was a recent article by Paula Cocozza in the Guardian called No hugging: are we living through a crisis of touch?

Oh man.
In countless ways social touch is being nudged from our lives. In the UK, doctors were warned last month to avoid comforting patients with hugs lest they provoke legal action, and a government report found that foster carers were frightened to hug children in their care for the same reason. In the US the girl scouts caused a furore last December when it admonished parents for telling their daughters to hug relatives because “she doesn’t owe anyone a hug”. Teachers hesitate to touch pupils. And in the UK, in a loneliness epidemic, half a million older people go at least five days a week without seeing or touching a soul.
Half a million people cannot be an epidemic is a widespread infectious disease. If it’s confined to older people it can’t be widespread. And loneliness isn’t infectious. Sloppy writing and using mainstream media tropes is, however, infectious, and Paula Cocozza has caught it bad. Start her on David Hume’s Treatise on Human Understanding stat.

Doctors were were recently advised by the Medical Defence Union, which provides legal advice to doctors, to 'err on the side of caution' regarding physical contact with patients. Which is what an organisation dedicated to litigation defence would and should say. Since foster children actually belong to the local Council, not the foster parents, I can imagine some Councils advising against touching foster children for the same reason: 'err on the side of caution'. Teachers work in permanent fear of being sacked and replaced by someone younger and cheaper, or of displeasing the all-powerful Head Teacher, and any flimsy allegation will do. That’s been going on since at least the 1990’s. I have a lot of sympathy for the American Girl Guides saying “She doesn’t owe anyone a hug”. To awkward and insecure teenagers, old people can be smelly, feel odd, and generally be icky. I feel much the same way about almost all of the human race.

So this is two issues: one about the legal hazards of dealing with people in these crazy times, and another about the fact that many people find many other people icky and don't want to touch them. Ms Cocozza actually quotes someone saying as much:
“Of course we are moving away from touch!” exclaims Francis McGlone, a professor in neuroscience at Liverpool John Moores university and a leader in the field of affective touch. He is worried. “We have demonised touch to a level at which it sparks off hysterical responses, it sparks off legislative processes, and this lack of touch is not good for mental health.” He has heard of teachers asking children to stick on a plaster themselves, rather than touch them and risk a complaint. “We seem to have been creating a touch-averse world,” he says. “It’s time to recover the social power of touch.”
Does Ms Cocozza's suggest we deal with the cynical misandry masquerading as 'feminism' which is the source of all this, and with the legal profession that enables it, and the click-seeking media which gives it all publicity. Nope. This is the Guardian: misandry is not the problem, but men: after all, no men, no misandry. The answer is to bring on the private sector and the science. The science is essential. It proves that touch is just a drug like, oh, Prozac, and therefore that hugs and touches can and should be transactional within a managed environment. One of those businesses describing itself as providing...
a structured event which explores affection, intimacy, boundaries and verbal/non-verbal communication… strictly non-sexual so that you can relax and meet new people in a fun and warm-hearted environment...You'll have the opportunity to rediscover nurturing touch and affection, let go of hidden agendas, gently explore any challenges around touch and gain tools for more satisfactory touch in your life”,
(No link. This is a blog, not a billboard.)

Sadly, that doesn't "recover the social power of touch", but on the contrary privatises it. I don't think that's what the good Professor McGlone had in mind.

One point slips by in the article like a thief in the night. “Even stranger touch, when it’s wanted, is pretty good,” Linden points out.” When it’s wanted. There’s everything right about the condition, and everything wrong with the reality in which that condition applies. Because the reality is that the number of people whom we want to touch is almost zero. A random man who isn’t one of the hot 1% can safely bet that the next woman he passes will not under any circumstances want him to touch her. This applies even if she’s his wife and double if they’ve been married for more than three years. Equally, a random woman can safely assume that the next man she passes will be repulsed by her touch, unless she’s one of 2% of women who have the looks or personality to make it a pleasure.

It gets worse. Just because you had touching rights yesterday, doesn't mean you do today. If you have to ask if you do, you fail the confidence test. If you assume you do, but you aren't wanted today, well, then, you're now her bitch, because she can use this against you at any time over the next forty years. Just ask Garrison Keillor.

How the heck did we get here?

Well, cynical misandry, an enabling legal profession, and click-seeking media is part of the answer.

Another part is that the majority of the human race is just gross and icky and should keep its hands to itself. Men who are not confident, exciting, good-looking or wealthy (pick 'confidence' and one other) should keep their hands to themselves. I'm serious. Women don't want them, but they might settle for them. I'm also serious when I say that women who aren't feminine, charming, and under an old-money size 12 should pretty much keep their hands to themselves as well. Those women have known forever that men are prepared to settle for them, but who wants to be settled for? Nobody wants to settle for who their touch comes from. That touch has to be wanted.

Also, significance is inversely proportional to frequency. The fewer touches we get, the more significant each one is. A woman who is down to one slight touch a week is going to be fairly irate if her weekly ration is an accident from some featureless dork. Better nothing than that. If she's getting some hot guy tingly-touches every week, then the odd featureless dork is bearable.

Then there's the fact that touch is not an unadulterated good. It can be and is routinely used to deceive, manipulate, placate, distract, mislead and seduce. That's why children wriggle away from Mommy's cuddle when they are cross and want to stay cross: they don't want Mommy hug-drugging them into a stupor. That’s why women who have stopped caring, don’t want to hug their partner: they don’t want to be made to feel good about him by some cheap hormonal circus trick. It's why you should be very suspicious when anyone puts their arm around you: they are probably setting you up for something. It's why PUAs talk about 'kino'. One of the 243 reasons women have sex is to manage their partner, to keep the poor dolt reasonably happy. Adult-on-adult touch is all about the agenda. That's because adult life is all about the agenda.

Set aside the hormonal natural highs, and what am I supposed to do with a hug? When it’s over, I’m still in the same bad position that made someone think a hug might be in order. I don’t need hugs-'n-drugs, I need actual help. In other words, a suspiciously large proportion of touch may not be given for the benefit of the receiver, but for the benefit of the giver. They hug the suffering-us so that they will feel better about us feeling bad. It’s like tossing a coin into the charity bucket and having the coin bounce right back. The doctors weren't touching you reassuringly so you would feel better: they were touching you so you wouldn't get emotional or make a scene. And actually, both of those can be true at the same time.

Capitalist, managed hugs might have no past and no future, like a visit to a hooker in a foreign town, but a genuine hug is not in the singular: it’s one of many in the past and in the future. Real hugs are part of a relationship. The hug is a symbol, and the reality is the relationship that hug confirms still exists now, and so opens the possibility that it may exist tomorrow. When the hugs, the sex, the touches, stop today, the relationship is dead tomorrow. It's what the touch means that matters: the drugs are just a boost.

It’s not the lack of touch from his wife and children that is bad for a husband and father. It’s what that lack of touch means: that his wife hasn’t been attracted to him for years and his children don’t find him a source of strength and assurance.

It’s not the lack of touch in our lives that is bad for us. It’s that we don’t know or even see anyone whose touch we want. It’s being surrounded by people whose physical presence is bearable only if they don’t come into contact with us. If they stay quiet, shower frequently, don’t eat smelly food, or stink of drink or drugs. Day after day, month after month, with no object of desire in sight.

That's not a crisis. That's the human condition.

So maybe you civilians should pay for the hugs-'n-drugs. I’m at disadvantage: the injunction to avoid ‘mood-altering chemicals’ includes hormones. Sunshine is okay. Also chocolate. Random blasts of some chemical with a Greek name and a complicated structure whose operation is not well understood are discouraged.