Half-Elf on Tech

Thoughts From a Professional Lesbian

Category: How It Is

Making philosophy about the why behind technical things.

  • Mailbag: Wrong Robots

    Mailbag: Wrong Robots

    I got an odd email from ‘Yan’ who, amidst the odd hate and sexist filled remarks that apparently I don’t like people in the WP community, had a legit question:

    Seen your post:

    But… Your actual robots.txt does not reflect the content of the article. Hmmm…

    Well. That was almost 2 years ago. And it never reflected the content of this site. I don’t care if this site has it’s images snagged. I have anti-hotlinking protection in my .htaccess anyway. It’s my other site, my massively major huge gallery with 10G of photos that I protect.

    That brings up a point that many people miss about this site. I’m not always talking about what I do here. For example, I talked about making a slide-up bit of code that duplicates WordPress.com’s follow tab. That email setup isn’t here and it never will be. I’m not particularly worried about my followers’ ability to find the sidebar email registration box there. This is a site for slightly more technical people.

    However, the site that code is on is a site visited by luddites, primarily. They want their news about their thing in a way that is simple, straightforward, and easy. They need a reminder. Also they share links on social media a lot, so making a slide-up that auto-pops when you come from Facebook or Tumblr or Twitter was the right choice to make sure people knew what was going on and how to sign up. It’s had amazing results.

    There are lessons I learn from running multiple sites and I bring them all back here to people who would appreciate them.

    Now if people wonder, yes I do think that Google’s still evil for how they hotlink images. Of course, I’d think them equally evil for copying my images. Image search is just a really messy thing. The two options you get for it is that either Google has a copy of all the images on the planet or they hotlink. Even assuming they’re clever enough to protect themselves from duplicate images using some sort of super powerful algorithm, you get those options and each has a problem. If you’ve copied everything, you have to have a file server the likes of which would make the pyramids look teeny tiny, and in both cases you need a database with enough speed to stop us all from running Google Pagespeed tests on Google.

    Am I the only one who does that? Oh. Sorry.

    We’re talking about Google being evil and robots.txt files. The site that I do block Google Images on has a very large robots:

    User-Agent: *
    # My stuff
    Disallow: /cgi_bin/
    
    # WordPress
    Disallow: /trackback/
    Disallow: /blog/
    Disallow: /wp/
    Disallow: /wordpress/wp-admin/
    Disallow: /wordpress/wp-includes/
    Disallow: /wordpress/xmlrpc.php
    Disallow: /wp-admin/
    Disallow: /wp-content/
    Disallow: /wp-includes/
    Disallow: /xmlrpc.php
    Disallow: /wp-
    
    # Gallery
    Disallow: /gallery/albums/
    Disallow: /gallery/themes/
    Disallow: /gallery/zp-core/
    Disallow: /gallery/zp-data/
    Disallow: /gallery/page/search/
    Disallow: /gallery/uploaded/
    Disallow: /gallery/rss.php
    Disallow: /gallery/rss-comments.php
    Disallow: /gallery/README.html
    Disallow: /gallery/rss-news-comments.php
    Disallow: /gallery/rss-news.php
    
    # Wiki
    Disallow: /wiki/images/
    Disallow: /wiki/bin/
    Disallow: /wiki/cache/
    Disallow: /wiki/config/
    Disallow: /wiki/docs/
    Disallow: /wiki/extensions/
    Disallow: /wiki/languages/
    Disallow: /wiki/maintenance/
    Disallow: /wiki/math/
    Disallow: /wiki/public/
    Disallow: /wiki/serialized/
    Disallow: /wiki/tests/
    Disallow: /wiki/skins/
    Disallow: /wiki/t/
    Disallow: /wiki/index.php
    
    User-agent: Mediapartners-Google
    Allow: /
    
    User-agent: Adsbot-Google
    Allow: /
    
    User-agent: Googlebot-Image
    Disallow: /
    
    User-agent: Googlebot-Mobile
    Allow: /
    
    User-agent: Browsershots
    Allow: /
    
    User-agent: Dotbot
    Allow: / 
    

    So yes, actually, I am still using that code. There you are.

  • What Themes Get Wrong

    What Themes Get Wrong

    I neither create nor review themes. I can fix a theme and edit one and hack one, but I don’t design them because I don’t visualize that way.

    But boy do I see a lot of themes doing things in a way I can only describe as wrong.

    Packaging and Requiring Plugins

    A lot of themes do this, and I can understand why. If you make a theme that’s meant to be a store, then of course you want it to be used with an ecommerce plugin. That makes sense. But then we have to think about the drama of Revslider or TimThumb and we have to question the themes that throw every feature into their code. Part of development is maintenance. This is an accepted responsibility and, in the case of plugins, we’re all used to upgrading them for maintenance. The same isn’t true of themes. People hate upgrading their themes, and it’s the fault of themes themselves, doing things wrong.

    Forcing Users to Edit Files

    The first week of February I lost my mind at a theme. I had found a user who had run into a mod_security error. They were trying to edit their theme via the WordPress theme editor and hitting save tripped the scanner. Why? The code in the functions.php file was phrased in a way that spooked the scanner. We walked her through SFTP, which worked, and I helped review the security rules to see if we could safely change them. But then I asked her why she was editing the files directly.

    She wanted to edit her footer, to remove the ‘powered by WordPress and Theme’ line, and the only way was to edit the file.

    That couldn’t be right, I shouted at my screen, but I tested and used the theme and was stunned. Yes. The theme was written in a way that the footer wasn’t editable unless you could code and use a hook to unset the action and make a new one. Even just a simple child theme wouldn’t help because the footer was handled in a function and not footer.php

    No wonder users edit themes. But then it got worse.

    Forgetting About Cache

    The top line in the header.php was a forced setting to create a new PHP session. There are a few problems with this. In many cases, having PHP sessions causes a cache to not serve cached files because the forced session tells it that the particular visitor is meant to have a unique sessions and its trying to honor that. The other common situation is that the first person makes the cache with their unique data, and all subsequent visitors get that cached data. Neither is desirable.

    Why do people do it? I presume because when they built their features, they wanted to make sure each user got an individual view. But sessions are a cheap and dirty way about it. Sadly so are cookies, which a cache will either ignore in order to serve cache, or honor and slow a site down.

    People remember to test a theme for speed and features, but so often they forget to test for cache.

    Un-WordPress Designs

    When a theme makes its own custom interface, it’s harder for users to know what to edit and where. It’s the kind of cognitive dissonance that happens when you’re reading a book or watching a tv show and suddenly everything feels wrong. Like if Harry Potter and Dolores Umbridge started dating. Right. That’s how uncomfortable it is to see a theme with its own custom design for the admin pages.

    Let WordPress be WordPress.

    Accessibility

    I don’t meant on the front end. I mean did you know that there are very few themes that, on the back end, are fully accessible to the blind? It’s just not something people think about and it’s the worst thing a theme can do to the world. You may think that only a small part of the world is blind and you may not worry too much about such a small potential user base. But look back to the previous point. The less you design like WordPress the worse it is for users. All users.

    What Do You See?

    What drives you batty?

  • Don’t Be Rude (Except When You’re Not)

    Don’t Be Rude (Except When You’re Not)

    Don’t be rude with devs (hello Mika)

    A mysterious person named John posted that as a comment to a post about WordPress suffering from the inventors dilemma.

    I replied ‘Hello John’ and added “(I’m sure many people feel I’m rude though I have no idea why John does.)”

    From there on, many of my friends replied that I wasn’t rude. Or in the case of Brianna, when I said I was rude on occasion, she replied:

    “on occasion” seems like the perfect amount to me.

    When two people are passionate but have opposing views on a situation, one or the other is always ‘rude.’ This is just what it is. Rudeness is something that is very situational and subjective. We’re talking about a world where we put our hearts and souls on the line with our code or our problems and, sometimes, someone comes back and says “No” or “That’s the way it is” and they’re rightly annoyed.

    This does not mean they were rude.

    Except that it does.

    I try very hard to be polite, especially to people doing me a favor or providing a service, and I try very hard to respect their time. I try to remember that just because someone is terse doesn’t mean they’re angry with me, they’re probably just trying to get through their day. I try to thank people (especially when I call in to anything insurance or travel related). I try to remember they’re people.

    But I know that, when you’re talking to someone who has deep emotions, who feels a great amount of fire in their heart for something, the opposition or the speed-bump can be met with great ire and angst. The person who says ‘no,’ which frankly is my job many times, is the enemy. They’re against you because, clearly, they’re not for you.

    Except that they’re not.

    Am I rude? I’m sure that, on occasion, I come across to someone as rude. I’m sure that sometimes when I bang out a fast answer, my brusqueness is perceived as disrespectful. I’m sure that my unexpected replies feel like a breech of etiquette. And maybe sometimes they are. I don’t always phrase myself perfectly. I’m not patient enough all the time.

    But I’m not a rude person. I’m always coming from a place where I’d like to help people and educate them. I’m generally a smiling, nice, person. When I’m not able to be that me, I shut myself up at home and read and write, I go for a run, I play ping pong, and I blow off steam. You will rarely see the angry, inconsiderate, insensitive, mean, me. That Mika exists, but she’s not allowed to come out and play. The closest you’ll get is if I feel the need to come to someone’s defense. Like calling my friends or coworkers vile names.

    This doesn’t mean I’m a nice, wonderful, polite person. It just means I’m a person, like you. I’m sure I’m rude. I’m sure I’ve pissed people off. But unless I’ve told you so, it’s unlikely I’m actually being intentionally nasty to you. Maybe I was trying to be serious when you were being a little silly. Maybe I was silly when you needed serious. Communication issues happen. We should try to learn from then and move on.

    When we’re thinking about a world that exists primarily in text, our communication woes become more important. The majority of my work with other people is in email, instant messages, and once in a while, video chat. But mostly it’s text. This means I cannot read your ‘tone’ easily. When I know someone well enough, I can hear their voice in my head. Like I read Otto’s email saying “Here’s the thing…” and I know his intonations. When I see Jan message that has “Hah!” in it, I know it’s the somewhat self-deprecating amusement of the universe. When I see James’ “Nooooo!” I know he’s making like Darth Vader. I bet I can even tell which face Jen’s making when her email consists of “Mika.” Sorry about that.

    But these are people I know and work with. Figuring out which emotion is behind a sentence of “You’re not doing that right.” is hard. Was I mean? Was I terse? Was I frustrated? Was I brusque? Maybe I was just tossing that off as the shortest way to explain something. It’s hard to tell. And because it’s hard to tell, it makes the online world of open source development fraught with headaches.

    The best advice I can give you is that if someone says “Can we start over?” to take them at face value and start over. It’s so very easy to go down the wrong path for too long that you get lost. Remember it’s okay to let go and start over.

  • Rant: Worse than a Popup

    Rant: Worse than a Popup

    I hate popup ads. Everyone does. You’re trying to read an article, perhaps on your phone, and these inline popups show up and obscure the content with ads for things you don’t care about.

    We hate them more when they play music.

    We hate them more when you can’t click on the tiny X on a phone.

    But I have something I hate even more than that and it’s Apple’s fault.

    You see, I use Safari sometimes to read on my phone. This is all well and good until I scroll on a slow site (probably slow because of their abuse of javascript laden social media toolbar crap that we didn’t care about to begin with) and my finger accidently brushes an ad. And then the ad opens the App Store to ask me if I want to download some idiotic game.

    I take deep, calming, breaths and then I close out of the App Store, go back to safari, and I leave the page. Most of the time the article remains unread.

    And why is this Apple’s fault? After all, the fault should lie with the idiots who thought that the best idea for a mobile site would be to have a bajillion ads.

    This is Apple’s fault for two reasons:

    1. There’s no way to tell Safari not to open these
    2. There’s no ‘are you sure?’ message from Safari to let you decline

    In fact, in all my research, the only thing you can do is to clear the browser cache and set Safari to only allow cookies from Current Websites Only. But as Apple warns you, that may cause issues with other sites.

    This can be fixed! Apple can simply make it an option (hidden) to hide this. But also you website designers and developers, if someone says they don’t mind the popup ads and lightbox garbage on the mobile site, I want you do to me a favor.

    Say no.

    The web won’t get better unless you make it better. Please don’t make a website you’d hate too.

    Oh and those ‘cool’ floating sidebars with the tweet links? They look terrible when you zoom in on the teeny tiny text on your website.

    Stop it.

  • Cheap Is As Cheap Gets

    Cheap Is As Cheap Gets

    I have nothing against people on a budget. I understand not being creme-de-la-creme and needing to be careful.

    I really boggle at people who want to run a company website, but feel $15/month is ‘too much.’

    How much do you spend on your car every month? We’re talking gas, insurance, cleaning, maintenance, and so on. You do that for a reason. You need your car to get you places. It’s an investment in your work. You can’t get to your work without a car so you take care of it to keep it secure, you clean it because it smells, and you pay for insurance in case the worst happens.

    Your website is running 24/7 and costs you $15/month and that’s too much for your business? You need to rethink your business model. That’s under $200 a year. That amount of money should be affordable for anyone who’s running a business, even on a shoe-string budget. What really gets me, though, is the person who emailed me saying $200 a year was too much did it from an iPhone. They had the ‘Sent from my iPhone’ signature line still on it. While it’s certainly possible they got a cheap pay-as-you-go plan and a used phone, the reality is they look at the cost and don’t see an immediate value.

    Let’s turn this around.

    $15 a month is about:

    • six gallons of gas (from the Arco down the street)
    • five fancy cupcakes from Wildflour Cupcakes
    • four grande lattes from Starbucks
    • three gallons of milk (probably less in some places)
    • two craft beers
    • one tin of canned unicorn meat

    But we get an immediate value in all those things. We can see the gas, the cupcakes, the unicorn meat, and we see the direct application of our money to a ‘thing.’ A website is different. It is a nebulous entity and floats out there in the cloud. When you’re not selling anything on your website, what’s the point?

    Lately I’ve taken to asking people “How much are you planning on spending on advertising a month?” If the answer is ‘nothing’ then I tell them they need to consider it for their company if they plan on getting anywhere. If the answer is a realistic amount, I tell them to allocate $15 a month for webhosting. They need to have a web-presence. It’s 2015, people will want to see who they are, so make a good, informational, site. Don’t put a ‘blog’ up unless there’s a plan to publish to it regularly. Don’t use code you can’t support. Don’t use a host where you can’t get your content back easily (which is really my only issue with things like Wix).

    But $15 a month is pennies to the traffic a website can bring you. If you sell three gallons of milk a month, you’ve broken even, after all.

  • A Case For Hello Dolly

    A Case For Hello Dolly

    I like it.

    I never use it, but I like it.

    I delete it, but I like it.

    It’s not professional, it’s not beautiful, and it’s not something that makes WordPress look grown up.

    And I think needs to stay in the core download of WordPress.

    Let me tell you a story of you. Let me remind you of yourself. Not the you of today who knows all amazing things. Remember the you who was young and inventive but inexperienced. The you who knew how to throw a football but couldn’t throw a spiral. Or you knew how to drive a car and not stick shift. The you who delighted when you learned all those things, like a child with a new toy.

    That you was not professional yet. That you needed an example for how to do new things. You had teachers and friends and parents who showed you the ropes.

    That’s what “Hello Dolly” is. Hello Dolly is the Hello World of WordPress, and it makes a plugin suddenly seem like a non-insurmountable task. We can all look at that one file and see either inspiration for code we can make, or a sudden lack of terror for what WordPress is. Like I tell people in training classes, WordPress is just files, folks. A plugin can be just that file. And you can take the idea and run with it. More than just a training tool, it’s the epitome of open source. It’s code, freely given, than serves as a first step for people who come to WordPress with no formal education. It’s free. It embraces the goals we want to see in open sourced code.

    So it needs to stay in WordPress, because you needed it once. Does it make an annoying extra step for you to delete it when you’re installing WordPress for your clients? Maybe, but for me it makes a moment where I can look back at myself from 2009 and see how far I’ve come from the woman who was too scared to speak at a WordCamp to become a WordPress professional.

    I’ll take that one extra step and never forget where I came from.