Archive by Author | Darren

What services don’t you need on your Debian Linux box? sysv-rc-conf

Note to self:

On my Debian box there’s a bunch of stuff installed by default that I don’t need ‘cos it’s a workstation not a server. Anything that allows remote access, anything that talks to bluetooth, all that can be turned off, and it’s better to turn it off if you don’t need it, both for security reasons and boot time reasons. The easiest way to manage that on a Debian-based system is to install sysv-rc-conf, then run it as root and uncheck the boxes you don’t need by hitting the space bar. Anything beginning with ‘r’ is worth looking at, since that often means ‘remote’ and is likely to offer security issues. A lot of Linux stuff kind of assumes you’re running as a server, so there’ll be tools that allow access to network drives (nfs) and manage ports (portmap), and if your machine is a workstation in a home office, like mine, some or all that stuff is pointless and ought to be removed. I don’t need a webserver. Sometimes a good way to do it is uninstall the relevant packages. For example

$ sudo apt-get --purge remove nfs-kernel-server nfs-common portmap
$ sudo apt-get autoremove

But as noted, things can be left installed and just turned off. One easy way to do this is by installing sysv-rc-conf. This will control whether things get activated at startup. Makes it easy to manage services and only run what you want.

$ sudo apt-get install sysv-rc-conf
$ sysv-rc-conf
Arbitrary screen grab.

Arbitrary screen grab.

Anyway, you choose what you want to be activated at each different runlevel. It might be worth reading about runlevels a little but, but if there’s something you know you don’t want, just turn it off at all runlevels. (They are the 1 2 3 4 5 0 6 S labels across the top.)

You can also check out rcconf.

End reminder.

The Red Badge of Courage by Stephen Crane — just odd enough.

Well here’s a classic. One of those books you see in cheap anonymous editions in supermarkets and book shops. Out of copyright, low-grade editions flanged together on the cheap by various publishers you’ve never heard of. It’s famous. How’s it to read?

Cover of <i>The Red Badge of Courage</i> -- do not buy this edition!

Cover of The Red Badge of Courage — do not buy this edition!

 

Not bad.

The story is subtitled ‘an episode of the American civil war’ and it is in essence ‘young man learns lesson’. He learns how he will cope in a fight, and it’s not all good news. Shame, fear, braggadocio, boredom.

Our protagonist is mostly referred to as ‘the youth’, and the author gets close to him but dissects him dispassionately at the same time. It means that the tone of the book takes a little getting used to, but it works very well.

The story is leavened by flashes of wit and neat turns of phrase from the author.

He made a fine use of the third person.

He evidently complimented himself on the modesty of this statement.

Some in the regiment began to whoop frenziedly. Many were silent. Apparently they were trying to contemplate themselves.

He had performed his mistake in the dark, so he was still a man.

The youth’s friend had a geographical illusion concerning a stream…

The forest made a tremendous objection.

He had continued to curse, but it was now with the air of a man who was using his last box of oaths.

But I must advise no one to buy the edition illustrated above, It is one of the most carelessly put together volumes I have ever seen. Here is the contents page:

badge_bloomsbury_contents

…and I think you’ll agree it is of doubtful utility. More to the point, the book is full of typographical errors, including ‘rig2ht’ and ‘allusions’ for ‘illusions’ and the like. Most importantly, it drops two paragraphs from possibly the most crucial section of the book, such that the main character suddenly has a wound on his head and I can’t tell how. I spent a good half hour flipping through the book trying to work out when it had happened and assuming I had been distracted while reading and had not noticed; only recourse to another edition, a good one put out by a reputable publisher, was able to confirm that bits were missing.

To sum up: I can recommend this book, but not in this edition.

 

Classic.

A VGA font in a terminal emulator

How’d I do it? It was quite a while ago and I can’t remember, I can’t recall. I’m trying to reconstruct it…

I grew up in the IBM compatible, DOS era. That VGA font that you got by default in DOS still, to this day, looks ‘right’ to me on a terminal screen, even after years of using Linux and Mac OS X and what not. I know it is not a great font in numerous ways, but I am so familiar I don’t even see it. It’s invisible, like a good writing tool should be. So I wanted to use it in my terminal window on Debian. It’s not very hard, maybe. I can’t remember if these were all the things I needed to do…

I am using mrxvt because I like the simplicity of it. This is my very simple mrxvt configuration file, .mrxvtrc:

Mrxvt.sl: 65535
MRxvt.ps: true

Mrxvt.xft:                      1
Mrxvt.xftFont:                  Perfect DOS VGA 437 Win
Mrxvt.xftSize:                  16
Mrxvt.xftAntialias:             1

Mrxvt.saveLines:                10000

And I have aliased the command mrxvt to this string:

alias mrxvt='mrxvt-full -fade 50 -ps -title " " -tn rxvt'

So to get the VGA font, I first went and found a good X windows font, called “Perfect DOS VGA 437 Win”, which is a ttf (TrueType font) when I unzip the archive. I put the file (called Perfect_DOS_VGA_437_Win.ttf) in a subdirectory of my .fonts directory; I put it under ‘p’ for perfect:

$ ls ~/.fonts/p
Perfect_DOS_VGA_437_Win.ttf

And, on a modern Linux system, that seems to be all that is required. Except I do notice that my .fonts.conf file looks like this (also serves as an example of what the font looks like in action):

Perfect DOS VGA 437 Win font used in mrxvt managed by FLWM.

Perfect DOS VGA 437 Win font used in mrxvt managed by FLWM.

Notice that the <dir> line at the end lists my local ~/.fonts directory? I think that might be important, but like I said it was a long time ago and I’m not sure.

So there you have it. Finding Perfect_DOS_VGA_437_Win.ttf somewhere on the web and putting it in your ~/.fonts directory and making sure that that directory is listed in your ~/.fonts.conf file and then changing the font selection line in the config file for whichever terminal emulator you are using might or might not let you use a font you don’t like.

 

 

Fonty McFontface.

Keith’s Life: What to trust?

First, I have to point out this: http://www.slate.com/articles/news_and_politics/low_concept/2010/11/please_allow_me_to_correct_a_few_things.html.

Brilliant and mostly spot on.

Keith Richards is of course famous. He’s been playing geetar in some band since Moses was a boy and apparently the NME voted him ‘most likely to die in the next year’ ten times in a row in the 70s. But he’s still alive. The Stones just knocked out one of their better albums of the last [[insert preferred value here]] years, Blue and Lonesome which, tellingly, is all covers; they’ve still got their chops as players, but they (Keith and Mick) aren’t writing great tunes so often. Well, they did plenty way back when and they can’t all be gems. As long as Charlie is drumming there’s something worth hearing on a Stones record.

Speaking about way back when: Life is Keith’s ghosted autobiography, put together by James Fox from many hours of recorded interviews. It’s very thick. About 550 pages. If you like thick books about rock stars, it’s got you covered. It made a bit of a splash on release ‘cos Keith says lots of rude things about Mick Jagger. Well, you know, Keith wanted to sell copies, didn’t he? But in a sense those things are very telling. They put me on alert as a reader. Immediately I wonder; how much of the negative stuff he says is true? The shots about the size of Jagger’s cock are cheap, juvenile and the kind of thing designed to stir up tabloid press interest (and stir up Mick), none of which requires them to be true. Pete Townshend says the comments are wrong, anyway. So I’m wondering; if Keith is prepared to say pretty much anything to make a stir, what else in the book is unreliable? The whole thing is tarnished.

Take another little example, trivial of itself. He critiques Jagger’s (pretty terrible) solo output. She’s The Boss, Primitive Cool, Goddess in the Doorway, yeah, they’re all pretty dire attempts are hooking into the current fashion. But he strategically leaves out Wandering Spirit, easily Jagger’s best solo outing. Why? Probably ‘cos it’s the only one that isn’t disappointing. So he just omits it. Little bits of manipulation, when they come to your attention, they cast doubt on everything else, on much bigger and more interesting topics.

There is a sense of unreality about the whole book, despite the level of detail. Oh, much of it is most likely true, and when Keith talks about the music he loves or some of the intricacies of guitar tuning, or making bangers and mash, he’s genuinely affecting. So the bullshit becomes all the more disappointing.

He threatened Billy Preston with a knife when he was playing too loudly, he threatened a record exec with a knife when he dared make suggestions in a mixing booth, he shot this with a gun, that with a gun, took this, swallowed that, nearly died when this happened, nearly died when that happened… it’s probably all true, but I’m always thinking as I read: “Is this what happened, or is this designed to gild the Richards legend?” Keith is cool enough without all the dodgy claims.

And that is the core of the problem I have with the book. I don’t know if I can trust it, so I wonder why I am reading it. I mean, the incidents are entertaining and well told, but I’d like to know if it’s fact or fiction. He’s probably never cleaned his own kitchen or put a load of washing in the machine (I’m jealous). He’s never lived in the real world since he was 20, and he’s not starting to with this book.

The other problem is Keith himself. I don’t want a book full of agonising over what might have been/should have been/how he hurt people and so on (that’s Who I Am, by Pete Townshend), but a little admission that maybe he spent a lot of his life being pretty unhelpful (to put it in very mild terms) would have leant a little more reality to the proceedings.  He points out that while he was on heroin he made Exile on Main St and learned to ski, or whatever.  But he also made Goats Head Soup, It’s Only Rock n Roll, Black and Blue and Love You Live, none of which are exactly brilliant, though there are flashes enough to suggest that had he had it together the spark might have survived. And even after he kicked it, the great songs have been intermittent at best. (I’ll say this for the book, I listened to ‘How Can I Stop’ off the forgotten Bridges to Babylon with new ears, and, yes, it’s a great track.) In the 70s Mick Jagger held the band together and made Keith wealthy and kept the money flowing, while Keith spent his time making sure there’d be a hit of heroin waiting for him when the plane landed. Jagger was the grown-up and Keith perennially a child. But the magic of the Stones was gone ‘cos, really, the Stones were great when Keith was great, and in the 70s Keith was about drugs before he was about music. They say in sport ‘don’t flirt with your form’. When  you’re on a roll, don’t take your foot off the gas. By the time he got off heroin, the momentum was long gone. It’s flared up now and again since; his solo Talk is Cheap, made when he was pissed off at Jagger, is a great record if you like Keith’s riffology.

Is it a good read? Oh, yeah. If you’re a Stones fan or a Keith fan, yeah. But the Richards ego is enormous. He barely recognises the existence of contemporaries beyond the Beatles and Elvis, as if they had nothing to teach him. So if you’re a fan to 60s/70s music in the broader sense, there’s surprisingly little here for you.

Keith’s cool, Keith’s tough, Keith has played and made some great music, he’s had an amazing life. His story is worth reading. Just take it with a grain of salt (and a shot of tequila).

 

An album a what?

 

Richard W. Richards: An amazing forgotten story.

This scrappy webpage has been posted in various places over the years (like here, though the link will go dead soon I suspect); I like to keep it with me! Here it is dumped onto this blog. Sorry if the formatting is a bit ropey.


The Beginning

R. W. ‘Dick’ Richards was 21 years old in 1914, and had freshly completed a Physics degree at the School of Mines in Ballarat, Australia, and taken a position as Lecturer, when he answered a call for a Physicist to join the Imperial Trans-Antarctic Expedition under the leadership of Ernest Shackleton.

Shackleton intended tomake the first crossing of the Antarctic continent, starting at the Weddell Sea and crossing to the Ross Sea. To do this, he divided the expedition into two parties. The main party, the Weddell Sea party, sailed in the Endurance, a ship constructed specifically for the voyage, to the Weddell Sea. From there six men, including Shackleton, were to sledge across Antractica to the Ross Sea using motorised sledges, a distance of 1700 miles.

The task of the Ross Sea Shore party was to sledge inland along the Beardmore Glacier and lay fuel and food depots for Shackleton’s sledging party. The Ross Sea party included Richards and another Australian Physicist, A. K. Jack, who were to make meterological measurements and any other observations they could. For example, a home-made cloud chamber was constructed to measure the air’s dust content. They sailed in the Aurora, a ship previously used by Mawson, and refit in Sydney for the new expedition. The ship was under the command of A. L. A. Mackintosh,while E. E. M. Joyce, a well known polar explorer in his own right, was to lead the shore party, which would set up a base from which to sledge out to the depot sites. The Aurora left Sydney on 15 December 1914. From the 21st to the 24th they stopped in Hobart, and after visiting the Australian meteorological station on Macquarie Island, they sailed for the Ross Sea on the last day of 1914. By January 16 they had anchored off Cape Evans, and later went further south,close to Hut Point. The sledging soon got underway, with Joyce and, unexpectedly, Mackintosh leading the team to place the first depot at 80 deg. south.

An example of the Richards Medal.

An example of the Richards Medal.

 

Disaster

On May the 6th (or the 10th), disaster struck. A blizzard caught the Aurora and drove it beyond sight of land. And then the ice caught the ship, making it unable to return to the Shore Party. Worst of all, the ship had been expedition headquarters, and only minimal supplies had been landed – ten men were stranded on the ice with little food and the Antarctic winter close at hand. Fortunately, Hut Point was named for the hut erected there by Scott on an expedition in 1911, and so they at least had shelter, and they found a useful quantity of food and other goods left by Scott. These things included an acetylene stove, while they had themselves brought a gramophone and a set of the Encyclopedia Britannica. With these things, they survied their first winter.

On the other side of the continent, the Endurance had been trapped in ice for ten months – and on October 27th, 1915, crushed. Shackleton had made his way to Elephant Island in the South Hebrides, and then to South Georgia – in nothing more than a modified whaleboat. He then set about relieving the remainder of the Weddell sea party; but the Ross Sea party would have to wait.

As the winter passed, the Ross Sea party began the main effort of putting out the depots, not knowing that they would never be used, and refraining from using the potentially life-saving food and fuel themselves. As their packaged food ran out, their diet more and more consisted of seal meat and penguin meat. Three men died of scurvy, including Mackintosh. Still they put out the depots. At times they sledged for 100 days without ceasing, often hauling the sledges by hand, since the dogs had been overworked early on and many had died. All the men suffered from scurvy in one way or another, and their lives came to depend on the killing of seals, as the creatures provided food and, just as importantly, blubber which could be burned for heating and melting ice for water.

 

Rescue

Through the winter of 1916 they carried on, making expeditions to Shackleton’s old hut on Cape Royd and searching the snow around the huts for forgotten, frozen foodstuffs. All the while, they wondered about rescue. It had not come in the summer of 1915-16, and they could only assume that the Aurora had sunk or been crushed in the Antarctic ice. January 1917 came. It had been almost two years since they had departed Australian waters and heard any news of the world at large. On 10th January, Richards, who was recovering from an illness brought on by endless weeks of sledging followed by physically carrying an injured companion to safety, left the Hut Point hut after breakfast to find, to his astonishment, the Aurora holding fast off the ice-edge. The ship had made its way slowly to safety, and after a refit had come south again to find the shore party.Shackleton was on the ship, having insisted on sailing south. He described them as ‘…just about the wildest looking gang of men I had ever seen…’

And while the crew of the Aurora were overwhelmed by the appearance, manner and smell of Richards and the others, the survivors where even more dazed by news of the war in Europe. Before they left, they raised memorials to their own dead. Then they sailed away from Antarctica.

Richards and three others were awarded the Albert Medal in 1923 for their devotion to duty. He was also presented with the George Cross, the highest award a subject of the British Empire could earn without being at war. There is also now an inlet, relatively close to the Beardmore Glacier, known as Richards Inlet.

Richards returned to Ballarat, where he resumed his position as Lecturer in science at the School of Mines and Industries. From 1946-58 he was Principal of the school. He died in 1985. Before his death, he recorded an interview with the Australian Broadcasting Corporation’s Verbatim programme, which can be ordered by mail. In his honour, the award for the best science graduate (all disciplines) from the Ballarat School of Mines and Industries and then the University of Ballarat (now both rolled into Federation Uni) is known as the Richard W. Richards medal. It is a pewter medal about 7 cm in diameter. Accompanying it is a slim volume called The Ross Sea Shore Party, 1914-17, which is Richards’ own record of the expedition of 1914-17. It is a fascinating document.

 

References and Links

R. W. Richards, The Ross Sea Shore Party, 1914-17, The Scott Polar Institute, Cambridge 1962.

L. B. Quartermain, South to the Pole: The Early History of the Ross Sea Sector, Antarctica, Oxford University Press, London 1967.

R. Huntford, Shackleton, Hodder and Stoughton, London 1985.

There are also some good Antarctic websites. Here are a couple just on principle:

www.south-pole.com (Especially this page.)

…and here…

Antarctic Climate and Ecosystems CRC.

Scott Polar Research Institute.

Photos of some of the huts and things can be found here.

And the University of Ballarat (now Federation University, FU) has a page on the subject here.

Some comments that accompanied the medal, plus the front cover of his monograph are shown here:

<i>The Ross Sea Shore Party</i> by Dick Richards.

The Ross Sea Shore Party by Dick Richards.

 

History, eh?

My Appendix: Chains of molecules, planes of scattering

In a very recent post, I mentioned an appendix to an article I wrote. I rather like it. The appendix grew out of a little document I put together. That document is longer, vaguer and a little different from the published appendix, and so I am putting it here. Now, the article was written in LaTeX, and this is a website, so I tried running htlatex on the file. It was very complicated:

$ htlatex planes
$ firefox planes.html

And it worked. Next thing is to get it into WordPress… Easy enough to cut and paste the HTML code into the window here, but what about all the graphics that were turned into png files?Ah well…bit of manual fiddling. Equations and symbols seem to sit high, and some of the inline equations have been broken into a mix of graphics and characters… still, not too bad. The PDF version is available here.


Planes perpendicular to vectors

Say you have a vector in real space, expressed say in direct lattice terms, for

example  planes0x= paplanes1x + pbplanes2x + pcplanes3x where planes1x is the a lattice parameter, which is a vector.

You may want the reciprocal plane(s) perpendicular to this vector.

Why?

Because correlations in a crystal collapse the scattering into features perpendicular to the direction of the correlation. In a normal, fully ordered three dimensions (3D) crystal, this collapsing happens in all three directions, so the scattered intensity coming off the atoms gets concentrated at points, the reciprocal lattice points, usually denoted hkl.

If you have only two dimensional ordering, the scattering is collapsed down in two directions but not the third, giving rise to rods or lines of scattering in reciprocal space (that is, in diffraction space). If there are only one dimensional correlations, the scattering collapses into sheets, that is, it is delocalised in two dimensions and only localised in one dimension (because there are only correlations in one dimension).

In diffuse scattering the crystal is typically long-range ordered in three dimensions, and the diffraction pattern shows nice Bragg peaks (hkl reflections). However, there can also be disorder, for example in the motions of the molecules or the chemical; substitution of one species of atom or molecule for another.

In a molecular crystal, one can sometimes identify a chain of molecules running through the crystal, and interactions within these chains are likely to be much stronger than those within. That tends to mean that the motions of the molecules along the direction of the chain (call that ‘longitudinal’ motion) is highly correlated, while it is not well correlated laterally.

In such a situation, the single crystal diffuse scattering will show ‘sheets’ of scattering perpendicular to the length of the chain.

Let’s say the chain of molecules extends along an arbitrary real-space direction, which we’ll define by the vectorplanes0x as above.

Now, a plane perpendicular to planes0x can be specified by giving two (nor more) non-collinear vectors that lie in it. Let’s look at two vectors and we’ll call them planes7x and planes8x, for no good reason.

Then we can say that

planes9x (1)

but note that we are not assuming planes7xplanes8x = 0, since right angles within the plane are not that important — especially as for generality I am not assuming orthogonal axes.

Now, planes7x exists in reciprocal space, so it is a linear combination of the reciprocal lattice vectors, planes13x, planes14x and planes15x like this

planes16x (2)

and these reciprocal vectors are defined in terms of the direct space vectors like this

planes17x (3)

and similarly for the other reciprocal vectors. The important thing for us to note is that this means planes13x is perpendicular to planes3x and planes2x . This is important when we go to take dot products later on. The bottom line here is basically the volume of the unit cell, and 2π is just a scalar, so from the point of view of defining the plane that we want, these are not important.

Ignoring the scalar parts, substituting eq. 3 into eq. 2 gives

planes21x (4)

and since we have more variables than we need if we are to satisfy eq. 1, we can arbitrarily set qc = 0.

Now, considering the dot product of planes7x and planes0x , in full it is

planes24x (5)

and this is useful because, to take the last term on the first line as an example, planes1x is perpendicular to (planes3x × planes1x) by the very nature of the cross product. This means that any terms with a repeated vector go to zero. Further, in the remaining terms the vector part is just of the form planes1x planes29x which is the unit cell volume and a constant, which we can also factor out to be left with

planes30x (6)

which is nice and simple. This is not a surprise but still…

The next step is to find another vector in that plane. This is just planes8x, and if we use the same logic but, to make planes8x non-collinear with planes0x , we choose rb to be zero, we get an equation analogous to eq. 6. These can be summed up as

planes34x (7)

where planes35x is a fairly straightforward extension.

Now, in terephthalic acid (TPA), triclinic polymorph of form II, each molecule has a -COOH group at each end. These H-bond strongly with the groups on neighbouring molecules and you get strongly correlated chains of molecules running along the [-111] (direct space) direction. This then suggests that the planes of scattering perpendicular to these chains will extend in the directions

planes36x (8)

or

planes37x (9)

Now, does this work? Figure 1 is some data from TPA, diffuse scattering data measured on a synchrotron. It also shows the reciprocal axes and the white, two-ended arrows show the directions of the diffuse planes and by
counting Bragg spots it can be seen that these agree with the calculation above.


planes38x

Figure 1: Observed data, measured at the Advanced Photon Source, showing what looks like multiple crystallites with similar orientations.


This means that we can ascribe these features to correlations in the displacements of the TPA molecules linked by the -COOH groups.

Before, before. Stop living in the past.

A Paper! Good God, a Paper: ‘Synchrotron X-ray diffuse scattering from a stable polymorphic material: terephthalic acid, C8H6O4’

I’ve been doing science for a long time, and while I’m in a bit of a career transition at the moment (see here for example), I’ve still got a few fingers in a few pies, and a few pieces of work slowly wending their ways through the system. Most recently, Eric Chan and I put out ‘Synchrotron X-ray diffuse scattering from a stable polymorphic material: terephthalic acid, C8H6O4‘. It’s a paper about the fuzzy, diffuse scattering from two polymorphs of the title compound.

It’s out in Acta Crystallographica Section B: STRUCTURAL SCIENCE, CRYSTAL ENGINEERING AND MATERIALS, a highly reputable but not open access journal, although they do allow authors to self-archive. At the moment, what that means is if you want a copy send me a message and I’ll punt one back to you.

Terephthalic acid molecule, drawn in Mercury.

Terephthalic acid molecule, drawn in Mercury.

What is terephthalic acid (TPA)? Well, it is a chemical used a lot in industry (plastics and such) and at room temperature it can crystallise out of solution in two forms, called (wait for it) form I and form II. (Well, actually the word ‘form’ is poorly defined in this context, technically, and it’s better to just say ‘polymorph I’ and ‘polymorph II’). In this context, a molecule is polymorphic if it can form more than one crystal structure and these structures can co-exist. Many materials change structure as you heat them up or squash them, but in a polymorphic system separate crystals of the structures can sit there side by side, under the same conditions. In most case, those conditions are room temperature and one atmosphere of pressure.

The two room temperature polymorphs are both triclinic, so of low symmetry. The difference is in how the molecules are arranged relative to each other. In both cases the -COOH groups on the ends of the molecules connect strongly to those on neighbouring molecules, so long chains of molecules form. (In the picture here, the -COOH groups are those at the ends of the molecule consisting of two red (oxygen) atoms, one white (hydrogen) and the grey (carbon) atom attached to the two whites.) These chains are sort of like one dimensional crystals, and then they are stacked up (like logs or a pile of pipes), but you can stack them up with, say, the -COOH in neighbouring chains close together, or you might have the phenyl rings (that is, the hexagon of grey carbon atoms) in one chain adjacent to the -COOH in the next. So in that sort of way you can get different crystal structures depending on how you stack things up.

Anyway, the paper looks at these polymorphs and how they are similar and how they differ. It uses my old ZMC program, which you can download from here (it comes with an example simulation, though not this one I’m talking about now). (That link goes to a paper I wrote and published for an Open Access journal, which I chose specifically so that you could go and download ZMC and everything for free…)

So in doing this I think about the connectivity of the molecule — how do the atoms depend on each other and where does the molecule need to be able to flex and twist? That means I end up drawing diagrams like this one:

 

connectivity

That’s exciting, isn’t it? I start at the middle (X) and then each atom is positioned relative to the ones that went before. Here’s another picture (because I happen to have it handy)…. This shows how the atoms were numbered, and how by numbering them correctly and building the molecule up in the right order it is easy to let the -COOH groups spin around. mol_num

The X-ray diffuse scatting in the <i>h</i>0<i>l</i> layer of reciprocal space of TPA.

The X-ray diffuse scattering in the h0l layer of reciprocal space of TPA. Measured at the Advanced Photon Source.

Here I show typical data. You can see the little white spots — these are the sharp diffraction peaks, Bragg peaks, and they indicate where a lot of X-rays were reflected off the crystal. They are what is used to work out what is usually called the ‘crystal structure’ which consists of the unit cell (the repeating unit) that the crystal is made up from. But you can also see blobs and streaks and stuff, and these are wider (‘diffuse’) features, and these tell us about how the molecules interact and shuffle each other around, and stuff like that.

Anyway, the paper is online now. The DOI link is https://doi.org/10.1107/S2052520616018801. One thing I really like about it is it’s got a mathematical appendix. I always wanted to write an article with a mathematical appendix. I think I might post on that separately.

 

 

 

 

https://doi.org/10.1107/S2052520616018801

Is it better to go off-line when teaching?

Students, just like most of us including me, are too distractible, especially younger ones lacking self discipline, and by younger I mean first year university, not genuinely young. These days we put the content and the tutorial questions on the Learning Management System (LMS, really just a website) and we tell them to use the LMS to access the questions and the supporting materials and such. Once upon a time they’d just get a bunch of photocopies (‘photostats’) or before that roneos (mimeographs) or just “copy this down off the board.” I’m not pining for the past, I’m trying to work out how we can combine the best of then and now.

What happened then was we’d come to class having not looked at anything beforehand, we’d copy down a bunch of questions or question numbers off the blackboard (it wasn’t a whiteboard) like ‘Ch 8 Q 12-18’) then we’d have the book open in front of us and we’d whisper to each other while we were supposed to be working out the answers. Hmm.

What happens now is this:

They come to class having not looked at anything beforehand (just like in the old days), because the know they can access it when they get there (we knew we’d be given it when we got there, back in the day, so no difference there). But, and this is different now, they then spend ten minutes getting onto the university network and getting distracted by Facebook or whatever and don’t download the questions until the tutorial is half over. Then they get out their notebook (or tablet and stylus) and read the question and… check their messages. Then they show the guy sitting next to them a cat video. Then they laugh and eat some Skittles (fine, fine, that is not the internet’s fault), then they look at Pinterest or for all I know Tinder, and then I ask them how they’re going and they mumble and we’re over half way through now and they have written down a few bits of data pertaining to the first question and that’s it.

Okay, maybe I’m overstating, but I have seen it happen that way. I’m not just fighting any innate apathy or disinterest (or depression or sense of futility) to get them to do the work, I am fighting the single most interesting thing the human race has ever constructed — a world wide distraction machine that has everything on it and available at the touch of a screen.

At best, even when they are doing some physics or mathematics, their attention is divided — they are always ready to pounce on an alert from whatever bit of social media they use, so their brain is never really thinking about the questions we give them to (we hope) help them learn.

Now, in the past when you copied a question off the board, it went in your eyes, through your brain and out your fingers onto the paper. I’m not sure that’s much better than not engaging with it at all, but it can’t be worse. You could only really talk to the people either side of you, just as students can now, so there were by definition fewer distractions because now there are all the ones I had as a student plus smart phones, so at the very least students now have more distractions. Do they deal with them better than I used to? Valid question. Maybe these days they have extra information, extra connectivity, and the ability to use that without being consumed by it.

I’m not sure.

I started thinking about this post while I stood there watching students flick away from Snapchat (or whatever it was) and back to the LMS whenever they saw me coming. A few were able to use the ‘net to find useful information, or a website with some helpful content, and that’s good because a working scientist or problem solver (engineer, IT, whatever) does just that, calling on the info around them as well as what they know. But those students were a small minority.

I recall thinking how I would really, really like to given them all a paper copy of the questions or, better, ask them to bring their own copies (then at least they would have looked at it to the extent of downloading and printing it off and getting it from the printer with their own actual physical fingers before they got there — does that count as ‘engagement’?), and then use just their notebook, their bog basic calculator and their textbook (they still exist, they do!) to tackle the problems.

I don’t say the web is useless. It is great for communication, for extra activities and resources. They can use the web to access the material easily and flexibly when they are not in my class. I use it to distribute videos to buttress the material, to direct them to external resources, though Britney Spears’ Guide to Semiconductor Physics is getting a little behind the zeitgeist now… The WWW ought to be great for collaboration, for ready access to what the students have not internalised. For simulations, for VR, for virtual laboratories, for Skype visits to major laboratories, for feedback, for interaction, for… the sky is the limit.

But not if you can’t sit still long enough to actually do it.

We’ve tried to engage the students to make them want to be there. I mean, that should solve everything. And there’s always a few who do want to be there and  that’s great, they learn almost regardless of what the teachers do. But some students are in the class because they have been told to be there, because the subject is a prerequisite for what the really want, because they thought they would like it and now it’s too late to drop out without recording a fail, whatever. By giving them the option to more easily be mentally elsewhere when they have not developed the self-discipline to choose to do what needs to be done, I’m not sure we’re helping. I wonder if more distraction-free classroom time would have its benefits as part of a broader suite of learning opportunities? Some of the environments would use all the tech at our disposal, and some would just have the student and their brain and the stuff to be tackled.

I just want the best of both worlds; is that too much to ask?

 

Old fart, I am.

Update and Shutdown; sudo, halt, stuff like that.

So I sometimes run the script stop.sh to shut down my Debian machine (it lives in ~/bin).

$ stop.sh
[sudo] password for username:

It asks me for my root password then does an update to get the new file version information, then an upgrade and dist-upgrade, then halts the machine. It’s a one-liner:

cat stop.sh
#!/bin/bash
sudo apt-get update  && sudo apt-get -y upgrade && sudo apt-get -y dist-upgrade && sudo halt

Now, what’s bad about this?

  1. Well, sudo ‘remembers’ that I’ve typed my password for (by default) five (or is it fifteen?) minutes, so if the early steps (update, for example) take a long time, the latter ones won’t work.
  2. Also, if my intent is to let it update and shut down without me, I’ll be walking away from a machine in which root access is available for that five (or is it fifteen?) minutes, so I probably want to lock the screen before I go. Not a big deal if it’s a home machine or you can lock the office, and probably not a big deal anyway unless you deal with sensitive information (or work with untrustworthy people…).
  3. The -y flag tells apt-get to say ‘yes’ to any queries the installer might ask. Could be a problem if I have a non-standard install or specific needs.
  4. I don’t see any information that the installer might give me, and I don’t find out if it worked till I come back and boot up.
  5. Some packages give information screens and ask the user to input a choice or acknowledge some information. They can mean it does not complete the task and so does not shut down.

The apt-get man page says:

-y, --yes, --assume-yes
           Automatic yes to prompts; assume "yes" as answer to all prompts and run
           non-interactively. If an undesirable situation, such as changing a held
           package, trying to install a unauthenticated package or removing an
           essential package occurs then apt-get will abort. Configuration Item:
           APT::Get::Assume-Yes.

So that should be borne in mind too.

Still, I use it anyway.

 

Lazy.

Guidelines Derived from Watching the Australian Cricket Team get Pummelled in Tasmania by South Africa in 2016

Should have put this out earlier; it’s already dated. On the other hand, I think some of it has turned out more or less correct. Some.


Based on listening closely to what has been coming out of the Australian ‘camp’ during their recent run of failures, I have arrived at four rules for selecting and running an Australian cricket team.

Rule 1: Choose players who at least look like they care. It’s not enough to pull a sad face or look angry when something goes wrong. Maybe if they pretend hard enough it will become true!

Rule 2: Forget supposed talent and look at results. Talent is as talent does not as it looks like it ought to be capable of. Australian selectors have a history of being seduced by players who look the part but perform marginally, and not playing those who are ‘unfashionable’ despite being better performing. How did Mark Waugh get to play over 100 tests?

Rule 3: ‘Stick with my natural game’ is code for ‘I don’t want to have to think very hard’ or possibly ‘I don’t really give a shit’. They are professionals who need to adapt to the conditions and match situation. If they cannot do that they are not good enough to be out there. Judge players on how they perform when things are tough, not when they are easy.

Rule 4: Any system with Greg Chappell (currently Cricket Australia’s National Talent Manager, whatever that means) involved fails. (This is not so much based on recent results as on watching the trail of destruction Chappell leaves whenever he is tasked with ‘managing’ anything. The words ‘piss-up’ and ‘brewery’ come to mind.)

 

Cricket, what’s that, an insect?