Archive

Posts Tagged ‘factorial’

Linkfest 4

February 21st, 2010 1 comment

Some links for y’all:

  • Chad’s love of code reviews—and I agree. It can be tough to expose your code to better eyes, but everyone is improved because of it.
  • Review Board—along those lines, here is an open source code review tool that was linked to in the comments for the code-review post.
  • Building Flash Multiplayer Games—a somewhat extended tutorial that I haven’t actually gone through, but looks decent.
  • What Really Happens When You Navigate To A URL. Semi-technical, and informative if you don’t already know it.
  • Factorial Lookup. Ever wonder what 182,731! is? (You might have to give it several seconds to download before it renders.) Sometimes the most practical way to solve difficult (or impossible) problems is to just try to look up the answers in a massive precalculated table. Also see Reverse MD5 Hash Lookup.
  • Arimaa—a modern game played on a chess board with chess pieces, specifically designed to make it difficult to write effective AI to play it.
  • Making Computer Science More Enticing. A good inspirational 2-minute vid at the top, and information about how Stanford University’s revamping of their CS program led to higher enrollment.
  • Understanding Weak References, a Java-oriented article, but generally applicable.
Share

Recursion

January 13th, 2010 1 comment

Check out this C code:

    void forever(void)
    {
        forever();
    }

Seems straightforward enough. The function calls itself, right? That’s recursion—when a function calls itself. In this case, it never stops calling itself. Probably on your implementation, this will eventually cause a callstack overflow and the program will die. (When you make a function call, the return address and function parameters have to be stored somewhere, and often they are stored on a stack. Each time you recursively call a function, more and more return addresses and parameters are pushed on the stack.)

Read more…

Share