frank's blog

MYOML #3: Building Blocks

There are two basic things needed when building an XML-based markup language: Containers to put your content in, and a way to visually format those containers. In MYOML #3, the HTML containers <div> and <span> are introduced, CSS classes are explained, and a little demo shows why separating content from presentation is important.

Issue #3: Building Blocks

The Python Tourist: Forgetting how cmp() works!

It seems like each time I create a class that needs to be sorted, I start trying to remember what the return values from __cmp__() are supposed to be ... forgetting that there is an easy way to avoid this completely.

Issue #3: Forgetting how cmp() works ... no problem!

Firefox Session Saver

This is a Firefox extension that auto-saves all tabs when you exit and reloads them when you restart Firefox. Very nice. You probably want to read the user comments at the site linked below, because it sounds like it may have a few weird behaviors (not to mention the confidence-inspiring "version 0.2" label Wink ...).

Link: Firefox Session Saver

The "Developer notes" on the above site recommends getting a newer version from the author's homepage, but it seemed out of date. Hm. The linked version works fine for me.

MYOML #2: Setting Things Up

The second installment of "MYOML: Make Your Own Markup Language" has been posted.

This article sets up the basic "skeleton" files that the rest of the series will be built upon. It introduces some basic XSLT and CSS concepts. It also contains a test page to see if your browser can handle XSLT natively. If not, it shows you how to run an XSLT processor manually.

Issue #2: Setting Things Up

[Python] Gnosis Utils 1.2.1 released

A minor bugfix release of Gnosis_Utils is now available, thanks to Mark Janes for the report.

Source: Gnosis_Utils-1.2.1.tar.gz

Win32 binaries:

MYOML - Make Your Own Markup Language

I vaguely remember writing my first webpage, and thinking that HTML was the greatest invention ever. That enthusiam wore off by about the middle of the second page. I've never liked writing raw HTML because it forces you to spend a large amount of time on presentation, which takes time away from writing the content itself.

This series of articles will show you how to create your own "mini" markup language, using standards and tools like XML, XSLT, CSS and (optionally) a little PHP. If those four acronyms mean nothing to you, don't worry - everything you need to know will be covered here.

Series begins here: First Steps Towards Your Own Markup Language

The Python Tourist: Taking Exception

Thanks to a little insomnia, I had time to mull over and write a second installment in The Python Tourist.

Issue #2: Taking Exception.

This one is about exception handling in Python; primarily about how cool and useful it, but also with some notes about pitfalls you'll want to avoid.

You may notice that the article is a ".php" file this time instead of ".html". The short story is I needed to untabify the HTML before serving it. The long story will be the subject of an upcoming post.

WinSCP and alternatives for Linux

I am an avid Linux user, but there is one utility I've found that (almost, halfway) made me consider switching to Windows: WinSCP. A basic description of the program is that it lets you transfer files to/from a remote host over SFTP (secure FTP, along the same lines as SSH). There are many utilities that do this, but the ease of use of WinSCP really surprised me.

New series: The Python Tourist

I've started writing what will (hopefully) be a series of articles about common pitfalls in Python programming. Originally I was going to call it "Things (Not) to do When Visiting Python", but shortened that to "The Python Tourist". "Tourist" being appropriate since I move around a lot between languages, and tend to forgot all those little "gotchas" while I'm away. I'll probably do one for PHP and maybe Javascript, as I start to learn more about those. If someone has already patented "The [whatever] Tourist" for a title, leave a comment and I'll try to think of something else. Smile

First article: Passing Mutable Objects as Default Args

Incidentally, there are several other similar lists out there already, "Python Warts", etc. I'm just documenting the ones that I tend to screw up, for my own quick reference.

RSS via email

I've tried several types of RSS readers, but haven't had much luck finding one that works the way I want it to:

  1. Standalone readers: The problem I've found with them is that they don't (and really can't) maintain historic information on the feeds you subscribe to. You just get a snapshot of the current feed state, so would have to stay connected 24 hours a day to not miss anything.
  2. Web-based aggregators: I used the bloglines aggregator for a while. I liked that it kept track of old posts so I didn't have to check feeds 24 hours a day to stay current. The thing I didn't like was that you had to mark an entire feed as read/unread, and couldn't mark individual posts. (You can mark certain posts to keep, but that's not the same thing.) And if you accidentally click on the wrong icon, it marks your entire set of feeds as "read". Argh! That happened a lot ...

In my frustration, I did a search for RSS readers on wikipedia, and discovered something I never knew existed: email-based aggregators! [UPDATE 4/24/2006: Wikipedia has inexplicably taken down their list of RSS readers. A very very similar list can be found here: RSS Aggregators]There are several around, but after looking at their sites, I chose Squeet. This is how RSS reading should be! Now posts are delivered to my mailbox where I've set up filters to place them into various folders by topic. Each post is an individual item, so I can mark them read/unread/deleted just like normal messages, and they happily sit there forever until I get a chance read them. What's more, switching machines is now painless - the feeds sit in my IMAP account, so I can grab them from any machine (just have to set the filters up on each machine).

Syndicate content