Categories
Rant Tech

Word processors are for wieners

In my editing work, far too often I come across papers that have headings numbered like {1, 2, 3, 4, 4, 6} or {1, 2, 3, 5, 6}, etc. Likewise, tables and figures are misnumbered and references are not in alphabetical order. Now I claim that no one is writing their papers on typewriters anymore, nor are they writing them out longhand. Nearly 100% of authors today are using computers.

Now think about that word “computer” for a moment. What does it mean? In its simplified meaning, “to compute” means to count. So why do people manually assign numbers to the headings in their documents, only to get it wrong in the end. The computer’s purpose is to count and enumerate these things for you. And the computer won’t get it wrong, even when you move entire sections or chapters around in your document.

The basic problem is that if you are using a word processor to write letters, memos, papers, reports, or even books—namely structured documents—you are using the wrong tool for the job. The proper tool to use is a text processor. Personally, I recommend LaTeX, but there are many other choices out there.

The main point is that writing using a text processor, as opposed to a word processor, allows you to separate content from style. You, as an author, should focus on deciding how to structure your document (the major and minor headings) and what text to put in your document, and not on deciding how the document should look. You should decide the latter after the document is written, and let the computer handle the work of enumerating and managing headings. The longer and more complex a document is, the more important this becomes. Word processors do an absolutely horrid job of maintaining consistency across a document. Text processors, on the other hand, do this trivially.

Free yourself from the madness of the word processor today! Just follow the two links above to get started, and have your computer work for you, not against you.

Categories
FreeBSD

DenyHosts on FreeBSD

On a tip from the news site RootPrompt, I discovered a small security utility called DenyHosts which is for Linux systems to help thwart ssh server attacks. It examines the sshd logs and looks for multiple failed login attempts. It then collects the IP addresses of the offending hosts and writes them out to /etc/hosts.deny so that these hosts will be blocked from further access to the machine.

Since the server in question is running FreeBSD, which uses a combined allow/deny syntax in hosts.allow and doesn’t use hosts.deny, I had to modify the DenyHosts script script slightly to get it to work in the FreeBSD context. Basically, I configured DenyHosts to write to a dummy hosts.deny file and then wrapped it in a cron(8) script to concatenate this dummy file with a hosts.allow.template file. Thus hosts.allow is dynamically generated with the dynamic deny rules first and the static allow rules last.

It seems to be working so far. 🙂

Update from the comments: FreeBSD is now supported in the latest version of DenyHosts.

Categories
WordPress

WordPress hacking

I’ve been using a default WordPress installation to run this blog for a few months now. But there have been a few things that I didn’t like about how it works, and so I jumped into the php code to see if I could make some changes. My biggest gripe was that on the monthly archive pages, each entry is truncated to the first 100 characters, whereas I would prefer to see the entire entry displayed. So I replaced the code < ?php the_excerpt() ?> in archive.php with the code < ?php the_content('Read the rest of this entry &raquo;'); ?> that I found in index.php. I was just guessing at what these two functions actually do, but I guessed right and got rid of the annoying truncation.

I installed a spelling-checker plugin so that I can check my spelling before I post an entry. (Before this, I actually performed a forensic spell check via lynx -dump -nolist https://madphilosopher.ca/ | ispell and found some old spelling errors, but I haven’t gone back and fixed all of the back entries yet.)

I changed the permanent link scheme so that links to old entries look like this: https://madphilosopher.ca/2005/03/the-wedding/. This makes it obvious what the link is about before the user clicks on it. And when examining my web server logs, I’ll be able to tell what posts are what by examining the URL. Before the change, I used this scheme: https://madphilosopher.ca/archives/107/, which is not nearly as user-friendly.

I also learned that the default linking scheme index.php?p=107 can be used within a blog post to refer to another blog post, so that these references won’t break even when I change the permanent link scheme.

So, the mechanics and structure of this blog are slowly becoming my creation. I made some major changes today, and I learned a lot about WordPress. It feels great!

Categories
WordPress

Technorati and me

This is cool. I just learned that the categories of my blog posts are picked up by the Technorati search engine and used as tags. So, my Antiwar blog posts show up in a Technorati “search” for Antiwar, for example, according to this URI: http://www.technorati.com/tag/antiwar. Awesome. Check these out:

To see how this works, read the original article by Tom Raftery, entitled “WordPress Categories, Technorati Tags and Search Engine Optimisation”.

Categories
Audio Copyright Tech

An iPod plugin for Winamp

The iPod is pretty cool because it is so well designed, but it has some disadvantages. The prominent disadvantage is that it is completely tied to Apple’s iTunes software, and iTunes doesn’t work with older versions of Windows, such as Win98. According to this Wired article entitled “IPod Plug-In Sets Music Free”, iTunes is a 40-MB download, but Winamp is only 4 MB and the plugin only takes up 130 kB of space. So you can manage the iPod with an older version of Windows using Winamp. That’s cool. And furthermore, the plugin allows you to copy music from the iPod back onto a computer, a functionality that is missing (on purpose) from the iTunes software. The ml_iPod plugin has the following motto: “Your iPod just became useful.” Great!

Categories
Linux

Computers compared

On Linux, you can look at the file /proc/cpuinfo to find out information about your computer’s CPU. Here’s the info on my two machines.

“CARL”, my desktop at work:

processor       : 0
vendor_id       : GenuineIntel
cpu family      : 15
model           : 0
model name      : Intel(R) Pentium(R) 4 CPU 1500MHz
stepping        : 10
cpu MHz         : 1500.395
cache size      : 256 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 2
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pat pse36 
     clflush dts acpi mmx fxsr sse sse2 ss ht tm
bogomips        : 2965.50

“BEAKER”, my desktop at home:

processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 6
model           : 6
model name      : AMD Athlon(TM) XP2000+
stepping        : 2
cpu MHz         : 1261.442
cache size      : 256 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pat pse36 
     mmx fxsr sse pni syscall mmxext 3dnowext 3dnow
bogomips        : 2498.56

According to the bogomips value, which is a hand-waving sort of index of cpu speed, my machine at work should be faster. Now CARL has 384 MB of RAM and its video card only 32 MB, but BEAKER has 512 MB of RAM and 64 MB of video RAM, so BEAKER has a much quicker user interface. Note that both of these machines have motherboards and CPUs that are three years old. But they still run great for what I do with them.

What bogomips values do your computers have?

Categories
China Tech

Gmail Tip

When logging in to Gmail, if you request the login page by specifying https explicitly in the address bar, as:

https://gmail.google.com/gmail

then your entire Gmail session will be encrypted, not just the password authentication handshake. Cool, eh?

Update: This tip will also help solve any problems with connecting to Gmail from China.

Categories
Astro Audio China General Tech

Cool Websites – Random Links

Here’s a list of some cool websites I’ve come across lately:

  • ctrip. com — A very comprehensive site on booking hotels and tickets for travelling in China. I’m using this for my upcoming Shanghai trip.
  • slooh.com — A subscription-based online telescope. For $50 US a year, you can have unlimited access to their group missions, plus 15 minutes of solo time, where you get to direct the telescope to your object of choice. Cool!
  • Article: How to get the best sound out of your PC — A technical prescription on how to optimize your Windows audio chain. For audio geeks only.
  • madphilosopher del.icio.us bookmarks — An online bookmark storage and sharing service. This link is my account, but you can get one too. The cool thing about shared bookmarks is that you can see how many other people around the world are bookmarking the same sites. And since it’s online, I can access my bookmarks from any machine. Check it out!
Categories
Astro WordPress

Four more days to go

I just read an interesting Wired article about how Blogger has been experiencing tonnes of glitches and outages lately, really diminishing the blogging experience for its users. I just had to smile, knowing that Mercury is just shaking things up for us again. You see, Mercury is retrograde right now, and Mercury is all about communication, thinking, and technology. So when that planet’s motion reverses in the sky, miscommunications happen, and the communication channels that we rely on—especially technological ones—tend to break. This doesn’t happen because Mercury is somehow punishing us, but it is intended to remind us from time to time how reliant we are on our technology. It is good for the soul to be “off the grid” for a while.

I have talked to numerous people in the last few weeks about miscommunications that have happened to them, and I relate them all back to this. I was tipped off to Mercury’s action when my webserver went completely off the wall. This forced me to find a new hosting solution, and alas, to move away from Blogger. As a result, I discovered a new technology called WordPress that I am quite happy with. It’s really a joy to manage and create blog entries under WordPress, and it’s responsive and reliable. Much more so than Blogger.

As for Mercury, we have about four more days to go before the planet goes direct again. Take the time to reflect on the gift of communication, in its many forms from natural speech and body language, to the technologically-enhanced forms we use today. And call your Mother!

Categories
Speech Tech

See, If You Can Hear This.

I heard an awesome documentary on CBC’s Quirks and Quarks entitled “See, If You Can Hear This.” about a technology called “The Voice” that allows blind people to see with their ears. The Voice consists of a digital camera and a pair of headphones and the computer in between that translates the visual image into an audio “image”. It is up to the person’s brain to process the audio information as a visual image, much like is done with light patterns collected by one’s (working) eyes. Basically, researchers know that we form images in our brain, not in our eyes. The eyes are just used to collect the light. Sound and touch and our memories are then combined with the light information from our eyes to form a visual image. Using the Voice, the blind are able to take advantage of the same process. The image they can form is not the same or as good as with the eyes (the frame rate of the Voice is 1 frame per second), but a visual image is definitely formed in the mind. The blind woman featured in the documentary tells the story of when she first saw the mountains over the desert using the Voice. Incredible!

The entire documentary is featured in a downloadable mp3, so go have a listen.