2014.10.29 – Haskell Hassle

I decided to take a break from the resume stress today since I was now just waiting to hear feedback on mine so I started working on another Mozilla bug. I happened to see a conversation going on in the #OPW IRC room with a career advisor so I lurked in on that and saw that they offered to review resumes. I asked if an OPW applicant could also send in a resume for review and they said sure. Another set of eyes couldn’t hurt so I sent it off to the address they gave then went back to my bug.

I first pulled in any changes from the remote Air Mozilla repo and then started making changes to the Roku channel feed XML file. I ran the tests to see if my changes broke anything and holy crap nose tests completely puked. I reverted my changes and ran the tests again with the same pukey results. Well hmmmmm. It obviously wasn’t the change I made. The error was related to the database so something must have changed but I’m using my own local database so I had no idea what I could have possibly done. I figured I’d just drop the database and recreate it. Simple! Except PostgreSQL wouldn’t let me drop the database. It was telling me there was another connection. I had stopped the server so that was weird. I had to dig around and figure out how to see the connections and then kill the process. Finally I dropped the database and recreated it but I still had the same issues when I ran the tests!

What I failed to realize since I’m not very experience with databases is that the test suite creates its own database test_mozilla.db. Someone in #airmozilla-dev said something about manage.py migrate not migrating the test_mozilla database and also asked if I had dropped it and recreated it. Well no I hadn’t dropped it because I didn’t know it existed but once I did I was able to do just that and everything was happy again! It’s so nice to be able to get the help I need so I can keep moving forward. Had I not asked for help and gotten that tip I would surely have given up.


Loyal Lily stuck it out with me.

With the database fixed I went back and made my changes again, ran the test suite, and sure enough I broke stuff! It was only the stuff I knew I would break though so all was well. I took a break from that and started working on the lab for the Haskell course I am taking. I started working through things and everything was fine until I had to figure out what this did before trying it in the interpreter:

(head [length]) “Hello”

I looked at it and I know what head and length do but this just looked weird. A function inside of a list inside of parenthesis with another function. I guessed it would evaluate to 4 but it evaluated to 5. Hmmm…I tried changing it in many different ways to see if I could gain some clarity but I just didn’t get what was happening. I screwed around with this for TOO long and finally went to ask Andrew. He was really busy thinking so he wasn’t much help. Back downstairs to try and figure it out.

A few classmates and Kronda showed up in IRC so we talked a bit and it made me really miss everyone. IRC is great but it’s just not the same as hanging out. It was a nice distraction from Haskell though!

This all took long enough that it was time for me to head to my eye doctor appointment. I had this stupid stye that never went away. It was awful looking but I didn’t want to get it taken care of sooner and have to miss any days of Ascend.

I drove over to the hospital and checked in pretty early. I didn’t know how long it would take me to get there or if I would have trouble finding the office but I brought my tea and a book just in case. They were happy to get me in early though so I went back to the room and was told they wanted to dilate my eyes and do a full exam. Ok, whatever but do I HAVE to wear the stupid dark glasses afterward? Nope, not if I didn’t want to, the assistant said. Great! Dilate away! Eyes were checked and deemed healthy. The doctor came in and checked some other stuff and also said my eyes were healthy. He looked at my eyelid and asked if I wanted him to take care of it right then. Why yes that would be wonderful! He went off to gather the supplies and told the staff to find out if my insurance required pre-authorization. While they were investigating that he saw other patients so I sat for quite some time. Fortunately I had a book! Unfortunately it’s really difficult to read with dilated eyes!

No pre-auth was needed so we were good to go. He came in and told me how it was going to go. First an injection into my eyelid to numb the area. This, he said, would hurt the most. It would burn quite a lot. It did burn quite a lot but I have a very high pain tolerance so I sat there and took it like a woman! Yeah! He then put a clamp on my lid to hold it folded back. I couldn’t feel anything. He kept asking if I was doing ok and I so just wanted to ask him that right back but I didn’t. The whole thing took maybe five minutes.

He said it went well and he thought I would have a really good result but that my eye was going to be bruised and swollen at first and I would have bloody tears for a hour or so. Cool! He gave me some antibiotic ointment and sent me on my way. Wait, what? I’m supposed to just leave? And drive a vehicle? With dilated eyes, one of them crying blood? Well ok! So off I went. It would have been a pain in the ass to have Wayne and Andrew come and get me. Andrew would have had to stop working and then they would have to drive all the way out to where I was so I figured I’d see how it went.

I was way out at Glisan and 47th but Portland has about one million different ways to get anywhere so I took small streets all the way home. My distance vision was really not bad and I didn’t get in an accident so obviously it was totally fine. I dabbed at my eye whenever I was stopped and the bleeding eventually subsided. It hurt though and I couldn’t wait to be home! Once I got there I went and closed my eyes for about an hour and then there was no more pain. It was definitely bruised and swollen though and we had a book signing to go to.

Andrew loves the books by William Gibson and he was going to be at Powell’s speaking and signing his new book The Peripheral. I wasn’t about to drive at night in the rain though and Andrew hates driving so we talked Wayne into driving us with the promise of Los…..wait for it…..Gorditos for dinner.

We got to Powell’s about a half hour early but wow the room was already packed! We had to find a place off to the side to stand but Andrew was fine with that. He had a long day full of using his brain in overdrive so he was just happy to be there at all. The talk and questions were going on for quite some time though and Los Gorditos was going to close so Wayne and I walked over, had a wonderful dinner as always, got a burrito to go for Andrew, and walked back up to Powell’s. Andrew was just waiting to get his book signed so we sat and people watched. One lady walked up and seriously had about 30 books for him to sign! He didn’t seem to mind at all and just went through each one. She claimed her friends couldn’t make it so she was doing them a favor but I think Ebay!

Andrew and William Gibson

Andrew got his book signed and we headed home. It was raining lightly and the night was just beautiful. Another wonderful day in the best city.

Today I learned that > (head [length]) “Hello” first takes the length of the string “Hello” which is 5 and then returns the head of 5 which can only be 5. It’s a terrible example to use! But at least I get it now. Terrible example….