Half-Elf on Tech

Thoughts From a Professional Lesbian

Author: Ipstenu (Mika Epstein)

  • Automatic Geolocation

    Automatic Geolocation

    Traveling outside the USA always reminds me of how annoyed I am when I go to websites.

    Like most of you, I have a bevy of websites I visit regularly. In my case, a large number of these sites are image or video related, and due to the legality of those things, I find myself restricted based on my current location. It annoys me, because if I pay for a service like my cable TV, why can I not watch it outside my home? Restricting my content based on my location is frustrating. I get CSI at home, but I can’t watch it while I’m here in Japan. This, of course, leads to things like illegally downloading movies, because there simply is no easy, quick, efficient way to acquire those things.

    But worse than that is the tacit assumption that just because I’m in Japan, I want to visit the .jp version of a site. The number of sites that auto-redirect me to my current location’s language are not few, and most of them don’t have an easy way for me to click back and explain I’m not able to read Japanese.

    For many years I’ve told people that forcing a language choice on users based on their IP is improper and unpredictable. It’s for the same reason I tend not to recommend blocking entire countries from your websites. The probability that you will hit innocents with a broad attack is very high. It’s higher than the chance of rain in Southern California.

    So how do you do it right? You have to start by asking the right questions.

    What language does the computer use?

    You can detect that, you know. If my computer uses English, the odds are that I want to use English. Of course, a French speaker might use my laptop, but that’s on them, and one hopes they know to go to google.fr instead of google.com. Speaking of that…

    What URL did I type in?

    If I go to a URL directly, I may actually want that URL. This goes for you mobile apps too. If I go to Google.com right now, I get this:

    Google's friendly warning

    That’s a nice, friendly question in English asking if I’m sure.

    Have I been here before?

    Cookies. When I go to a site, I get cookies. Those cookies can tell you what language I used the last time. So if you have a flag system where I can pick my language, please do try to honor that. There’s nothing a visitor hates more than having to reset their preferences every time. Facebook, this means you.

    Where is my IP?

    I know I said not to use this, but there’s a reason I want to ask this. If I take into consideration the URL, the browser locale, and the IP, I have a clearer picture of who’s visiting the site and what they want.

  • It’s Not GPL and That’s Okay

    It’s Not GPL and That’s Okay

    I’m probably starting a wildstorm here, but I want to put this out there. I don’t always use 100% GPL products on my sites, and that’s okay.

    Please put down your pitchforks!

    I am a happy Open Source person. If you give me a choice between two equally good products, one being Open Source and the other not, I’ll pick Open Source any day of the week. But. There’s a reason I use Apple Pages and not Open Office. Pages works for me. It fits my workflow, it fits my brain, and it makes me write more easily. Since I’m often sprawled on the couch writing with my thumbs on my iPad Mini, it makes perfect sense to use Pages and iCloud.

    But there’s another place I don’t worry too much about GPL or Open Source, and that’s when I’m coding something that is only ever going to be for me.

    I was working on a new site and we were looking for icons to properly represent how we felt. We needed a toaster. We didn’t have one in Font Awesome or Genericons, so I pulled up Symbolicons! The catch? It’s not GPL. But the thing was, we knew we’d never be distributing these icons. It was for one website, so why did it matter?

    And the fact is that for this use case, it did not matter at all!

    patchwork elephant

    Understanding what I’m doing, who it’s for, and where it’s going to be used is highly important. And understanding what I want to support and maintain is equally important. For the most part, open source doesn’t come with Apple Care or companies like OWC who specialize in bailing people out or helping them extend things. WordPress doesn’t come with that, for good or not, it’s really a ‘figure it out as you go’ sort of product.

    There are use cases to consider. Who’s going to use the computer? What do they know? Is it worth teaching them Linux or can they keep using their Mac? Much like I do when I’m mentoring someone, I don’t try to push my ideals on someone, or assume my way and my solution is the only solution. When I look at GPL, yes, it’s my default. I always start there. But I don’t stop there and I don’t let it blind me to what things need to be, because the best solution may not be open source, it may not be GPL, and it may not be WordPress.

    So long as you’re not violating a license, use what suits your needs. But do pay attention to those licenses.

  • Replacing a Hard Drive

    Replacing a Hard Drive

    Once in a blue moon I play with hardware. My home laptop has been dropped more times than I care to admit, and it’s finally started to make bad noises. And be slow. As in, I can run one app at a time slow. So I buckled down and put the comic book money into a new hard drive.

    I picked Other World Computing’s Extreme Pro 6G SSD. At 450G.

    The content on my laptop has been around since I was in college and bought my first laptop. Literally. I have every paper I’ve written since high school on here, plus music I wrote, plus videos. It’s a lot. My old HD was 300G and I was always low on space. I also make copious backups to Time Machine. The last four times I got a new computer, I did a Mac transfer. This content, hell, this user account, has been around.

    You bet your ass I kept it again.

    Installing the new HD was easy. Unscrew the back, disconnect the battery, remove the old HD, get the mount screws out, put them and the sticker on the new HD, reconnect everything. screw it’s all back together. Next, though, is the hard part.

    I took my old HD and put it in an external drive case. OWC offers a deal where you get the case and a USB connector for cheap, plus all the tools. Perfect. While I have Time Machine, an over air restore would be 24+ hours. A USB restore, provided the HD doesn’t break, would be about 4. Instead of installing the OS and copying things over, I did a restore from Source.

    Once I got the old HDD in an enclosure, I attached it to your Mac via USB. Then I rebooted the Mac, which took me to OS X Recovery. From there, I clicked on Open Disk Utility and picked the new drive from the left hand pane. There I chose to Erase it and format it to Mac OS Extended (Journaled).

    Once done, I clicked on the Restore tab. I picked the external HD (the old one) as my ‘Source’ and the new one as my ‘Destination.’ Illogically, this is a drag and drop step. Sorry about the photo:

    Terrible photo of what it looks like

    When the data transfer was completed, it was as simple as a restart.

    If you’re skittish, you can put the new HD in the enclosure and copy it that way, booting off USB when you’re done to test it. I’m a little more daring.

  • The Bias of Transparency

    The Bias of Transparency

    When I was in elementary school, we used to go to SeaWorld all the time. I loved seeing the animals, I loved being able to pet and feed dolphins. I loved the whole data dump of the ocean information. I went back in the days where the trainers were in the water with the orcas. I fed one once, and patted it’s nose. I danced with a seal (and sea lion). I really fell for the whole “Humans and animals together!” patter.

    And then I grew up and read about how SeaWorld got those animals in the first place.

    Your personal feelings on movies like Blackfish aside, even SeaWorld admits today that they were wrong in how they captured orcas back in the day. They were cruel and wrong, and SeaWorld hasn’t done that in 35 years. But the part of me that is upset with them is the part that wants to know why it took Blackfish to make them step up and say that. And the part of me that’s livid is the part who asks why they don’t disclose their history as a learning experience?

    Transparent Fish

    Transparency in development is not a new thing. Technology used to be a magical black box, but the more people embrace open source, I feel they’re more willing to express their issues and explain things that have happened. Even when you don’t understand the whole explanation, being told something like “Yes, the outage was caused because some electrical work caught fire” is much more satisfying than “The outage has been resolved.”

    When I talked about why an outage didn’t inspire me to change my webhost, much of the reason was because of communication. While it could have been better, my host was transparent with me such that I knew what was going on. Perhaps not as fast as I wanted it, but I did, at all points in time, know what the deal was.

    Being up front about problems gets messier when you start to talk about things like security. Earlier in the year, MailPoet had a security vulnerability. They fixed it, pushed the fix, and then it was reported on and everyone found out. People were surprised to find that the exploit was hunted down by people now that the information was in the wild, and others pointed fingers at the reporters for publicizing of the issue.

    It’s a double edged sword. If they don’t report on the situation, people don’t understand how important it is to update. If they do make it public, the bad guys know what to look for. That’s why you get things like the accidental DDoS from TimThumb. People knew to attack for it, and they did. It’s the same thing with the HeartBeat vulnerability or the recent Bash issue. Once a vector is found, it will be exploited.

    There isn’t a perfect answer here. There isn’t a perfect balance between information and education and secrecy. We want people to know “Hey, fix this!” but we don’t have a way to tell them without telling evil people. This ends up making us want to keep secrets and hide the truth, which just isn’t going to work in the long run. The only practical answer would be to fix this as soon as possible and hope no one hits us in the meantime.

  • Featured Image Size Redux

    Featured Image Size Redux

    One of my themes didn’t have a Genesis Featured Image.

    Actually it did, but it didn’t have it as an named additional image. And this was a problem because I like to have the featured image size listed in my featured image box, as I explained how to do in my post about how to do this in Featured Image Size. That theme was using the ‘medium’ size for featured images, which meant by code made the box look like this:

    Busted Featured Image Size

    This is because I had no $_wp_additional_image_sizes, and that’s what I meant when I said there was no named additional image size. So I had to change up my calculation and check first if the name of the image size was one of the defaults, ‘thumbnail’, ‘medium’, or ‘large’, and size off that and then check the other options.

    Which gives me this:

    // What is my image size?
    add_filter( 'admin_post_thumbnail_html', 'helf_admin_post_thumbnail_html' );
    
    function helf_admin_post_thumbnail_html( $content ) {
    	// Define what the name of our featured image size is
    	$genesis = get_option('genesis-settings');
    	$genesis_image_size = $genesis['image_size'];
    
    	// Get featured image size
    	global $_wp_additional_image_sizes;
    
    	if ( in_array( $genesis_image_size, array( 'thumbnail', 'medium', 'large' ) ) ) {
    		$size_width = get_option( $genesis_image_size . '_size_w' );
    		$size_height = get_option( $genesis_image_size . '_size_h' ); 
    	} elseif ( isset( $_wp_additional_image_sizes[ $genesis_image_size ] ) ) {
    		$size_width = $_wp_additional_image_sizes[$genesis_image_size]['width'];
    		$size_height = $_wp_additional_image_sizes[$genesis_image_size]['height'];
    	}
    
    	$my_featured_image = $size_width.'x'.$size_height;
    
    	// Apply
    	$imagesize = '<p>Image Size: ' . $my_featured_image . 'px</p>';
    	$content = $imagesize . $content;
    
    	return $content;
    
    }
    

    Right below the global check, I do an if to scan the array and grab the sizes based on that. It’s exceptionally simple, and the major change was moving it to set variables and then setting based on those outside of the if/else check. But it works perfectly on both my sites with regular sizes and the fancy sizes.

    I still don’t have a check to see if the theme is Genesis or not, but this multisite is 100% Genesis for all sites, so it’s not an issue for me. If anyone has a way to check “Is this active theme on this site Genesis or a child,” please share. The world will thank you.

  • WordCamp Tokyo

    WordCamp Tokyo

    There was something about me being busy this year… I’m headed overseas on the 7th to my second international WordCamp (Montreal being the first, back in 2012).

    WordCamp Tokyo 2014

    WordCamp Tokyo, I will be on a panel discussing the Worldwide Usage of WordPress. Representing America, I’ll be on an international panel to explain where I see WordPress being used and where it’s going here (and in Canada, I can speak for them, I am half-Canadian, I’m my own hat!). I am highly delighted about getting to say ‘international panel’ to some of my family. This is my first time on a panel for WP, though!

    Wapu - MascotThis is my second trip to Japan. The last time was in 2008 when I spent 12 days hiking around Shikoku with my father and brother, visiting the temples of Henro in Awa Prefecture. One day I’d like to get the chance to finish the hike. It was beautiful and amazing and blew my mind.

    Also this is why I had to decline WordCamp Europe and Dallas/Fort-Worth, both of which I really wanted to attend. I can’t do that much travel in that short a time, seeing as WordCamp SF is right around the corner. I’m really excited to be going to Japan and getting to talk about WordPress while I’m there. This is one of those things you hope will happen when you get a job with a company as cool as DreamHost.

    I know I won’t see many of my regular followers there, but I will see some wonderful new faces and I can’t wait.