For better or for worse, another brutally detailed schedule will help keep me honest today:

8:35 Drive with roommate to coffee shop

8:45 Walk home–and notice there’s a new sustainable, local butcher shop opening soon!

9:00 Read programming blogs (and Rothfuss).

9:45 Make coffee

9:50 Open geany and start stepping through my random-text-generator code. Maps of maps!

10:36 Worried that the program is printing the same output to screen about a hundred times–then realize, oh, I actually TOLD it to do that. Precisely 100 times.

11:14 Ack! Got distracted by NYTimes again. Thank goodness for Leechblock, reminding me that my 15 minutes was up.

11:38 Most of my functions work! The only time I have problems is when my shortcut keeps biting me in the butt. Which is a good lesson all around. So far, it generates:

butter butter “But,” she batter. If I baked it would make my batter it would make my batter.” So she bat

YES I have the power!!!

11:44 Time for a run. And when I come back, I will start my real project of the day.

12:44 Oh so good! 4 miles in about 37 minutes. I am so proud that I can even run 4 miles without dying; there was a time in the very recent past when I couldn’t even finish 5K.

13:40 Showered and cooked lunch. It’s sad that rice’n’beans are such a cliche; they are seriously delicious, and the cheapness is just a bonus.

13:45 Ok, a softer world is not going to help me code. Time for tea, which will!

14:09 Broke everything! Well, not quite everything. The opening screen now has two errors, even though I thought I commented out all the code I’d added.

14:11 Ok, I found where the files are that the program can’t find–now I have to find where the program calls them, so I can redirect it to MY build (instead of the ‘official’ build). Maybe I didn’t get these errors before because I was running the wrong build?

14:14 Found it! … in a binary file.

14:16 Maybe I can assume these errors don’t matter. You know–this is a good thing to ask The Dev.

14:57 Oh, work email. Lonesome Japanese student, last-minute Colombian requests. and a lovely but inconvenient overabundance of Korean students. What was I doing again?

14:59 Oh dear, and there is inheritance. Another piece I haven’t picked up yet.

15:01 Oo, new fitness routines! Except… these look like they were made with Hypercard last decade. Unfortunate.

15:10 Clearly, I am just wasting time while I don’t know what to do yet. I’ll bend my tutor’s ear tonight, and we’ll work through this first bit together. Meanwhile, I am going to keep coding! But I’ll go back to my ‘fun’ project, since I am determined to finish all these Stanford problems.

15:38 Fine, fine, I will learn how to kill a program running in the terminal.

15:57 No, I don’t want to kill the whole terminal… just my wonky program! I give up for now. I can only take in so many special cases in one day.

16:03 YES. This is how you are supposed to work, my lovely!


Get Back On The Penguin


So, I am back in that place where I don’t know what to do. I have a good list going, though, of what is NOT helpful:

So, what might be helpful?

  • Open the source code
  • Find the bug list
  • Try to repro the bug
  • Make a new to-do list
  • Make some tea

OK, tea is pri 1.


Sweet! Now I’ve done everything on both lists, except make a new to-do list. So:

  • Try to find where “search” is written and called
  • Try to step through code… using my IDE that does not step through code. This may be the first time in my life I’ve used this expression, but: d’oh.

Finding the spot where “search” is called…


Um… O Gods. What?


No, seriously… what?!


Holy mother of God… I feel really, really dumb.


So! “The strcasecmp() function compares the two strings s1 and s2, ignoring the case of the characters,” says you. And you claim that “The variable optind is the index of the next element to be processed in argv.” And you go so far as imply–no, state quite baldly–that “[t]here are at least two arguments to main: argc and argv. The first of these is a count of the arguments supplied to the program and the second is an array of pointers to the strings which are those arguments.”

I had never actually seen argc and argv used! I thought they were just window dressing.

So! We are checking to see whether the string passed in equals some other string, even if we pass in many many things as arguments. We check one at a time.


Yes, but that doesn’t explain why all these people on the ‘tubes are running around saying:

if(!strcasecmp(doWhatVar, “Do This Thing”)




That seems like… the opposite of what it should do.

Is 0 the same as not something? Oh god. How could I be so ignorant?


This is the part where I remind myself that I am still learning, don’t expect myself to know everything, etc., etc., etc. And maybe pour myself some beer. Because if I’m going to be ashamed and irrationally afraid that I’ll never get a job, I might as well do it with a tasty beverage.


Why are there slashes everywhere? Do I know this language at all?


Oh… slashes are line continuations inside a giant macro. Haven’t used macros before. That explains a lot!


Now there’s the part where I wonder if the answer is to soldier on and Get Back On The Penguin, as it were, or take a break and come back all fresh-faced and dewy. If it weren’t 11 o’clock at night, I’d go for a run. Maybe instead I’ll do some pushups. And ask my ever-patient roommate for help. And then maybe… maybe sleep.

Third Day’s a Charm


Starting today on the wagon! And will track my schedule, to keep myself honest.

9:24 Fresh coffee, Visual Studio open, and zero plans tonight. I can do this!

9:34 Got distracted by checking apartment prices and looking for new place to move. But back to it!

10:17 These intro programming problems serve several purposes, not the least of which is making basic language functions more intuitive. But it’s a bit of a pain, too, because they ask me to do things like iterate over a map (!) without having access to its innards. I can iterate over my OWN map, thank-you-very-much, but I can’t do anything fancy and recursive as a user of the built-in map class. And it’s such an arbitrary restriction… which brings me to the the micro-projects’ second major benefit: They’re perfect interview material, and I should be able to whip them out in my sleep.

10:33 Really, guys? “rbegin” is the reverse beginning? Don’t we already have a word for this concept? Although… I do appreciate the elegance of opposites with similar names.

10:36 Work email. Nothing out of the ordinary. Almost get sucked into NYT but resist.

11:07 It’s still a bit of a mystery to me how all these files fit together, and where I should store my sample text files if I want to be able to access them without typing the whole path. This is exactly why I’m working on these smaller projects, so I learn the basics!

11:24 Over an hour for this problem? Wow. Part of me is really embarrassed and wants to start cranking out code faster–but a bigger part of me is more concerned with slowly building a solid foundation of good coding practices. Rushing usually hurts more than it helps. If I were a coding supergenius, I would have spontaneously constructed an operating system or something by now*–so clearly, I am going to have to become awesome the old fashioned way: through painstaking, hard work.

11:34 Speaking of which: time for a run.

12:30 5K in 29:30 with mixed hills and flats, and I was barely tired at the end. Will push harder next time!

12:32 Dealing with health insurance switches… don’t these departments talk to each other?

12:41 But I can code while on hold!

14:11 Coded more, took a break for lunch, and went to talk to our apartment manager about lease renewal options. I seem to hit a post-exercise post-lunch slump pretty regularly, where I just want to read the internet.

14:12 A good pot of tea will help. Nothing says “Back to work, you slouch!” like a cast-iron tea kettle and teeny, tiny teacups.

14:18 After I check my work email, that is. OK. Back to it!

15:30 Arrgh, the rand() function is driving me crazy. Didn’t they know that when programmers want random numbers, they often want a billion of them very quickly? And the whole point of computers is, in fact, that they do billions of things very quickly? Why would you make a function that fails so utterly? This is as good a time as any to make friends with Boost.

16:29 I really don’t understand the difference between Win32 console apps and CLR console apps. Unmanaged code? What?

16:33 Deep breath. I’ve been trying to be a good sponge–because to me, when successful learners see things they don’t understand, they go after them and dig down until they finally get to the bottom of it. It’s exciting, really, to completely grasp everything your brain touches! But this is, effectively, depth-first search, and while it might be fun, it’s unbelievably inefficient–plus, with all the dependencies in learning to code, likely to be frustrating as well. I’m embarrassed every time I come across something I don’t understand–but I have to get over it and focus on the task at hand. I’ll flag extra interesting things for possible later study (that’s my pride talking!) but for now… pulling back. My application in Win32 can find the boost files (it sounds like unmanaged code is more flexible about using external directories?) and now I can keep working on my project.

17:14 My brain is frying. Trying to understand Boost’s random number generator is twisty. I will walk to a beer tasting, come home, and then try to make sense of this some more.

*I am not sure I ascribe to this theory. Subject for a blog post to come.

Dancing Salsa or Data Structures…


Today started great: four mile run in the partial sunshine, some (video) face time with the fantastic Julie Zelenski through Stanford Engineering Everywhere, and French press coffee. The extra energy did not translate into better focus, though, and I wasted the better part of the day searching for summer 10K races, bouncing through blogs, dancing around the apartment, etc etc etc.

And tonight, I’d made plans to go to Seattle’s First Thursday Art Walk, where many galleries change exhibits and all museums are free. The twenty- and thirty-somethings come out in droves to check out new art installations and partake of wine and other goodies, and it’s about the most fun a girl can have for free on a weeknight. After that, there’s a salsa lesson and dance that I’ve been meaning to check out–and how convenient that they both happen on the same night!

But now, suddenly, I just want to stay home and code. I’m embarrassed that I lost so many hours today, and I’m finally ready to jump back into it. I really do pride myself on my new-found bravery and inspired bursts of activity… but maybe tonight, I should stop trying to be fabulously young and hip and start trying to get my brain up to par.

That’s settled, then! I’ll appreciate art and dance the meringue and drink wine some other night; for tonight, I’ll appreciate my algorithms, jive in my chair… and maybe still drink some wine ^.^