It's been two years since I was taken Ill. My memory's not what it was, and I sometimes struggle to express myself when speaking. I'm hoping to do better when writing. But I think this blog should be preserved as it is, so I've started a new one at https://paisleyharn.blogspot.com/.
Sunday, November 02, 2025
'Well, I'm back,' he said.
Thursday, June 07, 2012
Word heading numbering
Anyone who has used Microsoft Word for any length of time will know that the heading numbering is fundamentally broken; a fact that is unforgivable, given that WordPerfect 5.1 had it pretty much sorted in 1989.
One bug that I've frequently struggled with is where subsections look like this:
Appendix A Name of appendixA1 Sub-heading 1A1.1 A paragraph.A1.2 Another paragraph.A1.3 A third paragraph.A2 Sub-heading 2A1.4 Why?
Getting that third level heading to number correctly is nearly impossible. Ticking the "Restart list after:" tickbox in the "Define new Multilevel list" dialog doesn't work. Sometimes just typing "A2.1<Tab>Why<Enter>" provokes Word to try to be clever and format the heading as such; then it's an easy matter to update the appropriate Heading style to match the selection. Sometimes that doesn't work. Sometimes going back and defining all the relevant heading styles from scratch works.
Now I've found a new way. I noticed the "Click level to modify" list in the in the "Define new Multilevel list" dialog included A1 but not A2. That inspired the following.
- Format the paragraph in the same style as A2; it'll become A3.
- Demote the paragraph (possibly by using Tab, but you may need to go into Outline view to be sure).
- Now the numbering should include "A.2" and possibly a lot more if, like me, you're using low-level heading styles like H6ff. [Note to self: that's probably a bad idea.]
- Now you can edit the numbering in the "Define new Multilevel list" dialog.
It shouldn't be this difficult!
Thursday, November 17, 2011
Testing codecogs at Posterous and Blogger
<a href="http://www.codecogs.com/eqnedit.php?latex=y=\sum_{i=0}^{n}a_{i}x^{i}" target="_blank"><img src="http://latex.codecogs.com/gif.latex?y=\sum_{i=0}^{n}a_{i}x^{i}" title="y=\sum_{i=0}^{n}a_{i}x^{i}" /></a>
Thursday, November 03, 2011
Programming books 2
A while ago, I wrote about some of my favourite programming books. I was just reminded of a couple of books that deserved a special mention. I mentioned Stroustrup last time, but what I neglected to point out was the clever and witty epigraphs that appear at the head of each chapter. The only other book I've found to compare in that respect is Hal Fulton's The Ruby Way - sheer genius!
Wednesday, November 02, 2011
Recent gems
When I first bought Conrad Cork's the New Guide to Harmony with LEGO bricks, I was horrified to learn that I was expected to find literally hundreds of tracks. I had been dimly aware of Spotify, but it's great.
Yesterday, through a link in Hacker News I think, I discovered SciRuby. That is a project that could easily eat up all my spare time. I have oddly ambivalent views towards Python and Ruby. Like Ash in Alien, I admire Ruby's OO purity, whereas Python just works, in a DWIM kind of way - it's so good, it's boring!
Saturday, October 15, 2011
Dennis Ritchie
I missed Radio 4's Last Word yesterday, but I've just looked it up on iPlayer. I particularly wanted to hear what they had to say on Dennis Ritchie, who died on Wednesday. I was shocked to find no mention of him. The BBC certainly noted his death, and acknowledged his immense contribution to today's IT. So why did they have nothing to say in their primary obituary programme?
For those who don't know, Dennis Ritchie invented the C programming language. Much of Windows is written in C; some of it is written in C++, which is based on C. If you prefer Mac to Windows, Mac OS X is based on the Unix operating system, which was written in C. In fact, Dennis Ritchie wrote much of the original Unix; that's why he invented C.
The importance of C cannot be over-estimated. By the TIOBE Index, C is, at the time of writing, the second most popular programming language in the world. But its influence spreads far and wide. Look at family trees of computer languages; at the time of writing, of the top 10 languages in the TIOBE Index, all but Visual Basic owe some of their heritage to C.
In the early days of the Web, any pages that were generated dynamically would typically be written in C or Perl. Nowadays, much of that back-end code might be written in PHP, Ruby or Java. Some major Web companies, including Google, Yahoo! and Youtube, use Python. All of these languages have to be interpreted or compiled, that is translated to machine code, before the computer can run them. With the exception of Java, the interpreters for all of these languages are generally written in C. Several Java compilers exist, typically written in C++.
Ritchie's influence extends to smartphones. Apple's iOS iPhone operating system is based on BSD, a variant of Unix. Google's Android is based on Linux, which is a functional copy of Unix. iPhone apps are written in Objective-C and Android apps are written in Java, both languages based on C.
I've written before about my slightly odd habit of reading computer manuals. It started with Kernighan and Ritchie (Yes, Ritchie - him again!) It took me about a quarter of a century to find another computer manual that came close in terms of readability.
There has been much written in the past couple of weeks about Steve Jobs. He was an architect, not a builder. He could say what he wanted software to do, but he couldn't write it. His fame stems mainly from his being a charismatic salesman. The artisan programmers who made his vision a reality did so using tools made by Dennis Ritchie.
Monday, June 28, 2010
Visualisation tools - Part I, resonance
For several years now, I've had the notion of writing a discussion of the characteristics of various musical instruments, with a particular focus on the primary resonator (string, air column, whatever) and ignoring, at least in the first instance, the effect of the modes of vibration of other bits of the structure (because that's complicated).
I plan, as a starting point, to consider a string, pinned at both ends. This has an infinite number of potential modes and which ones are excited depends on the mode of excitation: a guitar string starts with a displacement function and zero velocity; a piano string starts with zero displacement and a velocity that I suspect can be fairly well approximated by a Dirac delta function; I don't know about a violin string.
I'll then go on to discuss wind instruments, particularly flute and saxophone (because I have them lying about the house), before dealing with the most difficult of all, the humble harmonica. That's difficult because, even using the simplest Euler-Bernoulli model, you have to deal with hyperbolic functions.
An optional extra module will serve as a prequel to all of this - explaining Fourier analysis and synthesis.
I've been wondering how best to do the graphics. The two obvious candidates are VPython and Easy Java Simulations (EJS) - there's a good comparison at the brilliant Dot Physics. I've been using Python a lot lately, especially with NumPy, SciPy and matplotlib, and with all those great libraries it gives you essentially a free MATLAB. On the other hand, the fact that Java can run on pretty much any machine (except the IPhone), means EJS wins hands-down for an online demo.
Subscribe to:
Comments (Atom)