rc3.org

Strong opinions, weakly held

Month: April 2006 (page 1 of 2)

ActiveRecord documentation followup

There are two places I should have looked before complaining about the ActiveRecord docs. The first is Rails Weenie. The second is the Ruby on Rails Wiki. I haven’t found a canned answer to my question yet, but in both places you can post your questions and your progress toward answering them, leaving a trail of documentation for other people to use when they run into the same problems as well.

The ActiveRecord documentation sucks

To me, the most painful part of working with Ruby on Rails has been the immaturity of the supporting documentation, specifically as regards ActiveRecord. I know there are boatloads of Ruby on Rails books on the way, and to me, the one that’s most needed is an in depth explanation of how ActiveRecord works and what you can do with it. I’m also beginning to wonder if ActiveRecord isn’t perhaps a bit thinner than I originally gave it credit for. It works brilliantly for all of the simple stuff I was doing initially, but now that I’m moving to the next level of complexity, I find myself a bit lost in the wilderness.

First, let me say that ActiveRecord supports a mechanism called “find by SQL,” which basically lets you create join clauses and where clauses in any way that you choose. What I’m trying to figure out is whether I have to go that route for a large class of queries that would seem to be common to many types of applications. Let me give you an example. You have two tables in the database called questions and categories. (I call them that because that’s really what they’re named in my application. They have a many to many relationship with one another, so I have another table called categories_questions. Let’s say that I want to create a page that lists all of the uncategorized questions. I could write a SQL statement like this:

select * from questions where not exists (select question_id from categories_questions where question_id = question.id)

If I preferred, i could do the same thing with a left outer join, like this:

select q.* from questions q left outer join categories_questions cq on q.id = cq.question_id where cq.category_id is null

It strikes me that I should be able to do both of these things within ActiveRecord without reproducing most of those queries using find_by_sql. You wouldn’t know it though from any of the online resources I’ve looked at, or the Rails book from the Pragmatic Programmers, or any of the open source Rails applications that I’ve browsed.

I had forgotten how much fun being an early adopter can be.

Network Neutrality

I confess that I have not paid much attention to all of the stories about network neutrality and AT&T’s attempts to start charging content providers a toll to take full advantage of the bandwidth they provide to residential customers because my mind has been made up from the beginning. As a customer, I buy a certain amount of bandwidth from a telco (in my case, Time Warner), and I expect to be able to use all of it to download whatever I like. Content providers buy their own bandwidth. They can use it for whatever they like. This is the status quo I expect will be preserved.

I realize that other people may not have enough information to be similarly convinced. Yesterday Scott Rosenberg recommended a Salon article by Farhad Manjoo that explains what’s at stake. I’d like to second the recommendation.

A NewsGator account is required

I’m a licensed NetNewsWire owner, so why does the latest beta require me to register for a NewsGator account? That kind of irritates me.

I just wanted some cold medicine

Yesterday, I was at Target and I needed to buy some cold medication. I already knew that the pharmacies don’t keep any medicine that has pseudoephedrine on the shelf any more, in order to prevent people from buying it in bulk and using it in meth labs or something.

Instead of just tossing the box of pills in your cart, now you have to bring a little card for the medicine you want up to the pharmacy counter. Easy enough, I thought. So I get there and they ask for my driver’s license. Then they type the name and address from my driver’s license into the computer. Now I’m mad. Then they drag out this log book and make me sign for the pills. What could possibly be the point of all of this? If people are so afraid of bulk purchases of pseudoephedrine, I can see the store asking people why they’re buying, oh, ten boxes of generic cold medication. I was buying ten pills. Is all of this data uploaded to some centralized system? Are they worried that people are going to hit every drug store in town buying one box of pills at each? How much does crystal meth sell for anyway?

I was ready to blame Target for overzealous enforcement of some incredibly lame regulations, but the North Carolina Board of Pharmacies consumer FAQ indicates that all of the steps I went through are required regardless of where you buy pseudoephedrine.

I care a lot less about the plague of crystal meth than I do about moronic regulations that get everyone used to being treated like a criminal. When I read that Congress is spending less time in session than ever, it’s laws like this that make me think that’s maybe not such a bad thing. (I know that this is a state law, but you get my point.)

The new email etiquette

David of Ruby on Rails fame has a blog post about the ongoing difficulties in avoiding using top replies when you’re emailing. As an old school geek, I have similar urges. To me, you should trim the email you’re replying to and write your answers beneath the specific lines in your reply.

Unfortunately, only old school geeks adhere to that custom these days, and as he points out, the people who make email software don’t want to cooperate. Not only do nearly all email clients default to the “top reply” style, but it seems like most email clients expect incoming email to be structured that way as well. Heck, Gmail generally wants to hide quoted parts of emails entirely so that you don’t have to look at them. That makes sense if people are replying and just keeping the full test of the old email at the bottom, but not if the quoted text is carefully selected by the person replying to the email.

So the question is whether there’s any point at all in the old etiquette. Have what used to be good email manners now become old fashioned?

Nikon D50

After much, much agonizing over digital cameras, I finally pulled the trigger and ordered a Nikon D50 with the 18-55mm kit lens the other day. I went to a store a few weeks ago just to see how some of the cameras I was looking at handled, and in the end decided that I prefer an SLR to any of the super-zooms.

As far as the super-zooms go, the Sony Cyber-shot DSC-H1 handled a lot better than the Panazonic DMC-FZ5, which turned out to be a lot smaller than I expected. The Panasonic DMC-FZ30 was nice and chunky, but it was almost as big as a Nikon D50 and didn’t cost a whole lot less, either. When I looked at the ISO issues that the super-zooms tend to have, the D50 just made more sense.

Once I had decided to buy the SLR, I needed to pick a lens as well. I already have Nikon 24mm and 50mm prime lenses for my old film SLR, and a cheap 75-300mm zoom lens as well. My dream lens is the Nikon 18-200mm zoom, but it’s very expensive. In fact, they’re still so uncommon that they sell for above list price. That left either the D50 kit lens, an 18-55mm model, or the 18-70mm D70 kit lens, which costs twice as much. I chose the cheaper 18-15mm based on Ken Rockwell’s review.

The new camera arrives tomorrow, and I’m looking forward to taking some photos.

Don’t turn your customers into rats

My wife had an interesting customer service experience yesterday that I thought I’d write up. My wife ordered something on the Internet and the company shipped her the wrong item. She called to let them know about it, and the customer service rep who she called asked her for some identifier for the person who packed the order, which was printed on the invoice. My wife just wanted to get the correct item, and didn’t want to get the person who packed the order in trouble, so she tried to avoid telling them who the person was, but they helpfully directed her to the spot on the invoice where the packer number could be found, so she gave it to them. Sorry packer #23.

When she told me about it, I couldn’t believe that the company’s customer service was so horrible. Most people don’t want to feel like they’re going to get someone else in trouble, and asking the customer to tell you who packed your incorrect order certainly gives you that feeling. The invoice was produced by a computer, so if the company cares about who packages the order, why don’t they have it available on their end? Calling to complain about a mistake is traumatic enough for most people, making them feel like an informant only makes it worse.

When utter destitution is no longer an option

This morning I read that former CIA director and Presidental Medal of Freedom winner George Tenet currently holds a professorship at Georgetown University. Yesterday it was reported that St. Bernard Parish might hire MIchael Brown as a consultant to help deal with recovery efforts. There’s no doubt in my mind that if Ken Lay and Jeffrey Skilling don’t get thrown in jail, there’s some think tank, university, or industry assocation that would be happy to put them on the payroll.

What must it be like to have achieved a station in life where destitution is no longer an option? Once you’ve attained a certain level of fame, or notoriety, it is literally impossible to find yourself in the ranks of the unemployable. Indeed, corruption, criminality, incompetence on a grand scale, and rank stupidity cease to become ostacles once one has ascended to a certain station.

What’s odd is that you read about guys who used to be famous professional athletes working as custodians or former rock stars who find themselves back in the ranks of the mundane. Not so for businessmen, politicians, and bureaucrats. You never read about the former Senator who works as a groundskeeper at his country club or the CEO who now works in accounts receivable.

What do we need to do as a society so that fear of shame and ruin motivate our leaders to do better?

Update: Douglas Feith currently has a think tank job and is angling for a faculty position at Georgetown as well. Here’s an accounting of his failures.

What software should be packaged with a Web publishing book?

Let’s say you were asked which software should be included on the CD that is packaged with a book on Web publishing? What would you recommend? Here’s a list of a few things that come to mind:

Any other ideas? Please leave a comment.

Older posts

© 2024 rc3.org

Theme by Anders NorenUp ↑