Older blog entries for apenwarr (starting at number 62)

Company Policy

At work we summarize our general office policy in one rule: "Don't do stupid stuff." This is an amazingly powerful, simple, and all-encompassing rule. Recently some people have asked to have more specific policies written down so that it's easier to determine if they're in compliance. In fact, if you're working for a company, this is the wrong thing for you to want. Why? It's simple.

Because explicit company policies exist so that it's easier for the company to fire you.

There. I said it. End of rationale. Think about it: if you don't follow clear, explicit company policy, it's obvious that you're an uncooperative employee who's not a team player and can't play by the rules. And by the way, ignorance of the law is no excuse.

By extension, you'd think that simply following the company policy, then, will keep you out of trouble and prevent you from getting fired. In many companies, that's absolutely true: which is why you have so much dead weight. Ironically, some unions (the ones who are prevented from going on strike because they're an essential service, or who don't want to go on full strike and thus sacrifice their income) will decide to simply do absolutely the bare minimum amount of work in order to comply with the rules. The result is that useful work grinds essentially to a halt, because most useful work isn't actually covered by company policy, and will never be.

Well, I don't buy it. Don't do stupid stuff. But how do you know if you're doing stupid stuff? Well, here are a couple of steps that help me a lot:

1. If you don't know whether what you're about to do is stupid, it would be very stupid to proceed without first figuring that out.

2. If you think someone else is being stupid, do everything in your power to make them stop. Doing otherwise would make you an Accessory to Stupidity. If the person in question resists all reasonable attempts to educate them, they have a serious problem that will block their career: chronic stupidity. Chronic stupidity, being very vague, is not good enough grounds for firing someone. But lack of productivity is, and chronic stupidity always leads to low productivity; that's what makes it stupid.

Another problem arises when someone in a higher position of authority than you orders you to do something stupid. Now you have two choices: do what you're told, which would be stupid; or don't do what you're told, which could get you fired, which might also be stupid. (For example, if you can do more good by staying with the company and doing this one stupid thing than by leaving entirely, it would seem stupid to disobey.) This is a typical moral dilemma, and other than advising you to do the "less stupid" of the two choices, I won't try to answer that question. But I can avoid the question by asking another one: Why is that person with authority telling you to do something stupid in the first place? There are two possible reasons: either the person is doing something stupid, or the person knows something you don't. If you're not sure which one it is, you need to go back to step 1 (First, figure it out), then make your decision. And if it turns out that person is doing something stupid, you need to move on to step 2 (Tell them).

In engineering, we call this process Root Cause Analysis. You might have to go back several steps to find the basic, underlying cause of the stupidity. Rumour has it that Toyota requires employees to ask at least five levels of "Why?" when trying to find the root cause of any problem; sometimes it lies deeper than you think.

So that's the bargain I make with people who work for me. I don't make strict rules; do the Root Cause Analysis and you'll see why that's doing you a favour. But in return, I expect you to think for yourself and do what makes sense. You'll have to explain yourself in case it looks to me like you're doing something stupid... and I promise to do the same in return.

Incidentally, doing things this way in some other companies could happily get you fired. But you can avoid that pitfall, the whole company will be better off if you completely ignore their policies and avoid stupidity at all costs.

Aside on Governments and Laws

Incidentally, "ignorance of the law is no excuse" is a comment usually applied to governments, and often ironically in view of the probably tens (or hundreds) of thousands of pages of laws that apply to you at this very moment that you don't know about and might very well be violating. The essay above doesn't directly apply to governments, even though there are definite parallels. The similarity is: in my opinion, explicit laws exist mainly so that we can throw people in jail. But actual civilization is based on much more than just laws: the vast majority of us would do perfectly sensible things even if there were no laws against it. The parallel to "Don't do stupid stuff," for societies is, "Do unto others as you would have them do unto you."

Where the analogy breaks apart is: in a company, we really can kick you out just because your end result - your productivity - is obviously too low. We don't kick you out just because you did something stupid (and we can't), but because your stupidity led to bad consequences. And being kicked out isn't really that serious; there are lots of other companies where you can try again. In society, however, we can't kick you out at all. We can throw you in jail or kill you, I guess, but that's far too serious for most violations. So we have to have a very, very clear system that won't punish you unless it's totally obvious that you did something totally wrong. It's not very efficient, and we depend much more on the rules we didn't write down, but it's a working compromise.

The bargain you make with your lawmakers is: Ignorance is no excuse, but in return, the laws must all only be specific applications of the most basic rules of society, like "do unto others."

Aside on Piracy

And that's why in Canada you're allowed to copy music for your friends. "Do unto others" is the basic rule, so our government can't morally make specific laws that obviously violate it. (Not to say they won't try, but so far, so good.)

The Meaning of Life

There are three aims in life:

1. Do what you love to do.

2. Do what you're good at.

3. Accomplish something worth accomplishing.

Many people do one or two of these things. The real magic happens if you can align all three of them.

(Disclaimer: my neural net spat this out a couple of days ago. It sounds like something I would have heard somewhere else. If I'm plagiarizing it from someone, my apologies in advance, but congratulations, I guess I think you're smart.)

More Harvard Business Review

Having mentioned the Harvard Business Review in my last posting, I feel this is relevant.

As they say in the cola industry, "No fizziness, no bizziness."
-- The Harvard Business Review

There are truly no words for business insight as incisive as this.

Trust No one

adewhurst linked to Paul Graham's recent article about business and Open Source. Adrian's question essentially is: so is this a great article, or does it just sound really convincing?

The answer is, from just the context of the article, you don't know. The problem is that the author suffers badly from what's called the selection bias: wanting to believe something, and then examining only the evidence that supports your belief.

I learned about the term "selection bias" by reading Harvard Business Review, a really excellent magazine, even if you think (like I do) that most businesspeople are stupid. Ironically, I can use HBR as a counterexample to Graham's point about "blog knowledge" being more interesting than stuff published by traditional companies. Meaning no offense to Paul Graham, nearly every article in every issue of HBR is better researched and more instructive than any of Graham's essays that I've read. Why? I don't know, but if you follow my link, you're going to have to pay to read those articles, and Mr. Graham gives away his knowledge for free.

Has anyone ever told you about selection bias before? If not, then like me, you're going to make lots of stupid decisions. Browsing the Internet didn't get me that information. Paying HBR some money did.

So, what specifically in this article suffers from selection bias? Nearly every statistic and every fact in the entire article. Not to say that he's wrong... but the proofs are all invalid.

For example: Open Source produces better software, eg. Linux and Firefox. The evidence? People - maybe more than 50%, depending who you ask - are "switching to them" from their proprietary counterparts. That's pretty convincing, right? Not really. First of all, they haven't switched yet. The proprietary software still has the vast majority of the market. Secondly, Linux is obviously inferior to Windows for certain types of uses, ie. anything a small business might want. (There's no way a small business could figure out how to set up a Linux system to do, say, what Microsoft Exchange does out of the box.) And Firefox? Okay, maybe it's better, although I find it horrendously slow, and by the way, Microsoft hasn't released a new version of IE in something like three or four years. (Longer, if you consider the fact that nobody could really tell the difference between IE 4 and IE 6 just by looking.) Firefox has had a lot of time to work on becoming just barely comparable to IE. But, even though Microsoft just politely let them catch up for a few years (something I claim was their actual, smart business strategy!), Firefox is just now becoming barely better than IE. But yes, some people are switching to Firefox. Congratulations.

You can prove anything you want with statistics. Apache is the best web server, yes. Linux is the best OS platform, maybe. Firefox is the best web browser at the moment, quite possibly. But three examples doesn't prove anything; what's the best graphics package, word processor, music library, media player, game platform, game, or accounting package? The answer to almost all those questions isn't in Open Source. Now, by skipping some examples I didn't like, I just used selection bias on purpose to prove my point. Did you notice? And do you see why, after this whole rant, we still don't know if Paul Graham is right or not?

If so, at least you've learned something. Hope it works out for you.

It's not about the music

It's about the solid-state twirly wheel. Oh, the carnal happiness...

A Beginner's Guide to Art Appreciation

I think the worst job in the world would be to be a full-time art critic. Cursed with the ability to understand what makes something great, but not the ability to make such great things yourself, you're forced to look at other people's inferior work and try to explain what's wrong with it. How depressing.

On the other hand, if you have no idea what you're doing - as in, for example, my case with most kinds of art - it's much easier to appreciate. "This person can do something I could never do." There's something admirable in that. It makes you feel a bit safer about the world, knowing that even if you can't solve all the problems, at least there's probably someone around who can fill in the blanks.

This is where I could put in a bit about innocence lost and the fact that happiness enabled by ignorance is always unsustainable, but that would kind of ruin my point, so I'll leave it out.

On Distributed Intelligence

Yesterday I and my friends were looking for the site of the Canada Day fireworks (see if you can find them by browsing the web site!). We were initially having some rather bad luck, but were getting reassured by meeting with occasional people who would come to us and ask, "Is this where you can go to find the fireworks?" Being asked the question so many times, of course, implied that there were many people who at least had some idea that this was the right place.

But since we didn't know where we were going either, it eventually became more clear: we asked a few other people for directions, and they gave the same answer as us: "I hope so!" But people were walking in some direction or another. At one point we actually caught ourselves following a group of people who, five minutes earlier, had asked us whether this was the right place. Some consideration led us to this important life observation:

If nobody around you knows where they're going, the people who know where they're going are somewhere else.

Upon realizing this, we departed quickly in search of people who knew where they were going. Happily, we found the site in our second-guess location of where the fireworks ought to be, right before the show actually started, so it all worked out for the best, and with a free philosophy lesson to boot.

(For the morbidly curious: you should know that the Quai Jacques-Cartier is apparently not the same as the Pont Jacques-Cartier. Perversely, the fireworks last night were at the Quai, but the fireworks tonight are at the Pont.)

Death by Abstraction

I put in some work this weekend trying to make UniConf maximally palatable to the KDE project. Since UniConf does pretty much everything that can be done, or else can rather easily be extended to do so, you might think this would be an easy job. Not exactly, because of one tricky bit: performance.

UniConf uses a rather neat abstraction, introduced to UniConf by Jeff Brown a couple of years ago, called a "generator." It's one minor step up from a filesystem in a Unix VFS. Because of the slightly more/less rigid (depending how you look at it) rules a generator has to follow, UniConf makes it easier to stack layers of generators together to achieve what you want, and so people do. For example, there's an ini-file generator, a tcp client-server generator, a D-BUS cilent-server generator, at least two kinds of generic caching generators, a list-of-generators generator, and so on. As of yesterday, there's also an automount generator (take that, autofs!) and a filesystem one-file-per-key generator, the two of which work together (with the ini-file generator) in a slightly complicated way to handle reading/writing your ~/.kde/share/config directory.

The power of the UniConf abstraction is that you can easily rearrange these individual parts to do something similar but different: for example, if you wrote an xml-file generator, you could combine it with the same one-file-per-key and automounter generators to produce something that can read/write your ~/.gconf directory instead. That's a lot less work than writing a tree-of-xml-files configuration system from scratch, and you benefit from other people having debugged the other generators you're using.

But in a system this general, performance can be a problem. In my initial simple-minded experiment, switching to UniConf took the start time of "kwrite" from 1.0s to 25s. Okay, so that was a bit extreme, and with minor tweaking I got it back down to 3.0s. But still: that's 2/3 of kwrite's startup time just fiddling with config values. Obviously not okay.

Now, what's amazing about Jeff's abstraction is that it's so complete - the slowness is really not the fault of the abstraction layer at all, because the way it works, the front end matches up almost exactly with the backend; that is, the API you call is pretty much the same as the API the generators each implement. So you could write a *very* fast generator if you wanted - optimally fast, because you can throw away all the layering and just implement the API calls directly. It's just that, because it's so easy to combine pre-existing modules instead of writing something from scratch, most UniConf setups end up being pretty badly non-optimal.

Here's the real killer example: profiling my UniConf-enabled kwrite shows that much of the time is actually spent converting UniConf keys to and from KDE QEntryMap objects. (KConfig keeps a QMap of all the groups/entries in the tree.) To make it "optimally" fast, I should really store all my config entries directly in a QMap, rather than storing them in a UniConf-style data structure and then copying them to a QMap. But there's clearly no way to do that outside of rewriting the pre-existing UniConf generators.

Since writing a completely special "KDE generator" wouldn't be "unified" enough for me, I'm going to instead try to optimize the other generators more until the performance is acceptable. The profiler shows some pretty obvious starting points. Flexible and fast - not the easy approach, but maybe the most fun. Wish me luck.

Confident statement #1:

"I know my place in the world."

Even more confident, but contradictory, statement #2:

"I make my place in the world."


How will you get from #1 to #2?

8 May 2005 (updated 8 May 2005 at 00:57 UTC) »
Canada and Copyright

There's been quite some discussion lately about Canada's proposed amendments to copyright law, and I'm afraid most people are completely misunderstanding the situation. What you have to realize is how incredibly clever these amendments are. (You also have to realize that a copyright system intended for printing presses, vinyl records, and live CBC radio broadcasts does need an update for the day of the Internet, and in itself, that's a very good thing.)

To dispel some scary misconceptions:

  • The "notice and notice" system they'll impose on ISPs is incredibly lax compared to the draconian "notice and takedown" U.S. system. When an ISP is informed that their customer may have posted infringing material, they have to... inform the customer about it by forwarding them the complaint! Uh, I'm slightly stunned that we even needed a law for this. Oh, they also have to keep a copy of it around to avoid tampering with potential evidence in case a lawsuit follows. Okay, so ISPs should make backups of their systems occasionally. What's the problem?

  • "The alteration or removal of rights management information (RMI) embedded in copyright material, when done to further or conceal infringement, would constitute an infringement of copyright." Don't you realize what a great miracle of phrasing this is?? It's only illegal to remove the RMI stuff if it's done to conceal or further infringement. In other words, hiding your tracks after doing illegal stuff - still illegal! What amazing insight! But notice that what it doesn't do is change the definition of infringement. Removing RMI to make your own damn music play on your music player after you paid good money for it is not infringement. (At least, not based solely on this amendment, and I haven't heard of any other amendments that affect the situation.)

If you feel like writing to your MP about Canada's copyright improvements, please do - but congratulate them for doing the right thing, and encourage them not to later cave to U.S. pressure. The last thing you should do is accuse these people, who apparently actually do have your best interests at heart, of being exactly the kind of people they're trying hard not to be.

Disclaimer: IANAL, but chances are that neither are you. At least I read the bloody web site before posting.

53 older entries...

New Advogato Features

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

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

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