02 October 2014

Hackbright Day 3: Where I get distracted before talking about HB

From What Should We Call Grad School

Someone from UT posted that on facebook. I thought it was apt for how I'm feeling right now about Hackbright. I need to do the homework. I want to continue on in the exercises that we do in class to improve them and to play around with the extra stuff. I really should finish the pre-work. All of this in addition to the personal things that need to be taken care of, including but not limited to: finding a new place for three people to live by November 1, finding a school for when Ramona finally arrives,
figuring out how to safely install ChrUbuntu on my Chromebook, finding Colby a job. As much as grad school was terrible and stressful, it never felt like I was putting anything on the line. This entire move has been stressful and risky, but it's been exhilarating all the same.

Today was day three of Hackbright. I thought that I was going to be early, but when I sat down on the BART, I realized how crazy short my dress was so I stopped into Walgreens to buy a pair of tights. Unlike in Austin, some of the Walgreens out here are experiences in an of themselves. You might even call them a piazza. Totally reminded me of this  scene from You've Got Mail:

ANYWAY. Back to Hackbright. We had lecture in the morning and we talked a bit about functions from the previous night's homework. My solution was different than what was discussed in class, but I think it still worked in the right way. We then went on to pair program. I think I was clearer in my descriptions of what I was doing while I was "driving" (aka typing), so that's good. I think I also need to just sit on my hands while I "navigate" (aka watching my partner type) because I'm like a 2.5 year old who can't sit still unless Dinosaur Train is on.

There were two exercises today and they involved functions and calls to functions. We essentially wrote a variation on a Polish Notation calculator. First: I love infix notation. Second: I now know how dictionaries (so basically the same thing as hashes in Perl and wow, I totally never understood them until now. Sorry, Chris!) work and how you can call a function from a dictionary entry.

My partner and I moved through the exercises fairly quickly, so we also did a "week one" project where we were given a set of files that had random names and we needed to create directories that were named a, b, ..., z and place the files in the directory that corresponded to their first letter. Partly because I miss doing terrible, wonderful things with the command line and partly because I just wanted to see how I would approach the problem on my own, I shell scripted the assignment first. We then used python to for reals solve it. I asked one of the instructors if this task was something that was supposed to happen in python in real world applications or if we could do something like this using shell scripting since it seems like that was more efficient. He indicated that it was fine either way. The one question I still have is how can you access a shell script that you wrote yourself from within a python script? I've tried system.call("/home/user/iheartawk.scr") to no avail.

And now I should probably go to bed or do the homework. The homework is actually to rewrite a code so that it's more understandable. At first I didn't understand why the code was hard to read, but then I realized that years of reading my advisor's decades old F77 code has made me actually pretty okay at reading other people's code. It's like I have a skill or something.


Kyle said...

import commands

command_to_run = './myscript.sh'

(status, output) = commands.getstatusoutput(command_to_run)


julie k h aka jkru said...

I'm just going to keep posting my python questions for you to answer, Kyle. this is working well for me. ;)

Kyle said...

Can I call this a 2 month contract job on my resume?

julie k h aka jkru said...

Most definitely. Don't you love how I'm helping you fill both your work cv and your dating profile!?