8 ms·
How I Failed, Failed, and Finally Succeeded at Learning How to Code
- kylemaxwell 15y agoProject 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.
- kenjackson 15y agoSurprisingly good article on how someone learned to program.
- deleted 15y ago[deleted]
- totalforge 15y agoSuccinctly 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 15y agoIt'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.
- peteretep 15y agoA thousand times this. I got really in to programming when I realized I could create ... and then share with anyone to whom I could get a URL
- Timothee 15y agoIf 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.
- chromatic 15y agoHow about a BASIC running in a web browser?
- edtechdev 15y agoUnfortunately we still aren't quite there yet, although just about everything else has been ported to run on javascript: https://github.com/jashkenas/coffee-script/wiki/List-of-languages-that-compile-to-JS https://github.com/jashkenas/coffee-script/wiki/List-of-lang... And making basic/visual basic on top of javascript is a little challenging since it is case-insensitive and statically typed (later versions). But I'd especially recommend Scratch from MIT for kids: http://scratch.mit.edu/ http://scratch.mit.edu/ Many people are working on ports or similar tools in flash and html5, but none are quite there yet. Also see the game Light Bot (1 or 2): http://www.silvergames.com/light-bot-2 http://www.silvergames.com/light-bot-2 And for older folks, some nice in browser development sites include http://www.playmycode.com/ http://www.playmycode.com/ (uses a ruby-like language) and http://pixieengine.com/ http://pixieengine.com/ (uses coffeescript) And for making websites see kodingen.com or playing with javascript, see jsfiddle or jsdo.it or processingjs.
- chromatic 15y agoI've been working with a couple of other people on http://www.clubcompy.com/ http://www.clubcompy.com/ which runs completely in the browser.
- brs 15y agoFor those of us who grew up with QBasic: http://stevehanov.ca/blog/index.php?id=92 http://stevehanov.ca/blog/index.php?id=92
- cturner 15y agoThere's been lots of cool tools recently - unix in a abrowser and the like. Does anyone know of a z80- or 6502-in-a-browser? I found this, but I want the prompt. http://www.visual6502.org/JSSim/index.html http://www.visual6502.org/JSSim/index.html It should be easier to do machine code programming in a browser sandbox, because the sandbox could give you tools for viewing memory.
- _frog 15y agoThat's kind of the goal of Hackety Hack[1], to provide a framework for learning to program coupled with fun, simple libraries for graphics, sound and whatnot. [1]: http://hackety-hack.com/ http://hackety-hack.com/
- Mithrandir 15y agoPointless 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 15y agoDo 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 15y agoIf I was being tested on process, I'd have gotten a 0. Thank you.
- wging 15y agoFor what it's worth, here's Lockhart's actual article (warning: pdf) http://www.maa.org/devlin/LockhartsLament.pdf http://www.maa.org/devlin/LockhartsLament.pdf .
- barrkel 15y agoAm 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.
- jlees 15y agoThe boundary between recreational mathematics and computer science is flimsy at best; while Project Euler may not make you the world's best programmer, it'll get you well entrenched in some of the fundamental brain tricks in computer science. That's how I got interested in the whole field - Informatics Olympiad papers and mathematical problems unified the "10 PRINT 'HELLO'" world with the algorithmic one. I think the latter is surprisingly neglected these days, especially among self-taught people (not to say you can't be a great self-taught programmer, but you're less likely to have come at it all from the mathematical world).
- barrkel 15y agoSee now, the IOI problem sets do emphasize algorithmic thinking - I think they're marginally better than Project Euler problems - but again, it's very low-level stuff. It must be, in order to have a handful of problems that can be tackled in a couple of hours or so. I happen to believe that taste in crafting of program structure and selection of appropriate abstractions is more important than algorithmic acuity for most modern programming. Computational geometry, graph theoretical manipulations, dynamic programming and so on certainly have their uses, but they are usually a small core of something and not reimplemented often. Maintainable programs are a bigger issue IMO; and an excess of focus on the finer details of computational algorithms doesn't necessarily solve that issue. I rather think it can hamper the goal. Really efficient algorithms often "break the rules", exploiting commonalities or attributes that cross abstraction boundaries. Take an ultra-simple example: finding the index of a (possibly missing) element in an unsorted array with a linear search. The fastest in-order sequential algorithm is to add the element being searched for to the end of the array, and then iterate through the array and halt when the element is found. This reduces the amount of work that needs to be done over a more simple search because it removes the need for a termination condition test (index in array less than length of array) on the search loop. But it also breaks other things; it won't work in the presence of threads, and it's surprising that a search operation is not a read-only operation. Adding may need a memory reallocation; if the array is large and the growth algorithm is geometric (which it should be), then it could very surprisingly cause an OOM. Sure, you can get around this by pre-allocating the required slot, and detecting multiple threads etc., but now you've made things more complicated and harder to maintain in the search for the most efficient algorithm. The goal of efficiency can cause more assumptions to be made or pre-conditions required, and for these assumptions / pre-conditions to leak across abstraction boundaries, ultimately making maintenance changes have multiplicative rather than additive complexity costs. So I think it's fine to target big-O algorithmic costs when it makes sense and doesn't contort the software architecture too much, but applying an excess of problem insight can work against better architecture. Premature optimization, as tautologically as ever, is premature. (I write as someone self-taught who competed in IOI etc. The problems sets were fun, but I wasn't under any illusions that I was learning a whole lot. Using recursion and branch pruning to solve combinatorial search problems is a distraction when you're better off looking at the bigger picture, dare I say it, the business picture.)
- tptacek 15y agoBecause I'm OCD like this: that code in the banner: the "Hamming" class from _The Laws of Cryptography With Java Code_.
- Jun8 15y agoThis 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.
- milhous 15y agoI 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.
- eitland 15y agoIt'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_chicken_poop http://wiki.answers.com/Q/What_is_that_white_stuff_in_chicke...)
- puredemo 15y agoFarming school?
- sitkack 15y agoDon't mock this guy lest he get all agro on you.
- patrickyeon 15y agoWhy 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 15y agoI 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.
- puredemo 15y agoI've just never heard of a farming school. Agricultural programs and departments, yes. Farming school, no. It's a great idea in my opinion. Food prices are rising. Post-peak oil, local agriculture is going to become more and more important.
- raintrees 15y agoIn 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)...
- deleted 15y ago[deleted]
- pistacchio 15y agowhile 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.
- BadassFractal 15y agoI 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 15y agoThey 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 http://philip.greenspun.com/wtr/dead-trees/story under the subhead "Flaming Summary: Why Computer Books Suck."
- bmccormack 15y agoI 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.