While I can't say that I had anything to do with the filming and editing of these videos, I did put together the content for these two videos on Algorithms and Binary Search. Hopefully they're useful!
If you are interested in learning more about computer science, I urge you to check out all of the other videos that were put together for Harvard University's EdEx course, CS50x. You should also check out EdEx in general -- there's a lot of good stuff!
Wednesday, September 26, 2012
Wednesday, August 1, 2012
Door + Computers = Table
I ran in to a problem the other day: we needed a comfortable place to sit, talk, and do research at the office that wasn't in a conference room. Where do people like to have conversations? Around coffee tables, of course! Yes, we could buy a table, or go to a coffee shop, but why not just use what we already have around us that we're not using?
Fortunately for me, I happened to have access to two old MacPro machines. They are probably about 5 or 6 years old and were just sitting in a corner collecting dust (actually, since they are so heavy, one of them was being used as an anchor to secure a laptop to with a security cable). Also, being friendly with the higher-ups in charge of infrastructure of the Stata Center at MIT, I was able to get a free piece of glass. As you can see from the picture below, these pieces are normally used in the doors.
So, yes, we have a (geeky) coffee table that is both great looking (in my humble opinion), and functional (you can sit by it, and because the top is glass, we can use dry-erase markers to take notes on the table while talking). Of course, the amusing thing about this is that each of these computers were about $4,000 new... meaning we essentially have one of the most expensive coffee tables... Oh how technology becomes obsolete so quickly!
Tuesday, July 17, 2012
Drive Across the US in Less Than 20 Minutes
During a cross country drive from Massachusetts to California, I mounted a camera on car dashboard and made it take a photo about every 10 seconds. That's right, that little shooter took a total of 16,497 (and 3,498 miles of driving) photos over the course of our trip. Fortunately for you, those 16,497 photos have been distilled down to a hopefully manageable video for your viewing pleasure. Without further fanfare, here it is.
Oh, and in case you are wondering, I used an "old" Canon SD600 with hacked firmware to take these photos.
Oh, and in case you are wondering, I used an "old" Canon SD600 with hacked firmware to take these photos.
Sunday, July 1, 2012
OS X Fuse and SSHFS on a Mac
I do quite a bit of work where my files reside on a remote machine. Of course, I could log in to the remote machine and work on the files there, copy them to my local machine and then copy them back, use an editor that can read files from a remote machine, or many other methods. However, how about the cooler option of mounting the remote filesystem locally and then working on the files as if they were on my machine? Oh, and yes, since we want to be secure, we'll do all that over SSH.
To get this to work you'll need to install OS X Fuse. In case you care, OS X Fuse is an implementation of Fuse, which allows the creation of a filesystem in userspace. OS X Fuse, only installs the necessary library for the creation of that userspace filesystem. To be able to mount a remote directory on your local machine over SSH, you'll also need to intall the SSHFS libraries, which are conveniently located on the OS X Fuse page.
Once everything is installed, you can mount a remote file system using your terminal as follows:
To get this to work you'll need to install OS X Fuse. In case you care, OS X Fuse is an implementation of Fuse, which allows the creation of a filesystem in userspace. OS X Fuse, only installs the necessary library for the creation of that userspace filesystem. To be able to mount a remote directory on your local machine over SSH, you'll also need to intall the SSHFS libraries, which are conveniently located on the OS X Fuse page.
Once everything is installed, you can mount a remote file system using your terminal as follows:
local$ sshfs user@host:/path/to/dir /local/path/to/mountpoint -ovolname=NameOfMountedVolumeThis will take the directory found at "/path/to/dir" on the remote machine and mount it locally at "/local/path/to/mountpoint" and call the directory "NameOfMountedVolume". Now you can navigate to that directory using the terminal or Finder as if it were a local directory. To unmount it, simply run
local$ umount /local/path/to/mountpointPretty cool, eh?
Sunday, May 20, 2012
You Git. No, I'm Not Insulting You!
Coming from having used SVN for many years, I had to do some reading to figure out what this Git this was all about. Yes, there are many other "Git How-To's" out there, but I thought I'd share the notes that I took. Be forewarned, this only covers the basics and doesn't touch upon the important topics of branching and merging.
After you’ve installed git, you probably want to check to see that your details are correct, so that when you are working with a team that your name and email are correct. To check what your name and email are set to currently, do (most likely these are not set, so they will return nothing):
If you don't use Eclipse, but don’t like the command line for git related stuff (and like a nice UI), take a look at Tower. Sorry, that's OS X only...
By the way, since the above remote git repository requires SSH access to the server, every user that wants to work on that project needs to have SSH access to that machine. If you don't want to setup separate (SSH) accounts for every user, you can use a tool called gitosis or gitolite. However, if you have access to a machine to which all users already have SSH accounts, you probably don't need to do this (in case you care, I've never used either of those tools).
The Basics
For details on what Git is and all of the nitty gritty details, I would recommend you check out this page, along with the complete git reference. However, the first thing that you will likely need to do is intall it. More complete instructions can be found here, but here are links to the OS X and Windows installers.After you’ve installed git, you probably want to check to see that your details are correct, so that when you are working with a team that your name and email are correct. To check what your name and email are set to currently, do (most likely these are not set, so they will return nothing):
local$ git config --get user.name local$ git config --get user.emailIf you want/need to make changes, do:
local$ git config --global user.name ‘Your Name’ local$ git config --global user.email you@somedomain.
Create a New Local Git Repository
Let’s say you just want to put the files on your machine in git to do some version control and don’t need/want to use an external server. For that, simply go to the directory that you want to put under version control and do:local$ mkdir MyFirstGit local$ cd MyFirstGit local$ git initWhen you take a look at what's in your MyFirstGit directory, you'll see a new .git directory. This is where git stores all of the metadata. (Unlike svn that has a .svn directory in every subdirectory, there is only one .git directory in a git repository). So, fundamentally, git repositories are composed of two things:
- The data. I.e. the “working tree” of directories/files.
- A .git directory that contains all of the metadata
local$ git add .Assuming you had some files there to begin with, you’ll want to make an initial commit to save your starting point.
local$ git commit -m “Initial import”Note, if you don’t want to do “git add [filename]” each time you add new files, you can combine the git add and git commit steps by doing (i.e. adding that -a flag):
local$ git commit -am "My message"Now, in many cases you may want to use a separate git server to keep track of all your projects. Note, since git is a distributed version control system, you technically don't need a git server, you can just push/pull all of the data to/from your collaborators' computer(s) directly. However, it is often easier to have a central place for the repositories so that the URL stays the same. If you want to set up a get repository server, read on.
Create a New Remote Git Repository
To set up a new git repository (i.e. it's a new project your starting and don't already have a git repository on your local machine) on a server you'll want to do the following (note, if you have an existing git repository you want to put on a server, see the next section):local$ mkdir myProject.git local$ cd myProject.git local$ git init --bare local$ scp -r myProject.git [user]@[remote]:~/path/to/repositoriesAs you can see, I am assuming that you have a server somewhere with SSH and/or SCP installed. The init --bare tells git to create a "bare" repository that does not contain any of the actual data and only keeps the metadata about the project (for more info on why this is important, take a look at this page).
Clone the Repository
Now that the repository is on the server, you can clone (the equivalent of"checkout" in svn speak) the repository.local$ git clone ssh://[user]@[remote]/full/path/to/repositories/myProject.git
Create a Remote Git Repository For an Existing Local Repository
If you already have an existing git repository that you have been working with on your computer, you can do something very similar except that instead of creating a new repository, you clone your existing repository (albeit making it a “bare” one)local$ git clone --bare /path/to/myExistingProject.git myExistingProject.git local$ scp -r myExistingProject.git [user]@[remote]:~/path/to/repositories
Making Your Repository Point to the Server
Now that you have the bare repository on the server, you’ll want to make your local repository point to the one on the server. Of course you could clone the remote repository as above, or you can simply add a “remote” location to your existing project. If your repository was cloned from somewhere else and already has a default origin, you’ll first want to remove that origin. To check if it is pointing somewhere else do:local$ git remote -vIf you see an origin entry there, you’ll want to remove it
local$ git remote rm originNow you can add your new origin.
local$ git remote add origin ssh://[user]@[remote]/path/to/repositories/myExistingProject.gitOr, include the port if you are not using the default port for SSH (22).
local$ git remote add origin ssh://[user]@[remote]:[port]/path/to/repositories/myExistingProject.gitOf course, you can name this remote location anything you want (or add multiple ones). The “origin” is simply the alias that will be used when you push data (see below).
Commit Changes to the Repository
Having cloned the repository you can now add/remove files and then commit them. Let’s assume that you are in some existing git repository and you create and add a new file:local$ echo “a” > a.txt local$ git add a.txt local$ git commit -m “Added a new file, a.txt”The files are now committed to the local “cache.” No one else will see these changes since you haven’t told the server that you made the changes. To publish your changes do:
local$ git push origin masterThis tells git to push your data to “origin” (the place you cloned the data from) to the branch called “master” (the default branch). For a more detailed explanation on pushing and pulling data from a repository, take a look at this.
Miscellany
If you are using the Eclipse IDE, the EGit plugin will allow you to work with git repositories from within the IDE.If you don't use Eclipse, but don’t like the command line for git related stuff (and like a nice UI), take a look at Tower. Sorry, that's OS X only...
By the way, since the above remote git repository requires SSH access to the server, every user that wants to work on that project needs to have SSH access to that machine. If you don't want to setup separate (SSH) accounts for every user, you can use a tool called gitosis or gitolite. However, if you have access to a machine to which all users already have SSH accounts, you probably don't need to do this (in case you care, I've never used either of those tools).
Friday, January 20, 2012
On the Offense: My Thesis Defense
After six and a half years at MIT, I was finally allowed to stand up in front of my thesis committee (and guests) and defend my PhD thesis. Although the road was long, and often very bumpy and windy, I reached the end unscathed. Well, I do have quite a few more grey hairs than when I started, but that's just a minor detail.
In case the above (long) video of the defense is not enough to make you fall asleep, here are the actual slides for the defense and the thesis document. I assure you, if you download the thesis, you will be one of a very select few to do so. If you read it, well, then you will be in an even more elite crowd. =)
Thank you to all the family and friends that made this all possible! I wouldn't be here if it weren't for all of your support!
Subscribe to:
Posts (Atom)