Category Archives: Programming

Recurse Center: week 8, day 5

Came in kind of late, because I had a rough time getting up, and also I had to stop by the bike shop. Alas, my shifters did not ship out yesterday as expected, but rather today, so it won’t be done til Monday. However, he said he’d be happy to loan me a funky little three-speed if I wanted. Sounds like a good excuse for an adventure. So now I have my fancy lock on a decidedly unfancy bike, and I’m learning about this internal shifter business, and the steering is weird, and it’s good to try new things. It’ll make my bike magic-feeling on Monday, I bet.

It’s almost 4:00 and I just touched my terminal for the first time today, though. Womp womp. Have had some good conversations with folks & am attempting to hand-wave away a headache, though.

On a quest to add git status stuff to my bash prompt, I ended up in a world of mystery and git source code, like the auto-completion script.  Hot diggity.

I worked for a little bit with Tom (it’s his last day!!) on a problem I put away weeks ago (my Pebble Time watchface sometimes gets a square, instead of numbers or letters, for values like “20:00” or “Thunderstorms”), and if I make the font smaller, the problem indeed goes away. At least for the time.

The thunderstorms…that’s another issue that I’ll need to figure out how to test, too (switching my phone’s time manually was a perfect test methodology for time stuff, though).

As it turns out, what I had energy for today was 1) going to get very-late lunch/early dinner, and 2) continuing to modify my bash prompt, and starting to mostly use ANSI escape sequences for the colors:

terminal bash prompt with the command: echo 'this is the best chick party I have ever been to' and emoji of balloons and a baby chick

eta 2015-09-10: what is the above, you ask? I just realized I should add this! Bold part is the prompt itself; the rest is git fanciness that I mostly understand:

. ~/.git-prompt.sh
export GIT_PS1_SHOWDIRTYSTATE=1
PS1='\e[0;35m\]\t \e[0;32m\]\u@\h \e[0;33m\]\w\e[1;39m\]$(__git_ps1 " (%s)")\e[0;22m\]\n? ? ? ? ? ? ? '

# magic git command completions
source ~/.git-completion.bash
source ~/.git-prompt.sh

I also got my git status added in (see above), after a butt-ton of googling and trying things and wondering why things didn’t work and trying other things (there are various pieces of advice/instruction, and most of them rely on you knowing a bunch of stuff they don’t explain. I’m not sure I could even follow my path backward, now, but it works!).

I can’t believe I’m hoping for another air quality advisory just so I can easily write and test some code to print that in my weather script.

It’s also karaoke night, so it’s time to get my song on.

Recurse Center: week 8, day 4

Actually left early enough to get in and have some time for myself! However, my rear shifter started acting up a bit on the ride home last night (shifted fine in one direction, shifted unsatisfyingly in the other), and it turns out I snapped a spring. Welp. Early => late. I tried. And tomorrow, I’ll have new bar-end shifters, which are not nearly as subject to the whims of “we don’t really make 9-speed things anymore” and haven’t changed in approximately ever. The bike shop dude also mentioned that they’re less prone to failure, easier to fix, and less appealing to thieves. Onward, then! That’s what my bike Goal within Simple is for, anyway.

Forgot I’d signed up for Mary’s “git from the inside out” talk/workshop, and while by the end of it I was a bit tired (and toasty; that room gets really warm really easily), it was really delightful to start digging into the guts of git, seeing what happens as one takes different actions. Really appreciated her way of explaining things and choosing clear examples, too. (She had two files, number.txt and letter.txt, each with one character inside, and the changes were a => b, 1=>2, 2=>3, etc.)

Headed back to my little weather utility after lunch, cleaned up some cosmetic stuff.

Oh! And last night, Nathan helped me figure out why I was getting this dang error with the “daily” summaries (which give the next week’s weather) from Dark Sky:

UnicodeEncodeError: 'ascii' codec can't encode character u'\xb0' in position 70: ordinal not in range(128)

Turns out it’s the degree symbol that pops up in the weekly summaries:

Light rain on Sunday through Wednesday, with temperatures rising to 88°F on Sunday

Solved! I knew how to fix it (and had), but I didn’t know why the error had popped up in the first place, and this explained it.

Finally felt the pull of the emoji, too. I’ve temporarily got a little snake on my bash prompt. And a bunch of stuff I’ve been meaning to do for ages.

Before:

phenix:tinyweather liene$

After:

timestamp, liene@phenix, full file path, snake emoji

For the curious and tentative like me, my PS1 variable in my .bashrc file, which sets your bash prompt, looks like this (googling “ps1 options” was super fruitful!):

PS1='\t \u@\h \w\n?  '

Broken down into pieces:

  • \t adds the current time in HH:MM:SS format in 24 hour time, as is right and proper.
  • \u is the current user’s username.
  • @ is literally just itself here, not doing any wizard things at all.
  • \h is the interesting part of the hostname (ugh, I don’t need a .local on my own machine — that’s what \H does).
  • \w is the whooooole current working directory’s filepath, with $HOME abbreviated with a tilde.
  • \n is a plain ol’ newline, because this stuff is getting gnarly long and I still want to TYPE commands after my prompt!
  • and then there’s the snake emoji, which can be rendered so many different ways. Look at it. Just snakin’ around. I love you, snake. Even if I later replace you with something else.

So much better.

Anyway the point is that I want to get emoji into my weather app, and I fell down a rabbit hole, and they ended up in my bash prompt instead (or in addition, as soon as I get them added).

SPOILER ALERT THIS HAPPENED

Um, so it’s kind of the best to ask my computer, from the command line, to go fetch the weather and then print appropriate emoji.

Also then I got SUPER WILD and decided to actually present my stuff? We have presentations at RC on Thursday nights, 3-5 minutes long, so I actually made slides and talked in brief about my project and omg. That’s the first presentation I’ve given since Open Source Bridge 2012 (!).

Aaaand it’s Tom the facilitator’s last day (mostly), and so we said nice things and toasted him! I will send him some nice words later (Inbox helpfully decided that the email asking for these nice comments could be auto-archived, which, ugh). Bummed that he won’t be around for our last four weeks, but so excited to see what he does next.

Recurse Center: week 8, day 3

Got in a tiny smidge early, and sat quietly in one of the new beanbags for a bit & looked at the books. Had nice quick check-ins (yay! my favorite). Felt like I actually had something to report, which was weird and neat.

Ended up re-intrigued by the bookshelves right afterwards, and fell into a book called Hipster Business Models. I think I meant to be annoyed? But it was a new book and I couldn’t resist and I fell into reading about a dude who made Yoga Joes (for various reasons that are well beyond “just because,” he wanted to make little army dudes doing yoga poses), and then read about a bunch of interesting, successful, strange little ventures all over the place. (The library here is amazing. I already almost miss it. Even if one spent one’s whole batch reading books one found interesting, there’d be so much left unturned.)

Had largely worked my way backwards through the book, and then discovered the table of contents, which listed something about…Hacker School. Of course! And so I learned some more things about how this strange, amazing place came to be.

Some non-zero hours later, I emerged in search of food or computers. It was one of the most satisfying mornings I’ve had in a long, long time, though, and I’m hoping I can remember that.

Had coloring club again, and we took it to the coffeeshop, and I made a postcard (blank postcards! so good! you can write on them and make a tiny art and then send it somewhere!), and then I came back.

Worked on my tiny weather utility a little bit more, and actually got some functions pulled out to do some things (instead of a just-go-down-the-page-and-do-all-the-things program, which it previously was).

So fun! It now prints out current weather for RC, or a few other places I’ve defined. I love it.

Heading to Hack && Tell tonight; excited to hear people talk about things they’re excited about.

Recurse Center: week 8, day 2

Wasn’t late! Woo. (But not by much; I got a fast hissing flat on the way in and walked the last handful of blocks.) Thinking I might need to start up sitting group again, if only for myself. It really helped me get here a bit earlier, and start the day on a good and successful note.

It’s like my brain is in quicksand this week. Every once in a while, I manage to fling up an arm or two (much like my experience in the ball pit, come to think of it), but it feels almost impossible to get more than that above the surface. And then I sink back down, and it’s not so bad, only not much can happen down there.

But I got out of the ball pit. Several times, in fact, in the course of a half hour. Maybe I can eventually lift myself out of this as well. It might just make my muscles sore. Nothing I can’t recover from, and it’ll make me stronger.

I find a lot of solace in metaphors.

Joined the new little statistics study group, which is awesomely beginner-friendly. Alicia’s taught a bit of Bayesian statistics before in an intro CS class (for quite some time, if I remember correctly), and some other folks appear to have some experience, but I don’t feel entirely out of place yet. Just like I need to practice reading more often.

In any case, we’re working from this book, which looks kinda fun. Got a bunch of things installed in a fresh virtualenv, so PyMC and Numpy? and Scipy and Matplotlib are all like <3 <3 <3 in my terminal.

 

Headed back to my little weather thing. It currently displays a couple lines pulled from the Dark Sky API, which makes me feel powerful and awesome. But that’s hardcoded.

I want to make it a little more extensible for myself (though I’m not concerned about making it generalizable for everyone), so I started looking into what one needs to do to use command-line flags and stuff. Turns out Python’s argparse is happy to help! And of course there’s a concise, friendly tutorial. Also I finally figured out how to display code inline on WordPress (control option x). YES.

Took me forever to figure out what the difference is between defining optional and positional (mandatory) keywords. Deep in the docs, I discovered that when using argparse, anything with a – (dash) at the front is optional; anything else is positional. Well crap. That’s not so tough. Yay!

Got on a good roll shortly before the jobs talk for the evening. Hoping to take some of this momentum into tomorrow. Ended up having really good conversations with Steve and Shad afterwards, continuing my trend of “never go home on time, be grateful for having such a flexible and understanding partner.”

Recurse Center: week 8, day 1

Missed check-ins (again); this did, however, give me a good opportunity to talk with Seth about being slightly late, and also feelings vs. programming (or feelings AND programming?) at RC. (The things you can talk about when waiting for water to boil!) In conversations I keep having with Recursers and alums, I am struck over and over by how often people cite the emotional component of RC as the (or a) part that was really important for them. The programming part is important, and it’s an amazing programming community, but this is also an intense experience feelings-wise. That’s not bad; it just encourages certain kinds of personal development in a way that I’m not used to. It’s hard. And I like it.

I also had feelings about check-ins in general and had a really good chat with facilitator Allie about last week and this week. She also has a rad keyboard, and talked me through a little bit of how to get started on my super mega dream sidewalk stamp project. The sun is shining. Maybe this is the week I start on that, just a little bit.

Played in the amazing ball pit upstairs (Jump In!); it’s going for a month, and it just started Friday, and it’s all but sold out already. And it rules. It’s exquisitely hard to get back up again, once you’re far down enough, but it is super fabulous. I jumped and swam and was generally ungraceful, and it was a blast. Went with a bunch of other RC folks, and then there were a couple people we didn’t know with a selfie stick. Takes all kinds.

Having a heck of a time focusing on ANYTHING. Tom asked me twice today if I wanted to pair on anything or if I had any questions, and the second time he said “weather” and my brain went “YOU WANTED TO PLAY WITH THE DARK SKY API” and anyway now I have a tiny little Python script that pulls weather from Dark Sky, and it’s a little fabulous. I’m going to make it fancier.

Also, he got me to try BPython, and it’s kind of amazing and magic.

Mostly continued bouncing off the walls of distractibility, but didn’t have to go anywhere for the Monday night talk (thanks, gas leak at eBay?), and new resident Li Haoyi’s talk was informative, hilarious, and a lot of fun. I would easily go see Haoyi speak somewhere now, regardless of the topic, just to watch him present.

Got my new laptop stand, but not my keyboard. Ordered the awesome one that Allie has and paid a few bucks extra for one-day shipping, because the future is weird. Looking forward to having a reasonable and healthy standing solution.

Recurse Center: week 7, day 3

CW: weird situations with strange men

Got home late last night after a truly bizarre and unsettling first experience with Lyft, wherein a ride home took way longer than necessary, and included:

  • more bridges than necessary (Queens => Brooklyn does not involve the Williamsburg Bridge)
  • an illegal u-turn in a fair amount of traffic (after attempted illegal left turns)
  • repeated assurances that I would be there in however-many minutes
  • the driver asking me if I could maybe look up the directions on my phone? then commenting that they looked the same as his, but asking if he could use my phone to navigate instead, and so he took my phone with 11% battery left and I realized I had no recourse if anything went wrong, and wasn’t sure I’d be able to make my way home from wherever we were
  • getting home safely in about twice as long as it should have taken

Anyway, that + more loss yesterday didn’t exactly make for a rad night of sleep. Took forever to crawl out of bed, missed check-ins, figured I’d get in and get down to business…and didn’t so much. Mostly just read a lot about what folks have been saying about Sheryl.

Headed back to the Khan Academy SQL resources, which I was loving a lot this spring, even though I only got to do them an hour or so at a time. Looking forward to having more freedom with my time, and I think the structure will be really helpful for me right now.

Didn’t get a lot done, but did more than nothing.

Also hosted the inaugural RC Coloring Club, which is where you bring yourself and the desire to color something (and maybe something to color), and then you color it, and it was awesome.

Ended up having a really good conversation with a fellow batchling about grief, cancer, art, death, New York, comedy, and the advantages of a big city if you are, or are feeling, introverted. Not so much with the code today, but we do what we can.

Finished off the day with game night, where I learned MORE new games, which is both unlike me and super fun. Played Coloretto (and kept wanting to sing Bohemian Rhapsody with it; “I see a little coloretto”), and also Batman Love Letter, which is based on Love Letter, but instead of princesses it’s got Batman (five Batmans, in fact) and friends (and enemies). Both games are great and do not take forever, winning much favor with me, and I got to hang out with great people while playing them.

What I did:

  • Studied some SQL for the first time in several months.
  • Hosted coloring club.
  • Finished the “You don’t have to be good at everything” page in The Affirmations.
  • Talked about important things with a great person.
  • Played games with good people.

What I learned:

  • How to play two new games!
  • Sometimes it’s better to talk about feelings than bro down and crush some code.

Questions I have:

  • Nothing articulate. More weird handwavey “is there a way to predict what grief will do?” and “what happens when grief is compounded by more?”

Recurse Center: week 7, day 1

Week 7! How is this possible? And am I going to say this every Monday from here on out?

New batch joined us this morning, so I’m trying to let go of that feeling that I should have Done Real Things with my morning. The supposed “real things” (involving bro-ing down and crushing some code?) didn’t happen. That’s okay. I’ve already met a handful of the new batch, and they’re awesome and have interesting and diverse backgrounds. Looking forward to getting to know them a bit better.

Brought in my new copy of The Affirmations Colouring Book (purchased at Bluestockings on a wandering post-dinner adventure with MelissaIan, and Nathan this weekend), which I’m leaving with RC, because coloring affirmations is pretty fabulous, and everyone here should get to do that if they’d like.

Went on an adventure to Soho Art Materials to pick up colored pencils & a sharpener to facilitate coloring the coloring book (also planning to leave them here). This last week has had a lot of “I want this crafty thing, but I do not want to own it and hoard it” (coloring stuff and also friendship bracelet materials: turns out they’re still a blast, because I am 7), and it’s kind of fun.

Wrote two blog posts (what!). Was baffled by reading the same programming resources I was working from last week, which wasn’t an awesome feeling. Went for a walk to acquire the aforementioned colored pencils. Partly colored one of the pages in the Affirmations book. Realized it was already about 6 pm, which seems absurd. Wanted to get More Code Done today, but hey, not all days can be mega productive.

In summary:

  • What I did:
    • I shared a piece of advice with the new batch.
    • I wrote three blog posts (including this one).
    • I colored part of a page of the Affirmations book: “You don’t have to be good at everything.”
    • I led a little lunchquest to Sweetgreen (we had a gluten-free person in our group, plus me the vegan, and SG can feed both easily!), and I didn’t get us too lost, and I got to spend time with three new batchlings.
    • Went to the Monday night talk, which was awesome and went at about 300 mph.
  • What I learned:
    • Focusing on code; trying to interact with a bunch of new people…Possibly mutually exclusive?
    • Just because I’ve understood something before doesn’t mean I understand it today. And that’s okay, because I suspect it might work in the other direction, too.
  • Questions I have:
    • Not really anything outstanding at the moment.

Some thoughts on starting your Recurse Center batch

This morning, our Fall 1 batch joined us, and us Summer 2s were invited to share a piece of advice. I have been thinking about this for about six weeks, and there are a number of things that have felt important to my own path here. I shall now attempt to enumerate some of them.


There is an incomprehensible amount of freedom here. Maybe this is familiar to you, in which case enjoy!

But maybe you’re like me, and this is new and weird. That’s okay. You will spend a lot of time here doing programming-related things, and it’s okay if some of the rest of your time is spent exploring what it means to choose your own path. Does it feel scary and overwhelming? Also okay. This is one of the best places you will ever find to struggle. You will get stuck a lot as a programmer, and that’s not a reason to stop working at it; it’s just part of the process. You’re not alone, and there’s help all around you, if you want it.

Seek out what excites you, and chase it. It does not matter whether it would excite someone else.

Ignore what bores you. You will rarely have the opportunity to do this in life, and it supports the above.

Take time to take care of yourself. Some of the things this has meant for me:

  • Take a walk.
  • Do something tiny you can succeed at (I still go back to Codingbat sometimes for little quick wins).
  • Remember to drink water.
  • Remember to eat food.
  • Take a nap in the library nook, or in Church (the room, not the institution).
  • If you have a terrible awful night of sleep and Cannot Even, it is okay to go back to bed, even if you usually hate to do so. Being here on no sleep won’t be very productive anyway.
  • Ask for help when you’re stuck. This includes, but is not limited to, code and feelings. (Don’t mind sad stories? Ask me about the time I sauntered up to Tom and Mary and said, “soooo, who wants to talk about grief and creativity?” It was the exact right thing to do.)

Write a little every day about what you’re doing. You will be amazed at what you got done while you didn’t think you were “doing anything.” Write it in a little notebook (you can get a cool one for cheap right downstairs at Muji!), write it on a blog, write it in a text file on your computer, write it in emails to a friend or parent or yourself…a little goes a long way.

Jeff suggested writing down what you did, what you learned, and what questions you have each day, and I’m thinking I’ll adopt the same scheme for my own notes from here on out.

Plus, it’s really handy when someone (including you!) says, “so, uh, what have you been working on?” A coworker caught up on a month+ worth of my news without me having to say anything extra, and it felt terrific.

To the best of your ability, do not compare yourself to other people here (I struggle with this one constantly). There are people who are more experienced and people who know more than you, even if you are used to being one of The Smart Kids. But guess what? You are one of these people, too, and you have things to offer and share. It’s okay if it takes a while to figure out what these things are. Be open to the possibility that you are awesome.

You have twelve weeks. Do you want to do something big and impossible-seeming? Maybe you really want to work through a particular book or project. If you do a little every day (or even most days), you can get through all kinds of massive things. A couple of the summer 1s, April & Caroline, read the whole Learning Python book while here, one morning hour at a time. That thing is a beast! I’m so impressed (and inspired!) by their tenacity and commitment.

 

And of course, this: all advice is autobiographical. If someone gives you advice that doesn’t seem relevant to you, throw it out for yourself.

Building a LEGO model is like learning programming

Last night, I finally started putting together my LEGO birds set. I mentioned this in a Recurse Center post recently, and now I have put together the robin (a proper one, as one finds in Europe, not the North American one, which Nathan taught me was so named because of its superficially similar appearance, and it turns out the similarities end there). Two more birds to go.

Also, it’s awesome. Check it out! You can also enjoyed horse-tailed desert-ponytail mustachioed person, who is hanging out on the robin’s tail! (What’s the fun of awesome minifigures if you don’t mix them up in ways not originally intended?)

And then I opened my mouth and said this:

And it turned out that people were curious about this thing I find fascinating.

So.

As I was putting together this first model last night, the first of my adult life, but also the first LEGO kit I have ever built in my whole life (although we had a big bucket of LEGO as kids; my brother and I fought over them regularly), the following kinds of thoughts kept occurring to me:

  • I should be learning more about how these pieces fit together. There are techniques I could use later.
  • Something isn’t quite right. Oh crap; did I just forget a piece? I did. Time to take another look and check my work.
  • I’m just copying what someone else has already made, but it feels like I am building something myself?
  • I can’t possibly learn all of these methods tonight. I don’t even remember what I did two pages ago.
  • I am definitely missing a necessary piece. I’m completely blocked. Oh no, wait, it’s right there.
  • I don’t know how to make a bird. I only know how to snap two pieces together at once.
  • Holy crap; I built a bird?

All of the italicized ones above are thoughts I have had while learning to program, too (especially at the Recurse Center, where it is cool to understand why and how things work, not just that they work). Some of them are a little more metaphorical when we bring them back to programming (I have yet to build a literal bird in code), but they’re still true, and this occurred to me by the time I was building the bird’s invisible innards.

What’s interesting is I felt very sure about the fact that I was building something myself, and that when it was done, I would feel confident saying, “hey, yeah, I made this thing!”

I often don’t have this feeling with programming (at least, not yet). When I build something, it’s because I’ve taken someone else’s instructions and made more or less the same thing (lately).

I’ve done a bunch of awesome tutorials lately (I built a Pebble Time watchface that tells the weather! I set up a Twilio number that I can text! I set up a Heroku app, and now the Twilio number talks to it!). But I still have this nagging suspicion that I’m cheating somehow, because I didn’t greenfield them.

The analogy is easy, though: this is essentially the same experience with a LEGO kit.

I’ve been ruminating on why it’s so hard to take the LEGO lessons and let myself feel more accomplished with what I’ve built in Python (and C/JavaScript) so far. Perhaps because it’s not a physical thing, because it feels like something that I could have sloppily copied without any input of my own, it’s hard to take ownership.

But LEGO? I touched every one of those pieces, and I made them work together, and it did not end in a maelstrom of suffering.

And I know that I made something.

Now to figure out how to replicate that feeling with computers.

Recurse Center: week 6, day 5

Came in on my second Friday and am using it to make myself feel accomplished about this week. (So far, it’s mostly been feeling feelings.)

Took a while to get started, but my tiny “hello world”ish app is still working, and I modified it to send an image as well, and it feels sort of impossible to have created something that does this. And then I got it to message me back with my name by telling it my phone number first, and then I fell down the rabbit hole of “why do my git commits without -m open in Sublime, instead of in vim, which I’ve been practicing lately?”

And so I have changed my global git config to open vim, instead of Sublime, for commits that didn’t have the message specified inline (e.g. `git commit -m “mega cool commit message`). Fun! `git config –global core.editor “vim”` does the trick.

Why did I need to do this? Because it’s very important that I make my commits blink, because Ann is my code twin and is an inspiration in terms of “you can learn a lot by doing things for giggles.”

Behold:

Finally properly participated in RC Crafternoon, with a fresh friendship bracelet kit (seriously!) from Purl Soho down the street (thanks for the recommendation, Rachel!). I started AND finished a bracelet in RC colors. What! I don’t tend to think of myself as a person who finishes things, and yet here we are:

Went for a walk with Tim to accomplish Secret Mission Things, and came back to tie up my loose ends for the day and get ready for RC karaoke. I’m super excited about this, and not only because it means I get to do karaoke with 1) people I like, 2) not drunk randos, 3) any song that can be found on the internet.

Onward!