September 2009 Archives
Tuesday, 2009-09-29 12:21 MDT
nanoblogger and git
I wanted to have my blog in the git repo for my web site. The question is, which files to track, and which to ignore? As a general rule of thumb, track files you create and maintain, ignore those created at compile time. While I did this with git, it should work with any revision control system.
The blog is in a directory called (with great imagination) "blog". git does not track directories per se, so I added files, like so:
You don't need to track the subdirectories under blog/articles as nb will create them for you at run time.
I was perhaps more careful than I needed to be to avoid adding backup files (*~).
The first time you run nb update all in a new clone, nb will remind you to mkdir cache parts. git doesn't track empty directories, and I thought that making them once was less obnoxious than creating the directories and then creating and tracking a dummy empty file in each of them.
You should set git to ignore the following:
# nanoblogger goodies atom.xml rss.xml tidy.log blog/cache
Which I did in .gitignore, not in .git/info/exclude. Depending on how your repo is set up you may have to propagate those manually.
Once you have all this working, you can edit away with nb. Then when you are ready to check things in, run git status to see which files you have added and changed.
How many other blogware programs let you keep your blog in a revision control system (RCS)?
Saturday, 2009-09-19 08:14 MDT
Happy Software Freedom Day
One quibble, though. Is there an algorithm for predicting future Software Freedom Days? E.g.: is it the third Saturday in SeptemberGregorian every year? If there is one, it's not readily available on the web page.
Thanks to Brad R for reminding me.
Friday, 2009-09-11 19:44 MDT
Interview with Chuck Moore
An interview with Chuck Moore, at Simple Talk. The publisher is interesting, as it is a web site for developers using Microsoft .NET and SQL Server. Neither one is noted for Chuck's emphasis for much of his life: simplicity.
For those who have never heard of Chuck Moore, he invented the Forth
programming environment. I call it an environment because it is
much more than a computer language. It is an interpreter, a
compiler, editor and disk operating system. For most 8 bit
processors, a typical installation is eight kilobytes. By way of
comparison, the compiler,
gcc, on my Ubuntu laptop
runs to 204 kilobytes, and that's without the dynamically linked
libraries (something Forth does not have or need). And that ignores
the Perl, python, shell, C++ and Murphy knows what else compilers
Probably Forth's (and hence Chuck's) greatest contribution is its methodology. By keeping Forth so simple, Chuck made it incredibly powerful. Forth also inverts the normal programming process. With most languages, you use the language to write an application program, a long dull tedious process. With Forth, you write an application specific language. Then writing the application is trivial.
I know I learned a lot about computers and programming from Forth and Chuck. Thank you.
Thursday, 2009-09-03 15:10 MDT
Obscuring Email Addresses on Web Pages
John F. Collins, of JFCollins Associates, writes with an interesting tool for webmistresses, the "E-Mail Address Encoder/Obscurer".
It is polite to put a contact email address on your web page. For some applications, multiple email addresses are appropriate. The problem is that then the lowlife spamming scum can harvest those email addresses. I assume we all use spam assassin or something similar to keep the stuff down, but there's no point in making it easy for the bums.
One solution is to obfuscate the email address: something like "barackobama at whitehouse dot gov" or "firstname.lastname@example.org". The disadvantage of those is that they require the users — the people you want to email you — to edit the email address before they can use it.
This tool requires a bit of work on the part of the web master: encode your email addresses in character entities. It turns my email address into "charlescurley…". So anyone (say an email address harvesting script) looking at the source code for my web page will see that. But a human being using a sensible browser like firefox will see the text. Much more user friendly.
It isn't perfect. I'm sure some spammer scum will figure this out. But it's a step.
And thanks to the folks at West Bay Web for coding it up and making it available.