Brain Teasers for Coders? 109
calvinandhobbes asks: "There are about 200 people working on different projects and most of them do programming without having an idea of what they actually do. they have little understanding of OS internals and primitive hacking skills. I want to enthuse them by providing some challenges by which they touch upon complex computing concepts, while solving the problem. Does anyone know of a set of C-based hacks or puzzles with which I can enthuse these budding programmers and testers?"
ACM Programming Competition Problems (Score:3, Interesting)
http://acm.uva.es/ [acm.uva.es]
Does Sphere count? (Score:3, Interesting)
Re:RSA (Score:1, Interesting)
??? The "RSA Factoring Challenge" [rsasecurity.com] is a challenge set by the RSA company to... factor large numbers.
This is a different proposition to breaking RSA encryption.
And yes, you do look like an ass now.
for a puzzle, try small or 1-line IOCCC winner (Score:3, Interesting)
I'd pick some of the short programs and 1-liner winners.
My favorite 1-line winner was submitted by David Korn (of ksh fame):
Print out the korn.c source [ioccc.org]. By just looking at it, ask them to tell you what it does and why.
Note that this 1-liner has stumped some people who have been coding in C for > 31 years. So if they get stuck, help them out by asking asking some questions such as:
And: And:p.s. We are in the middle of judging the 2005 entries. There are some good ones this year, IMHO.
Programmer's Koans (Score:3, Interesting)
"As Dennis Ritchie was pondering over the coding of the first UNIX kernel, a butterfly landed on his nose. And lo, he was enlightened."
"Stroustrup ran to the head monk, exclaiming, 'Master! I have added object-orientation to the C programming language! I have been enlightened!' to which the head monk responded by hitting him on the head with a stick."
"Theo DeRaadt looked over the cuts of meat in a butcher-shop, and complained loudly, 'This is all crap! What's the best meat you have here?' to which the butcher replied, 'Everything here is the best! You cannot have anything but the best!' and thus DeRaadt was enlightened."
"Once, a hacker asked master Torvalds, 'Does the Linux kernal have the Turing nature?' To which Torvalds replied, 'Get me a beer'."
And now a real quote, from Steven Levy's Hackers:
So Sussman began working on the program. Not long after, this odd-looking bald guy came over. Sussman figured the guy was going to boot him out, but instead the guy came over. Sussman figured the guy was going to boot him out, but instead the man sat down, asking, "Hey, what are you doing?" Sussman talked over the program with the man, Marvin Minsky. At one point in the discussion, Sussman told Minsky he was using a certain randomizing technique in his program because he didn't want the machine to have any preconcieved notions. Minsky said, "Well, it has them, it's just that you don't know what they are." It was the most profound thing Gerry Sussman had ever heard.
Project Euler (Score:2, Interesting)