Posts Tagged ‘computer programming’

A Million Objects

Sunday, December 9th, 2007

From a Zen Kōan:

Gyosan asked Isan, “If a million objects come to you, what should you do?” Isan answered, “A green object is not yellow. A long object is not short. Each object manages its own fate. Why should I interfere with them?” Gyosan bowed in homage.

It’s good advice for programming multi-core, too.

Content Aware Image Resizing

Tuesday, October 30th, 2007

A friend at work just showed me this, and boy is it cool. “Seam Carving” is a new algorithm for image retargeting. Image retargeting is an alternative to scaling and cropping, but it is content-aware. Scaled images suffer from the problem that the re-sized content may be too small to see. Cropped images may eliminate important content. Image retargeting solves both problems by keeping the image elements the same size and simply eliminating the “unimportant” parts of the image.

Graphic artists occasionally modify images this way by hand when doing page layouts for magazines–think of it like a visual form of copy-fitting–but an automated approach opens a world of possibilities. The number of of potential practical applications are immense, and include everything from dynamic web page re-flowing to widescreen-to-standard aspect texture fitting for games.

[youtube:http://www.youtube.com/watch?v=vIFCV2spKtg 350 292]
A better version of the video as well as the research paper can be found on Dr. Shamir’s home page. What’s really neat is how straight-forward the method seems to be. The paper is well worth the read if you are interested in graphics algorithms.

If you’d like to play around with this technique on your own images, someone’s already implemented the algorithm in Flash.

Export Outlook Task Lists

Friday, October 26th, 2007

Outlook 2007 has a very cool feature that lets you embed your current calendar in an e-mail and send it someone else. Wouldn’t it be nice if you could e-mail your To-Do list as well? Now you can! This macro shows you how to generate a formatted e-mail that contains all of your current tasks, as well as a list of any messages that you’ve flagged for follow-up.

(more…)

Is ASM Really Dead?

Thursday, October 18th, 2007

I hear this question all the time: “I heard asm was dead. Do video games still use assembly code?”

The answer? No, but yes. Sometimes. Sorta. It depends.

(more…)

What is Source Code?

Tuesday, October 16th, 2007

Source code is a computer file that contains a set of instructions that tells the computer what to do.

Source code is written in one of many “computer languages”. A computer language is an artificial language that allows people to write instructions in a way that they can understand, yet still easily convert the instructions to “machine code” that the computer can understand. A special kind of program that converts source code to machine code is called a “compiler”. Some languages convert source code to an intermediate form and execute it a little bit at a time, instead of converting the entire source code file in advance. A special kind of program that does this instead is called an “interpreter”.

(more…)