Kakuro Solver

July 1, 2010

Kakuro (also known as Cross Sums) is a popular number-based logic puzzle. It resembles crossword puzzles, except instead of clues made up of words, you have clues made up of numbers indicating the sum of the digits in the indicated cells, with the additional constraint that no entry contain the same digit more than once. [...]

0

I’ll take Pwtent Pwnables for 400 please, Alex

May 26, 2010

This past weekend, I participated in my first ever DEF CON Capture the Flag Qualifying Tournament. CTF is a contest at the aforementioned annual hacker conference where the goal is to keep your team’s network services (which are on a closed intranet) up and running for as much as possible, while simultaneously trying to bring [...]

0

One more note about exit statuses

May 19, 2010

Last week, I mentioned in passing that Windows allows the full range of 32-bit exit codes. That’s true, but only if you directly call ExitProcess() (or its less-friendly kin TerminateProcess()). If you just call exit() (or return from main(), which implicitly calls exit()), then like in the *NIX world, you only get the bottom 8 [...]

0

So what’s in an exit status anyways?

May 13, 2010

Last time, we saw how we can capture a process’ core dump. The astute reader will have noticed that we seem to be pulling bits out of thin air: int status; if(wait(&status) < 0) perror(“wait”); if(WIFSIGNALED(status) && WCOREDUMP(status)) … We’ve got a 32-bit exit status, and yet we seem to getting two more useful bits [...]

0

Dumping core

April 23, 2010

Your program just crashed, and you didn’t have a debugger attached. You can’t reproduce the crash after many attempt. How you do debug the problem? Well, if your program had left a core dump, you could easily attach a debugger postmortem and get some kind of idea what state the program was in before it [...]

1

Spaces and Tabs

July 3, 2009

Like emacs vs. vi and what line you put your braces on, the issue of spaces versus tabs for indentation will always be a holy war among programmers. I’m from the always-use-spaces camp, but that’s not what this blog post is about. Pretty much any editor worth its weight in gold (which is not very [...]

0

Beware of struct properties

January 1, 2009

Objective-C is an interesting programming language. Unlike C++, it’s a strict superset of C — every valid C program is a valid Objective-C program. While most C programs are valid C++ programs, there are certain incompatibilities such as the introduction of new keywords that make the relationship not strict. One of the many features that [...]

0

Underhanded C Contest

July 25, 2008

I recently discovered the Underhanded C Contest. It’s a contest where the goal is to write a C program which looks like it’s innocently doing something straightforward, and yet it slyly doing something innocuous which is not at all obvious from reading the source code. The shorter program, the better, since it’s a lot harder [...]

0