Sunday, May 31, 2009

Environment Variable Problem Solved, This Time Fo' Reals

So between Zack and I, we've got the super frustrating environment variable problem solved. Here's a rundown of what was going on, for posterity.

Okay, so basically the issue involved shell variables. It's a little complex.

If you create a variable that doesn't exist yet, and assign a value to it, such as "JAVA_HOME="/opt/jdk1.6.0_10" you create a shell variable. A shell variable, according to the Ubuntu community documentation, " is similar to an environment variable but does not influence the behaviour of other applications." IE, it will exist in the shell, but not in any processes spawned by the shell. Nice, huh? So that explains why echo was working--the variable was in the shell, it was just that ant didn't know about it.

In order to make it available to applications beyond the shell, you actually have to export it, ie,
"export JAVA_HOME="/opt/jdk1.6.0_10""

Now, the reason why restarting worked that one time is that I had defined the environment variables in /etc/environment, which is not actually a script, the way the other files, such as /home/.bashrc and /home/.profile are scripts. Instead, it is a file only of environment variables. Likely, at some point during the boot process, some script goes through that file, line by line, and exports each of those variables. If I had to guess, the exporting script only executes under certain situations, which is why restarting only worked that once.

So. There you have it, friends and neighors. The lesson learned from this is: If you've eliminated something because it "could not possibly" be the cause of the problem, go back and try it, as it likely is the cause of the problem.

I dreamed last night that my brother was sort of kidnapped by Karl Lagerfield. And that everything was flooding and I had to escape on a skateboard. And also that truckers burned shredded cheddar cheese as fuel instead of diesel.

Monday, May 25, 2009

GSoC: Hackystat, May 18-25

Most of this week's toil focused on getting Hackystat up and running for reals on my laptop. I was having a significant amount of difficulty, because something utterly bizarre is going on with my environment variables. I will describe the problem briefly here, as while it no longer a problem for setting up Hackystat, I have the feeling it will be a problem again.

I wanted the environment variables to be system-wide, as opposed to just for my user profile, so I defined them in /etc/environment.

The command "source /etc/environment" should have applied the changes in that file to the system, and indeed, calling "echo $" before sourcing from /etc/environment would print a blank line, while after sourcing it would print the appropriate value from /etc/environment.

However, the ant build just refused to recognize the new variables. The ones I had defined previously, JUNIT_HOME and so forth, worked just fine. The new ones, CHECKSTYLE_HOME and so on, where the ones that ant refused to believe existed.

Restarting is what fixed this the last time: however, it did not solve the problem this time.

Finally, I attempted to run the ant stuff from a root terminal. This time, it broke on JUNIT_HOME... Apparently the user terminal had access to the JUNIT_HOME variable, but the root didn't?!?! This confuses me mightily. The variables are defined in /etc/environment. That is a root file. WTF?

So I never got that working properly. Thankfully, Philip came out with the Ivy integration, which is like a gift from God.

Ivy Integration

The screencast was tremendously useful. I only ran into one problem, which was that I couldn't run it from a user terminal in the folder where I had placed the sensor example. (I had put all of the hackystat stuff in /opt/, which requires root access to alter. But that was no big deal. Sudo make me a sandwich!)

However, there are only a couple of things that it might be useful to clarify.

It took me a looong time to figure out that the Ivy thing was something you'd have to repeat with each project. I asked Austen some questions about it, and he was most gracious, but I felt that there was a crucial insight that I was missing. I did not feel that I understood, at all, how the sensor example related to a hackystat install. I might have understood better if it were called a "Project Example" as opposed to a sensor example. I thought that the primary purposes of it were to
1. ensure that the sensors were installed correctly
2. familiarize the user with the data that was being sent.

What I didn't understand at the time is that it is also an example of how to set up a project. So, every project has to have those xml build files, similar to the ones in the sensor example, and each project will have its own copies of the .jar files for the QA tools. Initially I thought this was very wasteful (something that Philip does touch on in the screencast, though at the time I didn't understand why). However, on further consideration, it seems like a really good way to do it, as then you can really easily use different versions of a tool for a project, without having to worry about it upsetting all your other projects.

So, as I understand it, when compiling a project to send data to hackystat for the first time, you have to go through all of these different ant build targets. One could probably write a script to tie them all together. It's a lot of time overhead for the first compile, but it works! Which is better than I can say for my efforts with the original set up method.

Ivy Integration Conclusions:

1. Ivy rocks. For realz, yo. Having tried the old installation way and failed spectacularly, I can say that the Ivy integration is easily a thousand times less painful and frustrating. I see it opening up an entire new userbase for Hackystat.

2. The exact purpose of the sensor example could use some clarification. It's possible that I missed some crucial insight in the documentation, but if I did, then future users are sure to do so as well. Maybe a more step-by-step guide to setting up a new project would be useful. I would probably even volunteer to write that.

In other news:

I'm running approximately a week behind schedule (although I feel significantly less panicky now that Hackystat is at least working.) Today I will finish watching the developer screencasts. I'm not exactly sure where I will go from there, as I suspect the screencasts will open new avenues of information to pursue.

I am hoping to get a design up this week. I'm not so much worried about the data mining part of the project as about the information retrieval and storage.

Also, why can't I cue screencasts to a particular point? Is that intentional, or is it a byproduct of my OS or browser or something?

Total hours for May 18-25: 15

Tuesday, May 19, 2009

Still bloody installing hackystat

If I ever get around to getting actual work done on my GSoC project, it will be a miracle.

Problems I have solved:
Finding where Ubuntu puts java
Defining environment variables
Defining enviroment variabls in a persistent fashion
Getting Ubuntu to reload those environment variables from file without having to restart the whole damn operating system

Problems I have not managed to solve:
getting bloody stackyhack to work. At all.

So far, this is all I have been doing on this bloody project, and I am about ready to commit suicide over it.

Monday, May 11, 2009

New Drum and a Hackystat Headache

It has been a busy couple of days.

Friday evening a group of us, headed by Dr. Trytten, went to see the new Star Trek. Zack, Ryan, Courtney, and I rode with Montana, which was a frightening experience that I do not intend to soon repeat. I like Ryan a lot. He's good people.

The movie itself was somewhat lame and dissatisfying. That's how I generally feel when people bring in time travel to recon stuff. Technically it works, but honestly I would rather them not try for continuity. I would rather they just say, "This is a new beginning, a different retelling", much like they've done with the new (and awesome!) batman franchise. I felt that the new Star Trek movie was full of plot holes and had only the whispy ghosts of character development. It was all actiony, moved too quickly in some places, jumped to conclusions... in general I just didn't feel it was believable or very good. Spock was hot, though, so i suppose that's a redeeming characteristic.

After the movie we convened at Tim's house for an Epic Pr0n Pr4ty. We watched Pirates (purportedly the most expensive porn ever made), a scene from Young and Anal 15 (arguably the best of the Young and Anal series) and the a couple of clips from DeepThroat (a piece of American history). All in all it made me reaffirm that most porn is awful and that someone should be making good porn. All of the women in Pirates were alarmingly orange colored, with no hair and breasts made of plastic. While parts of it were hysterical (mostly because of how diabolically bad it was), I think the idea of movie length porn with plots is ludicrious, particularly as generally executed. The plots are lackluster and half-assed, the dialogue is poorly delivered.... there is just no point. The sex wasn't even sexy. It was, by and large, creepy and oddly rough and unhappy looking. Also, I don't know how people can manage to make sex so utterly boring and tasteless. So someday I'm going to become a truly good pornographer. Put that on my list of things to do, somewhere after "graduate" and "write a novel". It was a good party, though, and there was much laughter. Zack was in fine form, having imbibed several homebrews. He was sociable and charming--my friends were dazzled. Unfortunately, he was also massively hungover on Saturday.

Saturday was the drum adventure. Jessie, Grace, and I set out to purchase a drum set. Jessie called a bunch of pawn shops, and found a couple with drums, so we spent the afternoon checking them out. The first sets were at America Pawn on 12th. While we were looking, one of the young men who worked there sidled up to us with a "Hey, girlfriend!", in a voice that would have been perceived as stereotypically homosexual had it not immediately been followed up by the awkward, "I'm not gay! Just thought it was funny." Which really just made him seem like a homophobe. He then attemped to sell us two crappy drumsets for $300. We told him we'd think about it and get back with him.

The third set we looked at was much better. So nice, in fact, that we bought it. We were able to talk him down to $350, which, for a seven piece set in pretty good condition, did not seem bad at all. Then began the collection of pieces. It was missing a clutch and torque screws, so we beebopped around town looking for them. We bought a bass kick pedal from the place with the two awful drumsets, and a clutch and torque screws from Campus TV and Music.

Campus TV and Music is staffed by the crankiest, crotchietiest man alive. I love him dearly. His fat, fluffy black cat (named Frank) sleeps on a crate by the door of the tiny shop, and the shopkeep (owner, I assume) has the customer service skills of a wet badger. An exchange for a high hat clutch went something like this.

"Do you have a clutch for a high hat?"
"Yes."
No movement.
"May I have one?"

He might have been the most sexist old man ever, or he might just have been the most cranky and ornery. When Grace ran to the car to count how many torque screws we needed, he suggested that maybe we shouldn't have sent her, because he didn't think she could count high enough. We allowed as how she could always just count to three twice.

In the end, we had all the pieces we needed, and a free cymbal case, to boot. We grabbed some jamba juice and went home to set it up, which was more difficult than we had perhaps anticipated.

Sunday I spent the day cooking for my family. I made cheesecake, deviled eggs, kale and white beans, veggie frittata with goat cheese, and grilled asparagus. It was a nice meal, and I couldn't have gotten it off the ground without a legion of kitchen dervishes, ie, my father and brian (and rick, when I could manage to keep him in the kitchen. He kept escaping.) My mother fawned over my brother when he arrived. I felt vaguely annoyed at all of the fawning she did over him. He was only there because I told him to be. Whatever. Someday I'm sure I'll stop feeling like the prodigal son's brother. I brought pink roses for my mother and orange for my grandmother, and beautiful tea towels for my mother (she has been coveting my for a while.) It was a pleasant enough day. Okay, not really, it was four hours of standing in the kitchen cooking and directing while almost too dizzy to stand. (Allergy meds. Blar.)

Today I had a meeting with Sandra Longcrier from OG&E about sponsorship for convention. It went well, I guess, particularly considering I had no idea what to expect going in. She gave me a lot of helpful ideas and suggestions, as well as a few contacts. Allison and I spent the afternoon making phone calls and trying to hammer out food that would stay within budget. So far, it looks like

Thursday dinner: Tarahumaras
Friday Lunch: Himalayas
Friday Dinner: Jason's Deli
Saturday Lunch: Sauced
Saturday Dinner: Prairie Gypsy catering

Some of those may be shifted around, depending. I am considering offering the option of sponsors sponsoring a particular panel or a particular speaker or something, instead of a general sponsorship level.

I spent the evening trying to get Hackystat installed. It wasn't even the bloody developer package! It was the user package! I am having difficulty getting ubuntu to reload the environment variables from the profile file, which is making it so that I can't play around with StackyHack... *twitch twitch twitch* Hopefully I can get it working tomorrow. I feel that I am behind, and am trying to catch up.

Tomorrow I will be doing a lot of studying for PPL, and maybe some studying for Discrete Structures. I wish the graduation on Saturday was anything more than totally ceremonial--I have two CLEP tests and two classes to pass before I am really free of the title of "undergraduate". I will not make people come to my commencement until I get my Ph.D.

Monday, May 4, 2009

Rails Pr0n Disaster and Gender in CS

Recently, there was an explosion in the Ruby on Rails community. Long story short, a presenter at the Golden Gate Ruby Conference thought it would be a good idea to use a porn metaphor throughout his 79 slide presentation. You can read about it in a million places on the interwebs; these are a couple of good places to start:

http://www.sarahmei.com/blog/?p=46
http://lizkeogh.com/2009/04/29/i-am-not-a-pr0n-star-avoiding-unavoidable-associations/

The first explains what happened pretty well, the second explains why everyone should be interested in making sure this doesn't happen again, regardless of whether or not the particular person was offended.

While reading through all of these things, I came across this in a post at girldeveloper.com

"It is difficult to encourage young girls to get in this field. I get emails all the time. It is scary being "the only girl in your class," and one of three in a room of fifty people. It's scary to ask questions when you're afraid your entire gender will be judged by your grasp of a concept. Asking girls to brave these situations because writing software is fun, and interesting, and exciting is a moot point when faced with these type of stories."

This is something I take issue with as a symptom of a much larger societal problem, not a problem within CS. I think that girls are just terrified in general. Terrified of not being perfect, terrified of failure of any kind, terrified that people won't like them. Constantly worried about being judged.

I think we need to teach our girls not to give a fuck.

Now, maybe I have something of an unorthodox view on this because I came to CS by somewhat unorthodox means. I chose CS for several reasons, the largest of which being that I wanted a challenge. Math is my weakest subject, and because CS is so heavily math based, I knew it would be hard for me. I wanted to struggle. I wanted to be the kid in the class who just didn't get it. That was something that had never happened for me before (except in math classes.) I was tired of always having the answers, I was tired of everyone rolling their eyes when I talked to the professor about something I cared about, I was tired of having to shut up so that I didn't dominate class discussions. I wanted to HAVE to go to class (in classes where I understood everything, I would just stop going, and then do poorly from boredom)

So that's why I entered CS. Fortunately for me, I also found that I loved it. So I never really cared if people thought I was dumb. And sometimes I do ask questions that Zack is like, "Man, that was dumb", and immediately begins explaining it to me in words my tiny brain can understand. And then I kick him in the shins and feel better. Okay, not really. He is often my hardest critic, though--most of the other guys are just grateful that I'm asking the questions that they were thinking. Actually, he's always my hardest critic, with the possible exception of me. However, since he also regularly has sex with me, I only call him on being an asshole and move on with it.

But I am getting away from my point. My point is that you can't let fear stop you. And if we are raising girls to be afraid of men, we have an issue that we need to address as a society.