I’ve been working with SPARQL a bunch for my OPW project, and found it very slow going at first. SPARQL is apparently one of those little-loved languages that doesn’t have much in the way of tutorials or lay-speak-explanations online—pretty much all I could find were the language’s official docs, where were super technical and near-impossible for a beginner to slog through. Hell, I didn’t even understand what the language did—how could I read the technical specs?
But seriously. The best thing I’ve done for my productivity lately (besides blocking Facebook entirely on my work machine) is disabling my Facebook newsfeed (this is a Chrome extension, I’m sure there are various others for other browsers). Facebook is still a time-suck, but not the ENDLESS VORTEX OF DISTRACTION AND OOH A BUZZFEED ARTICLE that it once was. Pretty cool stuff!
Congratulations, you’ve made it through Git 101 (
status) and its slightly more difficult companion course, Git 201 (
pull).1 Are you ready to pull out the big guns? Here are a handful of commands I’ve been using lately, which I will now write about on the off-chance that they’re useful to someone else. Welcome to Git 301.
Selective Checkouts with
Okay, this isn’t really changing history. But it IS a fancy bit of next-level gittery that I’ve found useful as I try to make my git history useful to others and actually move in a logical feature-by-feature progression, instead of reflecting my all-over-the-place, distracted workflow.
For anyone who doesn’t know, this past December I started an internship with GNOME as part of OPW, the Outreach Program for Women. The point of this program is to get more women (by which they really mean cis woman and trans folks and genderqueer/genderfluid/agender folks… so basically, people who aren’t cis MEN) involved in the FOSS world. In my particular case, it certainly succeeded! I’d been meaning to do some open source contributing for a while, but had always been too intimidated and overwhelmed to start.
Rules and resolutions for myself during OPW:
- wake up at the same time every day.
- eat breakfast every day.
- eat lunch. Seriously, eat lunch.
Achievement unlocked: accessing a USB disk via terminal!
Accessing a flash drive from terminal seems like it ought to be simple, but it’s varying degrees of a pain on different OS’s. It also seems like something I should have learned ages ago–especially considering that when I first started terminal-ing, Allison Kaptur’s advice to me was to quit Finder cold-turkey until I could do everything I wanted to do via terminal. Anyway, for anyone who’s a little confused by this, it’s actually pretty easy.
The other week, I chatted with the fabulous Liz Starin and picked her aesthetically-enabled brain about fonts and layouts for websites. Below is some stuff I learned from our design adventures, both wisdom straight from her and stuff I picked up from my experience overhauling fonts and layout:
So, I made a program to do that! You store a list of students for a given class period in what I called the
roster (just a dictionary of students). Each
Student object keeps track of the number of times it has been selected and its probability of being selected in the next round, as well as whether or not the student is absent.1 It took me a little more than a week to finish, as I was still muddling through Python as I went, and at the end, I had a working final product! A rough one, but a working one! And then I went off on my merry way, doing more and varied projects and slowly building up my Python chops, getting code review, etc. Somewhere along the way, so gradually I didn’t even realize it, I began to feel competent, like with enough time to think and maybe a little Googling, I could Python my way out of most problems that were thrown at me. And so today, back at Hacker School for Alumni Thursday and itching to write some code (because I’ve been up to my neck in web work for the past few weeks), I opted for a blast from the past, and dived into my very first Python project to poke around, refactor, clean up, and chronicle what I found and what I had learned in the past four months. Here are some findings, accomplishments, and reflections.
(If you’re confused, see my previous post on my Markov generator adventures.)
The other thing I got up to today was implementing some sort of (questionable) part-of-speech-based intelligence. The idea was to have a dictionary for parts of speech, in addition to a dictionary of words. Then the work flow would go something like this:
- start with a random seed
- what part of speech should come next? Given the POS’s we already have, pick at random one that might follow it.
- given the words we have, pick a word that might follow of the correct part of speech. If none exists, repeat from step 2.
Now, using word trigrams and POS trigrams, the above process doesn’t really add much beyond what using plain ‘ol word trigrams gets you. Could I make something better, though, by using, say, 4-grams or 5-grams of parts of speech?
Man, I’ve hardly written code in three whole weeks! Such a strange feelings, after 3 solid months of coding. Anyway, back at Hacker School for the day, and with my OPW application in, I’ve been itching to actually write some code, so I revisited my old Markov generator project, which takes a training corpus and generates psuedo-random texts in the style of that corpus.