Bryce Boe

The Adventures of a UCSB Computer Science Ph.D. Student

Skip to: Content | Sidebar | Footer

Dynamic Programming – Coin Change Problem in Python

4 November, 2009 (22:35) | General | By: Bryce Boe

I assisted in hosting the UCSB Programming Competition again this year. Doing so rekindled my love for dynamic programming algorithms, thus why I prepared an example similar to this one for my class and why I wrote this post.

In my own words, dynamic programming is a technique to solve a problem in which previous solutions are used in the computation of later solutions. The generic coin change problem is, given coins of a specified denomination and a number N what are minimum number of coins needed to make change for N? If you don’t like my definitions see wikipedia for dynamic programming and coin problem.

You might be asking yourself, why is this even difficult; don’t I always just take the largest coin possible, as is done when making change with US coins? You’re right, that approach works with US coins and this approach is called a greedy approach. However, if the coins are of value 1, 3, and 4 then the greedy approach would say the best way to make change of 6 is with three coins: 4, 1 and 1. As you’ve probably figured out the correct, or optimal solution is with two coins: 3 and 3.

As I’m very fond of python I coded up a solution which should work in any circumstance so long as 1 is one of the coin denominations. The solution works as follows: Calculate the minimum number of coins to make 1, 2, 3, …, all the way up to the number we want to make change for. At any given point, i, the minimum number of coins to make i is dependent upon previous solutions.

I’m going to be kind of lazy and not actually explain the process as the code is pretty self explanatory, with one addition: The code doesn’t just calculate the minimum number of coins, but rather calculates what coins were used to make the minimum at each point. See the code below.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/env python
import os, sys
 
def solve_coin_change(coins, value):
    """A dynamic solution to the coin change problem"""
 
    table = [None for x in range(value + 1)]
    table[0] = []
    for i in range(1, value + 1):
        for coin in coins:
            if coin > i: continue
            elif not table[i] or len(table[i - coin]) + 1 < len(table[i]):
                table[i] = table[i - coin][:]
                table[i].append(coin)
 
    print '%d coins: %s' % (len(table[-1]), table[-1])
 
 
if __name__ == '__main__':
    def usage():
        sys.stderr.write('Usage: %s value\n' % os.path.basename(sys.argv[0]))
        sys.exit(1)
 
    # Modify this to alter the denominations of coins
    coins = [1, 3, 4]
 
    if len(sys.argv) != 2:
        usage()
    try:
        value = int(sys.argv[1])
    except ValueError:
        usage()
    solve_coin_change(coins, value)

Pre-Summer Recap

17 August, 2009 (23:58) | General | By: Bryce Boe

Wow, where has the time gone? In my absence a great deal has happened in my life so I’m going to break it up into a few chunks starting with stuff prior to the summer.

As I briefly mentioned in Flat Stanley’s Adventures, winter quarter I TAed the Compilers course for Tim Sherwood, one of my favorite Professors. As a TA I was primarily responsible for the course projects. I decided to write automatic grading utilities, which despite the occasional bug were quite beneficial to the students as they received immediate feedback when submitting their project. Additionally they were able to submit projects multiple times, thus allowing them to fix problems they might have overlooked. As my end of quarter reviews were pretty good, I was selected as one of four Outstanding TAs for the quarter in our department.

In addition to TAing winter quarter, I took two courses. One was a security related course on malware and reverse engineering lead by my soon to be adviser Chris Kruegel. The projects in the course had us write a simple Windows root kit, a ELF virus, a crack and a keygen for contrived programs, among a few others.

The second course I took was taught by Klaus Schauser and was on scalable web services. Klaus previously was a Comptuer Science professor at UCSB however, he left to found Expert City which later was bought by Citrix thus becoming Citrix Online. He now is the Chief Strategist for Appfolio a Santa Barbara company that provides an online solution to Property Management. This particular course interested me as it is seldom offered and web related topics fascinate me. A group consisting of myself, Adam, Jeff, Jon, Krithika, and Shashank created the website torrentphobe which was a torrent tracking service that utilized social networks. It worked wonderfully, however after the course ended, and the money for the servers was no more, we decided to shutdown our service.

During winter quarter I applied for summer internships. Naturally I reapplied with Google, applied to Microsoft and a few other companies, however I never would have thought of applying to AppFolio if I hadn’t taken Klaus’s scalable web services class. I had little knowledge of AppFolio prior to interviewing, however I wanted to interview simply to catch a glimpse of a pair programming company in addition to gaining interview experience. The interview went quite well, and to my surprise I was given an offer equivalent to that which Google would offer. After careful consideration and discussion about finding an appropriately challenging project, I was sold, and accepted before Google even got back to me on my application. I must quickly say that I’m over halfway through my internship and Appfolio is a fantastic company to work for. I only have a few weeks left; it will be sad to leave.

Spring quarter I took a single course, Advanced Computer Architecture with the same Tim Sherwood I TAed for. On a quick side note Tim is the Professor that held the Programming Battle Adam and I won in the spring quarter of our freshmen year in addition to taking us to Riverside for the ACM Programming Competition the following four falls. Thus I knew this class would be amazing even if the material weren’t the most enticing. The papers were definitely dense but I learned some damn cool stuff. Therefore I’m glad I took the class.

My main focus spring quarter was with my TA responsibilities for the Operating Systems course. I again gained a great deal of valuable experience, however grading for these projects was not as straightforward as the grading the previous quarter. The projects had very little area between doesn’t work at all, and works perfectly. Thus in attempt to accurately grade the students’ understanding of material the projects were designed to convey, I had the groups demo their projects. I think it worked out quite well, however as one student pointed out in their written review it, the demoing process is not a perfect method. They wrote, “[P]lease grade more harshly. People who BS’d the assignments got the same grade as people who did them right.” Nonetheless whomever they were comparing against must have done a good job at BSing.

Toward the end of the quarter notification came out that the graduating seniors elected me as the Computer Science Outstanding TA of the year. That quickly became a topic of toast when I was out with friends at a bar. I recall a few times Adam or Scott would introduce me as Bryce, the TA of the year. I attempted to not let it go to my head; sometimes I succeeded and others I failed. Such is life.

On the Scotty and Adam topic I attended their Master’s graduation ceremony, which was oh so boring. However, as with our undergraduate graduation, this one naturally came the mimosas in the morning and much other celebration so it was worth the hours in the sun. As all good things must come to an end, the celebrations didn’t last too much longer. A few days later we all moved out of our place on Sesame Tree. I moved down the road to Storke Ranch, and Adam and Scott temporarily moved home to Sacramento prior to their big move to Washington to work for Microsoft. The move marked the end of an era: the end of the Three Musketeers. However, the move also marked the start of a new life for me, which has been great so far. Nonetheless Scotty and Adam are missed.

Computer Science at the Center of the Universe

28 May, 2009 (00:23) | General | By: Bryce Boe

I was just watching the keynote for Google I/O in which Google’s CEO, Eric Schmidt said, “I’m one of these people who believes Computer Science is at the center of the Universe.” I think this is one of my new favorite quotes. Quote at 4:34 in the video below.

It’s very exciting to read about the latest and greatest technology. Sometimes, however, I stop and wonder if all this technology really for the better? I was reading a blog post by Michael Zimmer titled Amusing Ourselves to Death: The Comic. His posts are mostly about online privacy, however, this particular post brought attention to a comparison between Orwell’s 1984, which I’ve started reading, and Huxley’s Brave New World, which I’ve now added to my reading list. I don’t have time to provide my thoughts on the matter, nonetheless I thought it was worth sharing. I’ll end by saying that if this technology wasn’t for the better, then I’d be out of a job :)

Teaching My First Lecture

5 May, 2009 (22:02) | General | By: Bryce Boe

I previously mentioned that I was the Teaching Assistant (TA) for the Operating Systems class this quarter. It’s going quite well, though just as I remember, this class is a lot of work for the students, and a hell of a lot of work for the TA. I recently finished grading the third project in the class, and am now continuing my preparation for tomorrow’s lecture.

Tomorrow’s lecture is super exciting for me because not only do I get to lead it, it is my first time talking to a mostly full class for an hour and fifteen minutes. I teach discussion sections each week, however these differ in that roughly only half the class shows up, and additionally I don’t have to prepare much material since discussion sections go in the direction that the students desire. Tomorrow, however, this is not the case. I was given lecture slides from which it is my responsibility to impart knowledge onto the students about a specific topic, and that is exactly what I intend on doing.

I’ve read the relevant sections in the book from which the slides were prepared and I have even thought up some questions students might ask. To top it off, I’ve even planned some stupid jokes, such has how I am planning to say, “It’s a trap!” when the kernel traps due to an invalid memory access. I don’t want to give away too many of my tricks, but hopefully you get the impression that I’m excited and ready for tomorrow’s lecture.

Am I nervous? Absolutely not. I was nervous to prior to teaching my first few discussion sections last quarter, however talking in front of Computer Science students has simply become part of what I do. I’d probably be nervous if I had to instruct a class for a different department, but I’m always nervous the first time I do something new.

To end this I want to write that I’ve finally updated my CV on my Computer Science home page. If you’re interested in what academic and professional things I’ve been up to check it out.

My Little Bro Pitching

23 April, 2009 (19:52) | General | By: Bryce Boe

Connor Pitching

Connor Pitching

This past weekend my littlest brother pitched for the first time. Word has it that he pitched 3 consecutive strikeouts! Go Connor. However, this word needs to be taken with a grain of salt as it comes from our mom, who as most moms do, occasionally neglect unfavorable details.

My past weekend involved getting scuba certified with Adam, Daria, and Margaux as we did our four beach dives. We now can rent scuba tanks and are _allowed_ to dive down to 60 feet. I must say that scuba is awesome, though I’d much prefer having gills to wearing ~75 pounds worth of gear. Gillyweed would be sweet too. Unfortunately it doesn’t exist… yet.

Backups

6 April, 2009 (17:53) | General | By: Bryce Boe

I turned my computer on this morning and to my dismay my 9 month old 1TB harddrive could no longer be detected. It is still under warranty so it’s no big deal about the hardware going bad, however it is a big deal that I didn’t have a backup of anything on the drive. Fortunately it only consisted of replaceable content, however it will take quite some time and bandwidth to regain that content.

This drive failure emphasizes the importance of backing up my unrecoverable data, and I’m curious as to what methods other people use for backup. A few months ago I backed up a good amount of information to Amazon S3, however doing that on a regular basis is not the simplest task, and probably isn’t the best place to store sensitive information unless it’s encrypted. The other thing that’s important to me is synchronization between my desktop and laptop, of which the challenge is my laptop runs OS X and my desktop runs Ubuntu Linux. I currently use rsync to move files back and forth, however it’s not a good solution when I wish to delete or rename files. I also am considering using GIT to store version information which so long as only 1 is considered the master there should be no issues.

Also on a semi-related note, if you want to run make clean on any folder under your current one which contains a makefile for archiving purposes try the following command:
find . -iname Makefile -exec dirname {} \; | while read i; do make clean -C $i; done

Random Lines from a File

23 March, 2009 (01:36) | General | By: Bryce Boe

The following is my python implementation of choosing N random lines with equal probability from a file. This implementation is both memory and time efficient unlike other solutions. This problem was originally brought to my attention after a friend was asked a similar problem at a Google interview. Additionally a few weeks ago I was catching up on Jonathan’s blog and came across his March 2008 post about this problem. I submitted a similar solution to the one below in his comments.

Anyway, a naïve solution to this problem involves calculating a random position in the file, with the file size being the max. However this solution does not give equal probability to each line as longer lines will more likely be selected.

The simple solution involves counting the number of lines in the file and then choosing N random lines. However this requires a scan over the entire file to count the number of lines, and then in the worst case an entire scan over the file to print each random line. This is time inefficient if the file is massive in size.

One optimization is to store the seek position of all the line indexes in memory, thus avoiding the scanning to print out each random line. However this requires storing a number for all the lines in the file, which is memory inefficient if the file has a ton of lines.

By choosing whether to keep or replace the selected lines at each step in a single scan, one simply needs to store N positions into the file thus being both time and memory efficient. I’ll leave the exercise of proving that each line is selected with equal probability up to you.

Edited: Added prev so that the first line would be included, and replaced file.readline()[:-1] with file.readline().strip() to remove trailing whitespace properly.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/env python                                                          
import os, random, sys
 
if __name__ == '__main__':
    def error_exit(msg):
        sys.stderr.write(msg)
        sys.exit(1)
 
    # Verify arguments                                                         
    if len(sys.argv) != 3: error_exit('Usage: %s FILE NUM_LINES\n' %
                                      os.path.basename(sys.argv[0]))
    text_file = sys.argv[1]
    if not os.path.isfile(text_file):
        error_exit('%s does not exist, or is not a file\n' % text_file)
    try:
        num_lines = int(sys.argv[2])
    except ValueError:
        error_exit('%s is not a number\n' % sys.argv[2])
 
    seeks = [0 for x in range(num_lines)]
    file = open(text_file)
    count = 0
    prev = 0
 
    # Calculate Random Lines                                                   
    while file.readline():
        for i in range(num_lines):
            if random.randint(0, count) == 0:
                seeks[i] = prev
        prev = file.tell()
        count += 1
 
    # Print Random Lines                                                       
    for i, pos in enumerate(seeks):
        file.seek(pos)
        print '%d: %s' % (i, file.readline().strip())
 
    file.close()

How do I end it?

11 March, 2009 (20:59) | General | By: Bryce Boe

Next quarter I am TAing the Operating Systems course at UCSB, which was one of my favorite classes (I even mentioned it here- see junior year), despite it being considered the most difficult required Computer Science course. For our class of ~50 students we had 3 TAs for whom this class sucked the life out of. The class next quarter currently has 39 students enrolled, and I am the only TA, so it’s going to be an adventure to say the least. Fortunately the projects seem much simpler than when I took it so that’s a good sign. I think the projects were simplified due to the struggle that our class had on the projects, which is why I’m writing this. The following is the uncensored (though names shortened) email thread that took place the night our last project was due. This is by far the most hilarious email thread I’ve been a part of, so enjoy. By the way, “How do I end it” was the title of the thread.

Note: V was our TA, Ben Zhao was the instructor and CSIL is the name of the computer lab

[DK]:Sat, Jun 9, 2007 at 1:21 PM

[V],

I’m in CSIL and all I have is a coke can, a frisbee, a racquetball and about 800 lines of non-working code. My question is: How do I off myself while still passing this class?

I’ve tried swallowing the frisbee, and drowning in coke, but neither have produced the correct output. Please help as the deadline is approaching fast and I need the sweet release.

Thank you,
–[DK]

[CW]:Sat, Jun 9, 2007 at 1:33 PM

Place the racquetball in your mouth and bite down while someone slowly poors coke in your nose. Its called “waterboarding” (but with coke) and thanks to the bush administration its now completely legal as long as you consider yourself an “illegal csil combatant”.

or try: kfree([DK]);

-[CW]

[V]:Sat, Jun 9, 2007 at 4:50 PM

ok…ur pleas were heard….we are extending the project deadline by a day…so the deadline is tomorrow sametime…

instead of ur cokes,racquetballs and frisbees…try drowning in ur code and biting through the design docs…this, my friend, is called “coding” :)

hav fun,
v

[AL]:Sat, Jun 9, 2007 at 4:55 PM

How about actually helping us instead of just pushing it back. Some of us make plans and when you guys keep pushing it back it gives an unfair advantage to those who do not have other things to do.

[DK]:Sat, Jun 9, 2007 at 4:56 PM

I appreciate the thought, but I don’t think I or anyone else in the computer lab would like it extended. I was really just making a joke. We just want to be done with it.

Thanks though

[SR]:Sat, Jun 9, 2007 at 4:56 PM

V,
DO NOT extend the deadline, its finals week. just curve it so everyone’s unfinished codes can earn at least a C or C+. I cant be spending another entire day on this assignment. I say we turn in what
we had time for and go our seperate ways, until the demo that is.

 -[SR]

[PC]:Sat, Jun 9, 2007 at 4:56 PM

can we please not have an extension?

that post was just a joke
I think that it is not fair to the students that worked to get this project done on time to extend it.

[CW]:Sat, Jun 9, 2007 at 4:57 PM

Ummm….

Ok so I can speak for [DK] and say that he wasn’t really going to kill himself. That was a joke PLEASE don’t give us an extension. We just want it to end. For the love of god.

We have been in CSIL for 3 days straight and no one wants to be here any longer. Have mercy.

-[CW]

[KW]:Sat, Jun 9, 2007 at 4:58 PM

Thanks [V]!!
With an extra day I think I can finish. Things are starting to fall into place, just takes a _crapload_ of time.

Thanks a lot.
-[KW]

Me:Sat, Jun 9, 2007 at 4:58 PM

I agree for not extending it as well.

Bryce Boe

[VW]:Sat, Jun 9, 2007 at 4:58 PM

no!!!!!!!!

i don’t think the project should be extended by a day. we already had a last minute extension and that is already messing up other plans. there is no time for another extension. DO NOT extend it!!!!!!!!!!!

[CS]:Sat, Jun 9, 2007 at 5:00 PM

Please [V], don’t extend the deadline!! Anyone who is a CE has a large report due on Monday, and most of can’t afford to keep working on this project through Sunday.

[S]:Sat, Jun 9, 2007 at 5:00 PM

[V], can we PLEASE not have an extension. It’s finals week and we
have other things we need to concentrate on.

[BM]:Sat, Jun 9, 2007 at 5:00 PM

NO EXTENSION PLEASE.

[D]:Sat, Jun 9, 2007 at 5:00 PM

The original extension was more than enough. If you would have heard the cries of anger in CSIL when this extension was discovered you would have most likely drawn back in fear. Please don’t prolong the
agony, most of us have accepted the fact that we will never finish this project…even if it were extended to next quarter.

[V]:Sat, Jun 9, 2007 at 5:00 PM

ok ok…i understand what u guys are saying..i shot an email to ben and will probly NOT extend it…so till i confirm it pls stop the animosity

[ZU]:Sat, Jun 9, 2007 at 5:01 PM

NO EXTENSION UNLESS WE GET THE SOLUTION BY TONIGHT!!!!

[SG]:Sat, Jun 9, 2007 at 5:01 PM

Please do not extend (unless you want to give us another week or two) Quarter does not end with this CS project, people have things to do before and during the finals week. No extension! This project will
need to be turned in so we can move on and work on other things!

[DK]:Sat, Jun 9, 2007 at 5:02 PM

THANK YOU!!!!!

[ER]:Sat, Jun 9, 2007 at 5:04 PM

[V] + rest of CS 170 staff,

I am adamantly opposed to this extension (as well as to the original one for that matter). This extension benefits very few people, mainly those who have the easiest final schedules. For most of us, this is not the case, and we will be forced to cut the project short even more prematurely than before. This is necessary so that grades in our other classes don’t suffer.

The same people made the original “pleas” also likely failed to start the project on time, and/or are simply incapable of completing this project with a reasonable time alotted. Thus, this extension will actually hurt the students that have done their best to go about this project the proper way. I say this even after only being able to start the project on Sunday night because of ECE 152B.

I encourage you to (re)level the playing field and remove this extension.

Thank you,

[ER]

[PP]:Sat, Jun 9, 2007 at 5:05 PM

Move the deadline up! How about we just all turn in what we have right now and save our Saturday night? Party at Zhao’s place.

[AW]:Sat, Jun 9, 2007 at 5:05 PM

[v]…. for the sake of jeses, moses, allah, mormon jeses,
whtever…….
DO not extend this deadline….. I have already made plane to be hungover by tomorrow morning.
I dont care about any of this crap right now.

[CD]:Sat, Jun 9, 2007 at 5:07 PM

I am sincerely AGAINST an extension. I have put in ridiculous amounts of time over the last couple days to be done tonight…not to extend it for others. I think it’s pretty unfair.

[ML]:Sat, Jun 9, 2007 at 5:07 PM

Is [AW] already drunk? assert(typing skills);

[V]:Sat, Jun 9, 2007 at 5:10 PM

NO EXTENSION..just got confirmation from Ben. Lets get it done with by tonite!

[KW]:Sat, Jun 9, 2007 at 5:12 PM

I digress. don’t extend, just curve it. this project takes way too much time. we should have been given 8 units for this class if we’re going to have to be in the lab for 200 hours over the course of the quarter in addition to class + reading + studying.

[DK]:Sat, Jun 9, 2007 at 5:13 PM

[dk]:/ cd shitcreek -paddle

[CW]:Sat, Jun 9, 2007 at 5:15 PM

/:~> cd /cs/student/[dk]
/:/cs/student/[dk]> touch his_balls
cannot touch `his_balls’: Permission denied

[PP]:Sat, Jun 9, 2007 at 5:16 PM

It doesn’t have to compile or work right?

Me:Sat, Jun 9, 2007 at 5:16 PM

I think this is more appropriate:

[dk]:/ cd ../shitcreek -nopaddle

Bryce Boe

[DK]:Sat, Jun 9, 2007 at 5:17 PM

[dk]:/ chmod 777 my_balls

[ML]:Sat, Jun 9, 2007 at 5:17 PM

I think it’s fair to say that we have officially lost our sanity and will not be able to recover.

*point*[CW].

[DK]:Sat, Jun 9, 2007 at 5:18 PM

Try now, [CW]

[AW]:Sat, Jun 9, 2007 at 5:26 PM

[ML]

Considerable scientific research has shown that a healthy breakfast must include a six pack of corona.

[ML]:Sat, Jun 9, 2007 at 5:28 PM

Ballin.

Me:Sat, Jun 9, 2007 at 5:30 PM

I’d be very interested in that data. Is 7 too much, and 5 too few?

Bryce Boe

[ST]:Sat, Jun 9, 2007 at 5:36 PM

I have to agree that sanity has long since left this group. But then again, I think sanity is only a hinderance for those who take this class.

My proof?

[ST]:-> cd CS170
[ST]/CS170:-> whatis sanity
sanity: nothing appropriate

[AW]:Sat, Jun 9, 2007 at 5:43 PM

That’s an excellent question. This study was compiled by the isla vista students education intiative by experimenting on street bums. The results were very conclusive and it was found out that exactly 6 beers (corona extra only) provided enough “feel good factor” to fully enable the test subjects to enjoy their day. However the study recommends 2 jager shots every four hours after consuming breakfast to prolong this feel good factor.  or the subject can go to a strip bar. either works

cheers

[AW]

Flat Stanley’s (not so) Adventures at UCSB

3 March, 2009 (21:51) | General | By: Bryce Boe

My brother Connor recently mailed me a letter that read:

Dear Friends and Family,
In Social Studies we have been discussing communities and what makes them work. To help us learn more about other places, we would like to ask you for your help. Included in this letter is our friend Flat Stanley. Stanley has had a tragic accident. His dresser has fallen on top of him and now he is flat. The good news is, we are able to put him in an envelope and mail him to visit you.

We are asking you to take good care of our friend during his stay and to please send us a postcard or a letter from where you live. In your letter please tell us what Flat Stanley will be doing and seeing while he is visiting you. We are particularly interested in what kinds of jobs he see[s] people doing, where he goes to have fun, the kinds of foods he eats, and the kinds of clothes he wears while visiting you. Please feel free to include any pictures of your family with Flat Stanley from around your community or activities that you may do with him.

In lieu of mailing back a letter I chose to write about Flat Stanley’s visit here.

Flat Stanley arrived in via snail mail Tuesday February 10 at ~8PM just in time for diner. Scott had prepared some chicken and pasta while Adam and I were coming back from campus. Following dinner, Flat Stanley watched the previous night’s Daily Show with us, and then aided me with one of my course projects. This project involved subverting the security checks in place in a particular computer program, which was a bit too daunting for Flat Stanley so he did a little reading and then went to bed.

Over Flat Stanley’s two-week stay he spent most of his non-sleeping time on campus. That involved getting up at 9:45 every morning to catch the 10:25 bus to UCSB, and typically arriving back home around 8PM. On campus he attended my two graduate courses, Scalable Web Services, and Malware, as well as both the lecture and discussion for the undergraduate Compilers course I am a teaching assistant for. Additionally during his visit Flat Stanley helped my Scalable Web Services group launch our website torrentphobe, and helped me grade my students’ projects.

Unfortunately Flat Stanley didn’t get to see too much other than UCSB. Aside from being able to see the ocean and mountains from campus, Flat Stanley neither visited the beach nor the mountains. The rainy weather was of no consequence in skipping these visits, but rather my terribly busy life as a graduate student.

Despite the rainy weather, Flat Stanley wore sandals because when one doesn’t have waterproof shoes it’s much preferred to quickly dry your feet than to have to wear wet shoes. Other than sandals, jeans and a sweatshirt were the standard attire.

The food Flat Stanley consumed while visiting seldom varied. Time permitting, which it almost never did, breakfast consisted simply of milk and cereal. The most essential consumable of the day is the morning coffee I usually grab when first arriving on campus. Lunch consisted of either chow mien with either orange chicken or barbequed pork, or a chicken Cesar salad. Dinner varied the most with Flat Stanley’s favorite meal being our beefy spaghetti, which we have roughly twice a week.

That’s pretty much it. I doubt Flat Stanley will want a to visit again, though if he does he’ll probably make me promise to be more interesting. A promise I likely will not be able to make. The following are a few pictures of Flat Stanley’s visit.


Flat Stanley watching TV with Scott and Adam


Flat Stanley eating dinner


Flat Stanley working on a Malware project


Flat Stanley reading


Flat Stanley sleeping


Flat Stanley working on torrentphobe with Jon and Adam


Bye bye Flat Stanley

Everything but Research

18 November, 2008 (01:57) | General | By: Bryce Boe

So much has happened this quarter that it’s now difficult to recall specifics, but knowing all too well that it only gets more difficult with time I’ll try to recall some of the more awesome events. Early in the quarter the computer science department hosted an industry related event. One of the cool talks was by Google’s director of research, Peter Norvig. The annual Computer Science Fall Kickoff Barbeque followed the event in which Christo and I made it to the final three of the water balloon toss. While this alone would be no spectacular feat, we performed trick throws the entire time, with Christo throwing under the leg, and myself performing the scorpion toss. Unfortunately one of Christo’s under the leg tosses came up short, and we were defeated.

That same night we celebrated Adam’s birthday by Pub Golfing in downtown Santa Barbara. Pub Golfing is an event where participants dress up as golfers and score plus or minus strokes at a list of bars. Since we aren’t too crazy, we only did a 9 bar (hole) Pub Golf, which included penalties for PDA, water hazards, or bars at which people, couldn’t pee, and sand traps, or being caught talking to a cougar. Bonuses were offered for drinking the hole specialty, downing a drink in a single attempt, buying drinks for others and drinking more than the 1 required drink per hole. No one was penalized for a water hazard, but Adam did get trapped in the sand when a cougar pounced. Fortunately he escaped from the cougar’s paws before more penalties occurred. It was a glorious night.

The weekend following the previous events I decided it was time to properly network our apartment, so I took it upon myself to run wires between the rooms through the attic, as well as between the first and second floor. Wiring between the rooms was a piece of cake but getting between the first and second floor was a bit trickier. I’ll just say involved a coat hanger and some duct tape. With our house fully connected we can now stream movies or TV shows from any computer in the house down to our huge ass rear projection TV, which we got for $100 from our old neighbor.

As one of three co-chairs for the UCSB ACM club, I have organized and ran two events. The first was the Annual UCSB Programming Competition, which we use as a qualifying round for the Southern California Regional Competition. This year, sixteen students competed in the competition, which greatly surpasses the turnout from years past. The top 9 willing participants went on to compete in the regional competition in Riverside this past weekend. This year was the first time in UCSB history that we were able to send three full teams to the competition. I consider this a success the department, the club, as well as for myself.

The second event I organized was an Install Ubuntu event in which anyone was welcome to drop in and install Ubuntu on their computer. In all, about ten people successfully installed Ubuntu on their laptops, with zero failures or data loss. I was impressed that the wireless adapters on all the laptops worked immediately after installation, which has been a problem with Linux in the past. One person had a problem with their computer randomly freezing after a period of usage. We unfortunately could not alleviate this issue. Despite the one problem, I feel this event was a huge success, and expect an even bigger turnout next year.

Excluding what has really been taking up the majority of my life for the last eight weeks this pretty much covers everything up until now. My next entry will really focus on the adventures of a Ph.D. student.