Month: October 2014

Clarity Through Static Typing

I can’t seem to find much discussion online contrasting dynamic and static typing as teaching tools. Others have covered the technical merits up and down, but I wanted to make a case for static typing for teaching new programmers.

It’s true that it’s easier, even necessary, to elide abstract concepts like types when first starting out. Dynamically typed programming languages (like Python, Ruby, or JavaScript) allow learners to get started quickly and see results right away. It’s important not to underestimate the importance of that quick, tight feedback loop! While getting started, students don’t need to know that “Hello World” is skating on layers of abstractions on the way to the screen.

At the risk of veering into criticizing dynamic typing itself (which isn’t my intention!) languages like Ruby and Python unfortunately also lengthen the feedback cycle between making certain kinds of mistakes and seeing an error produced from them. In the worst cases, the error becomes much more difficult to understand when it occurs. Testing becomes crucial to ferret out these kinds of errors.

That’s a relatively minor concern of mine, though. I’m more concerned about what happens when a student turns into a new programmer interacting with a non-trivial system. It’s inevitable that a new programmer will have to learn an existing complex system—if not on the job, then at the least while learning a web framework. At this point, she will have to use or modify some part of the system before understanding the whole. In other words, a new programmer will have to point at a symbol or word on the screen and ask, “What is that?”

In a language like Ruby or Python, it literally takes longer to figure out what a variable on the screen represents, and it sometimes requires searching through many files and holding many abstractions in your head to understand any non-trivial piece of source code. Using or modifying a complex system requires deeper and more expert knowledge of the system. It’s for this reason that I feel static typing helps peel away abstractions. It also makes information about the system more explicit, closer at hand, and more readily searchable.

I find it ironic in the case of Python especially. “Explicit is better than implicit,” say the Pythonistas—except when it comes to types?

Disclosing

I’ve dog-whistled this relatively loudly already, but just so everyone’s on the same page—I have a transsexual history. Reach out to me privately if you have questions, but I’ll cover a few points here.

  • To clarify, I’m a woman, and I consider myself transsexual. Specifically, I say I have a transsexual history. I also consider myself homosexual, attracted primarily to women. I consider intersexuality as part of my history, but I don’t claim intersex as an identity (a really complicated topic).

  • I have a complex relationship with this history, my body, and my gender, which includes a history of activism, lots of therapy, and in general, lots of feelings. Consider the delicacy this implies if engaging me on the topic.

  • It’s cliché, but if you didn’t know my history before, this changes nothing you know about me.

  • I prefer to retain whatever control possible over this information. I understand this post constitutes a public announcement, and that necessarily means I’ve sacrificed most control, but when possible, avoid assumptions about my history, my body, or my gender. Point people to me for clarification or questions.

I’m doing this now for a few reasons.

  • First of all, I trust the people around me in my life and in my work enough that I feel this disclosure won’t risk me bodily, psychologically, or financially.

  • Also, it’s pained me for a very long time to keep the amount of distance I need to dissimulate my history. It’s prevented me from explaining much about why family isn’t in my life, why I’m in Portland in the first place, or what my life has been about in the past.

  • It frees me to pursue medical interventions without having to come up with a weird cover story.

  • It gives me a voice, once again, on issues of transsexuality and gender which I used to self-censor out of fear of speaking out.

  • Finally, it reaffirms why I did this in the first place. The goal was always to look and feel more like who I’ve always been, not just to sell an identity or history to others.

Most of the Mistakes

When I interviewed at Simple, I wanted to get across one very important thing—if I got hired, I would begin by making every possible mistake, but I would only make each mistake once.

I think enough time has passed that I’ve managed to make most of the mistakes I needed to get past feeling stuck. Five months in, and I’m finally feeling like I’m contributing steadily. My world at work has also widened, putting me in contact with other teams.

One of the major shortcomings of my last job was that I found I spent so much time helping with maintenance that I never got to create things. Programming actually became a rare part of my job. I spend almost every day at Simple actually programming, and I’m really thankful for that. Not necessarily because I enjoy programming in and of itself (that comes and goes) but because I get to have a say in how things work, and I get to help drive us forward.

© 2017 Emily St*

Theme by Anders NorenUp ↑