Code is Poetry

I recently ordered a new mug from  “Code is poetry,” it says on one side, with my favorite programming language, C♯, on the other.  Code really is poetry, and now let me relate a memory that I thought of on my drive home from work today.  (Sorry in advance.  This post doesn’t have very much focus.)
code_is_poetry_mug C#_mug

Continue reading

Amazing Concept Video of Future Technology, “Future Vision Montage”

Think what you want about Microsoft, but if you don’t know Microsoft Research, you don’t have the whole picture.  I just found this concept video, titled “Future Vision Montage” on Gizmodo.  I think I might have recognized more of the theoretical technologies than the casual onlooker since I’ve seen other Microsoft Research projects, but basically this video has technology do everything possible to maintain the appearance of magic.  This is generally called “augmented reality” and is an unbelievably cool field of research.

Here’s the Soapbox video:

Maze-Solving Robot

Botball is an annual robotics competition.  I am part of the Botball club at my high school, and I thought I would share a little project that I just finished.

My goal was to have a generic robot with a camera on it that all of the club members could write code for.  First the task was to make the robot bounce around in an arena marked off with red tape, then the goal was to make the robot follow a line (curvy, with sharp edges, with dead ends, whatever), then it was to make the robot solve a maze.  It was a lot of fun, and a great learning experience.

One look at the robot shows that I definitely care about software way more than hardware.
Side View
front view 

It may not look like much, but surely you know that personality is more important than appearance, and besides this little guy has spunk.  If I were to continue this project, though, the next step would be to make him less fat.

Here’s the maze.  In theory the robot can solve any maze of this style.  (Yes, the end of the maze is a mouse pad. :-P)
Maze Picture

Here is the robot solving the maze.  Keep in mind that the robot can be placed in any part of the maze with the end anywhere else in the maze. 

I found by experimentation that the longest time it can take the robot to solve this maze, given any start and any end, is 1 minute and 54 seconds.

If there’s one bit of advice that I think new Botball members need to know, it’s to be patient.  The first version of my maze-solving code was really just code that made the robot follow lines.  A later version would only solve a maze if it never encountered a dead end, and there’s always the version of the code that makes the robot flail about sporadically.  So be patient, and don’t try to tackle the whole project at once.  Get little pieces to work, and use that to build off of.  I in no way assert to be the authority on robotics, but I have learned a thing or two. :-)

Oh, also precise names.  Don’t go calling methods “dog” or “cat”.

Download the code here.

Here I made a video explaining in general terms how the robot stays on track when following a wall:

So you may want the code to mess around with, and if you do then you’re in luck!  Not only is there a link to download the code at the bottom of this post, but I also recorded two videos of me explaining it, or attempting to anyway. :-P  Warning: It may be a little boring!

In this video I explain the defines, whose values you can change to make the robot behave differently:

In this video I explain how the rest of the code works:

(Note:  I found an error in the deadEndInSight method.  I fixed it incorrectly on video, but it should be right in the download below.)