I made up a theory involving toilet paper & fruits/vegetables

So I was sitting there, as you do in the bathroom, and I came up with this theory on toilet paper. I think that if you were to compile purchase histories at your average grocery store, you’d find that quality of toilet paper purchased correlates inversely with the amount of fruits & vegetables purchased. So, people who eat the worst might be more likely to buy fancier TP.

There’s a pretty big range in terms of quality for toilet paper. On one end you’ve got your dirt cheap single ply Scott, and the on the other end you have 3 ply super fluffy toilet paper made from the tears of angel babies.

Now, your poop is a good representation of how you eat. A diet rich in fiber (AKA all of those fruits and vegetables) results in fluffy poop that comes out clean. And if your poop comes out clean, that means minimal wiping. A less healthy diet means messier poop, which means more time spent on the toilet, and more time (and toilet paper used when) wiping.

If you’re not spending that much time wiping, cheaper toilet paper works just as well as anything else. The more you have to wipe, though, the more sore your wee bum is going to become using lesser quality paper, so that fancier paper that’s thick and fluffy and infused with aloe is going to be a lot more appealing. Thus, my theory.

There’ll still be outliers, of course. Some people will always choose the cheapest option available. Others will always choose the fanciest option available. But, even with those averaged into the data, I still think my theory is spot on.

I finally got around to updating my professional site, so I’ll write some boring details about the process

I updated varoper.com. It had sat untouched for almost 4 years prior, and really needed it. It’s been through approximately 2398475293847 iterations. The Wayback Machine has its first record of varoper.com on January 26, 2002. I believe I created the first design for a class project, and then went from there.

In terms of sites I’ve built, it wasn’t the first. Technically my first website was a beautiful monstrosity on Tripod.com, created in 1996 during study hall in high school. My first site that I built for someone else was for the Department of Adult Health in VCU’s School of Nursing back in 2000. And ptocheia.net, my personal dump site, first came to life somewhere around August 8, 2001 (or at least, the 1st record the Wayback Machine has of it).

These weird reminders that in 2 more years, my html skills will be old enough to drink. And I’ve been doing PHP for 13 years now. And god I’ve logged some serious time on these internets. I try to avoid thinking about these things in the context of my last job, better to focus on the fact that I’m no longer there, and I can try to be somewhere that appreciates the time and effort I’ve spent building all of these internets.


My first iteration of the site was straight html & images. No css or anything, and I’m pretty sure it involved a giant brain that I’d painted, which I scanned in and used to represent my head or something. Wish I still had that .jpg (or the painting itself) somewhere, but it seems to be long gone.

According to the Wayback Machine, I was clearly uneducated about how to present oneself professionally. Specifically: back in college, I was on a DDR team called Team Yaoi. I built the website for the team, & linked to it from my resume, available from my website at the time. The Team Yaoi website included a page that consisted of nothing but erotic furry art, drawn by myself & a few other members of the team. Classic. Of course, I did land a job using that website (plus a few others) as examples of work, but it’s definitely not the sort of content I’d consider including on a resume now. On a related note, I might have to throw up stuff like that somewhere just for historical/hilarity purposes, to share with those who have long forgotten such things exist. The early 2000s were a great time for beautifully awful websites.

At said job, I learned shell scripting and m4 (a macro language), and redid my website using those to generate the html. They were easier to write than the perl I was also learning at the time, and strangely satisfying for someone who was still excited at the idea of server side includes.

Sometime after that I rebuilt the site in php. I had a period of voluntary unemployment after quitting my watercolor job, and I used that as an excuse to build PHP sites and learn OOP. So I made processes where, in order to add a new piece of artwork to my gallery, I’d just upload the image, and then add some content to a text file, and it would automatically get pulled onto the site.

At some point I realized this was a huge pain for updating text content. However, I spent a couple years at a job that overworked me and left me extremely burnt out, followed by a job that left me feeling unimportant and disillusioned. This bled over into my enjoyment of building websites, such that I had a very hard time convincing myself to work on a website during my off time. I am happily unemployed at the moment, and chose to dedicated this delightful state of joblessness to redoing my personal site, amongst other things, and to take my time doing so in order to rediscover how much I really enjoy making these internets.

I built the site in Drupal 7 because Drupal 7 is what I do. I briefly contemplated implementing it in Drupal 8, but it’s in beta and it seemed a rather bad idea to build one’s primary site in a system that might break at any point. I purposefully chose to build a few things more difficultly than I otherwise might have – I built a custom module to generate the contact form, and chose to write preprocess functions in my template.php where someone else might have implemented a module. Part of this was for skill refresher/building, and another part because the “there’s a module for that” mentality can lead to implementing something large and bloated when all you might really need is a simple code snippet for your particular circumstance.

The design of the site is stark, bold, black and white with strong color accents – this veers away from past iterations in that I decided to design based on a color palette I personally found appealing, rather than something I thought looked more professional and/or trendy. So, blacks & whites, with colors only for linked items (and a different color for each section of the website). Having a neutral setting allows the art to pop, and makes it clear what is a link and what isn’t. I tried to make the responsiveness as smooth as possible, and I spent extra time doing custom alt tags on all images in accordance with accessibility standards as suggested by WebAIM. It is depressing how many otherwise modern sites don’t do basic accessibility. I don’t claim to be an expert, but some of the stuff is so easy to do.

Anyhow, I’m glad to be finally done with the site, so I can focus on other things. Need to do art more regularly, and I still have a giant pile of short stories that stare at me guiltily. I’m also thinking of maybe adding a “crafts” section to the site at some point too – this would accommodate my painted shoes and refinished furniture and weird things I sew and whatnot.

Adding active trail classes to your menu links in Drupal 7

So I’m working on a site with a gallery page with /art as a path, along with single artworks pages with the path art/[title]. When on a single artwork page, I still wanted the visual indicator that the user was in the main “art” section of the website, ideally by highlighting the /art links in menus. I found a module, Menu Trail By Path, which took care of this.

However, I also had another section for photography. This was a separate gallery, living at art/photography, with single photos living at art/gallery/[photo title]. I wanted to highlight both the top level /art menu item as well as the art/photography menu item, but Menu Trail By Path didn’t want to go that deep.

So I wrote a chunk of code for when you want to indicate on all of your menu links when a menu item’s path is part of the URL for your current path. I was able to remove the Menu Trail module, and this (which lives in template.php in your theme) took care of everything:

function yourtheme_menu_link($variables) {
  //get path alias of current page
  $current_path = drupal_get_path_alias();
  //get path alias of menu item
  $menu_path = drupal_get_path_alias($variables['element']['#href']);
  //if the href of the menu item is found in the current path
  if (strstr($current_path, $menu_path)){
    //add active-trail class to li and a tags for that item
    $variables['element']['#attributes']['class'][] = 'active-trail';
    $variables['element']['#localized_options']['attributes']['class'][] = 'active-trail';
  return theme_menu_link($variables);

Why it’s good to take breaks (Drupal + Fences + Field tpl.phps + Dumbness)

So I’m working on a redo of my site in Drupal (finally). I’ve got a custom content type, where I have a term reference that’s displaying taxonomy terms. I’m using the Fences module to cleanup Drupal’s “div diarrhea” issue. And I really wanted my set of taxonomy terms + label to properly wrap themselves in a div so I can easily separate them from other content – but with Fences, the combination of label + terms is wrapped in absolutely nothing. I can’t find a tpl from the Fences options that would work, and then adding a field–[fieldname].tpl.php wasn’t working either: because of Fences being enabled for that field, I’m assuming.

And then I take a break, come back, and realize I can just wrap the render statement for that field, living in my custom node tpl, in a <div>. Welp!

I painted and varnished a table that someone threw out

So there’s a spot in the basement of my apartment building where people, usually when moving out, will dump unwanted items, primarily furniture. I always pass this spot when I take out my recycling, usually 1 out of every 3 times there’s something there. On one lucky day about 2 weeks ago, someone had dumped several pieces of furniture, including this little table:

little table

The paint job was poor, the colors mismatched, and I’m not sure what was going on with the sheet music at the top. While the concept of sheet music collage is a good one, taking 3 sheets and just plastering them on there (not even fully covering the table) is not exactly the best execution of that idea.

So I decided to repaint it to match a table I’d repainted about 2 years back. Picked up some pink and black acrylic, dug out my varnish, and had at it. Did 3 coats of paint, and then 2 coats of varnish. Took slightly longer than it could have, however; I needed to dry the varnish outside to due cancer-causing fumes and whatnot, and while I was crossing my fingers for sunny skies, the weather had other plans.

snowy table parts

I’m pretty happy with the outcome. The drawer is a little wobbly (this was clearly originally a cheap IKEA-esque piece of furniture), but aside from that it’s sturdy enough. My pens and notepads finally have their own home!

painted end table

And, here it is with it’s matching table (please ignore the shoes!):

table set

Profitability & hotfix to release ratios in Agile environments

So I have this theory that, for the average company that uses Agile, the hotfix to release ratio directly correlates with the success of a company.

OK, so “success” is pretty vague, so let’s look at it in more specific terms.


Let’s say a given company’s hotfix to release ratio is very high. So they’re doing at least as many hotfixes as releases (if not more). This suggest that their development team’s primary focus is on fixing existing bugs and/or rushing in changes to the application. Which leaves less time for developing new products/features/advancements. Thus less value added to their existing product, meaning fewer shinies (as it were) that marketing can use to drive in leads. Or fewer products to add to the market. All of which will shrink profits.

Customer Satisfaction

One thing that could cause very frequent hotfixes to be necessary is the discovery of bugs on the production version of the application. So if these are major bugs, it’s probably guaranteed that users are noticing them, and are none too pleased about them. Regular occurrences of bugs on production imply a lack of solid QA, meaning there might be even deeper flaws in the application that simply haven’t been discovered yet.

Even minor bugs that are getting hotfixed, such as grammar edits, imply a sloppiness in the application itself. And who wants to use a sloppy application?

Employee Satisfaction

Frequent hotfixes also imply a process issue. Lack of proper QA is in itself a process issue, and will lead to frustration for all parties involved when development work isn’t properly tested – or when a proofreading process for copy is inconsistent to nonexistent. And, if the hotfixes aren’t QA-related and are simply “mini releases that couldn’t wait”, this implies a team that’s overly focused on the short term and missing out on the long view of the project (well, long view in Agile terms, at least) and are stuck rushing slapped together solutions rather than properly being able to focus to building a good solution (a frustration for anyone who actually likes making high quality work).

So I’d like to make there be a thing called the HFR ratio (for Hotfix Release). You can magically get access to protected Github data and calculate the HFR ratio for different companies (assuming companies generally have a naming schema that indicates if that push is a regular or hotfix release). This could be useful for many purposes, such as determining what companies to invest in, what applications to pay (or not pay) money for, and what companies to pursue employment with.

Hey look I made a frilly EGL head thing

Gonna do the Harajuku fashion walk this Friday at NDK. Taking a stab a pulling off gothic lolita style. So I made this headdress and these bracelet things.

EGL headdress & bracelets

Unlike most of my sewing experiments, the headdress actually came out looking pretty decent. Sewed a long, narrow rectangle out of some tulle-like fabric for the base. Added tying straps to the side, then sewed the ruffle in a ring around the entire thing. Made bows out of more of the tulle, plus thread + hot glue gun + ribbon. Then just hot glued the ribbons to each side.

As inspiration, I looked at this pattern for a headdress as well as this headdress from Baby, The Stars Shine Bright.

I chopped up an old bra and used the straps as the base for the bracelet, glueing some velcro to secure the ends around the wrist. Then, took some fabric from the front of the bra for the bows, with ribbon wrapped around, and everything held in place with hot glue.

Still gotta figure out a decent necklace, plus something to make my shirt look better. I actually have a skirt that ordered from Bodyline a little while back, along with a petticoat + socks. In terms of ordering Japanese clothing, shirts are a bit of an issue (and dresses unlikely to happen), as I am not shaped like the average Japanese person. But I’m sure I’ll figure something out.

Getting a local install of Drupal on your Nexus/Android device using Bit Web Server

I wanted to get a Drupal local on a tablet. My original thought was to get a Windows tablet, wipe it, install some Linux flavor, and go from there. However, that seemed like a big ole pain. Conveniently, around that time I learned about Bit Web Server for Android, & decided to go that direction instead.

Got a super sweet deal on a 2nd gen Nexus 7, and here’s what ended up working for me:

1. Downloaded Bit Web Server
Super easy to set up. Note: your localhost files will live in storage/sdcard0/www. If you’re on a 2nd gen Nexus 7 at least. I’m assuming other Android devices would be similar. However, as this is the first Android device I’ve ever owned, you might not wish to listen to me!

2. Downloaded Astro File Manager
You’ll need to navigate your file structure somehow, after all. There’s probably a decent selection of file managers out there, and I’m sure any of them would work fine. However, my brief and frantic research led me to this one, and it’s working out quite nice for me thus far.

3. Download AWD
This is an IDE for Android. Seems like the most recommended one (based, again, on my brief and frantic research). I ended up dropping the $5 for the paid version, so I could have git capabilities, among other things. Which brings us to…

4. Grab some Drupal files
I tried cloning this from git at first. (Here’s the instructions in case you wanna try it.) I, uh, failed. The first time I failed, it was because my tablet display only stayed active 2 minutes before the tablet fell asleep. Oops. So I bumped it up to 30 minutes. And then git stalled at 24%. So I gave up and just downloaded it directly from the site.

So, technically step 4.5 here is “Download a zip program” (I ended up grabbing Winzip). But, hopefully others have better luck with git cloning than I did and thus don’t need to worry about that part.

5. Move it into your localhost dir
Astro made this pretty simple.

6. Create your database
If you open up your Bit Web Server, there’s a PHPMyAdmin link, will take you right in there. Just make yourself a nice little empty db.

6. Navigate to your drupal root dir in your browser, and commence setup
Open up Bit Web Server, and click Localhost, and your directory should be sitting there. Assuming all goes well, once you go into your dir, you should see the standard Drupal setup screen.

Setup was super easy for me. Simpler than standard setup – no renaming default.settings.php, no dir creation or permissions changing. Slightly concerned about that, tbh. But, it works.

Still need to explore a bit more, give it some stress testing, load in some modules. Also on the list is to figure out how to get some sort of command line. Would be amazing if I can get Drush on this thing. Or SASS, for that matter. We’ll see!

Rendering fontcustom icons in print view in Chrome and Safari

So, I’ve got a bunch of fontcustom icons I’m using on a website. Great project, makes it really easy to generate icons into a font that renders well on pretty much every device. Except when printing in Chrome and Safari. I had several icons sitting in table cells, and their height expanded to the height of the full printable page. Meaning, there was a single row per page, and a giant chunk of white space under the row. The icon was doing something to tell the print view to start a new page. Super strange.

Unfortunately, I didn’t figure out why the heck this was happening. However, I did figure out a workaround. This guy in your css stylesheet will apply changes only to the print view for Chrome and Safari:

@media print and (-webkit-min-device-pixel-ratio:0)

I created .gif versions of the icons I needed. Then, for these icons, I overwrite the :before pseudo-element to render the .gif I created instead of the font. I also needed to set the font-family to none. So, basically this (included within that @media element) (Also, this is SASS, but if you know CSS you can figure out what’s up):

    font-family: none;
    content: url('../images/icon-skip-print.gif');

Watch out for form fields when doing a javascript-based find and replace in your DOM!

So let’s say you’re having a bomb night in, and get a sudden urge to build a Google Chrome extension. Let’s say that your extension involves finding and replacing text in the dom. So, you can cycle through all of the nodes in the dom, and grab anything with a nodeType of 3, which means it’s text. You get that bad boy working, get all of your buddies to install it. And then someone has to edit some content.

And, oops. The swapped copy is now live for all to see, regardless of having any extension installed, or even being on Chrome.

Soo, you can check┬ánode.parentNode.nodeName, and if it’s INPUT or TEXTAREA or a similarly potentially sneaky form element, I suggest skipping those when doing your find and replace!