
How I Failed, Failed, and Finally Succeeded at Learning How to Code - Umalu
http://www.theatlantic.com/technology/print/2011/06/how-i-failed-failed-and-finally-succeeded-at-learning-how-to-code/239855/
======
barrkel
Am I alone in thinking Project Euler is not particularly well suited to
learning to program?

When I looked into it, many of the problems may be tackled in a programming
language through brute force, but cleverer approaches usually come from
mathematical manipulations rather than programming insights. The mathematical
emphasis didn't seem to lead naturally to higher level programming techniques
involving modularity or abstraction beyond the functional level.

~~~
jimbokun
"The mathematical emphasis didn't seem to lead naturally to higher level
programming techniques involving modularity or abstraction beyond the
functional level."

Before you can apply modularity or abstraction, you need some code you can
modularize or abstract.

Project Euler gives people the opportunity to write code that does something.
Before someone writes code that does something, any talk of how to organize
code will be meaningless.

If you look at the points of emphasis in the AP curriculum in the article,
they jump immediately to the code organization phase, before students have
successfully solved some simple problems with code. Some number of Project
Euler problems should be a prerequisite before techniques for organizing code
are even mentioned.

~~~
sliverstorm
Put another way;

If the student still can't remember that basic C programs usually start with

int main(int argv, char *argv[]) {

Or what

return TRUE;

does, how do you expect him to go about understanding data structures, search
algorithms, OOP?

~~~
jschrf
I think you mean "int argc" ;-)

~~~
sliverstorm
Yup, I noticed that typo after the edit window expired!

------
tptacek
Because I'm OCD like this: that code in the banner: the "Hamming" class from
_The Laws of Cryptography With Java Code_.

------
totalforge
Succinctly explains why programming can be rewarding to do.

It also describes the playground people of a certain age had: 'READY>'

I hear kids these days can do well learning Python - if they can get an adult
to install the dev tools. There's got to be something as accessible and
interactive as BASIC was, and that should be everywhere.

~~~
kenjackson
It's the web browser. Just open up notepad (or whatever the default text
editor is) and start coding. Start with HTML and then add some JS.

~~~
Timothee
If you want to go this route I'd go one step further: just use the console in
the web browser.

It's pretty much as accessible and everywhere as BASIC was.

------
kenjackson
Surprisingly good article on how someone learned to program.

------
eitland

      It's tempting to generalize: If programming is best learned 
      in this playful, bottom-up way, why not everything else? 
      Could there be a Project Euler for English or Biology?
    

My biology book from farming school 10 years ago: On each page there would be
questions that you were supposed to think through before continuing. On the
next page there would be answers.

Most of the questions were serious, but in between there where jokes like
"What is the white stuff on the outside of chicken poop?" to which the answer
was "It's chicken poop too!" and then a longer explanation about how they get
rid of uric acid.

([http://wiki.answers.com/Q/What_is_that_white_stuff_in_chicke...](http://wiki.answers.com/Q/What_is_that_white_stuff_in_chicken_poop))

~~~
puredemo
Farming school?

~~~
patrickyeon
Why not? You're not born knowing how to farm, and if a classroom can turn out
better farmers, it makes sense. There's a lot more to crop growing/harvesting
and animal husbandry than "throw seeds over there, and while you're waiting
for plants to grow you can take these animals' eggs."

~~~
thaumaturgy
I have read an occasional article on modern farming methods -- some for
smaller farms, some on large-scale agriculture -- and no matter how much
science and careful methodology I previously guess that they use, the articles
surprise me anyway.

------
Jun8
This essay is brilliant! I think the most important takeaway is the last part:
it is possible to learn cognitive skills using well-designed software
(software coaches would be useful but less so in learning physical activity,
e.g. Learning to play tennis).

Couple this idea with raw informational input like that offered by the Khan
Academy or Wikipedia and you can generalize Kasparov's point to many other
fields. This is the future, somebody should do this.

------
bmccormack
I loved reading this article! While I cut my teeth designing Excel and Access
applications using VBA, I ended up using Project Euler to teach myself C#. It
was a perfect environment to learn syntax and program flow for the language
and ultimately gave me enough confidence to be able to land my first real
programming job a few months later.

------
raintrees
In the last of the article, the author is basically describing what was
depicted in The Matrix - Need a skill? Give me a few seconds to download it
and we'll get started...

Edit: Among many, many other examples (William Gibson, Star Trek, even Douglas
Adams comes quickly to mind)...

------
milhous
I smiled as I saw this at the top. I know web programming's where it's at, but
learning Django's been kind of a chore for me. And with an ok math background,
Project Euler's been fun so far. Now working on Problem 11 to compute the
highest product in a 20x20 matrix. Think nested lists might do the trick.

------
BadassFractal
I could definitely relate to the whole "let me start with a 1500 page tome". I
also tried my luck with a Visual C++ brick about 10 years ago, that worked out
exactly as described in the article. To some extent I don't feel those books
were ever meant for total beginners.

~~~
kragen
They aren't meant for people to read. They're meant to sell. Read the highly-
entertaining and no doubt at least partly accurate explanation in
<http://philip.greenspun.com/wtr/dead-trees/story> under the subhead "Flaming
Summary: Why Computer Books Suck."

------
Mithrandir
Pointless note: Another way to solve that triangle is to flip the left-most
leg of it counterclockwise until it's exactly parallel with the rectangle. It
is then plain to see it's half of the rectangle.

~~~
barrkel
Do you mean rotate the triangle counter-clockwise? The leftmost leg of the
triangle is longer than the left edge of the rectangle, so I don't think it
will be as plain as you suggest. You'll end up with something like this:

    
    
        +--------------------+
        |                  /
        +---------------/--------+
        |            /           |
        |         /              |
        |      /                 |
        |   /                    |
        |/                       |
        +------------------------+

~~~
Mithrandir
If I was being tested on process, I'd have gotten a 0. Thank you.

~~~
wging
For what it's worth, here's Lockhart's actual article (warning: pdf)
<http://www.maa.org/devlin/LockhartsLament.pdf> .

------
kylemaxwell
Project Euler reminds me of my high-school programming classes in the early
90s, especially the "computer contests". Lots of puzzle-type problems and
string manipulation.

------
pistacchio
while i like project euler, i find rosettacode to be more down-to-earth. in
everyday life you're much more likely to have to solve rosettacode's tasks (eg
download a page from the web, parse something, generate a bitmap, send a mail)
than project euler's math-based tasks.

