Functional Swift: Chapter 3- Wrapping Core Image

I am writing a series of blog posts analyzing the code and concepts from each chapter in Functional Programming in Swift. I am assuming if you are reading this that you are following along in the book, so I am not references their specific code snippets in my blog.

The purpose of this chapter is to show the reader how to do a very important thing in programming, which is wrap a framework or an API written in another language, such as C.

Being able to integrate lower level code into your applications is a really important skill to be able to master. Over the last month I have had a project where I had to write a few wrapper classes around XML-parsing functionality in the C library libxml2, which I will write about in a later blog post. Learning how to search the sparse documentation for this library and figuring out how to integrate it with Swift was a really interesting and painful learning experience. Even though a lot of times I wanted to hang my head and weep in despair, after I got it working I felt kind of like one of those douchebag programming ninjas that recruiters keep contacting me looking for.

This might not be the best sales pitch for why you should care about this stuff, so without further adieu, I will get to the content.

Core Image

Even though the focus of this chapter wasn’t specifically on learning Core Image, I wanted to take a moment to talk about it because it’s a neat little framework.

Core Image is a framework that allows you to add filters to photos in both iOS and Mac applications. Core Image is very similar to GPUImage, except GPUImage is open source, so you can go in and actually see how all of the shaders were written. Core Image has a few more filters than GPUImage has. In iOS 8, Apple opened up the ability for you to write your own Core Image filters, which wasn’t possible before.

Core Image is, as my coauthor Chris Adamson calls it, “stringly typed.” If you want to use a filter from Core Image, you have to reference it in a string. If you spell the filter name wrong then your project will fail silently. Whereas you can use auto-complete on other parts of your project to ensure that you don’t get felled by spelling errors, there is alas no auto-complete in Core Image.

If you’re interested in how to write shaders for either Core Image or GPUImage, I recently wrote an article about it for Objc-io. There are a lot of other neat photo articles in this issue too, so be sure to go check it out if you want to know more about how to use photos in your iOS/Mac applications.

But enough of my own buzz marketing, on to the actual content of the chapter…

Wrapper Type

Generally speaking, Core Image has a rather repetitive pattern. You take an image, filter it, then you take that result and feed it to the next filter you are using.

If you’ve ever used Core Animation or another framework that affects the output of what goes on your screen, you will know that the order you implement your changes in affects your output. The same thing goes for your image filters. If you add more than one filter to an image, changing the order will change what the output image looks like.

Since you are using a filter chain where you are taking the output of one operation as the input of another, it makes sense to encapsulate this functionality into its own type. In this case, the type is a function that takes a CIImage and returns a CIImage.

CIImage filters all take different types of parameters. Some filters only take an image as a parameter while other ones many more. We want to be able to customize our filter functions to take the correct number of parameters. Regardless of what kind of filter we are making or how many parameters they take, we want each of our new custom filter functions to return a function that conforms to the Filter type alias. Naming this function type makes our code cleaner and safer by assigning a name to it and removing code we would have to write over and over again.

Convenience Initializers and Computed Properties

We want to make it easier to extract the output image so that we can chain this filter’s output image to the input of the next instance of our CIFilter class. We are using a convenience initializer and a computed property to extend the class to customize it for our needs.

The class extension has three pieces we are going to look at: a convenience initializer, a computed property, and a typealias representing a dictionary that holds our Core Image parameters.

Any time we create an instance of a class or a struct, we have to handle initializing it. Back in Objective-C we had our pattern of [[NSString alloc] init] to initialize our instances. We still have to initialize our instances, but like many thing in Swift, this process has been simplified. Instead of the long, verbose way of initialization, we just use “()”, which is a void function call. This initialization function is void by default, but life wouldn’t be very interesting if we couldn’t customize things to suit our needs.

Just because the default initializer is a void function does not mean that it always must be. If we have want to pass in parameters to the initializer, we can do so. In the example used in this chapter, we are trying to customize the CIFilter class. We are doing that by extending the class to include the functionality we need.

The normal CIFilter initializer just takes the name of the filter being used. We want to initialize the filter with the dictionary of parameters along with the name. In order to make it easier and clearer what we are doing, we are typealiasing the dictionary of parameters and passing that type into our convenience initializer. Within the convenience initializer, we are calling CIFilter’s designated initializer, essentially wrapping the base CIFilter initialization within another function that allows us to do more.

The last piece of our extension is a computed property, which is our coveted output image. We are treating an outputImage property that is of type CIImage and instead of just setting it to a CIImage, we are checking the value for the key that we are using (which in this case is the name for the CIFilter we want to use) and returning a CIImage.

Computed properties are interesting. They do not store a value. Instead, they are a getter to find and set properties and values indirectly. It is my impression (which, if wrong, I would really appreciate someone correcting for me) that they are similar to functions but with slightly less overhead. Natasha The Robot says in this post that a computed property is a function disguised as a property. I am on the fence about what the difference is between a function and a computed property, so I am on the fence about how to handle them. Would like to write about them further in a future blog post, so hit me up with any thoughts you have at some point in time.

Compositing Filters

Anyone familiar with special effects or Photoshop might be familiar with compositing. Compositing is the art of layering multiple images and filters together to create a single new image. Compositing encompasses everything from making collages out of multiple images to generating large Photoshop pieces of art that have hundreds of layers.

The way we are using compositing here is that we are taking several simple image filters and we are combining them together to make a larger, more complex image filter. Many of the large, complex image filters in both Core Image and GPUImage are composites of smaller, simpler filters.

Core Image has an entire section of filters that are exclusively used to composite images. If you have a chance, it’s a lot of fun to play with compositing filters. If you work with Photoshop and you’re familiar with the various blend modes, these are represented in this category of Core Image filter. You can get some really awesome effects using compositing and blend modes in your photography and I encourage you to explore them.

The first composite filter we are creating is one that superimposes a color on top of the original image. It is made up of the CIConstantColorGenerator and CISourceOverCompositing. The Color Generator is just creating a blanket color layer whose output is not at all affected by the underlying image. The Source Over Compositing is simply taking one image and placing them over another. In our case, it is placing the Color Generator layer on top of our image we want to filter.

After we create this composite filter, we are chaining it to the output of the blur filter. So, first we are taking our image, applying the blur filter, then taking the output from the blur filter and applying our composited red filter to the top. We are specifying that the opacity on the red filter is only twenty percent so that the the second filter doesn’t completely block out the first filter or the input image.

Adding Functionality

Since being able to compose two or more filters together is an incredibly useful thing to be able to do and something we might need to do many times, it makes sense to write a custom function to simplify this process. Also, considering the number of inputs we are dealing with for this functionality, being able to simplify the code and avoid missed parens is a good use of our time.

The composeFilters() function being defined takes two filters as parameters and returns a new filter. In the code sample, we see that we are setting a variable to hold the output of this function, which is a filter. We are then creating a second variable that will hold the output of the filter we just created. Since the output from the composeFilters function is a filter, when you use the variable you are calling a Core Image function that is filtering the image being used as a parameter. When I read through this at first, it took me a little bit to parse apart the logic.

Infix Operators

Infix, Postfix, and Prefix notation is a complex way of labeling a phenomenon most programmers are familiar with: Where to place an operator.

Infix operators are placed between two operands. Which is an obtuse way of saying you write an equation like this:

X + Y

The operator, in this case the “+” sign, gets placed “in-between” the numbers it is operating on.

Prefix operators are placed, just as they sound, before the operands:

+XY

I’ll bet you can figure out how to write a postfix operator now:

XY+

What do these operators do? Why are there a bunch of them?

Think back to your Algebra class. Remember PEMDAS? That acronym helps us remember the order of operations. If you want to isolate two numbers that you want to add together before the result is multiplied, you had to put parentheses around them to ensure that the product was calculated, not just the first number. Infix, Prefix, and Postfix operators affect the order of operations in mathematical calculations. All equations can be represented and translated in each style, so theoretically you don’t lose any functionality by not understanding how to use each type of operator.

These operators are incredibly common in mathematics. Since Haskell and other functional languages evolved from Lambda Calculus, there are a lot of operators and notations that are foreign and unfamiliar to people like me who flunked calculus and grew up on imperative programming.

Swift lets you write your own custom operators. There is a list of ASCII characters that can be used to write custom operators. You have to specify what type of operator you are defining. If you are defining an infix operator, as we are doing here, you need to specify the direction of associativity. In standard mathematical equations we have associativity from left to right. You can choose left, right, or none. None, which is the default, means that you can’t place your custom operator next to another operator with the same precedence.

I am still trying to figure this part of the chapter out. I don’t know why the custom operator “>>>” was chosen. I don’t know if the character is significant or important. My understanding of the code as written is that instead of using a text label for our composeFilters function, we are using symbols. I know this is a common thing in languages like Haskell and unfortunately I haven’t delved into them enough to be able to fully answer my own questions about how infix operators are being utilized here. Again, if someone has an answer, I would appreciate a ping on Twitter.

Currying

Currying is the process of taking one function that takes multiple parameters and breaking it down into a sequence of functions that each take a single argument. For example, if you were writing a function that took two floats as a length and a width for a rectangle, you could rewrite this function to take the first parameter and then evaluates a sequence of functions, each of which take one parameter.

Currying is found in languages like Haskell. In Haskell, the language only allows you to pass one parameter into a function. Currying is a way to get around this constraint.

Side note: Both Haskell and curried functions are named for Haskell Curry. Curry was a mathematician and logician who hopefully didn’t get his lunch money stolen too often for having such a strange name.

Currying gives us some options for customizing our functions. Currying allows us to seed functions by supplying too few arguments and using it as a basis for fully implementing another function. It allows us to choose if we want to apply the function to all of our parameters.

Since this post is getting rather long, I don’t really want to write a comprehensive explanation of currying and why you want to use it. I will save that for another post. The concept of currying is introduced in this chapter, so I wanted to cover it just a little. I would also like to look over the code from this chapter to get a better grasp of currying before I try to explain it further.

Conclusion

There was a lot of stuff being touched on in this chapter. Core Image, infix operators, and currying. These are complicated frameworks and concepts, so again, don’t get frustrated if you got through this chapter not fully understanding how everything works.

Up next, we have our old functional friends Map, Filter, and Reduce. See you next time!

My Defense of Swift

**Note: I am using an example in my blog of a post written by a developer in our community. I have noticed many posts with the same thoughts expressed in them and I am in no way attacking this particular person, who I respect a great deal. I want to preface this with saying I am in no way attacking the author of this piece or trying to single him out, so I hope he will not be offended that I am offering a counterpoint to his post.**

This morning I had someone send me a link to this article and asked me what I thought about it.

Honestly? I am kind of sick of everyone crapping on Swift.

I am tired of everyone saying the language is broken and that you can’t write real applications with it because it’s half baked and unusable.

I don’t mean to keep waving my credentials around, but I am working on a project where we are rewriting our software in Swift. We are not writing the usual weather app/something that pulls data from an API. This is some heavy duty crap. We are writing this on the Mac. We are using a serial port to connect to outside hardware. This is a legacy project that is on its third rewrite that has been around for ten years. So far we have not encountered anything that we can’t do in Swift that is being done in the original software.

For the last month or so I have been bashing my head against a project where I am implementing libXML in our project (which I am going to write a blog post about shortly.) Taking a really under documented C library where the sample code is written in Pascal and trying to get it to work in Swift has been a demoralizing massive pain in the ass. I have had to deal with all kinds of horrors that I didn’t know existed or were abstracted away so that I would usually never have had to deal with them again.

However, doing those things has made me a better developer. Just because I came into Cocoa programming after ARC doesn’t mean that I have no reason to think about it or know how it works.

I started learning programming three years ago. Prior to that, I didn’t know how to write a “for” loop without looking it up online. I was one of those noobs that people hate on Stack Overflow who ask how to do incredibly simple and stupid things. Learning programming was hard. It forced me to fundamentally change the way I think about the world. It was also hard because I had a lot of people who had been doing it longer than I had who were crapping on me because I didn’t know who the Gang of Four were or why we do the MVC pattern, or even what MVC means.

There are a lot of things that we think are easy and intuitive that aren’t either but we think they are because they are familiar. My boss told me about working with a woman who had a PhD but had never used a computer before. Our structure of navigating through folders and files is “intuitive” to us because many of us have been doing this for bordering on 30 years.

If you have been doing imperative programming since you were 12, then yeah, some of this stuff is going to feel complicated and unfamiliar. If you don’t have a painful, visceral memory of the pain it took to learn programming the first time, you might think that all of this stuff is complicated and broken and wrong.

I, however, do remember how hard learning programming was. I find learning functional programming and figuring out Swift to be no more difficult than it was learning Objective-C. It’s different. It isn’t broken. Yes, there are some things that will be refined over the next few years, but Objective-C wasn’t born completed either. It evolved over a period of years as Swift will evolve.

I got into programming because I wanted to learn how to solve complex problems. I am excited about Swift because it affords an opportunity to solve a complex problem in a different way than we did before.

I am worried that people’s opinions of Swift are being influenced by a few people’s bad experiences with it. When I have tried to advocate for Swift because of the work I am doing, I get my experiences brushed off because of my boss. I am told that of course Brad Larson can use Swift to control robots. He’s a genius. Us normal people can’t use it because it’s too complicated.

Again, there is a difference between broken, complicated, and unfamiliar. If you go into Swift thinking it should be just like Objective-C, you are going to be disappointed. If you go into it knowing that it is unfamiliar and that you have to fundamentally approach things a different way, then you might be okay with it. If programming was easy, then everyone would be doing it. Just because something is different than the way that you are used to doing something doesn’t mean that it is wrong.

I hope that people who are discouraged will eventually change their mindset about how to approach Swift or some other hybrid language with functional features. Life gets boring if you just do the same thing over and over again in the same way. Programming is a young discipline and we haven’t yet reached the point where we absolutely know that the way we are doing things is best. It will continue to grow and evolve and change. And that’s a good thing.

Functional Programming in Swift: Chapter 2- Thinking Functionally

*Note: I strongly recommend following along in the book with this blog post. I am not going to be recreating the diagrams or the code here, so if you don’t have the book open when you are reading this post, you will be very confused and I would not like that.*

This first full chapter of Functional Programming in Swift introduces one of the most important new concepts in Swift: Higher Order Functions. I will get into higher order functions in a moment, but first I would like to give a little bit of context as to what the example of the chapter is about.

Battleship

The example used for this chapter is called Battleship. I, like many other people, associate Battleship with the board game. Since many programming textbooks use common games with known rules to teach programming concepts, it was understandable that many people thought that this example would be about the board game Battleship. This is not the case.

Back in 1994, the Office of Naval Research was exploring rewriting some of its defense software. Like any good agency, they didn’t want to just pick a programming language out of a hat. They wanted to benchmark which language would be the most efficient language to use for this project. They were concerned with a few factors:

- Development Time
– Lines of Code/How Concise is the Code
– Human Readability
– Maintainability

For a very long time, functional programming languages were considered to be impractical for real world applications. They were an interestring curiosity and another approach to programming, but the enforced static nature of functional languages and the lack of mutable variables seemed to doom functional languages to never be implemented in actual projects.

This study proved that a purely functional language could not only be used effectively in a real application, but also proved that this approach could be even better than an imperative approach.

If you look over a lot of the examples in this chapter, you will notice a lot things that are not present in our traditional games of Battleship:

- Checking the range of your weapons
– Avoiding engaging enemies too close to your ships
– Taking the location of friendly entities into your equations

These are not things we think about when playing the board game Battleship, but they are incredibly vital things to consider if you are a naval ship engaged in battle with actual enemy combatants. These are not small considerations. You don’t want to accidentally frag your fighter jets when you are aiming for an enemy ship. Any targeting program that you design must account for all of these considerations.

This beginning chapter takes this example and shows how Hudak and Jones were able to work around these constraints in a functional manner that was more efficient and easier to maintain than the traditional imperative way of approaching these problems.

Imperative Complexity

Our initial calculation is very simple. We are assuming our ship is at a location and we are trying to determine if another point is within range of our ship. Our range is represented by the radius of a circle and we are simply passing the location of our ship (position) and the distance we can shoot (range).

We are then using the Pythagorean Theorem to determine if our target point is within range of our ship. a squared plus b squared equals c squared. In our case, target.x squared plus target.y squared should be less than or equal to our range squared. Our first function is taking the square root of the two target coordinates and returning it only if this qualification is met.

In order to keep things clear, we are using a type alias so that we don’t have to remember that the CGPoint object is our position and the CGFloat is our distance. We will see type alias again, so don’t forget it.

So far, so good.

As the program grows in complexity, it becomes harder to continue to maintain the function. We keep adding additional parameters and constraints. I am going to honestly say at this point I developed code blindness and stopped looking at the code. Suffice it to say, this once simple function grows to a large mess of spaghetti that kind makes me weep for the future of human civilization.

I am not going to untangle the spaghetti code because we aren’t supposed to be doing this anyway and I am not going to encourage you to write unmaintainable code. Bad Swift developer!!

Going to skip ahead to the functional way to deal with these constraints.

The Functional and Rational Approach to This Problem

There is one very important thing to remember about functional programming versus imperative programming:

- Imperative programming is about telling the computer how to do something.
– Functional programming is about telling the computer what to do.

In the above spaghetti code, we were getting over wrapped up in how the conditional logic would deal with all of the various contingencies of our problem. If our point is in range but it is also too close to a friendly, what do we do? It is easy to get overwhelmed by the complexity of implementation.

So let’s take a step back and ask what are we actually trying to do, without thinking about how it will get done.

We want to know if our point is in a region where we can target it.

Remember when I told you to remember type alias? We are bringing it back here. A type alias allows you to assign a label to an existing type so that if you have multiple objects/properties/variables that are all the same type, you can assign a label to the one specific instance of that type.

We know that strings and numbers and classes are all types, but there is another thing in Swift that now qualifies as a type: a function.

Functions in functional programming are values, no different than strings or structs. They can be passed around and referenced exactly the same way you would work with any other kind of value. The best analogy I can think of for this is a string. In C we didn’t have real strings. Stings were an array of chars that were eventually, in later languages, encapsulated into their own type. As you work more with functions as their own discreet values, it should get less weird to think of them in this way.

We can create a type alias for a specific function type. In the example in the book, we are creating a type alias for a function that takes a Position as a parameter and returns a Bool.

So instead of our initial function that uses the Pythagorean theorem and returns the result of that calculation, we are instead returning a closure that performs the calculation. Closures are simply unnamed functions. Basically we are taking the logic we had before and putting a nice, shiny function wrapper around it. We are wrapping a riddle inside of an enigma.

Why would we want to do this?

Let me give you a real world example of this in practice:

I work at a company called SonoPlot. My boss, Brad Larson, wrote a blog post about our project to rewrite our robotics control software in Swift. Since we are dealing with interacting with hardware, there are a lot of things that can go sideways that you don’t have to deal with when you are working with just software. Sometimes something goes screwy when we are communicating with the hardware and if we just send the command again it will go through just fine. Other times, the hardware is disconnected.

We don’t always know which one of these situations we will be in. We don’t want to keep sending commands to our robotics if they are not connected or on. Alternatively, we don’t want to tell the user that the robotics are not connected when they actually are.

To get around this situation, we created a special function called “runCommandAndAttemptSoftRecovery()” that takes a function as a parameter. We wrap many of our hardware functions in this function. “runCommandAndAttemptSoftRecovery()” will try to run the function we are passing in and if it doesn’t pass, it will attempt run the function again. If the function fails a second time, we handle the error.

Sometimes you will have some functionality that is important to apply to many parts of your project, such as our hardware commands. In times like those, being able to pass a function into the function makes it possible to reuse a piece of code in ways that weren’t possible with Objective-C or an imperative language.

In the example in the chapter, we are trying to figure out a way around the creepy spaghetti code and conditional logic. Rather than creating one Frankenstein’s Monster of a function that has to account for all of these things, we are creating a lot of small functions that account for discreet parts of this problem.

We check if the point is within range of the circe. We check the offset. We write a function that combines known areas that are in range so that they are in one data set instead of two. Each of these functions returns a function of the same kind, so they can work together to narrow down more discreetly if a point is within range of the battleship without hitting a friendly craft.

This is a rather difficult example to explain and I will honestly say that at this point I can only explain it on a high level. I strongly recommend looking at the final code and referring back to each individual function to see how they work together. There are truly reusable functions in the final function that behave differently based on their inputs and parameters. Sometimes looking at a final piece of code and following the logic through its various rabbit holes is the best way to understand how something works. That’s why we dissected frogs in high school biology class, even though I swear some of my teachers were sadists….

Takeaways

This is an introductory chapter. It isn’t expected for you to genuinely grok all nuances of functional programming from this.

Here are the points I would take away from this chapter:

  • Start thinking about what you want your code to do rather than how you are going to implement it.
  • Start trying to mentally break things down into smaller pieces. Instead of having some big, scary function full of state and conditional logic, think about what you are trying to do in smaller steps.
  • Get used to the idea that functions can be passed around like variables. Think of functions as things that take one thing and turn it into something else. If you have a piece of wood, that can be turned into many different things. It can be a table, a desk, or a bookshelf. If you think of a function that takes a piece of wood and returns a piece of furniture and think about how each piece of furniture can be different, this might give you a better idea about how to conceptualize passing functions in Swift.
  • Don’t get discouraged!! This is a different way of thinking. It isn’t going to be intuitive. I have been working on this for nine months and I have barely gotten to the point where this chapter makes sense. That is one reason I am doing these posts. This is just to get your feet wet with some functional concepts. You are not expected to fully understand everything at this point in time. If you feel dumb right now, join the club. You’re not the only one. Just keep working at it and eventually something will click.

I wanted to recommend some resources I am using to try and work through this book to get these concepts to make more sense:

I will try to add to my list of resources as I encounter new ones. If people have sources they particularly like and want to make me aware of them, please ping me at @redqueencoder

Again, if a lot of this is still super confusing, that’s fine. You’re in the right place. We’re all trying to figure out how to please our new functional overlords. It will take a while and no blog post anyone is going to write is going to make this immediately intuitive. Think back to when you learned programming for the first time. It took a while, didn’t it? Learning how to think takes some time and some work. Don’t get down on yourself. Keep at it.

Up next, we are tackling some Core Image. Stay tuned!!

Doctor Who: Series One- Dalek

EXTERMINATE!!

EXTERMINATE!!

Ah yes, the inevitable Dalek episode. It was always coming. It would be like having a Star Trek series without Klingons. It just wasn’t going to happen.

It’s hard to remember a time when the Daleks hadn’t been run into the ground. After half a season of new villains, it’s kind of nice to see a familiar face. We are also treated to a few breadcrumbs about the Time War that destroyed the Time Lords.

The Dalek

I do have to admit, I was a little more thrilled at seeing the Dalek than I thought I would be. Even though the species has been retconned and run into the ground, the moment when the lights come on and the Dalek starts yelling “EXTERMINATE!!” is still incredibly exciting. The reveal was done incredibly well and this has helped this episode age pretty well.

It can be hard figuring out a good way to reintroduce an old character to audiences who may not be familiar with the source material. Seeing how genuinely terrified Eccleston looks after handily dealing with a bunch of crises over the last few episodes is one of the reasons this episode is still so effective.

I realized that nearly every Dalek episode from New Who follows the same theme of them finding a Dalek that seems to be different than the other Daleks, one that has feelings and is capable of growth. The companion tries to convince The Doctor that this one is a special, unique snowflake. The Doctor gives the Dalek a chance, only to find out he was right all along. It’s really repetitive. It’s like watching Lucy snatch away the football from Charlie Brown.

I haven’t watched any Old Who, so not certain if this repetitive theme was actually a new idea back in 2005.
DalekEccleston

The Doctor

Eccleston does a tremendous job of selling The Doctor as someone who can be genuinely menacing. He spends a lot of time in the series being cuddly and adventurous, but this episode really drives home the point that The Doctor is a powerful being who has killed people in the past. He is the sole survivor of a war that wiped out two races of people, one of which was his own. The first few episodes sell him as the lonely god, the last of his kind. This is the episode where you realize that he is the one responsible for him being the last of his kind. His confrontation with the other last member of a wiped-out species is incredibly tragic.

On one hand, you can point to him and say that he made choices. He pulled the trigger that wiped out two species and he survived. What does he have to complain about?

It’s incredibly difficult to make the hard choice and to live with its consequences.

The Doctor’s interaction with the Dalek force him to process and deal with something he’s been running from since “The End of the World.” He doesn’t want to think about how he is responsible for a mass genocide. He wants to heal and explore. He didn’t want to be put in the position of destroying his own people. He wants to forget. This theme is explored in much greater detail during the 50th anniversary special, but it’s bones are established here, in this episode.

Facing uncomfortable reality.

Facing uncomfortable reality.


The scenes watching him torture the helpless and ridiculous looking Dalek are kind of disturbing. We’re used to this idea that The Doctor saves people and does impossible things. Watching him sink to a level of torturing a helpless creature and enjoying it is terrible.

I am actually interested in how many times The Doctor does terrible things. I know he’s done many over the course of the new series, but every time we encounter one it’s always disturbing.

On some level we expect The Doctor to be better than us. He’s not a human. He has lived for a thousand years. We expect him to be above all of our petty, meaningless concerns, to be more than we are. Watching him behave like a beast who enjoys tormenting the Dalek is terrible, not just because the act itself is terrible, but because the person doing it should be beyond such behaviors.

Adam Mitchell

We’re going to get into him a little more in the next episode, just wanted to mention that we are going to see him again.

Henry Van Statten

It’s nice seeing what the British think about Americans, but all things considered, if the Daleks were real I could totally see some asshole one percenter being the person who collects extra terrestrial artifacts.
roseDalek

Conclusion

This was an important episode in that it brought an iconic villain back to the Whoverse. I guess I didn’t have as strong of a reaction as I thought I might all things considered. The episode was good, but its impact has been blunted over the years by seeing the same Dalek story over and over again. Supposedly this Dalek and The Doctor are the last of their kind, yet the Daleks keep coming back over and over again. Why is it that the Daleks can keep coming back over and over again, yet the Timelords are irretrievably lost in time and space and meaning? Hell, we found out a year ago that they are still out there and not a peep about them in the current season. Well, except for The Master, but let’s not get into his own problems right now…

Up next, we have “The Long Game,” in which we find out what happens when The Doctor picks up someone who isn’t really meant to be a companion.

Keep Calm and Solder On

I think it’s painfully obvious to anyone who comes here to read my blog that I have a lot of hobbies and interests. I consider myself something of a renaissance woman. Any time I see something cool or eat something interesting my brain starts ruminating about how I can make this thing myself.

I have slowly come to the realization that I will not be able to do all of the things that interest me before I die. I probably won’t be fluently bilingual, so sorry Julia, my friend in Austria who keeps wanting me to learn the Austrian dialect of the German. I am probably not going to get a black belt in some kind of martial art. Heck, at this point I am pleasantly surprised that I have taken up and enjoy running, considering that I spent the last year in bed with my pugs hiding from the cold and working from home.

My little electronics helper.

My little electronics helper.

One of my multitude of hobbies/interests is working with electronics. I have always been fascinated by electronics and one reason I really got into programming was because I was interested in telling a machine what to do. Electronics, like a lot of other things such as C, is something I have been told I don’t really need to understand to be a great programmer. Actually, I think the more accurate advice was I didn’t need to understand it to know enough programming to find a job. There is a difference.

I have discovered the longer I am working with computers that there is always a lower level than the one I am currently working at. I went into programming thinking C was the lowest you could go. Then I discovered assembly language (which no, I have not succumbed to yet). Now I am discovering electronics.

Electronics, like programming, has something of a learning curve. There are lots of little pieces and components like transistors and DIPs that can be rather daunting to the uninitiated. Additionally, at least with programming you are dealing with text. You can look at a computer program without knowing and programming language and at least recognize that this is something human readable. Look at a circuit board and all you see is the language that Superman’s people used on Krypton. To make things even harder, you can’t debug a circuit in the compiler like you can with a program. Your circuit either works or it doesn’t. These things are incredibly daunting, which is exactly why I am incredibly obsessed with this right now.

Yes, this looks scary. It is at first, but it gets better.

Yes, this looks scary. It is at first, but it gets better.

I am a masochist. If I get to a point where I feel proficient with something, I feel uncomfortable and uneasy. My brain starts overheating and spinning itself into butter, so I have to find something harder to throw at it to keep myself from having a panic attack. It’s hard having a balancing act of giving my brain enough to do that it doesn’t overwork itself over nothing as opposed to trying to do too much and cracking under the weight.

My current hobby to do in my free time right now is to work on learning electronics. I specifically would like to figure out how to build electronic instruments. I would like to design and build a modular synthesizer in the basement. Eventually I would like to apply the knowledge I have about that to a piece of software to eventually release, but right now I am trying to thread that needle between doing too much and not doing enough.

Do I need to understand electronics to be a great programmer? No. Will knowing electronics help me make more money in the future? Probably not. Could I spend my free time writing an app that could conceivably earn me more money and advance my career? Probably.

So why do this?

Here’s why:

  • Because it’s fun. I love doing things with my hands and I honestly find working on software to be a bit soulless sometimes. I feel like nothing I do is real because it exists in the ether. Holding a real, physical component and soldering them together is fulfilling in a way that software development just isn’t.
  • You know what all this crap does? Me neither. Let's find out.

    You know what all this crap does? Me neither. Let’s find out.

  • I work with robotics. I didn’t have to write the firmware or the interface software to deal with the robotics initially, but it bothers me that I don’t quite grok how we are talking to the robotics. I know enough about the code to deal with it, but on a conceptual level there is still a lot of magic black box voodoo that is happening that I don’t fully understand. I don’t like working with things that work without me understanding what they do. I don’t “need” to understand this stuff to do my job, but I would personally feel more comfortable if I worked through a robotics project on my own and have a mental model for what it is that we are doing.
  • I don’t like looking at a circuit board and not understanding how it works. I think a lot of people feel very uneasy around things like programming because they see something that isn’t familiar to them and it frightens them away. I know there has to be a way of understanding how a circuit board works because other people design and build them for a living. Our entire society is built on integrated circuits and I want to know how they work and how to design them.
  • My analog synth kit that I am saving until I feel more comfortable tackling something this complex.

    My analog synth kit that I am saving until I feel more comfortable tackling something this complex.

  • It’s never been easier to self teach yourself electronics. Arduino and Raspberry Pi have made working with electronics and programming affordable and accessible to nearly everyone. In the last three or four years the MAKE series from O’Reilly has produced books on wearable electronics, analog synthesizers, and sensors. Sites like AdaFruit make it possible to buy projects designed by other electronics hobbyists. I have received an analog synthesizer kit that I am looking forward to assembling in my basement. I bought conductive thread and smart LEDs so that I can create a wearable electronics project. I don’t have kids and I have disposable time and money. Instead of spending a day playing Nintendogs on my Nintendo DS, I can go to my basement and build a robot that I can spend another weekend hacking.

If you are interested in electronics, here is what I have done:

  • Go to O’Reilly and pick up books like this one or this one. O’Reilly has great deals on ebooks if you buy two or more of them. Many of the books in the MAKE series have correlating kits on Maker Shed, which are also somewhat available at Radio Shack, if you like brick and mortar stores. Just doing a kit is not going to teach you electronics, but it will get you comfortable with soldering and putting pieces together. The physical aspect of feeling comfortable touching and manipulating small parts is vitally important and I have personally found when I am trying to learn new things that just following directions and putting something together is a good first step to introduce you to something unfamiliar.
  • You're going to snip and solder a lot of these little bastards. Get used to it.

    You’re going to snip and solder a lot of these little bastards. Get used to it.

  • Invest in a good soldering iron. In fact, don’t stop at the soldering iron. Any time you buy tools, invest in good tools. You are going to be snipping a lot of wires and fighting with your snips when you are trying to make a nice, even back is no fun. It also bothers your wrists and for people coming from a programming background, that is never a good thing.
  • Practice soldering! I have done cross stitch for over two decades, so I personally found soldering to be somewhat easy to pick up. I am used to patiently sorting through threads and inserting thin filaments through holes. Let there be no ambiguity on this point: Working with your hands is a skill. You can cultivate a skill by using it a lot. Just because you may not have a preexisting aptitude for manipulating small pieces does not mean that you should give up on doing electronics. I suggest buying a bunch of small soldering kits from Maker Shed and that you just get comfortable with touching and soldering pieces. My first project was a noise maker that goes in an Altoid tin. There weren’t a lot of pieces and it wasn’t super complicated, but just the process of sorting the components and touching the pieces and trying to figure out how they worked together was an invaluable introduction to electronics that made me eager to learn more and to bigger projects.
  • Organize your parts!!

    Organize your parts!!

  • Organize your work space. This is the single most important piece of advice I can give to anyone undertaking a hobby with lots of small physical bits. Again, I have a background doing cross stitch. I never got a project done until I started learning to organize myself. I separate each color thread, put them on an index card, and I catalog what each color is. I make a slot for each color along with its symbol before I need them. I got relentlessly organized with my threads and my tools and once I did that I was able to get things done. Keep your space clean and organized. Take care of your tools. Buy as many parts bins as you need and label each and every drawer. If you can, have a dedicated space for your electronics. I have a table in the basement that has my soldering iron and my tools. The projects are all in one place and everything is tidy.
  • Be patient with yourself. You might have a natural aptitude for this or you might not. I have found a lot of things I thought I had no natural aptitude for that I was able to learn through tenacity and stubbornness. If you want to learn something because you want to learn it, then don’t worry about how long it takes. If you can accomplish something you thought was difficult after failing several times, just think about how awesome you will feel.

One of my projects was putting together an Arduino shield with a bunch of attachments to things like motors and sensors. I need to spend some time figuring out how to get the Arduino to talk to the board and to make it do things. I got past my initial skittishness around touching and putting together the components, now I need to take the next step of figuring out how to make them work together.

Again, this is a hobby I picked up a few months ago. I would like to spend a lot of time over the next year pushing the boundaries of what I can do with this. I will try to be better about writing up each of my projects on this blog in case anyone finds this interesting.

My "completed" Arduino shield I need to learn how to hack.

My “completed” Arduino shield I need to learn how to hack.


One reason I decided to do this was because someone told me I had to have an electrical engineering degree to understand how a circuit board works. I don’t believe that. I believe I can learn anything I want to. I think there are a multitude of sources available out there for people with the time and patience to work with them and who have a little bit of money to invest in their hobbies.

I also think there is value in learning how to do something just to do it. I spent a lot of time learning how to cross stitch because I wanted to know how to do it. So far I have not earned a dime from my textile work, but the things I did to discipline myself to learn it have come in handy down the road while learning programming.

I love the smell of solder in the morning. It smells like lead poisoning!

I love the smell of solder in the morning. It smells like lead poisoning!

Let’s pretend that you want to master making pie. Pie crust is hard to master. You need to develop a good feel for when the dough is too dry or it has been over mixed. My mom has spent forty years mastering how to make pie and she is still experimenting with different things. Mom doesn’t sell her pies and will never make money off of them, but the process of making them and the joy they bring people make it worth it to her to keep trying to make them better.

I think that there is a lot of pressure to spend all of our time doing things that will make money or bolster our careers. I think its important to spend some time cultivating those things, but I am also very Zen in that I think people should do things for no reason other than that it makes them happy. You can’t spend all of your time worrying about whether you are learning the right things. Sometimes you have to follow a passion and do something that makes you happy and not worry about what the future will bring.

Functional Programming in Swift: A Chapter by Chapter Analysis

I preordered the book ”Functional Programming in Swift” shortly after it was announced. I got a chance to meet Chris Eidhof at 360|iDev, which was a really awesome experience. He really knows his stuff and he is a wonderful person.

However, I have found it has been a little difficult to get into the Functional Swift book. I know there is a lot of really important content in here that I think is vitally important for people to be aware of, but I feel like it is being presented in a slightly obscure manner. This is not a beginning programming book and it can be a little difficult to break into.

I am trying to write more technical posts on my blog. I wasn’t doing this for a while because I was working on my book ”iOS 8 SDK Development.” I was so stressed trying to learn all the stuff we were writing for the book that the thought of going and writing technical posts for my blog was a little discouraging.

Now that the book is pretty much completed and I don’t have any conference talks to prepare for a while, I would like to spend more time writing technical blog posts. One series of posts I would like to do is analyzing the Functional Programming in Swift book.

I was a beginner not too long ago and I know how incredibly daunting it can be to be confronted with a bunch of technical stuff you don’t quite grok yet. I know that Chris is passionate about functional programming and I hope that he will not be offended by my efforts to spread the word about his work and to try to sugar coat it a little for people who are not as far along as the target audience for his book was.

I am going to try to tackle a chapter every week or two. If I am slacking on this, please harass me on Twitter so that I know that people are actually reading and getting some use out of my posts.

If people have things they would like me to write about, please hit me up on Twitter about it. I am happy to go out and figure something out that people want to learn more about.

I hope that doing this analysis will open new people up to things in Swift that weren’t possible in Objective-C. I know that right now it is very hip to hate on Swift. I was rather unhappy about Swift when it was first announced because I was under the impression that many things we do were going to be abstracted away. I didn’t like Ruby on Rails because you could write three lines of code and have a functioning website without understanding anything going on under the hood. I am an incredibly curious person who wants to have a deep understanding of how things work. When I was able to shift my perspective on Swift I became very excited about learning a new way of doing things. I hope that other people will do the same when they become familiar with how to effectively write Swift.

If you want to know what my current long-term project is, check out this blog post from my boss, Brad Larson. So far, we have not found anything we have wanted to do that could not be done more efficiently in Swift. We have had to use a few work arounds with the compiler, but we have not encountered any show stoppers.

I have been disappointed with all of the people who are claiming that Swift is broken and that it shouldn’t be used for serious projects. If Brad and I can use Swift on the Mac to communicate with an electronics board through a serial port, you can figure out how to use Swift to communicate with an API. It is just a question of working with the language, not fighting against it.

I hope over the next few months I can help others learn how to work with Swift. I think that is is a promising language and I hope that people can learn to open their minds to new ways of thinking about how to program.

Doctor Who: Series One- Aliens of London

aliensOfLondonAh yes, we have arrived at the notorious “farting aliens” episode of Doctor Who. Many people who argue that the Moffat era is better than the Russell T. Davies era (who are wrong, by the way) usually point to this episode of a prime example of everything that was wrong with the way Davies ran the show.

Who are all of these people and why do we never see them again??

Who are all of these people and why do we never see them again??

Even though the aliens are the main attraction for this episode, there is actually a rather fascinating plot twist that Davies throws at the beginning of the episode. Instead of The Doctor bringing Rose home twelve hours later, he brought her home twelve months later. Oops.

Side note: How much control does The Doctor have over the TARDIS? Just last episode the TARDIS unilaterally decided to land a decade later in another part of the island than where The Doctor specified it to go. The entire Amy Pond mythos is built on her being The Girl Who Waited because the TARDIS was supposed to return in ten minutes but returned twenty years later. Is the TARDIS misfiring like the holodeck malfunction episodes of Star Trek? End side note.

Jackie

I think it’s hard to remember later in the series that Jackie has an excellent reason for disliking and mistrusting The Doctor. He is the reason that her daughter has been missing for the last year (which makes me wonder exactly when the phone call from The End of the World happened chronologically…).

Most awkward family reunion ever...

Most awkward family reunion ever…

There is a glorious writeup of Twilight from Bella Swan’s father’s perspective that isn’t too far off from Jackie’s perspective in this episode. Your daughter meets a strange man the day that all the mannequins come to life and disappears for a year. You have no idea what happened to her and she waltzes in a year later like nothing happened. No apology for the emotional agony you went through for a year thinking your daughter was dead but having no idea how or why. Additionally, Jackie already lost her husband, Rose’s father. That year had to be hellish for Jackie and it’s no wonder that she is actively hostile to The Doctor for a while after this.

When we watch the show, we tend to not think about the peripheral people left behind when the companion goes on her adventures. One of the weaknesses I have felt with the Moffat era is that he conveniently strips away these loose ends and doesn’t explore them at all. Amy’s parents get sucked into a crack in the Universe, so there is no one to miss her when she goes away. Clara conveniently has no parents or immediate family to notice she is gone. Rory Williams and Danny Pink get involved in the Doctor’s travels, so they aren’t around to worry about what happened to their girlfriends.

Hey, you know how I told everyone you murdered my daughter? Can we just forget about that??

Hey, you know how I told everyone you murdered my daughter? Can we just forget about that??

One of the reasons the J. R. R. Tolkien books are compelling is that they actually explore what happens to the characters after they get home from their grand adventures. Bilbo returns from his adventure with a trunk of gold to find that they are in the process of dismantling his estate because everyone thinks he is dead. He is forever changed by the experience and never feels quite at home with his fellow hobbits anymore. Frodo can’t go back to his normal life because of all he has experienced as the Ring Bearer, so he travels across the sea with everyone else. Only Sam is able to make a home and a family after his adventure and to continue to exist in the world after his experiences. He is the Martha Jones of the hobbits.

Those stories are compelling and worth telling and I have found the more recent seasons of Doctor Who rather soulless because they don’t do as much of this as they used to. I know that everyone is saying this most recent season went back to this idea with expanding Clara’s character and the fate of Danny Pink, but I don’t think Moffat’s strong suit is writing emotionally compelling characters and a lot of this season just didn’t do it for me for reasons I can’t articulate.

Micky

Oh Micky. Micky, Micky, Micky. I do not understand Micky. It isn’t that I think he is an unrealistic character. Quite the contrary, I think he is very realistic, which to me is rather tragic.

What do you say to your girlfriend who disappears for a year and whose mom tells everyone you murdered her?

What do you say to your girlfriend who disappears for a year and whose mom tells everyone you murdered her?

Micky witnesses his girlfriend jumping in a blue police box with a strange man, sees the box disappear, then becomes the prime suspect in his girlfriend’s murder. No one would believe hearing what actually happened and everyone believes he killed her. She comes back after a year and doesn’t bother to come see him. He finds out she is home because he once again observes the TARDIS disappear. We get an unnecessary slapstick moment when he runs into a wall trying to catch the TARDIS. She has no idea what trouble her decision cost him.

She feels kind of sorry, but she just doesn’t get it. Yet, in spite of all of this, Micky stays with her. Why? She did one of the most horrible things you can do to another human being, yet he stays and I don’t understand why. If anyone treated me half as badly as she treated him, I would walk away. I would want nothing to do with someone who was that thoughtless and who clearly had no regard for me, yet he doesn’t do that.

It’s nice that later in the series they actually evolve his character somewhat and give him a spine and let him be a bad-ass, but watching him in this episode is rather disheartening.

Harriet Jones and Toshiko Sato

The Gallifreycrumb Tinies. Look it up. You will be happy.

The Gallifreycrumb Tinies. Look it up. You will be happy.

Harriet Jones, MP for Flydale North/Prime Minister. Yes Harriet, we know who you are.

I have a special place in my heart for Harriet Jones. When I started going to more and more programming conferences I started feeling a bit like Harriet Jones. “Hi, I am Red Queen Coder!” “Yes, Janie, we know who you are.”

I empathize with Harriet’s attempts to make herself important and her idiotic nattering about the Flydale infirmary when the government is dealing with a lists because of the aliens. Sometimes it takes a little while for the gears to shift in one’s head.

It’s really cool to see how the experiences in this episode change her. She goes from a rather unimportant person to being the Prime Minister. When I was a kid my dad used to tell me that the difference between a lucky man and an unlucky man was that the lucky one jumps when the universe says jump. Harriet was given an opportunity, much like Rose was, of expanding and broadening her horizons and she makes the most of that opportunity. She also validates my own personal habit of being somewhat nosy and wanting to know everything. Usually nosy people wander into situations they aren’t supposed to be in and they get murdered. Seeing one actually posses vital information and being a story catalyst is somewhat gratifying.

Sorry Harriet, that isn't psychic paper. You don't have clearance to be here.

Sorry Harriet, that isn’t psychic paper. You don’t have clearance to be here. Yet.

It’s fun watching the actress, Penelope Wilton, trading barbs with Maggie Smith on Downton Abbey. It isn’t really apparent in her appearances, but the actress is actually quite capable of holding her own against actors with quite a lot of presence and it’s nice to see that later she gets to stretch herself a bit more than she does here.

This episode also drops another Torchwood breadcrumb with the first appearance of Toshiko Sato. In Torchwood Toshiko is a computer programmer and not a doctor, so there is a nice wink to this appearance in her last episode on the show where we discover she was taking the place of Owen Harper because he was too hung over to come and analyze the alien. Over the last two episodes we have indirectly met the vast majority of the components that will eventually make up Torchwood.

The Slitheen

Yes, this episode has farting aliens. Yes. they have incredibly bad alien design and costume construction. There is no doubt that the Slitheen and the “alien” are the weak points of this episode. If the other stuff wasn’t so good this episode would be unsalvageable. It’s truly unfortunate that this atrocity got grafted onto the good stuff in this episode.

Breadcrumbs

Squee! This is the episode where Rose gets a key to the TARDIS!! That is a big moment in any companion’s relationship with The Doctor.

This episode includes the first modern reference to UNIT, which I believe we see in person for the first time in the 50th anniversary special.

We also get our first mention of Bad Wolf, which will be a rather important plot point by the end of the season.

Conclusion

This fourth episode of the series brings things around in a fairly satisfying manner. Like my other blog posts have articulated, there are certain kinds of episodes you can only really tell once. We have had the progression from the initial meeting, going to the future, going to the past, and now coming home. From this point forward, we aren’t really going to see a lot of stories that can only be specifically told at the beginning.

One of the challenges with New Who was introducing a new generation of people to what Doctor Who is without annoying long-term fans. These episodes have done a wonderful job of building a foundation about not only what Doctor Who is about, but also what the Davies era will be like. The Moffat era has been categorized by puzzles and the Davies era is categorized by relationships and character progression. Unfortunately, specifically with this episode, we are seeing that the Davies era will also be defined by a lot of things that are done in poor taste.

The next episode of Doctor Who is the second part of this episode, which unfortunately won’t have the wonderful character progression to anchor it in reality. I foresee the next episode being among my least favorite because I don’t think they will get into any of the stuff I watch Doctor Who for. We’re stuck with the Slitheen for another few episodes this season. Fortunately they aren’t going to be like the Weeping Angels that will come back to haunt us for an eternity.

Until next time.

Zen and the Art of Analog Synthesizer Maintenance

2014: The Year of Magical Thinking

You can take a picture of something you see
In the future where will I be?
You can climb a ladder up to the sun
Or write a song nobody has sung
Or do something that’s never been done

Last week I was in Atlanta for CocoaConf Atlanta. That conference was the cap on one of the craziest years I have ever had.

Exactly a year ago I had dropped out of school because I was having a nervous breakdown. I knew I needed to find a programming job but I had no idea where or how I would do so. I was completely broken and I had no hope that anything would get any better. The only thing that got me through that period of my life was the faith that something would happen.

I spent a lot of my time in 2013 sowing seeds, hoping one or two of them would take root. I attended several conferences and met a lot of people. Two of the people I met were Jonathan Penn and Chris Adamson. Jonathan mentioned he was writing a book and wanted to know if I would tech review it. Being a tech reviewer is an unpaid task, but I like and respect Jonathan, as evidenced from this blog post.

The editor for Jonathan’s book is Rebecca Gulick, who also happens to be the editor of my book with Chris. When he was looking for a coauthor and he mentioned me to Rebecca, she already knew who I was.

Before I was approached about writing the book, I reached out to Brad Larson about learning OpenGL. I knew I wanted to be a graphics programmer, but that it takes a long time to learn, especially for someone like me who didn’t have any programming experience until two years earlier. My reaching out to him resulted in me having the chance to work with him on a contract project for Digital World Biology. Even though we were working on this project, I hadn’t met Brad in person.

I happened to meet Brad in person a week after I signed the contract to work on the book with Chris. I didn’t know it at the time, but the book I was working on used to be the textbook used for the iOS programming class at MATC. That definitely made an impression.

Six months ago, I had a couple of conferences that I knew I would be speaking at. I wound up doing twice as many as I thought I would. My first conference talk was less than a year ago. This year I spoke at ten conferences total.

Between writing a book, traveling all over the United States, and getting a job with one of the best programmers in the world working on robots, my head is spinning. There are so many things I thought I might get to do a few years down the road. I just wanted a job to get some experience so that maybe one day in like five years I would be able to work with someone of Brad’s caliber. I hoped that maybe I would be able to work on a book in three years.

I looked back at the goals I set for myself at the beginning of the year. No, I didn’t wind up starting a podcast or buying my MIDI wind controller (however that is on the horizon). I set out six long-term goals that I wanted to do in the next 3-5 years. I have knocked half of those off in 2014.

Depression

Oh brother I can’t, I can’t get through
I’ve been trying hard to reach you, cause I don’t know what to do
Oh brother I can’t believe it’s true
I’m so scared about the future and I wanna talk to you
Oh I wanna talk to you

I am going to be honest. I had absolutely no idea how to proceed from here. Part of being alive is to strive to go further and do better. Once you get to where you want to be, what do you do? I always feel a bit of a disappointment when I finish my cross stitching projects because I keep feeling like I will feel a sense of accomplishment, but it’s always a letdown. I enjoy the process of making the thing more than the joy of accomplishing them.

Part of my excitement about these long term projects was the anticipation of all the neat things I would get to do between then and now. I was really looking forward to all the neat stuff I would get to do and all the time I would get to spend working on my craft.

None of that happened.

Things happened so fast that I haven’t had a chance to enjoy anything I have been doing. I haven’t had a chance to stabilize the ground under my feet. I haven’t had a chance to really dig deep into something than interests me because I am running around like a chicken with my head cut off rushing to the next thing.

I have honestly been depressed. I feel like I shouldn’t be depressed and that I am a terrible and ungrateful human being because I got everything I ever wanted. Not only did I get everything I ever wanted, I got it way faster than anyone else. I have it made and I have no idea how to get up each day and deal with my life. Plus I feel like I can’t talk about it because I know that there is absolutely no reason for me to be unhappy.

I had a lot of conference talks lined up for 2015 and I was thinking about doing a lot more stuff because I feel like I worked my ass off sowing these seeds. I hoped that one or two would take root but twenty did. Last year I had nothing but my stubbornness and refusal to quit and now I have the situation of having too much. It feels wasteful to me to squander opportunities I would have killed for a year ago.

But I have to.

It has been a tremendously difficult decision, but I am not doing any conference talks for at least six months. I do not plan to attend any conferences during that time either.

I love this community. I have made so many friends in so many places. I spent a lot of my life feeling like a freak who never fit in anywhere. Being welcomed into this community and treated with respect has meant more to me than I can ever express. One reason it took me so long to make this decision is because this community means so much to me and I want to make sure other people like myself have a chance to join and be welcomed as well. The Klein family has changed my life and I can never express to them what their kindness has meant to me.

I feel like my life is moving too fast and I need to take a step back. I need to focus on getting my feet back under me. I need to focus on doing my job well. I need to focus on sharpening my tools. I need to find something that gives me back the joy and meaning I had in my life back when I was struggling to break through.

The Zen of Sound

Are you lost or incomplete?
Do you feel like a puzzle, you can’t find your missing piece?
Tell me how do you feel?
Well, I feel like they’re talking in a language I don’t speak
And they’re talking it to me

Last year I felt like I had to spread a wide net to catch one opportunity. I spread myself very thin doing a lot of different things to try and get myself enough exposure to find a job. I am pulling back on a lot of these things.

Looking back at my long-term goals, the half that were not fulfilled all had to do with audio programming. I love sound. I wanted to be a sound designer before I became a programmer. Last year I wanted to write a synthesizer app as a portfolio project, but I had too much noise in my life that I couldn’t focus the way I needed to for this project.

Now that I can pull back on a lot of the things that are taking up my time, I can focus my free time on projects that personally interest me without worrying if they will get me a job.

I spoke to Brad when I began to feel overwhelmed about what I should focus on for the next year or so. He advised me to think of something that doesn’t exist and to try and make it happen. He talked to me about taking an impossible task and breaking it down into small, discreet parts that can each be accomplished individually.

Audio affords me a lot of opportunities to explore things that interest me. I became interested in electronics after I began working with physical hardware at my job. I also became interested in math after I started working with GLSL. Additionally, Apple introduced not only Swift, but AVAudioEngine. There have been audio programmers on Twitter who do not think you can do audio programming in Swift because Swift is not built on C.

When I tried to tackle this last year, I had no idea what I was getting into. I also placed a lot of chips on me being able to pull this thing off that caused me a tremendous amount of anxiety.

I am not going to make that mistake again.

I know it isn’t necessary, but I want to build a physical synthesizer before I tackle a software one. I want to get a feel for how all of the pieces fit together.

I also want to spend more time making music with my tools. You can’t really create a piece of software for a group of people if you don’t understand how they are going to use it. I used to play around with this stuff all the time years ago, but it’s been too painful to work with until recently.

I am not going to disappear. I am going to catalog my journey here on my blog. I hope that I can figure out how to do some things that will be helpful to the community at large. I plan to take everything I am learning over this time and present it at NSScotland, which I am still going to speak at. I could not let down Alan Francis again.

I hope that anyone reading this can understand and respect my decision. I hope that I am not the only person who has felt this way and that reading about my depression can help someone else. I am in this career for the long haul. 2014 was a sprint. The journey is a marathon. I can’t keep going the way I am because I won’t make it to the end. I am going to miss all of the amazing people I have met over the last year, but I need to take care of myself and focus.

Thank you everyone for an unbelievable 2014. I am looking forward to coming out of my self-imposed isolation a happier and healthier person. God bless and keep all of you. Don’t have too much fun without me.

Doctor Who: Series One- The Unquiet Dead

smiling
You may or may not have noticed that I have somewhat dropped the ball on my recap/rewatch of the first season/series of Doctor Who. Not only have I been incredibly busy the last month or so, but I was also kind of dreading watching this episode.

The first time I tried to get through Doctor Who, this was the episode that derailed me. The first two episodes were weird but they were good. They had enough good aspects to endear them to me to the point that I was going to continue watching. When I got to this episode and they show a woman possessed by ghosts in the cold open, I was like, “Seriously, are you fucking kidding me!! I thought this was about aliens, not supernatural crap!!”

I quit watching and I had to try a few more times to get through this episode.

Don’t Know Much About History…

One thing that has struck me when I started watching this episode is that I can’t really remember the last time we had a decent historical episode of Doctor Who. In the many River Song episodes she mentions The Doctor taking her to different places and times on her many excursions out of prison, but we don’t have a lot of episodes where our team just travels somewhere in the past for no good reason.

seanceThe last episode I can remember where they went off on a happy excursion to the past was the Donna/Tennant episode where they visited Pompeii. Most of the Moffat-era excursions to the past had to do with whatever wibbly-wobbly, timey-whimey puzzle agenda he wanted to deal with at any particular point in time.

One thing I feel is kind of missing with more recent seasons of Who is this feeling of adventure, of just going to places because they are there. Every episode deals with some kind of universe-threatening crisis that must be solved and it gets kind of tiring after a while. I know in the last season with the Ponds they talk about going on adventures, but we never see them.

We always have the reaction shot of wonder from each new Companion when they realize the TARDIS is bigger on the inside, why did they have to do away with the sense of wonder that comes with having a machine that will take you anywhere in time and space?

I feel like this season afforded the writers one and only one opportunity to tell certain kinds of stories because they could only be told for the first time once. That was one reason I was so impressed that they chose to show the end of the world in the second episode. What impossible story do you tell when you can only tell the first impossible story once? What has significance and meaning? The destruction of the Earth and the realization that everything ends is rather interesting for the second episode of a new show.

Wait, I am off on a tangent about other episodes of this show, not the one I am watching. Sigh. Excelsior.

Gwyneth/Gwen Cooper

There are several actors who have appeared multiple times in different roles on Doctor Who. One of the best examples of this phenomenon is current Doctor Peter Capaldi. He first appeared in “The Fires of Pompeii”, then later in the Torchwood series “Children of Earth.”

gwen6Supposedly, I heard that eventually the series would address the fact that Capaldi has previously appeared on the show in some form or fashion. They may have already but I don’t know about it because I am still behind on the series.

It’s interesting to me to see how they deal with these continuity issues. I believe when Martha Jones was brought on as a companion she mentions having a cousin who died at Canary Wharf as a way to bridge the continuity issue of Freema Agyeman having appeared literally two episodes earlier as a different character.

Eve Myles is the first of three eventual Torchwood cross plants from the main universe. Her character here is named Gwyneth. In Torchwood, her name is Gwen Cooper. It isn’t a big stretch to believe that the Torchwood version of Myles was intended to have been a descendant of this character that she plays. I’ll address the other continuity characters when we encounter them.

Also realized that the weird alien fault line that Torchwood is built over is introduced in this episode. It’s interesting how many seeds for Torchwood are planted in this episode. It’s possible the writers just simply took a lot of stray pieces and repurposed them, but it’s fun to go back and see the trail of breadcrumbs that lead to Torchwood. I went into this episode feeling like it was something of a filler episode, but I am now realizing just how many things that became part of the Who mythos were introduced here.

I don’t think Who should cannibalize itself by only doing Weeping Angels episodes, but it would be nice to see more of the world building they did in the first few seasons where you get a character like Cassandra O’Brian coming back.

Charles Dickens

We can’t talk about this episode without mentioning our celebrity guest, Charles Dickens.

charlesDickensDickens is played by Simon Callow, who will forever be to me the theater owner from Amadeus who commissioned Mozart to write “The Magic Flute.” Interestingly, he also plays one of the idiotic theater owners in the miserable atrocity that was the film adaptation of “Phantom of the Opera.” The other theater owner was played either by Julius Caesar from “Rome” or Mance Rayder from “Game of Thrones”, depending on how old your pop culture references are. Yes, I watch entirely too much British media.

Callow interests me because I have seen him in a number of different things. He is well known for being the funeral in “Four Weddings and a Funeral.” He also published an incredibly comprehensive three-part biography of Orson Welles. He is a fairly well known British prestige actor who either plays characters from Dicken’s oeuvre or Dickens himself. He is just well known enough that everyone has probably seen him in something, but not so well known that you can think of him as being that one guy who did this one thing.

It’s good that Doctor Who got decent actors to play historical figures in the show. More recently, when it became a huge success, I can’t imagine it was hard to get well known character actors to appear, but I believe getting someone of Callow’s stature to appear in the first three episodes was something of a coup for the show.

Period Garb

periodGarbAnother thing I just noticed with this episode is that The Doctor makes Rose change into period-appropriate clothing before turning her loose on the town. Again, this is another thing that the show has kind of crept away from in most circumstances. Usually when the companions travel back in time, they get to wear whatever it is that they normally wear regardless of the time period.

I noticed that Rose has been wearing the same outfit for the last three episodes. I like the authenticity of the costume designer acknowledging that Rose never went home to change her clothes because she impulsively jumped in the TARDIS with The Doctor, plus the fact that most people wear things more than one time. That lends a bit of continuity to the episode. However, it probably has more to do with budget reasons and laziness than actually putting thought into the continuity.

It’s also a nice lampshade on the show for The Doctor to claim he has changed because he changed his shirt. The Doctor always wears clothes on the same theme even if certain aspects of the outfit like the color of the suit will change.

Girl Talk

There is a wonderful scene in this episode where Rose and Gwyneth talk about their jobs and how they hated school. There are a number of scenes like this one from various episodes in the Davies era. There was the one from the previous episode where she talks to the maintenance person and one where Martha Jones is trying to get The Master’s nurse to swear in front of her.

GwenCooperFor the most part these scenes don’t really drive the action forward very much, but they do serve a great purpose in establishing that no matter where or when you are, people are not really all that different. An alien at the end of time still has the same thoughts and feelings as a doctor in the twenty-first century.

These scenes can only be done with the companions because they are a very human aspect of the show that The Doctor just doesn’t fulfill. The Doctor will protect and save humanity, but there is never any doubt that The Doctor is not one of us. He is not human. He never will be. He can like and respect his companions as people without ever really being one of us.

When Rose changes into her period garb, The Doctor is shocked and tells her she looks beautiful, for a human. That kind of sums The Doctor up in a nutshell. He can enjoy the companionship of Rose in an aesthetic way without ever really feeling an actual, real connection to her on a human level.

I currently have my pug sleeping on my chest. I love her and enjoy feeling her fur with my fingers, but I never for one moment think that we are on the same level. It doesn’t mean that I don’t love and care about her, I just know that we are not the same and we never will be.

Nature of Humanity

I find the nature of the conflict between Rose and The Doctor to be fascinating. The aliens asking to use the bodies of the dead is an interesting morality question.

Our culture sees the defilement of dead bodies to be an atrocity. But, if you see it from The Doctor’s perspective, whatever made those people who they were is now gone. We throw away millions of viable organs every year because people need to opt in to organ donation programs and many times the organs are either unusable or the doctors are too worried about being sued to harvest them.

GwenGhostIf you look at things logically, it should make total sense for us to let these aliens inhabit dead bodies. However, on a basic human level, we see this as abhorrent. It seems like a cop out at the end when we discover that the aliens are actually horrible people and we can feel good about denying them access to the bodies.

I also wanted to address Gwyneth’s death. I am a sensitive person. I am hurt very easily by other people’s pain. One struggle I personally have is trying to separate other people’s pain from my own. I keep feeling like I can take their pain from them and that they will feel better, but you can’t do that. Everyone has to experience their own pain.

Gwyneth’s willingness to allow herself to be a conduit for these aliens spoke to me because I could totally see myself doing the same thing. I would feel like I was special, or chosen because I could help save these angels and I would allow them to destroy me. I have done that before. There is something intoxicating about feeling like you are the only person who can help someone that sets you up to be in a position of being damaged by forces you don’t control. Extreme empathy can sometimes feel like a gift, but it is a gift that brings destruction if you can’t learn to protect yourself from its consequences.

Assessment

This episode isn’t as bad as I remember it being. I was kind of dreading having to watch this episode after the great one we just had and knowing the great episodes coming up before the end of the season.

I guess the thing that kind of makes this episode for me is all the breadcrumbs that would be picked up for Torchwood. I know other people don’t agree with me, but I don’t feel like the past few seasons have had the same world building that these first few seasons have. Introducing Danny Pink to be Clara’s boyfriend and to set him up to be sacrificed at the end of the season is different than having a few recurring characters who show up over several seasons.

I had also overlooked the plot point where everything hinges on Gwyneth’s embracing of her destiny to be destroyed by the angels. As much as The Doctor and Rose disagreed about whether it was moral for the aliens to inhabit dead bodies, if Gwyneth had not agreed to be the conduit, the argument would have been moot.

This is a pretty solid episode. The writers probably did right by going back in time. These first few episodes lay the ground for everything that comes after it. I think writing a critical assessment of this episode gave me a better understanding of the emotional resonance of the episode.

Up next, we have “Aliens of London.” We get to see the fallout of Rose’s decision to jump in the TARDIS and follow The Doctor to the end of the world.