tools

Dr. Marlene Winell speaks about indoctrination by authoritarian religion

Dr Winell speaks to Valeria Tarico. Winell's experiences and those of her clients were much more traumatic than mine, because their churches really did deserve the "fundamentalist" label, but it's still an interesting video on the psychology of leaving a religion. The part about how if something doesn't work for you it's your fault and you must try harder rang some bells. Via Debunking Christianity.
(tags: video religion valerie-tarico indoctrination hell rapture psychology fundamentalism christianity)

txt2re: headache relief for programmers :: regular expression generator

Generate regular expressions from some sample text by clicking on what you want to match. Neat toy.
(tags: programming software tools regexp regex)

‘An Apology’ by Richard Dawkins – RichardDawkins.net

Dawkins apologises for the forum drama: "I would like to start by apologising for our handling of this situation. We have not communicated well with our forum volunteers and users (for example in my insensitive 'Outrage' post, which was written in the heat of the moment). In the process we have caused unintended hurt and offence, and I am very sorry about that. In a classic case of a vicious circle, some of the responses to our announcement also caused considerable hurt and distress to us, and in the atmosphere of heightened emotion that followed, some of our subsequent actions went too far. I hope you will understand the human impulses that led to this, and accept my apology for them. I take full personal responsibility."
(tags: drama internet dawkins richard-dawkins atheism)

Fallacies on fallacies : Evolving Thoughts

"Appeal to authority is not fallacious, so long as the authority cited is relevant and reliable. A principle known as the division of cognitive labor (I think due to Hilary Putnam) suggests that we literally must rely on authorities in the absence of time, resources and cognitive capacities to rerun all experiments and observations since the beginnings of science and history."
(tags: logic fallacy appeal authority putnam philosophy rationality)

Furious backlash from Simon Singh libel case puts chiropractors on ropes | Martin Robbins | Science | guardian.co.uk

"A staggering one in four chiropractors in Britain are now under investigation for allegedly making misleading claims in advertisements, according to figures from the General Chiropractic Council." Couldn't happen to a nicer bunch.
(tags: science simon-singh chiropractor guardian health pseudoscience quackery woo-woo libel legal law)

Photographic Height/Weight Chart

Self-submitted photographs of people, tabulated by weight and height. Interesting stuff. Via Metafilter.
(tags: health photos photography images height weight statistics photo biology)

Parchment and Pen » DO WE NEED TO TELL PEOPLE THE BAD NEWS BEFORE THE GOOD NEWS?

Paul Copan has some sensible thoughts on how to do evangelism. On no account should Christians put any of them into practice.
(tags: evangelism religion christianity sin gospel)

Heresy Corner: A Reading from the Book of Dawk

This is hilarious: "And some of the disciples said, O Dawk, our anger is not mixed against thee, but against thy servant Josh, who hath offended us. But others said, Hath not the Dawk deserted us? Come, let us depart the land of Dawk and hearken unto some other prophet, for the Dawk loveth not his people."
(tags: richard-dawkins drama internet forum atheism funny parody dawkins)

A Few Billion Lines of Code Later: Using Static Analysis to Find Bugs in the Real World | February 2010 | Communications of the ACM

Bunch of academics write a static checker and take it commercial. They are surprised to find that: Compilers for embedded targets accept stuff which isn't quite C, embedded programmers use the stuff, because we're evil. A worryingly large proportion of programmers are clueless ("No, ANSI lets you write 1 past the end of the array"), concluding that "You cannot often argue with people who are sufficiently confused about technical matters; they think you are the one who doesn't get it. They also tend to get emotional. Arguing reliably kills sales." Also, managers like graphs of bad stuff to go down over time, so don't like the tool to improve. Fun article. Via Metafilter.
(tags: programming analysis security software coverity development tools C)

A review of ‘The language of God’ (Francis Collins)

Gert Korthof likes Collins's stuff on evolution, but thinks the Moral Law argument (which Collins acknowledges he got from C.S. Lewis) is terrible: "Collins fails to demonstrate

a. the failure of Darwinism to explain the Moral Law (true altruism)
b. the divine origin of the Moral Law
c. b follows from a "
(tags: creation evolution morality religion science francis-collins c.s.-lewis altruism)

“I WANT TO TAKE GOOGLES OFF OF MY HOME PAGE” | MetaFilter

What happens when your blog becomes one of the top Google results for "login to Facebook". Take it either as a serious lesson about user interface design, or an opportunity to mock the stupid.
(tags: facebook login funny internet computers ui user-interface browser google)

Meat stylus for the iPhone

I got yer meat stylus right here, baby.
(tags: iphone culture funny meat)

Simon Blackburn (2) – Religion and Respect – Investigating Atheism

Blackburn's interesting and slightly cheeky ("Even Christians are human") article on what it might mean to respect someone's religion. He thinks there might be something in respecting emotions but not attitudes, and bemoans religious appropriation of the sacred. Contains quote from Hume which is another example of the way Hume seems to have had everyone's ideas before they did (this time on belief in belief).
(tags: religion respect simon-blackburn philosophy hume)

Why reject miracles? (Irrational Rationalist)

An attempt at formulating the argument in a way which doesn't beg the question, and some talk about what Hume actually meant.
(tags: hume miracles philosophy religion rationality)

Is there anything wrong with “God of the gaps” reasoning? by Robert Larmer

Larmer argues that both theists and atheists shouldn't be so hard on "God of the Gaps" explanations (the phrase originated as a criticism of Christians by Christians). While it's certainly true that it's not a formal fallacy, I think what makes me uneasy about such explanations is the ease with which "the thing which explains X" is identified with "the Christian God" (say). But I'll have to think about it some more.
(tags: theology philosophy naturalism science religion god gaps larmer robert-larmer)

I’ve updated the LJ New Comments script so that it’s a lot faster at marking comments as new. While following the recent shitstorms in news, in which hundreds of angry LJ users are laying into the management, Firefox would seize up for a while and eventually warn me that the script was refusing to let go. Hopefully, the new version fixes that.

I’ve also changed the behaviour of the “NEW” link on new comments, so that clicking it now selects that comment. I think this makes more sense than taking you to the next new comment, as previous versions did, as I like to click to select the comment and then use the “n” and “p” keys to navigate.

Comments to the entry for the script, please.

I’ve just updated LJ New Comments, fixing a bug pointed out by legolas and adding some code to make it try harder to draw a box around the currently selected comment (turns out I’d had the latter sitting around in my CVS repository without letting the public benefit).

While we’re on the subject of Greasemonkey, InYOFaceBook is an amusing hack to show full size profile images when you mouse over a small one, even for people who’ve been boring enough to hide their full profile. Hurrah for Stalkerbook!

A couple of shiny new bits of software have come out in the last few weeks. Both of them are at version 7, for some reason.

Inform 7

Inform 7 is the latest version of Inform, the language for creating interactive fiction. The interesting thing about it is that Inform 7 programs are written in a subset of English:

The wood-slatted crate is in the Gazebo. The crate is a container. Instead of taking the crate, say “It’s far too heavy to lift.”

Inform is not capable of understanding arbitrary written English, but has a set of sentence forms it understands, and some inference rules built in (for example, if you tell it that “Mr Brown wears a hat”, it will infer that Mr Brown is a person).

scribb1e pointed out that this makes the work of writing the story similar to playing it. That could turn out to be a bad thing: most programming languages are so stylised and full of random punctuation symbols that programmers realise they’re not writing English and don’t try writing arbitrary English text in the hope of being understood by the computer. Even for people who understand Inform isn’t actually intelligent and that they have to write in Inform’s dialect to be understood, writing in something close to English will make it harder to remember to restrict their vocabulary. At worst, it could become a game of guess the verb, which would be painful (as opposed to a game of Guess The Verb, which I thought was fun, especially the Old Man River bit in the help).

However, unlike playing a game, looking at the excellent and witty online help doesn’t risk spoiling your fun. Since it’s all English, it’s easy to crib paragraphs of text from the examples and adapt them to your own works. Hopefully, writing the games in English will enable more people to create them without feeling that they have to be expert programmers. They’ll still have to think like a programmer, but won’t face the intimidating prospect of curly brackets.

Inform 7 itself isn’t just the compiler, it’s is a complete suite of tools for writing, testing and releasing interactive fiction, the IF equivalent of an Integrated Development Environment. It’s rather nice (although not yet available for anything other than Windows and Mac OS, because of the difficulty of getting the graphical stuff going on a variety of platforms).

Vim 7

I use the Vim editor, which is the old Unix vi with all the features you want from a modern programmer’s editor bolted on. New in Vim 7 there’s a spelling checker, “IntellisenseTM” style context-sensitive completion of names in code, and tabbed windows (no software is complete without tabbed windows these days).

The completion stuff is particularly useful, as it now pops up a menu of possible completions which you can select from with the cursor keys, and appears to be trying harder to find completions from nearby files in the background as you’re typing (I’ve not quite worked out what it’s doing yet, it’s reaching the stage where it’s just magic). Completion isn’t just for programmers, of course: when I’m typing an email, if I find myself using the same, long, word more than once, typing the initial letters and then letting Vim complete it is a boon.

Just uploaded another version of the LJ New Comments script. This one never displays negative numbers of new comments (“-3 new”) next to your friends’ entries. I also noticed that Firefox was getting fat and slow after much LJ browsing. Turns out that Firefox leaks memory like a sieve when you do the thing that the script does to let you click from one new comment to the next. This is Firefox’s fault, but luckily a way to get around this was discussed on the Greasemonkey mailing list recently. So I did that. All seems well so far. FF1.5 is so leaky that it’ll probably get fat for some other reason, but with the amount of LJ I read I’ve probably helped myself a bit.

It occurs to me that the same sort of tricks LJ New Comments uses to find comments could probably also be used to make a version of the LJ Thread Unfolder which worked with more than just the default comment style. I might do that if I get around to it.

The LJ New Comments script now copes better with the bewildering variety of journal styles that are out there. I also stopped it from giving up in disgust if a style allows it to see the comments but doesn’t provide a permanent link to each comment, as the “n” and “p” keys will still work in these styles (q.v. peacerose‘s journal, for example).

I’m now using scrollIntoView to move each new comment to the top as you click or press keys, so you don’t get a new history entry for each comment you visit (I was annoyed with having to hit the “Back” button multiple times to leave the entry). The docs for Greasemonkey allege that scrollIntoView doesn’t work within Greasemonkey unless you do special stuff, but I seem to be getting away with it. Possibly I’ve broken the script for people not using Firefox 1.5, but such people need to feel the white heat of technology, anyway.

Ph34r my sk1llz!

ETA: Except that I broke it again trying to make it handle all the extra ways of denoting comments. v0.4, now on the userscripts.org site, seems to be working.

I’ve finally got around to writing the Greasemonkey script which I’ve long been threatening.

What it does

The script remembers which comments you’ve seen on LJ (or Dreamwidth) and helps you navigate to new comments. That’s right, I’m finally dragging LiveJournal kicking and screaming into the 1980s.

If you’re on an entry page, pressing “n” skips you to the next new comment, and “p” skips to the previous one. If the style has an “Expand” link, moving to an unexpanded comment with these keys will also expand the thread. If the style has a permanent link or a reply link for each comment in that comment’s header or footer, the script inserts another link next to it, labelled “NEW”. That link shows you that the comment is new at a glance. Clicking the “NEW” link selects the comment so that pressing “n” will go to the next comment from there. On some styles, the currently selected comment will be outlined with a dotted line.

On a journal or friends page, the script will also add the number of new comments to the link text, so that, say, “15 comments” becomes “15 comments (10 new)”, and enable the “n” and “p” keys to move between entries which have new comments, and the “Enter” key to view the selected entry. This only works if you’re looking at a journal which adds “nc=N” to entry links to say there are N comments on an entry (LJ can do this as a trick to confuse your browser’s history function into thinking you’ve not visited that entry whenever there are new comments). If you want to turn this on for your journal then ensure you’re logged in, visit this page, check the box which says “Add &nc=xx to comment URLs” and hit the “Save” button.

How it works

You don’t need to understand this section to use the script. If you don’t care about programming, skip to the next part.

<lj-cut text=”Gory details”> LJ makes it a total pig to do this sort of thing: there’s so little uniformity in journal styles that getting a script like this to work for all of them is impossible. It’s fair enough that LJ allows people to customise their journal’s appearance, but there aren’t even standardised CSS class names for stuff. Not that I’m bitter. So, what the script does is look for anchor tags of the form <a name="tNNNN"> or elements with an id attribute of ljcmtNNNN or tNNNN. NNNN is the comment number, which seems to be unique for each comment on a given user’s journal. It then looks for the permanent link to that comment, which is usually to be found in the header of the comment (or footer, in my current style), and adds a “New” link after that. So, new comments are marked with a link to the next new comment.

The upshot of all this is that if you’re reading a journal with a style which doesn’t use either anchor tags or elements with the given id for all comments, the script won’t work correctly. If the style doesn’t provide each comment with a permanent link in the comment’s header, the comment won’t be marked with a “New” link. Such is life. Please don’t ask me for special case changes to make it work with LJ’s many horribly customised journals. Pick a sensible style of your own and learn to use “style=mine” instead. There’s even another Greasemonkey userscript which will help. On the other hand, if there’s a large class of the standard styles for which it doesn’t work, tell me and I’ll have a look at it.

Using it

If you want to use it, you will need:

  • Firefox, the web browser, version 1.5 or later.
  • Greasemonkey, the extension which lets people write little bits of Javascript to run on certain pages.
  • LJ New Comments, which is what I’ve imaginatively entitled my script. If the userscripts site is down again, you can find a copy on my site.
  • Your flask of weak lemon drink.

After you’ve installed all of the above, visit an entry on LJ and marvel at the “NEW” links on all the new comments (which will be all of them at this point, as the script wasn’t around previously to remember which ones you’d seen before). See above for operating instructions.

Privacy

Note that the script stores a Firefox preference key for each journal entry you visit, listing the IDs of the comments it finds there. The script doesn’t let the database grow without limit: when the script has seen 500 entries, it starts to drop the history for the entries you’ve not visited recently.

Clearing the browser’s history doesn’t affect the script’s list of visited entries. Thus your visits to polybdsmfurries will be recorded for posterity, even if you clear the browser’s history. You can wipe the entire history by using the “Manage User Scripts” entry on the Tools menu to delete the script and its associated preferences (you can re-install it afterwards, but you must clear out the preferences for it to delete the history).

The script does not record the contents of any entry or comment. The script does not transmit any information to LJ or any other website, it merely acts on what it sees when you request journal entries.

Your questions

I’ve given this entry as the homepage for the script on Userscripts.org. That means this entry is intended to serve as a repository for questions about the script, so if you’ve got a question, comment here. I prefer this to commenting on my other entries or to emailing me, unless you already know me. Ta.

To keep up to date with new releases of my greasemonkey scripts, track the tag “greasemonkey” on my journal. This link should enable you to subscribe to that tag and get notified when I post a new entry about greasemonkey scripts.

Revision history

2006-01-02, version 0.1: First version.

2006-01-03, version 0.2: Added the “p” key. Used javascript to move between comments so doing so does not pollute the browser’s history. Coped with the id=ljcmtNNNN way of marking comments. Made “n” and “p” keys work even in the absence of permalinks on each comment.

2006-01-04, version 0.3: Apparently you can have id=tNNNN, too.

2006-01-04, version 0.4: Broke 0.3, fixed it again. I hope.

2006-01-19, version 0.5: Updated to cope with LJ’s new URL formats. Changed how comments are stored internally so that the database does not grow without limit: the script now remembers comments for the last 500 entries you visited, and forgets the entries you’ve visited least. Also added “New” marker based on reply link as well as thread link, for styles which don’t have a thread link for every comment.

2006-01-19, version 0.6: Convert dashes I find in URLs to underscores internally, to preserve access to history from older versions of the script before LJ’s URL change.

2006-02-09, version 0.7: Work around the fact that Firefox leaks memory like a sieve. Never display negative number of new comments. Change licence to MIT as GPL is overkill for this script.

2006-02-09, version 0.8: There was a bug in the workaround code I got off the Greasemonkey mailing list. Fixed that.

2006-06-04, version 0.9: Enabled the “n” and “p” keys on the friends/journal view. Added the box around the current comment.

2007-02-20, version 1.0, baby: Try harder to draw a box around the current new comment. Applied legolas‘s fix for pressing CTRL at same time as the N or P keys (see comments).

2008-03-31, version 1.1: Make it work faster on entries with lots of comments. Altered behaviour of “NEW” link so it now selects the comment you’re clicking on, as that makes more sense.

2008-09-24, version 1.2: Support Russian keyboards thanks to mumi_0, make threads expand.

2009-01-27, version 1.3: Support for independentminds journals.

2009-05-04, version 1.4: Support for Dreamwidth.

2009-09-22, version 1.5: Amend support for Dreamwidth.

2010-08-09, version 1.6: Made syndicated journals work.

Finally got Mozex going on Firefox with Mac OS X. This means I can edit my comments on LiveJournal with Vim rather than messing about with LJ’s comment posting box and the less powerful editing facilities from my browser. I can also use Danny O’Brien’s marvellous Google linkification script. Which is nice. It’d be even nicer if Firefox’s process creation API worked properly on Mac OS X, though.

As a result on all this mucking about, I’ve not had time to respond to comments on the God Hates Hair entry. I’ll get around to it sooner or later, though.

Some while ago, Mark Pilgrim did a post on cool software tools he couldn’t do without. In the absence of any pending rants about religion, here’s mine. Probably only of interest to fellow geeks, so cut for length.
<lj-cut>
Mail:

I’m still using Pine, that staple from university days. As it’s terminal based, I can use it to read my mail by logging in to my machine from wherever I happen to be. It supports multiple incoming folders for mailing lists and the like, and multiple roles. It’ll invoke an external editor, so I can use Vim to write email. The address book is nice. It keeps mail in flat text files, which, despite being a somewhat broken format, is easily understood by grep and the like. What more do you want? I hear good things about Mutt and also Apple’s own Mail.app, but nothing which compels me to change.

I run Exim as a mail transport agent, and use its nice filtering lanuage to handle sorting stuff into folders, ditching HTML mail sent to my Usenet posting address, and that kind of thing. Fetchmail gets the mail to Exim. Exim calls dccproc, which checks for bulkiness, and rbfilter, which checks for blacklisted senders.

My pobox.com forwarding address has been around since 1998 and so gets a tonne of spam, but since I used their spam filtering options to block China, Korea, and Brazil; and also turned on their cunning “looks like a consumer broadband machine” test (which looks for bytes from the IP address in the machine’s hostname, as that’s a common naming convention for broadband addresses), spam is a solved problem for me.

News:

I was using trn, but gave that up after failing to compile it for OS X. slrn is a worthy replacement, with colour highlighting and a useful scoring language. As well as using that to killfile people, I can increase the score of posters or threads which interest me and sort by score in the thread view. slrn shares trn’s handy habit of doing the right thing when you just keep hitting space, which is handy for eating and reading news at the same time.

I use Leafnode to fetch news from a variety of servers (NTL groups from their server, news.individual.net for everything else). A tip for Mac users: Leafnode creates directories full of lots and lots of small files (one per article, in fact). HFS+, the native OS X filesystem, is dog slow at accessing these. Make a UFS disk image and put your news spool on there.

Editing:

I use Vim, which combines the usability of the old Unix vi with the startup time of Emacs. It does all the usual good stuff like syntax highlighting every language known to man (including quoted text in mail messages, which is nice), indenting automatically and all that jazz. A killer feature is the function which will complete words from occurrences in the same file, or from a tags file (a list of all the names defined in a program). Helpful for not getting variable names wrong and also in rants where you find yourself writing “evangelical” a lot. The interface to cscope is also very useful when writing C code (and more importantly, trying to understand other people’s C code).

Browsing:

Since I started using OS X, I’ve been happily using Safari as my web browser. When writing long comments here on LiveJournal, I occasionally miss the text entry box editing facility of Mozex, since I could then edit the comments with Vim, but since no-one’s ported Mozex to the Mac yet, I’ve not switched to Mozilla or Firefox. You Windows users should so switch, of course, because Firefox is nicer and a lot more secure than IE.

Uploading:

I maintain my websites with sitecopy, which replaces that Perl or Python script which everyone seems to have written at least once to FTP stuff to their provider’s web space. sitecopy is works with both NTL’s and Gradwell’s servers and can do useful stuff like uploading based on hash values rather than modification times.

I post to LiveJournal using Xjournal, a pretty and featureful client for OS X. If I want to post from the command line, I use Charm.

Scripting:

I prefer Python to Perl for scripting tasks. As Yoda says, you will know Python is better than perl when your code you try to read six months from now.

Mudding:

I use Mudwalker when I have the OS X GUI available, mainly because I’ve made it talk using the Mac’s speech synthesis stuff. I’d also recommend Crystal.

Coding:

From within Vim, I make heavy use of ctags and cscope for browsing around code and jumping to declarations and references to a symbol. You can do it with grep, but it’s not as nice (and a lot slower on big projects).

I’ve also used Smatch to write customised static checkers for C code. Smatch is a modified version of GCC which outputs an intermediate language which is readily processed by your scripting language of choice. If you’ve ever found yourself writing Perl or Python code to parse C directly, you probably should have used this instead. There are some scripts which come with it which can do useful things like attach state to particular code paths as your script parses the code, and allow you to describe what happens to that state when the paths merge (so you could check that all paths free anything they’ve allocated, say).