Programming


  • Thursday, April 15, 2010 - 22:11

    This little program lets you create a bargraph of the number of results returned by a google search when replacing a small part each time. For example if you use
    Google Query: how to get better at <x>
    Search Terms: starcarft 2; kissing; cooking; robbing a bank; becoming cowboy neal

    It will plot the number of results returned by a google search when <x> is replaced by each search term. This means it would plot the number of results for each of "how to get better at starcraft 2", "how to get better at kissing", "how to get better at cooking" ....

    This was inspired by several XKCD comic strips like Numbers and Dangers. Of course, the numbers don't quite match up with the comics.

    Google query "<x>" will be replaced:

    Search terms to substituted into the above query (separated by semicolons):


  • Wednesday, February 17, 2010 - 15:36

     So I needed to bind a lambda function to an object. I've been writing code that needs to run faster than it currently does and I've traced some slow-downs to repeated comparisons that are really wasted and things don't change once the object is instantiated. For instance below is an example to show you how one might code something (note this is just an example, not actual code)

  • Monday, April 20, 2009 - 11:17

    For my Embedded Systems class I'm working on a project where we are doing some webcam capture and video processing/effects work. To make life simple we are using OpenCV, which rocks. Our language of quote-in-quote choice is C# and to work with OpenCV we are using EmguCV wrapper/binding/what-have-you. So, while working on code that has to capture a video frame, process the frame to do face detection and a video effect, then draw a frame to display to the user I decided to throw everything into its own frame.

  • Monday, April 6, 2009 - 13:16

    I have for some time now been using matplotlib to do all my graphing in python. Its a great package! Recently I've been wanting to do basic animation of graphs, while you'd think it would be simple has turned into a bit of a trek. There is a simple animation example found here: http://matplotlib.sourceforge.net/examples/animation/simple_anim_gtk.html it works okay, but if you try to move the window it freezes, and you can't use anything on the toolbar.

  • Monday, February 9, 2009 - 18:25

    So today I used my first function closure in Python. I had always wondered why/how someone would use them, but today after reading an article earlier this morning I ran across a place to use them while coding this evening. Here we go:

  • Thursday, December 11, 2008 - 10:37

    So I've run across the issu of tabs vs spaces again and have decided to put in my two cents. A nice overview of the topics is given here, but I disagree with is final conclusion. The topic actually consists of three points:

  • Sunday, August 10, 2008 - 14:26
    I've found out a couple of things while trying to write my test cases for SimpleTest:
    • You can debug the POSTs and GETs using <code>drupal_set_message($this->_content);</code> which will display the page as a message.
    •  
  • Saturday, August 9, 2008 - 21:34

    This is a list of automated tests that are run so far. There are four kinds of users that are used in the testing

  • Thursday, August 7, 2008 - 15:15

    Thanks to Kiam who posted a bug at http://drupal.org/node/292242 I learned a way to properly do requirements testing to make sure the core Blog module is disabled before EveryBlog is installed.

    Automated testing looks like its the way to go to help reduce the number of bugs that show up in releases. Drupal's SimpleTest module looks like it should be pretty straight forward, and it has plenty of helper functions to make my life easier as I code up the tests.

  • Saturday, July 26, 2008 - 12:54

    Nothing new, just a high-res picture.