
Become a better programmer with programming challenges - johannoren
http://macgyverdev.blogspot.com/2014/04/become-better-programmer-with.html
======
jholman
I agree with several already-existing comments that programming challenges do
not help you become a better programmer (assuming that you're hireable in the
first place).

I will note, however, that they DO HELP with interviewing. The skillset is
quite overlapping... artificial time-pressure, artificially contrived
problems, cleverness is rewarded, etc. (But it's not entirely the same,
because programming contests don't give points for half-working answers).

Also, IMO the best coding contest site is
[http://code.google.com/codejam/](http://code.google.com/codejam/), because:

1) GCJ has unusually clear problem statements. UVa in particular is terrible
for this.

2) GCJ supports EVERY programming language (unlike all others I know of except
Project Euler)

~~~
jsnell
I disagree strongly with that.

First, in all programming helps you become a better programmer, just in the
same way as playing the piano makes you a better piano player. Even if you
already know how to play the piano, you still need to put in the hours to
improve (or even to maintain your skills). The more you program, the more
parts of the act become total routine that you don't have to pay any attention
to.

Of course programming contests or challenges might not be the optimal thing to
do to increase your programming skills. But the comparison isn't to
programming something else, it's most likely to somebody wasting time by
playing a video game, reading blog posts, watching TV, etc. If a contest acts
as a extrinsic motivator for somebody to program something, how can that be a
bad thing?

In my experience it's incredibly common for someone learning a new language to
lose steam quickly due to not having anything to write. We'll always give the
advice of just writing some program they need. But amazingly enough many
people just don't think of the world like that. To them a well structured
problem set is just what's needed. It'll allow them to learn the new language,
and learn something else on the side.

But you're also making the assumption that a coding challenge can't teach you
anything useful which is blatantly untrue. I learned a lot about writing
efficient data structures for a certain class of problems during the Netflix
Prize. Likewise for solving some of the harder ITA software puzzles. I'd known
the theory of stack smashing attacks on a very vague level, but having to
properly figure out how to do (microcorruption) it was a completely different
thing, incredibly fun and helpful. Likewise the Matasano crypto challenges --
learning to crack badly applied crypto made me acutely aware of ways in which
I've badly applied crypto in the past.

I'll admit that there's probably nothing of practical value to learn from e.g.
doing high level Perl Golf.

~~~
yodsanklai
"First, in all programming helps you become a better programmer, just in the
same way as playing the piano makes you a better piano player."

I think it's a good comparison. Programming contest would be a very specific
part of piano playing, like playing scales super fast. It's useful, but still
a very small part of what it takes to making music.

~~~
fizwhiz
I agree that doing these challenges helps you play the scales super fast. But
I think the important segue to acknowledge is that the fastest pianists don't
necessarily make the "best" pianists in terms of the quality of the
compositions they're able to churn out. I'm saying that being a super fast
pianist is not a necessary and not a sufficient condition to become a great
pianist. Does it help? Sure it does! It helps to move up and down the scales
and play rachmaninov for the evening's entertainment effortlessly, but at the
end, it becomes one of many ingredients required to actually "make" good
music.

The question is, is there a really good balance that we could engage in? What
part of lives are best spent practicing heavily (and perhaps "composing"
lesser music) and what's the best indicator to transition into a part where
you're not practicing as heavily, but you're composing more music.

------
yodsanklai
Those programming challenges are certainly interesting and they make a great
learning tool but they use a very specific set of skills. Usually, the
difficult part is to find an algorithm that solves the problem within the
given constraints. Implementation is comparatively straightforward.

To me, they are more "problem solving contests" than programming contests. The
code is just there to validate the solution.

~~~
izacus
But that IS the gist of development - figuring out how to solve a problem
efficiently. Writing code is usually the easier part.

~~~
watwut
Depends on task. I found out that when dealing with large systems, it is not
an algorithm that is the biggest problem. The gist is usually to find out and
keep in head how various parts interact and what exactly they do. The hardest
and most important is to figure out how to make each change in such a way that
above will be as simple as possible (eg. keep the system clean and
maintainable without hacks and dirty tricks).

Both parts (figuring and writing) are figuring out, but both are entirely
different from programming challenges. First requires you to be able to
decipher someone elses code reliably and fast. Second requires you to figure
out how to do things as little fragile as possible.

Algorithms are more about solving isolated more math-like problems. Once you
got solution, you do not need to consider anything then making it work, so it
is different kind of code. Even if you would plug in it into some large
system, it is would be isolated so you can actually afford to be more dirty.

~~~
collyw
Do you see this being analogous to where systems testing versus unit testing
are most appropriate?

------
myth_drannon
And also [http://codingbat.com/](http://codingbat.com/) somewhat basic.
[http://www.pyschools.com/](http://www.pyschools.com/) (mostly basic python).
[http://www.hackerrank.com](http://www.hackerrank.com) all levels , many ML/AI
challenges. [http://www.codewars.com/](http://www.codewars.com/) quite large
set of problems.

------
stugrey
I actually run through the first few Project Euler
[https://projecteuler.net/](https://projecteuler.net/) problems whenever I am
looking to play with a new language. It was really eye opening comparing my
answers in Haskell to my answers in the procedural languages.

~~~
lifeisstillgood
And that's the winner in my book - this is not about doing a test or challenge
once, and passing some "exam". Its about stretching me and discovering more
about the strengths and weaknesses of certain languages and environments - I
should do more little practises like this, but in different ways.

------
steventhedev
There are many sites like this, with different focuses:

Project Euler (mathematical problems):
[https://projecteuler.net/](https://projecteuler.net/)

Rosalind (bioinformatics): [http://rosalind.info/](http://rosalind.info/)

Are my two favorites. There are others, of course.

~~~
tkirby
Codility has a good choice of languages;
[https://codility.com/train/](https://codility.com/train/)

~~~
Yunk
Interesting, I've been enjoying
[https://www.codeeval.com/](https://www.codeeval.com/) which also has the
headhunter based model and supports a few more languages, but doesn't have the
time limits like a real code interview usually would.

------
jurassic
I've really been enjoying codewars.com because you get to see the solutions of
others after you pass all tests. I've learned a lot of little javascript
tricks this way.

------
svetlyak40wt
You'll become a much better programmer working on real project. Believe me.

~~~
jaegerpicker
I disagree. A real project will teach you a set of problems that are useful at
most day jobs but these coding challenges will help you learn a class of
skills and techniques that are very hard to learn/figure out on your own.
These are much more centered around Computer Science problems than typical
software craftsmanship problems. You need both (CS and software craftsmanship
based skills) if you want to a complete well rounded Engineer.

~~~
collyw
I have 11 years in the industry in various jobs. I was very good in the
algorithms and data structures part of my course when I studied it, but the
frequency that I actually get to use any of that stuff is maybe a couple of
weeks per year.

I would say that learning libraries and how to use them will be far more use,
as most common problems have been solved, implemented, put in a library and
tested for you. A good programmer will use that library rather than reinvent
the wheel.

------
jschulenklopper
The submission deadline for the 2014 contest is today, but otherwise Hello
World Open ([https://helloworldopen.com/](https://helloworldopen.com/)) would
have been an interesting programming challenge to participate in.

Positioned as a sort-of World Championship for programmers, it is a virtual
slot car race. The challenge is to create an AI and drive a slot race car on a
track against other racing bots. Very entertaining... Finals will be played on
June 10th in Helsinki, Finland.

------
arikrak
For beginners, easy programming challenges are very practical, since they let
them practice getting their loops and conditions right.

Afterwards, programming challenges become a little less practical since they
are more challenging than practical programming. However, I think one can
still make challenges that are practical, and I'm thinking of doing this on my
site [http://www.learneroo.com](http://www.learneroo.com).

------
myth_drannon
I'm looking to practise my SQL skills, are there any website that offer SQL
challenges and not only regular math/comp-sci questions ?

~~~
AlisdairO
Hey, sorry for the self-plug, but try
[http://pgexercises.com/](http://pgexercises.com/) . It lets you try SQL
exercises in the browser and offers decent explanations to go with it. It's
focused on PostgreSQL but the large majority is standard SQL.

There should be a pretty decent range of difficulties for you to test yourself
on.

~~~
abledon
thank you so much! this is quite helpful, as I'm definitely a person whose
memory solidifies through doing, rather than by reading.

~~~
AlisdairO
Hope you enjoy it :)

------
raimue
I can also recommend [http://codeforces.com/](http://codeforces.com/). They
hold regular contests where you can compete against others and then see how
you improve over time. It is popular in Russia and sponsored by VK.

------
andreis1
UVA is just one of many online judges. See
[http://qr.ae/r9bsW](http://qr.ae/r9bsW) and
[https://github.com/andreis/interview](https://github.com/andreis/interview)

------
cfontes
I really like this one
[http://oj.leetcode.com/problems/](http://oj.leetcode.com/problems/) have been
doing them for a while and it's a very nice exercise to the mind.

------
peteretep
I feel like I've found the problems thrown up by trying to build open-source
(and commercial ones where I have a lot of autonomy to change things) projects
to be more informative and useful.

------
muraty
There is checkio.org for Pythonistas. As I know, there is no language choice
for now but there will be on the future.It motivates coders with gamification
and also level of problems.

------
codecondo
I'll stick with something more modest, something that appeals to the masses
and allows for crowdsourced feedback.

[http://codecondo.com/coding-challenges/](http://codecondo.com/coding-
challenges/)

You get more than enough.

