Challenging projects every programmer should try
<i>The biggest challenge is figuring out how to store the text document in memory. My first thought was to use an array, but that has horrible performance if the user inserts text anywhere other than the end of the document.</i><p>The counter-argument to that is that processors are ridiculously fast in human timescales --- copying memory at gigabytes per second --- so unless you're focusing your use-case on editing correspondingly huge files, there's no real need to make your implementation more complicated than a single array. Even when DOS machines with <640K of memory and memcpy() speeds in the low MB/s were the norm, people edited text files of similar sizes, with editors that used a single array buffer, and for that purpose they weren't noticeably slower than ones today.<p>My ideas for challenging projects are a little less open-ended, so they exercise  different set of skills: being able to implement a specification correctly and efficiently.<p><pre><code>    - TTF renderer
    - GIF or JPEG en/decoder
    - Video decoder (start with H.261)
</code></pre>
IMHO being able to consume existing content with code you wrote is very rewarding.