Sounds Like Weird
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:
- 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.
- 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.
- 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:
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.
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:
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.
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.
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.
And, unfortunately, 75 legit folks. (As well as possibly more who didn’t say, “Hey!”)
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.
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.
I’m going to look at the settings and see if anything needs to be tweaked.
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.)
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.
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.
For those of who who’ve never used WordPress child themes, they are a spectacular feature.
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.
Here are two screencaps taken while I was drafting this article:
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.
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.
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?
I only looked at the top 25 landing pages. Here’s what surprised me from those results.
You can find your top pages by doing the following in Google Analytics:
You can see more about how to do that in this moz.com blog post.
Just for the record, the amount of time it takes from the time someone decides to to use a new pseudonym to:
…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?
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.
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:
What skills a sonnet writer needs that an article writer doesn’t:
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.
I’ve updated my Instagram icons for the Pinboard WordPress theme and added new IMDb icons.
See ’em in action on the header of this page.
Context, for those who missed it:
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.
I have a few short comments.
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.
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.
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.
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.
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.
…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:
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?
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.
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.
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.
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.
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.
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:
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.
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.
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.
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….
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.
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
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.
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.
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.
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.
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.
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.
David Heinemeier Hansson spoke about new features in Rails 1.0. Here are my notes on that talk in PDF form.
While posted specifically about deploying at TextDrive, it’s not specific to TextDrive.
http://forum.textdrive.com/viewtopic.php?id=6419
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….”
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.
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.
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.
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.
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.
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.
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).
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:
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.
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.
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.”
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.
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….
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.
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.
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
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.
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.
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?):
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.
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)
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.
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.