August 2004 Archives

Chris Shiflett

AddThis Social Bookmark Button

Related link: http://shiflett.org/archive/56

The schedule for ApacheCon has been published, and it looks like it will be a great conference for PHP developers.

I will be giving a 3 hour PHP security tutorial on Sunday. If you missed the one I gave at OSCON, you’re in luck, because I plan to work hard to make this one even better. I’ll also make some enhancements to the PHP Security Workbook and provide that as the handout.

In addition to the tutorial, I’m giving a 60 minute talk with mod_perl core developer Geoff Young about testing PHP with Perl (two great tastes that taste great together). Geoff is a fantastic speaker, and this talk should be very fun and entertaining. Mixed in with the inevitable banter between us, we hope to provide some practical and useful information that you can apply directly to your PHP development.

Among the other interesting talks are a 3 hour tutorial about scalable Internet architectures by Theo Schlossnagle, a 60 minute talk on PHP 5 by Andi Gutmans, and Adam Trachtenberg’s popular talk, Why PHP 5 Sucks! Why PHP 5 Rocks!.

I usually spend most of my time at conferences in the halls and social gathering places, but I think I’ll be attending quite a few talks this year. It’s good to see such a nice lineup of talks. I’m definitely looking forward to it.

Hope to see you in Vegas.

Andy Lester

AddThis Social Bookmark Button

Six little words immediately mark you as unprepared for the interview and sour your future boss on your viability as a candidate.


Here’s the scenario. You’re across the desk from the hiring manager. He’s thanked you for taking the time to come in, and tells a little bit about himself, and provides details about the position that weren’t in the ad. After a minute or two of this, he lobs out “So, that’s what we do. Tell me about yourself.” You get a puzzled look on your face and say it:


“What do you want to know?”

They’re the
six words that say “I’ve failed to prepare.” Probably three out of four interviewees give me that answer.


Anyone who’s heard my talk with Bill Odom on how to get a good job (or HREF="http://conferences.oreillynet.com/cs/os2004/view/e_sess/5372">read
the slides) knows that I’m down on the idea of memorizing snappy answers to stupid questions, especially “How do you move Mt. Fuji”-type questions that are somehow meant to see how clever you are. “Tell me about yourself” is not one of these dumb questions, and you’ll get it every time if the interviewer knows what he’s doing. It might be some other open-ended conversation starter (”What can you bring to our company”, “How can you help us out”, etc), but the intent will be there: The hiring manager wants you to sell yourself, and you must oblige.


The first step in getting past the tendency to say “What do you want to know” is to change your view of the interview. It’s not an inquisition, where you only speak when spoken to, and answer only those questions asked. Your primary responsibility is to sell yourself, to show the manager that you have the skills he or she wants. When the hiring manager says “tell me about yourself,” that’s your cue to show what you’ve done on your “prepare for the interview” project.


Yes, it’s a project! Think of your job interview as the first day of your new job, with the hiring manager or HR or whoever you’ll be meeting with as your new boss. Your assignment is to bring to the interview a presentation on why you are the right person for the job. The job ad probably tells you a lot about what the required skill set is. Your search of the company’s website should tell you something about what they do. Googling for email from company employees on technical mailing lists and newsgroups
may give an idea of what day-to-day tech life is like. You may even want to talk to the hiring manager directly, either on the phone or in email, to find out any other details that might help you in preparing. This isn’t weird or creepy: The hiring manager wants to hire you! She wants you to be the answer to her prayers!


You might also find, as part of this project, that things aren’t everything you wanted. Maybe you’ll find that the company runs all IIS and Exchange, and there’s no way in hell you’d work for such a place. Maybe they work in an industry you have no interest in. Maybe you’ll find that it’s not a good match for you before you waste your time. There’s nothing wrong with canceling a job interview.


There are plenty of books out there that give you “great answers to tough interview questions”, but most of them talk about slick ways to get out of silly, overly aggressive questions that you probably would only get from a company that you don’t want to work for anyway. Take these canned responses from the books with a grain of salt.


Focus on the big question. Know how to answer “tell me about yourself”, as it applies to the job you’re applying for, or you’re wasting your time as well as the interviewer’s.


(See also “The worst way to start a resume”)

brian d foy

AddThis Social Bookmark Button

I’m writing this as I try to install pdftk, which Sid Steward uses quite a bit in PDF Hacks. I have a lot of time between steps.

First, I went to the pdftk site. The documentation for the program looks great, and the program looks useful. I want it.

Not so fast, cowboy. He says “Mac OS X users must build and install GCJ, first.” Eh? There is even a reference to special build instructions from John M. Gabriele. GCJ doesn’t come with Mac OS X.

Well, I need to get GCJ I guess. Not so fast there, either. After looking around the GCJ page and discovering that the download page does not have links to anything I need to download (like GCJ), I finally find a mirror site for GCC. Yep, I need to download all 34 MB of it. It’s downloading right now. (17 minutes)

Why do I need all this? I think this sums it up: “Pdftk is also an example of how to use a library of Java classes in a stand-alone C++ program.” I just want to play with PDF files and try some of the things in this book. I don’t care about Java or C++. In fact, I’m wondering why I even have to know that. At this point I’m just some dumb consumer, but I have to worry about all this other stuff.

I’m following John’s instructions, so I’m building gcc with “make bootstrap”. That’s running right now. time passes. It’s still running. He says “On my 500 MHz G3 Powerbook with 256 MB of memory, that step took about 4 hours.” I’ve got a G4 Powerbook, but still, this is taking a while.

After an hour and a half, the compilation aborts with an error. Ugh.

It’s the same error that John points out in his instructions. Ed Smith-Rowland reported the bug, and Trevor Harmon pointed out a faulty header file from OpenOffice (why did I even bother installing that?), which is also mentioned in the fink FAQ and elsewhere.

I remove the offending file. Maybe I should have just moved it out of the way. Nah, I’m feeling mean. Kill it! Die file die!

$ sudo rm /usr/local/include/dlfcn.h

I start over. Well, not really. Most of the work is already done and make(1) can pick up where it left off, or at least I think it does, but it’s running configure. Hmmm… it looks for there are even more subdirectories with even more stuff to install.

I start listening to yesterday’s Marketplace, and the teaser is someone saying “I look at my reader as someone whose not stupid at all. Even if they’re not a techie, they’re smart, they have a life, and this stuff should just work for them.” Preach it brother. It turns out that the teaser is from Walt Mossberg of the Wall Street Journal, and I’m surprised that I like something that he said since I haven’t liked the few columns of his that I have read. The gcc compilation is still going. I check out some of Mossberg’s columns. I don’t like with reviews of the iPod, but other things seem okay.

My cat comes in and curls up among the cables under my desk, and the gcc compilation is still chugging away. Marketplace ended, so I’m listening to All Things Considered now. This is often how I measure work time: how many public radio programs I listen to.

As I wait, (why am I waiting?), I write an article for next month’s The Perl Journal, and I occasionally check in on the compilation. All I wanted was pdftk, I remember. This started so innocently. I start to think that I might have been able to re-implement pdftk in perl faster than it takes to install it. Sid does mention Perl a couple times in the book, and one of the hacks is about PDF::API2, but I also remember that I tried this before and never finished it because the module interface was a bit too low-level to be immediately useful.

An hour later, it looks like the gcc compilation has finished successfully. I install it. It installs a lot of things that I will probably never use for anything. This takes a while too, but not quite as long as the compilation.

I download the pdftk 1.0 src and start to compile that. The documentation mentions adjusting some Makefile parameters, but I just go for the defaults. Boy does that compile a lot of things. This thing better work.

It finishes compiling after a couple of minutes, but I pause before trying it out. I hope I haven’t wasted all of this effort. I run it with no arguments, and I get the help summary. Well, at least it doesn’t blow up.

Okay, now for the test. I want to append one PDF file to another. Things like PDFmerge and texexec haven’t been able to do the job. For some reason they both mess up the page rotation.

Lo and behold, after all that, it just works. Thank god.

Jono Bacon

AddThis Social Bookmark Button

Recently, I had the pleasure of attending the european Friends Of O’Reilly get-together in Enschede, Holland. This event was an invitation only affair that was attended by around 130 people involved in interesting parts of the technology spectrum. Not only did the event give everyone a chance to get to know each other, share some beer and chat about what they are doing, but it was an excellent opportunity to indulge in a little game I love to play - people watching.

Now, don’t get me wrong. I know this ‘people watching’ thing sounds like some kind of ominous stalking activity, but I promise you it isn’t. The general idea is that you look at someone who you have never met before, and you try to guess what their ambitions are, what their quirks are and generally what shapes their life. When my girlfriend is wandering around a shop and I am sat outside waiting with all the other bored spouses in a similar position, I generally play this game and observe the people who wander past me. Within my little world I envisage people who work for the CIA, drug pushers, bored housewives, children’s TV presenters and a host of other wacky vices and professions that I see in people, all based entirely on their appearance and body language.

When I am at technology conferences, events and shows, I generally try to adapt the game to guess what kind of technology people are into. This is often fun, and as these events are typically attended by friendly people who I get to know, I sometimes get a chance to check if my scorecard is accurate. Admittedly, I don’t always get it right - I once had someone pegged as an anarchic BSD user who hated capitalism and had anti-Microsoft tendencies. Later in the bar it turned out this individual was an accountant from East London who codes in Visual Basic in his spare time. Oof.

Ever since I started playing ‘people watching’, I have noticed a few correlations and patterns in groups of people who use similar technologies. I have not been quite so committed as putting these results into a spreadsheet, but I am pretty sure someone is going to email me and ask for one anyway. These patterns have certainly not been triggered in my mind by stereotypes or pre-judged opinions, but they have been genuinely formed from identifying similar sets of behavior. Likewise, these patterns are not necessarily related to physical appearance or movement - they are sometimes similarities in interests, curiosities and opinion. This is no exact science, and if you are a student reading this and expecting to see some scientific proof behind my observations, you should really have a look somewhere else. Although I would love to share with you my observations about specific groups of people, I am not going to. The simple reason behind this is that my interest and the reason behind this blog entry is not on the observations, but why these similarities exist. Many sciences are based around the concept of patterns, correlations, humanistic similarities and other defining properties of groups. There must be a reason behind this, surely?

To take a simple stab at an answer, one could assume that there is some form of catalyst behind the culture in the group. This catalyst may be a person, a concept, an ideal or a goal. If this idea is true, you essentially have a central point of innovative thinking and leadership and the rest of the group are sheep endlessly bleating in tune to that of the leader. I don’t believe for a second that this is the case. Within many communities, there are gods, demi-gods and mere mortals, and I rarely see one true leader who inspires the community with culture and thinking in addition to being the release maintainer and keeping the CVS ticking over.

I think this inherent culture permeates from deeper inside the community - deep within the attractions that draw the community together. In my view, the uniqueness behind people who are attracted to a particular technology is a uniqueness that is sparked by the technology in question. This particular facet of their imagination and personality is the culture and the technology is the catalyst.

What is specifically interesting is how different communities who are aligned around similar technical contexts differ. Take for example, programming languages. Danny O’Brien recently mused on the differences between Perl and Python hackers in Linux User & Developer magazine. Danny referred to the Perl folk as “chaotic/good trickster archetypes” and Python users as “peaceful, northern-european-have-their-glasses-on-a-little-string-to-stop-them-loosing-them sensible fellows”. I think Danny has this pretty much spot on, and this allies with some of the patterns picked up from the blissful science of people watching.

If we take the Perl brigade as an example, what is it that makes Perl hackers have this often off the wall fascination with doing odd things with the language? I know a number of Perl people, and I am often amazed, inspired and sometimes dumbfounded in response to some of the mind games that they play with the language. Some of these games range from simple mental exercises to determine how l33t they are, right up to odd and frankly pointless efforts to contort Perl into every possible box they can think off. If the programming world has a wall, the Perl folks will figure out a way of getting more graffiti on it than anyone else with a more interesting design and possibly on one line.

What is also interesting is that these attributes found in the Perl community don’t always map over to other programming communities. Sure, there are people doing wacky things with Python, PHP, C, C++, Assembly and other languages, but there just seems to be a lot more of this stuff going on in the Perl community. What is it that makes a Perl hacker experiment in these different ways with the language? Is it Larry Wall? Has he made a definable set of boots that everyone tries to walk in? I don’t think he has, but there is something inside Perl people that makes them match up correctly to Perl to carry out their ambitions and interests.

Unfortunately, this is one of those frustrating stories where you don’t really get a full and complete conclusion. I have no idea why we have these similarities in different groups of people, and when I have some time, I plan on doing some real research into the subject to determine why some of these patterns exist. We all have hunches and views, and this is why I wanted to write this blog entry. What do you folks think about the subject, and what kind of patterns have you noticed in technical user groups?

What do you think? Have you seen any patterns in certain groups? Have you a theory on why these patterns exist?

Derek Sivers

AddThis Social Bookmark Button

Related link: http://www.hostbaby.com/designers

My company, HostBaby, is looking for CSS web designers to make a CSS style for a new project we’re doing. For each completed CSS style, we will pay $500. Details here.

Please spread the word.

brian d foy

AddThis Social Bookmark Button

Related link: http://www.google.com/help/features.html#calculator

This morning, Adam Turoff pointed me toward a problem posed by Norman Walsh. He wanted to count the permutations of the middle letters of “morning”, figuring if we mistyped the word, we would at least get the first and last letters of the word right.

His solution was brute force: simply generate all the possibilities and count them. His solution is pretty ugly because it only works for a fixed number of letters.

This reminds me of statistical thermodynamics though. The number of distinct states is the factorial of the number of elements divided by the number of indistinct elements. In the letters in “ornin”, there are 5 ! states (120), but the “n” is duplicated, so there are two indistinct elements. The number of distinct states is then 120 / 2.

Adam tells me that factorials and morning coffee don’t mix though. Well, just google “ 5 ! / 2“.

Adam showed me that I could also get the result in roman numerals.

Uche Ogbuji

AddThis Social Bookmark Button

In a recent entry I was prompted by Brett Cannon’s complaints about how the loud and persistent community furore over Python decorators made it hard to maintain his weekly summaries of the python-dev mailing list. I disagreed with the idea that the community should just bite its tongue and go with what Python’s BDFL says, but I do want to express my appreciation of the work Cannon and other Python chroniclers perform. Here are the resources I use to keep abreast of Python developments:

  • I rarely go a day without reading Daily Python-URL, sponsored by PythonWare. It covers a wide range, including journal articles, weblogs, product announcements, and exceptional excerpts from mailing lists.
  • Dr. Dobb’s Python-URL! (unrelated, I think to the above) is a weekly collation mostly of quotes and links to notable threads on comp.lang.python. It’s also posted weekly to comp.lang.python.announce.
  • The python-dev summary, currently maintained by Brett Cannon, summarizes important threads on the Python developer’s list. One thing that makes this resource stand apart is that many of the other annals cherry-pick whetever they find interesting, whereas the python-dev summary clearly puts in an effort to cover all meaningful threads. The new summary is also posted weekly to comp.lang.python.announce.
  • When a Python release is imminent I study Andrew Kuchling’s What’s New in Python document to figure out what goodies and what wrinkles to expect.
  • I check out Planet Python from time to time. It’s a roll-up of Python-related RSS channels. As such it reels in a good deal of non-Python related material, and sometimes it’s dominated by bric-a-brac. Then again, the bric-a-brac of Pythoneers is in my experience better than the average.

What resource do you use to keep abreast of Python developments?

Uche Ogbuji

AddThis Social Bookmark Button

Related link: http://mail.python.org/pipermail/python-announce-list/2004-August/003318.html

I was surprised to see an old rant of mine quoted in Dr. Dobb’s Python-URL. Of late I’ve simply ceased to think about SOAP. It has become an irrelevance. I rarely come across SOAP in my sojourns. I’m not sure whether this is just bias coloring experience.

I had two recent run-ins with SOAP late last year: one while using Java and one while using Python. The state of Python’s SOAP implementations seemed a complete mess because of neglect. The state of Java’s SOAP implementations seemed a complete mess for a near-opposite reason: energetic conformance to the many SOAP flavors. This slavishness to SOAP’s worst aspects makes it impossible to figure out how to portably work with rich data using SOAP. If you’re not sticking to Java’s primitive data types (in particular, if you’re thinking of your data in XML terms), there is no chance these libraries will fit your head.

But putting the misery of these experiences aside, I’m surprised at how little I’ve had to worry about SOAP. As it became clear to me that Web Services were becoming a menace to much of the goodness wrought by XML, I worried that I would be forced to do a lot of gritting my teeth at work while I accommodated clients’ insistence on WS. This hasn’t turned out to be the case. In several cases where WS “end points” have been suggested, I’ve been surprised at how easily my suggestions of a REST-like alternative are embraced (the fact that I could usually whip up running code in hours helped a lot).

In the comments to part 2 of my Web Services chronicle (see also part 1), Mark Baker challenges me to substantiate my statement “Web services have found critical mass greater than any other distributed computing technology before them.” I made that statement based on observations at that time when it seemed WS was everywhere. Strangely enough, it is soon after that article that I stopped seeing signs of WS dominance. And as I think back on the matter, it was a rather precipitous decline.

So has WS and its SOAP center truly begun to melt away, or is that just the order I’ve imposed on my corner of the Universe? Of course in my superstition I worry that now that I’ve mused about it, I’ll be punished by a SOAP development request from a client in the near future. Time to stock up on shamrocks.

Do Web services still loom large in your world?

David Sklar

AddThis Social Bookmark Button

XUL, for the uninitiated, is Mozilla’s XML-based UI language. You build your (client-side) interface in XUL, wire the widgets together with JavaScript, and ta-da! You’ve got a standalone application.

The PHP connection comes in when using a JavaScript XML-RPC library to call an XML-RPC server (written in PHP, in this case) to provide dynamic info to your XUL app. (Yes, you too can write your own Gmail!)

I am curious to play around with XUL, but first I need to think of an app that I could experiment with building. (And why I should use XUL instead of PHP-GTK, I suppose.)

I know little enough about XUL and about IE to wonder if one could write an IE plugin that could understand and render XUL. That would dramatically increase the XUL potential-user base.

MySQL Cluster is a shared-nothing main memory database clustering technology that MySQL bought from a division of Ericsson. It removes that pesky single point of failure from the database portion of your architecture, but it’s not a panacea — if you’ve got a lot of data, you need a lot of RAM. In a given cluster, you can store (Nodes x Available-RAM-per-node / Redundancy-level) bytes of data.

For example, if you arrange your 10 nodes in redunancy pairs (each piece of data lives in two places, so “Redundancy-level” is 2), and each node has 4Gb of RAM, then your cluster can hold 10 x 4Gb / 2 = about 20Gb of data. It’s “about 20Gb” because all 4Gb on each node isn’t really available to MySQL Cluster — the OS needs some RAM, too.

Future versions of MySQL Cluster will use memory as a disk-backed cache so your storage is bounded by available disk instead of available RAM.

After the meeting, I had an interesting conversation with Johan and Hans (who now works for MySQL) about accessing the NDB Cluster native API directly from PHP. This mode of communication with the cluster wouldn’t have an SQL parser, so you’d have to do a bit more work to build queries. With the Cluster API, retrieving data is easiest as lookups on primary keys.

This structure would make the NDB Cluster an excellent session storage handler for PHP — fast, reliable, and makes sharing data across load-balanced web server machines a snap. If you’re looking for a neat PHP/C++ coding project, I think Hans and Johan would be happy to help out anyone who wanted to work on this.

Have you worked with XUL and/or MySQL Cluster?

Jacek Artymiak

AddThis Social Bookmark Button

Related link: http://www.oreillynet.com/pub/wlg/5464

I agree with Matthew, EuroFoo was fun, inspiring, but…

Of course the main problem with something like EuroFoo, with so much going on, is that you can only be in one place at any given time. So you miss all the other good stuff.

Couldn’t agree more. Let’s hope O’Reilly start Euro editions of their confernces soon!

Uche Ogbuji

AddThis Social Bookmark Button

Related link: http://mail.python.org/pipermail/python-announce-list/2004-August/003319.html

The whole Python decorators imbroglio has everything going for it: pity, terror and farce. The players flounce from duelling polls and patches to advocacy pieces born of excessive free time. Mix in all the hand-wringing about what this means about the state of the Python community and there’s my cue to mix myself a cocktail. Brett Cannon says:


“In the old days, Guido would Pronounce, and we’d all bite our tongues
(although not necessarily each his own). The less time Guido can make
for Python, the more important becomes graceful capitulation.” Tim said
this and it makes me wish for the old days. People had *months* to
comment on decorators and no one spoke up until something went into the
language. Procrastination is not a virtue when it comes to major
language evolution discussions. What was worse was when the emails
started repeating themselves (which was pretty much from the get-go when
this exploded). Seemed like people decided to start talking without
doing some research. Granted the PEP was outdated and the wiki page was
not up yet, but this stuff was covered in the Summaries before and you
could have just Googled for the previous threads.

Personally, if I was Guido, I would have said that the community had
their chance to speak up and they just didn’t take it. But Guido is a
nicer guy than that so people are getting a second chance with this.
Personally this came off a great case of the tyranny of the majority in
my eyes. There is a reason why Python is a dictatorship.

At this point people should be hashing out which syntax alternative they
want to present to Guido on comp.lang.python_. No more talking on
python-dev, no more syntax proposals. The community should set a goal
date (Sept. 1 seems good) and just choose a bloody alternative. Then
when Guido makes his choice people accept it or just go to another
language. No one had better voice their disappoint once Guido chooses
his syntax or I will personally come beat you over with a stick for
being a whiner.

This does seem to read like whining about whining, though. After all, people want Python to be popular, and it is. This means that debates in Python will involve ghetto-blaster volume and heavy noise per unit of signal. That’s success, and it’s glorious. Not to pick on Cannon, but his comments sounds like so much Pining for the Days of Great Greeks when Guido was dictator of the Peloponnese through Mycenae. “Alas”, the bard says, “Now we condescend to this garrulous Athenian democracy”. This cacophony may be irksome to the annalists, but in this case it’s the product of a great culture.

I’ve always been happy with Python’s development. It worked well when there was a relatively small core that quickly hashed out key decisions in relative obscurity. I still think it still works well now that marathon newsgroup threads, blog jousts and Wikis string together a chaos of comment on what direction the language should take. Python has a solid foundation, and this flame war exposes more of the strengths than the weaknesses of the language and community.

What do you think about how the decorators discussion reflects on Python?

AddThis Social Bookmark Button

Related link: http://www.eurobsdcon.org/

Europe’s a hotbed of BSD development and use these days. If you’re on the Continent at the end of October, drop by Karlsruhe/Germany to meet BSD Hacks author Dru Lavigne, Henning Bauer, Greg Lehey, Soren Jorvang,
Alistair Crooks, and other famous hackers. Who knows, you may even be able to pick up our little “BSD Success Stories” booklet!

Matthew Langham

AddThis Social Bookmark Button

Yesterday afternoon I returned from the first Foo camp (for Friends of O’Reilly) held in Europe. “EuroFoo” was held over the past weekend at the University of Twente in Enschede in the Netherlands. Luckily, that’s just a 2 hour drive from where I live in Germany. One of the great things about Europe (now) is how easy it is to “cross borders”. You can really cross from one country into the other without noticing. Of course the language changes and you suddenly don’t understand the road-signs – but I digress.

First off, I’m way happy that at last O’Reilly is beginning to move some of the US “conferences” (yes I know Foo is an “invitation only” event and not so much a conference) over to Europe. I’ve ranted often enough about that in the past. And it does look as though we’ll see a European version of OSCON in the not too distant future.

EuroFoo was extremely interesting with a great mix of topics being presented and discussed by around 120 people from all over Europe who “really know stuff”. Talks ranged from “lock picking” to the “BBC creative archive” to “Bluetooth and Linux” to “Brain hacks”. Take a look at the Saturday schedule to get an idea of the diversity. In all, it seemed to me that the subjects of the sessions were slightly less “geeky” compared to what I had read about the US version. I would personally also have liked more of the sessions to be “discussion and brainstorming” affairs and not so much “lectures”. But maybe that’s just me. Of course the main problem with something like EuroFoo, with so much going on, is that you can only be in one place at any given time. So you miss all the other good stuff.

After a day of sessions it was “socializing time” over some good food and beers. At last I got to meet plenty of people I’ve only emailed and can now put faces to names at last. EuroFoo was a great event and I brought away loads of things to think about and look into in the future. Hopefully there will be a repeat event next year.

Quite a bit of information with links to pictures and blogs can be found over on the EuroFoo wiki which was also used extensively before EuroFoo to set up and discuss the sessions.

Andy Lester

AddThis Social Bookmark Button

As I go through dozens of resumes, I’m amazed by how many people still waste the crucial top two inches of their resumes with drivel like this:

Objective: A fast-paced, challenging programming position or other technical position that will utilize and expand my technical skills and business experience in order to positively contribute to an organization.

You and everybody else, buddy. Why should I give it to you?


That top of the resume is prime visual real estate. It’s the first thing I see when I open your email or Word document. I want to see a summary of who you are, and how you can help me by joining my organization.


Here’s an imaginary summary from a programmer applying for a Linux-based web development position:

7 years
professional software development, most recently specializing in Perl and PHP, including


  • Developing object-oriented Perl and PHP, including interfacing with Oracle and MySQL on Linux (3 years)
  • Creating intranet database applications with ColdFusion and Access (2 years)
  • Creating shareware audio analysis programs for Windows in C/C++ (5 years)


In just a few lines, she’s summarized the real meat of who she is and what she’s going to bring to the position. The key words for the job to hit are bolded, to make them easier to find for the reader. Note that in this case, she has not bolded “Windows”, “Access” and “ColdFusion” because that’s not something she chooses to pursue further. It’s part of her background, but not worth emphasizing.


The skeptical reader may ask “But what if she’s applying for something that’s not a Linux web position?” Then she’ll modify her resume for that job when she applies for it. Takes only a few minutes, but it’s more likely to draw the interest of the reader. You’ve got a computer, you’re flexible! Tailor the resume to the position.


The still-skeptical reader may say “But what if I’m applying for 100 different jobs?” Don’t apply for 100 jobs. There aren’t 100 jobs out there that match you and your skills. Why waste your time? But that’s a topic for a different rant….


Bonus mini-rant: “References available upon request” is also fluff. Nobody has ever said “Hmm, this guy LOOKS qualified, but doesn’t have references available. I better not bother with an interview.” Kill it.


(See also “The worst way to start a job interview”)

What other silly mistakes do people make in the quest for a job?

Derek Sivers

AddThis Social Bookmark Button

As you can see by my other posts here, I *LOVE* programming. It’s really my 2nd favorite thing on earth. But tonight as I had to do yet-another “web signup form” thing, I just found myself HATING the process.

  • new or existing?
  • existing? login.
    • login correct? give cookie & move to edit form
    • not correct - give prompt to email forgotten password or create new
  • new? create.
    • username available? create in database - give cookie & move to edit form
    • not available? give error until unique ID chosen
  • form for basic info: name, address, etc
  • if editing past info, pre-fill form fields and make [SUBMIT] button an [EDIT] buttong
  • if brand new, form fields are blank, and [SUBMIT] button is a [CREATE] button
  • Validate everything submitted, relentlessly
  • Give errors where crucial things are wrong : repeat form until correct
  • move to part two of their signup-form
  • repeat

UGH!! Anyone found an PHP-based shortcut for this dreariness?!? I can’t just cut-n-paste past forms, because each one I’ve done over the years is just different enough, that it would be harder to copy-and-change than just start anew.

But there’s got to be an easier way. This is SO monotonous. I’ve spent dozens of hours of my life doing these. I don’t want to do all this stuff again. So I keep procrastinating.

ANY TIPS?!

Those of you who have graduated from this dreariness, please enlighten the rest of us still stuck in it.

brian d foy

AddThis Social Bookmark Button

Last night I bought a “refreshed” 40G iPod for $300 from the Apple Store. The battery was run down so I didn’t get a chance to look at it until this morning.

There’s 8G of music on this thing, and I even like some of it. The problem is I can’t just hook up different iPods to my computer and copy all of my music to it. One iPod should be enough for anyone, right?

Since this music is going to disappear when I load up all of my music, I need to save it somewhere else. I mounted the iPod as a FireWire device. I already know I won’t be able to see anything interesting in the Finder, so I go straight to the Terminal. The iPod mounts under /Volumes and I can peek inside any directory that I like.

Right now I’m copying all the stuff I want to keep.


Here’s something else that’s cool: I got a federal government discount on everything I bought. On the back of my American Express I wrote in big, bold letters “ASK FOR ID”. The clerk noticed my US Army ID and gave me a big discount.

AddThis Social Bookmark Button

Related link: http://www.linuxjournal.com/article.php?sid=7735&mode=thread&order=0

Ten minutes after the space shuttle Columbia disaster, the FBI distributed contact information for all law enforcement personnel in the Houston area. Tom Adelstein writes in the Linux Journal about ERN, “… a LAMP application at the heart of the nation’s crisis management.”

Uche Ogbuji

AddThis Social Bookmark Button

Related link: http://lists.xml.org/archives/xml-dev/200408/msg00070.html

There’s an interesting discussion in progress on XML-DEV (besides the above URL, look out for other August subject lines with “constraint”), including this insightful entry by Mike Kay. The memorable kernel of his point is: “It’s not the job of computers to limit what people are allowed
to do (or the job of the IT department to regulate the business).”
The only problem with this thread is that everyone seemed to forget The Schematron: on the road to ISO standardization, increasingly well-implemented, and just what the doctor orders for constraints. Also don’t forget Jeni Tennison’s Datatype Library Language.

brian d foy

AddThis Social Bookmark Button

At the Open Source Convention, I heard a lot of Perl people bemoaning PHP 5. I’ve never really had anything against PHP. I don’t care to use it, but that’s just my preference. Some people really hate it though.

I figure that they must have something that people like if it is so popular. I figure it is easy to use and widely available. Perl was once easy to use, but lately I’ve seen a lot of complaints about how hard it is to install modules and whatnot.

What have we missed that the PHP folks clued-in on? You might be tempted to bash one side or the other, but I’d really like to hear people talk about the good things that PHP does for its users so we can learn from it (and make our stuff easier to use).

brian d foy

AddThis Social Bookmark Button

Related link: http://www.wired.com/news/politics/0,1283,64602,00.html?tw=wn_tophead_1

The people who have been commenting on or sending me mail about my post, “Apple supporters shout down Real” have consistently disagreed that no one can be shouted down in the online world. Here’s another news story though: Noah Shachtman from Wired News reports that this time it’s the Republican Party that is the target.

I suppose that the same people will say that the GOP, just like Real deserves it, so it’s not bad. Others will probably keep telling me that this doesn’t happen because the net is an idyllic place. Well, it just isn’t so.

This isn’t how I think free speech is supposed to work.

David Sklar

AddThis Social Bookmark Button

For a variety of reasons, some having to do with expanding my technical horizons, some having to do with laziness, I’ve been spending more time with Windows XP these days and less time with Linux.

Things like Cygwin have made my sojourn in the Land of Windows smoother. Another source of incredibly helpful utilities has been Mark Russinovich and Bryce Cogswell of Sysinternals. Thanks, guys!

In particular, programs like Process Explorer and TCPView have filled the grey, jagged hole created by the absence of lsof and netstat. (Yes, Cygwin comes with netstat, but TCPView is nicer.)

Any other Unix natives spending lots of time with Windows? What programs do you use to keep you sane?

Uche Ogbuji

AddThis Social Bookmark Button

Related link: http://www.pythonology.com/success

It’s nice to have quick advocacy references to convince the boos that Python is not too risky a choice in the enterprise. I do wish there were some way of winnowing out the thinly veiled promotions from Python-related vendors. My favorite is “Frequentis TAPtools® - Python in Air Traffic Control“. Nothing says “mission critical” like “air traffic conrtol”.

What are your favorite Python success stories?

Uche Ogbuji

AddThis Social Bookmark Button

Related link: http://www.javareport.com/article.asp?id=9797

I think the most pervasive problem in XML adoption is ingorance and even wilful sabotage of the international foundation on which XML is built. In several recent incidents, both in my consulting work and in my OSS/community work I have come across systems that ignore or break XML’s Unicode character model.

I’ve almost grown tired of saying it, but it is worth saying until I’ve worked through my very last nerve: the single most important aspect of XML is its character model. Ditch XML and use something else before you mess with that. A tremendous amount of damage is done by people who can’t see past the pointy brackets as the point of XML.

Yes, Unicode is hard. There is nothing to be done about this. We have a myriad of languages, writing systems and local conventions, and they complicate just about everything. That’s our wacky, wondrous world for you. Nevertheless, as a software professional in this age, there is no excuse not to buckle down and learn the rigors of i18n. I’m not meaning to be a pedant about this: I know a lot less abotu i18n than I wish I did, and I fall short of good i18n in much of my code. However, I respect the problem and I strive to work on my skills in the area, and my discipline in applying it in software development.

If you use XML in your work, please read “The skew.org XML Tutorial. A reintroduction to XML with an emphasis on character encoding“, by Mike Brown (a truly brilliant article). You might also want to check out my article “Proper XML Output in Python“. Even if you’re not a Python programmer, you might find some use in its discussion of common character problems when generating XML.

brian d foy

AddThis Social Bookmark Button

Related link: http://www.macminute.com/2004/08/17/petition

I just read Dan Gilmore’s We the Media. I was mostly disappointed in it because it was too rosy, as if RSS and blogs and all these fancy new things are great things without downsides.

I got home today and found out (through RSS and blogs), that RealNetworks tried to shame Apple into opening the iPod for other content providers. They posted a petition to their site, but got a virtual group of hooligans shouting them down by flooding their petition with pro-Apple sentiment.

I really like Apple, and I’ve said before that I think they are being stupid in this dispute with Real, but that’s not what bothers me.

Blogs and online things have the same problem as any other media: a small and dedicated group of vocal people can shut down the discussion, just like people show up at Bush or Kerry rallies to chant their messages so the speaker can’t speak. Freedom of speech or information means not only do we get to say what we want, but we have to let other people say what they want.

Other problems, like comment spam and astro-turfing, are other big problems. Any medium that makes it easy to get out good information makes it easy to get out bad information, too.

Can we educate the people about the downside too? I find too often that advocates or new technology, and even those of open source, ignore the problems. If we really cared about free information, we would acknowledge them.

Derek Sivers

AddThis Social Bookmark Button

Related link: http://www.loudthinking.com/

My award for beautiful coding goes to David Heinemeier Hansson.

Go download, install, and run Instiki. (If you don’t have Ruby 1.8.1 installed, it’s worth updating to it just to run Instiki.)

After you’re amazed (will take only 1 minute) go to Rails. Watch the 10-minute video. Close your mouth: it’s open.

Then go set up a free account at Basecamp. Add some schedules & deadlines. Play around a bit.

Absolutely brilliant. All of it. Did the beautiful language of Ruby inspire his style, or was it just a match meant-to-be?

I can’t believe the stuff that David’s done, and this is all just in the last 9 months or so!

I think he’s my new favorite author.

Have you seen? Do you agree?

brian d foy

AddThis Social Bookmark Button

Related link: http://www.bugmenot.com

I ran across BugMeNot.com this weekend while I was researching some bits about the Times web site. The Times wants everyone to register, even to view their free content, and a lot of people simply create a false identity to get a login.

BugMeNot.com simply collects from its users all of those false logins. Now anyone can use them. Never have to remember your Times login again.

They even have IE and Firefox extensions to make it easy to use.

Fear not pay-for-use sites: BugMeNot.com says that they will not list logins for your site if you ask them not to.

Those wishing to debate this may want to read Adam Oram’s “Before you speak of information pirates”, or the lively (though mostly uninformed) discussion at Poynter.

Andy Oram

AddThis Social Bookmark Button

People who casually use the term “piracy” to refer to the unauthorized exchange of copyrighted music, movies, books, and software would gain a deeper understanding of the terms they use by picking up the highly readable book Villains of All Nations: Atlantic Pirates in the Golden Age by Marcus Rediker. This recently released study (Beacon Press, ISBN 0-8070-5024-5) describes the lives and political significance of pirates at the period of their greatest growth during the early eighteenth century.

Pirates, in Rediker’s analysis, were more than just thieves. They created an alternative way to regard work, society, and life’s pleasures in an economically and religiously repressive age.

By the eighteenth century, pirates–their ranks fortified by political dissidents and utopian communalists–had created an on-board ethos of democracy, sharing, and mutual insurance. (They created the earliest social security system.) This is in contrast to the military and trading ships of the day, ruled by absolutist captains who cheated their staff, kept food and water rations criminally low, and freely employed the whip.

The pirates treated people of all races equally, in contrast to the racist practices of their opponents that reached its extreme in slave trading. The pirates admitted women to their ranks and apparently were sexually loose.

The pirates spoke consciously and articulately about the oppression of sailors and others by the sinfully rich capitalists and traders of their time, and refused to be placated by the religious platitudes of such status-quo philosophers as Cotton Mather. (In fact, Cotton Mather admitted to some extent that the pirates were right.)

Rediker does not prettify pirates. He says forthright they were not just bandits and murderers but also terrorists–in the sense that they used violence to create fear and bend others to their will. Still, they possessed a sense of justice and chivalry that is usually missing from modern military engagements.

Pirates were dissolute, destructive, and often drunk. But this represented an excess of their basic vision of freedom: freedom from masters, freedom from the fear of sin, freedom from hunger.

Is it difficult to find a common thread between the villification of eighteenth-century pirates and the villification of people who trade or illegally sell music, moves, books, and software today? Like the old pirates, the information traders create a bounty from the work of others (the artists and writers). But at the same time, they create a new vision of information democracy that contrasts positively with the control freaks and commercial cynicism of the mainstream media conglomerates.

Information traders promote diversity, by allowing people to sample dated and unusual works. In an age where radio stations and movie studios bend their offerings to the profit-based goals of an increasingly small number of owners, this is crucial. Information traders also allow communities to form around works–something studios would like to do but are usually too controlling and hidebound to carry off.

Do information traders hurt the industry, as studios and software manufacturers like to claim? Well, revenues for music and movies are going down. But figuring out what lies behind that statistic is a tough undertaking.

It could be–as many claim–that people aren’t buying much because studios are just suppressing innovation and desperately putting out warmed-over imitations of the same lousy junk year after year.

It could also be–as others claim–that in a bad economy, people aren’t so willing to pay the inflated prices charged for the CDs and movies.

Or it could be–as the studios claim–that people use shared or illegally sold copies instead of paying their fair royalties. This claim has to be weighed against a massive amount of anecdotal evidence–such as everybody I’ve heard talk about their downloading–that says people buy more CDs when they get a chance to sample music online for free. Information traders therefore drive forward the entertainment industry. Low-cost authorized music services may eventually take advantage of this trend. But it’s hard to imagine any authorized service offering the wealth of obscure and challenging works one can get from unauthorized networks.

In emerging economies, anyway, the main source of infringement is not peer-to-peer downloading, but conventional copying and distribution. This phenomenon should have been considered by music and movie executives when digital media first emerged; anyone worth his six-figure salary would have prepared a business case to deal with it.

Villians of All Nations, in showing the environment that created, and was in turn created by, the illegal behavior of one generation, provides much food for thought in our own age, whose direction is increasingly dominated by a wide range of illegal behavior: undocumented immigrants, squatting, drug dealing, arms smuggling, money laundering, terrorism, and–yes–actual sea-based piracy. But in particular, Villians of All Nations can deepen the debate around unauthorized information trading.

Is there an upside to piracy?

Uche Ogbuji

AddThis Social Bookmark Button

Related link: http://creativecommons.org/weblog/entry/4360

You’ve heard about INDUCE, right? It really is going down this time. Even though it’s still in committee, the atmosphere seems to indicate that a worrying proportion of the US Senate may have damned near lost their minds. In its annihilation of personal liberties, this bill could dwarf the DCMA. Apparently there is wariness even within the “creative community” big media claims as clientele (and big media shows every arrogant presumption in the way they use that phrase). A coalition of musicians has written a letter of concern to the committee. Let’s hope this helps kill it there, or let’s be ready for an all-out fight if this one hits the Senate floor.

What are the best ways to help defeat a bad bill while still in committee?

Uche Ogbuji

AddThis Social Bookmark Button

Related link: http://www.paulgraham.com/pypar.html

Apparently in his article “Great Hackers” Paul Graham caused a storm with the following comment: “The programmers you’ll be able to hire to work on a Java project won’t be as smart as the ones you could get to work on a project written in Python.” I don’t hang abut Java circles so I wasn’t aware of any controversy. Graham’s off-hand comment was interesting, but in clarifying his thoughts, I think he has really written an on-the-money essay. Of course, I can’t imagine it will mollify many of those who were originally offended.

You you think some languages attract better programmers than others?

brian d foy

AddThis Social Bookmark Button

Related link: http://www.wired.com/news/mac/0,2125,64563,00.html

Leander Kahney of Wired News reports that Adam Engst (the TidBits guy that Mac users probably already know about) calls his new straight-to-PDF, free updates publishing of technology books “extreme publishing”. (Adam is going to talk about this at the Mac OS X Conference in October.)

That’s what I was calling it two and a half years ago when I started The Perl Review. Indeed, google “extreme publishing” and my February 2002 article is the first result.

Instead of starting with a print magazine, we just made a PDF. There were no locks or passwords or access control, and people could pass the files around as they liked. We updated the PDFs when we spotted errors or had new information that affected the articles. After a while we asked for $2 donations if readers liked what they got.

It worked to the point that people wanted it on paper too. :)

brian d foy

AddThis Social Bookmark Button

Related link: http://jobs.perl.org/job/1548

A recent post to the Perl Jobs list asks candidates to solve a puzzle to demonstrate their Perl skills. The clever and devious candidate can solve this without knowing Perl though.

In case the job post disappears or changes, I cite the relevant text:

If your resume alone doesn’t indicate that you’re a totally kickass hacker, you’ll have a much better chance of getting a response if you attach a solution to the following question:

Given a string of arbitrary length, write a perl program that will print out the palindrome(s) of longest length in the string. Assume there are no special characters, so “!c aba c!” would be considered a palindrome; also, in “abcbb”, “bcb” would be considered a palindrome. Assume the string is coming in via STDIN.

The devious solution is much like the hack to get around these websites that ask you to look at an image and type in the word that you see in it. Those websites want to ensure that real people are submitting the form, and they want to block ‘bots. For instance, people should not be able to write ‘bots to gobble up all of the tickets to the next big concert.

But what if you wanted to get past this? Just present the problem to someone else. You create another website where you get people to register, and you expect high traffic. (Temporary Adult-content sites are just the ticket, and you only need the site for the duration of the exploit). You get the image from the form you want to subvert and display it to the person trying to register on your own high traffic website. They type in the answer, which you then use as your answer to the original website. I’m not aware of a formal name for this technique, but I call it either “Man on the side” or “Innocent bystander”.

But, back to the original job posting. A poster calling himself only “BUU” on Perl Monks posted the problem without reference to its source, and he got a lot of replies. Now, he may have just flubbed this by forgetting to include that he saw this on a job posting, but it still illustrates the possible danger: he could solve the problem without being qualified for the job that asked for its solution.

I thought at first that the job posting had a new, cool way to filter candidates, but the devious ones (like the ones who put 4 years experience with Perl 6 but aren’t either Damian Conway, Larry Wall, Allison Randal, or Dan Sugalski) can still get past the filter, and they may be that cause more headaches than the patently unqualified because they appear like good candidates at first. The interviewer still has all of the screening burden he had before.

In this case, everything seems to turn out not so badly. The job poster actually reads Perl Monks, so they know which solutions people suggested. But that brings to mind another devious angle: what if I had to solve a problem and I posted it as part of a fake job posting? There is only the promise of reward, and one that I don’t even have to deliver!

brian d foy

AddThis Social Bookmark Button

Related link: http://www.anomaly.org/cgi-local/mt-tb.cgi/66

This morning I got a scathing email about The Perl Review, mostly because the guy doesn’t realize I’m not CMP (publishers of the other Perl magazine, The Perl Journal) and it’s just me and a handful of volunteers. I felt pretty bad about that until lunch time. I should take cues from my opera-singing wife. She ignores the occasional bad review.

Then I discovered, through Google Alerts, that G. Wade Johnson had said something nice about our little magazine:

It contains good, solid information about solving problems with Perl. Unlike many magazines, it does not take itself too seriously. This combination of useful information and light-hearted attitude makes it a joy to read.

I think that cancels out any three bad emails.

Andy Oram

AddThis Social Bookmark Button

Related link: http://www.ariadne.ac.uk/issue40/coyle/

Most of us remember the battle to let us

read Alice in Wonderland aloud
.
That was just an entracte in Digital Rights Managements’ theater of
the absurd. A more consistent story line is the battle to preserve
libraries in the digital future. A key loss in that arena has been
reported by my colleague Karen Coyle, a librarian and long-time member
of
Computer Professionals for Social Responsibility.
The article referenced at the top of this blog summarizes the values
behind digital rights management and how libraries get left out.

Karen has been tracking standards in online media and digital rights
management for several years, and has protested with alarm as the
right to loan books slipped out of evolving standards.

The right to loan materials for a limited time had a history in
several online standards, including the eXtensible rights Markup
Language (XrML) controlled by a ContentGuard, a company owned by
Microsoft, Time/Warner, and Xerox. (So far as I can tell, W3C has no
hand in any of this, despite the appearance of the name XrML).

But then usage rights took an odd turn. First, usage rights were taken
out of the core XrML standard and reduced to an extension. Then the
Motion Picture Experts Group (MPEG) developed their own list of rights
and quietly removed the right to loan. The work of the MPEG committee
goes far beyond films because is is turning into a model for rights
throughout a wide range of media, notably the
Open eBook Forum.

It took some tedious reading of standards and a lot of back-and-forth
discussion with MPEG standards developers for Karen to confirm that
the MPEG rights expression language indeed did not include the right
to lend, which is part of the rights recognized by American law as
“rights of first sale.” The publishers and studios don’t seem
particularly proud to eject libraries from the digital future. But when
pushed to justify themselves, I could imagine them saying something
like, “You don’t need a library when you can download the content from
us. We’ll give you a good deal on a license for limited viewing.”

And I would expect just such an excuse from people trying to impose
their commercial view of culture on the rest of us. If you want to see
Spiderman II one evening, a license from the movie maker
could well replace a local library (which you indirectly pay for
through taxes). But try imposing that restriction on a inner-city
school student who finds she has to insert fifteen references in a
paper she’s writing in a single week. And how much does someone have
to pay when he’s used six hundred references in his thesis and then
has to review them all a year later before his thesis defense?

These same publishers and studios would probably be happy charging
everybody in a church, public board of directors, or study group to
view a bit of content that one person saw and thought was relevant to
a pressing issue they were all discussing.

For nitpicking details (which make interesting reading) on this topic,
see Karen’s
history.
MPEG’s attempt to wrench us away from open scholarship and public
discourse is not a pretty picture.

Should our rights be set by laws or by encrypted protocols?

Uche Ogbuji

AddThis Social Bookmark Button

In an earlier entry I mentioned the fact the SessionSaver extension does not work with Firefox 0.9.x, and I posted some quick-hack code to restore a sessionby brute force. I’ve learned via
ieremiou ” on MozillaZine that a version of SessionSaver packaged for 0.9.x is now
available, thanks to the efforts of Samir Boulema. I’ve tried it. It works. I’m relieved. I owe Boulema (as well as original authors “pike” and “rue”) a drink. SessionSaver was the development that finally made it possible for me to ditch Galeon for Firefox. Now if someone were to get Tabbrowser Extensions working reliably with 0.9.x, and alongside SessionSaver, I’d be happy as a lark.

What are your favorite Firefox extensions that you wish worked with 0.9.x?

Derek Sivers

AddThis Social Bookmark Button

Related link: http://c2.com/cgi/wiki?DontRepeatYourself

Question for programmers:

How do you know when you’ve found the right solution?

This weekend I was working on one of the toughest but most satisfying projects I’ve ever done. Everything was coming together beautifully. Things that had been messy problems for 8 months were all getting neatly solved using best practices (especially D.R.Y.) - I was really on a roll.

… and then I got stuck on a function that looked like this:


function blah($id, $rare_option='n', $seldom_used='', $something_else='', $ugly='') {
  switch($id) {
    case 'a':
      return $id . 'y__p' . $rare_option;
      break;
    case 'b':
      return $seldom_used . 'x|x|x' . $seldom_used;
      break;
    case 'c':
      return 'CDB_12345' . $something_else . $rare_option;
      break;
    case 'd':
      return $ugly * $ugly - $seldom_used;
      break;
    }
  }

(The above example is fake. The real function needed to create output filenames based on partner-company preferences, of which there are 5 or 6 different formats, based on different information inside the file.) I spent almost an hour trying to simplify it, but unfortunately that was as far as I could get. It was a drag to leave something ugly like that, knowing I’m going to have to look up the function every time I use it in the future, to find out what list of variables I’m suppsed to pass it, and in what order.

Which got me wondering how other programmers handle this situation: when you’ve written something that WORKS, but goes against your good taste in design. Is the ugly solution ever the best solution? Is it not right until it’s as simple as possible? I keep thinking that ugly solutions are always a sign of the wrong approach. Is anything that works "good enough"? Or do you strive to find the truly beautiful solution to everything? Thoughts, anyone?

Thoughts, anyone?

Mark Finnern

AddThis Social Bookmark Button

Related link: http://www.futuresalon.org/2004/07/computers_and_d.html

In this month’s Future
Salon
Drs. Chorost and Lynch will discuss the present state of neural technologies
for treating deafness and their likely future. Dr. Chorost will open by explaining
how the most advanced neurostimulation technology on the market, the cochlear
implant, enables the deaf to hear. Dr. Lynch will follow with a discussion of
pharmaceutical technologies which may actually prevent and cure deafness.

Thursday 12th of August 7-9pm: SAP Labs North America, Building D, Room
Southern Cross, 3410 Hillview Avenue, Palo Alto, CA 94304 [map]
Free and open to the public.

A true cure for deafness is probably years away, but in the meantime computers
(that is, cochlear implants) and drugs (that is, pharmaceuticals) may soon work
together synergistically to produce far more effective treatments for deafness
than are available now. The speakers will go back and forth brainstorming on
how such a synergy might come about. The authors will supplement their talk
with fascinating photographs and animations to explain how these cutting-edge
technologies work. At the heart of their talk is the idea of the "cyborg",
the human being whose body is directly controlled by implanted computer technology
and pharmaceutical interventions.
About the Speakers

Dr. Chorost’s new book, “Rebuilt: How A Computer Made Me More Human”
will be published by Houghton Mifflin in 2005. It is a memoir of his experience
going deaf and getting his hearing back with a cochlear implant, and discusses
at length its science and technology. He has a B.A. from Brown University and
a Ph.D. from the University of Texas at Austin. He currently works as a researcher
in educational technologies at SRI International in Menlo Park.

Dr. Lynch is Director of Research at Sound Pharmaceuticals in Seattle. He completed
his PhD at the University of California, Berkeley, where he mapped the first
human gene for hearing loss. During his post-doctoral studies at the University
of Washington, he served as a Research Assistant Professor in the Division of
Medical Genetics and helped to identify and characterize the first genes for
breast cancer and brain cancer. He co-founded Sound Pharmaceuticals in 2001
with the goal of creating drugs to prevent and reverse hearing loss.

Christopher Allen also comments,
that Mike is a great presenter:

I heard Mike at the last Sylvia’s Cybersalon. He was a great speaker,
and his presentation was very effective. Plus he was sort of a live demo —
for instance, he would pull away the transceiver to his implant to show how
it was magnetically attached to his skin, or attach the input to a cell phone
to show how he can directly hear his cell phone (and ignore the rest of the
world.)

As usual, there will be a round of introductions at the beginning and big discussions
during the talk that will continue on over dinner somewhere in Palo Alto. Hope
you can make it.

Derek Sivers

AddThis Social Bookmark Button

Related link: http://dereksivers.com/src/recursive.phps

Tiny little satisfying bit of PHP code: recursively doing something to every value in an array.

I use PHP arrays a LOT. Everywhere. All the time. So when I needed to go do something to every value inside an array, it was one of those satisfying 60-second brain-teasers.

(In this example, below, I’m encoding the strings into UTF-8 format, but it could be any function at all.)


<?php
function array_to_utf8($array)
  {
  # recursively convert every value in array to UTF-8
  foreach($array as $key=>$value)
    {
    $value = (is_scalar($value)) ? mb_convert_encoding($value, 'UTF-8') : array_to_utf8($value);
    $array[$key] = $value;
    }
  return $array;
  }
?>

See it pretty at: recursive.php

Just thought I’d share it with the O’Reilly readers in case it’s of any use to you.

Got another use for this you’d like to share? Another approach? An easier way?

Derek Sivers

AddThis Social Bookmark Button

Related link: http://www.fastcompany.com/online/51/goodtogreat.html

Say no by default - in design, business, and even life.

Simple is beautiful.

Instead of doing something "because you can", consider thinking "only if necessary".

Today I read this article about a 35-year-old guy in New York City that decided to live for 10 days without using any technology not in use in 1954. What struck me the most is how addicted this guy was to silly unnecessary technologies that don’t really improve his life. He complains about…
- not being able to book his movie ticket online, having to go to the movie theater early to get a ticket.
- having to use the phone without a headset
- not having caller ID to screen his calls : having to pick up when it rings, without knowing who it is.

Yesterday we were talking at work about whether CD Baby should expand into offices around the world, and we finally stopped to ask, "is it necessary?"

Yesterday I read Jason Kottke’s article called "How Not to Buy Happiness" where he said, "I rarely buy a "better" version of something I already have…I’m a very suspicious upgrader, even when it comes to software."

Say no by default - in design, business, and even life.

In June of 2003, Steve Jobs gave a small private presentation about the iTunes Music Store to some independent record label people. (Read my notes, here.). My favorite line of the day was when people kept raising their hand saying, "Does it do ___(x)___?", "Do you plan to add ___(y)___?". Finally Jobs said, "Wait wait - put your hands down. Listen: I know you have a thousand ideas for all the cool features iTunes *could* have. So do we. But we don’t want a thousand features. That would be ugly. Innovation is not about saying yes to everything. It’s about saying NO to all but the most crucial features."

CD Baby gets a dozen offers a day from companies that want to partner, people that want a job, and entirely new businessess that people say we should get into.

As a business, you have to say no to anything that is not
(1) enjoyable
(2) profitable
(3) possible for your business to be the best in the world at
(For more on this, read the Hedgehog Concept from the book Good to Great by Jim Collins.)

As a designer (of software, websites, products, whatever) - you have to say no to all but the few most needed features.
(Though a great example of giving tons of features, while keeping them hidden, is Mozilla’s about:config option. Making the inner guts easily tweakable by that 1% of users that cares enough to go tweaking.)

As a person, you have to say no to everything you don’t need.
(yeah it’s debatable but you get the point)

The most beautifully-designed products have very few features.

The most beautifully-designed businesses specialize in being the best in the world at something.

The most beautifully-designed people… uh… you can finish that joke yourself.

Uche Ogbuji

AddThis Social Bookmark Button

Related link: http://blogs.sun.com/roller/page/kristenh/20040806

Despite all the resources they have for public communications, large organizations often have even more trouble than small ones in customer-friendly communications. This is because they have a distinct culture which is not usually shared by the majority of customers, and also because short-term business priorities often leak into longer-term considerations such as how we want the audience to fundamentally think about products and services.

Kristen Harris is Fourthought’s client contact/manager as we consult to Sun Microsystems, and she has led us in a number of projects in which we’ve tried to make sure names used in data models truly represent the essence of the product and service information we’re modeling. By putting this much care into the foundational data models, clean and clear labels rise to the top for use in Web communications. The desired result is when customers needn’t be “in the know” in order to quickly glean what they need form Web content. Incidentally, the backbone of the data modeling we’re involved in is Sun’s XML, RDF and Web services-based system, SwoRDFish, which I have mentioned here in the past.

I am always going on about the importance of names in data models (e.g. see here and here), but as Kristen indicates, effective naming in an enterprise setting is more easily said than done. The important thing is that Web publishing professionals never stop trying.

Please share your own experiences with names and labels for customer communications.

Derek Sivers

AddThis Social Bookmark Button

Man I love making toolboxes.

Combining all your junky functions into organized tools is like going through your messy garage, putting what you need into boxes, and throwing out the rest.

Here’s how it usually goes:

1. I write some quick script to get the job done ASAP.
2. At the top of that script I write a little function I needed at that moment.
3. Next time I’m writing something quick, I remember that little function, and I go cut-n-paste it into my new script.
4. A year later that little function is used in 20 different places.
and then…
5. Some day I finally put that function and a couple related functions into a tool-file, to be included whenever needed. While doing so, I realize some way it could have been written better all along, and I clean it up.

Here’s one:

—— FILENAME: ShellTools.php

<?php
/* SHELL UTILITITIES for interactive PHP command-line scripts */

function stdin($length = 255)
  {
  $fr = fopen('php://stdin', 'r');
  $input = fgets($fr, $length);
  $input = rtrim($input);
  fclose($fr);
  return $input;
  }

function stdout($message)
  {
  $fp = fopen('php://stdout', 'w');
  fwrite($fp, $message);
  fclose($fp);
  }

function answer($question, $length=255)
  {
  stdout($question . ' ');
  return stdin($length);
  }

function arg($num, $description = 'something', $required = false)
  {
  $response = (isset($_SERVER['argv'][$num])) ? $_SERVER['argv'][$num] : '';
  if(($required != false) && ($response == ''))
    {
    die("needs $description as command-line argument #$num\n");
    }
  return $response;
  }
?>

——-

What does this ShellTools.php solve?

Most of my command-line PHP shell scripts needed some kind of interaction.
In FreeBSD, for some reason, PHP’s "print" or "echo" commands wouldn’t display anything on the command-line until after the script was done! No good for interaction. So I had to use the stdout.
Now it’s as easy as using:
<?php
require 'ShellTools.php';
stdout("hello");
?>

Also, I was often using variables passed into my script on the command-line, like this:
php some_script.php FileName.txt
At the top of all those scripts, I was always writing something that would be looking in the command line for something, and giving an error message if it wasn’t there.
Now it’s as easy as this:
<?php
require 'ShellTools.php';
# true means it's required. die without it:
$filename = arg(1, 'filename', true);
?>

If I forget to include the filename, it nicely tells me:
"needs filename as command-line argument #1"

Lastly, for real shell-script interaction, my scripts ask questions.
This is where all that stdout and stdin comes in handy:
<?php
require 'ShellTools.php';
$name = answer('Your name?');
$city = answer('What city?');
stdout("Bake me a cake, $name - I'm coming to $city!");
?>

I know this stuff is super-basic for many of you, but it’s only because I used a super-basic example here. But the last two days I just spent about 20 hours going through months of old messy duplicated code that really runs a significant part of our daily operations, and extracted ALL the common stuff into just a couple shared classes.

What a difference! These scripts are so much cleaner now! So much easier to manage and change in the future. So much easier to find a way to improve a single function and have ALL scripts improved by it.

Know what I’m sayin’?

Andy Oram

AddThis Social Bookmark Button

Related link: http://linuxworldexpo.com/live/12/events/12SFO04A

Two days ago I laid out
questions
that I would ask exhibitors and attendees at LinuxWorld 2004 in San
Francisco. Some of my questions required too much intense technical
discussion, considering that LinuxWorld is a vendor’s event. But when
I did manage to find people with the requisite marketing or technical
insights, here are the answers I came up with.

Desktop

A number of attendees were surprised to see InstallShield (a company
bought by Macrovision) at LinuxWorld. InstallShield, because its
splash screen displays whenever a Windows user installs new software,
is one of the most recognized brands in computing after Microsoft
itself. But InstallShield has had cross-platform install tool for
several years. Promoters of desktop Linux should welcome the
brainless simplicity InstallShield brings to software installation.

configure; make; make install” puts binaries and libraries
in appropriate directories. Packages go further and record
dependencies on other software (until, as I’ve found so often, the
package management system corrupts its own database). But even after
installing a package, you still have to do such routine house-keeping
as adding an item to a menu or setting up the application to be
triggered automatically by a click on the right file.

Free software developers should be able to figure out how to do what
InstallShield does, but they don’t feel the need and don’t see the job
as a sexy one. So it’s nice to see InstallShield here, and to find out
that it’s drawn a lot of interest from commercial software vendors
thinking of providing Linux products.

Power

Some rivalry around the 2.6 kernel has popped up. Everybody is fairly
agreed that it’s a major step forward for Linux and provides a much
better experience for data crunchers, servers, and desktops alike. The
question is: how much 2.6 is enough?

Red Hat, eager to bring out Red Hat Enterprise Linux, back-ported 2.6
features to its version of the 2.4 kernel because 2.6 hadn’t been
released yet. SUSE (I think I can still call it by that name–Novell
is not yet ready to retire it) came out a bit later and therefore ran
2.6, plain and simple. Naturally, Novell claims that’s more reliable.

IBM, which markets both Red Hat and SUSE, finds 2.6 multithreading,
asynchronous I/O, and scaling to 16 processors to be particularly
valuable. These features are useful for large databases such as DB2
and Oracle, as well as enterprise applications such as SAP and
PeopleSoft.

My conversation with IBM focused entirely on these big-metal
applications. Surprisingly, while vendors still promote the idea of
Linux on the desktop, I see less hype about it at this show than at
the past couple LinuxWorlds. The vendors seem to be looking for loot
in the areas of servers, databases, and massive data storage.

Take, for instance, Unisys, one of several companies that one is
surprised to see reinventing themselves and participating in this
show. Their product provides anywhere from a few tens of gigabytes to
many terabytes of storage with dynamic repartitioning. (If
/home fills up, just add more space.) Unisys claims to be
commoditizing–that is, providing on the x86 and Linux–a large and
flexible storage solution that up till now was available only on
high-cost hardware and proprietary operating systems.

Another example of competitors in this space is Pogo, which offers
RAID in a box to Linux, along with server and cluster products.

SnapAppliance creates a NAS controlled by a Linux box and storing up
to 30 terabytes over Ethernet and iSCSI. They claim to be the only
commercial NAS using Linux. And their product is certified by
Microsoft–thus allowing Linux to go thigh-by-thigh with Microsoft
systems.

I asked in my
earlier blog
whether compiler optimizations could compensate for bloated programs.
The open-source PathScale EKO compiler suite (distributed by AMD, but
also used by Intel and Sun) is reported to achieve 15 to 40 percent
improvement over its competition, including gcc. PathScale
includes such advanced optimizations as inter-procedural analysis.
(This means the compiler can look across multiple functions to look
for ways to conserve values of constants or reuse code, whereas most
compilers stop optimization at the boundary of a function.)

PathScale is an interesting case of the power of free software to
spread. Its core, where the most powerful optimizations occur, was
developed by SGI and released as free software. AMD ported the
back-end to Opteron, and added a front end to provide all gcc
options.

It should also be noted that the Portland Group has a new version of
PGI Workstation, numbered 5.2, which shows an average gain of 10% in
optimization over the previous version, and as much as 25% gain on
many popular applications

Availability

Xandros demonstrated their determination to take their desktop Linux
to the enterprise by showing off their installation system. Like
several other vendors, they want to make it trivial to distribute an
operating system, an application, or an update to dozens or hundreds
of systems.

Even easier, perhaps, than distributing software is to keep it on
central servers and put users on thin clients that run all software
over the network from the servers. This is the goal of the non-profit
Linux Terminal Server Project, but there are commercial vendors with
similar schemes in mind.

Wyse, famous for the green screens of the pre-PC era, has reinvented
(and rereinvented) itself and comes to LinuxWorld offering thin Linux
clients. These come fully loaded with a 2.6 Linux kernel and all the
software needed to boot (so that administrators need to perform only
standard configuration on their servers). The new Wyse 5150 has lots
of ports, runs an x86-compatible AMD Geode and is sold for a few
hundred dollars. As a thin client, it works equally well with a
Windows or Linux server.

Wyse estimates that, of the 1.5 million thin clients sold per year,
20% run Linux. The market for thin clients is currently growing at an
annual rate of 60%. Government, finance, travel, and retail operations
are Wyse customers. The systems also meet the
requirements for 17-inch true-color displays at many European sites.

Education

The Linux Professional Institute–which has delivered over 59,000
exams, and won the Linux Journal award for best certification program
so consistently that the journal discontinued that award–is now
considering a range of desktop certification exams. They inquired of
desktop Linux vendors how these companies expected new users to get
the training they need to jump in productively, and discovered that
the companies had no plans or suggestions to offer. But there do seem
to be training programs that provide such material, and LPI is trying
to promote these programs.

Legal

Still looking over your shoulder at possible lawsuits concerning free
software? Indemnification is offered by Novell and others. Open Source
Risk Management, having decided the SCO threat is toothless, started
looking at patent problems. Their findings, announced August 2, claim
that 283 patents might be used in the future to threaten Linux. None,
however, have been validated by the courts, so they might well be
dismissed as trivial or obvious if used. The finding might seem
self-serving, because it supports the OSRM offer of indemnification,
but it seems to me balanced and free of fear-mongering.

The other side of copyright infringement is the frequent unauthorized
incorporation of free software into commercial products. Karen Faulds
Copenhaver–Executive VP and General Counsel for Black Duck Software,
which provides companies with tools for finding infringement in their
own code–points out that corporations may find it increasingly
worthwhile monitor their software use because their source code is
getting wider distribution. Inspired by the free software movement,
many customers are demanding source code when they license commercial
software. (This very impetus lies behind Microsoft’s shared source
program.) Since more eyes will be able to see the vendor’s source
code, the possibility increases that copyright infringement will be
found. Let’s hope that free software continues to spread and that
proprietary software vendors feel the need to show good citizenship.

Uche Ogbuji

AddThis Social Bookmark Button

A few recent blogs in this forum have left me rather bemused (and have lit up the comment boards). Attacks on and dismissals of the leading OSS projects such as Linux and Mozilla have really settled into rearguard mode. If I cared to read between the pundits’ lines, It might seem to me that OSS has completely up-ended their world-view. But the worry of pundits notwithstanding, it’s clear to me that while commercial software will always be with us, and complementary to OSS, the game is indeed over for buggy, insecure software that shows contempt for open standards. The reality is that this characterizes a great deal of Microsoft’s software.

I’m now used to the pattern, and it’s fun to watch. I started using Linux in 1996. Back then no one had heard of it. By the time I attended my first (and only) LinuxWorld in 1999, everyone had heard of it, but all these same pundits said “Linux can never, in any way make a dent in MS Windows.” Now they’ve changed their tune. They’ve conceded the server to Linux, but “Linux can never make a dent in MS Windows on the desktop.”

When Mozilla first came out, pundits said that Microsoft’s comprehensive defeat of Netscape meant that any challenge to IE was foolhardy. One year into Mozilla they said “what is this bloated mess that after one year still hasn’t produced a decent browser? The Mozilla Project is dead” After Mozilla 1.4 and up started to prove superiority as a browser framework, the tune changed to “Mozilla is a neat browser, but you can’t beat what comes on Aunt May’s desktop”. Now that MS IE is under assault from black hats as well as users (such as Aunt May’s nephews and nieces) tired of its powerlessness against black hats, the tune is now “well MS IE is an insecure mess, but just you wait till the black hats go to work on Mozilla.” (n.b. Negative energy doesn’t solve problems.)

Of course at one point Apache was no match for the mighty IIS, OpenOffice was just the latest victim generation of the MS Office juggernaut, and so-called “scripting languages” were no use for enterprise software development. Lest I forget, Apple has always been on the threshhold of death at the hands of MS. It’s time to roll a lot of those crystal balls into the bay already.

I suppose Microsoft boosters haven’t learned how dangerous it is to wave the red flag of challenge in front of developers who are already well motivated to produce better solutions than those of complacent incumbents. Conventional wisdom loses campaign after campaign, but keeps on as if the ultimate containment of OSS is inevitable. Only time will tell, but recent history has been very kind to people of my persuasion.

Andy Oram

AddThis Social Bookmark Button

Related link: http://linuxworldexpo.com/live/12/events/12SFO04A

The Statue of Liberty reopens to great fanfare today, while the Afghan government announces it is readmitting former Taliban members. Thus do the symbols of freedom get promoted with increased zeal while its reality vanishes.

Promises of freedom with Linux are being promoted a great deal these days. At LinuxWorld 2004 in San Francisco, I’m going to be exploring the promises and trying to find where we lie along the scale of reality. In many areas, the important foundations have been laid–but a lot remains to be done.

Desktop

Linux provides a wonderful foundation for the desktop; the number of applications it can simultaneously run without halting makes it an ideal platform. I have occasionally had my screen freeze while running a desktop on Linux, but the system itself never crashes. Questions I’m asking at this conference include the following.

What are desktop and application developers doing to avoid bloat? How few features can they get away with?

Do applications work smoothly together without the user having to think about it? If I click on an .html link in an email message, will the right application pop up? How about a PDF? A WMA audio file?

Will all the accelerator keys work when I run a graphical application?

Will OpenOffice.org 2.0 resolve the promised list of Microsoft Office compatibility problems? Will it run Windows macros or permit them to be converted easily to OpenOffice.org macros?

Will free software developers break open the Exchange protocols so that Linux systems can interoperate with Exchange, and perhaps even replace it entirely?

Will free software developers get past the proprietary restrictions on new power management systems and allow them to work on laptops?

Unbreakable

Linux has reached an enviable state among operating systems: hard to penetrate and even harder to subvert. Crashes almost never occur and bugs are fixed quickly. The job now rests on applications (as well as general-purpose utilities such as OpenSSH) to avoid buffer overflows and other flaws. One assumes Oracle is doing their part. Questions I’ll ask include the following.

Are the filesystems up to handling massive and demanding database management systems?

Is it easy to configure logical volumes and SANs? To add capacity?

Can Linux protect the other, more vulnerable systems lying behind them from viruses and the exploitation of software flaws?

Power

Linux is poised to meet the needs of the enterprise and the laboratory: it has been ported to 64-bit chips and its symmetric multiprocessing is almost uniformly implemented.
I’ll be asking the following questions.

Are major applications being ported and compiled on 64-bit chips? How good are the compilers?

Can 32-bit applications see a substantial speed-up on 64-bit systems?

Embedded

Linux is growing in popularity on embedded systems, and a number of consortiums have lined up behind embedded Linux. These tend not to be present at LinuxWorld, but if I can find representatives of these companies or developers I’ll ask questions such as the following.

Can Linux get small enough to be useful on a wide range of systems?

Will developers take advantage of the features Linux has to offer: networking, multiprocessing, graphics?

Will a fully open and usable real-time system be offered for Linux?

Will Linux conquer its promised lands, such as consumer electronics and telecom?

Availability

What happened to Walmart Linux? Why is it so hard for major computer vendors to break away from the Windows monopoly?

What distributions will be available to people who want to run something more demanding than a desktop, who don’t want to run distributions that make them flip the switches on their machines with their teeth, who can’t afford enterprise-level licensing fees, but who simply need something stable and easy to manipulate?

How easy will it be to install a bug fix or a new application on one thousand systems at once?

Will free software advocates persuade schools, non-profits, and others among the general public that access to source code is a right?

Training

Can people get training–or more commonly, retraining–for using desktops on Linux?

While certification programs really mean something? Will employers recognize what the certifications legitimately can and cannot promise?

At LinuxWorld, I’ll be educating myself on these questions–and I’ll report back.

What other questions should we be asking Linux vendors?

Ann Barcomb

AddThis Social Bookmark Button

Related link: http://www.oreillynet.com/oscon2004/

Friday was the last day of OSCON. After a late night at the auction I decided
to skip the keynotes. I am told that I really missed out by not seeing
David Rumsey’s speech involving maps.

I was soon sent on a mission with Uri Guttman to obtain pies. Dan Sugalski
had decided to offer Guido van Rossum a second opportunity with a pie, and
of course Michael Schwern was still owed his shot.

When I got back, I attended Damian Conway’s ‘Sufficiently Advanced
Technologies’ talk. It contained numerous Harry Potter jokes, but I
missed seeing
Jan
Pieter Balkenende, the Dutch Prime Minister
among examples.
Damian’s basic point was that all modules should attempt to automate
as much as possible: consider interfaces, think of what you could remove,
contemplate what could be automated, find better defaults for subroutines,
give subroutines fewer options, design subroutines to do just one thing
well, and consider the possibilities of overloading.

Just before the final keynote it was time for the pie event. Michael
Schwern gave up his turn in favor of Nick Clark. First Guido van Rossum gave Dan a cream pie directly
in his face, then Nick pegged him on the right side of his head. We watched
in astonishment as the hotel crew cleared away the plastic and pies in
mere moments.

Milton Ngan gave the closing speech: ‘There Is More To Life Than LOTR’.
In it he talked about what had been done with technology in ‘The Return
of the King’; about the increased use of open source software; about the
next movie project, ‘King Kong’; and on the work that gives his company
its bread and butter: creating advertisements. He showed some movie
trailers and showed the composite pieces of various scenes. As a hold-out
who hasn’t seen ‘Lord of the Rings’ (I didn’t like the book, so I don’t want
to see the movie), I still enjoyed seeing the detail that went in to creating
shots. For instance, a view of an entire tower crumbling contained two
nearly invisible (on the projection screen in the ballroom) trolls.

With a few words from Nathan Torkington the conference was over.

What a week. I saw old friends and met new ones, and gained some knowledge
I can’t wait to apply to my work.

Ann Barcomb

AddThis Social Bookmark Button

Related link: http://www.oreillynet.com/oscon2004/

The first morning keynote was a discussion with the Dyson family. Esther was
unable to make it due to bad weather in Chicago, so Freeman and George spoke
about the place of technology.

Next I attended Casey West’s talk on database abstraction with Class::DBI.
Class::DBI is an object syntax wrapped around a relational database. It
aims to remove SQL from the top-level code.

Packages are built by inheriting from a base class. Columns and relationships
are defined. Class::DBI appears to be a good model for simple database
relationships, but the interface is not always consistent: for example,
creating and deleting records require just one method call apiece, whereas
modification requires a call to update() for the change to take
effect. Also, transactions are not fully integrated in to the API. Still,
it is a good solution to the often redundant SQL code that frequently
appears in applications.

Several of us went to lunch at Rice Junkies, which was a bit further away
than we had anticipated. The food was pretty good, however.

Later I saw ‘Writing, Reviewing, and Instigating Books’ by Laurie Petrycki
of O’Reilly. This talk focused on what you need to do to become an author
or a reviewer for O’Reilly. In addition to covering desirable topics,
Laurie went over common misconceptions with writing and urged every would-be
author to create a detailed outline to assist in writing the book itself.
She also described the process that an O’Reilly book follows from conception
to distribution and beyond.

I planned to see ‘The Credibility of Election Software’ by Clive Boughton,
but the talk was postponed so I attended ‘Parrot in the Real World’ by Dan
Sugalski. In short, Dan will be using Parrot in production code, and this
has greatly aided the development of Parrot.

Dan’s efforts may have created a better Parrot, but due to starting late
and computer problems, certain Parrot goals were not met.

At last year’s OSCON, Dan and Guido van Rossum made a bet on whether
Parrot would run Python faster than the existing compiler. The bet was
for $10, a round of drinks, and a pie in the face at 10 paces. A series
of tests were devised. Of the tests which were completed, all but one
met the goal, but the majority of tests weren’t ready.

After his speech, Dan was taken to the Python lightning talks, accompanied
by quite a number of Perl programmers. A plastic screen had been set up
in the back of the room in anticipation.

Much to the disappointment of the crowd, Guido declined to actually throw
the pie. The Perl contingent were perhaps among the most disappointed.

In the late afternoon I persuaded Bill Odom to show me ‘Advice for Open Source
Job Seekers’, a speech he had given earlier in the day with Andy Lester.
It was interesting to hear what a small percentage of jobs are found through
job sites. The talk also covered some interesting suggestions for resumes,
interviews and cover letters for both the job seeker and the person giving
the interview. Of paramount importance is studying the company that you
intend to apply for, both so that you can ask relevant questions and in
order to see in advance if the job would suit you.

In the evening I attended NASA’s talk on open source software in the Mars
mission, which I wrote about in more detail in an article.

Following the Martian event, I grabbed a quick dinner at the hotel restaurant
and made my way to the Perl Foundation charity auction. Robert Spier and
Michael Schwern hosted the lengthy and profitable auction. Because the
Perl 6 team was being treated to dinner by Fotango, the room was missing
several key Perl developers. There were perhaps 50 people in the room, but
this small group raised over $2000 to support Perl. Rocco Caputo aided the
proceedings by serving as a waiter, bringing drinks in from Novell’s
Free as in Beer party down the hall.

Amusing items seemed most popular. A banana sold for $4 and the peel was
later resold for $5. Two camps vied over the state of Schwern’s clothing;
the group who wanted him to remove his shirt won. Lounge music was obtained,
and Schwern performed a lap dance to the dismay of his victim. A glossy
photograph of the event was auctioned a few minutes later.

Still feeling let down from the aborted pie-toss in the morning, the
audience met Dan Sugalski’s $500 reserve price for the right to throw
a pie in his face at close range. As the largest contributor to the
group bid, Michael Schwern was chosen to deliver the pie thrust on
Friday.

Uche Ogbuji

AddThis Social Bookmark Button

SessionSaver created by “pike” based on work by “rue” is an “old” extension that does not work on Firefox 0.9.x. Some, including me, upgraded for the security fixes and now find we can’t use SS, now can we resume old sessions. One hope is that the authors can update SessionSaver to work with recent versions of Firefox, but “rue” himself, who seems to have re-taken development over from Pike, seems to indicate it could be a matter of months before that happens. Some people claim they use SS fine in Firefox 0.9.2, but I haven’t been able to get any version to work. If you’ve been successful, please be kind enough to post details as a comment here or in the SS mozdev forum.

This is all extremely annoying for me because SS was the only reason I was finally able to switch from Galeon to Firefox a couple of months ago. Why on earth is this basic, commonsense capability not built into Firefox, anyway?

As a desperate measure I wrote a a quick, brutal hack in Python to retrieve a given session from the prefs file and “replay” it by launching the stored Firefox windows and tabs. The code is pasted below. It’s not elegant because I needed the-minimum-that-would-work. I found one or two quirks in its reproduction of the saved session while using it, but it got me about 95% of the way. It does discard history information and the position of each window.

To use it, first update the paths at the top to reflect your own Firefox install. Then invoke the script with your Firefox prefs.js file as the first argument. This will process the prefs file and give you a list of session names you can replay. Then run the script the same way, but with the chosen session name as the second argument. Good luck.

And yes, I know about the webbrowser module. It doesn’t work with Firefox except in most recent CVS versions of Python. At least I couldn’t get it to work with stock Python 2.3.


import os
import time
import sys
import re

NEW_FIREFOX_COMMAND = '/usr/local/bin/firefox &'
#PROFILE =
FIREFOX_NEW_WINDOW_COMMAND = '/usr/local/lib/firefox/mozilla-xremote-client -a firefox "openURL(%s, new-window)"'
FIREFOX_NEW_TAB_COMMAND = '/usr/local/lib/firefox/mozilla-xremote-client -a firefox "openURL(%s, new-tab)"'

SESSION_PAT = re.compile('user_pref("sessionsaver(.static)?.(.*?).session[0-9]+", "(.*)");')

def parse_sessions(f):
    sessions = {}
    for line in f:
        match = SESSION_PAT.match(line)
        if match:
            name = match.group(2)
            data = match.group(3)
            #The line seems to end with " 0"
            if data.strip():
                data = data.split()[-2]
            tabs_data = data.split('|||')
            tabs = []
            for tab_data in tabs_data:
                current = tab_data.split('||')[-1]
                link = current.split('|')[-1]
                tabs.append(link)
            sessions.setdefault(name, []).append(tabs)
    return sessions

def launch_firefox(url, new_window=0):
    if new_window:
        cmd = FIREFOX_NEW_WINDOW_COMMAND%url
    else:
        cmd = FIREFOX_NEW_TAB_COMMAND%url
    os.system(cmd)
    return

def launch(session):
    os.system(NEW_FIREFOX_COMMAND)
    first = 1
    for window in session:
        if window:
            url = window[0]
            print 'Launching', url, 'in new window'
            if not first:
                #The first time, we've already launched a new window
                launch_firefox(url, 1)
            first = 0
            time.sleep(1)
            for url in window[1:]:
                time.sleep(1)
                print 'Launching', url, 'in new tab'
                launch_firefox(url)
    return

try:
    fname = sys.argv[1]
except IndexError:
    print 'Usage:nt%s prefs-file [session-name]'%sys.argv[0]
    print
    sys.exit(1)
try:
    selected_session = sys.argv[2]
except IndexError:
    sessions = parse_sessions(open(fname, 'r'))
    print 'Usage:nt%s prefs-file [session-name]n'%sys.argv[0]
    print 'Available session names:', ', '.join(sessions.keys())
    print
    sys.exit(1)
sessions = parse_sessions(open(fname, 'r'))
launch(sessions[selected_session])

#Handy for debugging
#import pprint; pprint.pprint(sessions)

Do you have any other tricks for rescuing stranded sessions?

Advertisement