Our move is this Friday, and my next Code Fellows class starts up the following Monday. So, I am calling last week and this week “spring break” for sanity’s sake. Back with more content next week if not sooner!
Meanwhile, I’m wrapping up “Introduction to Computer Science and Programming Using Python,” a MOOC that comes to a close on Tuesday after nine weeks. Even with some serious slacking/re-prioritization the last few weeks, I’ll complete the class with at least a 57%, which is a passing “C” grade. With a bit of effort into the final exam, I’m hoping to hit 65% for a “B.” And a great thing is that you get to keep access to the course after it ends, so I’ll be able to catch up on what I missed eventually (after all, this is about the learning and not the grade).
Personal update: Josh and I signed a mountain of paperwork yesterday and are just waiting… waiting…for JUST GOT final notification that we’ve closed on a house here in Seattle. This process has been nail-biting right up until very end. I sold my house in Houston back in October and we were outbid on a house in Seattle earlier this winter. That turned out to be a blessing because it enabled me to leave my job and for us to still qualify for a (smaller) loan on Josh’s income alone. All in all, we’ll be paying half as much each month on our mortgage as we’re currently paying in rent, and moving from a land of faceless high-rise condos to a wonderfully diverse neighborhood with an invested community. Anyway, the house buying process is a lot different from 2010, when I bought my house in Houston. More paperwork, more disclosures, and more “we’re all set just waiting on this oooooone little make-or-break thing….” It may sounds nuts but trust me that rent here is no joke, and *buying a house* is going to *save us money* in both the short and long-term. Crazy, I know.
So, that’s been taking up a lot of my time and mental energy. But we’re excited!!
No new work to share… but elsewhere online, here’s some stuff I’m paying attention to: Continue reading
HARD TRUTH #1: Recursive algorithms: you have to learn them.
@marythought pretty often, unfortunately! recursive algorithms are important.
Colin is a bad-ass programmer and when I questioned the relevance of this Python McNugget quiz question he shot down my hope that the question was an outlier. You can google for more, and here is Colin’s proof that 43 is the highest possible “non-McNugget number,” if you are interested: click me for McProof.
In a nutshell, recursive algorithms look like this:
def recurPower(base, exp): //this defines a function 'recurPower' that takes in two numbers and returns base^exp
if exp == 0:
elif exp == 1:
return base * recurPower(base, exp-1)
It’s tricky to conceptualize the idea of using a function *while defining that function* but that’s how recursive algorithms work. This one is about the simplest they get, it’s all downhill from here.
HARD TRUTH #2: Programing == Math.
I will admit to purposefully not turning in this week’s Python assignment about looking at programs and analyzing them for efficiency and efficiency’s opposite, complexity. An example is: how many steps will it take the computer to execute this program? And while it would be lovely to be able to answer “1” or “42,” the answer is usually something more like “5⋅log2(n)+2008.”
Complexity impacts run-time and memory usage, all stuff that programmers need to care about, I suppose. Conceptually, I can understand that a more efficient program is going to mean the difference between your lightning fast web application beating out the slower competition. But as I’m still learning, I skimmed over this lesson thinking: “This is advanced math stuff and it’s tripping me up. I’ll skip this for now. I need to get programs consistently running first, and then I’ll worry about how efficient they are.”
And then look what pops up in the latest Code Fellows lesson:
Yeeeah. Hello, complexity. And do you see that lovely red bar of lowest complexity… what does that say? That’s a log function, friends. That’s MATH.
So, ok. Not to worry. One step at a time. The last hard truth is personal to me, but here it is:
HARD TRUTH #3: Do not go gentle down that web development path.
So, what now?
Make programs. Get them working. Get registered for the Foundations II Python Course. Make more programs. Make websites. Look at job descriptions and figure out what jobs/skills are connected to programming with Python (learn git), learn those skills and find people in those jobs.
…And plan the honeymoon, because that’s important too. 😀
Programmers: what hard truths did you learn early (or late) in your careers? Share ’em in the comments!
finishing the bot
how you have to finish the bot…
how you watch the rest of the world from a window–
while you finish the bot
mapping out a .py what you feel for twitter’s API
what you feel when errors that come through heroku go “tweet status update failed on third try…”
My bot is now deployed and fully-functioning out in The Cloud, thanks to Joel!
The above link tells the story of how I went from here (functioning bot, living on my laptop) to here (functioning bot, living on GitHub/running on heroku). First, you’ll need to install heroku and follow the directions to get started, here. After that, follow Joel’s directions and you’re golden.
This year I set out to learn how to make twitter bots, accounts that automatically interact with twitter in some way, whether through tweeting set content at regular intervals, watching for and responding to code words, or responding in a certain way when tweeted at. I learned the basics of Twitter API interaction at UW’s Community Data Science Workshop last November, and have since been inspired by other people doing cool stuff with bots.
SNOON: The snoon is much smaller than an average oyster. It lives on the waste of the badger and lives by sour smelling abodes.
A few nights ago, as I was reading about the reunion of the women of Bletchley Park, I clicked through to the Honour Roll and found a database that looked like it might translate well into a twitterbot. Using a subset of data and some internet tutorials, a test bot took maybe an hour or two tops to set up (and I was so thrilled when it worked!). The time-consuming part has been 1) finding a way to reliably keep it tweeting; and 2) pulling and cleaning up the full dataset to fit twitter’s 140 character limit (in my test run, I just told twitter “print the first 140 characters and ignore the rest” but for the full deployment, I wanted to edit the longer bios to make them fit).
Ok, so without further ado, here’s the bot:
Barbara Abernethy (Eachus) Bletchley Park 1939 – 1945. Mansion, Naval Section. PA to Head of GCCS, Cdr Denniston from c 1941. .
Emotional reunion after 70 years for Bletchley Park veterans – I haven’t seen Imitation Game yet, but I did watch (and enjoy) Bletchley Circle. So inspiring to see the real Wrens here reunited and as sharp as ever. Click through the image above to peek at the Roll of Honour. (Also, that looks like it might make a great Twitterbot project… hmmm…)
First, an update on the MIT Python course — y’all, my MOM is taking it too. How cool is that? Mom has a full career behind her in computer programming, technical writing and online learning, and she’s also Mensan-level puzzler, so naturally she is 1) kicking my ass and 2) taking issue with some of the courseware issues (and by extension, other people in the class).
I agree that the “discussion” aspects of the class are not great, something like 1,000+50,000+ people are enrolled so it’s best to take the comments with a grain of salt, and find some support that you trust. Quick aside, the guy who was like: “What is paying off credit card debt?? I do not understand this concept” — maybe has never known debt or has never known credit cards, or just didn’t understand how the question was worded? Anyway it made me chuckle.
So, this MOOC format probably doesn’t take advantage of best practices for online learning. But it’s free and exposing lots of people to something new, so I suppose you get what you pay for. I’d still recommend the class, just not as a stand-alone or a substitution for a full-on college degree (I have one already).
Ok, back to problem set 2 — paying off credit card debt. I am exceptionally proud that I completed all the programs in this set totally by myself, and for something more useful than “find ‘beeeegh.'” SO PROUD in fact that I failed to read the directions and wrote an entirely different program from the one they asked for. My friend Ian commiserates:
@marythought this is actually an *incredibly* valuable programming lesson that real people fuck up on real projects CONSTANTLY (self inc.) — Ian Cox (@dyselon) January 20, 2015