Older blog entries for dyork (starting at number 242)

7 Aug 2002 (updated 7 Aug 2002 at 20:36 UTC) »

python, IMAP and Tkinter - Finally took a moment to use Tkinter to pop up a window to display new messages that have arrived in my various mail folders. I use mutt for reading e-mail, but since I use procmail to sort everything into various folders, I need a global view of what folders have new e-mail in them. Quite a while ago, I wrote a python program that uses imaplib to interact with our IMAP server, but it's always been a command-line affair. I had started building a Tkinter window some time ago and just not gotten overly far due to lack of time.... but in reading Programming Python, I've learned a bit more about the Tkinter module - and a quick modification of the old code today got me the window I was seeking.

Essentially, the code just creates a windows with a "Message()" element into which I load the results of running the command-line program! Rather ugly kludge, but it works... next step when I have a few cycles will be to bring it all into one program - and make it OOP as well.

USA Today trumpets Linux growth - in this glowing article.

Weight loss - goingware: I share your pain... I am now at the heaviest I have ever been... a bit under you but not by much, and want to drop down to the same range you are seeking... so I'm looking at overall drop of 50 pounds or so! Quite a bit, and not something that's going to happen all that quickly. I did set a goal, though, of losing 15 pounds by the start of curling season in late September. After two weeks, I've lost 4 pounds, so that's a start, anyway. Last week I was starting to try to eat less... this week we'll add exercise. We'll see. (Of course, those Timbits we had on the weekend didn't help. You can just think of them as little blobs of (delicious) fat being glommed onto your body.)

The Chloe Journals - bgeiger: Once Chloe is in the backpack, I just lift up the pack, rest it on my knee, then put one arm into one of the straps, then the other arm into the other... and it's up on my back without really jostling her at all.

Document formats - Since raph and jfleck have begun this topic, I feel compelled to throw my 2 cents (Canadian) into the picture. jfleck, I know what you mean about the prevelance of Word files. It is always amazing to me the number of times I have asked someone for a "text" file and they have sent me a Word doc. To them, in their Windows-based world, that is "text", and they have no comprehension that it can be otherwise. Meanwhile, here I sit doing all my editing in vim....

On the format issue, I am somewhat split. I have been a heavy DocBook user, to the point where I use DocBook even for marking up the slides that I use in presentations for conferences. I firmly believe in the power of structural markup in the context of "single source" - having a single document file (or linked series of files) that go out to multiple output formats. That ability to go to multiple output formats alone is the win for me.

If I were in charge of a group of technical writers, I would absolutely want them to use structural markup (and probably DocBook, but there certainly are other worthwhile DTDs). Why? Several reasons. First, of course, is the whole single source thing. I can go from the source format to whatever I want to have the end result in.

Second, by using a commonly used DTD, such as DocBook, I have all the open standard advantages. I am NOT tied to a single tool. I have a wide range of choices. And if I lose all my DocBook-literate writers, I can always go from my single source into something that someone else can work with.

Third, formatting distracts writers. When the goal is an end product, say a technical manual or even an article for a magazine, I have seen writers get so focused on what fonts they should be using - or what the heading styles should be - that it takes them forever to write the text. Let the writers focus on the text, and leave the formatting to a designer who is going to produce the end output. Now, obviously, if you are in the graphics world, then you do have to care about presentation, but for writers, that should be secondary to the content.

Fourth, on a related thought, I believe formatting encourages laziness in the language. How many times do we use italics or make text bold to emphasize what we are saying? Do we need to do so? Or are we using the formatting as a crutch because it is simpler than coming up with the "right" words that provide the power and emphasis that we need? Which is quicker - rewriting again and again a piece of text until we have the words just right in a way that evokes the emphasis we want? Or highlighting the word and pressing the slanted "I" icon to slam home the point that we want to emphasize this text? Why use a scapel when a large axe will do the trick?

I could go on... but I actually need to catch some sleep and checking Advogato was to be a quick diversion.

A final note, though... when it comes to documents where you need high-quality presentation, I'll be the first to admit that the existing tools for working with structured markup leave a lot to be desired. More on that later...

The Chloe Journals - We went out and bought a new backpack to carry Chloe around in. It's quite nice and she seems quite happy inside of it. The number of backpack choices was quite amazing. So many different options. Only bummer was that the sun/rain hood wasn't in stock, so we'll have to wait until next week. One of the big issues we found in walking around on Saturday was that she moves her head around so much (looking around at everything) that keeping a hat on her head is just not very possible. So we want something to keep the direct sun off of her head, etc.

The whole backpack thing came about because we went out to the nearby town of Merrickville to look at some shops and such. It's an old town with quaint little shops... into which it is just not possible to bring a stroller! So we opted to carry her - but where she's now pushing 13 pounds, it gets a bit tiring on a hot day. So... off to get a backpack.

Salary Surveys - Interesting survey by MCP Magazine about salaries and certification. Even ignoring the certification issue, some of the data about salaries and regions (on the second page of the article) is quite interesting.

Article on LPI - Good article in Computing Canada about LPI certification.

LinTraining - Approved two more training center submissions to LinTraining today, one in Uruguay and one in Germany.

2 Aug 2002 (updated 2 Aug 2002 at 11:51 UTC) »

python and messaging - uche: Nice article! I look forward to your next one on XML-RPC. Thank you for including sample code. It's always great to have that.

Babylon 5 on DVD - I just might have to break down and actually buy a DVD player. Since it left the airwaves, there just has been nothing worth watching.

Other - jfleck: powerful entry... thank you for sharing.

Immigration - goingware: Yes, it probably will take most of a year to immigrate into Canada. We're going through the process ourselves right now to become permanent residents. Quite a process!

Take a Mac user to lunch - Interesting article about the Apple "Xserve" 1U server...

modsnake - So browsing through a book on Python and web programming this weekend, I found mention of a "modsnake" module for Apache that sounded quite interesting. So I looked it up today and found that the developer killed it off. The code is, of course, still available, but nothing has been done on it for since very early 2001. Too bad, really, but I certainly understand the time committments behind maintaining a project. I mean, heck, I haven't done a release on makefaq in over a year! (I didn't realize how much time had gone by until recently!)

Oh, how I hate hardware - Have I mentioned before how much I absolutely hate dealing with anything hardware-related? I know I have, but let me just repeat it one more time for emphasis - I absolutely and completely abhor working with hardware issues. Give me OSI Layer 3 and above... heck, I'll even deal with Layer 2... but Layer 1? Forget it.

Today's trouble is the continuing saga of trying to upgrade my home desktop system. It's a system I've had since 1998 or so running SuSE 6.4 and I want to upgrade it. BUT... I don't want to use my existing disk drive because I hate the way I partitioned it (so I can't just "upgrade") and I'm running out of room anyway, and I certainly won't fit all the new stuff on it that I want to.

So a number of weeks ago I went out and bought a 80GB disk drive. A bay is available in my system... power is there and there's even an IDE ribbon cable that can reach it. Great. Cool. Should be easy.

NOT! After a good number of hours working with it screwing around with jumpers, cables, etc. and mucking around endlessly with settings in BIOS, it now seems to come down to the issue that my BIOS doesn't support large disk drives!!! Arrrggghhhh...

Since it is AwardBIOS, which was purchased by Pheonix and then, it seems, pretty much shut down, it appears I have to buy an upgrade from the people Phoenix has contracted with to deal with it. So I filled out the form and will see what happens...

Why not go back to the manufacturer? Well, of course, this was a no-name local white-box company that, I believe, has gone out of business. So... I guess I just have to wait to see what this company says about an upgrade.

The Chloe Journals - One of the most awesome feelings I've yet experienced is when your little girl just goes to sleep in your arms. She did that a few minutes as I was sitting her working with one arm on the computer. She had been fussy and so I was gently bouncing her on my knee while talking to her... and suddenly I realized that her head was tilted sideways! I don't know what it is about it, but it's such a neat feeling.

She ate her first "food" on Friday evening... if you can call rice cereal that. She's been doing great on breastmilk but she seemed captivated to watch us eat, so we thought we'd give it a try and, sure enough, she seemed to enjoy it! It continues to be an absolutely amazing experience watching her grow. (And grow she does!)

Advogato outage - Oh, how we missed you... thanks, raph, for the explanation and glad it was nothing more than that.

LWN - I certainly hope something can come through after LWN announced they will be shutting down next week. Jon, Liz, Dennis and all the folks there have been great and I dearly hope they can find some way for LWN to stay alive...

[The rest was written on July 23 and posted today.]

The US Senate and cc:Mail - So, the U.S. Senate is finally moving away from cc:Mail! It brings back memories of when I was at PPI and was part of a small team involved with moving the entire organization (at the time over 150 training centers) from a cc:Mail-based system to an Exchange Server-based system (shortly after the acquisition of most of the PPI franchises by the Larry Ellison- and Michael Milken-backed Knowledge Universe).

The cc:Mail system had every office dialing back into a central hub in Chicago to drop off/pick up messages and it was routine for a message to take over 24 hours to get from one person to someone else. After we deployed the Exchange Server solution, people got so very used to the fact that messages would be received immediately (all the Exchange Servers were interconnected over frame-relay lines) that if there was even a five-minute delay they started getting antsy.... it was amazing from a anthropological point of view to watch the transition.

That was back in my 3-year journey through Microsoft-land when I honestly thought their solutions were solid. And it was the fact that we couldn't keep our Exchange Servers up and running without weekly reboots that caused me to lose all faith in MS BackOffice products and explore other options which eventually brought me to Linux and back to my UNIX-based roots. (And from there led pretty directly to the events that led to LPI.)

I still remember the excitement, though, when people first moved from dialup cc:Mail to dedicated-line Exchange Server and how their faces lit up when the e-mail went so fast. (And probably, a year later, as they were inundated with e-mail, they were longing for those older days when less was done by e-mail!)

I see that PPI is now just 35 locations... rather sad, really. They were quite a good and strong company at one time.

libxml2 and libxslt - Installed the latest version of DV's software... somehow I missed that 2.4.23 and 1.0.19 had come out on July 6th.

Python Cookbook - In browsing through the Python Cookbook today, I realized I should take some time to toss in some of the little python things I've done that have made life easier... they may help others out there. If only I had the time......... It is interesting that O'Reilly has produced a paper version. I'll be interested to see/read it.

Linux Timeline - Kudos to the Linux Journal for putting up this article. It sure is a trip down memory lane... It was nice to see the mention of LPI's exams coming out in January 2000. That certainly was a momentous thing for all of us involved!

The Social Live of Paper - jfleck: Thank you for pointing out this article. I found it quite interesting.

The Chloe Journals - She goes for her next round of immunizations tomorrow. We continue to wrestle with whether she should be given one of the newer (and "optional") vaccines. On the one hand, you of course want to protect your child from every disease you can. On the other hand, outbreaks of this particular disease are very rare and the vaccine has only been around for about 3 years and used in Canada for 1 year (and is not currently available in the US), so it's not clear if there are long-term effects. Just yet another of the hard decisions in the land of new parenting...

Where have all the swingsets gone? - Do you remember swinging on the swings as a kid? Swinging back and forth, higher and higher? Perhaps being pushed by someone? Or just using your own momentum?

I certainly do... and swings were an important part of my youth as I yearned to fly and touch the stars.

But yet... it seems today's children aren't going to have that experience! Well, at least at the public playgrounds here in Ottawa. In an informal survey of a number of different playgrounds in public parks, none have swingsets. They have jungle gyms, slides, all sorts of stuff to climb on. But no swings. I don't know who to ask why, but my gut reaction is that it's probably a liability thing - I mean, people could fall off of swings, get strangled in the cables, etc. I suppose swings could be stolen, as well. I don't know why... all I know is that I haven't yet seen swingsets outside.

Quite sad.

MyAdvogato - After seeing fxn's note in recentlog, I decided to download a new copy of MyAdvogato and give it a try. Quite nice! Of course, it showed me that I haven't been certifying many folks lately. (Since most of the people in recentlog currently show as not being certified by me.) I'll have to do some certifying at some point here...

We have jobs! - So now the official posting went online. Yes, we are looking to hire a couple of perl developers into our group to work on our product. Only catch, of course, is that you have to be willing to live and work in the beautiful (I'm serious!) city of Ottawa. (Well, okay, you will be working in Kanata, which is a suburb of Ottawa that isn't really all that remarkable, but you are right in the Ottawa vicinity and working just 20-30 minutes from downtown.)

Nice to be able to say we're hiring at a time like this!

LinTraining - Approved some more submissions to LinTraining yesterday. Latest round of training centers were from:

  • Malaysia
  • Greece
  • Brazil
  • UK
  • India
  • Ohio (USA)
  • New Jersey (USA)

Great to see new centers offering Linux training!

Borges - and DocBook - Wow! I had no idea that MandrakeSoft was coming up with this! Very cool! Here is the intro:

Borges is an open source extensible documents management system aimed at XML aware documentation projects. It's main purpose is to optimize internationalization (many languages, translations), reusable content and teamwork.

The main philosophy behind Borges is to provide a convenient tool:

  • For beginners: by providing a very simple interface to compile XML DocBook documents into various formats;
  • For advanced users: by providing a whole set of customization features allowing to easily twick every single aspect of the system: output formats and layout, custom rules, etc.
  • For project managers: by providing a powerful project tracking system to juggle with authors and translators, deadlines, etc.

focused on DocBook, of course.

LPI and favicons - If you are using Mozilla or another browser that supports favicons, you can now go to lpi.org and see a cute little LPI logo in your address bar. csm is the one who made this happen.

LPI Approved Training Materials - I see that the LPI folks put a web page up with the list of LPI Approved Training Materials with Caldera being the only current listing. (I know that several others are undergoing the approval process.)

LPI T-shirts - Full of LPI notes, today. (Which corresponds to the day I finally got caught up reading an LPI mailing list on which I still lurk.) LinuxCentral is now selling LPI T-shirts (that link is XL, this one is L). It sounds like the image shown doesn't match the actual shirt description though.

Python plugin for xchat - I was pointed to this page on xchatpython today. Looks rather interesting. Unfortunately, though, I no longer have the time to hang out on IRC or else I would experiment with this... of course, it requires xchat 2.0, which requires GNOME 2.0, which requires...

Linux Magazine and python - Nice article about python.

Parents - My parents arrive with my grandmother tomorrow for a long-weekend visit. It will be great to see them. My grandmother hasn't yet seen Chloe, so it will be great for her to do so.

[Written yesterday, July 14, but posted today.]

python 2.x - no need to import the 'string' module - In browsing through the Second Edition of Programming Python, I happened to catch a small note saying that as of python 1.6, string objects now have .split() and .strip methods (and pretty much all the other functions that are in the string module). So rather than importing the string module you can just call the methods of the objects. So, given a pipe-delimited line of data, I typically have always done this::

   from string import split
   
   ...
   
   fields = split(line, "|")

This can now be simplified (by no import) to:

   fields = line.split("|")

The immediate application I have for this is an app where I use string.strip() to remove all the white space around each field that is read in from a log file. So:

   from string import strip
   ...
   print "<td>" + strip(e.data[i]) + "</td>"

becomes:

   print "<td>" + e.data[i].strip() + "</td>"

Not a huge savings of space or anything, but it does mean that I no longer have to import the string module.

Programming Python - Because of the discovery of that note buried in one of the chapters of the book that I had previously skipped over (since I know most of the material covered), I decided to actually break down and read the book from cover to cover... to see if there are other notes that might make my python programs just that much more efficient and elegant.

python and OO - We drove back to N.H. over the weekend to bring Lori's sister and her son back home. They had come up last Tuesday to spend some time with us and it was a very enjoyable visit. The car ride back, though, was a bit difficult. Three adults, one 3-month-old (Chloe) and one 9-month-old (Nicholas). Nick wasn't too thrilled to be stuck in the car for what wound up being a 9-hour trip. I mean, it's a long trip for adults and is even worse for a little tyke used to being up and about crawling all over the place. So he was a bit vocal...

I was intending to spend a good bit of the trip back writing up a document I need to do for work... but it was a wee bit hard to concentrate, so that didn't happen. But I did find I was able to jump into some python... and wound up redoing a small program I wrote from a procedural-based program into an object-oriented program.

The program in question connects to one of Mitel's telephony products and starts receiving SMDR records (for call accounting). It then writes those out to a text log file and also to an XML file. A companion CGI program then displays the last x records of the log file to a browser (the target display for this is the microbrowser in Mitel's 5140 "webset" phone). I'd also written a third program for development purposes that acted as a server spewing out SMDR records. (So that I could be developing the program on my laptop disconnected from a network with the telephony product.)

In rewriting the three programs, I created a central library file that I then imported into all three. I created an "Entry" object to represent each line of data, with associated methods to write out data to a text file, to HTML and to XML. The __init__ function of the object also centralized breaking the line of data out into separate fields.

It turned out to be an excellent investigation into code re-use. There turned out to be a good number of ways to simplify all three programs - the resulting programs are MUCH simpler and easier to use... and making global changes (such as the format of the data line) is trivial through this central library module. Very fun stuff.

The Chloe Journal - At 10:10am this morning, our little girl turned a whopping 3 months old. It is truly amazing how much our life has changed in those three months! And it is amazing how much she has grown in those three months! Each day she seems to be getting a bit bigger... more alert... more interested in everything around her... it's wonderful to be around her right now!

233 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!