I had a great time speaking at HTML5DevConf about refactoring CSS for maintainability. I’m happy to have the opportunity to present twice (I still can’t believe the demand!), and glad the audience came away with actionable items. If you have any feedback, let me know!
2012 has drawn to a close, and as I reflect on this past year, I look back on the two things that have most changed my life.
I’ve had the great fortune of being born with genes that are relatively impervious to weight gain, though I’m sure that will change in another decade or two, so regular exercise has never been that high on my priority list. I have done various forms of exercise semi-regularly, but long hours at a sedentary desk job coupled with my lack of hand-eye (or rather any body part with any other body part) coordination and general lackadaisical demeanour, have wrought what can hardly be described as an active lifestyle.
After too many aborted attempts at attending a yoga class, I decided that running might be more suitable for me. No rigid schedule to adhere to, nor costly gym membership or gear to acquire, and I get to take advantage of a willing running buddy in the form of a future husband, and my newly adopted city of San Francisco, where one can run year-round.
I started running in fits and starts, as is my general strategy for these things, and could not even run a mile without taking a break, or make it up one of San Francisco’s famous hills without swearing profusely and slowing to a walk, suffering the penalties of years without any real cardio.
After two months of infrequent and lackluster outings, I decided to fully commit myself by signing up for a half-marathon… in mid-November. It was May and I, being a total noob, started training in earnest that early. 2-mile mid-week runs gave way to 3, then 4 within a month. Longer runs on the weekend went from 5 miles to 9 in as many weeks.
It hasn’t been without setbacks. I got painful runner’s knee after following a crack running plan where I ran 13 miles and 14 miles in consecutive weeks on Vibram soles (no kidding! you say). After taking three weeks off and switching to good ol’ grandma-style running shoes with giant marshmallows for soles, I was back at it. I never did run more than 10 miles in training again, with the fastest barely at 9:30min/mi pace, but I somehow miraculously achieved my pie-in-the-sky goal of a sub-2 hour half marathon at Big Sur, clocking in at 1:59:07.
The impact running has had on my life and general well-being is numerous. I have more energy throughout the day, I get stressed less easily, and my sleep has not been this good since I was little. I just all-around feel much better, which I’m sure has all kinds of other good side-effects that I’m not even consciously aware of.
Despite amassing 500 miles this past year - far beyond my wildest reckoning, I still don’t find it easy to go for a run. It’s hard to get out of a warm bed when it’s still dark out, or up from a comfy couch on a sunny afternoon. Harder still not turn back at the 3 mile mark when I had set out for 6. I’ve had plenty of cheat days. But maybe that runner’s high has got me hooked just a little. I sure do hope so, because I plan to keep running for a long time.
I think the very act of starting a company makes one philosophical. Every day you’re faced with the same questions: What are we doing here? What should we be doing? What does it all mean and to what end?
Maybe one only becomes philosophical when the whole enterprise is failing - or treading water, which in start-up terms equals failing, which is where I found myself this past year. In my newly acquired free time, I rediscovered my love for reading, a habit that has been woefully neglected in the pursuit of industrious work for far too many years. It was in this period of indiscriminate reading that I fortuitously discovered Stoicism, a philosophy that has been given short shrift due to the appropriation of the word ‘stoic’ to mean unfeeling and devoid of emotions.
Though I’ve ventured down the philosophy aisle in the past, I can’t say that any amount of reading Camus, watching Waiting for Godot, visiting Tibetan holy sites, practicing yoga, or trying to wrap my head around the jargon that is metaphysics, has caused me to ever seriously re-evaluate how I think or change my thinking in any significant way. Maybe I just haven’t been receptive.
Contrary, I’ve found the ideas of eminent Stoic philosophers, such as Epictetus, Marcus Aurelius, and Seneca, to be surprisingly and immediately applicable. Not only applicable, but effective in its aims of becoming more tranquil and happy. Perhaps my engineer mind is naturally drawn to stoic appeals to reason. Stoic teachings have given me new ways of thinking and of dealing with problems, both small and large. And upon further reflection, I really have no large problems to speak of. The effect its influence has had on my personal happiness has been substantial, even in such a short amount of time as a few months.
It’s easy to forget that despite two thousand years of human development, human nature has remained remarkably resilient. Video games may have replaced blood sports at the coliseum, but still we grapple with essentially the same problems and we strive for the same things as people have for thousands of years. People much wiser have been thinking about these problems for as long. It’s comforting to know that I won’t experience something that someone hasn’t already experienced many times worse and has graciously shared with everyone ways to deal with it.
Fittingly, the two things that have changed me the most have to do with the body and mind. External circumstances are subject to constant flux, but your body and mind will stay with you. And things that stay with you should not go neglected.
Have a happy 2013.
Facebook is supposed to be this magical advertising platform that allows advertisers to target niche demographics to their heart’s content. An advertiser’s dream, right? Case in point, I - female, prime child bearing age, college educated - have been shown ads seeking not just plain ol’ egg donors, but egg donors of Chinese descent. But the legality and ethics of these targeted ads is not what I’m talking about today. (If you’re interested in how bad these egg donor ads are, see this.)
Instead, I’m going to talk about this perplexing ad that Facebook deems I really need to see (over and over and over):
I don’t know who runs this ad, but I will assume it’s a third-party agency for whoever provides this meal service through Zaarly. Anyhow, they decided to target me - female, engaged, living in their service area - for this “Bro Meals” service.
I didn’t think it was possible for one little ad to offend me in so many ways, but they have managed to do so in only 17 words. Kudos! There are so many things wrong with this ad, I don’t even know where to begin, but let’s start breaking it down. This ad helpfully informs me:
With great power comes great responsibility. Demographically targeted ads allow for a level of personalized insult that was impossible before.
Now, I’m not saying there’s anything wrong with this service. I’m sure Myriah (the attractive blonde) cooks wonderful food and provides a necessary service to lots of busy people. Under different circumstances, say, an ad that simply highlighted the convenience and deliciousness of home-cooked meal delivery, I would surely consider being a customer.
But obviously with a name like “Bro Meals”, and the first sentence of her page’s copy clearly reading: “Bring some comfort to the bachelor lifestyle with some home cooking that will make your week a breeze” (emphasis mine) she is targeting a specific demographic that does not include me.
So whoever ran this ad is trying to expand the market beyond young single men, and logically, I suppose, landed on the adjacent demographic, fiancées of no-longer single men. But to all the Facebook advertisers out there, when you’re targeting a new demographic, think about your messaging and branding from your target’s perspective, and see if there’s a chance you might be completely pissing the hell out of the people you’re paying money to reach before you run those magical ads.
If you host images or other media from Amazon S3, but want to prevent people from linking your image or media files directly (and paying for it!), you can set up the following rules (source) in your S3 bucket to only allow your website(s) to serve the image, and show any other referrer an Access Denied page if another site tries to link to your media directly.
Just replace <Bucket Name> and the websites that should be whitelisted with your bucket name and URLs. Then in your bucket, under “Properties”, click “Edit Bucket Policy”, and paste the following in. Now if you try to go visit your image or media link directly, you’ll get a 403.
I host images on S3 that are over the maximum dimensions allowed to be uploaded to Tumblr (1280px), so this is very handy.
I was surprised that Tumblr doesn’t have recent posts built into its templating language. You can get the same effect by parsing your Tumblr blog’s RSS feed, and displaying it as a list in your sidebar.
The RSS feed is in XML - located at http://<yourblog>.com/rss. You can go to any Tumblr blog to see what the XML format looks like.
Here, I fetch the RSS feed using an AJAX call, and parse it, all made quite straight forward with jQuery. I create a list item element for each post “item”, containing the title of the post and a link to the post itself, and append it to a <ul> element I already have on the page. You need to add the element <ul id=”recent-posts”></ul> to your sidebar in your Tumblr theme, where you want the recent posts to appear.
You may also want to limit the number of recent posts to display, which I don’t do here, and add some CSS to make the list look good.
Having female role models has always been held up as one of the best ways to encourage more girls to enter STEM (Science, Technology, Engineering, and Math) fields. And I am among those that think role models with feminine traits are even better, so girls could learn that you can be good at math and science, and you can still choose to wear skirts. Especially when trying to influence girls at an age when many care much more about being pretty than being smart.
So it is with great surprise that I came upon recent University of Michigan studies, which found:
Despite good intentions, attempts to glamorize STEM women may be less motivating to girls than more “everyday” female STEM role models, say U-M psychology researchers Diana Betz and Denise Sekaquaptewa.
The researchers conducted two studies about how middle school girls perceive female STEM role models. If women are successful in STEM fields, research indicates others dislike them and label them less attractive, not competent or unable to secure high salaries.
The middle school girls were asked to read articles about women in STEM, some with gender neutral characteristics, e.g. wears glasses and dark clothes, and likes to read, and some with feminine characteristics, e.g. wears make-up and pink clothes, and likes to read fashion magazines. The girls who were not interested in science and math reported even less interest in math, and less likely to study math in the future after reading about the more feminine role models.
This means various efforts at encouraging girls to pursue STEM fields may have unintended and even opposite effects.
The second study found that the reason for this unexpected demotivation may be because the students perceive being both feminine and being stellar in math and science as an unobtainable combination, which makes them feel threatened rather than motivated.
When Marissa Mayer was recently appointed as Yahoo’s new CEO, she was heralded as a shining role model, practically an icon, of a woman in tech that has made it to the very top. I myself was happy to see a woman reach the C-suite rising up through the engineering ranks, which is rare even among women C-level executives at tech companies.
However, when shortly thereafter it was publicized that Mayer was pregnant, I wonder if this most rare of combinations - the first ever pregnant Fortune 500 CEO - could have a similar demotivating effect upon women, as seeing the rare combination of feminine STEM role models had on the girls.
Mayer is at the pinnacle of having it all. But as Anne-Marie Slaughter wrote at length for the cover story of the current issue of The Atlantic, “Why Women Still Can’t Have it All”, having it all is unattainable, at least in today’s work climate. As Slaughter tweeted, Mayer is exceptional, not the norm; she’s “superhuman, rich, and in charge”, while most women having a baby and a demanding career are not.
Mayer as role model may be much less inspiring than one would hope for, as women are faced with an icon that is widely considered to be unobtainable.