Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Possible Duplicate:
Programming Puzzles

Looking for ways to help me improve my C# coding skills. I thought it would be handy if there was a site that asked you to write a new method every day to perform a task (maybe even one for beginners, intermediate & advanced developers). Seeing comments as to how everyone pulled it off would be very handy to learn how to improve your technique.

Anyone know of anything like this? There has to be something like this on the interwebs :)

share|improve this question
8  
Why not help answer C# questions on SO? –  Bernard Jun 7 '11 at 14:54
    
If you don't feel confident enough to answer the questions, you can still try and work out a solution by yourself and get the practice you want. When you come up with a useful solution that isn't already amongst the question's answers, you can always add yours, even if the question already has an accepted answer. –  Marjan Venema Jun 7 '11 at 15:28
    
@Bernard: you know that the god of SO is also the god of C#? So why pushing god further? :D –  WarrenFaith Jun 7 '11 at 15:35
add comment

marked as duplicate by Mason Wheeler, Steve Evers, Anna Lear Jun 8 '11 at 4:46

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

5 Answers

If you like math, I would suggest Project Euler. A question is released every week, but there are currently over 300 questions posted, so it could keep you busy for a while at least.

share|improve this answer
5  
I don't get why everytime someone looks for ways to improve his coding skills PE is recommended. PE is very good to improve your mathematical skills but I don't see how it makes you a better programmer. –  Oliver Weiler Jun 7 '11 at 15:36
5  
+1 I've found that when I'm trying out a new language, I try tackling PE problems and it DOES help. Maths puzzle are perfect candidate for code "kata". Why? because it forces you to concentrate on the puzzle NOT the language. This can accelerate how you learn a new language. –  Darknight Jun 7 '11 at 15:43
    
@Helper Method - I find that you improve your coding skills by doing problems that are outside your normal daily routine. PE is definitely that. Also, if you take the time to read the comments after you've solved a problem you may find a new trick you didn't know before. I've gone back and tweaked code after finishing problems before. It is what you put into it. –  Tyanna Jun 7 '11 at 16:15
1  
@Helper Method - Because solving math puzzles pretty much covers everything you'd want to do (or able to) using code. While a lot of PE puzzles can be brute forced, a fair amount requires you to optimize your code if you want it done in a reasonable time. That's a very good skill to have. –  System Down Jun 7 '11 at 20:02
    
@Oliver, some of the problems challenge you because the naive implementation run out of stack or takes forever. For instance, try solving problem 282 asking for a sum that turns out to be a bit tricky: projecteuler.net/index.php?section=problems&id=282 –  user1249 Jul 26 '11 at 0:54
add comment

One website that I love playing around with when I get a minute is http://www.pexforfun.com/ by Microsoft Research. It requires you to write code that will cause the unit tests to pass, without you knowing the specifics of the unit tests. All it tells you is what inputs it passes in and what outputs should be given. It's good for improving your algorithm skills, in my opinion.

Some of the puzzles are stupid (since they are user generated) but there are quite a few good ones.

share|improve this answer
    
I alredy knew pex as unit testing tool. pexforfun is nice and it's cool to know what happends behind the scenes. –  mbx Jun 7 '11 at 16:10
add comment

I assume you are not just trying to familiarize yourself with the standard library. If this is your sole goal, refer to the other answers.

I doubt you would actually improve your C# coding skills with something like this. C# is an extremely feature-rich language, which makes it far harder to decide which tools (e.g. events, LINQ queries, covariant genericity, inout vs. ref parameters etc.) are best applied to what problem domain. Within the scope of a daily quiz question, the problem is too narrow to challenge these skills.

Instead, I would encourage you to find a cool project idea with a certain amount of complexity allowing you to apply all these different tools.

share|improve this answer
add comment

Whenever I wanted to get up close and personal with a new programming language, I picked a project I always wanted to do, set aside some time for it and then just started doing it. And while I went along, I usually learnt not only about the programming language, but also about new algorithms and fundamental design principles, too.

The most important things are an explorative, open mind, and an approach that allows you to experiment. If something doesn't work, take a few steps back and try something different.

share|improve this answer
    
+1. Isn't this how PlentyOfFish got started? Now look at the poor sap... he has to keep up with running one of the busiest websites on the net. Nice problem to have and I bet he ended up learning more about ASP than he ever imagined. –  Jason Jun 7 '11 at 15:40
add comment

A source of interesting problems with solutions is ActiveState's Cookbooks. This is especially true for Python (3300+ recipies), but there are entries for several other languages.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.