Category Archives: Software Development

Thoughts and resources related to software development — anything from programming languages to version control to floundering around in various OSes!

Headache-free course scheduling with the UofT Timetable Generator

Get the UofT Timetable Generator for free on Google Play!

While many things at the University of Toronto are wonderful, the process students have to endure to piece together a course timetable each year is far from enjoyable. I’ve hinted at this before, and the issue is that it’s a headache to pick all the courses you want and fit them into a schedule that…

  1. has no time conflicts;
  2. ensures that you don’t have eight hours of back-to-back classes on Mondays and Tuesdays and no classes for the rest of the week; and
  3. ensures that you don’t have a class that ends at 10 pm and a class that starts at 9 am the very next morning (because I have to commute at least an hour each way and I need to sleep, dammit).

My friends and I are making this timetable-construction process go down a bit smoother with the UofT Timetable Generator, an Android app we developed this summer. It may not be ingeniously named, but the UofT Timetable Generator resolves the first two problems and does it quickly and efficiently. All you have to do is type in the courses you want, hit “Generate”, and you get your optimal timetable without developing a headache along the way!

The UofT Timetable Generator also offers the following options to better tailor your schedule to your needs:

  • Morning: Prefer morning courses when possible
  • Evening: Prefer evening courses when possible
  • Spread: Distribute courses as evenly as possible throughout the week
  • Packed: Pack courses into the fewest days possible

The UofT Timetable Generator is free to download and use, and is available at the Google Play store. The app only supports St. George campus’ Faculty of Arts & Science courses at the moment, but we do intend to expand support to all campuses and faculties at the University of Toronto in the future. Regardless, we invite you to check out our app! We’re eager to get some feedback to figure out what next steps we should take with our app.

For more UofT Timetable Generator-related things, check out the app’s website! We have a few goodies there, like an explanation of our timetable generation algorithm, which we built from scratch, and links to Android resources that we found to be very helpful.

kill -WINCH $$ to fix bash prompt wrapping to the same line

Sometimes, my bash prompt wraps long lines incorrectly, such that I’m typing over my own prompt like this:

My bash prompt is wrapping long lines onto itself! The horror!

I used to just live with it, trying to remember what I already typed and counting characters if I was going back to change something. That made my Unix experience much more frustrating that it should’ve been, because executing this single command immediately resolved the issue:

kill -WINCH $$

What does this do? You’re basically telling bash that the window size has changed. It turns out that if you resize your terminal window, bash sometimes doesn’t notice the size change without you giving it an extra nudge. Without the correct window size in hand, bash can’t wrap your text correctly!

If that doesn’t solve your bash wrapping woes, then it may be because your prompt format is incorrect. (Yup, I’ve been there, done that.) Do echo $PS1 to see what your prompt is, make changes and test drive your updated prompt by doing export $PS1='your_new_prompt_here', and save the version that makes you proud to be a shell user by putting export $PS1='your_amazing_new_prompt_here' in your ~/.bash_profile. Arabesque has a detailed guide on formatting your prompt, and Fabien Loison has way too much info about adding colour to your prompt.

Have fun at the command line!

Getting svn to ignore files and directories

Who knew it would be so hard to get svn to ignore some files and directories?

I’m working on an Android project, and I wanted svn to stop looking at me questioningly regarding files and directories that were automatically generated every time I built my source code. Basically, I needed svn to completely ignore the following:

  • bin/ and gen/: directories with generated code
  • proguard/: directory generated by my editor, Eclipse
  • .classpath and .project: Eclipse project files
  • local config file
  • Thumbs.db: annoying Windows thumbnail database files that are EVERYWHERE
  • All built Android files, which have the extension .apk or .ap_
  • All Java class files, which have the extension .class

I didn’t think it would too difficult to get svn to ignore some files for me, but it turns out that svn really likes to pay attention to my files. Hours passed before I finally got svn to relax and ignore what I wanted it to. Below the cut, I share my newfound wisdom with you.

Continue reading

Python: “Don’t be so self-centered!”

Programming languages are better people than we are.


The one-day Thanksgiving holiday did not help alleviate the heavy term tests and assignments that I suffered the past two weeks. Consequently, comics remained half-finished on my computer instead of navigating themselves to this blog.

I hope to finish at least one of them this weekend…but since I have another slough of assignments to finish this weekend, completing that small task will feel like a major accomplishment.

Stanford’s free AI course

But how can you resist free stuff? But how can you resist free stuff? But how can you resist free stuff?


Stanford University is offering its CS221 Introduction to Artificial Intelligence (AI) course online to anyone who wants to take it for FREE. Sebastian Thrun and Peter Norvig will be teaching the online version of the course along with the in-class version at Stanford. It seems as though lectures will be via YouTube videos, and assessments will come in the form of multiple choice and fill-in-the-blank questions. (I could be wrong about the assessment format, but it doesn’t seem likely they’d ask for short or long answer from online students who aren’t paying tuition fees. Teaching assistant wages aren’t that cheap.)

The class will run from October 10, 2011 to December 16, 2011, and once you finish it, you’ll get a letter from the professors telling you how you did. You won’t be handed a Stanford certificate, unless you’re actually enrolled as a student at Stanford.

Enrollment hasn’t started yet, but you can sign up to be notified about when the enrollment does start.

Even though I know I’ll be up to my eyes in actual course work this year, and I know that the comic above may be a very accurate prediction of my future if I do take the AI course… I’m still kind of interested in enrolling. It’s free. It’s from Stanford. It’s about Artificial Intelligence.

I wonder if this course has a drop date.