Deirdre Saoirse Moen

Sounds Like Weird

Archive of posts with tag 'webdev'

: Ellora's Cave: Headquarters for Sale and Lawsuit Update

I got word about a week ago that Ellora’s Cave’s headquarters were for sale. This building isn’t owned by EC, but by sister company Brannon-Engler Properties, Ltd. Per Dear Author’s Curious post, one of the things alleged in the Brashear case was that the property was rented to Ellora’s Cave at inflated prices.
I had other things going on, so I’m a little late in reporting on it, but I think you’ll agree it was worth the wait. The other day, I got an anon tip containing Tina Engler’s latest missive:

For the past year we’ve only been releasing information on a need-to-know basis because it feels pointless to make announcements when we know that anything we say will be twisted, redistributed, and broadcast in a false light by a select minority of authors who (a) don’t know what they’re talking about and (b) have agendas. That said, here are my responses to the latest rumors:

  1. Yes, the building EC currently inhabits is up for sale. As we no longer print books and have downsized to boot, it makes no sense to keep such a large facility with 3/4 of it being unused space. When the building sells we will be moving into a commercial area that is zoned for retail; the offices will be in the back and our (upcoming) bookstore will be in the front. We’re actually very excited about this and have been working toward the goal of getting the Home Ave building up for sale for months; it is now (finally) on the market.
  2. No, we did not spend “tons of money” on our new website. It was created in-house by Darrell King who is already on payroll.
  3. We are not filing for bankruptcy. (This rumor is really getting old.) We are further downsizing where we need to, upsizing where we need to, and getting EC back to where we were before… and then some. This process takes time, but it’s definitely happening. We’ve got several irons in the fire and look forward to furthering the careers of our loyal, professional authors. (More to come on that later.)

I think that’s it for now. Have a wonderful week.
Tina

Additionally, there was another followup from Tina:

EC should have informed you that the old links to your books do not work on the new site. I didn’t realize this either until a week ago after spending two hours updating my links. I am truly sorry for the oversight.

So I’m going to respond point-by-point:

  1. First, all authors have agendas. All businesses do too. This is a very us vs. them kind of statement that has no constructive purpose.
  2. On the building sale: good for the most part. Tina basically echoed what I said a few days ago on Twitter: they don’t print their own physical books any more, and thus the building is too large a space for their current needs. My only criticism is that this feels like it’s happening significantly later than it should have. My understanding, which may be in error, is that they stopped printing their own physical books around the time of the POD printer lawsuit, which dates to 2011.
    Note that this doesn’t mean EC will stop having print versions of books, just that they will no longer be printing and stocking them in house. Switching to a just-in-time POD production company (e.g., CreateSpace) makes sense. (I’m actually a big fan of just-in-time manufacturing. More on that in a later post.)
    On the other hand, a bookstore? When so many are closing? So, they’re selling off their book storage space so they can move into a smaller space where they’ll need book storage space?
    Ellora’s Cave is not going to get significant foot traffic unless they’re somewhere with really high retail rents. After all, the space they have right now has a front office space that could be a bookstore. It has window space, though too many divided lights to make it a display window. Also, anywhere with a lot of window space will be expensive to heat in winter.
    Also, having worked in a bookstore, I’m pretty sure this will be a huge rude awakening for EC. The US lost ~20% of its indie bookstores between 2002 and 2011. In addition, a bookstore requires continual staffing, and Ellora’s Cave doesn’t have that kind of staffing level right now.
    But, you know, romantic ideals about bookstores. Whatevs.
  3. Despite other criticisms about the new website, I think moving to WordPress with WooCommerce on WPEngine is a huge improvement. And, thank God, no more blinding red. Also, they’re using WooCommerce for their shopping cart, and that is what I would have suggested had they asked.
    That said, I’ve given it a few weeks to settle in, so I think I can make some real criticisms now.

    • The way the migration was done killed Ellora’s Cave’s existing SEO (search engine optimization). All the inbound links from everywhere are now broken. When those links bring up 404 errors (page not found), what happens is they then lose the inbound link as adding to the value of that site. They might as well have bought a brand new domain and started there.
      The right solution is to add a bunch of redirects, one for each author and each book. Unfortunately, the tools for doing so on WPEngine aren’t super great because it doesn’t use Apache’s .htaccess format for it.
      There is exactly zero reason that this should be on authors (or reviewers), though.
    • Not migrating customers and their libraries is amateur hour. I can understand libraries taking a while, but then you’d have to shut off e-commerce until you worked the old libraries into the new table structure.
      Here’s my constructive suggestion: if EC can’t migrate people except by hand, migrate people’s libraries in the order they sign up for an account on the new site. It would also be nice if there were some time frame given for when customers’ libraries would be migrated. (And totally unprofessional for them not to be migrated.)
      Over time, that will reduce customer service requests, and it will also give EC a goodwill boost it desperately needs. Plus, many of us—myself included—have bought books off of EC’s website and we’re basically cut off from our libraries. Apparently, this is not the first time EC’s done this; I’m told they also did so when they upgraded to the red site from the previous incarnation.
      Not only that, but Tina was encouraging authors to encourage their readers to buy books directly off EC’s site, so now EC’s throwing those authors and customers under the bus?
      Can you just imagine the outcry if Amazon did this for Kindle books?
      If you want Amazon’s business, Tina, you have to be at least as good as Amazon. Not amateur hour.
    • I know default WordPress search isn’t the world’s best, but visit the new EC site and search on, say, Paris. One of the many titles found has Paris in the title, but not all of those books have the search term even in the description. I don’t know how they managed that, but my WordPress searches don’t work that badly. Logic suggests that author matches and/or title matches should be ranked first, though, and they’re not.
    • There is no information on the site about how to submit to the publisher. That’s probably a good thing, though.
    • Others have noted that there is no physical address. Given that their building is for sale, that may well be temporary, but I’m more likely to do business with a site that actually lists their physical address.
  4. While I’m glad Ellora’s Cave isn’t filing for bankruptcy, part of me wonders how much of this is sheer stubbornness. Several people have reported that they haven’t received a check since May, which paid for royalties due up through January.

Ellora’s Cave v. Dear Author Lawsuit Update

It’s been a quiet few months, and the only thing to happen in the last six weeks is another status update (docket item 39) from the defense. Status reports are supposed to be filed every 45 days by both parties. Only two things happened since the last status report:

  1. On June 15, 2015, Plaintiffs served responses to written discovery.
  2. On July 15, 2015, Plaintiffs and Defendants served their witness lists.

What’s interesting, though is that there’s only been one plaintiff status report (on April 28th, docket item 35) and there have been four defense status reports. Normally, things filed with the court by the parties are a matter of public record, so I’d expect to see them on the docket.
Now, granted, the discovery period is a time when the parties are incredibly busy, but there may not be a lot of court filings. So, from an outsider’s perspective, this can appear to be a very “quiet” period, even though it’s anything but.

: Apologies for the Overly Aggressive Spam Police

bad-cache-issues
I don’t view my WordPress dashboard very frequently, so I’d missed that the Stop Spammers Registration plugin had trapped 75 registrations/commenters it shouldn’t have, some of whom are regular commenters here.
Nor did I know where the UI was for that. (I do now and have whitelisted all 75 of you.)
I’m sure 75 sounds like a lot, but let me give you context here.

OpenID Change

A while back, I switched from one openID plugin to another because the one I had been using was not being maintained. The new one apparently let through a lot more spam registrations than the previous one did—to the point where that was more than half of my email.
Then I installed the Stop Spammer Registrations plugin. Blissful quiet.

Stop Spammers in total has stopped 33,680 spammers since 2014/02/26.

stop-spammers-breakdown
And, unfortunately, 75 legit folks. (As well as possibly more who didn’t say, “Hey!”)

Almost Half Were Cache Problems

There’s a joke in computer science:

There are only two hard things in Computer Science: cache invalidation and naming things. —Phil Karlton

My host sometimes needs to service machines and switches me over without me noticing. This invalidates cache, and Stop Spammer Registration latches onto that like a fierce little puppy and growls.
Why? Because invalid cache is a security attack vector, unfortunately.

An Added Bonus

Ever looked at your Akismet spam queue? Even after setting it to delete the worst, I used to have 50-100 per day. Now I get 1-2 per week.

Though…

I’m going to look at the settings and see if anything needs to be tweaked.

: Google Changes: Five Free Responsive WordPress Themes

responsive-wordpress-themes
Google’s making huge changes in how they’ll rank web sites, and those changes take effect next week on April 21. Google has warned that sites that are not responsive will be penalized in rankings. If you run WordPress sites, then switching to responsive WordPress themes will prevent you from losing your Google juice.
You may be saying: ZOMG! What do I do?
(At the end, I’ll have a new thingy for you author types.)

Five Free Responsive WordPress Themes

If you have a self-hosted WordPress site and haven’t done a ton of customization to your theme, here are some themes that will at least get you over that hump.

  1. TwentyFifteen. It comes with WordPress, it’s boring (I mean: content-focused) as all get out, but it’ll get you there. In particular, you know it’ll support just about any WordPress feature since it’s a core theme. One downside: there are only two child themes currently (and I don’t care for either of them), but you can design your own.
  2. Pinboard. As I’ve mentioned before, I use this one for ryanjohnsonactor.info. There are no child themes that I know of, but it’s a solid theme.
  3. Virtue. Not only is it free, not only is it responsive, but it’s also designed for Woocommerce if you happen to want a store with your site. There are no child themes. I haven’t used this one.
  4. Vantage. This is a free theme that wraps around a plugin, PageBuilder. I haven’t tried it, but it appears that it would permit easier customization for most people than child themes would, without the expense of costly solutions like Headway or Dynamik (which I use on some sites).
  5. Omega. This is a wonderful free theme that has inspired quite a few other free child themes. Here are three of them: Composer, Hotel, and Church. You can find even more with this search.

Note that I’ve only added responsive WordPress themes that are free, not “lite” versions of commercial themes that are often omitting really basic features so that you’ll pay for it. One of those features often missing? Responsive.

A Child Theme Primer

For those of who who’ve never used WordPress child themes, they are a spectacular feature.

  1. A child theme, at its most basic form, is a new folder in the WordPress theme directory that contains a stylesheet (named style.css).
  2. A child theme can also contain new WordPress functions that may alter the parent’s theme, which I do in Ryan’s site. (And deirdre.net, also, as I have changed the way the header looks—substantially—from the StudioPress Metro Pro theme it started out as.
  3. A child theme can also contain any other resource a theme can, including graphics, fonts, and JavaScript.

Essentially, it’s installed just like any other WordPress theme, it’s just that you need both the child and the parent theme installed for it to work.

Once You’ve Changed Your Theme, Now What?

  1. Log into Google Webmaster Tools. If you haven’t verified your site, go through the steps to do that. Read carefully about any issues Google says your site has, then fix them.
  2. For the love of your readers, please use permalinks. You’re not going to remember, and neither will I, that this post is deirdre.net?p=5024 a day from now. From the WordPress admin interface, go to Settings -> Permalinks. Click on “post name” (or anything other than “default”), then click Save Changes. This will help your site rank better.
  3. Install an SEO plugin. There are two that are particularly well-regarded: All-in-one SEO Pack and Yoast’s WordPress SEO. I use the latter. Both will coach you on how to improve your page ranking. It’s like having your own copywriting coach.

Here are two screencaps taken while I was drafting this article:
yoast-seo-1
yoast-seo-2

Is it Really Worth All That Effort?

As a marketing coach I know phrased it: “No one ever complained about having three times as much Google traffic. For free.” And that’s true. All you’re doing in changing to responsive WordPress themes is making it easier for people to find your site.
I don’t know why Google’s pushing this change specifically, but I’ve been really frustrated with horrible mobile experiences. Bad mobile sites cause a higher bounce rate. Reducing bounce rate is also critical to ranking, so you may find that you get a lift in traffic. I mention in that link that I was testing something, and that test has been successful. I’ll write about it next week.

StudioPress’s New Author Theme

Less than ten minutes before I planned to post this, I found out about a new paid theme I’m super excited about.
One of the huge problems of author-friendly themes out there is that most are designed for one book. They’re inevitably badly designed for the face that book covers are (not universally, but nearly so) tall rather than wide or square, and almost all WordPress themes use landscape or square images.
That kind of thing? Will drive you crazy over time.
I was in the middle of fussing with some theme constraints, and now I’m packing in that project because StudioPress, author of the Genesis themes family, has a new Author theme.
Further, even if you don’t want that particular Genesis theme, there’s a free Genesis Author Pro plugin that’ll work with any Genesis theme.
StudioPress themes are lean, optimized for speed and search engine optimization. I’m really glad I switched last year. I was in the middle of making some changes, so I may well switch to the Author Pro theme myself.

: What I Learned from Google Analytics Today

I’ve been trying to be smarter about marketing, and part of that means understanding who finds your pages and how they find them.
Hence I’ve delved into the dark art of SEO, specifically landing pages: when people search and find/visit my site, what pages do they land on?
And…I was surprised! Who knew that 1,000 (~2%) people would visit my spork page?
deirdre.net-landing-pages

What Surprised Me

I only looked at the top 25 landing pages. Here’s what surprised me from those results.

  1. I’m unsurprised that Marion Zimmer Bradley brought in the largest chunk of hits, especially given that one post was linked to from The Guardian. What I am surprised is that, SEO-wise, it’s a smaller number than I expected. Then again, she’s been dead over fifteen years, so maybe I shouldn’t be surprised.
  2. Similarly, I get a lot of hits on Ellora’s Cave posts, but it’s only 7% of my incoming search traffic despite having a high Google ranking for the search term Ellora’s Cave. Which…should say something about EC: relatively obscure.
  3. 20% of my incoming search traffic leads to my various art projects, mostly t-shirts. Given that I’ve been posting them for less than a year, this is very interesting to me. I was in the middle of a quandary: given that I want desamo.graphics to focus mostly on graphic elements for sale, is it more off-brand to put those projects on deirdre.net or on desamo.graphics? The results say to me that I should keep these on deirdre.net.
    Also a surprise was that this was my most-frequently-found art-related post.
  4. 9% of my incoming search traffic leads to two posts about fountain pens. I should do more of these. Did you know there are relatively recent patents about cool fountain pen technologies? It’s true!

Finding Your Own Landing Pages

You can find your top pages by doing the following in Google Analytics:

  1. Log into google.com/analytics. If you haven’t set up tracking on your site, now’s a good time to do so.
  2. Click on Reporting.
  3. Click on Acquisition.
  4. Click on Search Engine Optimization.
  5. Click on Landing Pages.

You can see more about how to do that in this moz.com blog post.

: The Amount of Time it Takes

Just for the record, the amount of time it takes from the time someone decides to to use a new pseudonym to:

  1. Google the potential problems with the name, then register the variant that’s the most promising.
  2. Wait for DNS to propagate.
  3. Find a theme for a landing page site template.
  4. Upload the bare bones to the writer’s server of choice.
  5. Find the right stock art and fonts for the right look. Requires searching five different sites, but you think you nailed it for not just the one book, but the planned series.
  6. Start setting up the email accounts. This needs another round of DNS propagation for reasons you never have figured out, and it’s two in the morning already.
  7. Restart Apache. Whoops.
  8. Web server down! No………..
  9. Obligatory teeth gnashing step.
  10. Oh, that’s why. Doh.
  11. Web server running again. Phew.
  12. Design the book cover from scratch. Fuss with it a few times.
  13. Hack and saw the web site template into something resembling what you need right now.
  14. Verify that the email accounts now work. Woohoo!
  15. Hack and saw the background image that isn’t as perfect as you thought it was. What’s that jaggy edge? Ewww.
  16. Write all the copy for the web page.
  17. Have the author sign up for Twitter.
  18. Have the author sign up for Smashwords.
  19. Figure out how you broke the author’s web site’s layout. Twice.
  20. Fix it, declare victory!

…eight hours have passed. And $35 or so ($15 for domain, $12 for landing page template, $8 for art).
Just in case you’re ever inspired to, you know, do the same.
I can has nap nao?

: Interesting WordPress Spam-by-Proxy Today

Today, I got one of the classic spammy kinds of comments with English words that don’t make sense when strung together.

I am this is on the list of a great deal important information in my situation.

One of these days, I’m going to get one with the words in the sentence alphabetized, and it’ll make me laugh.
However, what was different about this one is that it didn’t link to a spam domain.
Instead, it linked to a forum profile at an educational site (major university in this case), and that forum happened to show a user’s URL to everyone. The linked site was a spam site. The educational forum allows registration from anyone. (For obvious reasons, I’m not listing the link.)
So, just be aware when you get a comment on your blog, even if the linked site appears to be legitimate, it may be just spam-by-proxy.

: The Sort Implementation Interview Question

I’m going to go out on what seems to be a wildly unpopular limb here and say this: asking a developer to write an implementation of a sort algorithm is almost certainly a bad job interview question.
Why? Because you’re likely not hiring someone to write implementations of sort algorithms. Even if you were, they probably would not be writing optimized code in a job interview situation, so what’s it really testing?
Problem solving skills aren’t universal, nor does the ability/inability or inclination/disinclination to solve one kind of problem necessarily reflect one’s overall skills. Or lack thereof.
Remember that the person being interviewed is also interviewing you and deciding whether they want to work with you or not. If you ask a coding question that’s more directly relevant to the job at hand, then they will have a better sense of what it is you do every day—and whether that’s something they want to do, too. You’re engaging them in your problem space, not asking something they may or may not warm to even if they’d love the job you’re interviewing for.
For example, in an interview I went on once upon a time, the interviewer said, “We have this problem, and I’d like to see how you approach it.” So it was a supportive, shared, coding question. I had questions about some aspects of the requirements, which the interviewer then answered. That was a great interview approach.
I’ve come to dread the sort interview questions. Frankly, it’s not a part of programming I enjoy. I like the fact that other people think about sort implementations. Yay, diversity.
I remember once, I think it was 2005, having re-reviewed all the common sort algorithms, then flown to a job interview. The question: “How would you write a shuffle algorithm?”
I remember that instant of total frustration far more than anything else from the interview.
My answer was something like: create a hash of something like a random seed from the current time plus some aspect of the information you had about the song (since it was about shuffling songs) like the title, and then sort the hashes. I have no idea if that’s a good answer, but it’s what I came up with at the time.
Meanwhile, I’d much rather focus on whether we need this column or not, whether that schema is better suited for the project than this other one (and why), can we produce the desired page with less HTML/CSS markup? And how much can/should we shunt off to JavaScript? How much jQuery do we need? Does this page degrade gracefully without JavaScript? What pieces of this should go in the controller vs. the model or the view (and why)?
Using a different field, asking someone who’s applying for a general application programmer to write a sort implementation is like interviewing for a job as a Cosmo article writer and being asked to produce a sonnet in the job interview. (With the added bonus of live critique questioning your choices.)
Now that’s not to say that knowing how to write sonnets isn’t a cool skill. It is.
But let’s look at what an article writer needs skill at that a sonnet writer doesn’t:

  • Ability to write whole sentences
  • On time
  • Correct length (sonnets have a lines/syllable count, but what an article writer needs is correct amount of space on the page, which is an entirely different form of length requirement)
  • On correct subject
  • Supports advertisers
  • Current and relevant
  • Literal language

What skills a sonnet writer needs that an article writer doesn’t:

  • A feel for syllables
  • Exhaustive vocabulary (because poetry readers will look up words but Cosmo readers almost certainly won’t)
  • How to write something timeless
  • The ability to fiddle until it’s “just so”
  • Metaphorical language

99.9% of all people making their living as writers aren’t writing poetry. 99.9% of the rest write greeting cards for money. The other two are poetry professors. Random aside: did you know Cupertino has a poet laureate?
99.9% of all software engineers making a living as such aren’t writing implementations of sort algorithms or developing new sort algorithms as their job.
Ask more relevant questions.

: Pinboard WordPress Theme Icons for Instagram & IMDb

I’ve updated my Instagram icons for the Pinboard WordPress theme and added new IMDb icons.

Instagram

1x icon
2x icon

IMDb

1x icon
2x icon

See Them In Action!

See ’em in action on the header of this page.new-icons

: Pronoun Power

Context, for those who missed it:

  1. Node.js maintainer (note: I’m unclear on who did the original deed and not gonna go look through all the commits) commits with “he” instead of a gender-neutral pronoun.
  2. Alex Gaynor adds a pull request to fix that.
  3. Maintainer Ben Noordhuis closes pull request with comment, “Sorry, not interested in trivial changes like that.” (same URL, further down page)
  4. Project Lead Isaac Schlueter accepted the pronoun fix.
  5. Ben tried to revert Isaac’s commit, which would re-add the sexist pronoun.
  6. Joyent employee Bryan Cantrill writes blog post about how this is unacceptable and also added a contributor guideline.

    But just so you heard it from us: if this were the act of a Joyent employee, we would—to deliberately use a gender-neutral pronoun—fire them.

  7. Ben wrote a clarifying comment. I want to say this: props to Ben for volunteering in a mentorship program to help get women into the field. That’s important stuff, and shouldn’t be lost in context. Hat tip to @goodwillbits for alerting me.

I have a few short comments.

  1. I worked sixteen years in the field before I worked on a team with another female software engineer. Please try to imagine that everyone of your sex that’s your peer vanishes for sixteen years and what your professional life would look like. ‘Cause that’s what mine did.
  2. The highest percentage of female software engineers I’ve ever worked with is a large team that had, at its peak, about 1/3 females, but, over time, it bounced back down to 25%.
  3. The largest team on which I was the sole female software engineer consisted of 38 people, of which 33 were software engineers. There were two other women on the team: a tech writer and a technical support staffer.
  4. More typically, I’ve worked on engineering teams where there were about 10% female software engineers.

It’s an incredibly tough business to be in and stay in as a woman. Thank you to all the people who spoke up about this issue pointing out how important it is.

Words matter.

Especially pronouns.

Epilogue

Kent Brewster points out that a better way to have solved the problem would be restructuring the sentences entirely. It’s not always possible to avoid pronouns, though Kent’s right about this case.

I kept the scope of my own post deliberately narrow. While I have always enjoyed working with men, sometimes it’s not obvious to them how they push women out of the field. Many women really do need to feel welcome in order to participate, and what may seem like a little thing to you may not seem like a little thing to them.

: How I Spent My Day (Arguing With Apache)

So I had a phone call that was supposed to happen via Skype today. Only it didn’t. At the time, our household was under a DoS attack.
Inadvertent, in all likelihood.
However, after 192,482 request for pages in a 48-hour period, I’m gonna add you to iptables no matter what your intent was.
It turns out that the culprit is that a handful of pages kept making the URL longer and longer. For reasons that I have not yet figured out (and probably won’t sleep until I do), apache did its best to serve up the pages even though those directories don’t exist.
So I have log files for things like (the URL is fake, but the patterns in the post are real):
http://foo.com/woof/a/a/a/a/b/a/a/b/b/b/b/b/cat.html
I found one of the offending pages:
http://foo.com/woof/a/b/cat.html
I can click a link on that page, and it’ll go to:
http://foo.com/woof/a/b/b/kitty.html
…and click a link that looks the same, and it’ll go to:
http://foo.com/woof/a/b/b/b/kitty.html
…then…
http://foo.com/woof/a/b/b/b/b/kitty.html
http://foo.com/woof/a/b/b/b/b/b/kitty.html
http://foo.com/woof/a/b/b/b/b/b/b/kitty.html
http://foo.com/woof/a/b/b/b/b/b/b/b/kitty.html
Except that directory structure’s not on disk. There’s no symlinks up or down the directory tree (do not do that!) that would cause this structure.
It’s html (old hmtl), no PHP, no server-side includes, no JavaScript (or CSS), no .htaccess, no rewrite rules. We’re talking stuff that’s pushing 15-20 years old, here.
It should work.
Yet, obviously, there’s a problem.
So, when someone tries to recursively wget the site’s document tree and uses a high enough number of levels (at least 13 in this case), suddenly 192,482 files get delivered and the requests will never terminate because some pages go (apparently) infinitely deep.
FWIW, we turned symlinks off anyway, and that didn’t prevent it from happening. It’s completely not obvious to me what the source of the issue actually is.
Hell, I was beginning to suspect mod_speling and that’s not even enabled.

Update: An Hour Later….

It turns out that it was an Apache directive I’ve seen so often in examples that I’d overlooked it, even though I never enable it myself.
MultiViews.
Specifically, in directory a, there was no directory b, but there was a b.html. So it would serve that instead, and the apparent directory would get longer and longer and longer, leading wget to think there was another directory level to fetch.
So all that was needed was to turn off MultiViews and restart apache. None of us could remember exactly when that changed, but I think t thhere was a server rebuild in there somewhen.
Also, to the person who’s requested 60,000 copies of the same file that’s so old Rick doesn’t even remember what it is? Dude.

: CSS Transforms: An Interactive Guide

Fellow Apple and Safari alum Vicki Murley has written a book about CSS transforms. You can purchase the book here.
When it comes to books, I’m generally reading fiction in portrait mode, and am of the “just give me the damn text” persuasion. A lot of the extra touches that iBooks Author offers don’t add anything for that kind of book.
However, Vicki’s is the perfect book to showcase the additional features of iBooks Author with its interactive code examples.

: How I thought Web Commerce Would Be Different

…than it actually is.
When I first heard that people were going to be able to shop over the web, I had some expectations about what that experience might be like.
I was reminded of this when I was standing outside my London hotel waiting for the Hotel Hoppa bus, and saw another woman who had the same obscure brand of handbag — and, having never seen an ad for said bags, I wondered how she’d found out about them. In neither of our cases was it through advertising.
Here’s what I expected, back in the day, that I’d see when I logged into a place like Nordstrom:

  1. New clothing arrivals in a size that would actually fit me, with lines that didn’t ship in my size not shown at all. What do I see? Only clothes that don’t fit me.
  2. New shoe arrivals in a size that would fit me.
  3. Focus on what I mostly buy, which is accessories, in lines I actually buy from and (given that there are photographs of these things) colors I’m actually likely to buy. Show me something in a color you know I like, right? I’ll be more drawn to it. Isn’t that basic psychology?

One of my peculiarities is that I don’t buy black or brown unless it’s something spectacular (or spectactularly funny to me, in the case of Woot t-shirts). I own no black or brown shoes, for example.
So let’s take a look at Nordstrom, who presumably knows what I’ve bought from them, and have a look at the home page when I log in, shall we?
nordstrom-home-page

  1. Upper left: I don’t wear a watch. I have no philosophical objection to watches, I just fractured my wrist some years ago and wearing one is still painful. So I don’t. They know I’ve never purchased a watch there.
  2. Upper right: I don’t wear heels that high, and I don’t wear black shoes. At all. They know this.
  3. Lower left: While I do occasionally shop for make-up, this is not a line I purchase. They know this.
  4. Lower right: While I do love Nordstrom’s cashmere, the piece shown isn’t one that would fit me, and the pieces I would buy aren’t shown at all. They know this.

Below the fold is much the same.
How much does this draw me in? Frankly, it says that my interests aren’t at all relevant to what the company wants to push on me. No doubt this is why I’ve felt less and less of a draw to Nordstrom over the years.
Now, you might think I’m singling them out, but this is an endemic problem. It just happens to be an endemic problem with a company who has enough information about my purchase history to do something more meaningful.
In focusing on what companies pay them to push, they ignore their real customer and their real customer’s real needs. Nowhere is this more obvious than in the phrase (which I wish would DIAF) “must have.” It’s a phrase for the intellectually dishonest and lazy to use, in my opinion. It’s about telling the sheep what to do, not about providing what people actually desire or need.
What I’d actually hoped for in the internet shopping experience was something completely different: a way where one could find more indie-made goods that would be of interest based on some kind of social networking that is not based on advertising. In other words, based on what people you know and who have similar taste to yours actually like that you may not know about yet. Learning by networking based on similar aesthetic sense.
How you do that without big money from advertisers corrupting the process is left as an exercise in futility.
While that’s my grand utopic vision of internet shopping, it remains an impenetrable problem, apparently. Etsy’s as close as it gets to good, and it can be a really long way from good.
Every time I see someone trundling around with a Louis Vuitton logo bag, I wonder: is this something they’ve only been told they should like? Or did they spend that money because they thought it would get them status with other people? Do they realize how much status they lose in the minds of other people? I have nothing against LV bags per se; they do make fine leather goods. However, they are not the only company making fine leather goods. Also, I see relatively few of the “no logo all over” lines like Epi than I do of the ones that are walking ads. Worse still are the people carrying fake LV bags.
Frankly, every time I see someone carrying anything that’s a walking ad, I think, “Really? That’s all you think of yourself? That you’re a billboard for someone else? That you paid to be a billboard for someone else? Show some self-respect.”
I thought web commerce would be more about being more individual. Instead, it seems more about the homogenization of tastes. Homogenization is fine for milk.
The handbags we had in London? Ella Vickers. Probably not your thing, but, hey, the world’s a big place.

: Links and Legibility

Back when the web was born, links were underlined. Many early browsers (e.g., lynx) were text only, and many people didn’t have color monitors, or had monitors that were severely limited in palettes (like 16 colors), so the convention of underlines stayed.
However, an underlined link isn’t as legible as one that isn’t underlined.
For those of you who want some thoughts about alternatives, here’s a few:
1) Make the color different than surrounding un-linked text, and add a change of color when the text is hovered over or active. E.g.:
a {text-decoration: none}
a:link {color: #ff9900}
a:active, a:hover {color: #ff0000} /* change from orange to red */
2) add a more delicate border when hovered over, e.g.:
a {text-decoration: none}
a:link {color: #ff9900}
a:active, a:hover {border: bottom: thin dotted #ff9900} /* add border when hovering */
3) add some fancy schmancy effect when hovering. Right now, on deirdre.net, I change the text color and add a text-shadow effect:
a{color:#00437f; text-decoration:none}
a:hover{color: #002444; text-decoration:none; border-bottom: none; text-shadow: #00598d 0 0 4px}
Just be clear and give sufficient contrast that people understand a) it’s a link, and b) when the link is hovered over or active.
You can see a live example here.

: MacBookPro Postgres tip

If you’ve tried to install the postgres ruby gem like so:

sudo gem install postgres — –with-pgsql-include-dir=/usr/local/pgsql/include –with-pgsql-lib-dir=/usr/local/pgsql/lib

…and you get the error:

checking for PQsetdbLogin() in -lpq… no
Could not find PostgreSQL libraries: Makefile not created
* extconf.rb failed *

…then it’s possible you didn’t compile postgres with the –with-openssl option. Doing so made everything work perfectly.

: New Shoes

I’ve got a new Mac, a Mac Book Pro. As this came at the end of a very long, exhausting week, I’m glad it’s done.

Unfortunately, I bought it because I needed it. Saturday afternoon, after my mother was sprung from the hospital, I discovered that my Mac wasn’t charging. Fortunately, it ran off batteries fine (though it had no charge at the time). Several long visits to the Mac store and some plastic later, and I had a new Mac with everything migrated.

Now it’s time to send the old baby off to be repaired and enjoy the speed of the new baby.

: Migrations, Migrations

Or, “Migrating a blog is always more painful than you think.”

I hope you can see this. If all goes well, this blog has been migrated from WordPress to Typo, running Ruby on Rails over Lighttpd. I’ve seen a few feed hits coming through, but I’ll check when I wake up (yes, it’s almost 7 a.m. and I haven’t been to sleep yet…)

I’ve broken a lot of links, and I’m starting to go through them, so if there’s something you don’t see, realize that I am putting everything back together and it’ll take just a tidge of time, especially to get the redirects for the old permalinks up.

I’m changing the categories to be broader and instead going with more of a tag approach, as I think that offers finer granularity with less long-term hassle.

: Some Comments About Shopify

Shopify has been touted as one of those Rails apps that’s going to change the face of the web. I don’t think so, and my comments about why it wasn’t appropriate for me (for fuzzyorange.com) went completely unanswered.

Since others may be considering shopify, here’s my critique:

  1. There’s no easy way to charge tax only in one vicinity, but not others. In the US, if you charge tax in your state, you may not charge it in others. Canada, where Shopify was developed, has both a national GST and a provincial one, so its tax structure is fundamentally different.
  2. There’s no practical way to charge actual cost for shipping. But that’s what I do already (though I ship priority mail and charge for the median zone price for that weight with an estimate of box and packing material weight). In shopify, shipping rates are a function of state. Priority mail rates do not break down by state, but rather by zip code ranges. Frequently, these do not follow state boundaries. Yet, with web services, calculating actual cost should be easy, right?
  3. Most e-commerce sites are poorly designed for people selling one-offs. Honestly, I wasn’t expecting a lot (because it is fairly unusual), but sometimes a store consists entirely of one-offs. Like mine.
  4. No API, thus no easy way to develop add-on tools, e.g. bulk info uploaders, especially handy for those of us selling one-offs.

: Day with Topfunky

Yesterday, I went up to the city to spend time at Geoffrey Grosenbach’s Rails workshop, offered by Carson Workshops. While I was already better-versed in Rails than most anyone there, there’s always things you pick up from other people, and it was an excellent recharger for the mental batteries.

I highly recommend anyone new to Rails go to the workshop when possible.

: SDForum Ruby Conference, day 2

Chris Wanstrath offers a pretty complete transcription of a very flawed talk by Alex Chaffee. There were some really interesting talks, but one thing I was hoping for in the domain-specific language talk was, you know, an actual example for creating a DSL.

(edited to add)
I have been meaning to write up notes about the conference (rather than just a few criticisms), but I haven’t gotten to it yet. Tonight’s out, so probably tomorrow.

: Using a Sessions Table in Ruby on Rails

A few days ago, I changed the table name of the wrong table (without realizing it, of course). Suddenly, my rails app wouldn’t start at all, and no errors in the development log. Naturally, I had a client demo in less than an hour….

What I’d done is change the name of the sessions table to something other than what was in environment.rb.

So, if you happen to have this problem, that’s one place to look.

: The Year in Brief

Trips taken: 7
Seattle, Calgary, Glasgow, San Diego, Los Angeles, San Diego, San Diego.

Airlines flown: 5
United, Air Canada, British Airways, American, Southwest

Traveler’s Century Club countries visited: 4
United States (Continental), Canada, England, Scotland (none new)

Conventions where I was a speaker: 3
Further Confusion, BayCon, Loscon (I had to cancel Conjecture, alas, because I was coming to San Diego the following week for RubyConf)

Conventions/Conferences where I was a volunteer (either for that convention or representing another): 7
Further Confusion, San Francisco Writer’s Conference, Norwescon, BayCon, Westercon, Loscon, LISA.

Obsure music found and acquired: 3
Boney M (German import), Florian Zabach (old vinyl, yeah), Blancmange (UK import)

Artists whose tunes I bought off iTunes: 76
Backstreet Boys, Guided by Voices, Marcy Playground, White Stripes, Daft Punk, Caesars, Tears for Fears, Dorothy Hall, Faith No More, Gary Hoey, The Gypsy Hombres, Mojo Nixon, Marie Osmond, The Stranglers, Erasure, Beck, 4 to the Bar, Yaz, Thurle Ravenscroft, Dublin City Ramblers, Toni Basil, Devo, The Nylons, M, Boney M, Lenny Kravitz, The Rubinoos, Duffy, Rockpile, The Monkees, Billy Connolly, The Real McKenzies, The Presidents of the USA, U2, David Lee Roth, Buggles, Scritti Politti, Sparks, Weezer, Jack Costanzo, Jack Johnson, The J. Geils Band, Miriam Makeba, Die Lollipops, No Doubt, Harry Belafonte, Cake, Enya, Daler Mehndi, Donny and Marie Osmond, Puffy AmiYumi, REM, Split Enz, The Wallflowers, American Bread, Bay City Rollers, Bowling for Soup, Martin Mull, Mocedades, The Dandy Warhols, Osibisa, El General, David, Wes Montgomery, Thalia, Madness, Jonathan Butler, ABC, Jean Knight, Tom Jones, Wild Cherry, Asleep at the Wheel, Bob Wills, Merle Haggard, Willie Nelson, The Weavers

Favorite Guilty Pleasure bought off iTunes:
Die Lollipops, Pata Pata (Safari-Song)

Movies seen in theatre: 1
Serenity, which I loved.

Programming Languages Learned: 1
Ruby, of course. You knew that.

Ruby on Rails projects shipped: 3

Rails projects in progress: 5, maybe 6 as of later today….

: Inflections, Again

Back when there was the virus/viri/virii/viruses/virus and octopus/octopi/octopodes/octopuses debate on the Rails list, somehow I missed this article on my husband’s web site. In short, in classical Latin usage, virus was an uncountable noun, thus its lack of a definitive plural. It is only the change in usage that renders a plural necessary.

: Acts as Chunky Bacon

Ruby on Rails 1.0 is out, along with the new and improved web site. One of the things I like most is the featuring of Why the Lucky Stiff’s Poignant Guide.

Chunky bacon!

sudo gem update rails –include-dependencies

: Fun with Subversion

So, this morning I did an ‘svn up’ on a project before I went to breakfast, then went off onto the other side of the hotel property to do some work and schmooze.

Later, I got this error:

$ svn up<br></br>svn: REPORT request failed on '/svn/reposname/!svn/vcc/default'<br></br>svn: REPORT of '/svn/reposname/!svn/vcc/default': 400 Bad Request (http://domain.com)<br></br>

See, I hadn’t changed anything, and svn up on some other domains worked — which made the problem significantly harder to debug, actually.

Ultimately, the problem was simply a blocked port. Thanks to Daniel for figuring it out while I still had some hair remaining.

: The Clearing of the Decks

I realized I haven’t been writing too much about Ruby on Rails lately, but there’s been a grand flurry of activity.

At one point, I had nine Ruby on Rails projects in the air, which was driving me crazy because I can’t wrap my brain around that many projects (four really is about my limit).

Recently, two were finished, one is in a limited deployment until I get the next feature set going, one was deemed irrelevant, and two others were combined into a single application.

Currently, I’ve got six, including the one in limited deployment, including a new small job from a client.

So, if you haven’t heard from me and think I don’t love you, that’s not it. I’m just slammed.

: Women: the Technology Bell(e)wether

When I first arrived at RubyConf, one of the first people I met said, “Wow. I think you’re the first woman ever at a RubyConf.”

Since there were six women at RubyConf, I can’t say as I’m the first, since we all arrived at the same time, really.

But, as I put it, “women are the technology bell(e)wether.” If you start seeing women adopting a new technology, it’s really about to take off.

So, bellewethers are us.

: Validating Markup in Functional Tests

Occasionally, one finds little gems in patches rejected for inclusion into Rails. This is one of those gems.

You can take the code, plop it into your test/testhelper.rb, add an “assertvalid_markup” to the right functional test and then it’ll tell you exactly how borked your (x)html is, complete with all relevant error messages.

Note: I recommend commenting that out after you’ve gotten valid markup and only check when you’ve made major changes to the markup or are about to deploy. That way, your testing will go much faster and you won’t slam the w3c’s servers.

Thanks to Scott Raymond.

Since putting the code here broke my layout (and my mother complained about that), get the info from the Rails wiki page.

: Problems of Outsourcing, Specifically India

If you are an un- or under-employed engineer, I highly recommend picking up a copy of Chad Fowler’s book My Job Went To India. If nothing else, it will shine some light into a different culture and different values.

However, what might be of more interest in the short-term could be this article from Kevin Barnes.

Fascinating.

: SubEthaEdit and Conference Notes

One of the features commented upon at RubyConf was the high percentage of people using Macs: approximately 80%. Really!

So, being enterprising folks, some people started conference notes for each session in SubEthaEdit, then sharing them for others to edit via Bonjour. Since many people had Bonjour and SubEthaEdit open, several people jumped in to add their own tidbits to the notes, creating a richer experience than if any one person had written them.

I got to co-write session notes with Martin Fowler (whose preferred color was green, fyi). I think that’s pretty freakin’ cool.

: Rails 1.0 Session

David Heinemeier Hansson spoke about new features in Rails 1.0. Here are my notes on that talk in PDF form.

: A Good Set of Tips about Rails Deployment

While posted specifically about deploying at TextDrive, it’s not specific to TextDrive.

http://forum.textdrive.com/viewtopic.php?id=6419

: Java is Aristocratic; Ruby is Democratic

A week or so ago, I was trying to explain to someone (who is not a programmer) what the difference in object inheritance between Ruby and Java is. I explained duck typing, but the person still wasn’t getting at what I meant.

I blurted out something different. “Well, Java is aristocratic, and Ruby is democratic.” I went on to explain that Java, in order to determine what you’re capable of depends on what your parent was capable of, plus those special methods that make you you and not your parent. It doesn’t matter if some other kid can do the exact same thing (with the exact same code), if it doesn’t have your parent, Java will think it can’t do it. Thus, aristocratic, because capability is determined by inheritance.

In Ruby, all you ask is “can you do this?” by invoking the responds_to? method. If it does, you’re golden. Thus, Ruby is a meritocracy, which doesn’t, strictly speaking, equate to democracy.

While this may not seem like a big deal, I should point out that it can be. For example, for my first large C++ project, we used zero class libraries from other vendors because none were ready yet. However, when they started coming out, it would have required huge chunks of re-coding to incorporate into another library because the inheritance would have changed.

At the time, when working with Windows coders as a Mac developer, I was keenly aware of how different the object hierarchies were: on Windows, everything was a subclass of window: text panes, buttons, everything. On the Mac, none of the other visual elements were subclasses of windows.

So, in other words, if we’d moved our custom framework into another company’s, such as PowerPlant, we’d have had to do a lot of code changes — probably more than if we’d used a C library — because we’d have to have had everything inherited from the right classes to buy into the framework’s inheritance model.

Had we been using Ruby (which didn’t exist at the time), we might have been able to do this in small chunks rather than all at once — because Ruby cares about what you can do, not who your parents were.

One of the geniuses of Sun was not the language per se, but the idea of releasing frameworks that helped standardize the use of the language. There’s now a lot of competing frameworks, though, so that didn’t last long.

On a completely different note, a couple of weeks ago, we went out to dinner with our friends. One of the people made a comment about Java being slow doing something or other. The person across the table, who works for Sun, commented, “You do realize that Java is a language invented by a hardware vendor….”

: New AJAX Beta Book

The good fellows over at the Pragmatic Programmers have found yet another way to extract money from me, in this case a brand new beta book on AJAX techniques, using several languages for the examples. So, while I’ve checked rails off as a category for this entry, it’s not just about RoR.

As Dave Thomas noted in his blog entry, the book’s only about 2/3 finished, so the part you most want may not be there yet.

Too bad I found out about it at 1:30 in the morning. I’m going to be good and not stay up all night reading it.

: Test Fixtures/YAML tip

I wound up getting an error in my test fixtures that it took me a while to figure out, in part because the text in that part of the fixture was several pages long. Here’s the error:

Fixture::FormatError: a YAML error occured parsing ./test/unit/../fixtures/stories.yml. Please note that YAML must be consistently indented using spaces. Tabs are not allowed. Please have a look at http://www.yaml.org/faq.html

The real issue in my case was having an unescaped colon in the data. And, as it took me a while to find out exactly how to escape a colon in YAML, you just do it by putting double quotes around the colon.

I hope this saves someone some time.

: Happy 10th Anniversary BeBox

As some of you know, I worked for Be briefly, so I feel some ownership in this even though the BeBoxen were a thing of the past when I was there.

Here’s the story.

: WOW Web Design and Project Management Conference

Over the weekend, I attended the WOW design conference. My head is still threatening to explode from being overpacked with information.

When I signed up for the conference, I recognized the names, but (being somewhat bad with names) didn’t realize how cool the instructors would really be. I haven’t even begun to finish transcribing all my notes.

One thing I realized, I’d fallen back into a bad habit of using occasional presentational css class names. I won’t do that again. Really.

I’d also had a site that vexed me, but, with a deadline, I used a single table to work around a browser rendering issue. Or, better description, what seemed at the time to be a browser rendering issue.

When I heard Andy Clarke talk about floats, I realized what I’d probably done wrong. I opened up my project, edited two files, and voila, the entire site was fixed in all the browsers I had on that machine, including the quirky old IE 5.2.3 Mac.

I’m working on some other tests before uploading the changed site, but that was a huge success.

I don’t want to leave Molly or Aaron out, I’m just quite literally inarticulate right now. When I find the brain unpacking device, I’ll post more. I hope.

::stumbles about::

It’s around here somewhere, isn’t it?

In the meantime, Craig Cook has posted a more complete review.

: Saturday in Marin

Today, we decided to go get away from the stressors of the week and drive up to Marin to visit one of our favorite haunts, Sweden House in Tiburon. We sat out on the back deck and had lingonberry pancakes and other yummies.

I looked out over the water and saw a bird swimming. “A duck,” I said (despite the glare and despite the fact that my reading glasses don’t focus at that distance). When going to a restaurant, I wear my reading glasses for the simple reason that I get queasy if my food’s out of focus. Weird but true.

Rick looked at me. “No, that’s a seagull.” I squinted, then saw that it was.

Well, there’s always the Ruby concept of Duck Typing, which I explained. You see, it was acting like a duck….

After that, we went to the Marin French Cheese company and had a small picnic. As we were approaching the picnic area, I saw a group of birds sitting under one of the tree.

“Ducks,” I said.

My mother (the Canadian) said, “No, those are geese.” I looked more closely and saw that they were Rather Large and that I’d been deceived by the brown bodies and dark heads — the majority of geese I’ve seen have been white. I mumbled something about duck typing. Again.

Really, I do know what ducks look like. Honest.

We had some cheese and shared a bit of bread with the birds, including redwing blackbirds. They are so gorgeous in flight.

Some little bright turquose dragonflies darted about, though none were still enough for a photo.

Then, finally, we left for home.

: Ruby on Rails Humor

Occasionally, one gets pointers and tips about Ruby on Rails coding style in the oddest manner…

From IRC (irc.freenode.net, #rubyonrails)

steev: validates_penis_length
patpatnz: steev: actually, validates_length_of :penis
steev: o right…

Puns about constraint checking ensued.

: Last Day at Quova

Today was my last day at Quova. I really think the company is doing some interesting and important work, it’s just that where I needed to be was going one direction, and what they needed was going another.

It all kind of crystallized when I went to BarCamp and realized I was missing a lot of that je ne sais quoi that caused me to move up to the bay area in 1999. It’s not that Quova’s not that kind of place for other people, though.

And so I left what a coworker jokingly called “the cube of infinite sorrow,” (it wasn’t personal, it was a 4-person cube) off for a new and uncharted land. I’ll miss the inflatable T-Rex mascot (named Fluffy).

I thought I’d mention a few things about Quova. What they do: network geography, specifically, where IP networks are located in the world. While that might seem simple, there’s an awful lot of interesting wrinkles.

Of all the CEOs I’ve ever worked for, none have I respected more than Marie Alexander. She’s got that insight into the tech industry, plus a southern charm that I admire.

And where else have you worked where the HR director baked brownies? Every week? And made oatmeal? Thank you Lynda for all those extra details that keeps the place humming.

Mood: Mostly townsville (which will mean something to those of you who’ve seen the defcon scale).

: Rails and Pluralization, Part II

So it turns out that some of the disputes about pluralization stem from how certain words are pluralized.

Rails uses English for pluralization rules, but English has two major spellings (British and American) and many variants within that. Within American usage, there’s significant variations based on the age at which one was taught and how conservative the usage was where one was taught.

When I was in grad school in a writing program, I wrote a story that included the word “traveller.” One of my critique group buddies, a public school teacher, pointed out that I needed to use a spellchecker because it was wrong. Well, it’s not wrong, it’s just no longer a “preferred” American spelling.

Note: travel -> traveled (variation: travelled). Prefer -> preferred (no variation). In British English, it’s travel -> travelled.

So, we were going to talk about plurals, weren’t we?

Jokes about the plural of mongoose aside, some plurals aren’t as easy as you think. Like my example above, they vary based on region, one’s age, and the pedantry of one’s instructors.

For example, while “data” is correctly only a plural, common American usage uses it as a singular as well. And don’t get me started on multimedia. Ugh. All media are multi.

How about the plural of the poor little eight, well, we typically call them legs, tentacled creature? There’s three possible candidates: octopuses (the simple plural), octopi, and octopodes.

While octopi was in fashion for a while, it is a Latin-formed plural on a Greek-based word. (Sorry, I just have to say this: the horror!)

Some people say octopodes is the correct plural. Personally, I think this is confusing for two reasons:

  1. Octopus belongs to the order Octopoda in the cephalopod family. Depending on who you talk to around the world, people refer to the octopus’s limbs as “feet,” “legs,” “arms,” or “tentacles.” If you’ve read the book Cephalopod Behavior (you have, haven’t you?), you’d know that they are technically tentacles. Arms are those two extra (longer) appendages that squid and cuttlefish have. Thus, trying to reinforce the “foot” analogy in the “octopodes” pluralization is, essentially, broken in my book. Yes, I know what the family and order names derive from, thank you for asking.
  2. It’s not just the tentacles that are plural, it’s the whole octopus.

I think Matt Jankowski said it best on the Rails list: “I would appreciate VERY MUCH if the person who is building an application that requires an octopuses table could email me off list and let me know more about what it is that they’re doing and why.”

That goes double for me.

: Rails and Pluralization

At first, I didn’t really get why Rails did pluralization of entity names.

One day, I was putting together a list of the relationships in one of my projects so that some of the non-technical people could help sanity check them as I went over them.

class Person < ActiveRecord::Base
has_many :addresses
has_many :phones
has<em>and</em>belongs<em>to_many :conventions, :join</em>table => 'memberships'
end

class Address < ActiveRecord::Base
belongs_to :person
end

class Phone < ActiveRecord::Base
belongs_to :person
end

class Convention < ActiveRecord::Base
has<em>and</em>belongs<em>to_many :persons, :join</em>table => 'memberships'
has<em>many :member</em>type_prices
end

class Membership < ActiveRecord::Base
belongs_to :person
` belongs_to :convention belongsto :attendancetype hasmany :memberpayments end`

…and so on. I think that the pluralization makes the relationships clearer, because the pluralization makes sense in English. When you refer to a single object, it’s singular; when you refer to multiple objects, it’s plural. Makes sense, doesn’t it?

It wasn’t until that moment, though, that I understood the Rails naming conventions, probably because I’d never looked at all the model files at once en masse. While I resisted the convention at first, I genuinely think they make the code clearer.

: CocoaHeads

Thursday night, I went to the first meeting of the Silicon Valley Cocoa Heads, which was a lot of fun. Unusual for a first meeting, there were 24 people there, including long-time Mac writer Scott Knaster. He showed off his latest book, and people introduced themselves and talked about their current projects.

Of those there, almost half either currently worked for Apple or had worked for Apple. I don’t suppose that’s surprising, it’s just that BaNG! rarely got that sort of a crowd.

Anyhow, great fun.

Updated to add: Ah, found my notes. Knaster talked about his experience working on the Longhorn project, during which time he spoke with approximately a thousand Microsoft engineers, each of whom had a different view of what Longhorn was going to entail. When it was pointed out that Longhorn still hadn’t shipped and that Microsoft hadn’t had a major OS release in some time, Knaster quipped: “Microsoft has become the company that has forgotten how to ship software.”

: Blinksale, a Snarf

I wasn’t going to mention Blinksale, but then Eric Meyer made me snarf my coffee this morning with this entry:

On the other hand, the visual design of Blinksale totally hurts my eyes. Those are some amazing shades of green, boys.

Why yes, they are amazing shades of green. I like bright colors more than most people, but the fluorescent chartreuse sidebar was a tad bright even for me.

I’m certainly glad that DHH commented on the whole thing. Ultimately, he’s right: having other people produce commercial rails app validates the usefulness of his work. Even if they do resemble Basecamp in some ways.

: Tired, tired, tired

I had a long day planning for the next version of BayCon’s registration software. Yesterday, had a meeting with the database team.

My head is about to explode from all the info. Sometimes, when I’ve had one of those days, all my body wants to do is fall over asleep so it has time to index.

I have managed to get postgres installed on my machine (no thanks to fink) and working; now I just need a php that works with it for phppgadmin. Gosh, I haven’t compiled php since I was using Linux as my desktop OS. Alternatively, I could just use another tool, but there’s darn few for the Mac.

I’ve been working on my Javascript homework, but I’m just too tired to see the error in what I’m doing.

So I guess that means I’m going to sleep….

: Tiger, at last!

So, I decided to install Tiger yesterday when I read a blog entry about a Backpack Dashboard widget. One of my problems had been backups: I keep my home directory on a UFS partition so that I can use rsync for it. However, I’d never figured out a way to effectively back up my / partition, which is HFS+.

Having recently signed up for del.icious, I discovered the answer through searching through “backup” tags. In short, the answer is rsyncx.

Voila, by 4 a.m., everything was backed up. I woke up at 10:30 and began my install. What with having the DVD installed slightly wonky the first time (and the install failing as a result), then having my Mac not want to start up again for a bit (it got cranky), things weren’t as smooth as I’d have hoped — but I did finally get it all installed.

By the time I got all the developer tools installed, the system updates installed, and so on, it was 4 p.m. So, for a fairly complex install, it took me 5-1/2 hours, not 1/2 hour. With an OC-3, a faster hard drive, a faster cpu, and a few gigs of ram, it probably would have gone faster. I just have a wee little iBook G4, though.

I’ve updated my ruby so that I can run rails directly from Tiger’s install of the language (in Panther, you had to do an install into /usr/local/bin and shadow the 1.6 install in /usr/bin).

Well, I’m off to play.

: Rails Update

By now, everyone and their brother has heard that Ruby on Rails 0.13 has been released. Right now, I’m updating the third machine today. Some people have had minor issues with the upgrade, but my app’s pretty new and some of the features are cool.

With that news, the final beta of the Rails book also came out today (not coincidentally).

On a side note, related only because the web app is written in RoR, I signed up for Backpack today. I already have a free Basecamp account, but I wasn’t sure whether or not I’d actually prefer Backpack.

So far, I do. I’m much more likely to pay for the lowest rung of Backpack than Basecamp, even though Basecamp does more stuff. Right now, I’m using Backpack to keep my Summer classwork in line. In order to spackle some holes in my software development and design skills, I’m taking summer classes in Java, Javascript, and Photoshop.

: Typography humor

One of my favorite all-time “corporate answers” from the way-back machine.

Subject:   Medu Neter
From:       Anne Ogborn
Sent on:    Thursday, July 18, 1996 23:35:38
Message-ID:     199607182038.NAA24654@post-awful.apple.com

And one last question, I understand that Apple can handle scripts that go left to right or right to left. The Tameran Medu Neter traditionally follow a general flow of the main passage going from the center outward at the top of the page (left to right and right to left), with supporting passages usually being arranged in verticle columns. Also, the arrangement of the characters within a single word is involves changes in all four directions (left to right, right to left, down to up, and up to down) as well as leaps to the end of the word and a return to the previous location (all characters that are also deity names are placed in a position of honor at the end of a word as a sign of respect, regardless of where that corresponding sound falls in the word). Does Apple support languages that act in this manner?

It is true that Mac API’s support both right to left and vertical text.

Apple does not currently sell a script system for Medu Neter, and I know of no plans to create one. Under Quickdraw GX it should be possible to create such a script system, however the mixed direction page layout would require it’s own specialized page layout code above the API level. It would be a nontrivial task to implement such a system.

If you should decide to implement such a system you should place it in the smKlingon space, as we do not currently reserve a space in the script numbering system for Medu Neter. Obviously this will cause problems for Macintosh users who wish to compose mixed Klingon/Medu Neter documents, but hopefully this will be rare.

Engineering Support Engineer
World Ready Software Group
Apple Computer

: Ahhh

Proving that the Pascal part of my soul is not dead (merely resting), I was quite heartened to see that Ruby permitted the following syntax:

for i in 0..255

I miss Pascal’s syntax. I rather liked that you could start at any arbitrary number and end at any arbitrary number, inclusive — especially handy for arrays of things.

Ruby also adds the three dots syntax to exclude the last number: 0..255 = 0…256.

: Ruby on Rails Hype

Well, in the vein of “imitation is the sincerest form of flattery,” there are four Rails-like implementations in other languages that I know of — and I haven’t been looking.

Castle Project works on .Net with Ajax support.

Cake is a Rails-like framework for PHP, and Biscuit is another.

Lest the Java folks feel left out, there’s also Trails.

Speaking of Java and Rails, I was talking with a coworker today about RoR and why I thought it was cool. He asked if I’d seen Trails. Well, I haven’t “seen” it, I just know that it exists. I’m sure it’s very cool.

I mentioned, though, that one of the things I liked about RoR was some of the implicit definitions. For example:

@submission = Submission.findby_marketidandmanuscriptid(params[:marketid], params[:manuscript_id])

I didn’t have to create the function findby_marketidandmanuscript_id — it’s implied. That’s what I like about RoR: the power of implication.

My coworker pointed out that you could write a function in Java, yada yada yada. Yeah, but the point is that you don’t write one in RoR. Same thing for setters and getters. For setters and getters:

attraccessor :firstname, :lastname, :homeph

For getters only:

attrreader :firstname, :lastname, :homeph

Done.

: Rails Day

On Friday night, I decided to finally drop in on #rubyonrails on irc.freenode.net. It turns out that I couldn’t have arrived at a better time, chronologically, as Ruby on Rails day was about to start. The room (yeah, I know it’s technically a “channel,” get over it) was full of enthusiasm about the impending start.

People started getting their emails for their Subversion repositories and their mysql databases.

A few pointers for people doing this next year (there will be a next year, right?):

  1. Make sure you’ve set up rails on your home box (this goes for each of the developers on your team, of course).
  2. Make sure you’ve set up subversion and mysql, too.
  3. Have some idea of what you want to accomplish and how you’ll go about it.
  4. If you’ve never used Subversion before, take it for a spin. It can throw you for a loop if you’re not used to source control.
  5. Pick a project that’s smaller than you think you can do in 24 hours. Each person has to learn (unfortunately, the hard way) what their “guesstimates” are off by, but the rule of thumb that works for me is: Everything takes twice as long as you think, including thinking. In other words, multiply your /dev/ass estimate by four. The project I thought would take an hour, more if I added an extra feature, actually took 3:45 today (with the extra feature) — so, for me, 4x is a good estimate. Of course, I’d quoted 4 hours to management, because I’ve learned my “number” over the years. Your number will differ.

I haven’t seen all the railsday projects, but there’s two I thought stood out: Tally by Technoweenie, dpiddy and caseygollan; the other was Clockwork from Maylo. Clockwork had some really beautiful design on the front page.

More railsday apps are out there, of course, but those were the two that struck me as particularly nifty one-day apps.

: Still Tired, But Moved

Virtually the only thing I’ve accomplished this week is migrating deirdre.net to Textdrive.com, which offers a bunch of cool things including Ruby on Rails hosting.

Anyhow, the main reason I moved from he.net was simply capacity — my prior account only offered 2mb of space. Since I was looking at upgrading, I thought I’d look for a host that had better features.

I’ll be migrating the non-blog pieces of the site over slowly, so if there’s a page you haven’t found, that’s why. In the meantime, it’s probably mirrored at deirdre.org.

Next up on the list: rewrite rules for the old blog (deirdre.org/blog/) to redirect to the new one (deirdre.net)

: Ruby on Rails: First Glance

A lot of Pythonistas dislike ruby because it’s too perl-like. I can see what they’re saying. However, the ruby code I’ve read is all organized very cleanly. I don’t know if it’s possible to be as ugly in ruby as it is in perl, but I haven’t seen any evidence yet.

In concept, Ruby on Rails does kick ass. The ten-minute demo took me about an hour to run, in part because some of the rails syntax has changed since the video was shot. Since some of the people writing the wiki have killed questions related to some of those differences, which only made it harder. Add to that the fact that script/generate doesn’t have the cool documentation that its predecessors did, and, well, it took an hour instead of ten minutes.

However, it is very, very cool.

: Python for the Series 60

I remember when they first got Python running on a Palm. Now it’ll run on my phone: a Nokia Series 60. I’d just prepped Eclipse for SymbianOS development, though I haven’t tried it yet.