Three weeks have gone by. I still don’t feel like a real developer, most of the time.
But there are glimmers, moments when I do. Usually it’s right after I finish a little script of some sort, or I give a funny name to a variable (while still following PEP 8), or I use a clever shortcut, or I realize I’m writing really opinionated code*. There’s that moment of “YES! I am good at this!”
I’m trying to get better at not experiencing a near-immediate let-down: the realization that what I’m writing is comparatively simple, that most of the developers I work with would write it faster, and that I am still not working in our main code base, yet. (I’m not being kept out of it by anyone else, or even stalling (anymore); other stuff just keeps legitimately coming up. My project is adjacent to that codebase, not really in it.)
People who have been there longer are being super nice and have gone out of their way to say reassuring things. People who are really good developers have let me know that, when they got started in The Big Codebase, they had to ask questions all the time, and the two people who field most of those questions are used to it, from everyone. They remind me sometimes that everybody breaks Something Important while they learn. I tell myself I won’t break Something Important, but my experience in other places suggests that this is a delusion. :) Or, let’s call it “an aggressive goal.” :)
I know that I am learning, and that is what matters. I know that if I keep learning, I’ll be awesome, soon. I even know that what I’m being paid is very much in line with what I can accomplish right now, meaning that there’s no good reason to feel guilty about writing code a little slowly, as long as I’m writing it and learning to write it better. But 1) I am impatient and easily frustrated with myself, and 2) it’s so easy to assume everyone else sprang forth fully-formed as an awesome developer and didn’t have to go through this—(3) almost as easy as it is to assume they’re a million times better at everything than I am, even though we’re all working on different things, so how would I know, and even if they are, I know some non-code stuff that’s been really valuable, so what about that? All of this means that pushing down the negative thoughts, trying not to compare myself to idealized others, and focusing on what I’ve learned are all essential, and all difficult. I work at it. Some days are better than others.
Now I’d like to transition to talking about some of the things I’ve learned, but I’m finding it hard to summarize two weeks’ worth of lessons in a single post. It’s hard to remember what to summarize! I’m going to try, really hard, to share shorter posts more often, or else I’m going to leave off the practice of summarizing the things I’ve learned altogether (which would be a shame, but these lists are so incomplete as to be misleading… and the things I’m learning are getting more complex, so they take more words to convey).
Before I get to the Python lessons-learned, here are a couple of me lessons-learned: A group of my coworkers go to a nearby coffee shop for coffee at 2pm, most days, and I tend to go along. I’ve learned that, if I get a highly caffeinated drink (coffee, rather than tea), I won’t sleep right that night. But I think I’ve figured something else out, too: I need to break up my time differently. Even if I go to coffee at 2pm, I pretty much don’t function right during the last few hours of the day. (I say “few,” because I rarely leave before 6.) On Thursday I stared at a fairly short piece of code for over an hour and got the person who wrote it to walk me through it, and I still couldn’t follow it; then I went home, had some dinner, and opened my laptop. Suddenly, it made perfect sense, and I couldn’t understand what was wrong with me, earlier in the day. So I’m thinking of skipping coffee and taking a longer walk at 3 or 3:30, each day, to see if that clears my mind enough. I’ll feel bad about taking the break, at first, but if it prevents me from being literally useless from 4-6pm, that guilt will fade.
Things I’ve learned – an incomplete list
I was already aware of IPython and IPython notebooks, but I hadn’t played with either one, myself, beyond a tiny bit during Sumana’s [great!] presentation at Open Source Bridge. IPython notebooks are really cool, because you can write Python in your browser, see the output, and then really easily share both code and output without anyone else having to install anything. I use nbviewer for sharing, because I still like to put my notebooks into GitHub. It’s really convenient! A coworkerfriend is pretty into Wakari, where you can create and share notebooks in the cloud. Local or cloud, you can annotate notebooks with Markdown, to make tutorials or presentations or … I guess pretty much anything you want. It looks like it does all kinds of graphing and other neat stuff for sciencey Pythonistas, which is pretty exciting; I need to think of something I want to graph, so I can play with that.
I think I once upon a time knew that functions were first class objects in Python. I mean, I’m sure I’ve read it somewhere. But this week[end] I got to write code that made use of that fact, passing a list of functions into another function, and it kind of blew my mind. In Googling for the right terminology (I wasn’t sure if I wanted the word “type” or the word “object,” which just goes to show how many rusty gaps there are in my CS education), I found this really good explanation from Software Carpentry about how useful this knowledge is. :)
Unicode is hard. The unicodedata module is there to help you, but the whole Unicode/ASCII deal throws all kinds of stupid errors, making me wonder why everything isn’t Unicode, and we don’t just dump ASCII. I’m working on dealing with this better. I know I’m not alone.
JSON > XML. True fact. Deal with it.
I’ve been told “Don’t type the same thing three times,” as a rule of thumb for writing efficient code. It turns out, the rule of thumb is “don’t type the same thing twice,” and there’s a handy acronym: Don’t Repeat Yourself (DRY). That’s kind of cute.
You can install lots of Mac applications from the command line using Cask. It didn’t unpack properly for me, so I’ll probably keep doing it the old way. But, still, that’s neat.
A theme, this week, is “I knew about this but finally got to try it or learn what it’s called,” and the top-level stanza is totally on-theme. It’s another thing Sumana showed me, and it’s super useful! You can write your list of functions, and then you can add
if __name__ == '__main__': to the bottom of the file, with tests or print statements or whatever you want inside it. Whatever you put inside that if statement will only run if you’re running your Python file directly, i.e.
python myfile.py If someone imports your file into their program, say so that they can reuse your functions, i.e.
import myfile … then nothing in that stanza will run (so they won’t have to deal with your tests or your print statements or whatever). I’m probably not going to call it “the top-level stanza,” because I think “if dunder name equals dunder main” is more fun to say. (“Dunder” means “double underscore.”)
Life outside of work
I’m tired a lot.
Some of it might be work, itself: it’s hard on me, being new and not feeling like I’m doing my part, yet. I’ve said before, maybe five years was too long to stay at my last job, and I’m just out of practice at being new to everything. And although I’m not brand new to coding, I’ve never tried to do it for 8+ hours every day, for days in a row, you know? I feel like the 3pm walks will help. I also think walking to and from work will help, though that’s not practical every day. The good news is that this will fade as I get my feet under me and train my brain!
Some of my tiredness comes from living a continent away from my spouse, which sounds horribly co-dependent to say, but, practically speaking, it means I don’t get to talk to him until he gets home from work, at what should be my bedtime, so it’s usually a short conversation; on nights when I’m too tired to stay up, I don’t get to talk to him at all. So, most of the things I would normally bounce off of him are kept to myself. I’m a little bit anxiety-prone, and he balances me well—better than I’d realized, I guess. I miss him, I miss his wisdom (don’t tell him I said that), and not knowing when he’s going to live here with me causes me a lot of stress.
I know some of the tiredness is health-related, too. Not much to do about that. I could probably stand to eat less gluten, but I’m taking B vitamins to help balance that… /shrug
Dale’s also not here to help keep the birds company, so I have some guilt issues around the hours I work and events I attend, since I’m their only caretaker, right now. I try really hard to make sure I’m home at least by 7:30 each night, so the birds have an hour to walk around outside their cages and hang out with me. (Their lights turn off at 8:30pm.) If I’m out past the birds’ bedtime, I try to make it up to them with two hours the next night. This could get really tricky, as we move into sprints at work, also known as “nights and weekends.” … And I know it sounds silly to worry about the birds as much as I do, but I made a commitment to take care of them, and part of taking care of them is giving them the social time they need. Besides, studies show time with pets helps reduce stress, so taking good care of them is also good for me.
Anyway, besides being tired all the time, I’m OK. I like east coast autumn. I like the house I’m renting, though it feels very empty, still. I like Charlottesville! And although I haven’t taken advantage of it, I like being able to drive to DC and various other places where I have friends I haven’t seen in far too long. I’m attending a meeting in Arlington(? – I think?) in October, and I don’t have to get into an airplane!
* Look at how I don’t overwrite a variable in a way that forces it to change type, even though that would totally be legal in Python.