Physics in Focus — a new text for Year 11 science

I am now a textbook author! Well, one chapter out of fourteen… it’s a team effort. It’s a new Year 11 physics book for New South Wales, launched now for use in 2018; I have a couple of chapters in the Year 12 book, due out for 2019.

This book is Physics in Focus from Cengage. Here is the link to it:

https://cengage.com.au/product/division/secondary/title/physics-in-focus-year-11-student-book-with-4/isbn/9780170409063

And sample chapter (pdf).

And here is the cover.

The cover of <I>Physics in Focus</I> for year 11 students. My first textbook!

The cover of Physics in Focus for year 11 students. My first textbook!

There’s a big difference between knowing the physics and writing about it. One of the main things that I had to get used to was the constraints imposed by the curriculum. It is set at a high level and we work against specific dot points, which reduces scope for initiative but provides certainty and structure, and makes sure the book meets the needs to the teachers who are tasked with delivering that curriculum. The other thing was thinking about the language — it has to suit the audience. The kinds of sentences found in a scientific paper just don’t meet the criteria for clarity, simplicity and reading ease.

I’m waiting for my author’s copy to arrive in the post. Maybe I should get together a shelf of stuff instead of putting it in the cardboard box with my handful of other publications.

Maybe.

Advertisements

Modulated molecular crystal structures — well done, Eric!

A new scientific paper. A tribute to the residual momentum of my scientific career, and in particular to Eric Chan, who has built on my work to come up with a way of exploring modulated molecular crystals. https://doi.org/10.1107/S1600576717015023

It’s pretty subtle stuff, but basically a crystal structure can show a periodic variation from cell to cell — for example, a displacement or substitution of an atom or molecule. If this variation is periodic, then it can be described using a periodic function. Such a function will have a Fourier transform that requires (relatively) few Fourier terms, and each strong term will give rise to a bright spot in the diffraction pattern. These spots will occur in a motif centred on (some) Bragg peaks, potentially adding many new spots to the diffraction pattern.

So where these bright spots occur tells you about the modulation. However, in something like molecular crystal, the molecular structure factor may be relatively complicated, and so may the nature of the modulation. This may mean that it is not easy to predict where the modulation spots are likely to be intense.

Eric figured out a way to use my program ZMC to generate modulated molecular structures and then calculate their diffraction patterns.

An example of a diffraction pattern calculated using <tt>ZMC</tt> with Eric Chan's modulation wave addon.

An example of a diffraction pattern calculated using ZMC with Eric Chan’s modulation wave addon.

It is pretty heavy and specific stuff, but it also is a capability that I’ve not seen elsewhere. Eric’s webpage is at https://sites.google.com/site/echanj/, and that is the best place to go to have a look for the code.

Other ZMC.

Dodgy: Cambridge Scholars Publishing

So I got this email:

Subject: Materials Science Books
From: Helen Edwards

Dear Dr. Goossens,

Firstly, please excuse this unsolicited email. I’m sure that like me you receive too many as it is and so I’ll keep it brief.
I was recently appointed as Commissioning Editor for Cambridge Scholars Publishing with a brief to expand the subject areas in which we publish books. As such I am in the process of developing a collection of books based in the field of Materials Science. As I believe you already have some experience of academic and scientific writing, I wondered whether you would consider us as your publisher should you decide to put ‘pen to paper’ and write a book at some point in the future?
We are also developing Editorial Advisory Groups to help ensure that we only publish high quality texts. If this is something that you would like to become involved in, please do let me know.
As I promised, I have kept this message short, but would be delighted to talk or correspond more if you feel you would like to explore possibilities.
Kind regards,

Helen Edwards
Commissioning Assistant

Web: http://www.cambridgescholars.com
Email: helen.edwards@cambridgescholars.com
Social Media: Twitter Facebook LinkedIn Blog

If you experience any difficulty reading this message, please send us an email to admin@cambridgescholars.com.

Cambridge Scholars Publishing Ltd is registered in England. Reg. No: 4333775; VAT No: 108280727

Disclaimer: The views and opinions expressed in this message do not necessarily represent those of Cambridge Scholars Publishing Ltd. The contents of this message are intended for the addressee only. They are confidential and may contain private information. Cambridge Scholars Publishing is not responsible for any damages resulting from the unauthorised use, forwarding or disclosure of this message, and will not be held liable for damages or loss caused by any viruses.

About Cambridge Scholars Publishing (www.cambridgescholars.com):

Cambridge Scholars Publishing (CSP) is an independent academic publisher, founded in 2001 by former lecturers and researchers from the University of Cambridge who felt existing publishing companies took too long to publish academic books, monographs, conference proceedings and textbooks.
CSP has its own printing facility, now publishes 750+ titles each year in both electronic and print formats and is committed to providing a forward-thinking publishing service that champions original thinking, whilst ensuring we put our authors at the heart of everything we do. Our back list catalogue contains approximately 7,500 titles.

So I google it ‘cos it looks dodgy and I find this: https://flakyj.blogspot.com.au/2017/09/cambridge-scholars-publishing.html. So chances are it is dodgy. The ‘I’m sure you’re busy’ start is a nice touch.

Now, they’re probably not as dodgy as many on this list; comments on the web are various. Overall impression is that they are not predatory — they do not seem to ask for money up front — but also not terribly highly regarded. So more of a ‘weak’ publication than an actively bad one. But they did solicit work from me using a generic email that looks like it was sent by a robot, albeit a polite one.

Pfft.

Unicode search and replace in Word — decimal and hex

I’ve got a document where the superscripts have been put in using actual superscripted numbers from elsewhere in the Unicode character set, not as Word superscripts. For example, if I highlight one of the characters and hit ‘Alt-x’, I don’t get what I might expect.

Unicode value for ‘6’ is 0036. Whereas highlighting 6 and hitting ‘Alt-x’ gives 2076. 2076 is the hex Unicode value for a raised, little 6. There are special characters for all the digits (and some or maybe all letters, too).

The full set is:

Digit Expected (hex) Expected (dec) Actual code Actual (dec)
0 30 48 2070 8304
1 31 49 00B9 185
2 32 50 00B2 178
3 33 51 00B3 179
4 34 52 2074 8308
5 35 53 2075 8309
6 36 54 2076 8310
7 37 55 2077 8311
8 38 56 2078 8312
9 39 57 2079 8313

Older fonts used to have special characters for superscript 1, 2 and 3 for doing powers and a few footnotes and things on screens that were not WYSIWYG and could not actually raise the character (think a VT100 or similar). At some point the rest of the character set was included,  hence the non-contiguous numbering. It’s rather like how real metal typefaces would have to have separately designed superscript characters. And from a design point of view, a number designed to be used in superscript may well look better than a ‘normal’ character raised and shrunk. So I’m not complaining about the existence of the numbers, but I am combing through a document checking to see if the footnotes and references are contiguously numbered, and I can’t search for the cross references/citations, so it’s making the job tedious and error-prone.

It’s relatively easy to get Word to search for a Unicode character. Except these codes are clearly not decimal (00B9, say). Alt-x provides the code in hex (or inserts the character after typing its hex code), but Word searches for it using a decimal Unicode value. Well done Microsoft! The decimal Unicode (and ASCII) value for ‘6’ is 54. If I highlight ‘6’ in a Word doc and press Alt-x to find the code for it I get 0036, but I have to use ^u0054 to search for ‘6’. How stupid is that? (This search works with or without using wildcards.) That is why my table above has decimal values as well (I used HEX2DEC() in Excel).

So now I’m going to search for, say, ^u8313 and replace with superscripted 9. Perhaps this could be more automated, but there are just the 10 possible digits, so it’s easy enough to do 10 replacements.

Windows search and replace dialogue, searching for Unicode decimal code and replacing with formatted text.

Press Ctrl-H to bring up this dialogue.

To use a Unicode code in the ‘Replace with’ box, the simplest thing is to enter the character into the document (or a scratch space), then copy it from the doc into the ‘Replace with’ window; the ^u notation will not work in the replace window. An ungenerous soul would say search and replace in Word is broken by design. I’d never say such a thing. Although see here. Things like this can be automated using Word macros, but that seems like a pretty heavy tool for what should be a routine task. The process would be much simplified and hit the 80:20 rule if the behaviour of Alt-x and search were harmonised, and if the ^u notation could be used in the ‘Replace with’ box.

 

Just my 2¢

Flash on Firefox on Debian — one way to update it

This is just what I did. It could be simpler but it’s what I did. It worked.

Firefox is always telling me my Flash installation is outdated and a security risk. I’d rather just not use it, but the computer needs to work with Flash-enabled education-related websites, I have no choice in the matter if important things are going to get done.

So I clicked through the links and ended up on Adobe’s Flash page. I clicked through asking for the .deb file, but apparently this needs some kind of handler for apt-get type installation through the browser which is specific to Ubuntu, a Debian derivative, and I use actual Debian, so no good.

Another time, I selected ‘APT for Debian/Ubuntu’ and got the error message:

“The address wasn’t understood”, and the browser went to

apt:adobe-flashplugin?channel=$distro-partner

So I googled a bit. Unenlightened. Something called pepper exists, but only for Chrome, or maybe there’s a wrapper so it’ll work on Firefox but maybe the wrapper is flaky and… I dunno.

Instead, went to https://get.adobe.com/flashplayer or whatever and downloaded the rpm not the deb (as noted, the apt/deb file is for Ubuntu and would not download — Firefox did not recognise the protocol).

rpm is at:

https://get.adobe.com/flashplayer/download/?installer=FP_27.0_for_Linux_32-bit_(.rpm)_-_NPAPI&sType=7757&standalone=1

Then used alien to make a deb package; it makes no promises but converts between rpm and deb, and Slackware tgz.

sudo apt-get install alien

Went to where the rpm was downloaded and typed:

alien --to-deb --scripts flash-player-npapi-27.0.0.187-release.i386.rpm

Output:

flash-plugin_27.0.0.187-1_i386.deb generated

OK. install the deb file:

$ sudo dpkg -i flash-plugin_27.0.0.187-1_i386.deb
(Reading database ... 228404 files and directories currently installed.)
Preparing to unpack flash-plugin_27.0.0.187-1_i386.deb ...
Unpacking flash-plugin (27.0.0.187-1) over (26.0.0.131-1) ...
Setting up flash-plugin (27.0.0.187-1) ...
Processing triggers for gnome-menus (3.13.3-9) ...
Processing triggers for desktop-file-utils (0.23-1) ...
Processing triggers for mime-support (3.60) ...
Processing triggers for hicolor-icon-theme (0.15-1) ...

Looked very promising, but the plugin did not show up in firefox when I fired it up and went to the address:

about:plugins

I guessed I might have to manually tell firefox where the new library lives. Where was it installed to? Can look at the file tree in the .deb file:

dpkg-deb -c flash-plugin_27.0.0.187-1_i386.deb

Ah-ha. It’s in

usr/lib/flash-plugin/libflashplayer.so

So fired up firefox again and…tried to use the Add-ons menu to manually add the file.

about:addons then click the gearwheel and ‘Install Add-on from file’

Navigated to where the so file was, but was not recognised as an Add-on.

Firefox told me it was corrupt.

OK. In my ignorance and the knowledge that I am documenting what I do so it can always be undone, this led me to look at the about:plugins firefox screen, which told it was getting the .so file from:

Path: /usr/lib/mozilla/plugins/libflashplayer.so

Also took a look at usr/share/doc/flash-plugin-26.0.0.131/readme.txt

So after closing down firefox and backing up the older version of libflashplayer.so, I just copied the one from usr/lib/flash-plugin/ to /usr/lib/mozilla/plugins

$ sudo cp /usr/lib/flash-plugin/libflashplayer.so /usr/lib/mozilla/plugins/

On firing up firefox and going to about:plugins, I got this:

Shockwave Flash

    File: libflashplayer.so
    Path: /usr/lib/mozilla/plugins/libflashplayer.so
    Version: 27.0.0.187
    State: Enabled
    Shockwave Flash 27.0 r0

Which is indeed the version number of the current Flash, and lo and behold firefox stopped telling me I need to update Flash and Flash-enabled pages are working.

Long story short, I suspect I could have just exploded the rpm, fond the .so file and stuffed it into the correct directory, rather than messed around with alien. But things are working and that’ll do until next time the plugin is deemed outdated and firefox starts complaining again. I already had any config files from the automagically installed previous version(s), too. If it was a clean install, just copying the .so to the mozilla/plugins/ directory would probably not work — there’s other stuff in /usr. Maybe it’s put in the correct place by the dpkg install of the alien-made package, but I do not really know.

But it works.

Olympia SG3 — the behemoth has landed

Some text, typed using an Olympia SG3 typewriter.

The text as typed in using the Olympia SG3.

Olympia SG3. Wide carriage — can hold paper 16″ wide.

Paper injector (adjustable). Multiple tabs. Shading key.

I really like the font. The ‘k’ is a bit sticky, so I think kt needs a clean — I tried to type ‘it’ but the ‘k’ was still up and the ‘i’ knocked it into the ribbon.

It has a d o u b l e   s p a c i n g setting, but the paper stand is missing. It weighs a tonne (or a ton) and looks rather well used. The bell is nice and clear.

The double spacing key.

As I said, I really rather like the font. It’s quite strongly modulated for a typewriter face, but compact as well — it reminds me a lot of the VGA font on IBM computers.

This is one hell of a typing machine. I better give it a good clean, and then set it up somewhere I can use it regularly.

And the font seems to work really well with the script I wrote to do OCR using Tesseract.

Pictures:

On the little desk it does not leave a lot of room.

 

The paper injector lever on the SG3.

Inject that paper!

 

SG3 wihout the cover on.

Coverless.

 

Based on the serial number, I think it’s from about 1963 or 64. Made in Germany. I only got it because it was $20 (and that’s in our paltry Australian dollars) and I don’t have a full-on desk typewriter — all the others are portables. And it has the wide carriage, so it can do the jobs the portables can’t. And it has the paper injector lever which is like the typewriter version of a great big blade switch that brings Frankenstein’s monster to life. Which means I’ll never need to buy another one! Especially since I got that Smith Corona Clipper for $14… oh, haven’t I mentioned that?

 

OCR!

Monitor

The battle between the Monitor and the Virginia appears with monotonous regularity in books about ships, particularly fighting ships. It was the first battle between iron ships, the first involving a ship with a turret, the first involving ships that did not rely on sail, nor even have masts as backup to the engines.

Cover of <i>Monitor</i>, the book about the boat.

Cover of Monitor, the book about the boat.

One thing this book brings home is how small it was. No great fleet action like Jutland or Lepanto or Trafalgar — it was really just a skirmish, though one with great repercussions.

deKay does a nice job of bringing these repercussions to light. They were strategic, technological and even geopolitical.

Strategic: The Confederate states needed access to weapons and materiel from Europe, and the Virginia‘s job was to break the blockade set up by the North. Hampton Roads was a vital nexus for bringing cargo from the Atlantic to inland waterways, and it was here that Virginia sallied out and caused pandemonium amongst the wooden ships. Though she was slow and hard to control, she was also impervious to their shots and could stand off and pound the Union ships into pieces. Had the Monitor not been flanged together in about 3 months and thrown into battle against the _Virginia_ almost as soon as completed, the civil was could have looked very different. Had the Confederates gained mastery of the east coast the marked superiority of the North in terms of industrial capacity would have been at least partially mitigated by better access to imports. Further, it is supposed that had the South been able to maintain this kind of sovereignty over its borders, which would promote interchange with Europe, it might have been granted diplomatic recognition by more potential trading partners. So the book pitches the one-on-one battle as a kind of ‘for want of a nail’ situation. Of course, it’s natural for an author to point out the significance of their topic — they’ve bothered to write about it after all — but there is some substance to this. Had the South been closer in stature to the North, the likelihood of a genuine fissioning of the USA would have to have been greater. We shall never know. Most likely, the war would have gone on even longer, caused even more suffering, and had the same outcome.

Technological: At a stroke, Monitor ushered in a new age in warship design. Though it low freeboard and raft-like construction limited it to coastal waters, it’s general concept — an iron hulled ship, powered by steam, dispensing with sail altogether and armed with turreted guns — was to dominate naval thinking until the rise of the aircraft carrier during WWII. Previous ironclads had looked like modified sailing ships, still arranging their guns in broadsides and still carrying a full complement of sails. Monitor must have looked like something from another world. Just as the Dreadnought reset the benchmarks in 1905, the Monitor forced a reappraisal of what made for a power navy. What value was a hundred ships of the line if a handful of ironclads could pick them off at leisure? So influential was the design of the Monitor that it leant it’s name to a style of ship. Shipyards around the world started building ‘monitors’, and would continue to turn them out for fifty years to come.

Geopolitical: It could be argued that the Monitor is the first significant example of the USA gaining technical, military leadership over Europe. It can be thought of as the very beginning of the process that led the USA to gain military and technological leadership during the 20th century. Ericsson, the man behind the Monitor, was a migrant who had been unable to sell his design in Europe. The strength of the US coming from its inclusiveness is a very modern idea, and the Monitor is an early and potent example.

Anyway, the book follows the politics and the military sides of the story. How the ship got built, how the battles were fought, and what it all meant. I would have liked more technical details — we do not even get a table summarising the capacities of the two combatants. Some more diagrams, perhaps cutaway, and clearer illustrations of how the two ships were laid out and so on, would have buttressed the work nicely and made it more rounded in its coverage. As it is, it is a nice little read.

 

Monitor.

Quite a big deal

The Age of Napoleon by Alistair Horne.

This book does a very readable job of looking at the influence of Napoleon. The famous battles — Austerlitz, Trafalgar, Wagram and all — are mentioned but not discussed in detail. They provide context, they chart the rise and fall of his empire, but they are not the focus of the book. In many ways Bonaparte reminds more of Alexander the Great than other modern conquerors. His time in charge was brief, he founded no long-lasting, united empire. Yet his influence was enormous and did persist. His was an epoch when the work of centuries seemed to happen in years. Much of what the revolution started was finished (or at least advanced far enough to make turning back impossible) by the dictator. From the metric system to reorganisation of schools and the redesigning of Paris itself.

Paris. In many ways this is a book of two stars. Paris and Napoleon, for in this book France and Paris are synonymous. We get the occasional sentence pointing out how desperate things were in the provinces, but we never visit there. That is the only real weakness of the book (aside from some odd editing — there is considerable repetition that might have been excised). Yes, it takes us away from the political histories that focus on battles and borders and the struggle for leadership, but only as far as the salons and streets of Paris. How did Paris react to the rise and fall of Bonaparte? What monuments did he build there? How were the Prussians and the English received after the fall(s)? It’s all here — if it happened in Paris.

The book does cover the age of Napoleon in Paris. His influence on the rest of the continent is alluded to (he is credited with releasing the ‘genie of German nationalism’, thus triggering the events of the next 130 years, events that would end in another conquering dictator whose efforts ended in ignominy). Hitler is explicitly compared with Napoleon, and reasonably enough comes off poorly, since Napoleon does not seem to have engaged in genocide, slavery or rampant anti-Semitism. He did run a police state, though, and was rather keen on monumental architecture.

The book is a quick, easy read. It does a nice job of outlining the times and the man’s role in them.

Solid.

Simple use of Word regular expressions — remove commas from numbers

Note to self:

Our house style says we should us nonbreaking spaces in numbers of five or more digits, not commas. That is, a number like 13,456 should be 13 456.

If I get a document with lots of commas in, this is what I do in Word:

Wildcard replace
(1) Turn off track changes (sad but true – long time bug Mico$oft have no interest in fixing).
(2) Search for numbers of the form XX,XXX. The regular expression for this is: ([0-9]{2}),([0-9]{3})
(3) Replace with first half nonbreaking space second half – that is \1^s\2
(4) Step through in case of accidental fits to the pattern.
(5) Turn track changes back on if appropriate.

Yes — cannot track changes while doing this.

So what’s going on? The component of the search that matches the first set of parentheses is stored in variable 1, the second in variable 2. These values are got at by prepending a backslash — it’s a bit like the $ sign in a bash shell, if that helps, or % on the Windows/DOS command line — it returns the value of the symbol. With ‘Use wildcards’ checked in the Find and Replace box then [0-9] finds any digit. [0-9]{2} finds exactly two digits in a row. The lot in parentheses makes sure the matching fields are stored in variable 1. Then I want to match a comma, but its not in parentheses so I’m not storing it. Then I want to match exactly three digits in a row and put that into variable 2.

The Find and Replace dialogue box in Word, showing the Use wildcards box has been checked to allow use of regular exppressions.

Ctrl-H brings up this dialogue box in Word. Not what’s checked.

OK. Now, I want to replace that with the value of variable 1 (\1) then a nonbreaking space (^s) then the value of variable 2 (\2). And that’s it.

Wordy mac wordface.

Business Name Renewal Scammers

What it says in the title.

They want $99 for a 1 year renewal, when the actual governing body (ASIC) have a perfectly usable website and change $35. They seem to be called Online Business Registration Pty Ltd, but the letter just says ‘Renew your Business Name’ in big letters. The first thing that made me suspicious was the off capitalisation of that request. The second one was the lack of any reference to ASIC in the letter or the URL/email. And I’ve got nothing against Altona, Altona Meadows or anything, but it just did not sound like the right address for a national body. I don’t know if this is illegal or just bad faith. They are effectively charging $64 for reminding you to renew the name and providing you with a website through which to do it (if indeed it does get renewed). Do they, by law, have to tell you they’re doing that? I dunno. I’m too ignorant. I do know I would not want to give my credit card information to people who are at the very least misleading.

Letter from scammers trying to charge excessive fees for renewing your business name.

Do not deal with these people!

 

Shame, shame, shame.