Saturday, October 30, 2010

Teaching

This past week I had the chance to visit my alma mater for a capture the flag event we put on from work. It is a good chance to get a small dose visit of one of my favorite places. During this trip a friend of mine, Willie, allowed me to coerce him into guest lecturing for his introductory C-based computer science course. It was a lot of fun. I spent some time discussing teaching styles with my friends.

I love teaching. I find it to be a rewarding and gratifying experience. If I could find a way to teach at the university level as a career and still make a decent living, I would jump on it in a heartbeat. Given the economic slump many universities are not in a position to hire new faculty.

There are a couple of methods I rely on when I teach a class. The first is that I prefer there to be a conversation with the students in the class. My biggest complaint about the classes I took was the concept of the “sage on the stage” information delivery. Letting them answer many of the questions tends to lead into a learning experience. The amount of information that can be conveyed by someone speaking is minimal.

Second, I like to present everything in terms of a real-world problem. Specifically when teaching operating systems I find that understanding the algorithms and techniques is much easier when viewed from the perspective of a problem solver. When we look at virtual memory I frame things around needing to protect processes from each other. Then with the brainstorming session, and having the students come up with potential solutions, it becomes much easier for them to relate to the implementations of the OS designer.

Finally, I like to foster disagreement and challenge my authority. Many times students are reluctant to do this, but when it clicks that they can disagree in a comfortable and open environment learning takes place. For example, when explaining strings in C, I like to bring in the implementation of the stack and how local variables are stored. Then, using notoriously bad function calls in my whiteboard code I encourage them to tell me why those functions are wrong.

The goal of all of this is to help create students that will think critically and try to understand the fundamentals of what they are doing.

Monday, September 13, 2010

The "Eat Less You Pig" Diet

That's what people had been telling me my entire life. Really as long as I can remember it's been fat this gordo that, pinche gordo panson mamom buei or something along those lines. After finding a really good trigger to get me to lose some weight, it was time to start taking off the pounds.

All the diets that are out there are crap. There is only one good one, and the good news is that it's really simple: The Eat Less You Pig Diet. To eat less, you need to figure out what your current calorie usage is over the course of a day in your life. This is called your basal metabolic rate, or the calories you burn on a typical day, and subtract 500 from it. That's it. A pound of fat is 3500 calories, so 7 * 500 = 3500. From there you can adjust up and down to get to the caloric intake you want. It's that simple.

What's nice about the Eat Less You Pig diet is that you can eat pretty much anything you want, so long as the calories stay below your set amount. After awhile you'll start getting pissed off at high calorie content foods because you can't eat as much.

The question is then, how much am I burning on a typical day. There are websites that will calculate the amount. After that you can use the number as a base line. What you'll need to do is start keeping a detailed food and calorie log, along with weight data for a couple of weeks. If at the end of that your total weight is higher, then you're going to have to subtract more. If it's lower, then either keep it the same or add.

If you keep detailed enough logs you can figure out what you're burning on a day-to-day basis and the pounds will melt off. There are two main tools that I use to keep track of this. My Polar heartrate monitor and an iPhone app called LoseIt. The heart rate monitor is good for exercising as it keeps a running number of calories burned. LoseIt takes a lot of the chore out of the food log. It has entries for most of the common restaurants, grocery store foods, and a way to assemble recipes for commonly eaten foods.

What I'm doing is a modified version of the Hacker's Diet. It's a lot more complicated than what I've described but overall the gist is 1) Get good data and 2) Subtract calories until you start losing weight. Also exercise.

Tuesday, September 7, 2010

Academic Navel Gazing Spirit Quest

Ever since I graduated with my Ph.D. this past May, I've had a surprising amount of people talk to me about graduate school. Specifically whether or not they should pursue a masters degree, or some even a Ph.D. There are some very good and bad reasons to get a higher degree, and largely I think it depends on what your future career ambitions are. It is a huge pain, a lot of frustration, and in the end worth questioning whether or not it was wise to even start. (spoiler: For me it was)

A bit of background: I started my Ph.D. in August of 2005 when I took a graduate course in parallel programming. I had always liked my time in undergrad and felt as though I should have stayed in school a bit longer. A year later I took advantage of a program that work offers called Advanced Study Program. That allowed me to go to school for a year and get my coursework out of the way. It also helped that I was a bit burned out with my current job, so it was good to go on an "academic navel gazing spirit quest" as one of my friends described it. I graduated in May of 2010 with a lot less hair, more grey hair for that which stuck around, a failed marriage and a subsequent awesome reintroduction to my now wife. There are costs that are not necessarily related to time and money.

With that in mind, here are the questions you should ask:

1. Why do I want to do this?

If you are looking to gain more money from your current job, there are probably other ways that you can accomplish this same goal. Most employers that I know of will not automatically give you a pile of cash upon graduation. A friend of mine likes to tell the story of getting his masters in statistics and then asking for a subsequent raise. His manager, with no options to help him out, gave him a $15 Home Depot gift card. Now the standard graduation gift in my group at work is a hammer. In order to realize anything beyond a gift card you'll need to most likely change jobs. New hires often are brought in at a higher level based on their education level.

If your goal is to learn something new, then that is possibly a good reason. This is what academia is supposed to mean, and certainly is a distinct possibility that something will happen. This wasn't my first reason for going back to school, but just as a natural side-effect it happened. Whether or not any of that was computer science related I won't elaborate on.

My primary reason for getting my Ph.D. was that I want to teach at the university level sometime in the future. I love teaching and getting students to do seemingly impossible things. It's really nice to hear that someone got a fantastic job based on things that I taught them in class.

2. What will the impact on my life be?

This reason is the one that you should use as the primary basis for not going to school. As I alluded to above, I entered my Ph.D. married to one woman and left it in a marriage with another. I will leave out the specific details, but suffice it to say that until things started picking up for me I wasn't very happy about the failed marriage. If you have kids, that should be another factor. In lieu of homework, tests, qualification exams, and the stress of attaining a graduate degree I would say spend it with your kids.

3. Can I suck up to a group of people for a prolonged period of time that I think are dumb?

I've had a few conversations with hacker types about getting advanced degrees. Typically the independent and counter culture of our group doesn't fit in well with academia. Education is all about respect for the institution, and putting up with an asshole primadonna advisor is not something that bodes well with hackers. At least not in my view. I was lucky to have an advisor that at least tolerated the mischievous side of my research.

I felt the people that I got on my committee were all top-notch. I did not feel the same way for everyone in the school, especially those in authority positions. This created problems where I had to decide to try and change whatever was wrong, or just give the person whatever they wanted. (Pro-tip: You graduate faster if you do the latter)

My research was a lot of fun, and I got to travel all over North America to talk about it. It opened up all sorts of opportunities to do what I thought was important, and generally was a career enhancing move.  I met some great people and had a really positive experience. Finally, it helped me return back to my job with a renewed and refreshed outlook on the field.

Saturday, September 4, 2010

Green Chile Time (with a baseball bat)

It is green chile time again here in New Mexico. I haven't actually gotten a bag in a long time, so I thought I would replenish my supplies. The predominant chile growing region is near Hatch New Mexico. If you've never been to Hatch, it's where dreams go to die and tears season the soil to make the chile taste good. Zard always said that a bit of suffering makes food taste better, and he's right. There are a bunch of options for roasters for Hatch chile. 

I prefer the chile from Socorro. Partly this is due to nostalgia from my time there as a student, and partly it's because it has a different taste. The soil in New Mexico has the right alkalinity that makes chile good. Socorro has something especially different about it. As for the suffering, there is no suffering like that found in Socorro county. The tears of regret and lost innocence really impart a distinct flavor on the food. Luckily there is a roaster that specializes in Socorro chile, and when I do buy a roasted bag, it's from this place. They are in front of Hobby Lobby on Cerillos if you're local and actually want to find them.

In order to stock up on chile, the cheapest way is to peel it yourself. It's a bonding time with your family members where you can ask questions like: "This chile won't peel, did those jerks roast it enough?" and "Did we really need four sacks of chile?" and finally "Please give me the sweet release from chile peeling that only a .45 caliber slug of lead can provide!" That last one isn't really a question, but I thought I would ruin the punchline of peeling a bag of chile for you.

Here is the chile peeling setup I use:


In the picture are two baking pains to hold the peel, two sets of sharp knives, latex gloves, cutting boards, ziploc bags for storing the remains, and a half sack of fresh roasted green chile. I only get a half sack as that's about all I eat in a year. You then begin the process of removing the skins.

Some of your friends might suggest that you cover your hands in oil and that will somehow protect you from the chemical burns of the green chile. Slap these people, they hate you and they hate America. Latex gloves work for me, but I'm sure the nitrile ones will work too. Then you can make "two by two hands of blue" references with whoever you suckered into helping you with this.



It's good to have a cleanup crew to help with "accidents" too:


Amazingly enough Willy and Charlie both enthusiastically ate the dropped seeds, peels, and other discards that happened on the floor. It's a bit too soon after peeling to see if explosive doggy poop will result, but I'm hoping not.

After all the peeling is done, you get the following:



The two piles on the cutting board are the remains. Just bag them and send them on their way and you now have condensed suffering to season your food for the whole year. Unfortunately there is also the mess to clean up:



Tradition also dictates that you snack on some of the chile, then say either "ZOMG this is too hot!" or "Those jerks screwed me I should have gotten extra hot!"

Friday, September 3, 2010

Tall Motorcycle Riders: BMW vs. Triumph vs. Honda

Motorcycles are generally made with compromises in mind. The average sized American is a mythical beast, and I do not fall in that demographic. Specifically, I'm tall at six feet one inch and my inseam is a 32. There's a lot of information about modifying motorcycles for the shorter riders, but for people over six foot there's not a whole lot of information out there. I've ridden a fair number of motorcycles looking for one to suit my longer legs, and I have opinions on them. This post is specifically about the sport touring and dual sport motorcycles. I used to ride a Honda Shadow 1100 but I've found that a more modern, sportier bike is more to my liking.

There are three contenders I have ridden and I'll weigh in on them here. Those are the BMW R1200RT, the Honda ST1300, the Triumph Sprint. Generally when you're looking for the sport touring bikes, the choice comes down to wear in the sport vs. touring compromise the manufacturer has made. The feature differences largely center around creature comforts, riding stance, and convenience items. I'll start by covering the bikes in the order of sporty to touring, and make comments on height for each of them.

The first bike is the Triumph Sprint. This is a bike that is closest to a sport bike out of all of them. Unlike the BMW and the Honda, it does not have amenities like an adjustable windshield. In favor of a more sport like stance, the bike keeps your legs tucked and your body leaned more forward than the others. As far as the computer goes it has the standard options you would expect. The side bags are large, but not large enough that they can actually hold a full size helmet. The bike does wonderfully cornering, and even though it is the most anemic engine of the three, it does a reasonable job of handling. I have to admit I don't have a whole lot of experience riding this aside from exchanging bikes with a friend of mine. Since it is a sport bike seating position for tall riders is more of the tucked in variety you find with sport bikes. A tall person will not have a problem with it, but after any amount of time the ergonomics will start causing problems. According to the same friend, after about 80 miles it's time to get off the bike and stretch.

Second in order of sportiness is the Honda ST1300A. This is the bike I own and have the most experience with. The seat on the 13000 comes with and adjustable setting. I've only ever ridden this bike with the stock seat adjustment in the high position. It does a decent job this way, and helps to alleviate a lot of the problems from shorter seats. While seated on it, I can place my feat flat on the ground and never feel out of control with regard to the stability of the bike. In its stock configuration, I found that my main complaint was the seat, followed by knee pain on long trips. 

To fix the seat I made a couple of modifications. The first was to send the stock seat to Frank Turnier at Spencer's Moto Care. Frank does a fantastic job modifying seats. He replaces all of the foam of the stock seat, and tunes it to your ass. On the order form you specify your height, weight, inseam, and riding position and he performs his magic. At the time I got the standard modification as well as the long ride gel modifications. Where the stock seat caused excruciating pain after a few miles, Frank's modifications made the bike into an all day rider. It really is amazing what the modification does. The price is extremely reasonable at $75 for the full set of modifications. The turn around time is fast, I sent my seat out and had it back within a few days (minus shipping).

The next major modification I needed was a bit more leg room so I added a seat riser from Motorcycle Larry. This effectively eliminated any of the knee pain I was feeling. To further add to the comfort of the ride I added the highway blades, and pedal lowering kit. The blades allow you to shift your riding position and get more blood into various areas of your body by extending your legs. 


The Motorcycle Larry seat risers installed, and set to the highest setting.


The BMW R1200RT is the last in my list, and furthest away from the sport side of the spectrum. While modifying my ST1300 I considered just trading it in for a BMW which includes many of the features I was looking for. Out of the showroom the BMW has a couple of advantages. First, the handling is superb. It is a much lighter bike than the Honda, and handles at least as well as the ST1300. The Sprint is best overall in this area. Second, it can be fitted with many options that make the ride more comfortable. Heated grips, a seat warmer, cruise control, built in power for heated gear, and a decent stock seat make for many creature comforts. The bike I test rode had a stereo system with iPod and auxillary in for satellite radio. The stock seat is much more comfortable than the stock seat for the ST1300 and the Sprint. The height of the seat is likewise adjustable, and felt fine for what my 45 minute test ride. 

The only problem was the adjustable windshield. While the 1300 handily cleared the air around my head, alleviating the need for ear plugs, the RT did not. There's a small dip in the windshield that made it so the wind did not quite clear the top of my helmet. Some quick research shows replacement windshields that would alleviate the problem. 

The R1200RT and the ST1300 are both good bikes for taller people. Given the number (and more importantly price) of modifications needed for the ST1300, it comes out to nearly even with the BMW. Accounting for maintenance, the Honda definitely is the clear winner. While I chose the ST1300 the BMW is certainly a good bike to consider.