Knapsack Problem

Sunday, March 9th, 2014

The knapsack (or backpack) problem is a classic dynamic programming problem. While there are a lot of variations of this problem, this post will only focus on the 0/1 version. This challenge was formally introduced over a century ago and pops up in many different areas including cryptography, resource management, and complexity theory. It is also a popular challenge in programming interviews at several large companies.

Continue reading...

Primitive Texture Compression

Wednesday, February 5th, 2014

PTCX a very simple compressed image format that I designed in 2003 as part of my Vision 1.0 project. This format features a basic adaptive quantization scheme that is reasonably effective for low frequency texture information (e.g. grass and gravel), and supports a wide variety of pixel formats (and high quality alpha).

My goal for this project was simply to explore image quantization and create something similar to the DirectX Texture Compression (DXT/S3TC) formats but with significantly greater flexibility (albeit without hardware support!). I dug PTCX up the other day and decided to see how it performed against the Lena test image.

Continue reading...

Technical Interviews 2.0

Saturday, November 16th, 2013

It's no secret that technical interviews are tough to get right. They're draining on the candidate and are a notoriously difficult way to assess a person's technical qualifications. Over the last 8 years I've been heavily involved in the interviewing processes at a number of different companies. I've given over 250 interviews, served on several hiring committees, and screened countless resumes.

After a while I started to realize that many great candidates were incorrectly discarded by the process, while many less than stellar candidates were managing to get through. If technical interviews are a key discriminator for the hiring process, they do not appear to be very effective.

Continue reading...

You Can't Play Xbox One Games on a PS4

Sunday, September 1st, 2013

In June of 2013 Sony and Microsoft unveiled the hardware details of their next entries into the upcoming console generation — the PS4 and Xbox One, respectively. Like many others, I couldn't help but notice the similarities between the two platforms. Both supposedly use an 8 core AMD Jaguar based CPU and a Radeon GCN GPU, integrated into an AMD Fusion package. Both platforms also have 8GB of unified memory and a Blu-ray drive.

Continue reading...

Imagine Kernel Internals

Saturday, June 15th, 2013

Imagine is an image processing framework that I began writing in 2009. The framework makes it easy to load, manipulate, and analyze images and perform lots of common tasks. I've used imagine in several of my projects involving graphics, games, computer vision, and artificial intelligence. There are a lot of components in the framework that we could cover in this post, but I'd like to focus on one particular area: image resampling.

Continue reading...

Negative Shift Operands in C++

Saturday, March 5th, 2013

A few years ago I came across a snippet of code that was causing problems in a multi-platform product I was working on. The code was attempting to perform a shift-right operation but, in certain circumstances, used negative right hand operands.

The C++ language supports this as valid syntax (it should compile), but the results are undefined (see ISO 9899:1999 6.5.7). Needless to say, use of negative right hand shift operands is highly discouraged!

For the sake of simplicity, I've expanded a series of macros and reduced the offending code down to the following trivial example:

Continue reading...



previous page    |    1    2    3    4    5    |    next page