UC Berkeley NewsView of Campanile and Golden Gate Bridge
Today's news & events
News by email
For the news media
Calendar of events
Top stories
Untitled Document
Web feature
 Sophomore Patrick Shyu, who aims to tame Tele-BEARS, has been programming since he was in elementary school. (Photos by BAP)

Student programmers are on a quest to find the Holy Grail of class schedules

- With a mindboggling 7,000 classes offered at UC Berkeley every semester, students have a hard enough time just deciding what to take. Then there's the matter of actually scheduling your classes. Once you've picked your electives and required courses, you may have to use graph paper to figure out which sections will leave Mondays open for that library job, for example, or mornings free for swim-team practice. Many sheets of paper later, you still could end up with a schedule that has annoying gaps in between classes - not long enough to go home and back, but too long to spend hanging around.

Fortunately, Patrick Shyu and other student programmers have crafted software that allows their classmates to avoid this agony. Currently a sophomore majoring in electrical engineering and computer science (EECS), Shyu recently put the finishing touches on "Final Distance," which he calls the "perfect schedule generator." Plug in your courses, click "Close the Distance" and the Web-based program races through all the permutations before presenting you with the ten options that should most closely match your dream schedule.

"This is so awesome! I'm sitting here with pencil and paper going, Ahhhhhhh! But now, Voilá! It's done! Thank you so much! You've saved me HOURS!" wrote freshman Summer Chrisman in the comments section of the Final Distance Web site.

Closing the gap

Those are the kind of comments Shyu likes. "I had the idea that there must be a better way, and I thought, I can do this," says the taciturn 19-year-old, who's been programming since he was in elementary school. "There's no reason why everybody has to spend so much time figuring this out every semester." On the site, he points out that if the average schedule includes four classes with seven possible times, that's 2,401 combinations.a lot of graph paper and brain straining. "I had the idea that there must be a better way...There's no reason why everybody has to spend so much time figuring this out every semester."

"I had the idea that there must be a better way...There's no reason why everybody has to spend so much time figuring this out every semester."
-Patrick Shyu

So in spring 2001 of his freshman year, Shyu began putting in long hours at a Davis Hall computer lab, writing and debugging the program's 3,000 lines of Java, PERL/CGI, and HTML code. Taking Japanese language classes in addition to film studies (Shyu is an accomplished computer-animation artist), he listened to Japanese pop songs as he coded. The lyrics of one song on heavy rotation, Utada Hikaru's "Final Distance," ended up being the inspiration for the program's title.

With Final Distance, students select their classes using a drop-down list of all departments and by entering the course number. A "More Info" button pulls up the course information from the online schedule of classes, while the "Add Class" button automatically enters the possible days and times the class is offered into the scheduler. Students can also manually type in course numbers, dates and times, or enter blocked-out times for jobs, lunch, or napping that they want to preserve. (Shyu's twin brother, Henrick, a student at UC San Diego, uses Final Distance to figure out his class schedule manually even though it doesn't interface to UCSD's online course listings.)

For the fall 2002 semester, "I had my schedule done in 10 minutes on the day of Tele-BEARS registration," brags Shyu. He posted a beta version around the same time, and Final Distance received more than 15,000 hits in the first two weeks of its release. Responding to user comments, Shyu added a "Bind lab/dis" feature, in case a class requires that students in a particular lab section register only for a matching discussion section. He also figured out how to incorporate a feature that complicates the program's algorithms considerably: an "or" function so that students can enter second- or third-choice classes in case their first choice doesn't fit their schedule. Final Distance spits out a nicely color-colored graph of your schedule, which can be formatted for printing and stored under a unique, anonymous ID number that students can access later and share with their friends if they choose.

Personal digital assistants

Final Distance is just the latest entry in student course scheduling programs. Ka-Ping Yee, a Berkeley graduate student in computer science, designed one called Calweek in August 2000 that's still in use, and there are other similar home-grown solutions.

But the best-known helper remains the scheduler created by Aman Bhargava in fall 2001, when he was a Berkeley senior also majoring in EECS. Inspired by Yee, Bhargava wrote his program, which relies on a more basic interface than Shyu's and has fewer nifty features, in a single day simply to streamline his own schedule planning.

"In past semesters, I'd used a spreadsheet to design my schedule, which changed very often until the middle of the semester. My program was intended to just automate that process," says Bhargava, who's now a software developer for Amazon.com. "I started out with a simple C++ program that took a textual list of appointments and outputted an HTML table that I could print or insert in a Web page. Then I realized that I could create a wrapper to schedule.berkeley.edu, which made it easier to enter class times."

Friends encouraged him to make it publicly available, so Bhargava announced the program in a few computer science newsgroups. Since then, more than 5,300 individual schedules have been designed and saved using his program. Even though he's graduated and is no longer upgrading or maintaining it, students are still using the program in droves: Bhargava's site was getting 20 hits per minute during the December registration period.

Registration blues

Although the three schedulers above retrieve or "scrape" data from the screen of Berkeley's online schedule of classes, users cannot register for classes using these programs. For that, they still must go through the Tele-BEARS system at the appointed registration times. "One nice addition would be the possibility to directly change one's schedule through connection to Tele-BEARS; I don't think they are likely to allow that though," writes a student on Bhargava 's comment pages.

That's not true. J.R. Schulden, the director of Student Information Systems (SIS), which coordinates Tele-BEARS for the Registrar's Office, says that SIS is working with faculty advisers of EECS students and graduate students from the School of Information Management and Systems to figure out whether and how to incorporate some of the schedulers' features. "These applications have been developed by students who are also users, which can have many benefits from a look-and-feel standpoint," says Schulden. "But there are many privacy and security issues that have to be worked out."

SIS is discussing a plan to set up an electronic "student sandbox" that will let student programmers have access on a secure basis to the databases that run the Tele-BEARS registration system. "We hope that in the next year or so, you'll start seeing student-developed programs become incorporated in the system," predicts Schulden, who admits that budget cuts have added an economic incentive to the idea.

Shyu, for one, says he'd gladly donate his scheduler to the University for use in Tele-BEARS. "I'd give it away. It would be good just to get Final Distance out there, so people can benefit from it," he explains. "That's more important than money."