Half-Elf on Tech

Thoughts From a Professional Lesbian

Category: How It Is

Making philosophy about the why behind technical things.

  • Failure Is Always An Option

    Failure Is Always An Option

    Failure is always an option.No matter how hard you try, how well you test, and how smart you are, you are going to screw up. I could probably just close this post saying that, but for some reason, people don’t like to accept failure as an option. We don’t want to do anything but succeed and think that we can get everything right, the first time, and every time.

    “Well … you can’t!” as Mal told Jayne. You can’t get it right every time, and you’re probably never going to get it right the first time, mostly because it is the first time. Failure is an important aspect of progress, which we all know, and we’ve all heard, so I won’t delve into that. What I do what to do is remind you how to move from failure. What are your takeaways and what do you do next?

    When software fails, the first thing you do is look at the error. I like to describe things in the plainest English possible: I entered in my email, clicked ‘submit’ and my webpage turned into a blank white page.

    From experience, I know that a blank white page is often a PHP error, but by presenting it to myself in straightforward terms, I now know what to search for if I didn’t know that already. Search engines have come a long way in a short time, and if I search for ‘wordpress blank white page’ I get a lot of hits about the ‘White Screen of Death.’ Now I’ve learned a new term and I’ll file that away for later searches. Awesome to know. Now that I’ve found what the problem is (PHP) I can look into debugging. I can read the PHP error logs, or in the case of WordPress, turn on debugging to see if anything gets output.

    The point to this is that finding an error is the first step in learning. I take what the error is, what the failure is, and I go forward. Failing isn’t a stop, it’s a pause in the process. Too many people take failure as a sign to stop everything, and while yes, failing does mean you’re doing_it_wrong() somewhere in there (or perhaps you’re not doing it as well as the next guy), and sometimes it does result in scrapping everything and starting over, it remains a sign to look at what you’re doing, not to stop entirely. When you don’t know the software well, or the tools, or anything at all, that initial failure of ‘It’s broken’ can be hard to overcome. The fear of failure keeps you from just taking the next step of ‘What do I do?’

    Wisdom of the Ancients

    Once you’ve sort out what your problem is, learn from your failure and pass it on to the next guy. The reason a lot of people hate forums is that someone asks a question and either never replies, or leaves a ‘fixed’ message with no explanation. That makes it impossible to learn from the fail for the next guy, and you force them to reinvent the wheel.

    I’m all for learning by doing, but progress happens because we share the answers. Pretty much all school is for a lot of people is memorizing the answers, which has it’s place. The rest of us learn the theory from seeing the path. We see the start, the fail, the middle, and the win, and it’s that journey that teaches us where to go next and invent new things.

  • WordPress Cancel Post Button

    WordPress Cancel Post Button

    Someone asked about this in the forums. I can see why folks would find it useful, so here’s a simple addition to add a ‘Cancel Post’ button to your publishing metabox.

    This plugin checks what post-type you’re on and redirects you correctly for pages and CPTs.

    To Install

    Make a file called cancel-button.php and put it in your mu-plugins folder (if you don’t have one, just make it in /wp-content/). In that file, paste the following (yes there’s no ending PHP tag, it’s okay, you don’t need it):

    <?php
    
    /* 
    Plugin Name: Cancel
    Plugin URI: https://halfelf.org/
    Description: Adds a 'cancel' button to posts, next to Publish.
    Version: 1.0
    Author: Ipstenu
    License: GPL2
    
    */
    
    add_action( 'post_submitbox_misc_actions', 'author_in_publish' );
    
    function author_in_publish() {
        $screen = get_current_screen();
        $cancel = get_admin_url();
        if ( $screen->id == 'post') {$cancel = "edit.php"; }
        else { $cancel = "edit.php?post_type=$screen->id";}
        
        echo "<div class=\"misc-pub-section\"><a class=\"button\" href=\"".$cancel."\" id=\"post-preview\">".__('Cancel Post')."</a><input type=\"hidden\" name=\"wp-cancelpost\" id=\"wp-cancelpost\" value=\"\"></div>";
    }
    

    This will add the button for all your sites on a network, if you happen to use Multisite.

  • Cloudy With a Chance of Upgrades

    Cloudy With a Chance of Upgrades

    We’re all being seduced by the cloud. Amazon’s AWS has become so popular and so, seemingly, inexpensive, that people are looking at it to run a website, instead of traditional hosting. Understanding the cloud actually was the first post on this site, and while two years ago I struggled to comprehend it, today I find myself at a loss many times when asked ‘Do I need the Cloud?’

    I don’t need the cloud for webhosting, and you probably don’t either.

    My Sky

    Yes, I have a semi-cloudlike host on LiquidWeb right now, for seven of the ten domains I manage (the other three are all on their own hosts, one of which being my me Elf Dreams, where I talk about DreamHost stuff). I don’t plan on moving the other seven simply because it’s a massive effort. It’s easier to move yourself across country than it would be to move all my sites, re-build the server as I need it, get the code for the new OS (CentOS vs whatever I move to). Heck, I’m dreading upgrading to CentOS6 because of how annoying that is.

    The point is that I do know and understand what the cloud is and does. It’s very cool, if you’re big enough to need it. Most indie sites are not.

    How the cloud works, in general, is based on the shared resources principal. Everyone shares all the resources in the cloud at all times. If you think back to shared hosting, everyone shares all the resources on that server. The difference between the cloud and the shared is that the cloud has infinite expandability (kind of, but you get the idea), where as a shared host is limited to what it is physically. But when we were back on shared hosting, we used to have a problem with bad neighbors. You know, the other guy on your server who got tweeted by Felicia Day or Wil Wheaton, and suddenly all the sites on your server went down like a bad quiche.

    That can happen on the cloud too.

    It’s not exactly the same, but when you’re on a cloud, you’re on a server with a lot of virtual machines (VM). A VM is a “completely isolated guest operating system installation within a normal host operating system” which is a confusing concept. The reason they’re good is that a VM isolates your hardware in a funky way, making reboots faster, while letting your VM instances share a bunch of hardware and become faster. The flip side to this is that you’re still on a real server. Instead of everyone sharing the same CPU/RAM, you get partitions so I can only use X amount and you can only use Y, and thus we don’t kill each other, until we start slaughtering input/output.

    Disk I/O (input/output) can be best explained if you’re an older computer user. Remember when we used to play “Where in the World is Carmen San Diego?” and we’d press a button to ‘travel’ and that old floppy drive would grind like a cheap espresso brewer? That’s I/O. The disk is being read and the data is being input from the disk and output to your Apple IIe. The basic concept of this still exists, and it makes sense when you remember we have to read the data off somewhere. So if you happen to be on a box that is getting a lot of traffic, and using a lot of disk I/O, then you’re going to be slow.

    Hole in the SkyThere are ways to mitigate this, of course, but that isn’t the problem. The problem is that you don’t always know that you need to, or how you should. And even if you do know, it’s not always very easy to do it, so the little guy, who doesn’t have the resources to do it themselves, or the money to hire someone, are left hoping that they’re okay, and often end up paying more than they need to.

    And this is why you and I don’t need the cloud yet. The cloud is something I might need, but for now, there are no benefits I don’t already have with a well optimized server and a well built site. If I was a bigger site, or a company, I’d be looking at it as my next upgrade, and studying my past growth. It took me almost 10 years to grow to need a VPS, and it will likely take me at least 5 more before I need to seriously consider cloud. By then, something new will be the big thing, so the best thing I can do is study nginx and keep a finger on the pulse of web technology.

    Of coures, the one major advantage to the cloud, and the reason I still see it as being around for a while, is the ability to scale up and down. A webhost provider can cannily utilize that to provide scalable shared hosting, so if you have a bad neighbor, they can be scaled up with less impact to you. But so far as I know, we’re only there with VPS demi-cloud providers right now. Give it time, and the cloud as we know it today will be tomorrow’s low-end hosting.

  • phpMyAdmin vs CMS

    By ‘CMS’ I mean WordPress, Drupal, whatever.

    So here’s a funny. I moved my DreamHost site to a VPS, so I could learn nginx (I’m still a newb) and suddenly I couldn’t get to my phpMyAdmin anymore! Before someone says it’s DreamHost’s fault, this is actually due to how I installed subdomains (which I don’t recommend) and configured nginx (still optomizing). That said, not every CMS is flexible enough for this, so if you have this problem too, here’s a work-around.

    As you know, you’re supposed to go to http://mysql.elftest.net which then sends you to http://elftest.net/dh_phpmyadmin/mysql.elftest.net/ to get to your phpMyAdmin page. Except it gives you a 404 styled like your site instead.

    Solution? Make a fake subdomain.

    I made db.elftest.net (which has nothing), but now I can go to http://db.elftest.net/dh_phpmyadmin/mysql.elftest.net/ and log in!

    How I buggered my subdomains, and how I fixed it, is another post.

  • Subdomains, WordPress and nginx

    This should be obvious, but I’m not familiar with nginx, so it wasn’t.

    I added trunk.elftest.net as a separate subdomain (rather than Multisite) because I wanted it to run trunk and not impact anyone else.

    The way that DreamHost works, is you have a separate folder for your nginx configurations, called nginx, and it lives off your home directory. This is commonly referenced as ~/nginx/ and yes, if you type in cd ~/nginx/ you’ll jump right there.

    To make WordPress work, I had to create ~/nginx/trunk.elftest.net and add a wordpress.conf file there, with the standard DreamHost nginx config for WP.

    ######################
     # Permalinks
    if (!-e $request_filename) {
     rewrite ^.*$ /index.php last;
     }

    Magic.

  • The Self-Perpetuating Myths

    The Self-Perpetuating Myths

    This is your only warning: I’m going to talk about racism and sexism in tech, and there will be some swearing. I don’t mind if you disagree with me, just try to be constructive.

    One brown baby, three white. I blame a lot of things on society.

    We’ve all heard that minorities aren’t fairly represented in certain aspects of society. There aren’t enough women/brown/gay/whatever on boards, or working in a specific group. We all know that girl gamers get grief. How many of you have gotten asked ‘Are you a girl IRL?’ when you play a female MMO character?

    When you look at groups like the Apple execs, it’s white guys across the board. Google? 2/3rd’s white guy. Yahoo!’s surprisingly the same with three out of twelve.

    But that name at the top, Marissa Mayer, is the weird one in all this.

    Pretty recently she left Google for Yahoo! which was a surprise to a lot of people. Right away, the old snark showed up. She used to blog about cupcakes, and was obsessed to the point of making a spreadsheet about frostings. Seriously? What does that have to do with her ability to helm a company? If anything I’d argue that sort of obsessive attention to detail is what you want. But no, people pointed out it was a ‘chick’ thing. Because a man making a spreadsheet to understand the various pros and cons for armor on an MMO is manly, but food’s a chick thing.

    That sounds pretty stupid when you put it that way, doesn’t it?

    Look, we all know that when it comes to brain-work, there’s no difference between what a woman can come up with and what a man comes up with. If you can’t accept that, you may as well just stop reading this blog now. What makes the difference is how we were raised and where our natural talents lie. Just because I’m not a super psycho coder, and prefer to spend my time helping people with their code, doesn’t mean I’m less intelligent than the people who wrote an eCommerce plugin. And yet, people persist in saying I’m in a ‘soft’ technology role.

    I think I look at more varied code than the majority of WordPress users. I review plugins and I’m pretty capable of understanding what is and isn’t a safe and secure plugin. I can look at themes and tell you where your code is inefficient. Where I lack is not in my technical chops but in my desire. How I create isn’t with code, or visual arts, but with words. The fact that I happen to be a woman means nothing. Still, you can’t escape things like the Women in Refrigerators syndrome, or how few women write comics (even ones with female leads, like Batwoman and Wonder Woman). So what’s really going on here? What’s being under-represented?

    From talking to a lot of group ‘leads’ of software projects, things are still skewed to the white guy, and it shows. If you look at a community dinner I attended, the men were the majority. Then you look at what the women/brown were the leads for, and you come up with the disturbing comment I heard that UI and Support are ‘soft’ tech topics, and that sure made me feel pretty crappy. But I know support isn’t ‘soft’ anything. In support you see more code than just what you and someone else write. At the same time, I’ve been told many times that there’s no coding involved with support.

    Edit: Note, the other woman actually was a core-team rep, not UI, which made the comment I heard even stupider.

    A lot of this is a self-perpetuating perception issue: If a group isn’t equally represented, then there’s an issue. If women aren’t 50% of the presenters at WordCamp, you’re doing_it_wrong(), people will say. And yet we know that forcing equality does not actually make things equal. The basic idea of affirmative action makes a little sense “If you have a white man and a black woman equally qualified, pick the person who will bring more diversity to give diversity a chance.” Then again, that sounds really fucking stupid when you say it outloud, doesn’t it?

    Why do people feel ‘minorities’ aren’t represented? Why do people feel equal numbers means equal representation? What makes equality?

    I’ve been involved in technology since I was a kid. My grandmother loves telling the story about how, when I was under-six, I set up her Novation CAT modem, dialed into her IBM server, and entered in all her data so that she could make me french toast. Never once, until I was in my 20s and working for a company, did anyone ever make noise about how I was a woman. My family made no point of it, and neither did my schools, my friends, or the people I talked to online back then. To them, this was not a ‘boy’ thing or a ‘girl’ thing, but simply something that I liked to do. Meanwhile, I was chastised by my peers for being a tomboy, for being the ‘masculine’ one in my relationships (I feel bad, in retrospect, for my ex-boyfriends), and for all those other things where I didn’t fit in with normal. But computers, technology, and everything along those lines were never something where gender-lines were drawn.

    Shannon Eastin - NLF's first female ref.All of that changed when I joined corporate America. Within a week, I knew, yet again, I was ‘different.’ I was one of five women in my area, and one of two technical women (the others were managers, though one was a working manager). I was weird, because I liked technology, I liked to play with things, and I’d research when I didn’t know. The more I moved away from Microsoft, the less overt my social oddity became, but it was still there.

    This behavior does not replicate within the WordPress Community in the same way.

    Oh, it’s still there, don’t get me wrong. If you want to go search through the forums, there are some awesome posts where a guy goes from totally respecting me to insulting me, and the trigger is when someone mentions in passing that I am of the female persuasion. But in the WP ‘core’ team, I’ve never met anything but respect and friendship. Now these guys are, predominately, white men, and just by their nature, lack the ability to know what it’s like to be a woman. That’s not a bad thing, it’s just a fact. I can’t know what it’s like to be brown, they can’t know what it’s like to be a woman. But like attracts like, and it’s not surprising that the leads end up being white males.

    Most groups work this way. You want to work with people you can get along with, so you pick people similar to you that add value to the party. Again, nothing’s wrong with that! Does that mean minorities get under-represented? Yes. And there is something wrong with how we’re skewed, in that way. It’s not really their fault. Like I said, I blame society. I can’t help but see the world as a woman who’s been treated like crap for being a woman, and white amles can’t help seeing the world as anything but who they are either. And I don’t think ‘forcing’ people to be diverse helps at all. It just sets up a whole mess of problems.

    What can Open Source do?

    So far, I think they’re doing it right, and much of that has to do with the need-based drive of technology. We need solutions, we don’t care who comes up with them, so long as they work and are secure. Also, because a lot of these developers are distributed, we lack the inherit problems of sight-prejudice, that is, if you can’t see I’m a minority, you rarely assume I am one. I become judged on the character and quality of my communication. This has drawbacks, of course. The lack of visual cues makes many of us seem like assholes (text is a terrible communication medium, as it leaves the reader to interpret what they will from what they read), when all we are is being direct.

    It could be better, of course, but I don’t feel that forcing integration is going to do that in a way that won’t leave us with lingering animosity. The problem I face is that I don’t know the answer. I see the problem, and I feel, on a visceral level, the solutions we’ve made aren’t working. I rage against ‘Political Correctness’ because as we take away more and more ‘bad’ things to say, we’re left with a neutered society that lacks the ability to express their thoughts. You can’t say retard, lame, gay, or a hundred other words to express how stupid you feel something is, and with understandable reason. But saying ‘drat’ just doesn’t feel strong enough sometimes, and you want to shout ‘mother fucker!’ We lose freedom of expression in our quest to be fair.

    This brings us back to my three questions:

    • Why do people feel ‘minorities’ aren’t represented?
    • Why do people feel equal numbers means equal representation?
    • What makes equality?

    The fact is, I don’t know. I think the answer is numbers, but that feels less right when I say it. It’s both in value of work and volume, certainly, but neither one is more important than the other, when we get around to it. Like I said at WordCamp San Francisco: WordPress would be nothing without the devs, but it would also be nothing without the users, and without the people who offer support. We all work together. And thankfully, for the most part, Open Source gets this.

    My suggestion to minorities, of whom I am two, is that sometimes when we feel we’re being persecuted, or picked on, it’s actually not that at all. We may be reading a personal attack into something that wasn’t meant that way. Take a moment to reason it out.

    My suggestion to the majority, of whom I am one, be careful when you make assumptions. When you look at the world from a place of privilege, it’s incredibly hard to see things from that other perspective. Also take a trip to where you’re the minority. It’s enlightening.

    I call these self-perpetuating myths because they make themselves more important. The more white-guy-only groups, the more white-guy-only they remain, and the more minorities feel/appear undervalued and underrepresented. Like begets like, and so on, until finally all we have is a steaming pile of angry. I leave this open ended, as the development of humanity is ongoing, and I hope in a decade, I can come back and look at this in a new way.