I've had Java Puzzlers for a long time. I kept it on my desk at work, and sometimes during a full rebuild, I would read and try to figure out the next puzzler. I'd usually drag a coworker into it, too, which added to the fun. Slowly (quite slowly - over a year at least!) I've made my way through the book, and I'm down to the last 3 puzzlers - which I intend to finish tonight or over the weekend.
If you're not familiar with the book - most of the puzzles showcase a smallish snippit of code, with the question of 'what does it print' (or does it even compile). These puzzles are fun to think about, but most of them don't involve writing any code. (Some of them DO ask you how to write code that accomplishes some strange behavior, though - but only a few).
I'm looking for, or rather I suppose I'm writing about what I will do next. I have a couple of ideas - one being to finally march my way through Programming Pearls. The favorite book of one of my favorite professors in college. It provides ample coding exercises - many of which involve low level tricks.
Another idea that didn't occur to me until I started writing this entry is Project Euler. It's a great source of coding problems. I've done maybe a dozen previously, but as of this writing there are 265 of them. What's great is these are the type of problems that are useful to repeat again in different programming languages.
What's got me focusing on this is some recent posts I've read about Coda Katas. In particular I read this post on the Object Mentor blog tonight. There are a lot of links to other material there.
One further idea is to look up problems from the ACM's International Collegiate Programming Competition Problem Set Archive. There are countless good programming problems on that page.
There is definitely value in practicing what we do. This applies to any craft - but it seems to be sometimes neglected in ours. I think some kind of coding practice (in addition to testing practice) will be in my goals for next week. In particular to solve a new Project Euler problem or two, and to maybe do one from Programming Pearls as well.
What resources do you know of for good programming problems?
Showing posts with label practice. Show all posts
Showing posts with label practice. Show all posts
Friday, November 27, 2009
Friday, November 20, 2009
Practice your TDD
Misko Hevery made a great blog entry Tuesday. He posted a sample project for practicing TDD. We know that Beginners Need Steps, and that's exactly what he provided. Testing is a skill that is not innate - we as developers need somewhere to start.
In his post, he provides a starter project that can be grabbed from a Mercurial repository and used to practice TDD. The basic code is already layed out, including the first few tests. He even describes how to turn on a setting in Eclipse that will run your tests every file save. Slick - I didn't even know that was possible. That is serious TDD.
I consider this a personal testing homework assignment - I encourage anyone reading to do the same.
I will try to remember to post my resulting source & test code when I finish.
In his post, he provides a starter project that can be grabbed from a Mercurial repository and used to practice TDD. The basic code is already layed out, including the first few tests. He even describes how to turn on a setting in Eclipse that will run your tests every file save. Slick - I didn't even know that was possible. That is serious TDD.
I consider this a personal testing homework assignment - I encourage anyone reading to do the same.
I will try to remember to post my resulting source & test code when I finish.
Subscribe to:
Posts (Atom)