The End is the Beginning is The End…

September 9th (and the days around it) has, for better or worse, become an important day for me. I got married on September 9th, 2009. I found out later that September 9th was my first ex-boyfriend’s birthday. I started working for Brad Larson two years ago on September 8th. And this year I am completing an important contract on September 9th. It seems fitting.

I feel like I have accomplished nothing of importance over the last year.

I am not blaming anyone besides myself for this. I don’t know what’s wrong. I don’t know if I have been suffering from depression, which has prevented me from fully engaging in anything. I don’t know if I am trying to do too many side projects and am getting distracted with blog posts and conference talks and tech books. I don’t know if I jumped into the deep end too early and I haven’t learned to deal or cope with things yet. I don’t know.

I just know that a year ago when I looked back on everything I did in the year I worked for Brad I was really proud of what I had accomplished and the person that I was becoming and I honestly can’t say that about myself right now. This was a wasted year.

I am tired of feeling like nothing I do matters. I’m tired of being a cog in a system and not seeing anything I work on ever get completed because it eventually gets passed on to someone else and I never see it again and feel no ownership of it. I am tired of feeling like I am chasing after the wrong things. I am tired of not saving enough of my money because I am buying stuff to fill the empty, meaningless void in my soul.

I want to do something important and significant. I want to do work I am proud of. I don’t want to look at code I wrote a year ago and go “Damn! I used to be smart. What the fuck happened??”

I need a change. I don’t know how I am going to do this or what I am going to do, but I do not want to keep living this way. I am tired of this. I want to make something that matters. I want to push myself to be more than I am right now. I do not want another wasted year. I want to look back on September 9th, 2017, and go “This was a good year.”

I am putting this year behind me. Nothing is irreparably broken. It sometimes takes a lot of time and patience to fix things that are broken. It takes some time to backtrack and get back on the right path when you’re lost. It’s easy to give up and walk away. I am not going to do that. I am going to find something that matters to me and I am going to do it. I am going to hold onto that and keep it close and use it to motivate me to keep pushing. Because I don’t want to live like this anymore and I don’t want another wasted year.

The Cassandra Effect

Back when I was a sixteen-year-old high school student, I had a boy behaving in ways that made me very uncomfortable. Any time he saw me in the hallway he would flinch in pain. He started telling everyone in the school that I was the Queen of Darkness and Evil and been sent by Satan to tempt him.

I was a teenager and I had absolutely no idea how to deal with this behavior. The year previously one of my teachers saw another student harassing me and reported it to the vice principal and this person was dealt with immediately. I felt like I could trust the vice principal, who had told me if I ever experienced anything like this ever again that I should go to him and he would take care of if.

So I did. A meeting was called between me and this other student. The vice principal came in and gave me a warm look. Then he saw that the student I was reporting was an honor student and all the warmth drained from his face. He grew very cold and rigid.

He informed me, in front of my abuser, that he did not take spurious reports seriously and that any other reports of harassment about this individual would be ignored. This gave him carte blanche to make my life miserable.

I have gaps in my memory of my sophomore year of high school because of the stress from this situation. I was misdiagnosed with a learning disability and eventually bipolar disorder all because this authority figure did not believe me when I told him I was being abused. This moment had an impact on my educational and eventual professional career because I went from being an honor student myself to getting D’s and F’s.

This was not an isolated incident.

I have encountered a version of this so many time over the course of my life that it is driving me crazy and I can’t take it anymore.

I have had situations where I have known a group of people for years, then I will notice someone starting to sabotage me. It’s always someone who is either in a position of authority or someone who has been there longer than I have. Either I will directly see them having conversations with authority figures above them or I will just see the evidence of it.

People I have known who used to be friendly will immediately grow cold and distant. There will be conversations in the halls that will stop the second I come into view. They will turn around to avoid passing me in the hall. Eventually they get angry and hostile.

Then it’s always a matter of time before I am asked to leave. The clock starts ticking and there is absolutely nothing I can do about it because no one will talk to me directly about it. I have gotten good at recognizing the signs so that I can set up an exit strategy, which is usually fine with the people I am among because they don’t want me there anyway.

I feel like I am trapped in a video game where there is a level I can never beat. I see it over and over again and it makes me angry that there is nothing I can do. It’s a nightmare I never get to wake up from. I feel like maybe this time I will disable the bomb before it goes off and it never happens.

It is incredibly difficult to get men to understand that this is happening because it doesn’t happen to them. Being a man gives you a degree of credibility that you do not have as a woman.

No matter how progressive or aware you are of sexism, I have not had one man believe me when I tell him about this happening.

I get good natured, “Now, now, you’re being paranoid. You’re seeing malice where none exists. It’s probably a misunderstanding.” A man they have never met get the benefit of the doubt over a woman they have known for years, and THESE ARE THE GOOD GUYS!!!

Being a woman means you are always in a position where you have to prove yourself and your version of reality. I have had two separate professional instances where I have worked with men who were making incredibly bad design decisions for the code architecture because they fundamentally did not understand what was happening under the hood. I have presented a carefully constructed technical walkthrough of what these decisions would do and why they cause bugs and crash apps, and the response I have gotten was always “Well, I am just doing what Apple wants me to.”

Guess whose side gets taken. Hint: Not mine.

You are not allowed to make any mistakes. I talk to guys who tell me they made a mistake they thought for sure would get them fired but that they were allowed to fix it and everything was fine. This never happens to me.

I still don’t know the reason why I was fired from my first programming job. I know I got a call right before dinner on a Saturday night telling me that everything I did was terrible and that when the CTO looked at my code he felt like I grabbed him by the hair and punched him in the balls. He would not tell me what the problem was. I lingered there for a few days while they consulted with a lawyer to see if I could sue them. The only changes that I saw to the project I was doing before I was let go was that someone changed the color, which would have taken me all of ten minutes to do. I don’t know if they saw an earlier version of the project, which was a train wreck, because they refused to speak to me about what the issue was. They had been primed by the guy I worked with to think I was incompetent and after they got confirmation of it they looked for any excuse to get rid of me.

People talk about gossip like it’s the weapon of mean girls in junior high. It’s not. It’s the weapon of men.

We place so much pressure on developers to be “the best.” Everyone has to be an 10x engineer. Everyone has to be a code ninja. This has created an incredibly hostile environment where a lot of people feel there is a zero sum game. Having a better developer than you on your team means they are taking away something of yours and you must get rid of them. Women are especially susceptible to this because we have to prove our credibility and it’s not just a given like it is for everyone else. This works so effectively because people are already predisposed to thinking we’re not as good to begin with.

I have also been on projects where I could see an iceberg coming a mile away. I try my best to establish that something bad is going to happen and that things need to be fixed. I try to cover my ass because I know that a problem is coming and I don’t want to be blamed for it when no one does anything about it. They don’t do anything about it, then I get yelled at for not alerting them to the problem earlier even thought that is all I have been doing for months. It’s instantly forgotten or it was never remembered or taken seriously because it came from me.

This makes it difficult for women to establish a base of trust and credibility to be able to rise through the ranks of a company. There are a lot of jobs where I would not make myself a manager because I know that no one on the team will do what I tell them. I have basically given up on that career path because I know it will be filled with failure and disappointment.

I would like to start a product company in the next three to five years, but I know that if I want to do that I need to find a male co-founder to talk to people for me because if I want to have any chance of success I need to work with a man who will give me a degree of credibility that I will never get on my own. I need to find someone who will respect and believe me and back me up when I tell him something. Fat chance of that happening.

When we talk about sexism in tech, we talk about women being asked if they’re designers at conferences. We talk about women being asked to get coffee because someone assumes they are the secretary or just because they’re the woman so they should be the one to fetch coffee and take notes.

We need to have a conversation about this bullying and gas lighting behavior. All it takes is one person on a team to drive great developers away. If you have a team of 20 people and 19 of them are great but you have one foul ball, that one does so much more damage than you can see. All this person has to do is tell a few people that someone is incompetent, who tell other people that too, and before too long everyone on that team “knows” that someone is shitty developer. This is how social crap works. Having a team mostly comprised of men means that most of the time they don’t understand this because they have not been forced to figure out the rules of the game to master basic survival skills the way that women have been forced to.

I am angry. I am tired of this happening over and over again. I find it absurd that I am trusted to write a book on a topic and flown all over to talk about technology but that the second I have a disagreement with a man on my team that I instantly have no credibility. This fucking sucks and I don’t want to take it anymore.

Hey, Just Wanted to Let You Know You’re Garage is on Fire. You Should Do Something About It.

I came back from a business trip a little under two weeks ago. The trip was incredibly difficult and draining for me. I missed my pugs. I missed my own bed. I wanted nothing more than to come home and have some awesome pug snuggles.

I got home and discovered my basement had leaked at some point while I was gone. There is a pool of standing water in one quadrant of the basement. I do not know where it originated. I believe, based on my forensic CSI skills that it came through a window in the corner of the basement, but I don’t know for sure.

My ex-husband helpfully boxed up most of my books in cardboard boxes that were helpfully soaking up a bunch of nasty contaminated water that was sitting in the basement.

I could not deal with it. I am still trying to deal with it.

I speak on here a bit about having depression. Having depression usually means that I either can’t deal with anything or I can deal with one thing at a time. I work from home. I need to keep my job. For the last few weeks, the only thing I have really been able to deal with is doing the things necessary to keep my job.

My basement is unfinished, so I believe if I throw away all of the wet and damp books and cardboard in the basement that there will be no long term damage to the house.

I am aware of the fact that this is a health hazard. I filled my garage can last week and didn’t have room for all of the rest of the stuff that is contaminating my basement. I know there was probably someone or something I could do to get that taken care of without me having to do it myself, but I can’t deal with that right now because all I can deal with is keeping my job.

I went on Twitter to commiserate about how sucky it was to come home to find a problem I had to deal with and I got a lot of finger wagging from people who seem to be under the impression that I am an idiot.

“You know that’s a health hazard, right?”

“Why don’t you have a sump pump?”

“Why do you live in a house? You should relocate to San Fransisco.”

People telling me these things makes me feel like a helpful neighbor telling me my garage is on fire and I should really do something about it while I am also trying to deal with my house being on fire. I am not stupid. I am fully aware of the fact that this is a problem. I know that I need to get that water out of my basement and throw away all the ruined things down there. I just can’t deal with it right now.

Learning From the Masters

Recently I joined Sector67, a hacker space in Madison. I have written on here about all of the various things I am interested in doing (robotics, electronics, etc…).

Every time I talk about wanting to learn a new skill, I keep hearing people tell me not to do tutorials but to choose a project and use it as a learning experience. I have written on here before about this, but there was some aspect of this argument that has always bothered me. I didn’t grasp it until I heard it from the organizer of the hacker space.

He told me that buying electronics kits were a waste of time because at the end of the kit you only knew how to construct the kit and nothing more.

That is the crux of the argument.

I feel that people have a fundamental misunderstanding about the learning process. People are under the impression that we are all computers, we can only do what we’re programmed to do. He and others are under the impression that doing a kit or a tutorial teaches you only what the purpose of the tutorial is and you get nothing beyond that.

I don’t feel that is true for me. It may or may not be true for others, but I don’t feel that is the case for me.

One thing that art students do is to recreate the works of the masters. It gives them a perspective of what was in the artist’s mind when they created great works of art. It may feel like you’re not being creative or implementing anything on your own, but getting a perspective on what has already been done and being exposed to various styles helps temper your own talents and perspectives. After you build up a base of skills and experiences you have much better tools to implement your own artistic vision.

You don’t start out making a great piece of art. You don’t start out writing an amazing app. You don’t start out building a nuclear reactor.

I get that a lot of people don’t do well with a formalized learning process. I certainly didn’t. They have memories of sitting through boring lectures about data structures without having any context about how that leads to writing efficient applications. I don’t think that is a fault of the formalized learning process, I think that is a fault of how that particular formalized learning process was applied.

I was speaking yesterday to a kid who wants to be a gaming tester who said that school bores him and he can only learn when he is actively engaged. We all learn better when actively engaged.

I don’t think there needs be a separation of formalized learning process and hacking. I think the two should work together.

I think the MAKE series of books and Ray Wenderlich’s tutorial series are great examples of formalized learning structures that are also interactive and incorporate the hacker mentality of doing useful things and seeing how they work.

When I do tutorials for iOS programming, it fleshes out my understanding of how the applications work. I see and absorb programming style. I also got a lot out of actually taking programming classes. My teacher Eric Knapp went over with us how to detect code smell. He had us write applications that repeated code and were structured badly and showed us how to write good, maintainable applications. I have met people with ten years of experience who don’t understand how to do this because they never had any formalized learning structure.

Having a lot of experience doesn’t necessarily correlate to being good at what you do. Thinking critically about how to approach a problem is necessary as well. Sometimes you can get a jump start on this by learning from other people’s mistakes. It’s important to make your own mistakes as well, but there is a place for building contrived projects that teach you how things work. You learn several building blocks and you infer that if A is true and B is true then C is true as well.

Every programmer starts out writing “Hello world!” You don’t jump from writing “Hello world” to writing a neural network. You have a lot of intermediary steps. You have to spend a lot of time figuring out what problems have already been solved so we can build upon the experience of others rather than reinventing the wheel over and over again.

Balancing Act

I spent this past week out in California. I spoke at Forward Swift, which was my first conference in San Francisco. This week was one of the first times I have ever actually spent time in San Francisco. I can see why so many tech companies require you to relocate to it.

I got pitched by my first venture capitalist, which was crazy to me coming from a rural town in the Midwest. I am going to spend some more time out there this weekend with a friend to try and make the most of the time that I am out here.

There is one thing that I just became aware of that I would like to talk about in this post. I was chatting with some friends about going to work for one of the big tech companies out here. I recently got one of my dogs registered as an emotional support animal and I was pondering if any of them would let me bring her to work with me.

ESAs do not have the same legal rights as full service animals. They can be taken on planes and kept in hotel rooms. Landlords cannot forbid ESAs from staying in apartments and condos, but beyond that they do not have any legal rights. I can’t bring an ESA into a restaurant or a workplace and have it be legally protected. A lot of places are willing to accommodate ESAs if you have proper certification and paperwork, but they’re not legally required to.

When I mentioned having an ESA and wanting to bring it to work, I heard many people say that they had never seen an ESA. In fact, most places they worked at didn’t have any service animals. At all.

This struct me as being kind of worrying. We, as a community, have been talking a lot about wanting to have better diversity. We primary talk about it in terms of having more women in the workplace, but there are lots of shades of diversity.

I am guilty of not seeing outside my own bubble. Earlier today on Twitter I made a generalized comment about how it’s socially okay for men to express anger and my good friend Basel reminded me that it’s only okay for white men to express anger. Black men are not socially allowed to be angry. So I totally get that if you are not personally disabled or do not spend a lot of time around people who are, then you would not really notice the lack of service animals and other accommodations for people with disabilities.

The only explanation that I can come up with is that these companies don’t hire people with disabilities.

It’s possible that people with disabilities don’t even bother applying for those companies. I know that is one thing preventing me from doing so.

In the interest of trying to raise awareness and trying to do advocacy, I would like to share some of the things that I do to try and cover up and cope with my personal limitations in regards to mental health issues.

I suffer from depression and PTSD. I was misdiagnosed with bipolar disorder when I was 16 because I was being stalked and harassed by a fellow student and it was easier to just say I was nuts and put me on medication than to tell him that his behavior was unacceptable.

I spent ten years being told that my version of reality was not accurate and that I couldn’t believe anything that I perceived. My freshman year of college another student handcuffed me to a bed and tried to rape me. A few years later a different one actually did and I now have PTSD as a result of that.

Ten years ago I finally figured out that I was not crazy. My perception of reality was not wrong. I decided to stop letting other people tell me what was real and what wasn’t and life has gone a lot better since then. However, there is still a lot of residual damage from that period of my life.

There was a period of time where I never thought I would be able to hold down a full time job. Being able to write books and travel to conferences and work the amount that I do is astonishing to me. But the only reason I am able to do that is because I have to follow a lot of strict rules based on trial and error about how I personally function.

I hate medication. I was on medication for ten years. It made me gain weight. It had terrible side effects. It would completely destroy my energy levels. It messed with my head. I had far less mental and physical energy to use to actually put towards doing cool things. Not being medicated means I can be a programmer. Being on medication means I can work at Target. I would rather be a programmer.

To cope with my emotional issues, I have pugs. Delia sleeps on me all day and she helps even out any emotional issues I have before they reach a point that they interfere with my ability to work.

A lot of places won’t let you bring dogs to work, which makes sense because you’re there to work and dogs can be a distraction. So I work from home.

I have an office I set up in my home. It is a room that I use only to work. I get up in the morning, I get dressed, I make tea, and I sit down to work. When I reach a point where I feel I can no longer work, usually around 5:00, I close my computer and leave that room and don’t come back until I am going to work again.

Sometimes I have bad days. I have days where I go to sit at my computer and I feel a veil of despair fall over me. Sometimes I feel the urge to harm myself. I know that when I feel those things I need to step away from the computer and take a really long break. Sometimes an hour break works, other times I have to take the whole day.

Because I have gotten better at maintaining my mental health, these days are usually few and far between. They’re basically sick days. I only have a few of them a year when I am able to do all of the things I need to do to maintain my mental health.

I find cooking helps my mental health. I get depressed if I sit in front of a screen for too long. I keep trying to find analog hobbies that keep my brain engaged without having to deal with reading or writing words. I find cooking soothing because I can chop veggies and sauté things with TV on in the background and rest my brain so it doesn’t hurt anymore. One reason I am interested in electronics is because I want to work with something that has no words.

When I worked for Brad Larson on robotics stuff, we had things that we did besides just programming. If I had a day where I simply could not deal with sitting at my computer, I could build a robot. I was doing something to actively contribute to the company when I had days I couldn’t code. It was fantastic to have different kinds of work that could be done so I could take a less mentally demanding task on days where I could not deal with it.

One thing that drives me absolutely crazy about a few jobs I have had is this idea that there is only one task, and that is coding. It isn’t even that things are divided up into easy and hard coding tasks. Everything is hard. If I have days where I can’t deal with code, I either have to tell my boss that I am taking the day off, or they tell me to just try my best and I have to sit in front of my computer and cry. These are the things that lead to more frequent bad days. They wear down my mental and emotional reserves until they are gone and they cause long term damage.

I took several months off this year because I got pushed too far and stripped my reserves and nearly quit programming altogether. I have been going to therapy once or twice a week for the last few months. That is another thing I can do since I work from home. My therapy appointments are on Monday afternoons. As long as work gets done, no one needs to know that I take half a day to go and get therapy so that I can be productive the rest of the week.

Most of the things I do to keep myself productive are things I could not do in most offices at most companies.

Everyone is asked to conform to certain acceptable modes of behavior. Some people can deal with that. Others can’t.

We have accepted burn out as an inevitable thing. I feel a lot of start up want to hire young people who have not burned out yet so they can run them into the ground. Those people leave this community and don’t come back. We’re preventing ourselves from having a deep bench of experienced people for the short term gain of having people write bad code eighty hours a week. Huzzah for technical debt!

By not talking about this and by trying to force everyone to fit into a round hole, we are burning out a lot of really talented, intelligent people who damage themselves trying to fit the mold.

I think it’s incredibly frustrating to talk to people who want to change the world but then they want to exclude anyone who is different. What is the point in changing the world when so many people are excluded from the opportunities we have here?

If we don’t accept people with different backgrounds and abilities and ways of seeing things then we will stagnate. I don’t think being told to either go on medication that affects my ability to think or, god forbid, pretending to be normal, is the best long term strategy for resolving these issues. I think acceptance of how people work best and compassion and understanding are the way forward. They’re not easy, and apparently not visible, but they are important and we can do better.

Why I Won’t Work Weekends

I have found in my time in the programming community that people are somewhat mixed on the idea of working weekends. I have worked at jobs where it was explicitly stated that it was expected for you to work on weekends. I talk to a lot of people who won’t do any programming whatsoever on weekends.

I am working on a contract right now where I get work emails from co-workers that are sent out on Sundays. I feel guilty because I know that they’re doing a lot more work than I am. I feel like I should be working constantly or at least appear to work constantly so that no one thinks I am lazy. That’s bullshit.

Right now I am working on a dream project. I get to do something I never thought I would get to do. I am incredibly grateful to get to do the work I am doing, but I know this isn’t what I want to do with the rest of my career.

All of the skills I currently have are for things I don’t want to do anymore. I don’t know if it’s burnout or if I just get bored and want to keep chasing the new and shiny.

I have a lot of interests. I am interested in electronics. I am interested in 3D graphics programming. I am interested in cryptography. I am interested in robotics. I am interested in audio programming and engineering. I am interested in artificial intelligence and machine learning. I am interested in game mechanics.

I never have enough time to work on any of these things. I am afraid if I ever did get a job doing any of these things that I would figure out I don’t like them either. It’s not like anyone is actually going to pay me to learn any of these things. It’s difficult to find anyone hiring who isn’t just looking for someone who can pull data off of a server and cram it into a table view.

I keep hearing from everyone that there is no point in learning Sprite Kit/Metal/Anything outside of UIKit because no one is going to pay for an interesting user interface or functionality that isn’t available on Android.

A long ass time ago before the iPhone came out there were a number of companies that had stable businesses making Mac-only software. I refuse to believe that there is no future in indie development using the large number of frameworks most people never touch. There is a conventional wisdom that a stable business can’t be built even though I don’t think I know of anyone who has tried.

I know a lot of people who have tried to build RSS readers and weather apps and Twitter clients, but I don’t know a lot of people who have written comprehensive HealthKit apps. I don’t know a lot of people who have tried doing hardware/software integrated products. Everyone feels it’s too great of a risk and they don’t even try. There is “easy” money to be made doing boring stuff, so we all just accept the status quo.

I am one to talk. I have not released an app on the App Store, so it’s all well and good for me to knock people for not doing something I am not willing to do either.

That’s why I won’t work on weekends.

I want to spend my weekends working on something that makes me happy.

Right now I have this laundry list of things I find interesting but I don’t have any kind of context for even explaining what they do. If I tell someone I am interested in artificial intelligence and they try to talk to me about it I feel like this.

I don’t know if I am just not capable of being happy. I don’t know if there is some magical piece of technology out there that will make my soul sing in the way I think it will. I could just be a walking sack of discontent. I could spend my life chasing after something that doesn’t exist. I should be content with just finding something I don’t suck at. But I’m not.

I need to keep looking for that thing that captures my imagination. I don’t get to do that if I work on weekends. So I am sorry, but I need my weekends to try and find something that makes me happy. I don’t care if it’s the next disruptive technology or just some stupid home automation garbage I do to amuse myself. I want to feel alive and there are long periods of time right now where I do not.

Keeping Score

“Why did you let him treat you that way?”

I get this question a lot when people ask me about various relationships I have had. People don’t understand why I would not put up more of a fight on things like where we go on vacations or what color the wedding invitations were or whether we spent the tax return on a new couch or put it in savings.

I was thinking about that this weekend. I am in the process of painting and organizing my house. There are areas of the house, especially in the kitchen, that I have no idea about. My ex-husband organized the kitchen and basically never let me in there, so there are cupboards I have never opened full of things I have never seen.

One thing I decided to do was get rid of his plates and mugs. He had a set of plates and mugs that preceded the marriage. He left them here when he moved out. While he was packing he told me that he decided to leave those here and take a set that we bought our first year of marriage and the set that we got for the wedding.

I refused to let him take the wedding set.

The wedding set is a set of Asian-style square plates. It was one of the only things I absolutely insisted must be on the wedding registry. He told me he hated them because they were purple and he didn’t want a bunch of girly things clogging up his kitchen.

A dear friend of my family bought us the only set we got. The entire time we were married those plates were shoved onto a high shelf and were only used when we had company.

I asked him if he wanted his plates. He asked which ones, because he would take the purple ones but not the ones he made us use for nearly six years. That was when I realized why I let him treat me that way.

Until recently, I have been at a loss as to explain it. Usually those decisions were meaningless to me and I would let the person who cared more make the decision.

I also made an erroneous assumption that if I gave in on something I didn’t really care about that the other person cared very deeply about that it would go both ways. I figured that things would be equitable and that if I gave in on something that he would give in on something too.

I found out too late that it doesn’t work that way.

Every time I gave in on something, it was either immediately forgotten or it sent the wrong idea that I would give in on everything if enough pressure and bullying was applied. When I would stand up for myself, I would be viciously argued with. Either it would be too difficult for me to continue arguing and I would give in, or it would be so draining that it would take me a long to time recover in order to have another argument like that again.

This lead people to think I could be controlled. Yell at me and make my life miserable enough and I would give up and forget about whatever it was I was asking for or arguing about. These people felt they could bully me and always win because I would stop fighting.

What they didn’t know was that I was keeping score.

I was keeping track of every single time they lied to me or forced me to do something I didn’t want to do and didn’t treat me like a human being.

My ex-husband ignored my requests for a divorce for over a year. I physically moved out of the house and filed for divorce and only came back when he promised to go to therapy with me. But like so many other things in our marriage, he thought that if he ignored this it would go away.

I remembered every early thing I gave into in our marriage. I kept track of every lie he told me and every favor that he forgot the moment it was over.

I kept track of every time he blamed me for the quality of his life. Every time he purposely yelled at me to force me to cry to make himself feel better. Every time he put someone else ahead of me and assumed I wouldn’t make a fuss about it because I would just take it because that is what I do.

I will never be this person again. I am working very hard to be more assertive and to take more of a stand on things because I don’t want to train another person into thinking that I am a doormat.

If you’re involved in some kind of relationship with someone that you constantly steamroll because they always eventually give in, keep in mind that this person is also keeping score. This person remembers every single act of aggression you have placed upon them. And they are waiting.

How Random is arc4random_uniform?

I remember when I was in college and iTunes became a thing. One of the aspects of iTunes that I liked was their feature where you could randomize a playlist.

After using it for a while, I noticed it didn’t seem to quite work. I would make a playlist with ten songs by one artist and two songs by another and every time I would randomize the playlist the two songs by one artist would always play one after another.

A lot of people complained about it. There were articles on the Internet about how random does not mean that the algorithm will always separate those two songs. If you shuffle a deck of cards there will periodically be sets of cards that settle into order. In later versions of iTunes there were options to make thing more or less random, which didn’t make a whole lot of sense to me.

To this day, I am still bothered by what seems to not be truly random modes of behavior. I play a few German-style board game apps on my iPhone and I notice that the dice rolls never seem to feel natural. In Settlers of Catan you roll two dice. Statistically, the dice should amount to seven as the most common dice combination, followed by six and eight. Whenever I play this game, I will have three or four rolls in a row where the dice total is three, which is statistically improbable. If this happened just once, it would be weird because stuff like that can happen in real life, but it happens every game.

I don't want him touching me!

I don’t want him touching me!

Random isn’t random. Humans are bad at making truly random patterns. In the pilot episode of Numb3rs, Charlie demonstrates this by having everyone create a “random” distribution of themselves in the room, which isn’t truly random because everyone is trying to maintain a certain distance from one another. (That scene is about 18 minutes into the episode, if you don’t want to watch the whole thing.) If it were a truly random distribution there would be clumps of people. Cornell has a page summarizing this if you’d rather read than watch.

Humans also mistake things that look random for not actually being random. Synchronicity is the practice of looking for patterns in randomness because it’s the believe that some things are so coincidental that they could not possibly be con incidents but the presence of a higher power. This is the basis for divination methods such as the Tarot and the iChing. There are books about this phenomenon.

So if humans are bad at creating random sequences and see meaning in random patterns, then computers should be awesome at it, right? Well…

RC4 and ARC4

There are a lot of reasons that a computer programmer would need randomly generated values. Most games depend on having a lot of randomly generated values. You can’t play Solitaire without a “shuffled” deck. Having enemies randomly spawn, rolling dice, and a lot of other things depend on random values to work.

Even more importantly, randomly generated values are vital for cryptography and security. It is this purpose that spawned our most used random generation algorithms.

Arc4Random is the most common command used to generate random numbers. A simple way to generate a random dice roll in Swift is:

let diceRoll = Int(arc4random_uniform(6) + 1)

So what is arc4Random and where did it come from?

In 1987 a man named Ron Rivest created the Rivest Cypher 4 (RC4) algorithm. He did this while working for RSA and thus they owned the algorithm.

RC4 is a stream cipher, allowing for varying lengths of bits to be encrypted. It remained secret and secure until 1994, when it was reverse engineered and the cypher was cracked. RC4 was a registered trademark owned by RSA, so this new, public algorithm was named ARC4.

Since this cypher has been cracked, it’s a really bad idea to use this to encrypt your programs. But it still works for creating randomly generated content, so it is now commonly used in things like game programing when you need randomly generated content.

How Computers “Generate” Randomness

There are two flavors of random number generation in computing: Pseudo-Random Number Generators (PRNG) and True Random Number Generators (TRNG).

RC4 is a PRNG, which means that arc4random is also a PRNG.

PRNGs work by generating a table of values from a seed. These values are supposed to mimic what you would get if you had true randomness. If you took an intern and had them roll a die a hundred times and record the result they got (for experience, of course) and made it into a table, you would have a PRNG.

So if you start out with the same seed, you’ll get the same results over and over again. In order to get different results, you need to use another seed.

For most of what you need to do with random number generation, this is good enough. If you just want to have a game on your iPhone where you need to randomly generate bad guys, this is just fine. It’s not fine if you’re trying to encrypt credit card or personal health information.

Random Number Playground

I wanted to test out how random arc4Random is because I feel like there are number that get repeated all the time constantly and it’s not really an even distribution.

I create a playground that you can access here. I am planning to add additional functionality to this over time, but it’s pretty bare bones at the moment.

I decided to run this die roll function twenty times. With six values, there should be about three rolls per number. Didn’t quite get that:

  • Number of 1: 7
  • Number of 2: 2
  • Number of 3: 1
  • Number of 4: 4
  • Number of 5: 2
  • Number of 6: 4

Yikes! This seems to buy into my Settlers of Catan theory that the game is set to screw me over by generating an excessive number of ones.

However, as anyone who does polling and clinical trials can tell you, twenty is not a large enough number to be statistically accurate.

So what happens if you run this a lot? Like a lot a lot? What if you ran this 2000 times? I got these results:

  • Number of 1: 348
  • Number of 2: 304
  • Number of 3: 327
  • Number of 4: 329
  • Number of 5: 347
  • Number of 6: 345

As you can see, if this gets run a lot, then the numbers even out significantly. The number of ones, fives, and sixes only deviates by three.

Conclusions

There is a difference between snapshots of things at certain points in time and long term patterns of behavior. If you look at something like the stock market, stock prices can deviate wildly over the course of an hour, but if you look at long term trends, then they tend to even out.

It’s rather frustrating to play a game expecting the dice rolls to behave statistically. However, if everything in life behaved exactly as you expected it to, it wouldn’t really be random, would it?

Additional Links

Beware of Publishers Bearing “Free” Gifts

I buy a lot of programming books. Like, a lot a lot. If you’re a publisher and producing any books on OpenGl, VR, robotics, etc… I am probably giving you money.

One place that I buy a lot of programming books is Packt Publishing. They were one of the first publishers to have books out on the Unreal 4 engine. They have a lot of graphics and game programming books and their prices are fairly reasonable.

Back in May they had a deal on a set of five books on game development. Two were books I was planning to buy anyway for the price of the other five, so I bought the set of books. I noticed at the end of my invoice that they gave me a 10-day free trial of their online library of books.

One of these things is not like the other...

One of these things is not like the other…


I am already a Safari Books Online subscriber and have access to the Packt library, so I just ignored this add on to my purchase.

(Yes, I do go out and buy books I am paying to have access to through Safari. I know I could save a lot of money by not buying a bunch of programming books I probably won’t read, especially when I am paying to have access to them. Don’t judge me.)

A week later I got an email from Packt telling me my trial was almost over and they hoped I was enjoying their books. I was kind of miffed. I never initialized the trial. I have gotten free trial offers for Safari that I have never been able to use because I wasn’t a new member, but they always had a code that you needed to use in order to start the trial. I didn’t know that the trial would start automatically.

I had somewhat forgotten about this until I got an email yesterday telling me that Packt had charged me $12.99. I went to check on what the charge was for and guess what? It was for a monthly subscription to their online library.

So, they signed me up for a service I didn’t want, gave it to me without my permission, and because I was unaware that they were doing this they started charging me for something I never authorized.

I was incredibly annoyed. I feel this is a really sleazy way to do business. I cancelled the subscription immediately and wrote an email to complain. Here is the response I got:
email

They basically tell me that if I don’t want their subscription I have to cancel it. I grok that. Already done it.

There is no acknowledgement that what they did was underhanded or sneaky. Their response basically treats me like I am an idiot who didn’t know what I was doing.

I know that most services like Amazon and Apple Music and whatever offer you a free trial period after which your credit card gets charged. They hope that you forget that you signed up for a free trial period and they can charge you because you forgot to cancel when the trial was over. That’s kind of sneaky, but it’s still something where you are choosing to opt in. You are saying “I want this and I agree to pay money for this if I forget to cancel my subscription.” I have avoided free trials of things for this very reason.

It is not okay to “sell” someone something they didn’t choose and then charge them for something they didn’t opt into.

There is a bit of shady behavior on this site. They recently released a $50 OpenGL book that is so out of date that it does not mention shaders, which have been around since 2004. People have complained and gotten a “We’re sorry, we’ll pass your criticism on to the author.” This book is still available and does nothing to warn the reader about how out of date it is. Good publishers like the Pragmatic Programmers remove out of date books all the time.

Their royalty structure also leaves much to be desired. The 16% royalty is not necessarily bad, but considering how many times a year they sell every book on their site for $5, I find it incomprehensible that anyone working on a book ever outearns their advance.

It’s really too bad. They have a lot of books on rather obscure and esoteric topics that most people don’t cover. They have one of the few books on the OpenGL Shading Language on the market. As far as I know they are the only publisher producing any books on LLVM. I would like to think there are better ways of producing a broad range of interesting content without screwing over both the authors and the customers.

CocoaLove and Indie DevStock

I speak at a lot of conferences. I have spoken at around ten conferences a year since 2014. That’s a lot of conferences. I have had some not so great experiences and a few really awesome ones, and the awesome ones are the ones I want to talk about in this blog post.

The best conferences I have attended over the last twelve months were RWDevCon and CocoaLove. Both of these conferences went above and beyond to deliver a unique conference experience.

CocoaLove is in Philadelphia and really embraces the City of Brotherly Love vibe. Curtis and his team make sure the food at the conference is local, including an entire lunch activity around getting authentic Philly cheesesteaks.

RWDevCon has the advantage of name recognition because of the years of amazing tutorials that Ray’s team has put out. CocoaLove does not.

Another great conference that might not make it to its third year is a newcomer, Indie DevStock. Indie DevStock is being run by my friend Tammy Coron, a fellow Ray Wenderlich tutorial team member. She talked to me about running the conference with her, but I told her I was too busy. I was mostly too cowardly to actually stick my neck out and try to run my own conference. Tammy has bigger balls than I do and is making a go of it.

Both CocoaLove and Indie DevStock are in regions of the country that don’t see a lot of conferences. CocoaLove is in the Northeast and Indie DevStock is in the South.

Every week on Twitter I see people bitch and moan about the lack of diversity in tech. Everyone wonders what we can do about it. CocoaLove made a concerted effort to have a diverse lineup. Indie DevStock is run by a woman and 67% of their lineup is underrepresented persons in tech.

Both Curtis and Tammy have lovingly put a great deal of work into making their conferences special and unique experiences. People don’t run conferences to make money. These are labors of love. It’s really easy at a certain point to just kind of go, fuck it, and deliver a generic conference experience. We’ve all had our fair share of those. Both Curtis and Tammy really got creative and tried to set their conferences apart from everyone else.

Every year I hear of some really cool and special conference that has its last year because it’s just too difficult for the organizer to run it anymore. NSConf. Second Conf. C4. NSScotland. Everyone bemoans the loss of these conferences.

There are a lot of these conferences that I have been greatly disappointed in missing out on. I’m sure other people are disappointed as well.

I want to suggest that if you live in any area East of the Mississippi you strongly consider attending either CocoaLove or Indie DevStock. I am attending both (and only speaking at one.) Nashville is a ten-hour drive from Madison and Philly is thirteen hours. Supposedly I will be able to bring my beloved pug Delia to Indie DevStock. It’s wonderful to have a few conferences that are within driving distance from me where I don’t have to buy a plane ticket and deal with all the shenanigans I have dealt with this year.

You can use the code “HELLO” to get a discount on a ticket to Indie DevStock.

I know the face of iOS development is changing. We’re growing and evolving and becoming more corporate. I do hope that even with all the growth of the iOS community we don’t forget our funky, eclectic roots. The unique conference experiences that we have are in danger and it’s important for us to support them.

Anyway, I suck at selling things. There’s a reason I became a programmer and not a sales person. I want to help spread the word about these conferences and try to convince people to come so that iOS development doesn’t become just like everything else. Support indie development and diverse voices in tech!!