I am interested in trying a few code-golf problems, but of a fairly easy level as I'm only a year old in terms of programming. Simple things, but that will make me think. I am comfortable in JavaScript and PHP at the moment.
+12
A:
I don't think you'll learn all that much from code golf as the goal there is to write incredibly short, concise programs. This is almost always accomplished by writing them in a way that would otherwise be considered very, very poor (difficult to read, no error handling, etc.).
I think a better approach would be to solve a bunch of these projecteuler problems. That's what I usually do to play with a new language.
Michael Haren
2010-05-03 00:44:49
I beg to disagree. Golfing has taught me a lot of things about a language I now use almost daily. After all you're forced to look at every possible language feature to evaluate whether it may be applied to make code shorter. While that's not usually your goal in normal development you *do know* those features then, you can just as easily change your goal. Project Euler has a pretty narrow scope as well and solving many of those problems isn't very fun or instructive with language that don't have built-in arbitrary-precision arithmetic, for example.
Joey
2010-07-04 16:47:54
There is so much more to software than the 15-level details of order of operations. I'd encourage beginners to look more into writing clear, testable code--with good design and obvious intent. The intricacies of boxing or quadruple ternaries can be entertained after a base of fundamentals is established
Michael Haren
2010-07-06 14:28:02
+8
A:
Anarchy Code Golf has a long list of problems to solve. Those marked post mortem will show the source code. Javascript and PHP are there.
But you must understand that using Code Golf to learn to develop software is like playing Scrabble to learn to write novels. You use the same tools, but the process is totally different.
Carlos Gutiérrez
2010-05-03 17:58:10