Mary Dickson Diaz

Code, Life, Learning

Month: February 2015

changing environments

What a week!

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

the toggle button that wasn’t

HEAR YE, HEAR YE: I made a thing in which I practice using jQuery and mix my literary metaphors: Rabbit, Run!

If anyone knows how to make the toggle button actually, you know, toggle… please share. Until then it *says* “toggle bunnicula” but what it actually does is “click here for bunnicula forever.”

Related, this exchange with Josh (my partner, a professional game designer):

Continue reading

complexity rules everything around me

Hey Wu-team, Mary here, checking in from the Fields of Distractionville. I spent like three whole days this week dreaming of Greek island sunsets and planning an international trip that may or may not come to fruition. I’d be lying if I didn’t share that I’m feeling a bit deterred. Thus, I  don’t have anything new to share this week except for this music video and some hard truths. (Java-javaScript, y’all.)

HARD TRUTH #1: Recursive algorithms: you have to learn them.

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:
   return 1
 elif exp == 1:
   return base
   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 “5log2(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.

I’ve been wavering a bit on the best course of action for me going forward. After reflection, I think I want to pursue further study in Python with an eye to data science and analytics, what is sometimes referred to as “back-end” programming (systems focused) as opposed to web development which is “front-end” (user focused).  The good news is that Code Fellows has a pathway to making this happen. The bad news is that it’s hard. Like, really hard. And full of math. There is less precedence, programs, and guidance for this path than if I were to pursue web development, and I’ll still have to learn JavaScript to be employable, and I’m ok with that.

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!




Learning jQuery. That is all.


Here’s a line graph of stuff to look forward to: why learning to code is so damn hard.


now we are two

My latest assignment for learning web development is to build a page with some css that can “house” the silly little JavaScript games we’ve been building. I used the opportunity to launch, which I intend to build out as a non-Wordpress personal site while keeping this one a dedicated blog. The site name is a pun on the word “merrythought,” a British term for a wishbone, the etymology of which references “the pleasant thoughts imagined when the bone is ritually broken.”

Thoughts as acts of wish making, I’ll take it!

This week was a slow one to get started — I had a burst of inspiration this weekend to make an “achievement unlocked” twitter bot that has stalled out because I can’t figure out how to auto-upload an image. It’s fixable, but it requires seeking out additional expertise, and probably in person.  And we have a lot going on offline, finalizing a move (seems counter-intuitive but buying a house will save us half of what we’re currently paying in monthly rent) and planning a wedding that is slowly creeping up on me. On Sunday, we talked with our officiant who prescribed “a few pieces of undeniably beautiful music, a few readings that are meaningful to you, and make your list of people who must be involved to give their blessing.” That sounds… kinda fun, right? Well sure, if your idea of fun is curled up in a fetal position under the desk because god dammit why are all your favorite songs about loss and why is it so hard to pick readings, you have no fewer than 10,000 books to choose from… otherwise WRONG-O. Wait, let me code that…

var ceremony_planning = “pick your music, readings, and people who must be involved”

if (fun == “curled up in a fetal position under the desk”) {

  fun += ceremony_planning;

} else {



Ok, THAT was fun. Maybe Valentine’s Day will inspire me. Anyway, happy weekends to you!

learning & watching people code

Let me start with an assertion of fact: there is a growing form of participatory/passive entertainment in which people watch other people live-stream/live-play video games. You may have heard of something called, one of the biggest streaming platforms, or a little tournament called “DOTA 2: The international” that gave out ten million dollars last summer, with the matches streamed online for viewers who could not attend in person. (If you haven’t, there’s a documentary called Free to Play that’s worth a watch.)

I’m starting with this assertion because I don’t want to argue about whether eSports is a valid form of entertainment or not — you may be shaking your head and thinking that you’d rather play the games than watch other people play them, or that the joy in watching other people play comes from viewing impressive acts of physical achievement, and I get that, I do — I’ve run this gamut myself and where I land is that live-gaming is *as fun to watch, if not more fun, than, say, football.*

YEAH, I said it. Shagbark agrees with me.


So let’s accept that social video for gamers is a thing and consider its more studious, less sexy sibling: live coding. This weekend a link started showing up in my social media feeds declaring that watching people code is the next big thing in live streaming video. This quote especially stood out to me:

“As the learn to code movements gain more steam and coding becomes even more popular, these sorts of streams could become an interesting mashup of entertainment and learning opportunities.”

This idea resonates with me in the same way that the idea of peer-programming immediately horrified me (although they aren’t really that far apart). As I’ve been learning, one of the most useful learning tools has been watching instructors and TAs work through a problem while I watch. From a teaching perspective, it makes all kinds of sense. “Modeling” is an important part of any successful lesson plan, that’s the part where the teacher works the problem and talks through his/her thinking process while doing it (usually followed by “ok now *we* do it and then *you* do it”).

*Sidenote: not to knock any of the generous people who have volunteered their time to help me to learn, but I find the approach above to be 100% more effective than someone standing over my shoulder and telling me what to do before I’ve seen it done at least once. Especially when peppered with “see? do you understand? … do you get it?” I’d rather just watch you do it, then repeat back to you what I saw and what I think the steps are, then try it myself. But that’s how *I* learn best.

Back when I was first messing with Python, my friend Carl sent me info about the NYC-based Hacker School, including this video of one of the instructors live-coding a space invaders game. I watched the whole 30 minutes totally fascinated.

Does that make you want to go code something? It does for me!

My takeaway is to add some time to my learning schedule to watch other people code, and identify some good resources for this. Here’s some places to start:

  • Watch People Code — lists currently active live streams
  • Toplap — haven’t explored much, but what a pretty site. May be more experimental/artsy than your straight coding videos. Dang, lookit this Livecoding for Ferguson video, a work in progress slicing Jay Nixon’s words to music:

What do you think? Will you be making time in your learning schedule to watch other people code? Seen any great videos? Link ’em in the comments!


Taking a break from weekend homework of re-coding a webpage from sight (“umm… they have some stuff here, and some other stuff there, and a box over there… and a dancing box below that”) to talk productivity, people.

I have been fairly good at starting my days with a to-do list. It gives me focus, options, and (if I’m lucky) a sense of accomplishment.

Real talk though, with some of these coding questions/tasks, hours can pass by and I realize I’ve made little to no progress for one of at least three reasons:

1. rabbit holes — when the work is based on the internet, the internet LOVES to distract.

2. spending too much time trying to find an answer myself without asking/looking for help

3. giving up too soon and looking for an answer before puzzling with it some more (this may get the task done, but it’s a learning/mastery fail)

One possible solution… POMODOROS. At a very basic level, the Pomodoro Technique involves focusing intently on one task for a set amount of time, then taking a beak. No-brainer, right? More sophisticated uses involve predicting and tracking how many pomodoros (blocks of time) you anticipate that a task will take, and adjusting for unexpected events and redirections. In a lifehacker poll, Pomodoro was the top scoring productivity method, followed closely by Getting Things Done (which I also love).

There are a whole bunch of apps out there but a very basic one I am currently trying is tomato timer.

(Sidenote: here’s a New York Times article about computer programmers who use Pomodoros but that is only a tiny part of the article, the larger chunk is about this thing called pair programming OH GOD REALLY WHY??)

I am going to try this in the coming week and see how it works for me. For example, I have five minutes left in the current block, which is ample time to finish this post. Without that knowledge and self-imposed time limit (well, let’s call it a recommendation), I might spend much longer, poking at syntax, looking for links and pictures… stuff that won’t dramatically improve this blog post. So I will end it here, spell-check, and move on.


quiz day

Python quiz commences:


Eight hours later:


curly bracket of despair

ow ow ow not that kind of bracket…

Hey world,

If you’ve checked this page in the last 24 hours you may have seen some weird formatting errors as a result of my mucking with the CSS code in an attempt to create a smaller font size category for caption text. I forgot to close my curly bracket (oh, the horror!) and it caused a bunch of calamity. Closing the bracket did not immediately fix the problem (use plug-ins, people), so I’ve switched to a new theme for now — one that somehow has fixed a latent comment notification error (and maybe now you can use html in comments?). All of this calls for further investigation, but I have to turn in some Python homework. So, in the meantime, here’s some fun links for you…

  • Cheezburger is bringing sexy back via their 2014 Transparency Report. See also: warrant canary.
  • Looking for sandboxen inspiration? Wolfram|Alpha has comprehensive lists on just about any topic you can imagine. From their site: “We aim to collect and curate all objective data; implement every known model, method, and algorithm; and make it possible to compute whatever can be computed about anything.” The possibilities are limitless. Go play!
  • Christina’s list of #educolor tweeters is a must-follow for people who care about race, education, social justice, and authentically supporting communities of color. On a related note, Vu’s recent posts about Trickle-Down Community Engagement resonated with me in big way. Read both installments: (1, 2).
  • Learn Python the hard way. *Gulp* this book was recommended to me by my Code Fellow TA. You can buy a paper copy or it’s available in full on the website.
  • Ever wonder how people make those looping videos? Now you can make your own with Infinite Looper… I need one of Eric Grimson saying “a-ha!”
  • WE’RE BUYING A HOUSE! More to come. 🙂 In the meantime, I am obsessed with ideas for adding more closet space to small homes…

“Your bill is NaN”

Just checking in to share that I finished the garsh-darn JavaScript tutorial (kicking and screaming the last 3 miles) and attended my first Code Fellows class yesterday!

The instructor successfully articulated a point I was trying to make in my last post, the difference between paths and sandboxes (or, as I prefer to pluralize it, sandboxen). Learning paths include things like online tutorials: they are consumptive, they lead you down a specific path to completion. Sandboxes (eff it) sandboxen are more autonomous, exploratory learning experiences, driven by learner interest, that generally lead to greater understanding. The majority of our class time will be spent playing with sandboxen.

Oxen on the beach in Colva Beach | Goa, Colva (Trip Advisor photo by raumati1: Mar 2010)


I was trying to complete the first assignment, a simple guessing game, by converting one of my working python games to JavaScript. I wasn’t able to make that work (v. frustrating), but I was able to build on the instructor’s demo to make a game I’m proud of. The original game asked a player to guess a number between 1 and 10, with 2 options: 1. you win! and 2. you lose. I expanded the range, added a way to keep track of the high and low guesses, and built-in exclusions for guesses that are NaN (not a number) or out of range. Try it!

A warning: this game, built-in JavaScript and saved as an html file, operates entirely through pop-up windows. I promise you it does not reset your browser’s search engine to Yahoo! (when I find the program that is doing that there will be many strongly worded tweets), but otherwise the interface is a bit annoying and I hope it is not the only way that JavaScript knows how to talk to the world.

Click me, click meeeeeee!

© 2023 Mary Dickson Diaz

Theme by Anders NorenUp ↑