• Here are all articles tagged Python
  • Introduction To Unit Testing In Python & Ruby

    Posted on May 25th, 2013 | 236 Comments

    One of the things I noticed that isn't really taught much is creating test suites for your programs. A lot of times you'll just have sample input and output to test your programs. This works great for one off applications but doesn't really carry over to on-going application development life cycle, especially when new developers are constantly being added to a project.

    You don't need any crazy library to do testing. In fact Python and Ruby come with their ...

    read more

  • Fighting Comment Spam With Project Honey Pot

    Posted on May 11th, 2013 | 349 Comments

    Early on when developing this blog my goal was to allow for a commenting system that didn't require login of my site or any other third party site to post. This has made me a huge target for spammers. In fact when my site first launched I didn't use recaptcha so I was getting thousands of comments per day and I didn't really have all that much content. However, a majority of these posts never saw the light of day ...

    read more

  • Rotating a Matrix

    Posted on April 20th, 2013 | 145 Comments

    From time to time when I'm bored I'll go through seemingly simple programming/interview challenges. One that I found interesting was the following:

    Rotate an NxN matrix 90 degrees in the clockwise direction.

    Sometimes the question also has a "bonus" challenge of rotating the matrix in memory. So basically without creating a new array or matrix. I'm not really a fan of this addition since it takes the naive approach off the board. Granted the naive approach is really dirty ...

    read more

  • Creating an API With Django

    Posted on March 2nd, 2013 | 252 Comments

    It's been a crazy week for me put I wanted to make sure I got some useful content out. This week I'll be jumping back to python/django and talking about decorators and how they can be used for creating an API.

    A lot of people recommend Tastypie but I like to keep things simple when possible. Most APIs don't need anything as complex as Tastypie and just need something that can restrict access to some functions. Decorators make this ...

    read more

  • Introduction to Graph Theory: Finding The Shortest Path

    Posted on February 9th, 2013 | 306 Comments

    Graph theory is one of those things in the computer science field that has the stigma of being extremely hard and near impossible to understand. My goal for this post is to introduce you to graph theory and show you one approach to finding the shortest path in a graph using Dijkstra's Algorithm. Don't worry about learning everything in one go. If you can walk away with a few concepts and one or two things implanted in your memory you're ...

    read more

<< Older Posts