Today in computery things.

Success! I sorted out a git merge problem all by myself and it worked! And wrote some unit tests in Xcode, thanks to Natasha The Robot!

Fail! My mac had two kernel panics today. The first time I suspect Xcode because it had been a bit crashy, but it wasn’t running the second time. So I’m now side-eyeing Spotify and vagrant.

Neutral, followed by hilarious! I thought of a Zulip feature I wanted to add that I thought would be pretty quick to do because there were examples in other parts of the system for all the required ‘chunks’ (display sublist over here, find all PMs over there – should be a pattern matching exercise. And it was, at first, as I added code and tested it in the Chrome dev tools. (Have I mentioned how freakin’ ecstatic I am to have access to a proper debugger in a browser? I learned about it two weeks ago and I still catch myself giggling with delight). Then all of a sudden Zulip completely stopped working. So I undid my most recent change. Still busted. Undid the previous one. Still busted. Here’s where I start shaking my fist at dynamically typed/interpreted languages that don’t have compiler errors. I worked on it for a while and finally sent up a flare, asking for anyone who knew python well and the Zulip codebase at least a bit.

A fellow Recurser came to my aid and I started walking him through my code, talking pretty quickly until I saw the look of confusion on his face. I asked him what wasn’t clear and he said “I thought you said you were having trouble with python. This is Javascript.”

He was, of course, correct. I had been working in Javascript all afternoon (c.f. delight for the Chrome debugger above – bit of a tip-off, eh?). I just had been so used to working in the Zulip back end, which is written in python, that my brain had set WORKING_LANGUAGE=”python”. I mean that context was well and truly set, to the point where I had looked up the best way to determine if a python Dictionary contained a key and written some code in that format. But I had deleted it before saving & running it because I’d realized I didn’t need that check.

I don’t know if it’s a good thing or a bad thing that I can work in a language without knowing which one I’m in (in truth, I tend to base so much of my coding style on the style of the code that I’m modifying that it’s not terribly surprising) but I’m guessing it didn’t boost my credibility very much 🙂

At any rate, I have fallen back to what all of us with more than a couple of year’s programming experience do when we hit these types of errors-that-can’t-be-possible: copy all my changes somewhere else, grab a fresh copy of the pre-modified code, and reapply each tiny change one by one, testing & committing after each change. Same as it ever was.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s