Author: Maëlys McArdle

  • Watermelon Summer Cake

    Watermelon Summer Cake

    Watermelon Cake with Coconut Whipped Cream

    Makes four personal sized cakes.

    • Watermelon
    • 2 Cans of Coconut Milk (Don’t go low-fat)
    • 2 Tbsp Icing Sugar
    • Strawberry
    1. Place the cans of coconut milk in the fridge overnight. The top half of the can will solidify.
    2. Place a large bowl in the freezer.
    3. Cut a 2″ slab of watermelon. Cut off the rind.
    4. Use a cookie cutter to stamp out the watermelon cakes from the slab. Temporarily place these cakes on a large plate to let the water seep out while you prepare the coconut whipped cream.
    5. Take the bowl from the freezer. Grab the cans of coconut milk from the fridge. Flip them upside down and open them up. Discard the liquid and dump the solid in the bowl.
    6. Add the icing sugar and whip up the coconut mixture.
    7. Place the cake on a serving plate. Pour a glob of whipping cream on top, making a circular motion with a spoon on top to get it to go down the sides. Then smooth out the sides.
    8. Decorate the top of the cake with a slice of strawberry and serve.

    Notes

    I came up with this recipe after seeing a picture of a watermelon cake floating on a photo sharing site. The first try-through was a bit of a mess; I got a technique fleshed out the second time round. If you lack a cookie cutter to stamp out the watermelon cakes, you can use an empty can of coconut milk with both ends open.

    The results are pretty great. Tasty and light. It’s now one of my favourite recipes.

  • How To Tell When Someone Came Out When All You Know Is Their Name

    How To Tell When Someone Came Out When All You Know Is Their Name

    An interesting article came out on FiveThirtyEight called How to Tell Someone’s Age When All You Know Is Her Name. Based off of only a name, you could make a pretty good guess as to when they were born. It was particularly cool read given that I had actually been going through the same dataset myself.

    silver-feature-most-common-men-names5

    My research had to do with the name of transgender men. I kept seeing the same names popping up, and I wanted to know whether:

    • The names reflected their popularity at their time of birth.
    • The names reflected their popularity at the time of their selection.
    • The names reflected their popularity among their peers.

    This wasn’t for academia or anything; I just wanted to know for myself. I decided that I would answer this by seeing what the most popular names were for trans men, and compare that with the popularity of those names with the general population over time.

    The first step was to figure out what the most popular names were. There’s a blog with posts from the trans male diaspora where first names are often mentioned. So I wrote some software to take a peek at the names being used. I utilized a database of names from the Social Security Administration to pick out first names from the noise. The results were interesting.

    The software was written in two parts using Python 3.4.

    Part One: Blog Scraper

    import http.client
    import html.parser
    import pickle
    
    class TumblrPageParser(html.parser.HTMLParser):
    
        def __init__(self):
            super().__init__(convert_charrefs=True)
            self.is_caption = False
            self.results = []
            self.entry = ""
    
        def parse(self, page_contents):
            self.is_caption = False
            self.results.clear()
            self.feed(page_contents.decode("utf-8"))
            return list(filter(len, self.results))
    
        def handle_starttag(self, tag, attributes):
            if tag == "div":
                if "caption" in [content for attribute, content in attributes]:
                    self.is_caption = True
                    self.entry = ""
    
        def handle_data(self, data):
            if self.is_caption:
                self.entry += data
    
        def handle_endtag(self, tag):
            if tag == "div" and self.is_caption:
                self.results += [self.entry]
                self.is_caption = False
    
    def parse_blog(blog_url):
    
        conn = http.client.HTTPConnection(blog_url)
        conn.request("GET", "/")
        response = conn.getresponse()
        page = 1
    
        while response.status is 200 and page < 2000:
            captions = TumblrPageParser().parse(response.read())
            yield page, captions
            page += 1
            conn.request("GET", "/page/" + str(page))
            response = conn.getresponse()
    
    def download_blog(blog_url, filename):
    
        with open(filename, "ab") as output:
            for page, captions in parse_blog(blog_url):
                print("Processing page " + str(page))
                output.write(pickle.dumps(captions))
    
    download_blog("a-blog-name.tumblr.com", "scraped_posts.pickle")

    Part Two: Name Analysis

    import pickle
    
    def load_names(year):
        with open("names/yob" + str(year) + ".txt", "r") as name_file:
            for line in name_file:
                first_name = line.split(",")[0]
                yield first_name
    
    def load_scraped_data(filename):
    
        with open(filename, "rb") as input_file:
            while 1:
                try:
                    for tumblr_post in pickle.load(input_file):
                        yield tumblr_post
                except (EOFError, pickle.UnpicklingError):
                    break
    
    def extract_words(line):
        return line.replace(",", " ").replace(".", " ").replace("(", " ").replace(")", " ").split(" ")
    
    def extract_names(scraped_data_file, name_year):
    
        first_names = list(load_names(name_year))
        tumblr_posts = list(load_scraped_data(scraped_data_file))
        names = dict()
    
        for counter, post in enumerate(tumblr_posts):
            print("Processing Post " + str(counter) + "/" + str(len(tumblr_posts)))
            for word in extract_words(post):
                potential_name = word.capitalize()
                if potential_name in first_names:
                    names[potential_name] = names.get(potential_name, 0) + 1
    
        return names
    
    def trans_name_popularity():
        trans_names = extract_names("scraped_posts.pickle", 2013)
        names_sorted_by_popularity = sorted(trans_names, key=lambda name: trans_names[name], reverse=True)
    
        for name in names_sorted_by_popularity:
            print(name + " (" + str(trans_names[name]) + " hits)")
    
    trans_name_popularity()

    The Results: Most Popular Names for Trans Men

    1. Alex
    2. James
    3. Oliver
    4. Ryan
    5. Jake
    6. Cameron
    7. Dylan
    8. Aiden
    9. Tyler
    10. Andrew
    11. Lucas
    12. Max
    13. Andy
    14. Adam
    15. Daniel
    16. Noah
    17. Eli
    18. Liam
    19. Sam
    20. Charlie

    Take the results with a healthy dose of skepticism; there’s loads flawed about this approach.

    The most popular baby names for 2014 were well represented in the top names for trans men. Names like Eli, Liam, Noah, Jayden, Aiden, etc. Presumably when many of them had come out. Thus you could actually make a guess as to when someone came out based off of their names.

    silver-feature-youngest-men-names3

    The other top names would have been the most popular around the time of birth of the individuals. So it seems to be a little bit of column A, a little bit of column B. I didn’t answer whether social networks had an influence on it. Would be an interesting question but not one I’ll explore.

    It was a cool little experiment.  I answered my question and deleted any data that was on my computer pertaining to this. I became uncomfortable with the idea of a blog scraper and I don’t think I’ll ever design one again.

  • Casual Violence

    Casual Violence

    An acquaintance wrote a good piece the other day that discussed how violence was just another part of her everyday like brushing her teeth. She begins:

    So I’m playing a nice relaxing puzzle game online, trying to be a little less depressed so I can study for finals, and I happened to glance over at the chat board attached to the side of the game, and people are making jokes about “mutilating trannies.”

    “That’s me,” I think. “They’re talking about torturing and killing me.” Then, I keep playing my game.

    This is a normal thing to happen to me. Being confronted sporadically with the idea of my death and dismemberment as a joke is my status quo. I’ve internalized it as part of my routine. If I made an (honest) list of my daily activities, alongside brushing my teeth and feeding my cat would be worrying about being killed, and then worrying that were I to be killed, whether the newspapers would call me a man. When I get out of bed and groggily pull on a cami, I’m equally likely to think about getting a breakfast sandwich with extra bacon, and whether or not today is the day someone pulls a knife. I love pockets in dresses because they keep my hands warm and I can put pepper spray in them. I like bars, but I barely drink in public anymore because getting carded might mean getting raped. I budget for these things.

    I wanted to talk about that fear. I’m so habituated as to barely mention it or have to think about it too hard.

    It’s there though. I base hundreds of calculations around it each day. What I wear. How much I cover up. What section of the store I’ll visit. How I’ll peruse those areas. How I talk. How I walk. Which coffee shops I go to because of their bathroom arrangement. How I package explanations.

    There’s this perception that what I fear are isolated acts of aggression. The strangers who shout slurs at me from the streets for wearing a pretty dress. My acquaintances who were refused service. The people who beat up my friend.

    Such acts bear their mark. Were it a freak occurrence, it could be healed and relegated to time. But for every one of these gestures there’s ten weekly acts of micro-aggression to sustain it. Reminders of how I shouldn’t exist. They never cease.

    Those greater acts of aggression are not then the isolated misdeeds of a lone perpetrator. They are instead a minor and entirely predictable leap from a society deeply hostile to trans women. A hostility so normalized that it goes unnoticed. It is this invisibility that grants people the latitude to believe that the perpetrators act without support.

    In the end it’s not that single, small, leap to violence that causes me to live in fear.

    It’s the entire package.

    And it’s why I have a separate “for work” and “for living” clothes. Why I avoid medical care. Why I dread shopping in stores come summer when I won’t have my coat to protect me. Why I don’t go into some stores at all. Why I don’t ask for help when I do. Or try clothes on in change rooms. Why I selectively correct family and friends on pronoun usage. Why I avoid family events. Why I’m afraid to say anything back when someone shouts “fag” or “freak.” Why I don’t go out to the Byward market late when the drunks are out. Why I hold my pee in. Why I keep my hands as fists in my pockets. Why I avoid sitting at benches if there’s a playground nearby. It’s even why I chose this name as it lacked the gendered association that could out me.

    Success in Perspective

    We are in a period of success stories.

    There’s a handful of trans people in pop culture now. They’re known for things other than being trans. Actress Laverne Cox plays a prominent character in television’s Orange is the New Black. Lana Wachowski most famously directed the The Matrix. Laura Jane Grace is singer guitarist for punk band Against Me! The teen television drama Degrassi had a central character who was trans. The weekly Canadian news magazine Maclean’s had a sympathetic front page piece about trans and gender variant children.

    Meanwhile there’s legislation passing in provincial and federal jurisdictions. It was only fifteen years ago that major gay rights organizations like the Human Rights Campaign refused to advocate for trans people citing political viability.

    We are in a defining decade and it’s the best it’s ever been. But best as compared to what. In some sense these are very pitiful things to call victories. A handful of people in the media. An interview where the subject isn’t dehumanized.

    Even then, these moments remain underwhelming exceptions in a deeply hostile environment. It does little to change why I live in fear.

    The Whole Package

    So let’s go back to this idea of the whole package. I’m seen as unfit for this world.

    I know the province I live in thinks of me as unfit. They require trans people to undergo sterilization in order to change their gender marker on their identification; to the detriment of those who will have to use them.

    I know the medical establishment thinks of me as unfit. I’m infantilized. I need medication. I spent four months with someone deconstructing my motives just to get a referral to a doctor that might help me. The doctor then set out to do the same. It’s been over a year and I still lack a prescription. For surgical care, you have to wait two years, write out an essay for your motives, and go before a panel of doctors to defend yourself.

    I know my religion of birth thinks of me as unfit. The Catholic church has been a vocal opponent of every non-discrimination and anti-bullying legislation inclusive of trans people. They forbid discussions of gender identity in their official support groups in schools. Teachers have reported experiencing fear in supporting their students. The church has been at the forefront of efforts to oppose adoption and same-sex marriage rights abroad and still speaking against it at home. It has ramifications for trans people.

    I know my political representatives think of me as unfit. They say that I shouldn’t be allowed to use the washroom to pee. They say that I’m just a sexual predator that will go after little girls if I do. They nickname legislation “the bathroom bill.”

    I know my newspapers thinks of me as unfit. The National Post and Ottawa Sun run stories that dehumanize me. They too think I shouldn’t be accepted. They too echo these thoughts that I’m a sexual predator. This is why I’m afraid to go pee.

    I know film and television thinks of me as unfit. Those positive interviews I mentioned always elicit a flurry of excitement because they’re still so rare as to be cause for celebration. Rather, in most sitcoms and interviews, I’m told I’m not legitimate dating material. That anyone going out with me should be ridiculed. I’m just a he-she. A tranny. An Adam’s apple. Interviews rarely fare better, with hosts reducing guests to their genitals.

    I know pedestrians think of me as unfit. They shout things to let me know. Comments they would never say to anyone else.

    I know my work thinks of me as unfit. A coworker came up to me to talk about how their ex-boyfriend came out as trans. It wasn’t done in a context of support but rather how it was a freak thing. My words to help him be there for him were brushed off.

    I know that the people on the dating site think of me as unfit. One told me I should just go sleep on the train tracks. The moderators make dehumanizing remarks about trans members in private. Mostly I’m just ignored.

    I know my family thinks of me as unfit. I’m delusional. I know that I’ll be tolerated and loved but never accepted.

    So I enter any public space knowing that the people I will deal with will be shaped by this toxic environment. They’re told I’m a sexual predator. That I should never be considered date material, only something to fuck or jack off to on porn sites. That I’m an aberration not to be accepted as I am. This is why I’m afraid.

    Casual Violence

    The perception is that assaults and murders alone define the violence we face. That the tacit support these aggressors receive up until their final act is simply valid expression. Passed off as fair debate. Religious freedom. Or comedy. That this support is normal and that challenging it is what would be intolerable.

    The violence of this support system is not a hypothetical. It bleeds through every interaction and people die from it. Forty percent of trans people attempt suicide. We have the studies. We know that the reason so many die is because of the hostile environment.

    When it’s one hand that kills us, they call it murder. When it’s a dozen, they call it suicide.

    This is the violence.

    To make people live in fear is a form of violence.

    To make them die is a form of violence.

    To inhibit them from challenging it is a form of violence.

    Yet this violence is so well accepted that it’s just part of my everyday routine.

    Casual violence.

  • Vegan Soft Vanilla Butter Cookies

    Vegan Soft Vanilla Butter Cookies

    Vegan Soft Vanilla Butter Cookies (Original)

    • 1/2 Cup Vegan Butter (eg. Earth Balance)
    • 1/3 Cup Icing Sugar
    • 1 Tsp Vanilla
    • 1 1/3 Cup Flour
    • 1 Tsp Baking Powder
    • 2 Tbsp Almond/Soy/Rice Milk
    1. Preheat the oven to 325F.
    2. Beat butter and sugar until fluffy. Mix in vanilla.
    3. Add the rest of the ingredients and combine. Add milk if too dry.
    4. Make small balls of dough and gently pressing them down on the cookie sheet.
    5. Bake 18-20 minutes.

    Vegan Cream Cheese Frosting

    • 4 Tbsp Vegan Cream Cheese (eg. Tofutti)
    • 3 Tbsp Vegan Butter (eg. Earth Balance)
    • 2 Tsp Vanilla
    • 1/2 Cup Icing Sugar
    1. Mix the ingredients. If it’s too runny, add icing sugar. If it’s too rigid, add cream cheese/butter. I always play this one out by eye.
    2. I dipped the cookie into the mixture then topped off with sprinkles.

    vanilla cookies

    Thoughts

    I sought to replicate these incredibly soft cookies a coworker obtained. This ended up being quite close to the mark.

    I screwed it up and mixed all of the ingredients in one go. Working with it was like working with pastry dough and I added milk to help me through. Still, the end product was very soft and delicious. I wonder if not beating the sugar and butters first was actually a boon. The cookies themselves are without flavour – it’s the frosting that makes them what they are. As an aside – I made sure that the frosting wouldn’t harden by making sure there wasn’t too much icing sugar.

    This accidental find is now one of my favourite cookie recipes.

  • Programming Philosophy

    Programming Philosophy

    I’ve been programming professionally for five years now. Since I’m likely to be in the field for many years to come, what I intend on writing here is a reference to see where I was at in terms of my approach.

    Reduce Opportunities For Errors

    Everything I do is focused around reducing the opportunity for error.

    The first step is I pick a programming language that will require the least amount of code to achieve the task while satisfying other requirements around performance, longevity, and deployment. Sometimes that’s Python. Sometimes that’s C. The less code there is, the less opportunity there is the opportunity to introduce error.

    I remove any repetition as to make the contents of my functions only be what makes them unique. Every repeating instance is an opportunity to forget applying a change I did to some other part. I also code in such a way to make some bugs appear at compile time rather than run-time. For instance, I’ll store strings as defines in C/C++ as to remove one type of repetition and make typos pop up as compile errors.

    Employing practices like unit testing is another big way to reduce errors. It’ll catch some bugs that might otherwise fail to show up until a specific set of conditions occur in a running program, which can make it a pain to locate.

    Write The Idealized Code

    I structure code from the most abstract down. I specify what would be the function/method calls to make with the perfect library, one after the other, to solve a given problem. I then populate those functions after the fact, applying the same approach. Each invoked function/method is just a single-line return statement until properly populated. I refactor continuously.

    I find that the top-down versus bottom-up approach leads to code that’s better structured and more legible.

    Keep Code Legible

    If there’s a Venn Diagram for ideas, this is one that is impacted by a slew of other practices.

    I follow the conventions of the language. For C++, my functions follow the lowerCamelCase pattern. In Python and C it’s the underscore_name_pattern. If common practice dictates to use four space indentation, then that’s what I do. That consistency improves legibility for developers which reduces opportunity for error.

    Likewise I always avoid those clever one liners. If it’s meaning is not immediately clear, I get rid of it. I want to remove as many barriers to understanding my code as possible. Leave cycle-level optimizations to the compiler. The losses that matter are usually several levels of abstraction up.

    My lines of code never exceeds 80-120 characters, my functions rarely are more than a handful of lines, my files rarely exceed 200 lines. The more you have the more someone reading the code will have to track in their head, which makes the code less approachable. You want approachable. It also forces some level of modularization. The easier it is for someone else to pick up the code, the less likely they are to miss out the ways their changes could have unintended consequences.

    I never comment out parts of code permanently as a way to disable it for potential future use. That’s what code revision is for. It just clutters up the code.

    Only Code What’s Unique

    It’s really fun and cool to solve problems on my own. Figuring out how to write an email client from the TCP level. Learning how encryption works. I’m all for that.

    However, I avoid the Not Invented Here syndrome for production code. If there’s a library to do a given task, it’s probably better than what I could have put together on my own. I focus instead on writing the glue to interface with that library. I focus on the parts that make my software unique.

    Sometimes it’s necessary to re-invent the wheel, but I only do so when there’s a demonstrable need.

    Document The Code

    I also document the code following whatever standard is set by the automatic document generator for that language. For Python that’s docstrings. For C/C++ I use JavaDoc for compatibility with Doxygen.

    Comments are invaluable for maintainability. I hold the view that leaving it to the code is insufficient. Comments bridge the gap between how a computer thinks and how people think. The code explains how, the comments explain what.

    I also automate as much of the documentation process as possible. I consider commit messages a type of documentation and use generators like Doxygen. For outward-facing code, if it’s not documented – it doesn’t exist.

    Learn To Get Uncomfortable

    Software development is unlike many fields in that there isn’t a relatively stable body of knowledge to work towards. Rather, that body of knowledge changes drastically every few years less you work as a programmer for NASA.

    General skills around the process of software development are more static, but only just. Core knowledge around data structures has looked the same over the last thirty or forty years, but processes such as Agile and test-driven development are quite new.

    So it becomes necessary to keep learning new things and to avoid staying comfortable with a body of knowledge.

    I do this for two reasons. The first is that it really improves my workflow. All of these are born out of the lessons learned by other developers. Integrating those lessons saves me much time and effort, whether it be debuggers, revision control, unit testing, agile, etc. They were always prefaced with a learning curve that made me question their worth but it always proved invaluable.

    The second reason has to do with my reality in which I’m seen as disposable. Every one of my friends in the private sector, with few exceptions, have recently been laid off. Some multiple times. My own company has reinforced the notion that I’ll be dropped the second it’s convenient to do so. In this environment then I have to be my own agent so that if I’m laid off tomorrow, I’ll be employable. I seek to hold myself up to the standards of the top developers I know.

    Take Care Of Yourself First

    The most important lesson of all though has less to do with code.

    There’s only one person out there that can put your well-being first: you.

    Don’t miss out on spending time with those that matter in your life (including yourself) because you were working nights and weekends. Take those impromptu days off for self-care. Spend time with your chosen family. Don’t look at your work emails after 5pm.

    There are many companies and people within them that would rather you didn’t do this. Those people have different priorities. That’s okay. This is why you’re there.

    There’ll always be people who make more than you. Maybe most people. But if you make a livable wage, have full-time work on regular hours, have your health, and a network of people that love you – then you’re pretty much golden. Those other people will have nicer things. Let it go.

    At the end of the day, it’s the people that matter most.

    And your time with them is the one thing you can’t get back from working evenings and weekends with a company.