December 30, 2003

Danger, MacOS X Installer Package Authors!

Important safety tip, up there with "don't cross the streams":

If you write installer packages for MacOS X, be careful when installing things into /etc and /var!

In OS X, /etc and /var are symlinks to /private/etc and /private/var, respectively. If you try to install things directly into /etc or /var, the symlink will be overwritten with a real directory entry and your files will be copied into it, resulting in directories that are empty except for your newly installed files. The result is that unless you have a root shell open before installing, you'll completely hose the system.

So, if you need files to end up in /etc or /var, put them in /private/etc and /private/var.

Posted by nick at 09:10 PM | Comments (0)

December 26, 2003

Why Aren't Sun's Java APIs Object-Oriented?

I haven't done all that much with Java for reasons that will quickly become apparent, but the basic idea and syntax rocks my world. An OO language that actually makes sense and doesn't have layer upon layer of glued-on cruft (*cough* C++ *cough*)? Great!

What I don't understand is why Sun went to the trouble of designing an implementing a nice language on a bunch of platforms (certainly a non-trivial task) and then screwed it up by not making their APIs truly object-oriented. I don't claim to be the world's best programmer, but writing non-OO core APIs for an OO language (especially one that purports to not suck like most of its ancestors) is dumb.

A fundamental concept of object-oriented programming is that you tell objects to do things without worrying about how it gets done—a concept that Sun violates frequently by making programmers deal with implementation details.

If a SQL statements needs to be prepared before being executed, why do I have to take care of it? Just do it! Don't make me type connection.prepareStatement() every time I need something from the database!

Even having to know of the existance of javax.swing.JFrame.pack() is inexcusable. If the frame needs to be packed, pack the damn thing and leave me out of it. This is [ostensibly] OO! Why should this be my problem?

Why do servlet programmers need to deal with doGet(), doPost(), and doPut()? Not only is this bad OO design (how about behaving like an object and giving programmers access to passed data in the same way regardless of how it was passed?) with very annoying results (more typing and enforced nonsensical code), but it's brittle: what happens when additional methods get added to HTTP and the interface changes? Is everyone going to have to go back and add doBlah() methods to code that already works? How much is that going to cost the Java community in time and money?

When programming, I try to take a "when in Rome" attitude and abide by the conventions of the language and methodology I'm using, and that's as it should be—it would just be nice if Sun did, too.

Posted by nick at 07:02 PM | Comments (0)

December 14, 2003

Don't Blame the Spammers, Blame Their Jackass Customers

Spammers suck, but the real blame lies with their customers: if spamming didn't work, nobody would do it.

Instead of the current crop of half-assed anti-spam measures that often throw the baby out with the bath water (such as rejecting mail originating from residential IP blocks), I propose a new approach: ISPs maintain a database of URLs that are linked to in spam messages. A proxy or customized browser detects when a user attempts to load an offending address and pops up a big, honkin' dialog box that says something like


ATTENTION JACKASS!

You are about to visit a Web site belonging to a spammer. By continuing, you will be actively contributing to making the Internet worse for everybody, including yourself. Are you sure you want to do this?

[ Hell No! Screw the Spammers! ] [ I Am An Asshole, Continue Anyway ]


I think this would be far more effective, and those of us who want or need to run our own SMTP servers could do so again.


UPDATE

AOL is now blocking access to spammer sites

Posted by nick at 08:18 PM | Comments (0)

December 12, 2003

5 Steps to Attractive Cheesecake

1) If your recipe includes egg whites, separate the eggs. Reserve the whites and gently mix in a little salt. This will break down the stringy albumin protein and make the whites require less stirring to incorporate. Mix the filling well with the yolks, then add the salted whites at the end and stir just until incorporated. The goal is to stir the whites as little as possible as any air mixed into the whites will cause the cake to souffle (puff up) and then collapse, which effects texture as well as appearance.

2) Butter the sides of the pan. This will prevent the cake from sticking to the sides and breaking itself as it cools and sinks.

3) Bake in a water bath with hot water: double-wrap the bottom of the spring form baking tin/pan in aluminum foil to prevent water from seeping in, place the spring form a large baking dish, and fill the dish with hot water to a bit above the level of the cheesecake mix in the tin. This helps ensure that the custard mixture doesn't get too hot, because the temperature of the water will not rise above boiling.

4) Custards like low temperatures, so keep the oven temp at or under 325°F/150°C. 300-325°F/150-160°C is the optimum range.

5) Bake until a little bit before you would normally take it out, turn the oven off, and leave the cake in the oven with the door cracked, preferably overnight. This allows the cake to cool slowly and minimizes cracking.

Posted by nick at 08:34 AM | Comments (0)

December 10, 2003

Flavor Matrix: Seeking Comments

I'm planning a piece of software that will represent flavor combinations—something that would allow you to look up "peanut butter" and give you back a matrix that tells you that peanut butter goes with chocolate, that it goes with bananas, that it goes with celery, and that it goes with both chocolate and bananas together, but celery is not part of that combination.

The software will be free and open source, so I'm not trying to weasel good ideas to get rich; I want to create a fun and useful tool that everybody can use.

I'd love to hear your thoughts on what the matrix should look like and how it should be interacted with! For instance, should it try to show a large, comprehensive matrix with ever related flavor? Should it suggest related flavors which you can then choose from and generate a limited, custom matrix of those ingredients? If you'd be kind enough to say in your comment whether you're a food professional, home cook, or rank amateur, I can get a better idea of what different kinds of people want.

Thanks!

Posted by nick at 06:11 PM | Comments (0)

Annoyances With Colloquial American English

I don't claim to be god's gift to grammar or the English language, but here are a few of my least favorite things:

Redundant Acronym Expansion

The Merriam-Webster Dictionary defines the word acronym as "a word (as NATO, radar, or snafu) formed from the initial letter or letters of each of the successive parts or major parts of a compound term". If we expand an acronym, we get more words. This is great, as it decreases the amount of information required to communicate a phrase and is a generally efficient form of linguistic compression.

The problem is when people state an acronym in its entirety and then expand the last word, as in "VIN number", "RAM memory", and "ATM machine". ATM stands for Automatic Teller Machine, so the trailing "machine" is redundant—when the phrase is expanded, you get "automatic teller machine machine". In addition to being nonsensical, it decreases the compression's efficiency.


Extraneous Quotation Marks

SALE "TODAY"!

Is it today, or isn't it?

WE SELL CIGARETTES! "LOWEST LEGAL PRICE!"

Are you charging the state minimum price, or aren't you? Did the manager simply say that and you're quoting her/him but really charging more?


Plurality Indicated by Apostrophes

Plurality is not indicated by apostrophes. "Look at the pile of carrot's!" means "look at the pile belonging to carrot", not "look at the pile of carrots".


Self-Contained Double Negatives

In addition to not being a word, "irregardless" means the opposite of what people who use it mean when they say it. "ir" is a negative prefix and "less" is a negative suffix. The correct word, "regardless", means "without regard". Negating it with "ir" makes it "without without regard", or "with regard".


Quote Unquote Stuff

Quotation marks define the beginning and end points of a literal, and the stuff in between them is what the quoted source said. Therefore, the phrase "Mr. T says quote unquote I pity the fool!" is wrong ("jibba-jabba" in T-speak), because nothing has been quoted! "Mr. T says quote I pity the fool! unquote" is correct because it actually quotes Mr. T's statement.


It's "nuclear", not "nucular", damn it!

Posted by nick at 05:50 PM | Comments (0)

My $0.02 on File Sharing and the RIAA

This file sharing issue has obviously gotten a lot of attention, so I'll skip what seems to be well-covered territory (prices too high, no try-before-you-buy, low quality and homogeneity of major label releases, etc.) and stick to points that I haven't seen get much coverage.

Which business is the music industry in?

The music industry as a whole seems to be confused about which business it's in. They're either in the manufacturing business or the licensing business.

If they're manufacturers, they make and sell a product and a customer is free to do what they want with it. The manufacturer of my toilet brush has no say in how I use it, even though it may contain or be the product of legally protected intellectual property: the product design or manufacturing process may be patented, and it may display a trademarked logo.

If they're license brokers, they should by all means be able to dictate what customers can and cannot do with the material—but along with that comes replacement media and format upgrades at a reasonable price, just like software. Scratch or break your CD or record? Tape get eaten? Spill coffee on your album cover? You should be able to get replacements for close to cost. I'm still waiting for CD upgrades of everything I paid full (highway robbery) price for on vinyl, 8-track, and cassette, and I look forward to my upgrades to DVD-A and SACD as soon as anything I care about comes out in those formats.

The recording industry has had it both ways for too long, and it's time for them to pick one and behave accordingly.


File-sharing networks have legitimate uses

Apparently the RIAA doesn't care that there are actually plenty of files traded on peer-to-peer file-sharing networks that do not violate copyright laws (read: legitimate, legal uses) and thinks that they should all be shut down because they can be used to violate copyright law. A pen can be used to violate copyright law, as can a photocopy machine—maybe we should go after those manufacturers, too. Bic, Xerox! Up against the wall!

Even putting aside the exchange of non-copyrighted material, there are legitimate reasons for the exchange of copyrighted material:

You have legally purchased albums that are damaged to the point of unplayability (which is likely, as CDs damage easily). You have the legal right to listen to that music whenever you want. Downloading an album you paid for is legitimate.

You have albums on vinyl and cassette. You want to listen to them on your computer or portable MP3 player. Downloading an album you paid for is legitimate and easier than converting the material yourself. The RIAA and record labels should thank you for doing this, because you're doing the work for a service that the industry should be providing.

You have a copy-protected CD that you can't back up to protect your investment, can't play on your computer, can't save on your computer, and can't play in your MP3 player. Maybe someone is sharing a copy that was created from an unprotected CD. Downloading an album you paid for is legitimate.


Copy-protected CDs are unacceptable

As Janis Ian pointed out, there are many legitimate reasons to copy CDs. Copy protection is simply unacceptable, particularly as it has the potential to damage customers' equipment and violate fair use laws.

Example: my aunt gave me Lars H.U.G.'s new album, "Save Me From This Rock And Roll". This is a $25 album (CDs are expensive in Denmark) by a Danish artist that's damn near impossible to get outside of Scandinavia—an album that will be difficult and expensive to replace should anything happen to it. Because it's copy-protected, even though I legally own the disc, I can't listen to it on my computer and some normal audio CD players, or encode it and listen to it on my iPod or computer (read: protect my investment), all of which are legal rights.

If you want to avoid buying copy-protected CDs, there's a database of them at Fat Chuck's.


Many people are already paying for copying rights when they purchase blank media and digital recording equipment

People in many countries are paying levies on blank recording media and digital recording equipment, regardless of whether it's actually used to make illegal copies. This extra money goes to the recording industry to compensate for the losses suffered from illegal copying.

If a customer pays a copying levy, doesn't that buy them the right to copy? They paid for it! (and had no choice in the matter)... what am I missing?

Either they take their losses and copying is restricted, or they get paid and it's not. Again, the recording industry can't have it both ways.


If they care so much about the artists, maybe they should stop ripping them off

The fact that the industry is on a legal and PR crusade in the name of artists getting their fair share while robbing them blind is completely offensive and should not be tolerated. It's at the same level of hipocracy as the US killing people in the name of democracy in the rest of the world while passing legislation like the Patriot Act at home.

Steve Albini (who played in Big Black and engineered Bush, Nirvana, Page & Plant, PJ Harvey, the Breeders, the Pixies, Helmet, Cheap Trick, and Jesus Lizard, among others) wrote an excellent article called "The Problem With Music" that spells out standard major label contract tactics and provides an enlightening financial summary.

According to this article's breakdown of current industry figures, you have a 1/234 chance of earning as much as a Sanitation Worker's salary if you go Gold.


Quality exemptions for radio but not MP3?

In the US, we are legally allowed to record music from the radio, because the quality of the audio is lower than on an album.

Guess what? MP3, Ogg Vorbis, and the other popular audio compression formats generally sound worse than FM radio. They're what's called "lossy" compression, which means that in order to make the files smaller, they throw out part of the music and provide no way to get it back. They trade audio quality for file size. Regardless of what your MP3 player might say about 160k MP3 being "CD quality", it's not. Listen for yourself. MP3s are fine for train, buss, car, and street listening, but quality-wise, they're no substitute for CDs and aren't even worth comparing to DVD-A and SACD.

By the industry's own logic, MP3 and the other lossy audio compression formats should be exempt from copying restrictions for the same reason that radio is.


The Bottom Line

The music industry has gotten more than its fair share for a very long time, and as much as it might want to stop time, it's not going to happen. It had a good ride, perhaps better than it deserved, but it's over now and nothing they do can change that.

(The reason it's over has nothing to do with piracy: the labels used to control both the production and distribution of recorded music. This is no longer the case as the quality and affordability of recording exquipment has gotten to the point where artists no longer need major labels to produce quality recordings, and the Internet has given artists the means to do their own distribution. This and the unwillingness or inability to accept and adapt to change and to take risks on or develop artists are the industry's real problems—file sharing is a red herring.)

Hopefully they will realize that like all businesses, they're going to adapt or they're going to die. To my eyes, the future of music without the RIAA and major labels looks different but better. Small, indie labels do a better job of giving customers what they want (and aren't getting from the majors) and still manage to make money, generally take better care of their artists, and often charge less. More of that can only be good.


Thanks to Justin Peone for editing help.

Posted by nick at 12:44 PM | Comments (0)

December 09, 2003

I just wanted to say that I would like to tell you about my intent to think about actually saying something

"I just wanted to thank you for a great dinner."

Oh, you did? Why don't you want to anymore?


"I was wondering if you could tell me what time you close today."

Really? That's nice. Do you have a question?

"I want to let you know that the item you're looking at is on sale."

"I would like to tell you that I just love your glasses."

"I'd like to point out that that's your third helping of ice cream."

Yeah? Well do it, then!


You feelin' me here?

It seems that people are petrified of actually saying anything these days. Maybe it's that everyone's so damn afraid of offending someone that it's offensive. Maybe they're afraid of sounding smart (oh, the horror!). Please, knock it off! Be direct. Speak honestly. Say what you mean, dammit!

Posted by nick at 08:57 PM | Comments (0)

Computer People: Don't Bogart That Name

If you want to buy a chair, order a chair from a company that claims to sell chairs, and receive a case of rotten tomatoes because the company decided to start calling cases of rotten totamoes "chairs", you'd be justifyably pissed off. Why? Because the word "chair" already means something. It's been taken. It's unavailable, like an occupied parking space, and you can't park anything else in it without breaking something. Makes sense, right?

So why is it that people who come up with computer terms often seem incapable of wrapping their heads around this relatively simple concept? Appropriation of existing terms is making the tech industry even more confusing than it already is:

There's Microsoft's ASP (Active Server Pages), and while there are certain philosophical similarities between it and the dangerous snake it shares a name with, the two weren't confused. Then a bunch of jackasses at USinternetworking decided that they were going to revolutionize the hosting industry by thoughtlessly calling their business model "Application Service Provider" and referring to it as "ASP". When you say ASP now, nobody knows what the hell you're talking about because you can run ASP at and buy ASP services from your ASP. Thanks, guys.

The authors of Quark, an audio player for unix, apparently didn't know or care about QuarkXPress (commonly referred to as "Quark"), the industry standard layout program for print. I don't know how long QuarkXPress has been in existence, but it was around well before I started using it over 11 years ago.

There was the Firebird debacle, where the people at the Mozilla project knowingly stole and are still using the name of a pre-existing database.

The acronym CSS was already taken for Cascading Style Sheets when the same geniuses who brought you region codes borrowed it for Content Scrambling System, the encryption method used in DVDs.

The Audio Engineering Society has a fairly decent claim on the AES acronym as it's been around for over 115 years. It co-developed a digital audio standard called AES/EBU with the European Broadcasting Union, which is commonly referred to as "AES". Naturally, the US government saw no problem with hijacking the initials for the Advanced Encryption Standard.

Hey, programmers: what does select() do? Ha ha ha! That's funny! Why? Because there are at least 4 standard API functions called select() that all do different things: in C on unix, it waits for a file descriptor to change; in Perl, it returns the current filehandle or sets the default filehandle for output; in SQL, it gets data from a table; in C on PalmOS, it does something with the serial port.

There are plenty of other duplications out there. Please, stop the freakin' madness!

Google and Webopedia are your friends. Is it really too much trouble to spend 3 minutes on research before pouring gasoline on the fire?

Request for business people in the tech sector: don't use a computer term unless you know what it means. For example, don't say "I'll ping you later" unless you actually plan to send me an ICMP packet.

Posted by nick at 08:12 PM | Comments (0)