Archive for the ‘Code Snippets’ Category

Code Snippet: Make Outlook Move Deleted IMAP Items to Trash

Friday, October 19th, 2007

One of the shortcomings of Outlook 2007 is that it does not allow you to automatically move deleted IMAP items to the Trash folder instead of marking them for deletion. This functionality is available in most other e-mail clients–and it’s even available in Outlook if you use Exchange–but it’s not available in Outlook if you use IMAP.

This limitation really bothers me, so I wrote this VBA macro to work-around the problem.

(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…)

Your Own Turing Machine: Part II

Sunday, October 7th, 2007

Last time we built a Turing machine as a rainy-day project. Today, I’ll show you how to use it to do something useful, like add two numbers together. (more…)

Build a $2 Computer

Monday, October 1st, 2007

In 1936, Alan Turing conceived of a machine that helped lay the groundwork for modern computing. These extremely simple machines, dubbed Turing machines, are in theory able to simulate the logic of any known computer that can possibly be constructed. While Turing originally conceived of his machine only as a thought exercise and never constructed it, it is possible to build and program a simple version of Turing’s computer for only a few dollars worth of basic office supplies.

This is a fun afternoon project for all ages, and a great way to introduce both kids and adults to the fundamentals of computer programming.

(more…)